TaskList: Do not save files in default session

Otherwise, when relaunching Qt Creator after working
with task lists, the same list is reloaded.

Amends 4eb633fd77.

Change-Id: If3bee39a30b9876e42f2b35f65eebc39ef3951bf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Friedemann Kleint
2020-03-06 15:16:39 +01:00
parent ff33e4a57a
commit 4d48795934

View File

@@ -224,10 +224,12 @@ bool TaskListPlugin::loadFile(QString *errorString, const FilePath &fileName)
clearTasks();
bool result = parseTaskFile(errorString, fileName);
if (result)
SessionManager::setValue(QLatin1String(SESSION_FILE_KEY), fileName.toString());
else
if (result) {
if (!SessionManager::isDefaultSession(SessionManager::activeSession()))
SessionManager::setValue(QLatin1String(SESSION_FILE_KEY), fileName.toString());
} else {
stopMonitoring();
}
return result;
}