summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/coreplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2016-05-02 15:39:52 +0200
committerEike Ziller <eike.ziller@qt.io>2016-05-04 09:39:13 +0000
commitfad08a1e9b1141406cfdca8412f5aaede3258f15 (patch)
tree3ec7a69c5251975430f22ab2d658d9e5b954cb54 /src/plugins/coreplugin/coreplugin.cpp
parentc8d0ba865196b1ce4955f671927969f0354a8b1c (diff)
downloadqt-creator-fad08a1e9b1141406cfdca8412f5aaede3258f15.tar.gz
OS X: Fix regression for opening projects from Finder
The kits are restored in delayedInitialize now, but the file open event from Finder was delivered before that. That lead to the projects mode being opened with the kit configuration screen, but mostly no kits in it, when double-clicking a .pro file while Qt Creator is not running. Delay the remote open file command until plugin initialization is really done. Change-Id: I1a75f6b1f7bcefb4c53d594de11df0d3a0d2e5d3 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/coreplugin.cpp')
-rw-r--r--src/plugins/coreplugin/coreplugin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp
index 2bd8144939..d4a0f2210b 100644
--- a/src/plugins/coreplugin/coreplugin.cpp
+++ b/src/plugins/coreplugin/coreplugin.cpp
@@ -240,6 +240,13 @@ QObject *CorePlugin::remoteCommand(const QStringList & /* options */,
const QString &workingDirectory,
const QStringList &args)
{
+ if (!ExtensionSystem::PluginManager::isInitializationDone()) {
+ connect(ExtensionSystem::PluginManager::instance(), &ExtensionSystem::PluginManager::initializationDone,
+ this, [this, workingDirectory, args]() {
+ remoteCommand(QStringList(), workingDirectory, args);
+ });
+ return nullptr;
+ }
IDocument *res = m_mainWindow->openFiles(
args, ICore::OpenFilesFlags(ICore::SwitchMode | ICore::CanContainLineAndColumnNumbers),
workingDirectory);