From bb59a00229abc1dd240d1ddf2ee4f381a4bc8760 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 11 Feb 2022 14:52:54 +0100 Subject: [PATCH] Fix issues with showing code pasting URL - use common signal for posting output for fileshare protocol, so it correctly behaves wrt the settings - flash even when not opening the output pane when showing the output - MessageManager::writeDisrupting should switch the output pane even if another output pane is currently open (which enforced with IOutputPane::WithFocus) Fixes: QTCREATORBUG-26975 Change-Id: I51586eaca826f81f7e72f147fce7e72cbf639c6c Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/coreplugin/messagemanager.cpp | 2 +- src/plugins/cpaster/cpasterplugin.cpp | 2 +- src/plugins/cpaster/fileshareprotocol.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/messagemanager.cpp b/src/plugins/coreplugin/messagemanager.cpp index b879461e350..483a14feba6 100644 --- a/src/plugins/coreplugin/messagemanager.cpp +++ b/src/plugins/coreplugin/messagemanager.cpp @@ -70,7 +70,7 @@ static void showOutputPane(Flag flags) m_messageOutputWindow->flash(); break; case Core::Flag::Disrupt: - m_messageOutputWindow->popup(IOutputPane::ModeSwitch); + m_messageOutputWindow->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus); break; } } diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 12fe84ad5a0..825cacd4a4e 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -329,7 +329,7 @@ void CodePasterPluginPrivate::finishPost(const QString &link) if (m_settings.displayOutput.value()) MessageManager::writeDisrupting(link); else - MessageManager::writeSilently(link); + MessageManager::writeFlashing(link); } // Extract the characters that can be used for a file name from a title diff --git a/src/plugins/cpaster/fileshareprotocol.cpp b/src/plugins/cpaster/fileshareprotocol.cpp index 87e5e6f068e..297b62c6873 100644 --- a/src/plugins/cpaster/fileshareprotocol.cpp +++ b/src/plugins/cpaster/fileshareprotocol.cpp @@ -208,6 +208,6 @@ void FileShareProtocol::paste( return; } - Core::MessageManager::writeSilently(tr("Pasted: %1").arg(saver.filePath().toUserOutput())); + emit pasteDone(saver.filePath().toUserOutput()); } } // namespace CodePaster