aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2012-11-29 11:42:10 +0100
committerThomas Hartmann <Thomas.Hartmann@digia.com>2012-11-29 12:17:28 +0100
commit3818efae0317975c6aca4425d7b0528df51673cc (patch)
treeab31430a985186c433f8ee251e5cc3372591ccd2 /src
parenta3f35a447a9a4e9f41e624a6c9334e2a69a4cd5e (diff)
QmlDesigner.PropertyEditor: normalize applicationDirPath()
This is needed on Windows for QML since QML always checks for capitalization. Task-number: QTCREATORBUG-6126 Task-number: QTBUG-28230 Change-Id: I011464288f6052bfe19452b8ce555d6c462e15dd Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
index cd4cb48d88..2fb862aea6 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
@@ -74,6 +74,10 @@
#include <QGraphicsOpacityEffect>
#include <QToolBar>
+#ifdef Q_OS_WIN
+#include <utils/winutils.h>
+#endif
+
enum {
debug = false
};
@@ -82,6 +86,16 @@ const int collapseButtonOffset = 114;
namespace QmlDesigner {
+static QString applicationDirPath()
+{
+#ifdef Q_OS_WIN
+ // normalize paths so QML doesn't freak out if it's wrongly capitalized on Windows
+ return Utils::normalizePathName(QCoreApplication::applicationDirPath());
+#else
+ return QCoreApplication::applicationDirPath();
+#endif
+}
+
#ifdef Q_OS_MAC
# define SHARE_PATH "/../Resources/qmldesigner"
#else
@@ -90,7 +104,7 @@ namespace QmlDesigner {
static inline QString sharedDirPath()
{
- QString appPath = QCoreApplication::applicationDirPath();
+ QString appPath = applicationDirPath();
return QFileInfo(appPath + SHARE_PATH).absoluteFilePath();
}