summaryrefslogtreecommitdiff
path: root/src/plugins/cpaster
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2013-03-12 16:42:38 +0100
committerDaniel Teske <daniel.teske@digia.com>2013-03-22 13:48:34 +0100
commit23d04f058e7a00c1b1da80c80f758688976c2d16 (patch)
tree98cbadfd916dad214160d28ffd3cdbf9a8659a1b /src/plugins/cpaster
parentf4b19e0e8fdb4cde4d8cbe88dd57e26bd52d6ce8 (diff)
downloadqt-creator-23d04f058e7a00c1b1da80c80f758688976c2d16.tar.gz
CodePaster: Adjust to MessageManager api change
Change-Id: I24d70aa0ceac742f1ffd25458a97b947af4749c6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r--src/plugins/cpaster/codepasterprotocol.cpp2
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp8
-rw-r--r--src/plugins/cpaster/fileshareprotocol.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/cpaster/codepasterprotocol.cpp b/src/plugins/cpaster/codepasterprotocol.cpp
index b6e0e02cd0..6eef0f1add 100644
--- a/src/plugins/cpaster/codepasterprotocol.cpp
+++ b/src/plugins/cpaster/codepasterprotocol.cpp
@@ -205,7 +205,7 @@ void CodePasterProtocol::fetchFinished()
void CodePasterProtocol::listFinished()
{
if (m_listReply->error()) {
- Core::ICore::messageManager()->printToOutputPane(m_listReply->errorString(), true);
+ Core::ICore::messageManager()->printToOutputPane(m_listReply->errorString(), Core::MessageManager::NoModeSwitch);
} else {
const QByteArray data = m_listReply->readAll();
const QStringList lines = QString::fromLatin1(data).split(QLatin1Char('\n'));
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index a86cafbdc7..99571f0b46 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -313,7 +313,7 @@ void CodepasterPlugin::finishPost(const QString &link)
{
if (m_settings->copyToClipboard)
QApplication::clipboard()->setText(link);
- ICore::messageManager()->printToOutputPane(link, m_settings->displayOutput);
+ ICore::messageManager()->printToOutputPane(link, m_settings->displayOutput ? Core::MessageManager::ModeSwitch : Core::MessageManager::Silent);
}
// Extract the characters that can be used for a file name from a title
@@ -356,11 +356,11 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
Core::MessageManager *messageManager = ICore::messageManager();
// Failure?
if (error) {
- messageManager->printToOutputPane(content, true);
+ messageManager->printToOutputPane(content, Core::MessageManager::NoModeSwitch);
return;
}
if (content.isEmpty()) {
- messageManager->printToOutputPane(tr("Empty snippet received for \"%1\".").arg(titleDescription), true);
+ messageManager->printToOutputPane(tr("Empty snippet received for \"%1\".").arg(titleDescription), Core::MessageManager::NoModeSwitch);
return;
}
// If the mime type has a preferred suffix (cpp/h/patch...), use that for
@@ -379,7 +379,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
saver.setAutoRemove(false);
saver.write(byteContent);
if (!saver.finalize()) {
- messageManager->printToOutputPane(saver.errorString());
+ messageManager->printToOutputPane(saver.errorString(), Core::MessageManager::NoModeSwitch);
return;
}
const QString fileName = saver.fileName();
diff --git a/src/plugins/cpaster/fileshareprotocol.cpp b/src/plugins/cpaster/fileshareprotocol.cpp
index 50367c04dc..560bf033da 100644
--- a/src/plugins/cpaster/fileshareprotocol.cpp
+++ b/src/plugins/cpaster/fileshareprotocol.cpp
@@ -209,11 +209,11 @@ void FileShareProtocol::paste(const QString &text,
saver.setResult(&writer);
}
if (!saver.finalize()) {
- Core::ICore::messageManager()->printToOutputPanePopup(saver.errorString());
+ Core::ICore::messageManager()->printToOutputPane(saver.errorString(), Core::MessageManager::NoModeSwitch);
return;
}
const QString msg = tr("Pasted: %1").arg(saver.fileName());
- Core::ICore::messageManager()->printToOutputPanePopup(msg);
+ Core::ICore::messageManager()->printToOutputPane(msg, Core::MessageManager::NoModeSwitch);
}
} // namespace CodePaster