Commit 3818efae authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

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: default avatarEike Ziller <eike.ziller@digia.com>
parent a3f35a44
......@@ -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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment