diff options
author | hjk <hjk121@nokiamail.com> | 2014-08-26 00:02:47 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-08-27 12:12:15 +0200 |
commit | 4d082cee74e9faf88213e234e9a022008ec501b8 (patch) | |
tree | 44d526e9ffc3b2ccb52d6a9f95ef22f7558fe9d3 /src/plugins/bazaar | |
parent | aa6495a261bf6a958ba5bbe4fb7b334f62748156 (diff) | |
download | qt-creator-4d082cee74e9faf88213e234e9a022008ec501b8.tar.gz |
VcsBase: Use static pattern for VcsBaseOutputWindow
Also rename to VcsOutputWindow.
Change-Id: I79547b1154603a8c7b3604eadc5b460930c6109c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/bazaar')
-rw-r--r-- | src/plugins/bazaar/bazaarclient.cpp | 6 | ||||
-rw-r--r-- | src/plugins/bazaar/bazaarplugin.cpp | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/bazaar/bazaarclient.cpp b/src/plugins/bazaar/bazaarclient.cpp index db00d7b3d7..0004b37006 100644 --- a/src/plugins/bazaar/bazaarclient.cpp +++ b/src/plugins/bazaar/bazaarclient.cpp @@ -30,7 +30,7 @@ #include "constants.h" #include <vcsbase/vcsbaseplugin.h> -#include <vcsbase/vcsbaseoutputwindow.h> +#include <vcsbase/vcsoutputwindow.h> #include <vcsbase/vcsbaseeditorparameterwidget.h> #include <utils/synchronousprocess.h> @@ -39,6 +39,8 @@ #include <QTextStream> #include <QDebug> +using namespace VcsBase; + namespace Bazaar { namespace Internal { @@ -117,7 +119,7 @@ bool BazaarClient::synchronousUncommit(const QString &workingDir, QByteArray stdOut; const bool success = vcsFullySynchronousExec(workingDir, args, &stdOut); if (!stdOut.isEmpty()) - VcsBase::VcsBaseOutputWindow::instance()->append(QString::fromUtf8(stdOut)); + VcsOutputWindow::append(QString::fromUtf8(stdOut)); return success; } diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index 079eaec194..8c4e7d02e6 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -59,7 +59,7 @@ #include <vcsbase/vcsbasesubmiteditor.h> #include <vcsbase/vcsbaseconstants.h> #include <vcsbase/vcsbaseeditor.h> -#include <vcsbase/vcsbaseoutputwindow.h> +#include <vcsbase/vcsoutputwindow.h> #include <QtPlugin> #include <QAction> @@ -574,13 +574,12 @@ void BazaarPlugin::commit() void BazaarPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &status) { - VcsBaseOutputWindow *outputWindow = VcsBaseOutputWindow::instance(); //Once we receive our data release the connection so it can be reused elsewhere disconnect(m_client, SIGNAL(parsedStatus(QList<VcsBaseClient::StatusItem>)), this, SLOT(showCommitWidget(QList<VcsBaseClient::StatusItem>))); if (status.isEmpty()) { - outputWindow->appendError(tr("There are no changes to commit.")); + VcsOutputWindow::appendError(tr("There are no changes to commit.")); return; } @@ -589,20 +588,20 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &stat // Keep the file alive, else it removes self and forgets its name saver.setAutoRemove(false); if (!saver.finalize()) { - VcsBaseOutputWindow::instance()->appendError(saver.errorString()); + VcsOutputWindow::appendError(saver.errorString()); return; } IEditor *editor = EditorManager::openEditor(saver.fileName(), COMMIT_ID); if (!editor) { - outputWindow->appendError(tr("Unable to create an editor for the commit.")); + VcsOutputWindow::appendError(tr("Unable to create an editor for the commit.")); return; } CommitEditor *commitEditor = qobject_cast<CommitEditor *>(editor); if (!commitEditor) { - outputWindow->appendError(tr("Unable to create a commit editor.")); + VcsOutputWindow::appendError(tr("Unable to create a commit editor.")); return; } setSubmitEditor(commitEditor); |