aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-02-06 15:21:13 +0100
committerEike Ziller <eike.ziller@qt.io>2024-02-12 07:44:19 +0000
commit7a055a2f0ad7bd99eb5629f8ce6dfa5ae7a27080 (patch)
tree75fe80388a0a12ea48a12c7d44937ccc85843812 /src/plugins/projectexplorer
parent971bcb1a5abd396819510644e55ef437978adcd5 (diff)
OutputWindow: Add "Save Contents" to context menu
And give individual output windows the option to set a default file name. Change-Id: If3090063055c1b37f4f2d63b971fe0476f11806e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp2
-rw-r--r--src/plugins/projectexplorer/compileoutputwindow.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index 898acaba2a..94e2694acc 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -429,6 +429,8 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
ow->setWindowIcon(Icons::WINDOW.icon());
ow->setWordWrapEnabled(m_settings.wrapOutput);
ow->setMaxCharCount(m_settings.maxCharCount);
+ //: file name suggested for saving application output, %1 = run configuration display name
+ ow->setOutputFileNameHint(Tr::tr("application-output-%1.txt").arg(rc->displayName()));
auto updateFontSettings = [ow] {
ow->setBaseFont(TextEditor::TextEditorSettings::fontSettings().font());
diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp
index 8d2b12983b..c5255d127f 100644
--- a/src/plugins/projectexplorer/compileoutputwindow.cpp
+++ b/src/plugins/projectexplorer/compileoutputwindow.cpp
@@ -61,6 +61,8 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
m_outputWindow->setReadOnly(true);
m_outputWindow->setUndoRedoEnabled(false);
m_outputWindow->setMaxCharCount(Core::Constants::DEFAULT_MAX_CHAR_COUNT);
+ //: file name suggested for saving compile output
+ m_outputWindow->setOutputFileNameHint(Tr::tr("compile-output.txt"));
Utils::ProxyAction *cancelBuildProxyButton =
Utils::ProxyAction::proxyActionWithIcon(cancelBuildAction,