diff options
Diffstat (limited to 'src/plugins/diffeditor')
-rw-r--r-- | src/plugins/diffeditor/diffeditorcontroller.cpp | 5 | ||||
-rw-r--r-- | src/plugins/diffeditor/diffeditorcontroller.h | 1 | ||||
-rw-r--r-- | src/plugins/diffeditor/diffeditordocument.cpp | 8 | ||||
-rw-r--r-- | src/plugins/diffeditor/diffeditordocument.h | 1 |
4 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/diffeditor/diffeditorcontroller.cpp b/src/plugins/diffeditor/diffeditorcontroller.cpp index e8cf1730f3..0a82110bbe 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.cpp +++ b/src/plugins/diffeditor/diffeditorcontroller.cpp @@ -55,6 +55,11 @@ QString DiffEditorController::baseDirectory() const return m_document->baseDirectory(); } +void DiffEditorController::setBaseDirectory(const QString &directory) +{ + m_document->setBaseDirectory(directory); +} + int DiffEditorController::contextLineCount() const { return m_document->contextLineCount(); diff --git a/src/plugins/diffeditor/diffeditorcontroller.h b/src/plugins/diffeditor/diffeditorcontroller.h index 4578a7f82a..b32537c0e4 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.h +++ b/src/plugins/diffeditor/diffeditorcontroller.h @@ -48,6 +48,7 @@ public: bool isReloading() const; QString baseDirectory() const; + void setBaseDirectory(const QString &directory); int contextLineCount() const; bool ignoreWhitespace() const; diff --git a/src/plugins/diffeditor/diffeditordocument.cpp b/src/plugins/diffeditor/diffeditordocument.cpp index ac10f9bf53..b38235adbe 100644 --- a/src/plugins/diffeditor/diffeditordocument.cpp +++ b/src/plugins/diffeditor/diffeditordocument.cpp @@ -113,7 +113,8 @@ void DiffEditorDocument::setDiffFiles(const QList<FileData> &data, const QString const QString &startupFile) { m_diffFiles = data; - m_baseDirectory = directory; + if (!directory.isEmpty()) + m_baseDirectory = directory; m_startupFile = startupFile; emit documentChanged(); } @@ -128,6 +129,11 @@ QString DiffEditorDocument::baseDirectory() const return m_baseDirectory; } +void DiffEditorDocument::setBaseDirectory(const QString &directory) +{ + m_baseDirectory = directory; +} + QString DiffEditorDocument::startupFile() const { return m_startupFile; diff --git a/src/plugins/diffeditor/diffeditordocument.h b/src/plugins/diffeditor/diffeditordocument.h index a9dff53faa..42657e43f3 100644 --- a/src/plugins/diffeditor/diffeditordocument.h +++ b/src/plugins/diffeditor/diffeditordocument.h @@ -60,6 +60,7 @@ public: const QString &startupFile = QString()); QList<FileData> diffFiles() const; QString baseDirectory() const; + void setBaseDirectory(const QString &directory); QString startupFile() const; void setDescription(const QString &description); |