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 <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2022-02-11 14:52:54 +01:00
parent dd6d6263d4
commit bb59a00229
3 changed files with 3 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ static void showOutputPane(Flag flags)
m_messageOutputWindow->flash(); m_messageOutputWindow->flash();
break; break;
case Core::Flag::Disrupt: case Core::Flag::Disrupt:
m_messageOutputWindow->popup(IOutputPane::ModeSwitch); m_messageOutputWindow->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
break; break;
} }
} }

View File

@@ -329,7 +329,7 @@ void CodePasterPluginPrivate::finishPost(const QString &link)
if (m_settings.displayOutput.value()) if (m_settings.displayOutput.value())
MessageManager::writeDisrupting(link); MessageManager::writeDisrupting(link);
else else
MessageManager::writeSilently(link); MessageManager::writeFlashing(link);
} }
// Extract the characters that can be used for a file name from a title // Extract the characters that can be used for a file name from a title

View File

@@ -208,6 +208,6 @@ void FileShareProtocol::paste(
return; return;
} }
Core::MessageManager::writeSilently(tr("Pasted: %1").arg(saver.filePath().toUserOutput())); emit pasteDone(saver.filePath().toUserOutput());
} }
} // namespace CodePaster } // namespace CodePaster