diff options
author | Eike Ziller <[email protected]> | 2014-09-03 16:07:46 +0200 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2014-09-03 16:08:02 +0200 |
commit | 49db3a450a6d15ae0327b8e3713920ac19320972 (patch) | |
tree | 309c83eb1dbb6321845d6a1db8fbc49428b20340 /src | |
parent | afd56bd8ada761b87c40d80a07cd3b3766b2d2f8 (diff) | |
parent | d030a960a0e6e1dda89e20b60e5252842fe83f49 (diff) |
Merge remote-tracking branch 'origin/3.2'
Conflicts:
qtcreator.pri
qtcreator.qbs
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/cppeditor/cppeditor.cpp
src/plugins/remotelinux/remotelinuxdebugsupport.cpp
src/plugins/texteditor/basetexteditor.cpp
Change-Id: I0da7c1cf2506b12d0563795aa8177fc45e97050f
Diffstat (limited to 'src')
54 files changed, 269 insertions, 161 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index 9a18343eda5..389a030b55c 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -297,8 +297,10 @@ Document::Document(const QString &fileName) Document::~Document() { delete _translationUnit; + _translationUnit = 0; delete _control->diagnosticClient(); delete _control; + _control = 0; } Control *Document::control() const diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 18eef295ece..3584c9a851b 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -123,7 +123,7 @@ public: QString fileName = url.toLocalFile(); if (!fileName.isEmpty()) { if (QFileInfo(fileName).isRelative()) { - fileName.prepend(QDir::separator()); + fileName.prepend(QLatin1Char('/')); fileName.prepend(_doc->path()); } if (!QFileInfo(fileName).exists()) diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp index d22e84e42ec..d956b434559 100644 --- a/src/libs/qmljs/qmljsdocument.cpp +++ b/src/libs/qmljs/qmljsdocument.cpp @@ -448,6 +448,7 @@ void Snapshot::insert(const Document::Ptr &document, bool allowInvalid) void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info) { + QTC_CHECK(!path.isEmpty()); QTC_CHECK(info.fingerprint() == info.calculateFingerprint()); _libraries.insert(QDir::cleanPath(path), info); if (!info.wasFound()) return; diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index b02fda890b3..26a9b2358fa 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -2242,7 +2242,7 @@ ImportInfo ImportInfo::moduleImport(QString uri, ComponentVersion version, info.m_type = ImportType::Library; info.m_name = uri; info.m_path = uri; - info.m_path.replace(QLatin1Char('.'), QDir::separator()); + info.m_path.replace(QLatin1Char('.'), QLatin1Char('/')); info.m_version = version; info.m_as = as; info.m_ast = ast; @@ -2257,7 +2257,7 @@ ImportInfo ImportInfo::pathImport(const QString &docPath, const QString &path, QFileInfo importFileInfo(path); if (!importFileInfo.isAbsolute()) - importFileInfo = QFileInfo(docPath + QDir::separator() + path); + importFileInfo = QFileInfo(docPath + QLatin1Char('/') + path); info.m_path = importFileInfo.absoluteFilePath(); if (importFileInfo.isFile()) { @@ -2369,8 +2369,10 @@ const Value *TypeScope::lookupMember(const QString &name, const Context *context continue; } - if (const Value *v = import->lookupMember(name, context, foundInObject)) + if (const Value *v = import->lookupMember(name, context, foundInObject)) { + i.used = true; return v; + } } if (foundInObject) *foundInObject = 0; @@ -2548,7 +2550,7 @@ bool Imports::importFailed() const return m_importFailed; } -QList<Import> Imports::all() const +const QList<Import> &Imports::all() const { return m_imports; } diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index f4721b99571..405a2f7a71f 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -1011,7 +1011,7 @@ public: // Other: non-absolute path QString name() const; - // LibraryImport: uri with QDir::separator separator + // LibraryImport: uri with '/' separator // Other: absoluteFilePath QString path() const; @@ -1088,7 +1088,7 @@ public: QString nameForImportedObject(const ObjectValue *value, const Context *context) const; bool importFailed() const; - QList<Import> all() const; + const QList<Import> &all() const; const TypeScope *typeScope() const; const JSImportScope *jsImportScope() const; diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp index 5671cc1273b..d4e9da98b57 100644 --- a/src/libs/qmljs/qmljslink.cpp +++ b/src/libs/qmljs/qmljslink.cpp @@ -438,15 +438,21 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf } bool LinkPrivate::importLibrary(Document::Ptr doc, - const QString &libraryPath, + const QString &libraryPath_, Import *import, const QString &importPath) { const ImportInfo &importInfo = import->info; - - const LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath); - if (!libraryInfo.isValid()) - return false; + QString libraryPath = libraryPath_; + + LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath); + if (!libraryInfo.isValid()) { + // try canonical path + libraryPath = QFileInfo(libraryPath).canonicalFilePath(); + libraryInfo = snapshot.libraryInfo(libraryPath); + if (!libraryInfo.isValid()) + return false; + } import->libraryPath = libraryPath; @@ -551,7 +557,7 @@ void LinkPrivate::loadQmldirComponents(ObjectValue *import, ComponentVersion ver importedTypes.insert(component.typeName); if (Document::Ptr importedDoc = snapshot.document( - libraryPath + QDir::separator() + component.fileName)) { + libraryPath + QLatin1Char('/') + component.fileName)) { if (ObjectValue *v = importedDoc->bind()->rootObjectValue()) import->setMember(component.typeName, v); } diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index 6bfffda64f8..fb2c24c4a42 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -118,9 +118,11 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent) qRegisterMetaType<QmlJS::PathAndLanguage>("QmlJS::PathAndLanguage"); qRegisterMetaType<QmlJS::PathsAndLanguages>("QmlJS::PathsAndLanguages"); - m_defaultProjectInfo.qtImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); + m_defaultProjectInfo.qtImportsPath = QFileInfo( + QLibraryInfo::location(QLibraryInfo::ImportsPath)).canonicalFilePath(); #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) - m_defaultProjectInfo.qtQmlPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + m_defaultProjectInfo.qtQmlPath = QFileInfo( + QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath(); #endif m_defaultImportPaths << environmentImportPaths(); diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h index d440c78dc99..1a36a6e3c54 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.h +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h @@ -90,8 +90,6 @@ public: bool isNull() const { return project.isNull(); } - QStringList completeImportPaths(); - public: // attributes QPointer<ProjectExplorer::Project> project; QStringList sourceFiles; diff --git a/src/libs/qmljs/qmljsplugindumper.cpp b/src/libs/qmljs/qmljsplugindumper.cpp index 687e3bedd20..f62428a565d 100644 --- a/src/libs/qmljs/qmljsplugindumper.cpp +++ b/src/libs/qmljs/qmljsplugindumper.cpp @@ -138,7 +138,7 @@ static QString makeAbsolute(const QString &path, const QString &base) { if (QFileInfo(path).isAbsolute()) return path; - return QString::fromLatin1("%1%2%3").arg(base, QDir::separator(), path); + return QString::fromLatin1("%1/%3").arg(base, path); } void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri, const QString &importVersion) diff --git a/src/libs/qmljs/qmljsvalueowner.cpp b/src/libs/qmljs/qmljsvalueowner.cpp index 644b0c09ed7..41cd4b21210 100644 --- a/src/libs/qmljs/qmljsvalueowner.cpp +++ b/src/libs/qmljs/qmljsvalueowner.cpp @@ -365,6 +365,8 @@ SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind) addFunction(_datePrototype, QLatin1String("getTime"), numberValue(), 0); addFunction(_datePrototype, QLatin1String("getFullYear"), numberValue(), 0); addFunction(_datePrototype, QLatin1String("getUTCFullYear"), numberValue(), 0); + addFunction(_datePrototype, QLatin1String("getDay"), numberValue(), 0); + addFunction(_datePrototype, QLatin1String("getUTCDay"), numberValue(), 0); addFunction(_datePrototype, QLatin1String("getMonth"), numberValue(), 0); addFunction(_datePrototype, QLatin1String("getUTCMonth"), numberValue(), 0); addFunction(_datePrototype, QLatin1String("getDate"), numberValue(), 0); diff --git a/src/plugins/clangcodemodel/README b/src/plugins/clangcodemodel/README index 86121132708..27985197987 100644 --- a/src/plugins/clangcodemodel/README +++ b/src/plugins/clangcodemodel/README @@ -50,7 +50,7 @@ qmake and rebuild Qt Creator. Watch out for a message like Project MESSAGE: INCLUDEPATH += /usr/lib/llvm-3.4/include Project MESSAGE: LIBS += -L/usr/lib/llvm-3.4/lib -lclang -This indicates that the ClangCodeModel plugin will be build. +This indicates that the ClangCodeModel plugin will be built. Enable the plugin ----------------- diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp index c1ff497d642..828e42d6c40 100644 --- a/src/plugins/classview/classviewparser.cpp +++ b/src/plugins/classview/classviewparser.cpp @@ -166,6 +166,7 @@ Parser::Parser(QObject *parent) d(new ParserPrivate()) { d->timer = new QTimer(this); + d->timer->setObjectName(QLatin1String("ClassViewParser::timer")); d->timer->setSingleShot(true); // connect signal/slots diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index c589fec67e8..59cc930b9a9 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -472,6 +472,7 @@ void EditorManagerPrivate::init() m_windowPopup->hide(); m_autoSaveTimer = new QTimer(this); + m_autoSaveTimer->setObjectName(QLatin1String("EditorManager::m_autoSaveTimer")); connect(m_autoSaveTimer, SIGNAL(timeout()), SLOT(autoSave())); updateAutoSave(); diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 326c6af0776..87703ed11e0 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -484,7 +484,6 @@ void LocatorWidget::updateCompletionList(const QString &text) // cancel the old future m_entriesWatcher->future().cancel(); - m_entriesWatcher->future().waitForFinished(); QFuture<LocatorFilterEntry> future = QtConcurrent::run(runSearch, filters, searchText); m_entriesWatcher->setFuture(future); diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 582c1063dcb..561bc2b04af 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -554,6 +554,7 @@ void MainWindow::registerDefaultActions() m_exitAction = new QAction(icon, tr("E&xit"), this); cmd = ActionManager::registerAction(m_exitAction, Constants::EXIT, globalContext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q"))); + cmd->action()->setMenuRole(QAction::QuitRole); mfile->addAction(cmd, Constants::G_FILE_OTHER); connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit())); diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index decd4aac877..f86c36f27a8 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -778,7 +778,8 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt Utils::StyleHelper::menuGradient(painter, option->rect, option->rect); painter->save(); painter->setPen(Utils::StyleHelper::borderColor()); - painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + painter->drawLine(option->rect.bottomLeft() + QPointF(0.5, 0.5), + option->rect.bottomRight() + QPointF(0.5, 0.5)); painter->restore(); } break; diff --git a/src/plugins/coreplugin/variablemanager.cpp b/src/plugins/coreplugin/variablemanager.cpp index bcc90ea9395..bb5920f659d 100644 --- a/src/plugins/coreplugin/variablemanager.cpp +++ b/src/plugins/coreplugin/variablemanager.cpp @@ -253,8 +253,9 @@ void VariableManager::registerVariable(const QByteArray &variable, void VariableManager::registerIntVariable(const QByteArray &variable, const QString &description, const VariableManager::IntFunction &value) { + const VariableManager::IntFunction valuecopy = value; // do not capture a reference in a lambda registerVariable(variable, description, - [value]() { return QString::number(value ? value() : 0); }); + [valuecopy]() { return QString::number(valuecopy ? valuecopy() : 0); }); } /*! diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index cf5228c4429..c7f1346b8a9 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -191,7 +191,6 @@ void CppEditorWidget::finalizeInitialization() }); connect(&d->m_localRenaming, &CppLocalRenaming::processKeyPressNormally, this, &CppEditorWidget::processKeyNormally); - connect(this, SIGNAL(cursorPositionChanged()), d->m_cppEditorOutline, SLOT(updateIndex())); @@ -684,6 +683,10 @@ void CppEditorWidget::updateFunctionDeclDefLink() void CppEditorWidget::updateFunctionDeclDefLinkNow() { + static bool noTracking = qgetenv("QTC_NO_FUNCTION_DECL_DEF_LINK_TRACKING").trimmed() == "1"; + if (noTracking) + return; + if (Core::EditorManager::currentEditor()->widget() != this) return; diff --git a/src/plugins/cppeditor/cppeditoroutline.cpp b/src/plugins/cppeditor/cppeditoroutline.cpp index ad28da7b846..969108a50e7 100644 --- a/src/plugins/cppeditor/cppeditoroutline.cpp +++ b/src/plugins/cppeditor/cppeditoroutline.cpp @@ -82,9 +82,10 @@ private: CPlusPlus::OverviewModel *m_sourceModel; }; -QTimer *newSingleShotTimer(QObject *parent, int msInternal) +QTimer *newSingleShotTimer(QObject *parent, int msInternal, const QString &objectName) { QTimer *timer = new QTimer(parent); + timer->setObjectName(objectName); timer->setSingleShot(true); timer->setInterval(msInternal); return timer; @@ -131,10 +132,12 @@ CppEditorOutline::CppEditorOutline(CppEditorWidget *editorWidget) connect(m_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateToolTip())); // Set up timers - m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs); + m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs, + QLatin1String("CppEditorOutline::m_updateTimer")); connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateNow())); - m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs); + m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs, + QLatin1String("CppEditorOutline::m_updateIndexTimer")); connect(m_updateIndexTimer, SIGNAL(timeout()), this, SLOT(updateIndexNow())); } diff --git a/src/plugins/cpptools/cppchecksymbols.cpp b/src/plugins/cpptools/cppchecksymbols.cpp index eb6974c470b..c1ba4d06f57 100644 --- a/src/plugins/cpptools/cppchecksymbols.cpp +++ b/src/plugins/cpptools/cppchecksymbols.cpp @@ -334,7 +334,9 @@ void CheckSymbols::run() _potentialStatics = collectTypes.statics(); Utils::sort(_macroUses, sortByLinePredicate); - _doc->clearDiagnosticMessages(); + // TODO: Handle concurrent (write) access of diagnostic messages and ensure + // propagation to the editor widget +// _doc->clearDiagnosticMessages(); if (!isCanceled()) { if (_doc->translationUnit()) { @@ -350,7 +352,9 @@ void CheckSymbols::run() bool CheckSymbols::warning(unsigned line, unsigned column, const QString &text, unsigned length) { Document::DiagnosticMessage m(Document::DiagnosticMessage::Warning, _fileName, line, column, text, length); - _doc->addDiagnosticMessage(m); + // TODO: Handle concurrent (write) access of diagnostic messages and ensure + // propagation to the editor widget +// _doc->addDiagnosticMessage(m); return false; } diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 796a052b95e..3ca1f734d08 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -233,6 +233,7 @@ CppModelManager::CppModelManager(QObject *parent) m_dirty = true; m_delayedGcTimer = new QTimer(this); + m_delayedGcTimer->setObjectName(QLatin1String("CppModelManager::m_delayedGcTimer")); m_delayedGcTimer->setSingleShot(true); connect(m_delayedGcTimer, SIGNAL(timeout()), this, SLOT(GC())); diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp index 2532f740b02..64d4a1f77dd 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.cpp +++ b/src/plugins/cpptools/cpprefactoringchanges.cpp @@ -114,10 +114,6 @@ CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const QString &fi CppRefactoringFilePtr result(new CppRefactoringFile(document, fileName)); result->m_data = m_data; - Document::Ptr cppDocument = data()->m_snapshot.document(fileName); - if (cppDocument) - result->setCppDocument(cppDocument); - return result; } diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index b3650711d97..1217b874eb9 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -138,11 +138,13 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor } m_updateDocumentTimer = new QTimer(this); + m_updateDocumentTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateDocumentTimer")); m_updateDocumentTimer->setSingleShot(true); m_updateDocumentTimer->setInterval(m_updateDocumentInterval); connect(m_updateDocumentTimer, SIGNAL(timeout()), this, SLOT(updateDocumentNow())); m_updateEditorTimer = new QTimer(this); + m_updateEditorTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateEditorTimer")); m_updateEditorTimer->setInterval(UpdateEditorInterval); m_updateEditorTimer->setSingleShot(true); connect(m_updateEditorTimer, SIGNAL(timeout()), @@ -162,6 +164,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor connect(Core::EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)), this, SLOT(onCurrentEditorChanged())); m_editorGCTimer = new QTimer(this); + m_editorGCTimer->setObjectName(QLatin1String("CppEditorSupport::m_editorGCTimer")); m_editorGCTimer->setSingleShot(true); m_editorGCTimer->setInterval(EditorHiddenGCTimeout); connect(m_editorGCTimer, SIGNAL(timeout()), this, SLOT(releaseResources())); diff --git a/src/plugins/cpptools/stringtable.cpp b/src/plugins/cpptools/stringtable.cpp index baa23fff05c..a21ecfc748a 100644 --- a/src/plugins/cpptools/stringtable.cpp +++ b/src/plugins/cpptools/stringtable.cpp @@ -49,6 +49,7 @@ StringTable::StringTable() m_gcRunner.setAutoDelete(false); + m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown")); m_gcCountDown.setSingleShot(true); m_gcCountDown.setInterval(GCTimeOut); connect(&m_gcCountDown, SIGNAL(timeout()), diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index b6befa75cd9..60cfc3d3743 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2828,10 +2828,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName, unsigned BreakpointCorrectionContext::fixLineNumber(const QString &fileName, unsigned lineNumber) const { - CPlusPlus::Document::Ptr doc = m_snapshot.document(fileName); - if (!doc || !doc->translationUnit()->ast()) - doc = getParsedDocument(fileName, m_workingCopy, m_snapshot); - + const CPlusPlus::Document::Ptr doc = getParsedDocument(fileName, m_workingCopy, m_snapshot); CPlusPlus::FindCdbBreakpoint findVisitor(doc->translationUnit()); const unsigned correctedLine = findVisitor(lineNumber); if (!correctedLine) { diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 05a6b428ea8..517101ac13a 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -378,21 +378,21 @@ void DebuggerItemManager::saveDebuggers() QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item) { - // Force addition when Id is set. - if (item.id().isValid()) - return addDebugger(item); - - // Otherwise, try re-using existing item first. + // Try re-using existing item first. foreach (const DebuggerItem &d, m_debuggers) { if (d.command() == item.command() && d.isAutoDetected() == item.isAutoDetected() && d.engineType() == item.engineType() && d.displayName() == item.displayName() - && d.abis() == item.abis()) + && d.abis() == item.abis()) { return d.id(); + } } - // Nothing suitable. Create a new id and add the item. + // If item already has an id, add it. Otherwise, create a new id. + if (item.id().isValid()) + return addDebugger(item); + DebuggerItem di = item; di.createId(); return addDebugger(di); diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 2013a478c8d..0949118abf3 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -39,6 +39,7 @@ #include <utils/qtcassert.h> #include <QFileInfo> +#include <utility> using namespace ProjectExplorer; using namespace Utils; @@ -73,19 +74,7 @@ QVariant DebuggerKitInformation::defaultValue(Kit *k) const void DebuggerKitInformation::setup(Kit *k) { - // Get one of the available debugger matching the kit's toolchain. - const ToolChain *tc = ToolChainKitInformation::toolChain(k); - const Abi toolChainAbi = tc ? tc->targetAbi() : Abi::hostAbi(); - // This can be anything (Id, binary path, "auto") - const QVariant rawId = k->value(DebuggerKitInformation::id()); - - enum { - NotDetected, DetectedAutomatically, DetectedByFile, DetectedById - } detection = NotDetected; - DebuggerEngineType autoEngine = NoEngineType; - FileName fileName; - // With 3.0 we have: // <value type="QString" key="Debugger.Information">{75ecf347-f221-44c3-b613-ea1d29929cd4}</value> // Before we had: @@ -98,68 +87,87 @@ void DebuggerKitInformation::setup(Kit *k) // <value type="QString" key="Binary">auto</value> // <value type="int" key="EngineType">4</value> // </valuemap> + const QVariant rawId = k->value(DebuggerKitInformation::id()); - if (rawId.isNull()) { - // Initial setup of a kit - detection = NotDetected; - } else if (rawId.type() == QVariant::String) { - detection = DetectedById; - } else { - QMap<QString, QVariant> map = rawId.toMap(); - QString binary = map.value(QLatin1String("Binary")).toString(); - if (binary == QLatin1String("auto")) { - detection = DetectedAutomatically; - autoEngine = DebuggerEngineType(map.value(QLatin1String("EngineType")).toInt()); - } else { - detection = DetectedByFile; - fileName = FileName::fromUserInput(binary); - } - } + const ToolChain *tc = ToolChainKitInformation::toolChain(k); + + // Get the best of the available debugger matching the kit's toolchain. + // The general idea is to find an item that exactly matches what + // is stored in the kit information, but also accept item based + // on toolchain matching as fallback with a lower priority. const DebuggerItem *bestItem = 0; DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch; + foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) { - const DebuggerItem *goodItem = 0; - if (detection == DetectedById && item.id() == rawId) - goodItem = &item; - if (detection == DetectedByFile && item.command() == fileName) - goodItem = &item; - if (detection == DetectedAutomatically && item.engineType() == autoEngine) - goodItem = &item; - if (item.isAutoDetected()) - goodItem = &item; - - if (goodItem) { - DebuggerItem::MatchLevel level = goodItem->matchTarget(toolChainAbi); - if (level > bestLevel) { - bestLevel = level; - bestItem = goodItem; + DebuggerItem::MatchLevel level = DebuggerItem::DoesNotMatch; + + if (rawId.isNull()) { + // Initial setup of a kit. + if (tc) { + // Use item if target toolchain fits. + level = item.matchTarget(tc->targetAbi()); + } else { + // Use item if host toolchain fits, but only as fallback. + level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat); + } + } else if (rawId.type() == QVariant::String) { + // New structure. + if (item.id() == rawId) { + // Detected by ID. + level = DebuggerItem::MatchesPerfectly; + } else { + // This item does not match by ID, and is an unlikely candidate. + // However, consider using it as fallback if the tool chain fits. + if (tc) + level = std::min(item.matchTarget(tc->targetAbi()), DebuggerItem::MatchesSomewhat); + } + } else { + // Old structure. + const QMap<QString, QVariant> map = rawId.toMap(); + QString binary = map.value(QLatin1String("Binary")).toString(); + if (binary == QLatin1String("auto")) { + // This is close to the "new kit" case, except that we know + // an engine type. + DebuggerEngineType autoEngine = DebuggerEngineType(map.value(QLatin1String("EngineType")).toInt()); + if (item.engineType() == autoEngine) { + if (tc) { + // Use item if target toolchain fits. + level = item.matchTarget(tc->targetAbi()); + } else { + // Use item if host toolchain fits, but only as fallback. + level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat); + } + } + } else { + // We have an executable path. + FileName fileName = FileName::fromUserInput(binary); + if (item.command() == fileName) { + // And it's is the path of this item. + if (tc) { + // Use item if target toolchain fits. + level = item.matchTarget(tc->targetAbi()); + } else { + // Use item if host toolchain fits, but only as fallback. + level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat); + } + } else { + // This item does not match by filename, and is an unlikely candidate. + // However, consider using it as fallback if the tool chain fits. + if (tc) + level = std::min(item.matchTarget(tc->targetAbi()), DebuggerItem::MatchesSomewhat); + } } } - } - // If we have an existing debugger with matching id _and_ - // matching target ABI we are fine. - if (bestItem) { - k->setValue(DebuggerKitInformation::id(), bestItem->id()); - return; - } - - // We didn't find an existing debugger that matched by whatever - // data we found in the kit (i.e. no id, filename, "auto") - // (or what we found did not match ABI-wise) - // Let's try to pick one with matching ABI. - QVariant bestId; - bestLevel = DebuggerItem::DoesNotMatch; - foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) { - DebuggerItem::MatchLevel level = item.matchTarget(toolChainAbi); if (level > bestLevel) { bestLevel = level; - bestId = item.id(); + bestItem = &item; } } - k->setValue(DebuggerKitInformation::id(), bestId); + // Use the best id we found, or an invalid one. + k->setValue(DebuggerKitInformation::id(), bestItem ? bestItem->id() : QVariant()); } diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index bd4b2ea1036..6a9884218c3 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -3079,7 +3079,6 @@ void DebuggerPluginPrivate::extensionsInitialized() cmd = ActionManager::registerAction(m_resetAction, Constants::RESET, globalcontext); cmd->setDescription(tr("Restart Debugging")); - cmd->setDefaultKeySequence(QKeySequence(tr("Shift+Ctrl+R"))); debugMenu->addAction(cmd, CC::G_DEFAULT_ONE); debugMenu->addSeparator(globalcontext); diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp index b1271d8825c..44b7ca31b8f 100644 --- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp +++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp @@ -184,8 +184,10 @@ void DebuggerRunConfigWidget::useCppDebuggerClicked(bool on) m_aspect->m_useCppDebugger = on ? DebuggerRunConfigurationAspect::EnabledLanguage : DebuggerRunConfigurationAspect::DisabledLanguage; - if (!on && !m_useQmlDebugger->isChecked()) + if (!on && !m_useQmlDebugger->isChecked()) { m_useQmlDebugger->setChecked(true); + useQmlDebuggerClicked(true); + } } void DebuggerRunConfigWidget::useQmlDebuggerToggled(bool on) @@ -199,8 +201,10 @@ void DebuggerRunConfigWidget::useQmlDebuggerClicked(bool on) m_aspect->m_useQmlDebugger = on ? DebuggerRunConfigurationAspect::EnabledLanguage : DebuggerRunConfigurationAspect::DisabledLanguage; - if (!on && !m_useCppDebugger->isChecked()) + if (!on && !m_useCppDebugger->isChecked()) { m_useCppDebugger->setChecked(true); + useCppDebuggerClicked(true); + } } void DebuggerRunConfigWidget::useMultiProcessToggled(bool on) diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp index 2c3e22eb995..5bcbba10f88 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp @@ -480,21 +480,27 @@ void GdbRemoteServerEngine::notifyEngineRemoteSetupDone(int gdbServerPort, int q QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); DebuggerEngine::notifyEngineRemoteSetupDone(gdbServerPort, qmlPort); - if (m_isMulti) { - // Has been done in notifyEngineRemoteServerRunning - } else { - if (qmlPort != -1) - startParameters().qmlServerPort = qmlPort; - if (gdbServerPort != -1) { - QString &rc = startParameters().remoteChannel; - const int sepIndex = rc.lastIndexOf(QLatin1Char(':')); - if (sepIndex != -1) { - rc.replace(sepIndex + 1, rc.count() - sepIndex - 1, - QString::number(gdbServerPort)); - } + DebuggerStartParameters ¶ms = isMasterEngine() + ? startParameters() : masterEngine()->startParameters(); + if (gdbServerPort != -1) { + QString &rc = params.remoteChannel; + const int sepIndex = rc.lastIndexOf(QLatin1Char(':')); + if (sepIndex != -1) { + rc.replace(sepIndex + 1, rc.count() - sepIndex - 1, + QString::number(gdbServerPort)); } - startGdb(); } + if (qmlPort != -1) { + params.qmlServerPort = qmlPort; + params.processArgs.replace(_("%qml_port%"), QString::number(qmlPort)); + } + + // TODO: Aren't these redundant? + m_isMulti = params.multiProcess; + m_targetPid = -1; + m_serverChannel = params.remoteChannel.toLatin1(); + + startGdb(); } void GdbRemoteServerEngine::notifyEngineRemoteSetupFailed(const QString &reason) diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp index 39433669a1f..721ff529854 100644 --- a/src/plugins/ios/iosprobe.cpp +++ b/src/plugins/ios/iosprobe.cpp @@ -246,7 +246,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco continue; } if (sdkName.isEmpty()) { - if (compareVersions(maxVersion, versionStr) > 0) { + if (maxVersion.isEmpty() || compareVersions(maxVersion, versionStr) > 0) { maxVersion = versionStr; sdkPath = sdkDirInfo.canonicalFilePath(); sdkSettings = sdkInfo; diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 92ee74b3fad..79103a7f068 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -69,11 +69,11 @@ isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR) isEmpty(IDE_PACKAGE_MODE) { SUBDIRS += \ - helloworld \ - updateinfo -} else:!isEmpty(UPDATEINFO_ENABLE) { - SUBDIRS += \ - updateinfo + helloworld #\ + #updateinfo +#} else:!isEmpty(UPDATEINFO_ENABLE) { +# SUBDIRS += \ +# updateinfo } for(p, SUBDIRS) { diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index bd9aab74b0b..42f63724527 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -471,7 +471,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple) width = 32; } else if (p.startsWith(QLatin1String("mips"))) { arch = Abi::MipsArchitecture; - width = p.endsWith(QLatin1String("64")) ? 64 : 32; + width = p.contains(QLatin1String("64")) ? 64 : 32; } else if (p == QLatin1String("x86_64") || p == QLatin1String("amd64")) { arch = Abi::X86Architecture; width = 64; @@ -1065,6 +1065,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data() QTest::newRow("mips64-linux-octeon-gnu") << int(Abi::MipsArchitecture) << int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor) << int(Abi::ElfFormat) << 64; + + QTest::newRow("mips64el-linux-gnuabi") << int(Abi::MipsArchitecture) + << int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor) + << int(Abi::ElfFormat) << 64; } void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet() diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp index 04d7737e5ad..1f629650f4e 100644 --- a/src/plugins/projectexplorer/settingsaccessor.cpp +++ b/src/plugins/projectexplorer/settingsaccessor.cpp @@ -678,6 +678,11 @@ QVariantMap SettingsAccessor::upgradeSettings(const QVariantMap &data, int toVer else result = data; + if (version < 15 && toVersion < 15) { + result.insert(QLatin1String(USER_STICKY_KEYS_KEY), + data.value(QLatin1String("ProjectExplorer.Project.UserStickyKeys"))); + } + if (version >= toVersion || version < d->firstVersion() || toVersion > d->currentVersion()) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 4a45ac5ca65..c3789249be5 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -39,6 +39,9 @@ #include <coreplugin/documentmanager.h> #include <coreplugin/icontext.h> #include <coreplugin/id.h> +#include <coreplugin/icore.h> +#include <coreplugin/iversioncontrol.h> +#include <coreplugin/vcsmanager.h> #include <coreplugin/messagemanager.h> #include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/mimedatabase.h> @@ -68,6 +71,7 @@ #include <QCoreApplication> #include <QDir> #include <QFileInfo> +#include <QMessageBox> #include <QVariantMap> using namespace Core; @@ -130,6 +134,11 @@ QbsProject::~QbsProject() { m_codeModelFuture.cancel(); delete m_qbsProjectParser; + if (m_qbsUpdateFutureInterface) { + m_qbsUpdateFutureInterface->reportCanceled(); + delete m_qbsUpdateFutureInterface; + m_qbsUpdateFutureInterface = 0; + } // Deleting the root node triggers a few things, make sure rootProjectNode // returns 0 already @@ -223,6 +232,27 @@ private: bool m_wasInDocumentManager; }; +bool QbsProject::ensureWriteableQbsFile(const QString &file) +{ + // Ensure that the file is not read only + QFileInfo fi(file); + if (!fi.isWritable()) { + // Try via vcs manager + Core::IVersionControl *versionControl = + Core::VcsManager::findVersionControlForDirectory(fi.absolutePath()); + if (!versionControl || !versionControl->vcsOpen(file)) { + bool makeWritable = QFile::setPermissions(file, fi.permissions() | QFile::WriteUser); + if (!makeWritable) { + QMessageBox::warning(Core::ICore::mainWindow(), + tr("Failed!"), + tr("Could not write project file %1.").arg(file)); + return false; + } + } + } + return true; +} + bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &filePaths, const qbs::ProductData &productData, const qbs::GroupData &groupData, QStringList *notAdded) { @@ -230,6 +260,7 @@ bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList & QStringList allPaths = groupData.allFilePaths(); const QString productFilePath = productData.location().fileName(); ChangeExpector expector(productFilePath, m_qbsDocuments); + ensureWriteableQbsFile(productFilePath); foreach (const QString &path, filePaths) { qbs::ErrorInfo err = m_qbsProject.addFiles(productData, groupData, QStringList() << path); if (err.hasError()) { @@ -255,6 +286,7 @@ bool QbsProject::removeFilesFromProduct(QbsBaseProjectNode *node, const QStringL QStringList allPaths = groupData.allFilePaths(); const QString productFilePath = productData.location().fileName(); ChangeExpector expector(productFilePath, m_qbsDocuments); + ensureWriteableQbsFile(productFilePath); foreach (const QString &path, filePaths) { qbs::ErrorInfo err = m_qbsProject.removeFiles(productData, groupData, QStringList() << path); diff --git a/src/plugins/qbsprojectmanager/qbsproject.h b/src/plugins/qbsprojectmanager/qbsproject.h index 75d9f428811..84dcda80e96 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.h +++ b/src/plugins/qbsprojectmanager/qbsproject.h @@ -135,6 +135,8 @@ private: void updateDeploymentInfo(const qbs::Project &project); void updateBuildTargetData(); + static bool ensureWriteableQbsFile(const QString &file); + QbsManager *const m_manager; const QString m_projectName; const QString m_fileName; diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp index 5c5a52a066b..4fb227f92da 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp @@ -194,6 +194,8 @@ void QbsRunConfiguration::installStepChanged() if (m_currentBuildStepList) { connect(m_currentBuildStepList, SIGNAL(stepInserted(int)), this, SLOT(installStepChanged())); + connect(m_currentBuildStepList, SIGNAL(aboutToRemoveStep(int)), this, + SLOT(installStepToBeRemoved(int))); connect(m_currentBuildStepList, SIGNAL(stepRemoved(int)), this, SLOT(installStepChanged())); connect(m_currentBuildStepList, SIGNAL(stepMoved(int,int)), this, SLOT(installStepChanged())); } @@ -201,6 +203,17 @@ void QbsRunConfiguration::installStepChanged() emit targetInformationChanged(); } +void QbsRunConfiguration::installStepToBeRemoved(int pos) +{ + QTC_ASSERT(m_currentBuildStepList, return); + // TODO: Our logic is rather broken. Users can create as many qbs install steps as they want, + // but we ignore all but the first one. + if (m_currentBuildStepList->steps().at(pos) != m_currentInstallStep) + return; + disconnect(m_currentInstallStep, SIGNAL(changed()), this, SIGNAL(targetInformationChanged())); + m_currentInstallStep = 0; +} + QString QbsRunConfiguration::executable() const { QbsProject *pro = static_cast<QbsProject *>(target()->project()); diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h index 590319d9924..48af566bcfd 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h @@ -105,6 +105,7 @@ protected: private slots: void installStepChanged(); + void installStepToBeRemoved(int pos); private: void setBaseWorkingDirectory(const QString &workingDirectory); diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index e7bbf29f68b..f8c5f0a973c 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -1712,17 +1712,13 @@ void QmakeProFileNode::setupReader() QmakeProFileNode::EvalResult QmakeProFileNode::evaluate() { - EvalResult evalResult = EvalOk; if (ProFile *pro = m_readerExact->parsedProFile(m_projectFilePath)) { - if (!m_readerExact->accept(pro, QMakeEvaluator::LoadAll)) - evalResult = EvalPartial; - if (!m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles)) - evalResult = EvalFail; + bool exactOk = m_readerExact->accept(pro, QMakeEvaluator::LoadAll); + bool cumulOk = m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles); pro->deref(); - } else { - evalResult = EvalFail; + return exactOk ? EvalOk : cumulOk ? EvalPartial : EvalFail; } - return evalResult; + return EvalFail; } void QmakeProFileNode::asyncEvaluate(QFutureInterface<EvalResult> &fi) diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 23cf2e791e0..6f6889ee4d4 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -650,10 +650,9 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument) if (!isFileInProject(designDocument, currentProject)) return 0; - designDocument->disconnect(designDocument, SLOT(updateActiveQtVersion())); - designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion())); + designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection); - designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion())); + designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection); ProjectExplorer::Target *target = currentProject->activeTarget(); @@ -661,7 +660,7 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument) if (!target) return 0; - designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion())); + designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection); return target->kit(); } diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index 6b982e9da14..9cb96d4d5fc 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -721,7 +721,7 @@ void NavigatorTreeModel::handleItemLibraryItemDrop(const QMimeData *mimeData, in if (foundTarget) { ItemLibraryEntry itemLibraryEntry = itemLibraryEntryFromData(mimeData->data("application/vnd.bauhaus.itemlibraryinfo")); - QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNode(m_view, itemLibraryEntry, QPointF(0., 0.), targetProperty); + QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNode(m_view, itemLibraryEntry, QPointF(), targetProperty); if (newQmlItemNode.isValid() && targetProperty.isNodeListProperty()) { QList<ModelNode> newModelNodeList; @@ -742,7 +742,7 @@ void NavigatorTreeModel::handleItemLibraryImageDrop(const QMimeData *mimeData, i if (foundTarget) { QString imageFileName = QString::fromUtf8(mimeData->data("application/vnd.bauhaus.libraryresource")); - QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(0., 0.), targetProperty); + QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(), targetProperty); if (newQmlItemNode.isValid()) { QList<ModelNode> newModelNodeList; diff --git a/src/plugins/qmldesigner/componentsplugin/Controls/TabViewSpecifics.qml b/src/plugins/qmldesigner/componentsplugin/Controls/TabViewSpecifics.qml index 85f1c21066a..5ce74617ca9 100644 --- a/src/plugins/qmldesigner/componentsplugin/Controls/TabViewSpecifics.qml +++ b/src/plugins/qmldesigner/componentsplugin/Controls/TabViewSpecifics.qml @@ -39,7 +39,7 @@ Column { Section { anchors.left: parent.left anchors.right: parent.right - caption: qsTr("TabView") + caption: qsTr("Tab View") SectionLayout { diff --git a/src/plugins/qmldesigner/componentsplugin/Controls/TextAreaSpecifics.qml b/src/plugins/qmldesigner/componentsplugin/Controls/TextAreaSpecifics.qml index 7835bd2842c..70347cf6dbb 100644 --- a/src/plugins/qmldesigner/componentsplugin/Controls/TextAreaSpecifics.qml +++ b/src/plugins/qmldesigner/componentsplugin/Controls/TextAreaSpecifics.qml @@ -44,7 +44,7 @@ Column { ColorEditor { caption: qsTr("Color") - backendendValue: backendValues.textColor + backendValue: backendValues.textColor supportGradient: false } } diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index c92cc6d980b..8570ddc8a1e 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -786,8 +786,10 @@ void NodeMetaInfoPrivate::setupLocalPropertyInfo(QList<PropertyInfo> localProper void NodeMetaInfoPrivate::setupPropertyInfo(QList<PropertyInfo> propertyInfos) { foreach (const PropertyInfo &propertyInfo, propertyInfos) { - m_properties.append(propertyInfo.first); - m_propertyTypes.append(propertyInfo.second); + if (!m_properties.contains(propertyInfo.first)) { + m_properties.append(propertyInfo.first); + m_propertyTypes.append(propertyInfo.second); + } } } diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index 4242214f1f4..770f86b2a6f 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -117,8 +117,10 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary QList<PropertyBindingEntry> propertyBindingList; if (itemLibraryEntry.qmlSource().isEmpty()) { QList<QPair<PropertyName, QVariant> > propertyPairList; - propertyPairList.append(qMakePair(PropertyName("x"), QVariant(qRound(position.x())))); - propertyPairList.append(qMakePair(PropertyName("y"), QVariant(qRound(position.y())))); + if (!position.isNull()) { + propertyPairList.append(qMakePair(PropertyName("x"), QVariant(qRound(position.x())))); + propertyPairList.append(qMakePair(PropertyName("y"), QVariant(qRound(position.y())))); + } foreach (const PropertyContainer &property, itemLibraryEntry.properties()) { if (property.type() == QStringLiteral("binding")) { diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 7927a4f2594..9e0fe108b7d 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -74,7 +74,8 @@ static inline QStringList supportedVersionsList() static inline QStringList globalQtEnums() { static QStringList list = QStringList() << QStringLiteral("Horizontal") << QStringLiteral("Vertical") << QStringLiteral("AlignVCenter") - << QStringLiteral("AlignLeft") << QStringLiteral("LeftToRight") << QStringLiteral("RightToLeft") + << QStringLiteral("AlignLeft") << QStringLiteral("LeftToRight") << QStringLiteral("RightToLeft") << QStringLiteral("AlignHCenter") + << QStringLiteral("AlignRight") << QStringLiteral("AlignBottom") << QStringLiteral("AlignBaseline") << QStringLiteral("AlignTop") << QStringLiteral("BottomLeft") << QStringLiteral("LeftEdge") << QStringLiteral("RightEdge") << QStringLiteral("BottomEdge"); return list; @@ -867,7 +868,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH setupImports(doc, differenceHandler); setupPossibleImports(snapshot, vContext); - setupUsedImports(); if (m_rewriterView->model()->imports().isEmpty()) { const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0), QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import statements found")); @@ -943,6 +943,7 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH } } } + setupUsedImports(); UiObjectMember *astRootNode = 0; if (UiProgram *program = doc->qmlProgram()) diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index fc3f0f744b5..c32c78668d8 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -112,14 +112,14 @@ ModelManagerInterface::ProjectInfo QmlJSTools::Internal::ModelManager::defaultPr projectInfo.tryQmlDump = project && ( qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT) || qtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)); - projectInfo.qtQmlPath = qtVersion->qmakeProperty("QT_INSTALL_QML"); - projectInfo.qtImportsPath = qtVersion->qmakeProperty("QT_INSTALL_IMPORTS"); + projectInfo.qtQmlPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_QML")).canonicalFilePath(); + projectInfo.qtImportsPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_IMPORTS")).canonicalFilePath(); projectInfo.qtVersionString = qtVersion->qtVersionString(); } else { #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) - projectInfo.qtQmlPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + projectInfo.qtQmlPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath(); #endif - projectInfo.qtImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); + projectInfo.qtImportsPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::ImportsPath)).canonicalFilePath(); projectInfo.qtVersionString = QLatin1String(qVersion()); } diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 73ed319e427..c570d9c2b11 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -264,6 +264,12 @@ FeatureSet BaseQtVersion::availableFeatures() const features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_2); features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_1); + if (qtVersion() < QtVersionNumber(5, 3, 0)) + return features; + + features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_3); + features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_2); + return features; } diff --git a/src/plugins/qtsupport/qtsupportconstants.h b/src/plugins/qtsupport/qtsupportconstants.h index 6e436137426..e7f1e565a8e 100644 --- a/src/plugins/qtsupport/qtsupportconstants.h +++ b/src/plugins/qtsupport/qtsupportconstants.h @@ -60,10 +60,12 @@ const char FEATURE_QT_QUICK_2[] = "QtSupport.Wizards.FeatureQtQuick.2"; const char FEATURE_QT_QUICK_2_0[] = "QtSupport.Wizards.FeatureQtQuick.2.0"; const char FEATURE_QT_QUICK_2_1[] = "QtSupport.Wizards.FeatureQtQuick.2.1"; const char FEATURE_QT_QUICK_2_2[] = "QtSupport.Wizards.FeatureQtQuick.2.2"; +const char FEATURE_QT_QUICK_2_3[] = "QtSupport.Wizards.FeatureQtQuick.2.3"; const char FEATURE_QT_QUICK_CONTROLS[] = "QtSupport.Wizards.FeatureQtQuick.Controls"; const char FEATURE_QT_QUICK_CONTROLS_1[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1"; const char FEATURE_QT_QUICK_CONTROLS_1_0[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.0"; const char FEATURE_QT_QUICK_CONTROLS_1_1[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.1"; +const char FEATURE_QT_QUICK_CONTROLS_1_2[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.2"; const char FEATURE_QT_WEBKIT[] = "QtSupport.Wizards.FeatureQtWebkit"; const char FEATURE_QT_CONSOLE[] = "QtSupport.Wizards.FeatureQtConsole"; const char FEATURE_MOBILE[] = "QtSupport.Wizards.FeatureMobile"; diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index 5f903c011b0..e6ecb1de65d 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -42,6 +42,7 @@ #include <projectexplorer/devicesupport/deviceapplicationrunner.h> #include <utils/qtcassert.h> +#include <utils/qtcprocess.h> #include <QPointer> @@ -60,7 +61,6 @@ public: : engine(engine), qmlDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger()), cppDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger()), - target(DeviceKitInformation::device(runConfig->target()->kit())->sshParameters().host.toLatin1()), gdbServerPort(-1), qmlPort(-1) { } @@ -69,7 +69,6 @@ public: bool qmlDebugging; bool cppDebugging; QByteArray gdbserverOutput; - QByteArray target; int gdbServerPort; int qmlPort; }; @@ -99,8 +98,12 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR params.qmlServerPort = 0; // port is selected later on } if (aspect->useCppDebugger()) { + params.multiProcess = true; params.languages |= CppLanguage; - params.processArgs = runConfig->arguments().join(QLatin1Char(' ')); + QStringList args = runConfig->arguments(); + if (aspect->useQmlDebugger()) + args.prepend(QString::fromLatin1("-qmljsdebugger=port:%qml_port%,block")); + params.processArgs = Utils::QtcProcess::joinArgs(args, Utils::OsTypeLinux); params.startMode = AttachToRemoteServer; params.executable = runConfig->localExecutableFilePath(); params.remoteChannel = device->sshParameters().host + QLatin1String(":-1"); @@ -265,8 +268,6 @@ void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error) void LinuxDeviceDebugSupport::handleAdapterSetupDone() { AbstractRemoteLinuxRunSupport::handleAdapterSetupDone(); - QByteArray remote = d->target + ':' + QByteArray::number(d->gdbServerPort); - d->engine->notifyEngineRemoteServerRunning(remote, -1); d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort); } diff --git a/src/plugins/winrt/winrtdebugsupport.cpp b/src/plugins/winrt/winrtdebugsupport.cpp index bb6bd4a3731..ae6d3228143 100644 --- a/src/plugins/winrt/winrtdebugsupport.cpp +++ b/src/plugins/winrt/winrtdebugsupport.cpp @@ -84,7 +84,7 @@ RunControl *WinRtDebugSupport::createDebugRunControl(WinRtRunConfiguration *runC + QLatin1String("/winrtdebughelper.exe")); if (!debuggerHelper.isExecutable()) { *errorMessage = tr("The WinRT debugging helper is missing from your Qt Creator " - "installation. It was assumed to be located at").arg( + "installation. It was assumed to be located at %1").arg( debuggerHelper.absoluteFilePath()); return 0; } diff --git a/src/shared/qbs b/src/shared/qbs -Subproject 82c459ea14dcd8981e397038a30c501a6c3d769 +Subproject 1358bf739a6580ccc1f4c113d5b1ba72784793a diff --git a/src/tools/3rdparty/iossim/iossim.pro b/src/tools/3rdparty/iossim/iossim.pro index 25f185cb0f1..47534f00d74 100644 --- a/src/tools/3rdparty/iossim/iossim.pro +++ b/src/tools/3rdparty/iossim/iossim.pro @@ -42,7 +42,7 @@ include(../../../rpath.pri) OBJECTIVE_SOURCES += \ main.mm \ nsprintf.mm \ - nsstringexpandPath.mm \ + nsstringexpandpath.mm \ iphonesimulator.mm HEADERS += \ diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro b/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro index 9e303074066..fc18227ca26 100644 --- a/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro +++ b/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro @@ -41,7 +41,7 @@ include(../../../rpath.pri) OBJECTIVE_SOURCES += \ main.mm \ nsprintf.mm \ - nsstringexpandPath.mm \ + nsstringexpandpath.mm \ iphonesimulator.mm HEADERS += \ |