Merge remote-tracking branch 'cc9cii/fix-hide-overload-warn'

celladd
Marc Zinnschlag 10 years ago
commit cf077dcf5d

@ -33,7 +33,7 @@ namespace ESM
namespace Files
{
class ConfigurationManager;
struct ConfigurationManager;
}
namespace CSMWorld

@ -17,7 +17,7 @@
namespace Files
{
class ConfigurationManager;
struct ConfigurationManager;
}
namespace CSMDoc
@ -50,7 +50,7 @@ namespace CSMDoc
///< \param new_ Do not load the last content file in \a files and instead create in an
/// appropriate way.
void setResourceDir (const boost::filesystem::path& parResDir);
void setResourceDir (const boost::filesystem::path& parResDir);
void setEncoding (ToUTF8::FromType encoding);
@ -61,7 +61,7 @@ namespace CSMDoc
private:
boost::filesystem::path mResDir;
boost::filesystem::path mResDir;
private slots:

@ -90,7 +90,7 @@ void CSMDoc::WriteHeaderStage::perform (int stage, Messages& messages)
CSMDoc::WriteDialogueCollectionStage::WriteDialogueCollectionStage (Document& document,
SavingState& state, bool journal)
: mDocument (document), mState (state),
: mState (state),
mTopics (journal ? document.getData().getJournals() : document.getData().getTopics()),
mInfos (journal ? document.getData().getJournalInfos() : document.getData().getTopicInfos())
{}

@ -126,7 +126,6 @@ namespace CSMDoc
class WriteDialogueCollectionStage : public Stage
{
Document& mDocument;
SavingState& mState;
const CSMWorld::IdCollection<ESM::Dialogue>& mTopics;
CSMWorld::InfoCollection& mInfos;

@ -20,7 +20,7 @@ namespace CSMWorld
{
class IdTable;
class IdTable;
class RecordBase;
struct RecordBase;
class ModifyCommand : public QUndoCommand
{

@ -10,7 +10,7 @@
namespace CSMWorld
{
class CollectionBase;
class RecordBase;
struct RecordBase;
class IdTable : public IdTableBase
{

@ -26,7 +26,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
if (!record2.get().mPrev.empty())
{
index = getIndex (record2.get().mPrev, topic);
index = getInfoIndex (record2.get().mPrev, topic);
if (index!=-1)
++index;
@ -34,7 +34,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
if (index==-1 && !record2.get().mNext.empty())
{
index = getIndex (record2.get().mNext, topic);
index = getInfoIndex (record2.get().mNext, topic);
}
if (index==-1)
@ -60,7 +60,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
}
}
int CSMWorld::InfoCollection::getIndex (const std::string& id, const std::string& topic) const
int CSMWorld::InfoCollection::getInfoIndex (const std::string& id, const std::string& topic) const
{
std::string fullId = Misc::StringUtils::lowerCase (topic) + "#" + id;

@ -6,7 +6,7 @@
namespace ESM
{
class Dialogue;
struct Dialogue;
}
namespace CSMWorld
@ -22,7 +22,7 @@ namespace CSMWorld
void load (const Info& record, bool base);
int getIndex (const std::string& id, const std::string& topic) const;
int getInfoIndex (const std::string& id, const std::string& topic) const;
///< Return index for record \a id or -1 (if not present; deleted records are considered)
///
/// \param id info ID without topic prefix

@ -5,8 +5,6 @@
namespace CSMWorld
{
class Cell;
/// \brief Wrapper for CellRef sub record
struct CellRef : public ESM::CellRef
{

@ -12,7 +12,7 @@
namespace CSMWorld
{
struct Cell;
struct UniversalId;
class UniversalId;
/// \brief References in cells
class RefCollection : public Collection<CellRef>

@ -9,7 +9,7 @@ namespace CSMWorld
{
class RefIdColumn;
class RefIdData;
class RecordBase;
struct RecordBase;
class RefIdAdapter
{

@ -17,7 +17,7 @@ namespace Ogre
namespace CSMWorld
{
class Data;
class CellRef;
struct CellRef;
}
namespace CSVWorld

@ -30,7 +30,7 @@ void CSVTools::ReportTable::contextMenuEvent (QContextMenuEvent *event)
void CSVTools::ReportTable::mouseMoveEvent (QMouseEvent *event)
{
if (event->buttons() & Qt::LeftButton)
startDrag (*this);
startDragFromTable (*this);
}
void CSVTools::ReportTable::mouseDoubleClickEvent (QMouseEvent *event)

@ -40,8 +40,12 @@ QAbstractItemDelegate(parent),
mTable(table)
{}
void CSVWorld::NotEditableSubDelegate::setEditorData (QLabel* editor, const QModelIndex& index) const
void CSVWorld::NotEditableSubDelegate::setEditorData (QWidget* editor, const QModelIndex& index) const
{
QLabel* label = qobject_cast<QLabel*>(editor);
if(!label)
return;
QVariant v = index.data(Qt::EditRole);
if (!v.isValid())
{
@ -54,16 +58,17 @@ void CSVWorld::NotEditableSubDelegate::setEditorData (QLabel* editor, const QMod
if (QVariant::String == v.type())
{
editor->setText(v.toString());
} else //else we are facing enums
label->setText(v.toString());
}
else //else we are facing enums
{
int data = v.toInt();
std::vector<std::string> enumNames (CSMWorld::Columns::getEnums (static_cast<CSMWorld::Columns::ColumnId> (mTable->getColumnId (index.column()))));
editor->setText(QString::fromUtf8(enumNames.at(data).c_str()));
label->setText(QString::fromUtf8(enumNames.at(data).c_str()));
}
}
void CSVWorld::NotEditableSubDelegate::setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
void CSVWorld::NotEditableSubDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
{
//not editable widgets will not save model data
}
@ -80,8 +85,7 @@ QSize CSVWorld::NotEditableSubDelegate::sizeHint (const QStyleOptionViewItem& op
QWidget* CSVWorld::NotEditableSubDelegate::createEditor (QWidget *parent,
const QStyleOptionViewItem& option,
const QModelIndex& index,
CSMWorld::ColumnBase::Display display) const
const QModelIndex& index) const
{
return new QLabel(parent);
}
@ -224,6 +228,11 @@ void CSVWorld::DialogueDelegateDispatcher::setEditorData (QWidget* editor, const
}
}
void CSVWorld::DialogueDelegateDispatcher::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
{
setModelData(editor, model, index, CSMWorld::ColumnBase::Display_None);
}
void CSVWorld::DialogueDelegateDispatcher::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
{
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
@ -258,7 +267,7 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
QWidget* editor = NULL;
if (! (mTable->flags (index) & Qt::ItemIsEditable))
{
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent), QStyleOptionViewItem(), index, display);
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent), QStyleOptionViewItem(), index);
}
std::map<int, CommandDelegate*>::iterator delegateIt(mDelegates.find(display));

@ -40,9 +40,9 @@ namespace CSVWorld
public:
NotEditableSubDelegate(const CSMWorld::IdTable* table, QObject * parent = 0);
virtual void setEditorData (QLabel* editor, const QModelIndex& index) const;
virtual void setEditorData (QWidget* editor, const QModelIndex& index) const;
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const;
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
///< does nothing
@ -52,8 +52,7 @@ namespace CSVWorld
virtual QWidget *createEditor (QWidget *parent,
const QStyleOptionViewItem& option,
const QModelIndex& index,
CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const;
const QModelIndex& index) const;
};
//this can't be nested into the DialogueDelegateDispatcher, because it needs to emit signals
@ -119,6 +118,8 @@ namespace CSVWorld
virtual void setEditorData (QWidget* editor, const QModelIndex& index) const;
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const;
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;

@ -3,7 +3,7 @@
#include "../../model/world/tablemimedata.hpp"
#include "dragrecordtable.hpp"
void CSVWorld::DragRecordTable::startDrag (const CSVWorld::DragRecordTable& table)
void CSVWorld::DragRecordTable::startDragFromTable (const CSVWorld::DragRecordTable& table)
{
CSMWorld::TableMimeData* mime = new CSMWorld::TableMimeData (table.getDraggedRecords(), mDocument);

@ -33,7 +33,7 @@ namespace CSVWorld
void setEditLock(bool locked);
protected:
void startDrag(const DragRecordTable& table);
void startDragFromTable(const DragRecordTable& table);
void dragEnterEvent(QDragEnterEvent *event);

@ -46,7 +46,6 @@ QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent,
const QModelIndex& index) const
{
return createEditor(parent, option, index, CSMWorld::ColumnBase::Display_None);
//overloading virtual functions is HARD
}
QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem& option,

@ -345,7 +345,7 @@ void CSVWorld::RegionMap::viewInTable()
void CSVWorld::RegionMap::mouseMoveEvent (QMouseEvent* event)
{
startDrag(*this);
startDragFromTable(*this);
}
std::vector< CSMWorld::UniversalId > CSVWorld::RegionMap::getDraggedRecords() const

@ -635,7 +635,7 @@ void CSVWorld::Table::mouseMoveEvent (QMouseEvent* event)
{
if (event->buttons() & Qt::LeftButton)
{
startDrag(*this);
startDragFromTable(*this);
}
}

@ -139,6 +139,12 @@ void CSVWorld::CommandDelegate::setModelData (QWidget *editor, QAbstractItemMode
///< \todo provide some kind of feedback to the user, indicating that editing is currently not possible.
}
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
const QModelIndex& index) const
{
return createEditor (parent, option, index, CSMWorld::ColumnBase::Display_None);
}
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
{
@ -230,6 +236,11 @@ bool CSVWorld::CommandDelegate::isEditLocked() const
return mEditLock;
}
void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelIndex& index) const
{
setEditorData (editor, index, false);
}
void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const
{
QVariant v = index.data(Qt::EditRole);

@ -130,10 +130,14 @@ namespace CSVWorld
virtual void setModelData (QWidget *editor, QAbstractItemModel *model,
const QModelIndex& index) const;
virtual QWidget *createEditor (QWidget *parent,
const QStyleOptionViewItem& option,
const QModelIndex& index) const;
virtual QWidget *createEditor (QWidget *parent,
const QStyleOptionViewItem& option,
const QModelIndex& index,
CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const;
CSMWorld::ColumnBase::Display display) const;
void setEditLock (bool locked);
@ -141,8 +145,9 @@ namespace CSVWorld
///< \return Does column require update?
virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay = false) const;
virtual void setEditorData (QWidget *editor, const QModelIndex& index) const;
virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const;
public slots:

@ -29,7 +29,7 @@ namespace MWWorld
virtual bool eraseStatic(const std::string &id) {return false;}
virtual void clearDynamic() {}
virtual void write (ESM::ESMWriter& writer) const {}
virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const {}
virtual void read (ESM::ESMReader& reader, const std::string& id) {}
///< Read into dynamic storage
@ -234,7 +234,7 @@ namespace MWWorld
int getDynamicSize() const
{
return mDynamic.size();
return static_cast<int> (mDynamic.size()); // truncated from unsigned __int64 if _MSC_VER && _WIN64
}
void listIdentifier(std::vector<std::string> &list) const {

@ -117,6 +117,13 @@ BulletShapePtr BulletShapeManager::create (const Ogre::String& name, const Ogre:
return createResource(name,group,isManual,loader,createParams).staticCast<BulletShape>();
}
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);

@ -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

@ -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<float, std::string> > PhysicEngine::rayTest2(const btVector3& from, const btVector3& to, int filterGroup)

Loading…
Cancel
Save