From ae3a833b8c4b4660deb43441ee117bcea42b3d36 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 6 Oct 2011 09:46:03 +0200 Subject: [PATCH] Commit things that went missing from 2a4a56b2beec7a3c0be94302146461d2f730315d Change-Id: I16f0d8880003156722cd80fdc51b0f8f21a5bfae Reviewed-on: http://codereview.qt-project.org/6120 Reviewed-by: Qt Sanity Bot Reviewed-by: Eike Ziller --- .../wizards/qtcreatorplugin/myplugin.pro | 6 ++--- src/app/main.cpp | 24 +++++++++---------- src/qtcreatorplugin.pri | 14 +++++++---- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.pro b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.pro index d2128b34113..1aa25570c84 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.pro +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.pro @@ -27,9 +27,9 @@ isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=%QtCreatorBuild% ## uncomment to build plugin into user config directory ## /plugins/ ## where is e.g. -## :\Users\\AppData\Local\Nokia\QtCreator on Windows Vista and later -## $XDG_DATA_HOME/Nokia/QtCreator or ~/.local/share/Nokia/QtCreator on Linux -## ~/Library/Application Support/Nokia/QtCreator on Mac +## "%LOCALAPPDATA%\Nokia\qtcreator" on Windows Vista and later +## "$XDG_DATA_HOME/Nokia/qtcreator" or "~/.local/share/Nokia/qtcreator" on Linux +## "~/Library/Application Support/Nokia/Qt Creator" on Mac %DestDir%USE_USER_DESTDIR = yes PROVIDER = %VendorName% diff --git a/src/app/main.cpp b/src/app/main.cpp index be579ad5183..346ad3fe21b 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -167,27 +167,27 @@ static inline QStringList getPluginPaths(QSettings *settings) QString pluginPath = rootDirPath; pluginPath += QLatin1Char('/'); pluginPath += QLatin1String(IDE_LIBRARY_BASENAME); - pluginPath += QLatin1Char('/'); - pluginPath += QLatin1String("qtcreator"); - pluginPath += QLatin1Char('/'); - pluginPath += QLatin1String("plugins"); + pluginPath += QLatin1String("/qtcreator/plugins"); rc.push_back(pluginPath); #else // 2) "PlugIns" (OS X) QString pluginPath = rootDirPath; - pluginPath += QLatin1Char('/'); - pluginPath += QLatin1String("PlugIns"); + pluginPath += QLatin1String("/PlugIns"); rc.push_back(pluginPath); #endif // 3) /plugins/ // where is e.g. - // :\Users\\AppData\Local\Nokia\QtCreator on Windows Vista and later - // $XDG_DATA_HOME or ~/.local/share/Nokia/QtCreator on Linux - // ~/Library/Application Support/Nokia/QtCreator on Mac + // :\Users\\AppData\Local\Nokia\qtcreator on Windows Vista and later + // $XDG_DATA_HOME or ~/.local/share/Nokia/qtcreator on Linux + // ~/Library/Application Support/Nokia/Qt Creator on Mac pluginPath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); - pluginPath += QLatin1Char('/'); - pluginPath += QLatin1String("plugins"); - pluginPath += QLatin1Char('/'); + pluginPath += QLatin1String("/Nokia/"); +#if !defined(Q_OS_MAC) + pluginPath += QLatin1String("qtcreator"); +#else + pluginPath += QLatin1String("Qt Creator"); +#endif + pluginPath += QLatin1String("/plugins/"); pluginPath += QLatin1String(Core::Constants::IDE_VERSION_LONG); rc.push_back(pluginPath); return rc; diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri index 9a6bb8eb19b..79fc1d7d513 100644 --- a/src/qtcreatorplugin.pri +++ b/src/qtcreatorplugin.pri @@ -10,13 +10,19 @@ isEmpty(PROVIDER) { isEmpty(USE_USER_DESTDIR) { DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER } else { - win32:DESTDIRBASE = "$$(LOCALAPPDATA)" - else:macx: DESTDIRBASE = "$$(HOME)/Library/Application Support" - else:unix { + win32 { + DESTDIRAPPNAME = "qtcreator" + DESTDIRBASE = "$$(LOCALAPPDATA)" + isEmpty(DESTDIRBASE):DESTDIRBASE="$$(USERPROFILE)\Local Settings\Application Data" + } else:macx { + DESTDIRAPPNAME = "Qt Creator" + DESTDIRBASE = "$$(HOME)/Library/Application Support" + } else:unix { + DESTDIRAPPNAME = "qtcreator" DESTDIRBASE = "$$(XDG_DATA_HOME)" isEmpty(DESTDIRBASE):DESTDIRBASE = "$$(HOME)/.local/share" } - DESTDIR = "$$DESTDIRBASE/Nokia/QtCreator/plugins/$$QTCREATOR_VERSION/$$PROVIDER" + DESTDIR = "$$DESTDIRBASE/Nokia/$$DESTDIRAPPNAME/plugins/$$QTCREATOR_VERSION/$$PROVIDER" } LIBS += -L$$DESTDIR