From b7a7e99741998eba0602206c0b92d1c34df6a2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schummer?= Date: Thu, 29 Apr 2010 14:40:33 +0300 Subject: [PATCH 1/9] QmlDesigner.ItemLibrary: Hide scroll bar when not needed Task-number: BAUHAUS-447 Task-number: BAUHAUS-639 --- .../qmldesigner/components/itemlibrary/qml/ItemsView.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml index b56ae2b9183..002a003d694 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml @@ -219,10 +219,7 @@ content position out of scope regarding the scrollbar. */ anchors.bottom: parent.bottom anchors.bottomMargin: 1 anchors.right: parent.right -// The next line unfortunately introduces a cyclic property binding (strangely, -// in SectionView) -// width: (itemsFlickable.contentHeight > itemsFlickable.height)? 11:0 - width: 11 + width: (itemsFlickable.contentHeight > itemsFlickable.height)? 11:0 Scrollbar { id: scrollbar From 1b1b89095599e25e9da638dd13aaf0fc2a4a5fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schummer?= Date: Thu, 29 Apr 2010 18:37:04 +0300 Subject: [PATCH 2/9] QmlDesigner.ItemLibrary: adjusted style Task-number: BAUHAUS-640 --- .../components/itemlibrary/itemlibrary.cpp | 18 ++++++++++++------ .../components/resources/stylesheet.css | 12 ++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp index b6a6872da64..0df2950211e 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp @@ -172,15 +172,16 @@ ItemLibrary::ItemLibrary(QWidget *parent) : m_d->m_lineEdit->setPlaceholderText(tr("", "Library search input hint text")); m_d->m_lineEdit->setDragEnabled(false); m_d->m_lineEdit->setMinimumWidth(75); - m_d->m_lineEdit->setTextMargins(0, 0, 0, 0); + m_d->m_lineEdit->setTextMargins(0, 0, 20, 0); QWidget *lineEditFrame = new QWidget(this); lineEditFrame->setObjectName(QLatin1String("itemLibrarySearchInputFrame")); QGridLayout *lineEditLayout = new QGridLayout(lineEditFrame); lineEditLayout->setMargin(2); lineEditLayout->setSpacing(0); - lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 0, 0); - lineEditLayout->addWidget(m_d->m_lineEdit, 0, 1, 1, 1); - lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 0, 2); + lineEditLayout->addItem(new QSpacerItem(5, 3, QSizePolicy::Fixed, QSizePolicy::Fixed), 0, 0, 1, 3); + lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0); + lineEditLayout->addWidget(m_d->m_lineEdit, 1, 1, 1, 1); + lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 2); connect(m_d->m_lineEdit, SIGNAL(filterChanged(QString)), this, SLOT(setSearchFilter(QString))); connect(m_d->m_lineEdit, SIGNAL(buttonClicked()), this, SLOT(clearLineEditFocus())); @@ -192,12 +193,17 @@ ItemLibrary::ItemLibrary(QWidget *parent) : connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(updateSearch())); + QWidget *spacer = new QWidget(this); + spacer->setObjectName(QLatin1String("itemLibrarySearchInputSpacer")); + spacer->setFixedHeight(4); + QGridLayout *layout = new QGridLayout(this); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); layout->addWidget(tabBar, 0, 0, 1, 1); - layout->addWidget(lineEditFrame, 1, 0, 1, 1); - layout->addWidget(m_d->m_stackedWidget, 2, 0, 1, 1); + layout->addWidget(spacer, 1, 0); + layout->addWidget(lineEditFrame, 2, 0, 1, 1); + layout->addWidget(m_d->m_stackedWidget, 3, 0, 1, 1); setResourcePath(QDir::currentPath()); setSearchFilter(QString()); diff --git a/src/plugins/qmldesigner/components/resources/stylesheet.css b/src/plugins/qmldesigner/components/resources/stylesheet.css index c8a4b256a47..76fe776b497 100644 --- a/src/plugins/qmldesigner/components/resources/stylesheet.css +++ b/src/plugins/qmldesigner/components/resources/stylesheet.css @@ -46,18 +46,19 @@ QLineEdit selection-background-color: darkgray; } -QLineEdit#itemLibrarySearchInput { - color: black; +QLineEdit#itemLibrarySearchInput +{ + color: white; + font-size: 11px; border: 2px solid #0F0F0F; border-radius: 6px; border-width: 1; max-height: 20px; min-height: 20px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #e0e0e0, stop: 1 #f0f0f0); + stop: 0 #2c2c2c, stop: 1 #333333); } - QTreeView { color: white; selection-color: white @@ -143,7 +144,6 @@ QTabBar::tab:selected { color: #3c3c3c; } -QWidget#itemLibrarySearchInputFrame { +QWidget#itemLibrarySearchInputSpacer { background-color: #eeeeee; } - From a813396b3e9a64d32dab05bc0b0f11cd10ae8028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schummer?= Date: Fri, 30 Apr 2010 12:28:08 +0300 Subject: [PATCH 3/9] QmlDesigner.ItemLibrary: adjust style to property editor's look Task-number: BAUHAUS-654 --- .../itemlibrary/qml/ItemsViewStyle.qml | 8 ++++---- .../itemlibrary/qml/SectionView.qml | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsViewStyle.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsViewStyle.qml index 6a65f7077ae..13242e3ae37 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsViewStyle.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsViewStyle.qml @@ -47,11 +47,11 @@ Item { property string gridLineLighter: "#5f5f5f" property string gridLineDarker: "#3f3f3f" - property string sectionArrowColor: "#aeaeae" - property string sectionTitleTextColor: "#f0f0f0" - property string sectionTitleBackgroundColor: "#909090" + property string sectionArrowColor: "#ffffff" + property string sectionTitleTextColor: "#ffffff" + property string sectionTitleBackgroundColor: "#656565" - property int sectionTitleHeight: 20 + property int sectionTitleHeight: 18 property int sectionTitleSpacing: 2 property int iconWidth: 32 diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml index 2f6fbcde67b..8cc031dab32 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml @@ -111,17 +111,18 @@ Column { Item { id: arrow - Rectangle { y: 0; x: 0; height: 1; width: 9; color: style.sectionArrowColor } - Rectangle { y: 1; x: 1; height: 1; width: 7; color: style.sectionArrowColor } - Rectangle { y: 2; x: 2; height: 1; width: 5; color: style.sectionArrowColor } - Rectangle { y: 3; x: 3; height: 1; width: 3; color: style.sectionArrowColor } - Rectangle { y: 4; x: 4; height: 1; width: 1; color: style.sectionArrowColor } + Rectangle { y: 0; x: 0; height: 1; width: 11; color: style.sectionArrowColor } + Rectangle { y: 1; x: 1; height: 1; width: 9; color: style.sectionArrowColor } + Rectangle { y: 2; x: 2; height: 1; width: 7; color: style.sectionArrowColor } + Rectangle { y: 3; x: 3; height: 1; width: 5; color: style.sectionArrowColor } + Rectangle { y: 4; x: 4; height: 1; width: 3; color: style.sectionArrowColor } + Rectangle { y: 5; x: 5; height: 1; width: 1; color: style.sectionArrowColor } anchors.left: parent.left - anchors.leftMargin: 5 + anchors.leftMargin: 10 anchors.verticalCenter: parent.verticalCenter - width: 9 - height: 5 + width: 11 + height: 6 transformOrigin: Item.Center } @@ -130,11 +131,12 @@ Column { anchors.verticalCenter: parent.verticalCenter anchors.left: arrow.right - anchors.leftMargin: 5 + anchors.leftMargin: 12 text: sectionName // to be set by model color: style.sectionTitleTextColor elide: Text.ElideMiddle + font.bold: true } MouseArea { anchors.fill: parent From ac517807eaf637ebb2b233d7763c32642d47e2eb Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 30 Apr 2010 13:32:39 +0200 Subject: [PATCH 4/9] Using Q_UNUSED to avoid warnings from MinGW --- src/plugins/debugger/registerpostmortemaction.cpp | 2 ++ src/shared/registryaccess/registryaccess.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/plugins/debugger/registerpostmortemaction.cpp b/src/plugins/debugger/registerpostmortemaction.cpp index 4398a1d9772..b18e09c2ac6 100644 --- a/src/plugins/debugger/registerpostmortemaction.cpp +++ b/src/plugins/debugger/registerpostmortemaction.cpp @@ -79,6 +79,8 @@ RegisterPostMortemAction::RegisterPostMortemAction(QObject *parent) : Utils::Sav void RegisterPostMortemAction::readSettings(const QSettings *) { + Q_UNUSED(debuggerRegistryValueNameC); // avoid warning from MinGW + bool registered = false; HKEY handle = 0; QString errorMessage; diff --git a/src/shared/registryaccess/registryaccess.cpp b/src/shared/registryaccess/registryaccess.cpp index f4148d06d59..3b0c8ae90e0 100644 --- a/src/shared/registryaccess/registryaccess.cpp +++ b/src/shared/registryaccess/registryaccess.cpp @@ -104,6 +104,7 @@ bool openRegistryKey(HKEY category, // HKEY_LOCAL_MACHINE, etc. HKEY *keyHandle, QString *errorMessage) { + Q_UNUSED(debuggerRegistryKeyC); // avoid warning from MinGW REGSAM accessRights = KEY_READ; if (readWrite) From 0970a8e6d2c7fb4742bf7bef2899ce76478ecc89 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 30 Apr 2010 13:35:03 +0200 Subject: [PATCH 5/9] Moved quick-exit check back to the indenter. Reviewed-by: ckamm --- src/libs/qmljs/qmljsindenter.cpp | 3 +++ src/libs/qmljs/qmljslineinfo.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/qmljs/qmljsindenter.cpp b/src/libs/qmljs/qmljsindenter.cpp index 49b95ebc86a..ba941c0e07c 100644 --- a/src/libs/qmljs/qmljsindenter.cpp +++ b/src/libs/qmljs/qmljsindenter.cpp @@ -569,6 +569,9 @@ int QmlJSIndenter::indentForStandaloneLine() */ int QmlJSIndenter::indentForBottomLine(QTextBlock begin, QTextBlock end, QChar typedIn) { + if (begin == end) + return 0; + const QTextBlock last = end.previous(); initialize(begin, last); diff --git a/src/libs/qmljs/qmljslineinfo.cpp b/src/libs/qmljs/qmljslineinfo.cpp index 29f74443ad9..a4c8837d1b8 100644 --- a/src/libs/qmljs/qmljslineinfo.cpp +++ b/src/libs/qmljs/qmljslineinfo.cpp @@ -564,9 +564,6 @@ bool LineInfo::isContinuationLine() void LineInfo::initialize(QTextBlock begin, QTextBlock end) { - if (begin == end) - return; - yyProgram = Program(begin, end); startLinizer(); } From 44a155c6128d874da0902d6d3c95f159e486ec22 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 30 Apr 2010 14:22:55 +0200 Subject: [PATCH 6/9] QmlJS: Fix completion context when cursor is to the right of inserted ; Done-with: Erik Verbruggen --- src/libs/qmljs/qmljscompletioncontextfinder.cpp | 3 +++ src/libs/qmljs/qmljslineinfo.cpp | 4 ++++ src/libs/qmljs/qmljslineinfo.h | 4 +++- src/plugins/qmljseditor/qmljscodecompletion.cpp | 1 - 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libs/qmljs/qmljscompletioncontextfinder.cpp b/src/libs/qmljs/qmljscompletioncontextfinder.cpp index 0fd7ab856b1..645472c2203 100644 --- a/src/libs/qmljs/qmljscompletioncontextfinder.cpp +++ b/src/libs/qmljs/qmljscompletioncontextfinder.cpp @@ -31,6 +31,9 @@ CompletionContextFinder::CompletionContextFinder(const QTextCursor &cursor) break; } + if (m_startTokenIndex == yyLinizerState.tokens.size() - 1 && yyLinizerState.insertedSemicolon) + --m_startTokenIndex; + getQmlObjectTypeName(m_startTokenIndex); checkBinding(); } diff --git a/src/libs/qmljs/qmljslineinfo.cpp b/src/libs/qmljs/qmljslineinfo.cpp index a4c8837d1b8..5bae0d727c5 100644 --- a/src/libs/qmljs/qmljslineinfo.cpp +++ b/src/libs/qmljs/qmljslineinfo.cpp @@ -208,6 +208,7 @@ QString LineInfo::trimmedCodeLine(const QString &t) const Token sc(trimmed.size(), 1, Token::Semicolon); yyLinizerState.tokens.append(sc); trimmed.append(QLatin1Char(';')); + yyLinizerState.insertedSemicolon = true; } } @@ -276,6 +277,8 @@ bool LineInfo::readLine() (firstNonWhiteSpace(yyLinizerState.line) == QLatin1Char('{')); do { + yyLinizerState.insertedSemicolon = false; + if (yyLinizerState.iter == yyProgram.firstBlock()) { yyLinizerState.line.clear(); return false; @@ -332,6 +335,7 @@ void LineInfo::startLinizer() { yyLinizerState.braceDepth = 0; yyLinizerState.pendingRightBrace = false; + yyLinizerState.insertedSemicolon = false; yyLine = &yyLinizerState.line; yyBraceDepth = &yyLinizerState.braceDepth; diff --git a/src/libs/qmljs/qmljslineinfo.h b/src/libs/qmljs/qmljslineinfo.h index 2112e313f0a..8173f9ddc72 100644 --- a/src/libs/qmljs/qmljslineinfo.h +++ b/src/libs/qmljs/qmljslineinfo.h @@ -84,12 +84,14 @@ protected: LinizerState() : braceDepth(0), leftBraceFollows(false), - pendingRightBrace(false) + pendingRightBrace(false), + insertedSemicolon(false) { } int braceDepth; bool leftBraceFollows; bool pendingRightBrace; + bool insertedSemicolon; QString line; QList tokens; QTextBlock iter; diff --git a/src/plugins/qmljseditor/qmljscodecompletion.cpp b/src/plugins/qmljseditor/qmljscodecompletion.cpp index a5a5d15f575..aae8b16863b 100644 --- a/src/plugins/qmljseditor/qmljscodecompletion.cpp +++ b/src/plugins/qmljseditor/qmljscodecompletion.cpp @@ -690,7 +690,6 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor) if (contextFinder.isInRhsOfBinding() && qmlScopeType) { doQmlKeywordCompletion = false; - qDebug() << "property name: " << contextFinder.bindingPropertyName(); if (!contextFinder.bindingPropertyName().isEmpty()) { const Interpreter::Value *value = qmlScopeType; From 69100c353c8c23459027c0530e58bf6848866f35 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 24 Feb 2010 14:10:36 +0100 Subject: [PATCH 7/9] Add a special target for Qt simulator --- .../qt4projectmanagerconstants.h | 1 + src/plugins/qt4projectmanager/qt4target.cpp | 9 +++++- .../qt4projectmanager/qtoptionspage.cpp | 2 ++ .../qt4projectmanager/qtversionmanager.cpp | 32 +++++++++++++++++++ .../qt4projectmanager/qtversionmanager.h | 2 ++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index 98fb572de26..68d36c8022d 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -94,6 +94,7 @@ const char * const DESKTOP_TARGET_ID("Qt4ProjectManager.Target.DesktopTarget"); const char * const S60_EMULATOR_TARGET_ID("Qt4ProjectManager.Target.S60EmulatorTarget"); const char * const S60_DEVICE_TARGET_ID("Qt4ProjectManager.Target.S60DeviceTarget"); const char * const MAEMO_DEVICE_TARGET_ID("Qt4ProjectManager.Target.MaemoDeviceTarget"); +const char * const QT_SIMULATOR_TARGET_ID("Qt4ProjectManager.Target.QtSimulatorTarget"); } // namespace Constants } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index 26cafa8ba15..784897f6461 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -65,6 +65,8 @@ QString displayNameForId(const QString &id) { return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Symbian Device", "Qt4 Symbian Device target display name"); if (id == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID)) return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Maemo", "Qt4 Maemo target display name"); + if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) + return QApplication::translate("Qt4ProjectManager::Internal::Qt4Target", "Qt Simulator", "Qt4 Simulator target display name"); return QString(); } @@ -77,6 +79,8 @@ QIcon iconForId(const QString &id) { return QIcon(":/projectexplorer/images/SymbianDevice.png"); if (id == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID)) return QIcon(":/projectexplorer/images/MaemoDevice.png"); + if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) + return QIcon(":/projectexplorer/images/SymbianEmulator.png"); return QIcon(); } @@ -315,7 +319,8 @@ Qt4BuildConfigurationFactory *Qt4Target::buildConfigurationFactory() const void Qt4Target::addRunConfigurationForPath(const QString &proFilePath) { - if (id() == QLatin1String(Constants::DESKTOP_TARGET_ID)) + if (id() == QLatin1String(Constants::DESKTOP_TARGET_ID) || + id() == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) addRunConfiguration(new Qt4RunConfiguration(this, proFilePath)); else if (id() == QLatin1String(Constants::S60_EMULATOR_TARGET_ID)) addRunConfiguration(new S60EmulatorRunConfiguration(this, proFilePath)); @@ -370,6 +375,8 @@ QString Qt4Target::defaultBuildDirectory() const shortName = QLatin1String("symbian"); else if (id() == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID)) shortName = QLatin1String("maemo"); + else if (id() == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) + shortName = QLatin1String("simulator"); // currently we can't have the build directory to be deeper then the source directory // since that is broken in qmake diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 26b27def1c6..12c42f4b85d 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -528,6 +528,8 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item) envs = tr("Symbian", "Qt Version is meant for Symbian"); else if (targets.contains(Constants::MAEMO_DEVICE_TARGET_ID)) envs = tr("Maemo", "Qt Version is meant for Maemo"); + else if (targets.contains(Constants::QT_SIMULATOR_TARGET_ID)) + envs = tr("Qt Simulator", "Qt Version is meant for Qt Simulator"); else envs = tr("unkown", "No idea what this Qt Version is meant for!"); m_ui->errorLabel->setText(tr("Found Qt version %1, using mkspec %2 (%3)") diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index b55b4b07299..bcaed3f6339 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -1420,6 +1421,31 @@ void QtVersion::updateToolChainAndMkspec() const delete reader; ProFileCacheManager::instance()->decRefCount(); m_toolChainUpToDate = true; + + // Check qconfig.h for QT_SIMULATOR define on desktop builds and switch the + // Qt version to Qt simulator target: + if (m_targetIds.contains(Constants::DESKTOP_TARGET_ID)) { + QString path(headerInstallPath()); + path.append(QLatin1String("/Qt/qconfig.h")); + QFile qconfig(path); + if (!qconfig.exists()) + return; + qconfig.open(QIODevice::ReadOnly); + QTextStream stream(&qconfig); + QString line; + bool isSimulator = false; + while (!(line = stream.readLine()).isNull()) { + if (line.startsWith(QLatin1String("#define QT_SIMULATOR"))) { + isSimulator = true; + break; + } + } + qconfig.close(); + if (isSimulator) { + m_targetIds.remove(QLatin1String(Constants::DESKTOP_TARGET_ID)); + m_targetIds.insert(QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)); + } + } } QString QtVersion::mwcDirectory() const @@ -1590,6 +1616,12 @@ QString QtVersion::demosPath() const return m_versionInfo["QT_INSTALL_DEMOS"]; } +QString QtVersion::headerInstallPath() const +{ + updateVersionInfo(); + return m_versionInfo["QT_INSTALL_HEADERS"]; +} + bool QtVersion::hasExamples() const { updateVersionInfo(); diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h index 68e155348f9..6ccacad4061 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.h +++ b/src/plugins/qt4projectmanager/qtversionmanager.h @@ -123,6 +123,8 @@ public: bool hasDemos() const; QString demosPath() const; + QString headerInstallPath() const; + // All valid Ids are >= 0 int uniqueId() const; bool isQt64Bit() const; From a712509bd49b779ebb1b380132dd0db393a087d1 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 30 Mar 2010 12:57:31 +0200 Subject: [PATCH 8/9] Activate simulator ... as default whenever that is selected --- src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp index 61de3d88ca7..dfe383e3fa0 100644 --- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp +++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp @@ -245,8 +245,11 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project) if (!targetInfos.isEmpty()) target = project->targetFactory()->create(project, targetId, targetInfos); - if (target) + if (target) { project->addTarget(target); + if (target->id() == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) + project->setActiveTarget(target); + } } // Create the default target if nothing else was set up: From 78989998d5703a42d1cb567b7ac540490752d8c5 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 30 Mar 2010 17:04:41 +0200 Subject: [PATCH 9/9] Mark simulator as a mobile target --- src/plugins/qt4projectmanager/qtversionmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index bcaed3f6339..b658c96b793 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1197,7 +1197,8 @@ bool QtVersion::supportsMobileTarget() const { return supportsTargetId(Constants::S60_DEVICE_TARGET_ID) || supportsTargetId(Constants::S60_EMULATOR_TARGET_ID) || - supportsTargetId(Constants::MAEMO_DEVICE_TARGET_ID); + supportsTargetId(Constants::MAEMO_DEVICE_TARGET_ID) || + supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID); } QList > QtVersion::toolChains() const