mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-27 13:06:51 +00:00
Move local variables in the editor
This commit is contained in:
parent
2fc87efa8f
commit
074ab682ab
9 changed files with 11 additions and 11 deletions
|
@ -1107,7 +1107,7 @@ void CSMWorld::Data::loadFallbackEntries()
|
||||||
newMarker.mModel = model;
|
newMarker.mModel = model;
|
||||||
newMarker.mRecordFlags = 0;
|
newMarker.mRecordFlags = 0;
|
||||||
auto record = std::make_unique<CSMWorld::Record<ESM::Static>>();
|
auto record = std::make_unique<CSMWorld::Record<ESM::Static>>();
|
||||||
record->mBase = newMarker;
|
record->mBase = std::move(newMarker);
|
||||||
record->mState = CSMWorld::RecordBase::State_BaseOnly;
|
record->mState = CSMWorld::RecordBase::State_BaseOnly;
|
||||||
mReferenceables.appendRecord(std::move(record), CSMWorld::UniversalId::Type_Static);
|
mReferenceables.appendRecord(std::move(record), CSMWorld::UniversalId::Type_Static);
|
||||||
}
|
}
|
||||||
|
@ -1123,7 +1123,7 @@ void CSMWorld::Data::loadFallbackEntries()
|
||||||
newMarker.mModel = model;
|
newMarker.mModel = model;
|
||||||
newMarker.mRecordFlags = 0;
|
newMarker.mRecordFlags = 0;
|
||||||
auto record = std::make_unique<CSMWorld::Record<ESM::Door>>();
|
auto record = std::make_unique<CSMWorld::Record<ESM::Door>>();
|
||||||
record->mBase = newMarker;
|
record->mBase = std::move(newMarker);
|
||||||
record->mState = CSMWorld::RecordBase::State_BaseOnly;
|
record->mState = CSMWorld::RecordBase::State_BaseOnly;
|
||||||
mReferenceables.appendRecord(std::move(record), CSMWorld::UniversalId::Type_Door);
|
mReferenceables.appendRecord(std::move(record), CSMWorld::UniversalId::Type_Door);
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data& data)
|
||||||
completer->setPopup(popup); // The completer takes ownership of the popup
|
completer->setPopup(popup); // The completer takes ownership of the popup
|
||||||
completer->setMaxVisibleItems(10);
|
completer->setMaxVisibleItems(10);
|
||||||
|
|
||||||
mCompleters[current->first] = completer;
|
mCompleters[current->first] = std::move(completer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ void CSVDoc::AdjusterWidget::setName(const QString& name, bool addon)
|
||||||
{
|
{
|
||||||
// path already points to the local data directory
|
// path already points to the local data directory
|
||||||
message = "Will be saved as: " + Files::pathToQString(path);
|
message = "Will be saved as: " + Files::pathToQString(path);
|
||||||
mResultPath = path;
|
mResultPath = std::move(path);
|
||||||
}
|
}
|
||||||
// in all other cases, ensure the path points to data-local and do an existing file check
|
// in all other cases, ensure the path points to data-local and do an existing file check
|
||||||
else
|
else
|
||||||
|
|
|
@ -410,7 +410,7 @@ bool CSVDoc::ViewManager::removeDocument(CSVDoc::View* view)
|
||||||
remainingViews.push_back(*iter);
|
remainingViews.push_back(*iter);
|
||||||
}
|
}
|
||||||
mDocumentManager.removeDocument(document);
|
mDocumentManager.removeDocument(document);
|
||||||
mViews = remainingViews;
|
mViews = std::move(remainingViews);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,7 +514,7 @@ void CSVRender::PagedWorldspaceWidget::moveCellSelection(int x, int y)
|
||||||
addCellToScene(*iter);
|
addCellToScene(*iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
mSelection = newSelection;
|
mSelection = std::move(newSelection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera(int offsetX, int offsetY)
|
void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera(int offsetX, int offsetY)
|
||||||
|
|
|
@ -541,7 +541,7 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
||||||
= landTable.data(landTable.getModelIndex(cellId, textureColumn))
|
= landTable.data(landTable.getModelIndex(cellId, textureColumn))
|
||||||
.value<CSMWorld::LandTexturesColumn::DataType>();
|
.value<CSMWorld::LandTexturesColumn::DataType>();
|
||||||
newTerrainOtherCell[yInOtherCell * landTextureSize + xInOtherCell] = brushInt;
|
newTerrainOtherCell[yInOtherCell * landTextureSize + xInOtherCell] = brushInt;
|
||||||
pushEditToCommand(newTerrainOtherCell, document, landTable, cellId);
|
pushEditToCommand(newTerrainOtherCell, document, landTable, std::move(cellId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -702,7 +702,7 @@ void CSVRender::TerrainTextureMode::createTexture(const std::string& textureFile
|
||||||
QModelIndex index(ltexTable.getModelIndex(newId, ltexTable.findColumnIndex(CSMWorld::Columns::ColumnId_Texture)));
|
QModelIndex index(ltexTable.getModelIndex(newId, ltexTable.findColumnIndex(CSMWorld::Columns::ColumnId_Texture)));
|
||||||
undoStack.push(new CSMWorld::ModifyCommand(ltexTable, index, textureFileNameVariant));
|
undoStack.push(new CSMWorld::ModifyCommand(ltexTable, index, textureFileNameVariant));
|
||||||
undoStack.endMacro();
|
undoStack.endMacro();
|
||||||
mBrushTexture = newId;
|
mBrushTexture = std::move(newId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSVRender::TerrainTextureMode::allowLandTextureEditing(const std::string& cellId)
|
bool CSVRender::TerrainTextureMode::allowLandTextureEditing(const std::string& cellId)
|
||||||
|
|
|
@ -213,7 +213,7 @@ void CSVWidget::TextureBrushWindow::setBrushTexture(std::string brushTexture)
|
||||||
mSelectedBrush->setText(QString::fromStdString(mBrushTextureLabel));
|
mSelectedBrush->setText(QString::fromStdString(mBrushTextureLabel));
|
||||||
}
|
}
|
||||||
|
|
||||||
mBrushTexture = newBrushTextureId;
|
mBrushTexture = std::move(newBrushTextureId);
|
||||||
|
|
||||||
emit passTextureId(mBrushTexture);
|
emit passTextureId(mBrushTexture);
|
||||||
emit passBrushShape(mBrushShape); // updates the icon tooltip
|
emit passBrushShape(mBrushShape); // updates the icon tooltip
|
||||||
|
|
|
@ -146,7 +146,7 @@ void CSVWorld::ExtendedCommandConfigurator::setupCheckBoxes(const std::vector<CS
|
||||||
CSMWorld::UniversalId type = types[counter];
|
CSMWorld::UniversalId type = types[counter];
|
||||||
current->first->setText(QString::fromUtf8(type.getTypeName().c_str()));
|
current->first->setText(QString::fromUtf8(type.getTypeName().c_str()));
|
||||||
current->first->setChecked(true);
|
current->first->setChecked(true);
|
||||||
current->second = type;
|
current->second = std::move(type);
|
||||||
++counter;
|
++counter;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -169,7 +169,7 @@ void CSVWorld::TableSubView::createFilterRequest(std::vector<CSMWorld::Universal
|
||||||
{
|
{
|
||||||
CSVFilter::FilterData filterData;
|
CSVFilter::FilterData filterData;
|
||||||
filterData.searchData = it->getId();
|
filterData.searchData = it->getId();
|
||||||
filterData.columns = col;
|
filterData.columns = std::move(col);
|
||||||
sourceFilter.emplace_back(filterData);
|
sourceFilter.emplace_back(filterData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue