forked from qt-creator/qt-creator
Debugger: Use the new hint to determine why settings should be saved
Change-Id: I5f8e2caceaa9769fc99e91bf1e29470fa17320bb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -288,13 +288,12 @@ DebuggerMainWindow::DebuggerMainWindow()
|
|||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||||
|
|
||||||
connect(ICore::instance(), &ICore::saveSettingsRequested, this, [this] {
|
connect(ICore::instance(), &ICore::saveSettingsRequested, this,
|
||||||
|
[this](ICore::SaveSettingsReason reason) {
|
||||||
// There's one saveSettings triggered after plugin loading intentionally.
|
// There's one saveSettings triggered after plugin loading intentionally.
|
||||||
// We do not want to save anything at that time.
|
// We do not want to save anything at that time.
|
||||||
static bool firstOne = true;
|
if (reason == ICore::InitializationDone) {
|
||||||
if (firstOne) {
|
|
||||||
qCDebug(perspectivesLog) << "FIRST SAVE SETTINGS REQUEST IGNORED";
|
qCDebug(perspectivesLog) << "FIRST SAVE SETTINGS REQUEST IGNORED";
|
||||||
firstOne = false;
|
|
||||||
} else {
|
} else {
|
||||||
qCDebug(perspectivesLog) << "SAVING SETTINGS";
|
qCDebug(perspectivesLog) << "SAVING SETTINGS";
|
||||||
savePersistentSettings();
|
savePersistentSettings();
|
||||||
|
Reference in New Issue
Block a user