diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index cd4cb48d88a..2fb862aea6f 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -74,6 +74,10 @@ #include #include +#ifdef Q_OS_WIN +#include +#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(); }