From 15b9a628ac4729258d1ad93a94aae0a1e4889961 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sat, 14 Mar 2015 19:41:55 +1100 Subject: [PATCH] Fix the name of DragRecordTable::startDrag method. Make the compiler be quiet about BulletShapeLoader's hidden overloaded methods. --- apps/opencs/view/tools/reporttable.cpp | 2 +- apps/opencs/view/world/dragrecordtable.cpp | 2 +- apps/opencs/view/world/dragrecordtable.hpp | 2 +- apps/opencs/view/world/regionmap.cpp | 2 +- apps/opencs/view/world/table.cpp | 2 +- libs/openengine/bullet/BulletShapeLoader.cpp | 7 +++++++ libs/openengine/bullet/BulletShapeLoader.h | 8 +++++++- libs/openengine/bullet/physic.cpp | 2 +- 8 files changed, 20 insertions(+), 7 deletions(-) diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index da39c1983..809a39fa4 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -30,7 +30,7 @@ void CSVTools::ReportTable::contextMenuEvent (QContextMenuEvent *event) void CSVTools::ReportTable::mouseMoveEvent (QMouseEvent *event) { if (event->buttons() & Qt::LeftButton) - startDragToTable (*this); + startDragFromTable (*this); } void CSVTools::ReportTable::mouseDoubleClickEvent (QMouseEvent *event) diff --git a/apps/opencs/view/world/dragrecordtable.cpp b/apps/opencs/view/world/dragrecordtable.cpp index f9cc4b530..f45c45809 100644 --- a/apps/opencs/view/world/dragrecordtable.cpp +++ b/apps/opencs/view/world/dragrecordtable.cpp @@ -3,7 +3,7 @@ #include "../../model/world/tablemimedata.hpp" #include "dragrecordtable.hpp" -void CSVWorld::DragRecordTable::startDragToTable (const CSVWorld::DragRecordTable& table) +void CSVWorld::DragRecordTable::startDragFromTable (const CSVWorld::DragRecordTable& table) { CSMWorld::TableMimeData* mime = new CSMWorld::TableMimeData (table.getDraggedRecords(), mDocument); diff --git a/apps/opencs/view/world/dragrecordtable.hpp b/apps/opencs/view/world/dragrecordtable.hpp index 5b7e68490..4996c03ac 100644 --- a/apps/opencs/view/world/dragrecordtable.hpp +++ b/apps/opencs/view/world/dragrecordtable.hpp @@ -33,7 +33,7 @@ namespace CSVWorld void setEditLock(bool locked); protected: - void startDragToTable(const DragRecordTable& table); + void startDragFromTable(const DragRecordTable& table); void dragEnterEvent(QDragEnterEvent *event); diff --git a/apps/opencs/view/world/regionmap.cpp b/apps/opencs/view/world/regionmap.cpp index 316c61a88..bc96b0952 100644 --- a/apps/opencs/view/world/regionmap.cpp +++ b/apps/opencs/view/world/regionmap.cpp @@ -345,7 +345,7 @@ void CSVWorld::RegionMap::viewInTable() void CSVWorld::RegionMap::mouseMoveEvent (QMouseEvent* event) { - startDragToTable(*this); + startDragFromTable(*this); } std::vector< CSMWorld::UniversalId > CSVWorld::RegionMap::getDraggedRecords() const diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 7b8b97bc8..97a3bc2e3 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -635,7 +635,7 @@ void CSVWorld::Table::mouseMoveEvent (QMouseEvent* event) { if (event->buttons() & Qt::LeftButton) { - startDragToTable(*this); + startDragFromTable(*this); } } diff --git a/libs/openengine/bullet/BulletShapeLoader.cpp b/libs/openengine/bullet/BulletShapeLoader.cpp index fd9204b44..92d56b42c 100644 --- a/libs/openengine/bullet/BulletShapeLoader.cpp +++ b/libs/openengine/bullet/BulletShapeLoader.cpp @@ -117,6 +117,13 @@ BulletShapePtr BulletShapeManager::create (const Ogre::String& name, const Ogre: return createResource(name,group,isManual,loader,createParams).staticCast(); } +Ogre::ResourcePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group, + bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::NameValuePairList *loadParams, + bool backgroundThread) +{ + return this->load(name, group); +} + BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group) { BulletShapePtr textf = getByName(name); diff --git a/libs/openengine/bullet/BulletShapeLoader.h b/libs/openengine/bullet/BulletShapeLoader.h index 31ee3cc7d..907ff8bfe 100644 --- a/libs/openengine/bullet/BulletShapeLoader.h +++ b/libs/openengine/bullet/BulletShapeLoader.h @@ -92,6 +92,11 @@ private: /** \brief Private operator= . This is a forbidden operation. */ BulletShapeManager& operator=(const BulletShapeManager &); + // Not intended to be used, declared here to keep the compiler from complaining + // about hidden virtual methods. + virtual Ogre::ResourcePtr load(const Ogre::String &name, const Ogre::String &group, + bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::NameValuePairList *loadParams, + bool backgroundThread); public: @@ -101,7 +106,8 @@ public: /// Get a resource by name /// @see ResourceManager::getByName - BulletShapePtr getByName(const Ogre::String& name, const Ogre::String& groupName = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME); + BulletShapePtr getByName(const Ogre::String& name, + const Ogre::String& groupName = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME); /// Create a new shape /// @see ResourceManager::createResource diff --git a/libs/openengine/bullet/physic.cpp b/libs/openengine/bullet/physic.cpp index 81a2eb043..013ef1003 100644 --- a/libs/openengine/bullet/physic.cpp +++ b/libs/openengine/bullet/physic.cpp @@ -828,7 +828,7 @@ namespace Physic if (callback.hasHit()) return std::make_pair(true, callback.m_closestHitFraction); else - return std::make_pair(false, 1); + return std::make_pair(false, 1.0f); } std::vector< std::pair > PhysicEngine::rayTest2(const btVector3& from, const btVector3& to, int filterGroup)