Commit eb6e5a77 authored by Tobias Hunger's avatar Tobias Hunger

ToolChains: Warn when loading tool chain data too early

This helps getting the plugin initialization right.

Change-Id: Id67508fe2d188132ca16ab8cca808a8c11080fa3
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent e992ea1b
...@@ -31,11 +31,13 @@ ...@@ -31,11 +31,13 @@
#include "abi.h" #include "abi.h"
#include "kitinformation.h" #include "kitinformation.h"
#include "projectexplorer.h"
#include "toolchain.h" #include "toolchain.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
#include <utils/persistentsettings.h> #include <utils/persistentsettings.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -133,6 +135,7 @@ ToolChainManager::ToolChainManager(QObject *parent) : ...@@ -133,6 +135,7 @@ ToolChainManager::ToolChainManager(QObject *parent) :
void ToolChainManager::restoreToolChains() void ToolChainManager::restoreToolChains()
{ {
QTC_ASSERT(!d->m_writer, return); QTC_ASSERT(!d->m_writer, return);
QTC_CHECK(ProjectExplorerPlugin::instance()->pluginSpec()->state() == ExtensionSystem::PluginSpec::Running);
d->m_writer = d->m_writer =
new Utils::PersistentSettingsWriter(settingsFileName(QLatin1String(TOOLCHAIN_FILENAME)), QLatin1String("QtCreatorToolChains")); new Utils::PersistentSettingsWriter(settingsFileName(QLatin1String(TOOLCHAIN_FILENAME)), QLatin1String("QtCreatorToolChains"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment