diff options
author | jkobus <jaroslaw.kobus@digia.com> | 2014-10-24 14:11:12 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@digia.com> | 2014-11-05 14:38:51 +0100 |
commit | 2a9c9f2d707d37e9cac8712aeac049c35fd820e7 (patch) | |
tree | 957fc569a50bace03e71b21c426bb591ef146717 /src/plugins/diffeditor/diffeditorplugin.cpp | |
parent | f406a38ca75ea56fe71cec7d10dfb2746444017d (diff) | |
download | qt-creator-2a9c9f2d707d37e9cac8712aeac049c35fd820e7.tar.gz |
Hide some diff editor controls when diff editor is bound to a file.
Remove unnecessary anymore "ignoreWhitespace" argument
from functions which read a patch file.
Transfer the ownership of reloader into controller.
Task-number: QTCREATORBUG-13250
Change-Id: I68183005b845d6ece9ea2be9888abc8597310426
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorplugin.cpp')
-rw-r--r-- | src/plugins/diffeditor/diffeditorplugin.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index fc88e8fffd..3c48515d10 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -54,8 +54,7 @@ class SimpleDiffEditorReloader : public DiffEditorReloader { Q_OBJECT public: - SimpleDiffEditorReloader(QObject *parent, - const QString &leftFileName, + SimpleDiffEditorReloader(const QString &leftFileName, const QString &rightFileName); protected: @@ -66,11 +65,9 @@ private: QString m_rightFileName; }; -SimpleDiffEditorReloader::SimpleDiffEditorReloader(QObject *parent, - const QString &leftFileName, +SimpleDiffEditorReloader::SimpleDiffEditorReloader(const QString &leftFileName, const QString &rightFileName) - : DiffEditorReloader(parent), - m_leftFileName(leftFileName), + : m_leftFileName(leftFileName), m_rightFileName(rightFileName) { } @@ -206,7 +203,7 @@ void DiffEditorPlugin::diff() DiffEditorController *controller = document->controller(); if (!controller->reloader()) { SimpleDiffEditorReloader *reloader = - new SimpleDiffEditorReloader(controller, fileName1, fileName2); + new SimpleDiffEditorReloader(fileName1, fileName2); controller->setReloader(reloader); } @@ -475,7 +472,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testMakePatch() QCOMPARE(result, patchText); bool ok; - QList<FileData> resultList = DiffUtils::readPatch(result, false, &ok); + QList<FileData> resultList = DiffUtils::readPatch(result, &ok); QVERIFY(ok); QCOMPARE(resultList.count(), 1); @@ -905,7 +902,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch() QFETCH(QList<FileData>, fileDataList); bool ok; - QList<FileData> result = DiffUtils::readPatch(sourcePatch, false, &ok); + QList<FileData> result = DiffUtils::readPatch(sourcePatch, &ok); QVERIFY(ok); QCOMPARE(fileDataList.count(), result.count()); |