Merge remote-tracking branch 'origin/8.0'

Conflicts:
	src/plugins/debugger/debuggerdialogs.cpp
	src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
	src/plugins/texteditor/fontsettingspage.cpp

Change-Id: I5a6accd2065e0d8320045b57ade7b54a9a09aae0
This commit is contained in:
Eike Ziller
2022-08-31 11:03:13 +02:00
100 changed files with 603 additions and 454 deletions

View File

@@ -591,9 +591,6 @@ void FontSettingsPageWidget::importScheme()
if (importedFile.isEmpty())
return;
FilePath fileName = createColorSchemeFileName(importedFile.baseName() + "%1."
+ importedFile.suffix());
// Ask about saving any existing modifications
maybeSaveColorScheme();
@@ -604,16 +601,25 @@ void FontSettingsPageWidget::importScheme()
dialog->setLabelText(tr("Color scheme name:"));
dialog->setTextValue(importedFile.baseName());
connect(dialog, &QInputDialog::textValueSelected, this, [this, fileName](const QString &name) {
m_value.setColorScheme(m_schemeEdit->colorScheme());
connect(dialog,
&QInputDialog::textValueSelected,
this,
[this, importedFile](const QString &name) {
const Utils::FilePath saveFileName = createColorSchemeFileName(
importedFile.baseName() + "%1." + importedFile.suffix());
ColorScheme scheme = m_value.colorScheme();
scheme.setDisplayName(name);
if (scheme.save(fileName.path(), Core::ICore::dialogParent()))
m_value.setColorSchemeFileName(fileName.path());
ColorScheme scheme;
if (scheme.load(importedFile.path())) {
scheme.setDisplayName(name);
scheme.save(saveFileName.path(), Core::ICore::dialogParent());
m_value.loadColorScheme(saveFileName.path(), m_descriptions);
} else {
qWarning() << "Failed to import color scheme:" << importedFile;
}
refreshColorSchemeList();
});
refreshColorSchemeList();
});
dialog->open();
}