From feaea9368bc0e8172276edbc1a6a414fcff22dc2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 19 Dec 2011 11:30:17 +0100 Subject: [PATCH 1/4] Find QMLViewer on Mac OS X Let Qt Creator search for 'QMLViewer.app' instead of 'Qmlviewer.app' on Mac OS X. Task-number: QTCREATORBUG-5975 Change-Id: I584af98a1476b994b19b587b934ffc234760a948 Reviewed-by: Eike Ziller Reviewed-by: Daniel Teske --- src/plugins/qtsupport/baseqtversion.cpp | 42 ++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 9412cabc53d..157b86170b1 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -476,24 +476,6 @@ QString BaseQtVersion::sourcePath() const return m_sourcePath; } -// Return a list of GUI binary names -// 'foo', 'foo.exe', 'Foo.app/Contents/MacOS/Foo' -static inline QStringList possibleGuiBinaries(const QString &name) -{ -#ifdef Q_OS_WIN - return QStringList(name + QLatin1String(".exe")); -#elif defined(Q_OS_MAC) // 'Foo.app/Contents/MacOS/Foo' - QString upCaseName = name; - upCaseName[0] = upCaseName.at(0).toUpper(); - QString macBinary = upCaseName; - macBinary += QLatin1String(".app/Contents/MacOS/"); - macBinary += upCaseName; - return QStringList(macBinary); -#else - return QStringList(name); -#endif -} - QString BaseQtVersion::designerCommand() const { if (!isValid()) @@ -555,7 +537,13 @@ QString BaseQtVersion::findQtBinary(BINARIES binary) const switch (binary) { case QmlViewer: { if (qtVersion() < QtVersionNumber(5, 0, 0)) { - possibleCommands << possibleGuiBinaries(QLatin1String("qmlviewer")); +#if defined(Q_OS_WIN) + possibleCommands << QLatin1String("qmlviewer.exe"); +#elif defined(Q_OS_MAC) + possibleCommands << QLatin1String("QMLViewer.app/Contents/MacOS/QMLViewer"); +#else + possibleCommands << QLatin1String("qmlviewer"); +#endif } else { #if defined(Q_OS_WIN) possibleCommands << QLatin1String("qmlscene.exe"); @@ -566,10 +554,22 @@ QString BaseQtVersion::findQtBinary(BINARIES binary) const } break; case Designer: - possibleCommands << possibleGuiBinaries(QLatin1String("designer")); +#if defined(Q_OS_WIN) + possibleCommands << QLatin1String("designer.exe"); +#elif defined(Q_OS_MAC) + possibleCommands << QLatin1String("Designer.app/Contents/MacOS/Designer"); +#else + possibleCommands << QLatin1String("designer"); +#endif break; case Linguist: - possibleCommands << possibleGuiBinaries(QLatin1String("linguist")); +#if defined(Q_OS_WIN) + possibleCommands << QLatin1String("linguist.exe"); +#elif defined(Q_OS_MAC) + possibleCommands << QLatin1String("Linguist.app/Contents/MacOS/Linguist"); +#else + possibleCommands << QLatin1String("linguist"); +#endif break; case Uic: #ifdef Q_OS_WIN From 42a63064e1ed20cded16e157ca61a7b13332972c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 1 Dec 2011 16:16:29 +0100 Subject: [PATCH 2/4] QtQuickApp template: Use === where possible Prevent QtCreator from underlining this template code. Change-Id: Ic499db77a0fbbc8344d98ecca25e6c9f4277ee0f Reviewed-by: Alessandro Portale Reviewed-by: Eike Ziller --- share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml b/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml index 90b87979464..bfb4552a29c 100644 --- a/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml +++ b/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml @@ -16,7 +16,7 @@ PageStackWindow { ToolIcon { platformIconId: "toolbar-view-menu" anchors.right: (parent === undefined) ? undefined : parent.right - onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close() + onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close() } } From db385af52a536c86ba25ece97b0af1023b43255b Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 15 Dec 2011 14:10:45 +0100 Subject: [PATCH 3/4] GCC: Better mkspec suggestion on mac Change-Id: Ie613fc0b2ba6a06b5726bf40aa50958c84b9b772 Reviewed-by: Eike Ziller Reviewed-by: hjk Reviewed-by: Mirko Boehm Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/gcctoolchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 24aeb959082..7c0dbd0d27d 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -404,9 +404,9 @@ QString GccToolChain::mkspec() const if (abi.os() == Abi::MacOS) { QString v = version(); // prefer versioned g++ on mac. This is required to enable building for older Mac OS versions - if (v.startsWith(QLatin1String("4.0"))) + if (v.startsWith(QLatin1String("4.0")) && m_compilerPath.endsWith(QLatin1String("-4.0"))) return QLatin1String("macx-g++40"); - if (v.startsWith(QLatin1String("4.2"))) + if (v.startsWith(QLatin1String("4.2")) && m_compilerPath.endsWith(QLatin1String("-4.2"))) return QLatin1String("macx-g++42"); return QLatin1String("macx-g++"); } From d5b655131bf976b19e576996e9a77d2b72e85c92 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 21 Dec 2011 09:27:50 +0100 Subject: [PATCH 4/4] Debugger[CDB]: selectThread(): Remove call to resetLocation(). It is unneeded and causes the thread window to become disabled. Change-Id: I9a3621bc574cf6774b401de7eb925741db3b9f35 Reviewed-by: hjk --- src/plugins/debugger/cdb/cdbengine.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index f40400704ef..eb6de6f0ee0 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -1545,7 +1545,6 @@ void CdbEngine::selectThread(int index) if (index < 0 || index == threadsHandler()->currentThread()) return; - resetLocation(); const int newThreadId = threadsHandler()->threads().at(index).id; threadsHandler()->setCurrentThread(index);