From fb80782577e6a8e5126c2d8cf9d66e2130a8fa94 Mon Sep 17 00:00:00 2001 From: Daniel Teske <daniel.teske@nokia.com> Date: Wed, 31 Aug 2011 12:09:14 +0200 Subject: [PATCH] Reduce the directories plugins are searched in Don't search in the mac directories on linux/unix and vice versa. Orginal patch by Ray Donnelly <mingw.android@laptop.com> on the android branch. Change-Id: I57a4d83a94f28bbe00609fd1b9170629da27334e Reviewed-on: http://codereview.qt.nokia.com/3949 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com> --- src/app/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index f9d694cf502..aad5c63f78b 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -160,6 +160,7 @@ static inline QStringList getPluginPaths() QDir rootDir = QApplication::applicationDirPath(); rootDir.cdUp(); const QString rootDirPath = rootDir.canonicalPath(); +#if !defined(Q_OS_MAC) // 1) "plugins" (Win/Linux) QString pluginPath = rootDirPath; pluginPath += QLatin1Char('/'); @@ -169,11 +170,13 @@ static inline QStringList getPluginPaths() pluginPath += QLatin1Char('/'); pluginPath += QLatin1String("plugins"); rc.push_back(pluginPath); +#else // 2) "PlugIns" (OS X) - pluginPath = rootDirPath; + QString pluginPath = rootDirPath; pluginPath += QLatin1Char('/'); pluginPath += QLatin1String("PlugIns"); rc.push_back(pluginPath); +#endif return rc; } -- GitLab