forked from qt-creator/qt-creator
Provide "Restart Now" functionality
And use it for the plugin dialog and when changing the UI language. Change-Id: Ic767837d2526409f7ec46d7e4612a1499f19459e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "manhattanstyle.h"
|
||||
#include "themechooser.h"
|
||||
|
||||
#include "dialogs/restartdialog.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/theme/theme.h>
|
||||
#include <utils/theme/theme_p.h>
|
||||
@@ -178,11 +180,11 @@ void ThemeChooser::apply()
|
||||
QSettings *settings = ICore::settings();
|
||||
const QString currentThemeId = ThemeEntry::themeSetting().toString();
|
||||
if (currentThemeId != themeId) {
|
||||
QMessageBox::information(ICore::mainWindow(), tr("Restart Required"),
|
||||
tr("The theme change will take effect after restart."));
|
||||
|
||||
// save filename of selected theme in global config
|
||||
settings->setValue(QLatin1String(Constants::SETTINGS_THEME), themeId);
|
||||
RestartDialog restartDialog(ICore::dialogParent(),
|
||||
tr("The theme change will take effect after restart."));
|
||||
restartDialog.exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user