diff --git a/src/plugins/texteditor/colorscheme.cpp b/src/plugins/texteditor/colorscheme.cpp index 67f99c5226f..ed653518219 100644 --- a/src/plugins/texteditor/colorscheme.cpp +++ b/src/plugins/texteditor/colorscheme.cpp @@ -6,6 +6,8 @@ #include "texteditorconstants.h" #include "texteditortr.h" +#include + #include #include @@ -216,7 +218,7 @@ void ColorScheme::clear() m_formats.clear(); } -bool ColorScheme::save(const FilePath &filePath, QWidget *parent) const +bool ColorScheme::save(const FilePath &filePath) const { FileSaver saver(filePath); if (!saver.hasError()) { @@ -262,7 +264,7 @@ bool ColorScheme::save(const FilePath &filePath, QWidget *parent) const saver.setResult(&w); } - return saver.finalize(parent); + return saver.finalize(Core::ICore::dialogParent()); } namespace { diff --git a/src/plugins/texteditor/colorscheme.h b/src/plugins/texteditor/colorscheme.h index 3532dc57ba3..bd4487f05ba 100644 --- a/src/plugins/texteditor/colorscheme.h +++ b/src/plugins/texteditor/colorscheme.h @@ -97,7 +97,7 @@ public: void clear(); - bool save(const Utils::FilePath &filePath, QWidget *parent) const; + bool save(const Utils::FilePath &filePath) const; bool load(const Utils::FilePath &filePath); bool equals(const ColorScheme &cs) const diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 54e384984b3..f64b5550add 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -464,9 +464,9 @@ bool FontSettings::loadColorScheme(const Utils::FilePath &filePath, return loaded; } -bool FontSettings::saveColorScheme(const Utils::FilePath &fileName) +bool FontSettings::saveColorScheme(const FilePath &fileName) { - const bool saved = m_scheme.save(fileName, Core::ICore::dialogParent()); + const bool saved = m_scheme.save(fileName); if (saved) m_schemeFileName = fileName; return saved; diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index 5f38e583a12..67fe67b6973 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -552,7 +552,7 @@ void FontSettingsPageWidget::copyColorScheme(const QString &name) ColorScheme scheme = m_value.colorScheme(); scheme.setDisplayName(name); - if (scheme.save(filePath, Core::ICore::dialogParent())) + if (scheme.save(filePath)) m_value.setColorSchemeFileName(filePath); refreshColorSchemeList(); @@ -629,7 +629,7 @@ void FontSettingsPageWidget::importScheme() ColorScheme scheme; if (scheme.load(importedFile)) { scheme.setDisplayName(name); - scheme.save(saveFileName, Core::ICore::dialogParent()); + scheme.save(saveFileName); m_value.loadColorScheme(saveFileName, m_descriptions); } else { qWarning() << "Failed to import color scheme:" << importedFile; @@ -656,7 +656,7 @@ void FontSettingsPageWidget::exportScheme() Tr::tr("Color scheme (*.xml);;All files (*)")); if (!filePath.isEmpty()) - m_value.colorScheme().save(filePath, Core::ICore::dialogParent()); + m_value.colorScheme().save(filePath); } void FontSettingsPageWidget::maybeSaveColorScheme() @@ -680,7 +680,7 @@ void FontSettingsPageWidget::maybeSaveColorScheme() if (messageBox.exec() == QMessageBox::Save) { const ColorScheme &scheme = m_schemeEdit->colorScheme(); - scheme.save(m_value.colorSchemeFileName(), Core::ICore::dialogParent()); + scheme.save(m_value.colorSchemeFileName()); } } @@ -726,7 +726,7 @@ void FontSettingsPageWidget::apply() // Update the scheme and save it under the name it already has m_value.setColorScheme(m_schemeEdit->colorScheme()); const ColorScheme &scheme = m_value.colorScheme(); - scheme.save(m_value.colorSchemeFileName(), Core::ICore::dialogParent()); + scheme.save(m_value.colorSchemeFileName()); } bool ok;