From d6898af23ea706f82d62cc0e974f025a9aeb5b95 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 17 Aug 2017 19:42:48 +0300 Subject: [PATCH] Refactoring. Rename method. --HG-- branch : feature --- src/app/valentina/mainwindow.cpp | 14 +++++++------- src/libs/ifc/xml/vabstractpattern.cpp | 2 +- src/libs/ifc/xml/vabstractpattern.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 9bb2e5575..17af52e75 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1523,7 +1523,7 @@ void MainWindow::LoadIndividual() watcher->removePath(AbsoluteMPath(qApp->GetPPath(), doc->MPath())); } ui->actionUnloadMeasurements->setEnabled(true); - doc->SetPath(RelativeMPath(qApp->GetPPath(), mPath)); + doc->SetMPath(RelativeMPath(qApp->GetPPath(), mPath)); watcher->addPath(mPath); PatternChangesWereSaved(false); ui->actionEditCurrent->setEnabled(true); @@ -1572,7 +1572,7 @@ void MainWindow::LoadMultisize() watcher->removePath(AbsoluteMPath(qApp->GetPPath(), doc->MPath())); } ui->actionUnloadMeasurements->setEnabled(true); - doc->SetPath(RelativeMPath(qApp->GetPPath(), mPath)); + doc->SetMPath(RelativeMPath(qApp->GetPPath(), mPath)); watcher->addPath(mPath); PatternChangesWereSaved(false); ui->actionEditCurrent->setEnabled(true); @@ -1609,7 +1609,7 @@ void MainWindow::UnloadMeasurements() if (doc->ListMeasurements().isEmpty()) { watcher->removePath(AbsoluteMPath(qApp->GetPPath(), doc->MPath())); - doc->SetPath(QString()); + doc->SetMPath(QString()); PatternChangesWereSaved(false); ui->actionEditCurrent->setEnabled(false); ui->actionUnloadMeasurements->setDisabled(true); @@ -3387,7 +3387,7 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error) const QString mPath = AbsoluteMPath(qApp->GetPPath(), doc->MPath()); if (not mPath.isEmpty() && qApp->GetPPath() != fileName) { - doc->SetPath(RelativeMPath(fileName, mPath)); + doc->SetMPath(RelativeMPath(fileName, mPath)); } const bool result = doc->SaveDocument(fileName, error); @@ -3403,7 +3403,7 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error) } else { - doc->SetPath(mPath); + doc->SetMPath(mPath); qCDebug(vMainWindow, "Could not save file %s. %s.", qUtf8Printable(fileName), qUtf8Printable(error)); } return result; @@ -4207,7 +4207,7 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu doc->setXMLContent(converter.Convert()); if (!customMeasureFile.isEmpty()) { - doc->SetPath(RelativeMPath(fileName, customMeasureFile)); + doc->SetMPath(RelativeMPath(fileName, customMeasureFile)); } qApp->setPatternUnit(doc->MUnit()); const QString path = AbsoluteMPath(fileName, doc->MPath()); @@ -4679,7 +4679,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS CheckRequiredMeasurements(m.data()); - doc->SetPath(RelativeMPath(patternPath, mPath)); + doc->SetMPath(RelativeMPath(patternPath, mPath)); PatternChangesWereSaved(false); qApp->setPatternType(patternType); return mPath; diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 51ca35345..da75bc159 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -789,7 +789,7 @@ QString VAbstractPattern::MPath() const } //--------------------------------------------------------------------------------------------------------------------- -void VAbstractPattern::SetPath(const QString &path) +void VAbstractPattern::SetMPath(const QString &path) { if (setTagText(TagMeasurements, path)) { diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 7b85bc2a4..c6653c3c1 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -121,7 +121,7 @@ public: QVector getLocalHistory() const; QString MPath() const; - void SetPath(const QString &path); + void SetMPath(const QString &path); quint32 SiblingNodeId(const quint32 &nodeId) const;