1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 12:39:53 +00:00

Promise constness

This commit is contained in:
unelsson 2023-01-17 02:55:03 +02:00
parent 6a864cd9f6
commit fc64ab0f5a
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ namespace CSMWorld
std::vector<UniversalId> mUniversalId;
QStringList mObjectsFormats;
const CSMDoc::Document& mDocument;
CSVWorld::DragRecordTable* mTableOfDragStart;
const CSVWorld::DragRecordTable* mTableOfDragStart;
QModelIndex mIndexAtDragStart;
public:
@ -64,9 +64,9 @@ namespace CSMWorld
UniversalId returnMatching(CSMWorld::ColumnBase::Display type) const;
void setIndexAtDragStart(QModelIndex index) { mIndexAtDragStart = index; }
void setIndexAtDragStart(const QModelIndex& index) { mIndexAtDragStart = index; }
void setTableOfDragStart(CSVWorld::DragRecordTable* table) { mTableOfDragStart = table; }
void setTableOfDragStart(const CSVWorld::DragRecordTable* const table) { mTableOfDragStart = table; }
const QModelIndex getIndexAtDragStart() const { return mIndexAtDragStart; }

View File

@ -16,7 +16,7 @@
#include "dragdroputils.hpp"
void CSVWorld::DragRecordTable::startDragFromTable(CSVWorld::DragRecordTable& table, QModelIndex index)
void CSVWorld::DragRecordTable::startDragFromTable(const CSVWorld::DragRecordTable& table, QModelIndex index)
{
std::vector<CSMWorld::UniversalId> records = table.getDraggedRecords();
if (records.empty())

View File

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