Commit e8633933 authored by hjk's avatar hjk
Browse files

Debugger: Suggest a non-empty name when saving scratch buffers

The user needs some clue what buffer is about to be saved,
even if this is not a real file name.

Task-number: QTCREATORBUG-14602
Change-Id: I7d81a50079d8aa1a3b2ba63130d54515667a6663
Reviewed-by: default avatarNiels Weber <>
Reviewed-by: default avatarRobert Loehning <>
parent 5f9f95a4
......@@ -3088,6 +3088,12 @@ void openTextEditor(const QString &titlePattern0, const QString &contents)
IEditor *editor = EditorManager::openEditorWithContents(
CC::K_DEFAULT_TEXT_EDITOR_ID, &titlePattern, contents.toUtf8(), QString(),
if (auto textEditor = qobject_cast<BaseTextEditor *>(editor)) {
QString suggestion = titlePattern;
if (!suggestion.contains(QLatin1Char('.')))
QTC_ASSERT(editor, return);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment