From 7a9a1b04b1d492b9f3f08a604b0c65502fed761b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 28 Feb 2015 21:45:07 +0200 Subject: [PATCH 01/62] ProjectExplorer: Use FileName in NodesVisitor Change-Id: Ia02b4dc64b343664b5d47fe3743fbdd0782da121 Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/nodesvisitor.cpp | 12 ++++++------ src/plugins/projectexplorer/nodesvisitor.h | 10 ++++++---- src/plugins/projectexplorer/session.cpp | 2 +- src/plugins/qmakeprojectmanager/qmakenodes.cpp | 10 +++++----- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/plugins/projectexplorer/nodesvisitor.cpp b/src/plugins/projectexplorer/nodesvisitor.cpp index 72855b8ecf2..a950eebdddb 100644 --- a/src/plugins/projectexplorer/nodesvisitor.cpp +++ b/src/plugins/projectexplorer/nodesvisitor.cpp @@ -76,7 +76,7 @@ using namespace ProjectExplorer; Searches the first node that has the given file as its path. */ -FindNodesForFileVisitor::FindNodesForFileVisitor(const QString &fileToSearch) +FindNodesForFileVisitor::FindNodesForFileVisitor(const Utils::FileName &fileToSearch) : m_path(fileToSearch) { } @@ -93,10 +93,10 @@ void FindNodesForFileVisitor::visitProjectNode(ProjectNode *node) void FindNodesForFileVisitor::visitFolderNode(FolderNode *node) { - if (node->path().toString() == m_path) + if (node->path() == m_path) m_nodes << node; foreach (FileNode *fileNode, node->fileNodes()) { - if (fileNode->path().toString() == m_path) + if (fileNode->path() == m_path) m_nodes << fileNode; } } @@ -112,7 +112,7 @@ void FindNodesForFileVisitor::visitSessionNode(SessionNode *node) Collects file information from all sub file nodes. */ -QStringList FindAllFilesVisitor::filePaths() const +Utils::FileNameList FindAllFilesVisitor::filePaths() const { return m_filePaths; } @@ -124,7 +124,7 @@ void FindAllFilesVisitor::visitProjectNode(ProjectNode *projectNode) void FindAllFilesVisitor::visitFolderNode(FolderNode *folderNode) { - m_filePaths.append(folderNode->path().toString()); + m_filePaths.append(folderNode->path()); foreach (const FileNode *fileNode, folderNode->fileNodes()) - m_filePaths.append(fileNode->path().toString()); + m_filePaths.append(fileNode->path()); } diff --git a/src/plugins/projectexplorer/nodesvisitor.h b/src/plugins/projectexplorer/nodesvisitor.h index 565683ee4ac..570b3b4d5a2 100644 --- a/src/plugins/projectexplorer/nodesvisitor.h +++ b/src/plugins/projectexplorer/nodesvisitor.h @@ -33,6 +33,8 @@ #include "projectexplorer_export.h" +#include + #include namespace ProjectExplorer { @@ -58,7 +60,7 @@ protected: class PROJECTEXPLORER_EXPORT FindNodesForFileVisitor : public NodesVisitor { public: - FindNodesForFileVisitor(const QString &fileToSearch); + FindNodesForFileVisitor(const Utils::FileName &fileToSearch); QList nodes() const; @@ -66,18 +68,18 @@ public: void visitFolderNode(FolderNode *node); void visitSessionNode(SessionNode *node); private: - QString m_path; + Utils::FileName m_path; QList m_nodes; }; class PROJECTEXPLORER_EXPORT FindAllFilesVisitor : public NodesVisitor { public: - QStringList filePaths() const; + Utils::FileNameList filePaths() const; void visitProjectNode(ProjectNode *projectNode); void visitFolderNode(FolderNode *folderNode); private: - QStringList m_filePaths; + Utils::FileNameList m_filePaths; }; } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 0d4b91048a4..591fd04e895 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -540,7 +540,7 @@ QList SessionManager::projectOrder(Project *project) QList SessionManager::nodesForFile(const Utils::FileName &fileName) { - FindNodesForFileVisitor findNodes(fileName.toString()); + FindNodesForFileVisitor findNodes(fileName); sessionNode()->accept(&findNodes); return findNodes.nodes(); } diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 874f3b9bcc7..673a27ebe36 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -995,11 +995,11 @@ bool QmakePriFileNode::addSubProjects(const QStringList &proFilePaths) { FindAllFilesVisitor visitor; accept(&visitor); - const QStringList &allFiles = visitor.filePaths(); + const FileNameList &allFiles = visitor.filePaths(); QStringList uniqueProFilePaths; foreach (const QString &proFile, proFilePaths) - if (!allFiles.contains(proFile)) + if (!allFiles.contains(FileName::fromString(proFile))) uniqueProFilePaths.append(simplifyProFilePath(proFile)); QStringList failedFiles; @@ -1030,7 +1030,7 @@ bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAd FindAllFilesVisitor visitor; accept(&visitor); - const QStringList &allFiles = visitor.filePaths(); + const FileNameList &allFiles = visitor.filePaths(); typedef QMap TypeFileMap; // Split into lists by file type and bulk-add them. @@ -1056,13 +1056,13 @@ bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAd QStringList uniqueQrcFiles; foreach (const QString &file, qrcFiles) { - if (!allFiles.contains(file)) + if (!allFiles.contains(FileName::fromString(file))) uniqueQrcFiles.append(file); } QStringList uniqueFilePaths; foreach (const QString &file, typeFiles) { - if (!allFiles.contains(file)) + if (!allFiles.contains(FileName::fromString(file))) uniqueFilePaths.append(file); } From 9d4910f3b84735a252de5031fe556b7d2d086736 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 2 Mar 2015 10:39:24 +0100 Subject: [PATCH 02/62] Core: Fix displaying issue of read only file dialog. If there is just one column the user has no choice. In this case we want to hide all columns. The issue was introduced by 111f65b5187e2eae6e36bdb4ca64ca8ce89a63c1. Task-number: QTCREATORBUG-13171 Change-Id: Ie151b908866f80d138fd262f6c3708ef380ca908 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp index c85216ed0a3..fded4d11c86 100644 --- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp +++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp @@ -460,7 +460,7 @@ void ReadOnlyFilesDialogPrivate::initDialog(const QStringList &fileNames) ui.treeWidget->setAlternatingRowColors(true); // Do not show any options to the user if he has no choice. - if (!useSaveAs && (useVCS || !useMakeWritable)) { + if (!useSaveAs && (!useVCS || !useMakeWritable)) { ui.treeWidget->setColumnHidden(MakeWritable, true); ui.treeWidget->setColumnHidden(OpenWithVCS, true); ui.treeWidget->setColumnHidden(SaveAs, true); From 8b0a07f657246363af430beb357e4c4cd7086600 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 2 Mar 2015 13:02:15 +0100 Subject: [PATCH 03/62] Debugger: Partially revert 7b8c58b Caused problems with MinGW/Start in Terminal. Change-Id: I6b88687f2eddd4437a329bf5cf2bd0bf86044cb0 Task-number: QTCREATORBUG-14069 Reviewed-by: David Schulz Reviewed-by: Orgad Shaneh --- src/plugins/debugger/gdb/gdbengine.cpp | 3 +++ src/plugins/debugger/gdb/termgdbadapter.cpp | 22 +++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 38d800b48af..2cf348b887c 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1464,6 +1464,9 @@ void GdbEngine::handleStopResponse(const GdbMi &data) // This is gdb 7+'s initial *stopped in response to attach that // appears before the ^done is seen. notifyEngineRunAndInferiorStopOk(); + const DebuggerStartParameters &sp = startParameters(); + if (sp.useTerminal) + continueInferiorInternal(); return; } else { QTC_CHECK(false); diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp index 27d5f6bafec..a41bf432289 100644 --- a/src/plugins/debugger/gdb/termgdbadapter.cpp +++ b/src/plugins/debugger/gdb/termgdbadapter.cpp @@ -147,9 +147,8 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response) switch (response.resultClass) { case ResultDone: - if (startParameters().toolChainAbi.os() != ProjectExplorer::Abi::WindowsOS) { - showMessage(_("INFERIOR ATTACHED")); - } else { + case ResultRunning: + if (startParameters().toolChainAbi.os() == ProjectExplorer::Abi::WindowsOS) { QString errorMessage; // Resume thread that was suspended by console stub process (see stub code). const qint64 mainThreadId = m_stubProc.applicationMainThreadID(); @@ -161,21 +160,14 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response) arg(mainThreadId).arg(errorMessage), LogWarning); } - } - if (state() == EngineRunRequested) { - // We will get a '*stopped' later that we'll interpret as 'spontaneous' - // So acknowledge the current state and put a delayed 'continue' in the pipe. - notifyEngineRunAndInferiorRunOk(); - } else { - //postCommand("print 43", NoFlags, [this](const DebuggerResponse &) { continueInferiorInternal(); }); + notifyEngineRunAndInferiorStopOk(); continueInferiorInternal(); + } else { + showMessage(_("INFERIOR ATTACHED AND RUNNING")); + //notifyEngineRunAndInferiorRunOk(); + // Wait for the upcoming *stopped and handle it there. } break; - case ResultRunning: - // Has anyone seen such a result lately? - showMessage(_("INFERIOR ATTACHED AND RUNNING")); - notifyEngineRunAndInferiorRunOk(); - break; case ResultError: if (response.data["msg"].data() == "ptrace: Operation not permitted.") { showMessage(msgPtraceError(startParameters().startMode)); From 5a75b87b37a89b8ebec7b5507239204b51fe1c03 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 2 Mar 2015 14:34:06 +0100 Subject: [PATCH 04/62] OutputParser: Treat ranlib warnings as warnings Task-number: QTCREATORBUG-13111 Change-Id: Ifead2f7fa8d00eb044894b6d9ef0e7626e13f867 Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/gccparser.cpp | 30 +++++++++++++++++------ src/plugins/projectexplorer/ldparser.cpp | 15 +++++++++++- src/plugins/projectexplorer/ldparser.h | 1 + 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index c5eb12025c6..61dadc78330 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -88,7 +88,6 @@ void GccParser::stdError(const QString &line) } QRegularExpressionMatch match = m_regExpGccNames.match(lne); - if (match.hasMatch()) { QString description = lne.mid(match.capturedLength()); Task::TaskType type = Task::Error; @@ -458,12 +457,6 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString::fromLatin1("rm: cannot remove `release/moc_mainwindow.cpp': No such file or directory\n") << QList() << QString(); - QTest::newRow("ranlib false positive") - << QString::fromLatin1("ranlib: file: libSupport.a(HashTable.o) has no symbols") - << OutputParserTester::STDERR - << QString() << QString::fromLatin1("ranlib: file: libSupport.a(HashTable.o) has no symbols\n") - << QList() - << QString(); QTest::newRow("ld: missing library") << QString::fromLatin1("/usr/bin/ld: cannot find -ldoesnotexist") << OutputParserTester::STDERR @@ -866,6 +859,29 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() categoryCompile) ) << QString(); + + QTest::newRow("Mac: ranlib warning") + << QString::fromLatin1("ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols") + << OutputParserTester::STDERR + << QString() << QString() + << (QList() + << Task(Task::Warning, + QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"), + Utils::FileName(), -1, + categoryCompile) + ) + << QString(); + QTest::newRow("Mac: ranlib warning2") + << QString::fromLatin1("/path/to/XCode/and/ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols") + << OutputParserTester::STDERR + << QString() << QString() + << (QList() + << Task(Task::Warning, + QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"), + Utils::FileName(), -1, + categoryCompile) + ) + << QString(); } void ProjectExplorerPlugin::testGccOutputParsers() diff --git a/src/plugins/projectexplorer/ldparser.cpp b/src/plugins/projectexplorer/ldparser.cpp index 2786f866421..696583c47e4 100644 --- a/src/plugins/projectexplorer/ldparser.cpp +++ b/src/plugins/projectexplorer/ldparser.cpp @@ -42,11 +42,14 @@ namespace { // line no. or elf segment + offset (1 bracket) const char * const POSITION_PATTERN = "(\\d+|\\(\\..+?[+-]0x[a-fA-F0-9]+\\)):"; const char * const COMMAND_PATTERN = "^(.*[\\\\/])?([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-)?(ld|gold)(-[0-9\\.]+)?(\\.exe)?: "; + const char *const RANLIB_PATTERN = "ranlib(.exe)?: (file: (.*) has no symbols)$"; } LdParser::LdParser() { setObjectName(QLatin1String("LdParser")); + m_ranlib.setPattern(QLatin1String(RANLIB_PATTERN)); + QTC_CHECK(m_ranlib.isValid()); m_regExpLinker.setPattern(QLatin1Char('^') + QString::fromLatin1(FILE_PATTERN) + QLatin1Char('(') + QString::fromLatin1(FILE_PATTERN) + QLatin1String(")?(") + @@ -76,7 +79,17 @@ void LdParser::stdError(const QString &line) return; } - QRegularExpressionMatch match = m_regExpGccNames.match(lne); + QRegularExpressionMatch match = m_ranlib.match(lne); + if (match.hasMatch()) { + QString description = match.captured(2); + Task task(Task::Warning, description, + Utils::FileName(), -1, + Constants::TASK_CATEGORY_COMPILE); + emit addTask(task); + return; + } + + match = m_regExpGccNames.match(lne); if (match.hasMatch()) { QString description = lne.mid(match.capturedLength()); Task::TaskType type = Task::Error; diff --git a/src/plugins/projectexplorer/ldparser.h b/src/plugins/projectexplorer/ldparser.h index 4c9b66f7cf0..04471a28720 100644 --- a/src/plugins/projectexplorer/ldparser.h +++ b/src/plugins/projectexplorer/ldparser.h @@ -46,6 +46,7 @@ public: void stdError(const QString &line); private: + QRegularExpression m_ranlib; QRegularExpression m_regExpLinker; QRegularExpression m_regExpGccNames; }; From c34c588438747ea5d6f4f5b8d0b5cc07fbb3c322 Mon Sep 17 00:00:00 2001 From: Zavadovsky Yan Date: Sun, 8 Feb 2015 22:28:49 +0300 Subject: [PATCH 05/62] DeviceProcessDialog: restore last used processes filter Restore behavior which was exist in Creator 3.1.2 stable version and was broken after 3.2.0-beta1. Change-Id: I18764b3fc93f78e980176597b59500affe9c7d02 Reviewed-by: Tobias Hunger --- src/libs/utils/fancylineedit.cpp | 11 ++++++++++- src/libs/utils/fancylineedit.h | 2 +- src/libs/utils/historycompleter.cpp | 19 ++++++++++++++++++- src/libs/utils/historycompleter.h | 1 + .../devicesupport/deviceprocessesdialog.cpp | 3 ++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index d5316dfdb8f..f2b7684b5cc 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -172,6 +172,13 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) : FancyLineEdit::~FancyLineEdit() { + if (d->m_historyCompleter) { + // When dialog with FancyLineEdit widget closed by + // the QueuedConnection don't have enough time to call slot callback + // because edit widget and all of its connections are destroyed before + // QCoreApplicationPrivate::sendPostedEvents dispatch our queued signal. + d->m_historyCompleter->addEntry(text()); + } } void FancyLineEdit::setButtonVisible(Side side, bool visible) @@ -297,10 +304,12 @@ bool FancyLineEdit::hasAutoHideButton(Side side) const return d->m_iconbutton[side]->hasAutoHide(); } -void FancyLineEdit::setHistoryCompleter(const QString &historyKey) +void FancyLineEdit::setHistoryCompleter(const QString &historyKey, bool restoreLastItemFromHistory) { QTC_ASSERT(!d->m_historyCompleter, return); d->m_historyCompleter = new HistoryCompleter(historyKey, this); + if (restoreLastItemFromHistory) + setText(d->m_historyCompleter->historyItem()); QLineEdit::setCompleter(d->m_historyCompleter); // Hitting in the popup first causes editingFinished() diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h index 975da4d1765..c50adfea30a 100644 --- a/src/libs/utils/fancylineedit.h +++ b/src/libs/utils/fancylineedit.h @@ -114,7 +114,7 @@ public: // Completion // Enable a history completer with a history of entries. - void setHistoryCompleter(const QString &historyKey); + void setHistoryCompleter(const QString &historyKey, bool restoreLastItemFromHistory = false); // Sets a completer that is not a history completer. void setSpecialCompleter(QCompleter *completer); diff --git a/src/libs/utils/historycompleter.cpp b/src/libs/utils/historycompleter.cpp index d2e660861c0..4cf055ae3c4 100644 --- a/src/libs/utils/historycompleter.cpp +++ b/src/libs/utils/historycompleter.cpp @@ -59,6 +59,8 @@ public: QStringList list; QString historyKey; + bool isLastItemEmpty; + QString historyKeyIsLastItemEmpty; int maxLines; }; @@ -149,8 +151,11 @@ void HistoryCompleterPrivate::clearHistory() void HistoryCompleterPrivate::addEntry(const QString &str) { const QString entry = str.trimmed(); - if (entry.isEmpty()) + if (entry.isEmpty()) { + isLastItemEmpty = true; + theSettings->setValue(historyKeyIsLastItemEmpty, isLastItemEmpty); return; + } int removeIndex = list.indexOf(entry); beginResetModel(); if (removeIndex != -1) @@ -159,6 +164,8 @@ void HistoryCompleterPrivate::addEntry(const QString &str) list = list.mid(0, maxLines - 1); endResetModel(); theSettings->setValue(historyKey, list); + isLastItemEmpty = false; + theSettings->setValue(historyKeyIsLastItemEmpty, isLastItemEmpty); } HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent) @@ -170,6 +177,9 @@ HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent) d->historyKey = QLatin1String("CompleterHistory/") + historyKey; d->list = theSettings->value(d->historyKey).toStringList(); + d->historyKeyIsLastItemEmpty = QLatin1String("CompleterHistory/") + + historyKey + QLatin1String(".IsLastItemEmpty"); + d->isLastItemEmpty = theSettings->value(d->historyKeyIsLastItemEmpty, false).toBool(); setModel(d); setPopup(new HistoryLineView(d)); @@ -180,6 +190,13 @@ bool HistoryCompleter::removeHistoryItem(int index) return d->removeRow(index); } +QString HistoryCompleter::historyItem() const +{ + if (historySize() == 0 || d->isLastItemEmpty) + return QString(); + return d->list.at(0); +} + HistoryCompleter::~HistoryCompleter() { delete d; diff --git a/src/libs/utils/historycompleter.h b/src/libs/utils/historycompleter.h index 47dd6286ae9..641eaaec61b 100644 --- a/src/libs/utils/historycompleter.h +++ b/src/libs/utils/historycompleter.h @@ -51,6 +51,7 @@ public: static void setSettings(QSettings *settings); HistoryCompleter(const QString &historyKey, QObject *parent = 0); bool removeHistoryItem(int index); + QString historyItem() const; private: ~HistoryCompleter(); diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp index fbb01fb4c13..52abe8be2ca 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp @@ -139,7 +139,8 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, processFilterLineEdit = new FancyLineEdit(q); processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter")); processFilterLineEdit->setFocus(Qt::TabFocusReason); - processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter")); + processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"), + true /*restoreLastItemFromHistory*/); processFilterLineEdit->setFiltering(true); kitChooser->populate(); From bcfe1ab47469ad9cd2c69311252ce394a5b744a0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 2 Mar 2015 13:54:11 +0100 Subject: [PATCH 06/62] Disable re-run ability for analyzers. Our analyzers were designed with the assumption that only one of them is ever running (e.g. there is only one instance of the respective UI element for each Analyzer). Run controls, on the other hand, assume that an arbitrary number of them can run concurrently. With "re-run" enabled for an analyzer run control, these concepts clash. A quick test shows that some analyzers actually crash if you try to re-run them, but even if this were not the case, it could not work in a sensible way. Perhaps it would make sense to change the analyzer design so that they too can run concurrently, but not for 3.4, obviously. Change-Id: Ie8650eeef0261f2b697269900d5b465aad10aaf2 Reviewed-by: hjk Reviewed-by: Daniel Teske --- src/plugins/analyzerbase/analyzerruncontrol.h | 2 ++ src/plugins/projectexplorer/appoutputpane.cpp | 2 +- src/plugins/projectexplorer/runconfiguration.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/analyzerbase/analyzerruncontrol.h b/src/plugins/analyzerbase/analyzerruncontrol.h index fd6619a8692..066ea490835 100644 --- a/src/plugins/analyzerbase/analyzerruncontrol.h +++ b/src/plugins/analyzerbase/analyzerruncontrol.h @@ -105,6 +105,8 @@ signals: void starting(const Analyzer::AnalyzerRunControl *); private: + bool supportsReRunning() const { return false; } + ProjectExplorer::RunConfiguration *m_runConfig; AnalyzerStartParameters m_sp; }; diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index aa2877116a2..8af58af9a38 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -543,7 +543,7 @@ void AppOutputPane::enableButtons() void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning /* = false */) { if (rc) { - m_reRunButton->setEnabled(!isRunning); + m_reRunButton->setEnabled(!isRunning && rc->supportsReRunning()); m_reRunButton->setIcon(QIcon(rc->icon())); m_stopAction->setEnabled(isRunning); if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) { diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 67bcae61569..4d54fd40771 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -287,6 +287,7 @@ public: virtual StopResult stop() = 0; virtual bool isRunning() const = 0; virtual QString displayName() const; + virtual bool supportsReRunning() const { return true; } void setIcon(const QString &icon) { m_icon = icon; } QString icon() const { return m_icon; } From 9a798af14490dccc161219e1bf7a649db561f6ec Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 2 Mar 2015 15:57:10 +0100 Subject: [PATCH 07/62] Tests: Fix valgrind test Change-Id: I5e05575d0858ef1b8e2d5b3fb8b00b006a11c065 Reviewed-by: Orgad Shaneh --- tests/auto/valgrind/memcheck/testrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/valgrind/memcheck/testrunner.cpp b/tests/auto/valgrind/memcheck/testrunner.cpp index b0a3c3a2d62..7ce005166c3 100644 --- a/tests/auto/valgrind/memcheck/testrunner.cpp +++ b/tests/auto/valgrind/memcheck/testrunner.cpp @@ -559,7 +559,7 @@ void TestRunner::syscall() const Frame frame = stack.frames().first(); QCOMPARE(frame.functionName(), QLatin1String("main")); - QCOMPARE(frame.line(), 4 + HEADER_LENGTH); + QCOMPARE(frame.line(), 2 + HEADER_LENGTH); QCOMPARE(frame.object(), binary); QCOMPARE(frame.file(), QLatin1String("main.cpp")); From a064280ca3a5af349cbdd89719c76d7a9e36e20b Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 2 Mar 2015 16:18:27 +0100 Subject: [PATCH 08/62] JsonWizard: Allow for better compatibility with QtC 3.3 project wizards Support for a description was added in 3.4. Keep wizards without that working. Change-Id: I13b4506ea154018cac6f337196846a881439628d Reviewed-by: Tobias Hunger --- .../projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp index 19297939e8b..bca42a7f527 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp @@ -181,7 +181,7 @@ Utils::WizardPage *ProjectPageFactory::create(JsonWizard *wizard, Core::Id typeI JsonProjectPage *page = new JsonProjectPage; - QVariantMap tmp = data.toMap(); + QVariantMap tmp = data.isNull() ? QVariantMap() : data.toMap(); QString description = tmp.value(QLatin1String("trDescription")).toString(); page->setDescription(description); @@ -193,12 +193,11 @@ bool ProjectPageFactory::validateData(Core::Id typeId, const QVariant &data, QSt Q_UNUSED(errorMessage); QTC_ASSERT(canCreate(typeId), return false); - if (data.isNull() || data.type() != QVariant::Map) { + if (!data.isNull() && data.type() != QVariant::Map) { *errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", - "\"data\" must be a JSON object for \"Project\" pages."); + "\"data\" must be empty or a JSON object for \"Project\" pages."); return false; } - return true; } From 9548e7adadaa631e1dc43c6ffb60cc746afebafd Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 2 Mar 2015 15:48:37 +0100 Subject: [PATCH 09/62] Kit: Fix possible crash Fix crash in KitOptionsPage related to setting the default kit Task-number: QTCREATORBUG-14053 Change-Id: Icf10b2596afa0a3b871aca0685a6f7d3a59ab022 Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/kitmodel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp index 1e094d914ac..a968799ae5e 100644 --- a/src/plugins/projectexplorer/kitmodel.cpp +++ b/src/plugins/projectexplorer/kitmodel.cpp @@ -246,6 +246,9 @@ void KitModel::markForRemoval(Kit *k) setDefaultNode(static_cast(newDefault)); } + if (node == m_defaultNode) + setDefaultNode(findItemAtLevel(2, [node](KitNode *kn) { return kn != node; })); + removeItem(node); if (node->widget->configures(0)) delete node; @@ -353,8 +356,9 @@ void KitModel::removeKit(Kit *k) } } - if (m_defaultNode == node) - m_defaultNode = 0; + if (node == m_defaultNode) + setDefaultNode(findItemAtLevel(2, [node](KitNode *kn) { return kn != node; })); + removeItem(node); delete node; From 4ad3a9564b6cad7a391ced09d5f13397c5e8b51e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 2 Mar 2015 23:36:48 +0200 Subject: [PATCH 10/62] Dumper: Fix dumping of nameless symbols ... like blocks Change-Id: Ide53fd3758b09d996e4b7d7ebe91d50a8252cd27 Reviewed-by: hjk --- share/qtcreator/debugger/creatortypes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/creatortypes.py b/share/qtcreator/debugger/creatortypes.py index 9f57c25b433..64f31da3d58 100644 --- a/share/qtcreator/debugger/creatortypes.py +++ b/share/qtcreator/debugger/creatortypes.py @@ -31,7 +31,10 @@ from dumper import * def dumpLiteral(d, value): - d.putSimpleCharArray(value["_chars"], value["_size"]) + if d.isNull(value): + d.putValue("") + else: + d.putSimpleCharArray(value["_chars"], value["_size"]) def qdump__Core__Id(d, value): try: From 4072172dbca15005930e4991cb10234aac3fe9c5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 2 Mar 2015 15:46:04 +0100 Subject: [PATCH 11/62] Clean exported headers of the AnalzyerBase plugin. Change-Id: Ieaff277fc307a3bd0b5426dff58a6598fd46bf46 Reviewed-by: hjk --- src/plugins/analyzerbase/analyzermanager.h | 2 -- src/plugins/analyzerbase/analyzerplugin.cpp | 1 + src/plugins/analyzerbase/analyzerruncontrol.h | 6 ------ src/plugins/analyzerbase/ianalyzertool.h | 3 ++- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/analyzerbase/analyzermanager.h b/src/plugins/analyzerbase/analyzermanager.h index f8360061dd0..786589b0733 100644 --- a/src/plugins/analyzerbase/analyzermanager.h +++ b/src/plugins/analyzerbase/analyzermanager.h @@ -33,10 +33,8 @@ #define ANALYZERMANAGER_H #include "analyzerbase_global.h" -#include "analyzerconstants.h" #include -#include #include diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp index a396dc5056b..ef9b53edda4 100644 --- a/src/plugins/analyzerbase/analyzerplugin.cpp +++ b/src/plugins/analyzerbase/analyzerplugin.cpp @@ -30,6 +30,7 @@ ****************************************************************************/ #include "analyzerplugin.h" +#include "analyzerconstants.h" #include "analyzermanager.h" #include diff --git a/src/plugins/analyzerbase/analyzerruncontrol.h b/src/plugins/analyzerbase/analyzerruncontrol.h index 066ea490835..82769b0768e 100644 --- a/src/plugins/analyzerbase/analyzerruncontrol.h +++ b/src/plugins/analyzerbase/analyzerruncontrol.h @@ -35,20 +35,14 @@ #include "analyzerbase_global.h" #include -#include -#include "analyzerbase_global.h" #include "analyzerstartparameters.h" -#include -#include #include #include #include -namespace ProjectExplorer { class RunConfiguration; } - namespace Analyzer { /** diff --git a/src/plugins/analyzerbase/ianalyzertool.h b/src/plugins/analyzerbase/ianalyzertool.h index 171bb6c903c..31cec8cc712 100644 --- a/src/plugins/analyzerbase/ianalyzertool.h +++ b/src/plugins/analyzerbase/ianalyzertool.h @@ -33,7 +33,7 @@ #define IANALYZERTOOL_H #include "analyzerbase_global.h" -#include "analyzerstartparameters.h" +#include "analyzerconstants.h" #include #include @@ -47,6 +47,7 @@ namespace ProjectExplorer { class RunConfiguration; } namespace Analyzer { +class AnalyzerStartParameters; class AnalyzerRunControl; /** From 93f22419b33c931b5fa4c458c20e230d9f384d7d Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 3 Mar 2015 08:16:18 +0100 Subject: [PATCH 12/62] CdbExtension: Fix qt version lookup for builds with a libinfix. Explicitly check for "Core" in the qualified symbol name when using wildcards. Change-Id: I63c1d2cc71b20457b2ed298c5f0161ddd0bf8e1c Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/symbolgroupvalue.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index 3fb27917e72..b08eacd1f66 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -666,11 +666,23 @@ const QtInfo &QtInfo::get(const SymbolGroupValueContext &ctx) modulePattern != total; ++modulePattern) { const std::string pattern = *modulePattern + qstrdupSymbol; const StringList &allMatches = SymbolGroupValue::resolveSymbolName(pattern.c_str(), ctx); - const StringListConstIt match = *modulePattern == "*" ? allMatches.begin() + const bool wildcardPattern = *modulePattern == "*"; + const StringListConstIt match = wildcardPattern + ? std::find_if(allMatches.begin(), allMatches.end(), SubStringPredicate("Core")) : std::find_if(allMatches.begin(), allMatches.end(), SubStringPredicate(modulePattern->c_str())); - if (match == allMatches.end()) + + if (match != allMatches.end()) { + qualifiedSymbol = *match; + } else if (wildcardPattern && !allMatches.empty()) { + // Use the first qstrdup symbol if there is no Core in all available qstrdup symbols + // This is useful when qt is statically linked. + qualifiedSymbol = *allMatches.begin(); + } else { + // If we haven't found a match and this isn't the wildcard pattern we continue + // we could still find a dynamic qt library with a libinfix continue; - qualifiedSymbol = *match; + } + exclPos = qualifiedSymbol.find('!'); // Resolved: 'QtCored4!qstrdup' libPos = qualifiedSymbol.find("Core"); if (exclPos != std::string::npos && libPos != std::string::npos) From 9abfd712aa36b9f723aae07399a7185a43c37263 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 08:32:05 +0100 Subject: [PATCH 13/62] Debugger: Fix dumper reloading Was broken after making the handler functions members. Change-Id: If14cbad777323d48000641fb38a01eb59503d297 Reviewed-by: Orgad Shaneh --- share/qtcreator/debugger/dumper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 49d0b7537ef..97c689b39b5 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1713,7 +1713,7 @@ class DumperBase: result += ']' return result - def reloadDumper(self): + def reloadDumper(self, args): for mod in self.dumpermodules: m = sys.modules[mod] if sys.version_info[0] >= 3: @@ -1721,7 +1721,7 @@ class DumperBase: else: reload(m) - setupDumper() + self.setupDumper(args) def addDumperModule(self, args): path = args['path'] From 706d78b58d6744bcc59b577e92ab027479a83783 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 3 Mar 2015 08:17:21 +0100 Subject: [PATCH 14/62] BinEditor: Complain about missing file, not empty size When trying to open a non-existing file with the binary editor, it would complain that it couldn't empty files, instead of complaining that the file does not exist. Change-Id: I50fc8afb8c59cad211ee68356020a81891708097 Task-number: QTCREATORBUG-14078 Reviewed-by: Christian Stenger --- src/plugins/bineditor/bineditorplugin.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp index a47ddf9e921..586bb58e52b 100644 --- a/src/plugins/bineditor/bineditorplugin.cpp +++ b/src/plugins/bineditor/bineditorplugin.cpp @@ -267,19 +267,19 @@ public: bool open(QString *errorString, const QString &fileName, quint64 offset = 0) { QFile file(fileName); - quint64 size = static_cast(file.size()); - if (size == 0 && !fileName.isEmpty()) { - QString msg = tr("The Binary Editor cannot open empty files."); - if (errorString) - *errorString = msg; - else - QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg); - return false; - } - if (offset >= size) - return false; if (file.open(QIODevice::ReadOnly)) { file.close(); + quint64 size = static_cast(file.size()); + if (size == 0) { + QString msg = tr("The Binary Editor cannot open empty files."); + if (errorString) + *errorString = msg; + else + QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg); + return false; + } + if (offset >= size) + return false; setFilePath(FileName::fromString(fileName)); m_widget->setSizes(offset, file.size()); return true; From 0efef6e3cd3bb9b65d6c9f05a1cc8f761d888bd3 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 26 Feb 2015 17:53:00 +0100 Subject: [PATCH 15/62] Add changes file for 3.4 Change-Id: I1f56e6ad05b9bed7642b2a5827c27c824dec0aba Reviewed-by: Orgad Shaneh Reviewed-by: Leena Miettinen --- dist/changes-3.4.0 | 165 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 dist/changes-3.4.0 diff --git a/dist/changes-3.4.0 b/dist/changes-3.4.0 new file mode 100644 index 00000000000..d69578639bc --- /dev/null +++ b/dist/changes-3.4.0 @@ -0,0 +1,165 @@ +Qt Creator version 3.4 contains bug fixes and new features. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + +git clone git://gitorious.org/qt-creator/qt-creator.git +git log --cherry-pick --pretty=oneline origin/3.3..origin/3.4 + +General + * Added option to change environment for running external tools (QTCREATORBUG-4995) + * Improved performance of output panes + * Fixed that wizard windows were missing in Window menu (QTCREATORBUG-13766) + +Editing + * Switched to a QMimeDatabase based MIME database implementation + * Added hint in empty editor area + * Added "Copy Path and Line Number" to context menu of document selector + * Added parenthesis highlighting to generic highlighter + * Fixed that files with same file name but different path were not distinguishable + in document selector and open documents pane (QTCREATORBUG-10185) + * Fixed that symlinks and their target could be opened at the same time (QTCREATORBUG-5941) + * Fixed that wrong highlight definition was downloaded when sorting the list in the settings + +Help + * Fixed clean up of automatically registered documentation + +QMake Projects + * Added handling of QMAKE_CXXFLAGS_(APP|SHLIB|PLUGIN) variables + * Added option to put debug information in separate file (QTCREATORBUG-14009) + * Fixed ANSI color support for application output (QTCREATORBUG-13764) + * Fixed handling of DEFINES with escaped characters + +CMake Projects + * Fixed that static libraries were deployed + * Fixed finding source directory for build directory + +Qbs Projects + * Added option to show full command lines during build + +QML-Only Projects (.qmlproject) + * Disabled plugin by default + +Debugging + * LLDB + * Fixed debugging of console applications (QTCREATORBUG-13803) + +Analyzer + * Added Valgrind Memory Analyzer with GDB + +QML Profiler + * Made it possible to search through event notes (QTCREATORBUG-13417) + +C++ Support + * Added support for binary literals (n3472) + * Added locator filter for all included files (QTCREATORBUG-280) + * Added refactoring action that moves all function definitions out of a class declaration + * Added support for signal and slot completion in Qt 5 style connects + * Improved support for non-Qt projects that use Qt keywords + * Made auto-completion delay configurable (QTCREATORBUG-13393) + * Fixed auto-indentation for break in switch statement (QTCREATORBUG-13155) + * Fixed issues with case-insensitive file systems (QTCREATORBUG-12390) + * Fixed completion for enums inside member functions (QTCREATORBUG-13757) + * Fixed crash on closing one of multiple outline views (QTCREATORBUG-13614) + * Fixed that Move Definition to Class refactoring action was not available when using "override" + (QTCREATORBUG-13564) + * Fixed that Assign to Local Variable refactoring action was not working with chained + function calls (QTCREATORBUG-10355) + * Fixed several issues with completion and iterators (QTCREATORBUG-13799) + +QML Support + * Fixed crash on closing one of multiple outline views (QTCREATORBUG-13614) + +Version Control Systems + * Git + * Added support for "git stash --keep-index" (QTCREATORBUG-13587) + * Gerrit + * Fixed that it was not possible to abort query and fetch (QTCREATORBUG-9743) + * Fixed that not all remotes where shown in Push to Gerrit dialog (QTCREATORBUG-13718) + * Subversion + * Added option to show verbose log + * Changed to use the new unified diff viewer + * Fixed that committing failed when using non-Latin1 characters in commit message + (QTCREATORBUG-13979) + * Perforce + * Improved repository log (QTCREATORBUG-13526) + +FakeVim + * Fixed target column for various commands + * Fixed behavior of "D" in visual block mode + * Fixed cursor shape after failing search + * Fixed issues with pasting in presence of splits (QTCREATORBUG-13481) + +Platform Specific + +Windows + +OS X + +Android + * Added support for 64bit tool chains + * Fixed that active run configuration setting was ignored for deploying application + (QTCREATORBUG-13732) + +Remote Linux + * Added optional host key checking (QTCREATORBUG-13339) + * Added automatic closing of SSH connections after a period of inactivity + * Added support for SHA-256 HMAC for SSH + * Fixed that it was not possible to quote run arguments (QTCREATORBUG-14002) + +BareMetal + * Added GDB server configuration management (QTCREATORBUG-13686) + * Added support for remote channel without port + * Added support for generic projects + +Credits for these changes go to: +Adam Strzelecki +Alessandro Portale +André Hartmann +André Pönitz +BogDan Vatra +Christian Kandeler +Christian Stenger +Cristian Adam +Daniel Teske +David Schulz +Denis Shienkov +Eike Ziller +Erik Verbruggen +Fawzi Mohamed +Francois Ferrand +Friedemann Kleint +Hugues Delorme +Jake Petroules +Jarek Kobus +Jörg Bornemann +Kai Köhne +Leena Miettinen +lemelisk +Libor Tomsik +Lorenz Haas +Lukas Holecek +Maksim Klimov +Marco Bubke +Mitch Curtis +Montel Laurent +Nikita Baryshnikov +Nikolai Kosjar +Orgad Shaneh +Oswald Buddenhagen +Przemyslaw Gorszkowski +Robert Löhning +Sune Vuorela +Takumi Asaki +Tasuku Suzuki +Thiago Macieira +Thomas Hartmann +Tim Jenssen +Tim Sander +Tobias Hunger +Tom Deblauwe +Toralf Lund +Ulf Hermann +Volker Vogelhuber +Yuchen Deng From 3af3fe7ad3e312a2923dfd18a8d527fccf5970f3 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 2 Mar 2015 14:06:12 +0100 Subject: [PATCH 16/62] Replace old qt-project.org wiki with wiki.qt.io Change-Id: Ie7518d57b62e3f0b9dc6c559fe4a8f5b0212bb43 Reviewed-by: Leena Miettinen --- README | 6 +++--- dist/appdata.xml | 2 +- doc/api/qtcreator-documentation.qdoc | 2 +- doc/src/debugger/creator-debugger-setup.qdoc | 2 +- doc/src/howto/qtcreator-faq.qdoc | 2 +- doc/src/overview/creator-tech-support.qdoc | 2 +- doc/src/qnx/creator-deployment-bb10.qdoc | 4 ++-- doc/src/qnx/creator-developing-bb10.qdoc | 2 +- src/plugins/debugger/debuggeroptionspage.cpp | 2 +- src/plugins/qnx/blackberryruncontrolfactory.cpp | 2 +- src/plugins/qnx/qnxconstants.h | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README b/README index 9da0707989f..74655f93c18 100644 --- a/README +++ b/README @@ -43,7 +43,7 @@ versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to compile Qt yourself, you can use one of the versions of Qt shipped with the Qt SDK (release builds of Qt using MinGW and Visual C++ 2010 or later). For detailed information on the supported compilers, see -http://qt-project.org/wiki/Building_Qt_5_from_Git . +http://wiki.qt.io/Building_Qt_5_from_Git . 1. Decide which compiler to use: MinGW or Microsoft Visual Studio. If you plan to contribute to Qt Creator, you should compile your changes with @@ -75,7 +75,7 @@ http://qt-project.org/wiki/Building_Qt_5_from_Git . directory. 7. Install a compiler: - - For a MinGW toolchain for Qt, see http://qt-project.org/wiki/MinGW . + - For a MinGW toolchain for Qt, see http://wiki.qt.io/MinGW . - For Microsoft Visual C++, install the Windows SDK and the "Debugging Tools for Windows" from the SDK image. We strongly recommend using the @@ -122,7 +122,7 @@ http://qt-project.org/wiki/Building_Qt_5_from_Git . You have to remove it from the path. 10. You are now ready to configure and build Qt and Qt Creator. - Please see http://qt-project.org/wiki/Building_Qt_5_from_Git for + Please see http://wiki.qt.io/Building_Qt_5_from_Git for recommended configure-options for Qt 5. To use MinGW, open the the shell prompt and enter: diff --git a/dist/appdata.xml b/dist/appdata.xml index 017bbf9445d..685eba7aa73 100644 --- a/dist/appdata.xml +++ b/dist/appdata.xml @@ -23,6 +23,6 @@ http://qt-project.org/uploads/image_upload/qtcreator-edit-mode.png - https://qt-project.org/wiki/Category:Tools::QtCreator + https://wiki.qt.io/Category:Tools::QtCreator Qt diff --git a/doc/api/qtcreator-documentation.qdoc b/doc/api/qtcreator-documentation.qdoc index 8c7bbd52bde..0d9fc3d3937 100644 --- a/doc/api/qtcreator-documentation.qdoc +++ b/doc/api/qtcreator-documentation.qdoc @@ -131,7 +131,7 @@ \section1 Writing Text Follow the guidelines for - \l{http://qt-project.org/wiki/Writing_Qt_Documentation} + \l{http://wiki.qt.io/Writing_Qt_Documentation} {writing Qt documentation}. The documentation must be grammatically correct English and use the standard diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc index cbb8d3db466..3ea650a4d80 100644 --- a/doc/src/debugger/creator-debugger-setup.qdoc +++ b/doc/src/debugger/creator-debugger-setup.qdoc @@ -181,7 +181,7 @@ versions of MinGW. On most Linux distributions the GDB builds shipped with the system are sufficient. You can also build your own. Follow the instructions in - \l{http://qt-project.org/wiki/QtCreatorBuildGdb} + \l{http://wiki.qt.io/QtCreator_Build_Gdb} {Building GDB}. Builds of GDB shipped with Xcode on OS X are no longer supported. diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc index ab99288517d..7451082423e 100644 --- a/doc/src/howto/qtcreator-faq.qdoc +++ b/doc/src/howto/qtcreator-faq.qdoc @@ -191,7 +191,7 @@ installed when you install \QC and \QSDK. On OS X, GDB is no longer officially supported. To build your own Python-enabled GDB, follow the instructions in - \l{http://qt-project.org/wiki/QtCreatorBuildGdb}{Building GDB}. + \l{http://wiki.qt.io/QtCreator_Build_Gdb}{Building GDB}. You must use Python version 2.6 or 2.7. diff --git a/doc/src/overview/creator-tech-support.qdoc b/doc/src/overview/creator-tech-support.qdoc index b862606cbd9..ed040f578f2 100644 --- a/doc/src/overview/creator-tech-support.qdoc +++ b/doc/src/overview/creator-tech-support.qdoc @@ -41,7 +41,7 @@ \row \li Learn more about Qt - \li \l{http://qt-project.org/wiki/developer-guides} + \li \l{http://wiki.qt.io/developer_guides} {Qt Developer Guides} \row diff --git a/doc/src/qnx/creator-deployment-bb10.qdoc b/doc/src/qnx/creator-deployment-bb10.qdoc index a99fdd1ca65..224aa40ec49 100644 --- a/doc/src/qnx/creator-deployment-bb10.qdoc +++ b/doc/src/qnx/creator-deployment-bb10.qdoc @@ -84,7 +84,7 @@ filter, so you need to set this filter in the top-right corner of the \uicontrol {New} dialog to enable those templates. - \note Currently, the BlackBerry 10 devices and Simulator have Qt 4.8 libraries preinstalled. To use Qt 5 features, you must compile the Qt libraries for BlackBerry 10 yourself. For more information, see \l {http://qt-project.org/wiki/Building-Qt5-for-Blackberry}{http://qt-p roject.org/wiki/Building-Qt5-for-Blackberry}. + \note Currently, the BlackBerry 10 devices and Simulator have Qt 4.8 libraries preinstalled. To use Qt 5 features, you must compile the Qt libraries for BlackBerry 10 yourself. For more information, see \l {http://wiki.qt.io/Building_Qt5_for_Blackberry}{Building Qt5 for BlackBerry}. - For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}. + For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}. */ diff --git a/doc/src/qnx/creator-developing-bb10.qdoc b/doc/src/qnx/creator-developing-bb10.qdoc index 54274f6ac95..d7b347d2472 100644 --- a/doc/src/qnx/creator-developing-bb10.qdoc +++ b/doc/src/qnx/creator-developing-bb10.qdoc @@ -120,5 +120,5 @@ \include qnx/creator-key-management-qnx.qdocinc - For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}. + For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}. */ diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp index d0b04a9b32c..b904cf50dc3 100644 --- a/src/plugins/debugger/debuggeroptionspage.cpp +++ b/src/plugins/debugger/debuggeroptionspage.cpp @@ -55,7 +55,7 @@ using namespace Utils; namespace Debugger { namespace Internal { -static const char debuggingToolsWikiLinkC[] = "http://qt-project.org/wiki/Qt_Creator_Windows_Debugging"; +static const char debuggingToolsWikiLinkC[] = "http://wiki.qt.io/Qt_Creator_Windows_Debugging"; // ----------------------------------------------------------------------- // DebuggerItemConfigWidget diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp index 84008ddd496..0a721d3c619 100644 --- a/src/plugins/qnx/blackberryruncontrolfactory.cpp +++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp @@ -139,7 +139,7 @@ ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer if (qtVer && qtVer->qtVersion() <= QtSupport::QtVersionNumber(4, 8, 6)) Core::MessageManager::write(tr("Target Qt version (%1) might not support QML profiling. " "Cascades applications are not affected and should work as expected. " - "For more info see http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10") + "For more info see http://wiki.qt.io/Qt_Creator_with_BlackBerry_10") .arg(qtVer->qtVersionString()), Core::MessageManager::Flash ); diff --git a/src/plugins/qnx/qnxconstants.h b/src/plugins/qnx/qnxconstants.h index 742091f9c77..d448808be3e 100644 --- a/src/plugins/qnx/qnxconstants.h +++ b/src/plugins/qnx/qnxconstants.h @@ -128,7 +128,7 @@ const char QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH[] = "/accounts/devuser/"; const char QNX_OK_ICON[] = ":/qnx/images/ok.png"; -const char QNX_BLACKBERRY_SETUP_URL[] = "http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10"; +const char QNX_BLACKBERRY_SETUP_URL[] = "http://wiki.qt.io/Qt_Creator_with_BlackBerry_10"; const char QNX_LEGACY_KEYS_URL[] = "https://developer.blackberry.com/native/documentation/core" "/com.qnx.doc.ide.userguide/topic/signing_and_publishing.html"; const char QNX_REGISTER_KEYS_URL[] = "https://www.blackberry.com/SignedKeys/codesigning.html"; From 49fa8afcb9dfb3800490b2e7e127dba7a72cf39a Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 24 Feb 2015 18:51:28 +0100 Subject: [PATCH 17/62] Debugger: Move some tooltip model code out of treeview Closer to the usual pattern. Change-Id: Iee0f095a59755424bd2e494aaa89215669d02972 Reviewed-by: Christian Stenger --- .../debugger/debuggertooltipmanager.cpp | 293 +++++++++--------- 1 file changed, 138 insertions(+), 155 deletions(-) diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp index 2a51e29c7a4..e7d82050e60 100644 --- a/src/plugins/debugger/debuggertooltipmanager.cpp +++ b/src/plugins/debugger/debuggertooltipmanager.cpp @@ -204,6 +204,7 @@ public: QString name; QString value; QString type; + QString expression; QColor color; bool expandable; QByteArray iname; @@ -217,6 +218,7 @@ ToolTipWatchItem::ToolTipWatchItem(WatchItem *item) iname = item->d.iname; color = item->color(); expandable = item->d.hasChildren; + expression = item->expression(); foreach (TreeItem *child, item->children()) appendChild(new ToolTipWatchItem(static_cast(child))); } @@ -366,136 +368,35 @@ void ToolTipModel::restoreTreeModel(QXmlStreamReader &r) class DebuggerToolTipTreeView : public QTreeView { public: - explicit DebuggerToolTipTreeView(QWidget *parent = 0); + explicit DebuggerToolTipTreeView(QWidget *parent) + : QTreeView(parent) + { + setHeaderHidden(true); + setEditTriggers(NoEditTriggers); + setUniformRowHeights(true); + setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + } QSize sizeHint() const { return m_size; } - void computeSize(); - - void setEngine(DebuggerEngine *engine); -private: - int computeHeight(const QModelIndex &index) const; - - WatchHandler *watchHandler() const + int sizeHintForColumn(int column) const { - return m_model.m_engine->watchHandler(); + return QTreeView::sizeHintForColumn(column); + } + + int computeHeight(const QModelIndex &index) const + { + int s = rowHeight(index); + const int rowCount = model()->rowCount(index); + for (int i = 0; i < rowCount; ++i) + s += computeHeight(model()->index(i, 0, index)); + return s; } QSize m_size; - -public: - ToolTipModel m_model; - void reexpand(const QModelIndex &idx); }; -DebuggerToolTipTreeView::DebuggerToolTipTreeView(QWidget *parent) - : QTreeView(parent) -{ - setHeaderHidden(true); - setEditTriggers(NoEditTriggers); - - setUniformRowHeights(true); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - - setModel(&m_model); - - connect(this, &QTreeView::collapsed, this, &DebuggerToolTipTreeView::computeSize, - Qt::QueuedConnection); - connect(this, &QTreeView::expanded, this, &DebuggerToolTipTreeView::computeSize, - Qt::QueuedConnection); - - connect(this, &QTreeView::expanded, &m_model, &ToolTipModel::expandNode); - connect(this, &QTreeView::collapsed, &m_model, &ToolTipModel::collapseNode); -} - -void DebuggerToolTipTreeView::setEngine(DebuggerEngine *engine) -{ - m_model.m_engine = engine; -} - -int DebuggerToolTipTreeView::computeHeight(const QModelIndex &index) const -{ - int s = rowHeight(index); - const int rowCount = model()->rowCount(index); - for (int i = 0; i < rowCount; ++i) - s += computeHeight(model()->index(i, 0, index)); - return s; -} - -void DebuggerToolTipTreeView::reexpand(const QModelIndex &idx) -{ - TreeItem *item = m_model.itemFromIndex(idx); - QTC_ASSERT(item, return); - QByteArray iname = item->data(0, LocalsINameRole).toByteArray(); - bool shouldExpand = m_model.m_expandedINames.contains(iname); - if (shouldExpand) { - if (!isExpanded(idx)) { - expand(idx); - for (int i = 0, n = model()->rowCount(idx); i != n; ++i) { - QModelIndex idx1 = model()->index(i, 0, idx); - reexpand(idx1); - } - } - } else { - if (isExpanded(idx)) - collapse(idx); - } -} - -void DebuggerToolTipTreeView::computeSize() -{ - int columns = 30; // Decoration - int rows = 0; - bool rootDecorated = false; - - if (QAbstractItemModel *m = model()) { - reexpand(m->index(0, 0)); - const int columnCount = m->columnCount(); - rootDecorated = m->rowCount() > 0; - if (rootDecorated) { - for (int i = 0; i < columnCount; ++i) { - resizeColumnToContents(i); - columns += sizeHintForColumn(i); - } - } - if (columns < 100) - columns = 100; // Prevent toolbar from shrinking when displaying 'Previous' - rows += computeHeight(QModelIndex()); - - // Fit tooltip to screen, showing/hiding scrollbars as needed. - // Add a bit of space to account for tooltip border, and not - // touch the border of the screen. - QPoint pos(x(), y()); - QTC_ASSERT(QApplication::desktop(), return); - QRect desktopRect = QApplication::desktop()->availableGeometry(pos); - const int maxWidth = desktopRect.right() - pos.x() - 5 - 5; - const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5; - - if (columns > maxWidth) - rows += horizontalScrollBar()->height(); - - if (rows > maxHeight) { - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - rows = maxHeight; - columns += verticalScrollBar()->width(); - } else { - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - } - - if (columns > maxWidth) { - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - columns = maxWidth; - } else { - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - } - } - - m_size = QSize(columns + 5, rows + 5); - setMinimumSize(m_size); - setMaximumSize(m_size); - setRootIsDecorated(rootDecorated); -} ///////////////////////////////////////////////////////////////////////// // @@ -508,10 +409,7 @@ class DebuggerToolTipWidget : public QWidget public: DebuggerToolTipWidget(); - ~DebuggerToolTipWidget() - { - DEBUG("DESTROY DEBUGGERTOOLTIP WIDGET"); - } + ~DebuggerToolTipWidget() { DEBUG("DESTROY DEBUGGERTOOLTIP WIDGET"); } void closeEvent(QCloseEvent *) { @@ -548,11 +446,54 @@ public: titleLabel->active = true; // User can now drag } + void computeSize(); + + void setContents(ToolTipWatchItem *item) + { + titleLabel->setText(item->expression); + //treeView->setEnabled(true); + model.m_enabled = true; + if (item) { + model.rootItem()->removeChildren(); + model.rootItem()->appendChild(item); + } + reexpand(QModelIndex()); + computeSize(); + } + + WatchHandler *watchHandler() const + { + return model.m_engine->watchHandler(); + } + + void setEngine(DebuggerEngine *engine) { model.m_engine = engine; } + + void reexpand(const QModelIndex &idx) + { + TreeItem *item = model.itemFromIndex(idx); + QTC_ASSERT(item, return); + QByteArray iname = item->data(0, LocalsINameRole).toByteArray(); + bool shouldExpand = model.m_expandedINames.contains(iname); + if (shouldExpand) { + if (!treeView->isExpanded(idx)) { + treeView->expand(idx); + for (int i = 0, n = model.rowCount(idx); i != n; ++i) { + QModelIndex idx1 = model.index(i, 0, idx); + reexpand(idx1); + } + } + } else { + if (treeView->isExpanded(idx)) + treeView->collapse(idx); + } + } + public: bool isPinned; QToolButton *pinButton; DraggableLabel *titleLabel; DebuggerToolTipTreeView *treeView; + ToolTipModel model; }; DebuggerToolTipWidget::DebuggerToolTipWidget() @@ -584,6 +525,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget() treeView = new DebuggerToolTipTreeView(this); treeView->setFocusPolicy(Qt::NoFocus); + treeView->setModel(&model); auto mainLayout = new QVBoxLayout(this); mainLayout->setSizeConstraint(QLayout::SetFixedSize); @@ -594,7 +536,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget() connect(copyButton, &QAbstractButton::clicked, [this] { QString text; QTextStream str(&text); - treeView->m_model.rootItem()->walkTree([&str](TreeItem *item) { + model.rootItem()->walkTree([&str](TreeItem *item) { auto titem = static_cast(item); str << QString(item->level(), QLatin1Char('\t')) << titem->name << '\t' << titem->value << '\t' << titem->type << '\n'; @@ -603,9 +545,69 @@ DebuggerToolTipWidget::DebuggerToolTipWidget() clipboard->setText(text, QClipboard::Selection); clipboard->setText(text, QClipboard::Clipboard); }); + + connect(treeView, &QTreeView::expanded, &model, &ToolTipModel::expandNode); + connect(treeView, &QTreeView::collapsed, &model, &ToolTipModel::collapseNode); + + connect(treeView, &QTreeView::collapsed, this, &DebuggerToolTipWidget::computeSize, + Qt::QueuedConnection); + connect(treeView, &QTreeView::expanded, this, &DebuggerToolTipWidget::computeSize, + Qt::QueuedConnection); DEBUG("CREATE DEBUGGERTOOLTIP WIDGET"); } +void DebuggerToolTipWidget::computeSize() +{ + int columns = 30; // Decoration + int rows = 0; + bool rootDecorated = false; + + reexpand(model.index(0, 0, QModelIndex())); + const int columnCount = model.columnCount(QModelIndex()); + rootDecorated = model.rowCount() > 0; + if (rootDecorated) { + for (int i = 0; i < columnCount; ++i) { + treeView->resizeColumnToContents(i); + columns += treeView->sizeHintForColumn(i); + } + } + if (columns < 100) + columns = 100; // Prevent toolbar from shrinking when displaying 'Previous' + rows += treeView->computeHeight(QModelIndex()); + + // Fit tooltip to screen, showing/hiding scrollbars as needed. + // Add a bit of space to account for tooltip border, and not + // touch the border of the screen. + QPoint pos(x(), y()); + QTC_ASSERT(QApplication::desktop(), return); + QRect desktopRect = QApplication::desktop()->availableGeometry(pos); + const int maxWidth = desktopRect.right() - pos.x() - 5 - 5; + const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5; + + if (columns > maxWidth) + rows += treeView->horizontalScrollBar()->height(); + + if (rows > maxHeight) { + treeView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + rows = maxHeight; + columns += treeView->verticalScrollBar()->width(); + } else { + treeView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + } + + if (columns > maxWidth) { + treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + columns = maxWidth; + } else { + treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + } + + treeView->m_size = QSize(columns + 5, rows + 5); + treeView->setMinimumSize(treeView->m_size); + treeView->setMaximumSize(treeView->m_size); + treeView->setRootIsDecorated(rootDecorated); +} + ///////////////////////////////////////////////////////////////////////// // @@ -645,7 +647,6 @@ public: QPointer widget; QDate creationDate; DebuggerToolTipContext context; - DebuggerTooltipState state; }; @@ -788,7 +789,7 @@ DebuggerToolTipHolder::~DebuggerToolTipHolder() void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine) { - widget->treeView->setEngine(engine); + widget->setEngine(engine); if (!engine) { setState(Released); @@ -796,6 +797,7 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine) } StackFrame frame = engine->stackHandler()->currentFrame(); + WatchItem *item = engine->watchHandler()->findItem(context.iname); // FIXME: The engine should decide on whether it likes // the context. @@ -806,14 +808,15 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine) << "SHOW NEEDED: " << widget->isPinned << "SAME FRAME: " << sameFrame); - if (state == PendingUnshown) { ToolTip::show(context.mousePosition, widget, Internal::mainWindow()); setState(PendingShown); } - if (sameFrame) { - acquireEngine(engine); + if (item && sameFrame) { + setState(Acquired); + DEBUG("ACQUIRE ENGINE: STATE " << state); + widget->setContents(new ToolTipWatchItem(item)); } else { releaseEngine(); } @@ -848,26 +851,6 @@ void DebuggerToolTipHolder::destroy() } } -void DebuggerToolTipHolder::acquireEngine(DebuggerEngine *engine) -{ - DEBUG("ACQUIRE ENGINE: STATE " << state); - setState(Acquired); - - QTC_ASSERT(widget, return); - widget->titleLabel->setText(context.expression); - //widget->treeView->setEnabled(true); - widget->treeView->m_model.m_enabled = true; - - WatchItem *item = engine->watchHandler()->findItem(context.iname); - if (item) { - auto clone = new ToolTipWatchItem(item); - widget->treeView->m_model.rootItem()->removeChildren(); - widget->treeView->m_model.rootItem()->appendChild(clone); - } - WatchTreeView::reexpand(widget->treeView, QModelIndex()); - widget->treeView->computeSize(); -} - void DebuggerToolTipHolder::releaseEngine() { if (state == Released) @@ -876,8 +859,8 @@ void DebuggerToolTipHolder::releaseEngine() setState(Released); QTC_ASSERT(widget, return); - widget->treeView->m_model.m_enabled = false; - widget->treeView->m_model.layoutChanged(); + widget->model.m_enabled = false; + widget->model.layoutChanged(); widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Previous)").arg(context.expression)); // widget->treeView->setEnabled(false); } @@ -963,7 +946,7 @@ void DebuggerToolTipHolder::saveSessionData(QXmlStreamWriter &w) const w.writeAttributes(attributes); w.writeStartElement(QLatin1String(treeElementC)); - widget->treeView->m_model.rootItem()->walkTree([&w](TreeItem *item) { + widget->model.rootItem()->walkTree([&w](TreeItem *item) { const QString modelItemElement = QLatin1String(modelItemElementC); for (int i = 0; i < 3; ++i) { const QString value = item->data(i, Qt::DisplayRole).toString(); @@ -1126,7 +1109,7 @@ void DebuggerToolTipManager::loadSessionData() if (readTree) { DebuggerToolTipHolder *tw = findOrCreateTooltip(context); - tw->widget->treeView->m_model.restoreTreeModel(r); + tw->widget->model.restoreTreeModel(r); tw->widget->pin(); tw->widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Restored)").arg(context.expression)); tw->widget->treeView->expandAll(); From 518a44a780b85f44b831a0ad1b338688081eea61 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 10:01:50 +0100 Subject: [PATCH 18/62] Debugger: Remove some soft asserts They can legitimately appear in regular use right now. Task-number: QTCREATORBUG-13938 Change-Id: Id7097c82866375060545db6ddbbecbf1fbf5da6d Reviewed-by: Christian Stenger --- src/plugins/debugger/watchhandler.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 7a5910bcf37..322c7b7c783 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -621,7 +621,9 @@ bool WatchItem::canFetchMore() const void WatchItem::fetchMore() { - QTC_ASSERT(!fetchTriggered, return); + if (fetchTriggered) + return; + watchModel()->m_expandedINames.insert(d.iname); fetchTriggered = true; if (children().isEmpty()) { @@ -1246,9 +1248,15 @@ void WatchModel::insertItem(WatchItem *item) void WatchModel::reexpandItems() { foreach (const QByteArray &iname, m_expandedINames) { - WatchItem *item = findItem(iname); - emit itemIsExpanded(indexFromItem(item)); - emit inameIsExpanded(iname); + if (WatchItem *item = findItem(iname)) { + emit itemIsExpanded(indexFromItem(item)); + emit inameIsExpanded(iname); + } else { + // Can happen. We might have stepped into another frame + // not containing that iname, but we still like to + // remember the expanded state of iname in case we step + // out of the frame again. + } } } From bdbe119dbe41e06eb1ad0ebb86168c66f2896472 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 3 Mar 2015 11:19:24 +0100 Subject: [PATCH 19/62] Git: Remove unnecessary destructor Change-Id: Ib4041924e1544d1ec2c5837c62c23554c6be0e91 Reviewed-by: Tobias Hunger --- src/plugins/git/gitclient.cpp | 4 ---- src/plugins/git/gitclient.h | 1 - 2 files changed, 5 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 7e73de3a677..54495670598 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -672,10 +672,6 @@ GitClient::GitClient(GitSettings *settings) : .arg(QCoreApplication::applicationPid()); } -GitClient::~GitClient() -{ -} - QString GitClient::findRepositoryForDirectory(const QString &dir) const { if (dir.isEmpty() || dir.endsWith(QLatin1String("/.git")) diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 6fdbe1d937c..6cb337fe61c 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -136,7 +136,6 @@ public: static const char *stashNamePrefix; explicit GitClient(GitSettings *settings); - ~GitClient(); Utils::FileName gitExecutable(bool *ok = 0, QString *errorMessage = 0) const; unsigned gitVersion(QString *errorMessage = 0) const; From fb785895f230d5effcf5728bcf95565fc5ef962b Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 27 Feb 2015 16:53:48 +0100 Subject: [PATCH 20/62] Debugger: Make LldbEngine stack handling more similar to GdbEngine This also addresses the remaining issues of QTCREATORBUG-13803. Task-number: QTCREATORBUG-13803 Change-Id: Iceb123279236d98961d15fe7421acc7c10d1b1c7 Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- share/qtcreator/debugger/lldbbridge.py | 20 +------------ src/plugins/debugger/lldb/lldbengine.cpp | 37 +++++------------------- src/plugins/debugger/lldb/lldbengine.h | 4 --- 3 files changed, 8 insertions(+), 53 deletions(-) diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 71b5ddec0a6..79be2fcfc6c 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -893,20 +893,6 @@ class Dumper(DumperBase): if "continuation" in args: self.report('continuation=\"%s\"' % args["continuation"]) - def reportStackPosition(self): - thread = self.currentThread() - if not thread: - self.report('msg="No thread"') - return - frame = thread.GetSelectedFrame() - if frame: - self.report('stack-position={id="%s"}' % frame.GetFrameID()) - else: - self.report('stack-position={id="-1"}') - - def reportStackTop(self): - self.report('stack-top={}') - def extractBlob(self, base, size): if size == 0: return Blob("") @@ -1220,7 +1206,6 @@ class Dumper(DumperBase): else: state = self.process.GetState() if state == lldb.eStateStopped: - self.reportStackPosition() self.reportThreads() self.reportVariables() @@ -1340,7 +1325,6 @@ class Dumper(DumperBase): stoppedThread = self.firstStoppedThread() if stoppedThread: self.process.SetSelectedThread(stoppedThread) - self.reportStackTop() self.reportThreads() if stoppedThread: self.reportLocation(stoppedThread.GetSelectedFrame()) @@ -1605,9 +1589,7 @@ class Dumper(DumperBase): def activateFrame(self, args): thread = args['thread'] self.currentThread().SetSelectedFrame(args['index']) - state = self.process.GetState() - if state == lldb.eStateStopped: - self.reportStackPosition() + self.reportContinuation(args) def selectThread(self, args): self.process.SetSelectedThreadByID(args['id']) diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index ae33c3af0da..fcc207412c5 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -434,10 +434,6 @@ void LldbEngine::handleResponse(const QByteArray &response) watchHandler()->addDumpers(item); else if (name == "stack") refreshStack(item); - else if (name == "stack-position") - refreshStackPosition(item); - else if (name == "stack-top") - refreshStackTop(item); else if (name == "registers") refreshRegisters(item); else if (name == "threads") @@ -526,11 +522,12 @@ void LldbEngine::executeJumpToLine(const ContextData &data) void LldbEngine::activateFrame(int frameIndex) { - resetLocation(); if (state() != InferiorStopOk && state() != InferiorUnrunnable) return; - const int n = stackHandler()->stackSize(); + StackHandler *handler = stackHandler(); + + const int n = handler->stackSize(); if (frameIndex == n) { DebuggerCommand cmd("reportStack"); cmd.arg("nativeMixed", isNativeMixedActive()); @@ -539,6 +536,10 @@ void LldbEngine::activateFrame(int frameIndex) return; } + QTC_ASSERT(frameIndex < handler->stackSize(), return); + handler->setCurrentIndex(frameIndex); + gotoLocation(handler->currentFrame()); + DebuggerCommand cmd("activateFrame"); cmd.arg("index", frameIndex); cmd.arg("thread", threadsHandler()->currentThread().raw()); @@ -786,11 +787,6 @@ void LldbEngine::refreshSymbols(const GdbMi &symbols) // ////////////////////////////////////////////////////////////////////// -void LldbEngine::resetLocation() -{ - DebuggerEngine::resetLocation(); -} - bool LldbEngine::setToolTipExpression(TextEditor::TextEditorWidget *editorWidget, const DebuggerToolTipContext &context) { if (state() != InferiorStopOk || !isCppEditor(editorWidget)) { @@ -1030,25 +1026,6 @@ void LldbEngine::refreshStack(const GdbMi &stack) handler->setFrames(frames, canExpand); } -void LldbEngine::refreshStackPosition(const GdbMi &position) -{ - setStackPosition(position["id"].toInt()); -} - -void LldbEngine::refreshStackTop(const GdbMi &) -{ - setStackPosition(stackHandler()->firstUsableIndex()); -} - -void LldbEngine::setStackPosition(int index) -{ - StackHandler *handler = stackHandler(); - handler->setFrames(handler->frames()); - handler->setCurrentIndex(index); - if (index >= 0 && index < handler->stackSize()) - gotoLocation(handler->frameAt(index)); -} - void LldbEngine::refreshRegisters(const GdbMi ®isters) { RegisterHandler *handler = registerHandler(); diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index 695c2e417f0..fa766fee453 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -81,7 +81,6 @@ private: void shutdownInferior(); void shutdownEngine(); void abortDebugger(); - void resetLocation(); bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget, const DebuggerToolTipContext &); @@ -147,9 +146,6 @@ private: void refreshAll(const GdbMi &all); void refreshThreads(const GdbMi &threads); void refreshStack(const GdbMi &stack); - void refreshStackPosition(const GdbMi &position); - void refreshStackTop(const GdbMi &position); - void setStackPosition(int index); void refreshRegisters(const GdbMi ®isters); void refreshLocals(const GdbMi &vars); void refreshTypeInfo(const GdbMi &typeInfo); From 4829e9467215dbf3b142612eb52fb8e1a1f753e6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 3 Mar 2015 10:22:40 +0100 Subject: [PATCH 21/62] Clean exported headers of the QtSupport plugin. Change-Id: I6da98c3a9d5a89f80e721aed0e9fbf0f9ca6b43d Reviewed-by: Daniel Teske --- src/plugins/qtsupport/debugginghelperbuildtask.cpp | 1 + src/plugins/qtsupport/debugginghelperbuildtask.h | 3 ++- src/plugins/qtsupport/qtkitinformation.h | 1 - src/plugins/qtsupport/qtoptionspage.cpp | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp index 6a9e4696751..19cc1cc42fd 100644 --- a/src/plugins/qtsupport/debugginghelperbuildtask.cpp +++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp @@ -32,6 +32,7 @@ #include "qmldumptool.h" #include "baseqtversion.h" #include "qtversionmanager.h" +#include #include #include diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.h b/src/plugins/qtsupport/debugginghelperbuildtask.h index 19e97f801df..4f61b093289 100644 --- a/src/plugins/qtsupport/debugginghelperbuildtask.h +++ b/src/plugins/qtsupport/debugginghelperbuildtask.h @@ -35,12 +35,13 @@ #include #include #include -#include #include #include #include +namespace ProjectExplorer { class ToolChain; } + namespace QtSupport { class BaseQtVersion; diff --git a/src/plugins/qtsupport/qtkitinformation.h b/src/plugins/qtsupport/qtkitinformation.h index 79dd6f76261..8c5f314c6b4 100644 --- a/src/plugins/qtsupport/qtkitinformation.h +++ b/src/plugins/qtsupport/qtkitinformation.h @@ -35,7 +35,6 @@ #include "baseqtversion.h" -#include #include namespace Utils { class MacroExpander; } diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index ea6b136a1d1..3dbfc0ffb94 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include From b70081ae7117f0b7eca21547c720682a4ba50cf1 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 2 Mar 2015 21:43:32 +0200 Subject: [PATCH 22/62] QtSupport: Register mimetype for qm and ts files ts appears in freedesktop, but it is ambiguous. Change-Id: Iacc1386551f79eb885c03db7329f592394428f66 Reviewed-by: Eike Ziller --- src/plugins/qtsupport/QtSupport.mimetypes.xml | 14 ++++++++++++++ src/plugins/qtsupport/qtsupport.qrc | 1 + src/plugins/qtsupport/qtsupportplugin.cpp | 4 ++++ 3 files changed, 19 insertions(+) create mode 100644 src/plugins/qtsupport/QtSupport.mimetypes.xml diff --git a/src/plugins/qtsupport/QtSupport.mimetypes.xml b/src/plugins/qtsupport/QtSupport.mimetypes.xml new file mode 100644 index 00000000000..21c20bebfc1 --- /dev/null +++ b/src/plugins/qtsupport/QtSupport.mimetypes.xml @@ -0,0 +1,14 @@ + + + + Linguist translated messages (machine-readable) + + + + Linguist message catalog + + + + + + diff --git a/src/plugins/qtsupport/qtsupport.qrc b/src/plugins/qtsupport/qtsupport.qrc index 02b4ae28513..e97078e35bf 100644 --- a/src/plugins/qtsupport/qtsupport.qrc +++ b/src/plugins/qtsupport/qtsupport.qrc @@ -8,5 +8,6 @@ images/dark_qml.png images/dark_qt_project.png images/dark_qt_qrc.png + QtSupport.mimetypes.xml diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index 7fdcea8b4db..8de3090decf 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -50,7 +50,9 @@ #include #include #include + #include +#include #include @@ -69,6 +71,8 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes ProFileEvaluator::initialize(); new ProFileCacheManager(this); + Utils::MimeDatabase::addMimeTypes(QLatin1String(":qtsupport/QtSupport.mimetypes.xml")); + JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator); addAutoReleasedObject(new QtVersionManager); From c5dfc33b3d0aa6aa25dbd2400460cee9df7d938d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 3 Mar 2015 12:13:21 +0100 Subject: [PATCH 23/62] Valgrind: Log errors to issues pane instead of popping up a QMessageBox. Just as informative, but less intrusive and can't introduce event loop problems. Change-Id: I7dec17b1e82ba23340376075125f965017047959 Reviewed-by: hjk --- src/plugins/analyzerbase/analyzerutils.cpp | 9 +++++++++ src/plugins/analyzerbase/analyzerutils.h | 6 +++--- src/plugins/valgrind/callgrindtool.cpp | 5 ++--- src/plugins/valgrind/memchecktool.cpp | 10 +++++----- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/plugins/analyzerbase/analyzerutils.cpp b/src/plugins/analyzerbase/analyzerutils.cpp index 1216f9cfb53..3d4e71747d4 100644 --- a/src/plugins/analyzerbase/analyzerutils.cpp +++ b/src/plugins/analyzerbase/analyzerutils.cpp @@ -33,6 +33,7 @@ #include "analyzerconstants.h" #include +#include #include #include @@ -46,6 +47,7 @@ using namespace Analyzer; using namespace Core; +using namespace ProjectExplorer; static void moveCursorToEndOfName(QTextCursor *tc) { @@ -93,3 +95,10 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor() const CPlusPlus::LookupItem &lookupItem = lookupItems.first(); // ### TODO: select best candidate. return lookupItem.declaration(); } + +void AnalyzerUtils::logToIssuesPane(Task::TaskType type, const QString &message) +{ + TaskHub::addTask(type, message, Analyzer::Constants::ANALYZERTASK_ID); + if (type == Task::Error) + TaskHub::requestPopup(); +} diff --git a/src/plugins/analyzerbase/analyzerutils.h b/src/plugins/analyzerbase/analyzerutils.h index 210da4860d8..a7d544e8b5d 100644 --- a/src/plugins/analyzerbase/analyzerutils.h +++ b/src/plugins/analyzerbase/analyzerutils.h @@ -33,15 +33,15 @@ #include "analyzerbase_global.h" -QT_BEGIN_NAMESPACE -class QWidget; -QT_END_NAMESPACE +#include namespace CPlusPlus { class Symbol; } namespace AnalyzerUtils { ANALYZER_EXPORT CPlusPlus::Symbol *findSymbolUnderCursor(); + ANALYZER_EXPORT void logToIssuesPane(ProjectExplorer::Task::TaskType type, + const QString &message); } #endif // ANALYZERUTILS_H diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index c658815aaad..dcd2a1396b2 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -88,7 +88,6 @@ #include #include #include -#include #include #include #include @@ -933,8 +932,8 @@ void CallgrindToolPrivate::loadExternalLogFile() QFile logFile(filePath); if (!logFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QMessageBox::critical(AnalyzerManager::mainWindow(), tr("Internal Error"), - tr("Failed to open file for reading: %1").arg(filePath)); + AnalyzerUtils::logToIssuesPane(Task::Error, + tr("Callgrind: Failed to open file for reading: %1").arg(filePath)); return; } diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 4365c077dfc..ebee6c1c3b1 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -36,6 +36,7 @@ #include "valgrindplugin.h" #include +#include #include #include @@ -83,7 +84,6 @@ #include #include #include -#include #include #include #include @@ -493,8 +493,8 @@ void MemcheckTool::loadExternalXmlLogFile() QFile *logFile = new QFile(filePath); if (!logFile->open(QIODevice::ReadOnly | QIODevice::Text)) { delete logFile; - QMessageBox::critical(m_errorView, tr("Internal Error"), - tr("Failed to open file for reading: %1").arg(filePath)); + AnalyzerUtils::logToIssuesPane(Task::Error, + tr("Memcheck: Failed to open file for reading: %1").arg(filePath)); return; } @@ -524,8 +524,8 @@ void MemcheckTool::parserError(const Error &error) void MemcheckTool::internalParserError(const QString &errorString) { - QMessageBox::critical(m_errorView, tr("Internal Error"), - tr("Error occurred parsing Valgrind output: %1").arg(errorString)); + AnalyzerUtils::logToIssuesPane(Task::Error, + tr("Memcheck: Error occurred parsing Valgrind output: %1").arg(errorString)); } void MemcheckTool::clearErrorView() From 17b5c9bb72ddce49096f4edfe4c5b094d73c9d31 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 10:54:09 +0100 Subject: [PATCH 24/62] ProjectExplorer: Quieten soft assert in KitModel Task-number: QTCREATORBUG-13830 Change-Id: Ie6950a797a4156a1934c263128ee0446f8b5fff0 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/kitmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp index a968799ae5e..489da8c6ea8 100644 --- a/src/plugins/projectexplorer/kitmodel.cpp +++ b/src/plugins/projectexplorer/kitmodel.cpp @@ -150,7 +150,7 @@ KitNode *KitModel::kitNode(const QModelIndex &index) QModelIndex KitModel::indexOf(Kit *k) const { KitNode *n = findWorkingCopy(k); - return indexFromItem(n); + return n ? indexFromItem(n) : QModelIndex(); } void KitModel::setDefaultKit(const QModelIndex &index) From aaf4c3e978fd4b9f6147df95413da56fe0515b0c Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 14:01:04 +0100 Subject: [PATCH 25/62] Debugger: Remove unused signal and slots ... from GdbRemoteServerEngine Change-Id: Icc7ebc9fd9ef6ce710b77cc59fd1b9937e21cfd8 Reviewed-by: Christian Stenger --- .../debugger/gdb/remotegdbserveradapter.h | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.h b/src/plugins/debugger/gdb/remotegdbserveradapter.h index 2b0c732d812..1292cc5e377 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.h +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.h @@ -36,12 +36,6 @@ namespace Debugger { namespace Internal { -/////////////////////////////////////////////////////////////////////// -// -// RemoteGdbAdapter -// -/////////////////////////////////////////////////////////////////////// - class GdbRemoteServerEngine : public GdbEngine { Q_OBJECT @@ -56,23 +50,11 @@ private: void interruptInferior2(); void shutdownEngine(); -signals: - /* - * For "external" clients of a debugger run control that need to do - * further setup before the debugger is started (e.g. RemoteLinux). - * Afterwards, handleSetupDone() or handleSetupFailed() must be called - * to continue or abort debugging, respectively. - * This signal is only emitted if the start parameters indicate that - * a server start script should be used, but none is given. - */ - void requestSetup(); - -private: - Q_SLOT void readUploadStandardOutput(); - Q_SLOT void readUploadStandardError(); - Q_SLOT void uploadProcError(QProcess::ProcessError error); - Q_SLOT void uploadProcFinished(); - Q_SLOT void callTargetRemote(); + void readUploadStandardOutput(); + void readUploadStandardError(); + void uploadProcError(QProcess::ProcessError error); + void uploadProcFinished(); + void callTargetRemote(); void notifyEngineRemoteServerRunning(const QByteArray &serverChannel, int inferiorPid); void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result); From 6288d2833bc363a24eaec2c1898240e206901d8b Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 13:36:28 +0100 Subject: [PATCH 26/62] Debugger: Remove 'Remote' qualification from 'Debug Server' While using the Debug Server typically does involve a remotely running debug server (GDBServer or other stub) it's also possible and sometimes useful to use it locally. Change-Id: I7b041b14cc09d15ae3e6b501c9298f78764e256d Reviewed-by: Leena Miettinen --- doc/src/debugger/creator-debugger.qdoc | 2 +- src/plugins/debugger/debuggerplugin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index 59fa9c6f1d5..3813d731301 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -273,7 +273,7 @@ \list 1 - \li Select \uicontrol {Debug > Start Debugging > Attach to Remote + \li Select \uicontrol {Debug > Start Debugging > Attach to Running Debug Server}. \li In the \uicontrol {Host and port} field, enter the name of the remote diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f9ea096e3f5..5d6587f6efd 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2634,11 +2634,11 @@ void DebuggerPluginPrivate::extensionsInitialized() connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::attachCore); act = m_attachToRemoteServerAction = new QAction(this); - act->setText(tr("Attach to Remote Debug Server...")); + act->setText(tr("Attach to Running Debug Server...")); connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::attachToRemoteServer); act = m_startRemoteServerAction = new QAction(this); - act->setText(tr("Start Remote Debug Server Attached to Process...")); + act->setText(tr("Start Debug Server Attached to Process...")); connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::startRemoteServerAndAttachToProcess); act = m_attachToRunningApplication = new QAction(this); From 8a3c5bc1e7bd2a878d87165ecede816e8de73ab4 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 17:10:50 +0100 Subject: [PATCH 27/62] Debugger: Skip interpretation of unreadable register content Task-number: QTCREATORBUG-14029 Change-Id: I88553377a567607c7748c4875a5991e8fb0d52ab Reviewed-by: Nikita Baryshnikov Reviewed-by: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 2cf348b887c..1731c22d717 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3646,6 +3646,8 @@ void GdbEngine::handleRegisterListValues(const DebuggerResponse &response) QByteArray data = item["value"].data(); if (data.startsWith("0x")) { reg.value = data; + } else if (data == "") { + // Nothing. See QTCREATORBUG-14029. } else { // This is what GDB considers machine readable output: // value="{v4_float = {0x00000000, 0x00000000, 0x00000000, 0x00000000}, From 7f200358812a68cbd132dc5528190dc5bbac078c Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 23:32:46 +0100 Subject: [PATCH 28/62] Git: Replace two uses of QAction::setData Change-Id: I540d1fd221cc331c230950cb97848e39780b650c Reviewed-by: Orgad Shaneh --- src/plugins/git/giteditor.cpp | 26 ++++++-------------------- src/plugins/git/giteditor.h | 2 -- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index 794f59d799a..024ecb4d949 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -242,22 +242,6 @@ void GitEditorWidget::revertChange() sourceWorkingDirectory(), m_currentChange); } -void GitEditorWidget::stageDiffChunk() -{ - const QAction *a = qobject_cast(sender()); - QTC_ASSERT(a, return); - const DiffChunk chunk = qvariant_cast(a->data()); - return applyDiffChunk(chunk, false); -} - -void GitEditorWidget::unstageDiffChunk() -{ - const QAction *a = qobject_cast(sender()); - QTC_ASSERT(a, return); - const DiffChunk chunk = qvariant_cast(a->data()); - return applyDiffChunk(chunk, true); -} - void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert) { QTemporaryFile patchFile; @@ -303,12 +287,14 @@ void GitEditorWidget::addDiffActions(QMenu *menu, const DiffChunk &chunk) menu->addSeparator(); QAction *stageAction = menu->addAction(tr("Stage Chunk...")); - stageAction->setData(qVariantFromValue(chunk)); - connect(stageAction, &QAction::triggered, this, &GitEditorWidget::stageDiffChunk); + connect(stageAction, &QAction::triggered, this, [this, chunk] { + applyDiffChunk(chunk, false); + }); QAction *unstageAction = menu->addAction(tr("Unstage Chunk...")); - unstageAction->setData(qVariantFromValue(chunk)); - connect(unstageAction, &QAction::triggered, this, &GitEditorWidget::unstageDiffChunk); + connect(unstageAction, &QAction::triggered, this, [this, chunk] { + applyDiffChunk(chunk, true); + }); } bool GitEditorWidget::open(QString *errorString, const QString &fileName, const QString &realFileName) diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h index 2e385d78c3e..8de4d4ebf17 100644 --- a/src/plugins/git/giteditor.h +++ b/src/plugins/git/giteditor.h @@ -59,8 +59,6 @@ private slots: void resetChange(); void cherryPickChange(); void revertChange(); - void stageDiffChunk(); - void unstageDiffChunk(); void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert); private: From 3e54ec22e522621e80c33dfa5e1c3f9712d142d3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 3 Mar 2015 13:45:59 -0800 Subject: [PATCH 29/62] Don't concatenate QStrings if concatenating string literals is fine Change-Id: Ia0aac2f09e9245339951ffff13c81b3d3ea0987e Reviewed-by: Orgad Shaneh --- src/plugins/coreplugin/vcsmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index 13f6cb5a7ba..65182b46d97 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -415,8 +415,8 @@ QString VcsManager::msgAddToVcsFailedTitle() QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc) { return files.size() == 1 - ? tr("Could not add the file\n%1\nto version control (%2)") - .arg(files.front(), vc->displayName()) + QLatin1Char('\n') + ? tr("Could not add the file\n%1\nto version control (%2)\n") + .arg(files.front(), vc->displayName()) : tr("Could not add the following files to version control (%1)\n%2") .arg(vc->displayName(), files.join(QString(QLatin1Char('\n')))); } From e35809bd31ff833d5a14aa2ff4b162e595332e70 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 20 Feb 2015 22:42:14 +0100 Subject: [PATCH 30/62] Add shootout test for multiple identical lambdas This helps to compare code sizes generated by lambdas. Change-Id: I6734a26f59ec622ec8d4dfdea2c9e83340c11d73 Reviewed-by: Christian Stenger --- tests/manual/shootout/tst_codesize.cpp | 32 +++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/tests/manual/shootout/tst_codesize.cpp b/tests/manual/shootout/tst_codesize.cpp index ee1048d3075..f4d224dcc39 100644 --- a/tests/manual/shootout/tst_codesize.cpp +++ b/tests/manual/shootout/tst_codesize.cpp @@ -62,6 +62,8 @@ struct Suite { Suite() : flags(0) {} + void clear() { cases.clear(); } + QByteArray title; int flags; QByteArray cmd; @@ -99,6 +101,7 @@ public: private slots: void initTestCase(); + void codesize(); void codesize_data(); void init(); @@ -205,7 +208,7 @@ void tst_CodeSize::codesize() QProcess qmake; qmake.setWorkingDirectory(t->buildPath); QString cmd = QString::fromLatin1(m_qmakeBinary + " -r doit.pro"); - //qDebug() << "Starting qmake: " << cmd; + qDebug() << "Starting qmake: " << cmd; qmake.start(cmd); // QVERIFY(qmake.waitForFinished()); qmake.waitForFinished(); @@ -272,8 +275,10 @@ void tst_CodeSize::codesize_data() { QTest::addColumn("suite"); + Case c; Suite s; s.flags = Optimize; + // FIXME: Cannot be hardcoded. Assume matching qmake for now. #ifdef Q_CC_MSVC s.cmd = "dumpbin /DISASM /SECTION:.text$mn"; @@ -282,7 +287,6 @@ void tst_CodeSize::codesize_data() #endif s.title = "This 'test' compares different approaches to return something \n" "like an immutable string from a function."; - Case c; c.file = "latin1string"; c.gist = "QString f1() { return QLatin1String(\"foo\"); }\n"; c.code = "#include \n" + c.gist; @@ -309,7 +313,29 @@ void tst_CodeSize::codesize_data() c.code = c.gist; s.cases.append(c); - QTest::newRow("return string (no stack protector)") << s; + QTest::newRow("return_string") << s; + s.clear(); + + + c.file = "one"; + c.gist = "one"; + c.code = "#include \n" + "int x(int a) { return a * a; }\n" + "void bar(std::function);\n" + "void foo() { bar([] { return x(1); }); }\n"; + s.cases.append(c); + + c.file = "two"; + c.gist = "two"; + c.code = "#include \n" + "int x(int a) { return a * a; }\n" + "void bar(std::function);\n" + "void foo1() { int a = 1; bar([a] { return x(a); }); }\n" + "void foo2() { int a = 2; bar([a] { return x(a); }); }\n"; + s.cases.append(c); + + QTest::newRow("lambdas") << s; + s.clear(); } int main(int argc, char *argv[]) From e36b40161ef026f1a6b8c480cf76112f85f29d6f Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 10:25:54 +0100 Subject: [PATCH 31/62] QmlJS: Fix crash in PathsAndLanguages::compact() Task-number: QTCREATORBUG-13786 Change-Id: If8c84714382c751f51315d62e1d4b0764e4431ff Reviewed-by: Fawzi Mohamed --- src/libs/qmljs/qmljsdialect.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/qmljs/qmljsdialect.cpp b/src/libs/qmljs/qmljsdialect.cpp index 60d4a1e46fc..277bd03dc1f 100644 --- a/src/libs/qmljs/qmljsdialect.cpp +++ b/src/libs/qmljs/qmljsdialect.cpp @@ -300,7 +300,11 @@ bool PathsAndLanguages::maybeInsert(const PathAndLanguage &pathAndLanguage) { return true; } -void PathsAndLanguages::compact() { +void PathsAndLanguages::compact() +{ + if (m_list.isEmpty()) + return; + int oldCompactionPlace = 0; Utils::FileName oldPath = m_list.first().path(); QList compactedList; From 33eeb5880b7d477887b714bf032884f3d5501096 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 23:43:37 +0100 Subject: [PATCH 32/62] ProjectExplorer: Replace two uses of QAction::setData ... by a connection to a lambda. Change-Id: I32a276146cf6a4cfc79ae9c133a4cb5f0783c867 Reviewed-by: Daniel Teske --- .../kitmanagerconfigwidget.cpp | 19 +++++-------------- .../projectexplorer/kitmanagerconfigwidget.h | 1 - .../projectexplorer/projectexplorer.cpp | 19 ++++++++----------- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp index 06f33d3f5b4..56476a45432 100644 --- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp +++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp @@ -219,12 +219,15 @@ void KitManagerConfigWidget::addConfigWidget(KitConfigWidget *widget) QAction *action = new QAction(tr("Mark as Mutable"), 0); action->setCheckable(true); - action->setData(QVariant::fromValue(qobject_cast(widget))); action->setChecked(widget->isMutable()); action->setEnabled(!widget->isSticky()); widget->mainWidget()->addAction(action); widget->mainWidget()->setContextMenuPolicy(Qt::ActionsContextMenu); - connect(action, &QAction::toggled, this, &KitManagerConfigWidget::updateMutableState); + connect(action, &QAction::toggled, this, [this, widget, action] { + widget->setMutable(action->isChecked()); + emit dirty(); + }); + m_actions << action; int row = m_layout->rowCount(); @@ -363,18 +366,6 @@ void KitManagerConfigWidget::kitWasUpdated(Kit *k) updateVisibility(); } -void KitManagerConfigWidget::updateMutableState() -{ - QAction *action = qobject_cast(sender()); - if (!action) - return; - KitConfigWidget *widget = qobject_cast(action->data().value()); - if (!widget) - return; - widget->setMutable(action->isChecked()); - emit dirty(); -} - QLabel *KitManagerConfigWidget::createLabel(const QString &name, const QString &toolTip) { QLabel *label = new QLabel(name); diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.h b/src/plugins/projectexplorer/kitmanagerconfigwidget.h index 750ed14eab4..2d00ef0c6b1 100644 --- a/src/plugins/projectexplorer/kitmanagerconfigwidget.h +++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.h @@ -85,7 +85,6 @@ private slots: void setFileSystemFriendlyName(); void workingCopyWasUpdated(ProjectExplorer::Kit *k); void kitWasUpdated(ProjectExplorer::Kit *k); - void updateMutableState(); private: enum LayoutColumns { diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index faef1ed2cfb..97be5283c66 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -266,7 +266,7 @@ public: void updateRecentProjectMenu(); void clearRecentProjects(); - void openRecentProject(); + void openRecentProject(const QString &fileName); void updateUnloadProjectMenu(); void openTerminalHere(); @@ -2830,12 +2830,13 @@ void ProjectExplorerPluginPrivate::updateRecentProjectMenu() //projects (ignore sessions, they used to be in this list) const StringPairListConstIterator end = dd->m_recentProjects.constEnd(); for (StringPairListConstIterator it = dd->m_recentProjects.constBegin(); it != end; ++it) { - const QPair &s = *it; - if (s.first.endsWith(QLatin1String(".qws"))) + const QString fileName = it->first; + if (fileName.endsWith(QLatin1String(".qws"))) continue; - QAction *action = menu->addAction(Utils::withTildeHomePath(s.first)); - action->setData(s.first); - connect(action, &QAction::triggered, this, &ProjectExplorerPluginPrivate::openRecentProject); + QAction *action = menu->addAction(Utils::withTildeHomePath(fileName)); + connect(action, &QAction::triggered, this, [this, fileName] { + openRecentProject(fileName); + }); hasRecentProjects = true; } menu->setEnabled(hasRecentProjects); @@ -2856,15 +2857,11 @@ void ProjectExplorerPluginPrivate::clearRecentProjects() updateWelcomePage(); } -void ProjectExplorerPluginPrivate::openRecentProject() +void ProjectExplorerPluginPrivate::openRecentProject(const QString &fileName) { if (debug) qDebug() << "ProjectExplorerPlugin::openRecentProject()"; - QAction *a = qobject_cast(sender()); - if (!a) - return; - QString fileName = a->data().toString(); if (!fileName.isEmpty()) { QString errorMessage; ProjectExplorerPlugin::openProject(fileName, &errorMessage); From f9d2134cb192ecc5c6ed0da985a818b5e96b2051 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 18:05:00 +0100 Subject: [PATCH 33/62] Debugger: Disconnect LLDB process before destroying the engine Task-number: QTCREATORBUG-14083 Change-Id: Ic59460dc64b949711fefc82ca137218d3072f7d2 Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/debugger/lldb/lldbengine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index fcc207412c5..8b5b8820d3b 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -116,6 +116,7 @@ LldbEngine::LldbEngine(const DebuggerStartParameters &startParameters) LldbEngine::~LldbEngine() { m_stubProc.disconnect(); // Avoid spurious state transitions from late exiting stub + m_lldbProc.disconnect(); } void LldbEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages) From b9ab6b3f490ea44158b2746a7b18a45af503b912 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 26 Feb 2015 17:42:14 +0100 Subject: [PATCH 34/62] Fix detection of debug/release Qt. QtVersion::hasDebugBuild() and QtVersion::hasReleaseBuild() don't work as one might expect. Task-number: QBS-757 Change-Id: I1f591750761c76a6d064f4e489ee21a6e1683ec6 Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/plugins/qbsprojectmanager/qbsprojectmanager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp index fa265471b2c..4444fc98cbb 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp @@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx qtEnv.architecture.append(QLatin1String("_64")); } qtEnv.binaryPath = qt->binPath().toString(); - if (qt->hasDebugBuild()) - qtEnv.buildVariant << QLatin1String("debug"); - if (qt->hasReleaseBuild()) - qtEnv.buildVariant << QLatin1String("release"); qtEnv.documentationPath = qt->docsPath().toString(); qtEnv.includePath = qt->headerPath().toString(); qtEnv.libraryPath = qt->libraryPath().toString(); @@ -183,6 +179,11 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx qtEnv.frameworkBuild = qt->isFrameworkBuild(); qtEnv.configItems = qt->configValues(); qtEnv.qtConfigItems = qt->qtConfigValues(); + foreach (const QString &buildVariant, + QStringList() << QLatin1String("debug") << QLatin1String("release")) { + if (qtEnv.qtConfigItems.contains(buildVariant)) + qtEnv.buildVariant << buildVariant; + } const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv); if (errorInfo.hasError()) { Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1") From 53a29f5b83b69a5861a252992a6a5e7659613cf1 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 3 Mar 2015 14:20:24 +0100 Subject: [PATCH 35/62] Doc: fix remaining links to Qt wiki in docs Change-Id: Ia9193cf1870241104bf099ad2e47e3ead4eb43fd Reviewed-by: hjk --- doc/api/coding-style.qdoc | 6 +++--- doc/api/getting-and-building.qdoc | 5 ++--- doc/src/howto/qtcreator-faq.qdoc | 4 ++-- doc/src/overview/creator-tech-support.qdoc | 16 ++++++++++------ doc/src/projects/creator-projects-debuggers.qdoc | 15 +-------------- 5 files changed, 18 insertions(+), 28 deletions(-) diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc index caf33b2d0ac..007bf6463b2 100644 --- a/doc/api/coding-style.qdoc +++ b/doc/api/coding-style.qdoc @@ -59,7 +59,7 @@ the philosophy behind Qt development. For more information about how to set up the development environment for working on Qt Creator and how to submit code and documentation for inclusion, see - \l{http://wiki.qt-project.org/index.php/Main_Page}{Guidelines for Contributions to the Qt Project}. + \l{https://wiki.qt.io/Qt_Contribution_Guidelines}{Qt Contribution Guidelines}. \section1 Binary and Source Compatibility @@ -109,7 +109,7 @@ \li Do not reimplement functions (not even inlines, nor protected or private functions). \li Check - \l {http://wiki.qt-project.org/index.php/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds} + \l {https://wiki.qt.io/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds} for ways to preserve binary compatibility. \endlist @@ -640,7 +640,7 @@ \target coding-rules-namespacing \section2 Namespacing - Read \l {http://wiki.qt-project.org/index.php/Qt_In_Namespace}{Qt In Namespace} + Read \l{https://wiki.qt.io/Qt_In_Namespace}{Qt In Namespace} and keep in mind that all of Qt Creator is \e{namespace aware} code. The namespacing policy within Qt Creator is as follows: diff --git a/doc/api/getting-and-building.qdoc b/doc/api/getting-and-building.qdoc index 31baf943c63..29002b03bb4 100644 --- a/doc/api/getting-and-building.qdoc +++ b/doc/api/getting-and-building.qdoc @@ -37,8 +37,7 @@ (You can find the current version in our source repository here: \l{http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/qtcreator.pro}.) - You can get prebuilt Qt packages from the - \l{https://download.qt-project.org/official_releases/qt/}{Qt Project download page}. + You can get prebuilt Qt packages from \l{https://download.qt.io}{Qt Downloads}. If you want to use Qt as provided by your Linux distribution, you need to make sure that all Qt development packages and private header packages are also installed. @@ -48,7 +47,7 @@ released source bundles, or from the Gitorious repository \l{http://qt.gitorious.org/qt-creator}. If you intend to contribute to \QC itself, you should use the repository from our Gerrit review tool as described - in the developer wiki here: \l{http://wiki.qt-project.org/Setting_up_Gerrit}. + in: \l{https://wiki.qt.io/Setting_up_Gerrit}{Setting up Gerrit}. We strongly encourage you to do out-of-source builds of \QC (also called shadow-builds). diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc index 7451082423e..9ac5727c625 100644 --- a/doc/src/howto/qtcreator-faq.qdoc +++ b/doc/src/howto/qtcreator-faq.qdoc @@ -191,7 +191,7 @@ installed when you install \QC and \QSDK. On OS X, GDB is no longer officially supported. To build your own Python-enabled GDB, follow the instructions in - \l{http://wiki.qt.io/QtCreator_Build_Gdb}{Building GDB}. + \l{https://wiki.qt.io/QtCreator_Build_Gdb}{Building GDB}. You must use Python version 2.6 or 2.7. @@ -220,7 +220,7 @@ On Windows, nmake does not support the \c{-j} parameter. Instead, we provide a drop-in replacement called jom. You can download a precompiled - version of jom from \l{http://releases.qt-project.org/jom/}{Qt Project Release server}. + version of jom from \l{https://download.qt.io/official_releases/jom/}{Qt Downloads}. Put jom.exe in a location in the %PATH%. Go to the \uicontrol {Build Settings} and set jom.exe as the make command. diff --git a/doc/src/overview/creator-tech-support.qdoc b/doc/src/overview/creator-tech-support.qdoc index ed040f578f2..a3587406392 100644 --- a/doc/src/overview/creator-tech-support.qdoc +++ b/doc/src/overview/creator-tech-support.qdoc @@ -40,24 +40,28 @@ \li Where to Go \row - \li Learn more about Qt - \li \l{http://wiki.qt.io/developer_guides} - {Qt Developer Guides} + \li View examples of what you can do with Qt + \li \l{https://doc.qt.io/qt-5/all-examples.html}{List of Qt Examples} + + \l{https://doc.qt.io/qt-5/qtquick-codesamples.html} + {List of Qt Quick Examples} \row \li Develop Qt applications for desktop and mobile devices - \li \l{http://qt-project.org}{Qt Developer Network} + \li \l{https://www.qt.io/developers/}{Qt Developers} \row \li Participate in Qt development - \li \l{http://qt-project.org/contribute}{Contribute to Qt} + \li \l{https://wiki.qt.io/Qt_Contribution_Guidelines} + {Qt Contribution Guidelines} \row \li Find free Qt-based applications \li \l{http://qt-apps.org/}{Qt Apps} \row - \li Develop with a commercial Qt license and support - Qt by The Qt Company + \li Develop with a commercial Qt license and support - + Qt by The Qt Company \li \l{http://qt.io/licensing/}{Qt Licensing} \endtable diff --git a/doc/src/projects/creator-projects-debuggers.qdoc b/doc/src/projects/creator-projects-debuggers.qdoc index 4158039f515..51bb7fe3f12 100644 --- a/doc/src/projects/creator-projects-debuggers.qdoc +++ b/doc/src/projects/creator-projects-debuggers.qdoc @@ -58,20 +58,7 @@ \li For GDB, specify the path to the GDB executable. The executable must be built with Python scripting support - enabled. The options you - have depend on the development and target platform: - - \list - - \li For debugging on embedded devices using a different ABI, - you must provide a special executable. - - \li For debugging on Windows using MinGW, select a Windows - executable of GDB with Python scripting enabled. You can - download it from - \l{http://builds.qt-project.org/job/gdb-windows}. - - \endlist + enabled. \li For LLDB (experimental), specify the path to the LLDB executable. From 1896d2cc0e931e29926ec6e97576fa85b869c862 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 3 Mar 2015 15:13:05 +0100 Subject: [PATCH 36/62] FakeVim: Change default keyboard sequence for FakeVim... ...on OSX to make it possible to enter and leave with the same shortcut. Adjust user command mapping as well to be able to execute these from inside FakeVim mode as well. Task-number: QTCREATORBUG-14082 Change-Id: Ib93f798a61b4ed16db7cca7b3c927e1fb6bd5d0f Reviewed-by: Eike Ziller --- src/plugins/fakevim/fakevimplugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index ff23c967174..c482f0605e8 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1197,7 +1197,7 @@ bool FakeVimPluginPrivate::initialize() Command *cmd = 0; cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim), INSTALL_HANDLER, globalcontext, true); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+V,Meta+V") : Tr::tr("Alt+V,Alt+V"))); + cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V"))); ActionContainer *advancedMenu = ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED); @@ -1208,7 +1208,7 @@ bool FakeVimPluginPrivate::initialize() auto act = new QAction(this); act->setText(Tr::tr("Execute User Action #%1").arg(i)); cmd = ActionManager::registerAction(act, base.withSuffix(i)); - cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+V,%1") : Tr::tr("Alt+V,%1")).arg(i))); + cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i))); connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); }); } From 9b68aade38efa15316c6cf2193e77f9eaa2fd722 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 4 Mar 2015 12:43:09 +0100 Subject: [PATCH 37/62] Add changes-3.3.2 Change-Id: I660fe06a7949817c7516b9870dde264ee5d2088c Reviewed-by: Leena Miettinen --- dist/changes-3.3.2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dist/changes-3.3.2 diff --git a/dist/changes-3.3.2 b/dist/changes-3.3.2 new file mode 100644 index 00000000000..a77efcd45b2 --- /dev/null +++ b/dist/changes-3.3.2 @@ -0,0 +1,15 @@ +Qt Creator version 3.3.2 contains bug fixes. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + +git clone git://gitorious.org/qt-creator/qt-creator.git +git log --cherry-pick --pretty=oneline v3.3.1..v3.3.2 + +C++ Support + * Fixed deployment of Clang code model plugin (QTCREATORBUG-14038) + +Qt Quick Designer + * Fixed crash of Qt Quick emulation layer when using fallback emulation + (QTCREATORBUG-14031) From 3ddbba14158b83a1426b54cfa356909fd42f811d Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 11:49:27 +0100 Subject: [PATCH 38/62] Debugger: Postpone location reporting in LLDB stops ... to the initial stack contents report. This helps to avoid unwanted assembler reports in cases where we have to skip over "spurious" stopped events. Change-Id: I3340297ab01f976ab9d918fe73f69f4f32b12c03 Reviewed-by: Alessandro Portale Reviewed-by: Christian Stenger --- share/qtcreator/debugger/lldbbridge.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 79be2fcfc6c..1dfd7233e14 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -829,6 +829,8 @@ class Dumper(DumperBase): self.report('msg="No thread"') return + self.reportLocation(thread.GetFrameAtIndex(0)) # FIXME + isNativeMixed = int(args.get('nativeMixed', 0)) limit = args.get('stacklimit', -1) @@ -1326,8 +1328,6 @@ class Dumper(DumperBase): if stoppedThread: self.process.SetSelectedThread(stoppedThread) self.reportThreads() - if stoppedThread: - self.reportLocation(stoppedThread.GetSelectedFrame()) elif eventType == lldb.SBProcess.eBroadcastBitInterrupt: # 2 pass elif eventType == lldb.SBProcess.eBroadcastBitSTDOUT: @@ -1552,7 +1552,6 @@ class Dumper(DumperBase): self.reportState("running") self.reportState("stopped") self.reportError(error) - self.reportLocation(self.currentFrame()) else: self.reportData() From 04532fe60424a6a254b3077c741bfb8bf9d0a8fe Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Mar 2015 16:49:59 +0100 Subject: [PATCH 39/62] Debugger: Add some expandable macros to Debugger options page New %{Debugger:Name} for global use, %{Debugger:{Type,Version,...}} for expansion within the name. Also re-initialize from file if the saved version is empty (e.g. if the debugger was registered before the version field was present) Change-Id: I45568d78147597b30074a2ce4ddcf569bce15192 Reviewed-by: Christian Stenger Reviewed-by: Tobias Hunger --- src/plugins/android/androidconfigurations.cpp | 4 +-- src/plugins/debugger/debuggeritem.cpp | 32 ++++++++++++++++--- src/plugins/debugger/debuggeritem.h | 11 +++++-- src/plugins/debugger/debuggeritemmanager.cpp | 10 +++--- .../debugger/debuggerkitinformation.cpp | 12 +++---- src/plugins/debugger/debuggeroptionspage.cpp | 12 +++---- src/plugins/qnx/qnxbaseconfiguration.cpp | 2 +- 7 files changed, 54 insertions(+), 29 deletions(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 557425ade65..833de15485c 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1183,7 +1183,7 @@ void AndroidConfigurations::updateAutomaticKitList() Debugger::DebuggerItem debugger; debugger.setCommand(tc->suggestedDebugger()); debugger.setEngineType(Debugger::GdbEngineType); - debugger.setDisplayName(tr("Android Debugger for %1").arg(tc->displayName())); + debugger.setUnexpandedDisplayName(tr("Android Debugger for %1").arg(tc->displayName())); debugger.setAutoDetected(true); debugger.setAbi(tc->targetAbi()); QVariant id = Debugger::DebuggerItemManager::registerDebugger(debugger); @@ -1229,7 +1229,7 @@ void AndroidConfigurations::updateAutomaticKitList() Debugger::DebuggerItem debugger; debugger.setCommand(tc->suggestedDebugger()); debugger.setEngineType(Debugger::GdbEngineType); - debugger.setDisplayName(tr("Android Debugger for %1").arg(tc->displayName())); + debugger.setUnexpandedDisplayName(tr("Android Debugger for %1").arg(tc->displayName())); debugger.setAutoDetected(true); debugger.setAbi(tc->targetAbi()); QVariant id = Debugger::DebuggerItemManager::registerDebugger(debugger); diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 971a48e0d58..67b1f51d150 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -35,8 +35,10 @@ #include "debuggerprotocol.h" #include + #include #include +#include #include #include @@ -83,7 +85,7 @@ DebuggerItem::DebuggerItem(const QVariantMap &data) { m_command = FileName::fromUserInput(data.value(QLatin1String(DEBUGGER_INFORMATION_COMMAND)).toString()); m_id = data.value(QLatin1String(DEBUGGER_INFORMATION_ID)).toString(); - m_displayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString(); + m_unexpandedDisplayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString(); m_isAutoDetected = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), false).toBool(); m_autoDetectionSource = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE)).toString(); m_version = data.value(QLatin1String(DEBUGGER_INFORMATION_VERSION)).toString(); @@ -95,6 +97,9 @@ DebuggerItem::DebuggerItem(const QVariantMap &data) if (!abi.isNull()) m_abis.append(abi); } + + if (m_version.isEmpty()) + reinitializeFromFile(); } void DebuggerItem::createId() @@ -204,7 +209,7 @@ QStringList DebuggerItem::abiNames() const bool DebuggerItem::operator==(const DebuggerItem &other) const { return m_id == other.m_id - && m_displayName == other.m_displayName + && m_unexpandedDisplayName == other.m_unexpandedDisplayName && m_isAutoDetected == other.m_isAutoDetected && m_command == other.m_command; } @@ -212,7 +217,7 @@ bool DebuggerItem::operator==(const DebuggerItem &other) const QVariantMap DebuggerItem::toMap() const { QVariantMap data; - data.insert(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME), m_displayName); + data.insert(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME), m_unexpandedDisplayName); data.insert(QLatin1String(DEBUGGER_INFORMATION_ID), m_id); data.insert(QLatin1String(DEBUGGER_INFORMATION_COMMAND), m_command.toString()); data.insert(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), int(m_engineType)); @@ -223,9 +228,26 @@ QVariantMap DebuggerItem::toMap() const return data; } -void DebuggerItem::setDisplayName(const QString &displayName) +QString DebuggerItem::displayName() const { - m_displayName = displayName; + if (!m_unexpandedDisplayName.contains(QLatin1Char('%'))) + return m_unexpandedDisplayName; + + MacroExpander expander; + expander.registerVariable("Debugger:Type", DebuggerKitInformation::tr("Type of Debugger Backend"), + [this] { return engineTypeName(); }); + expander.registerVariable("Debugger:Version", DebuggerKitInformation::tr("Debugger"), + [this] { return !m_version.isEmpty() ? m_version : + DebuggerKitInformation::tr("Unknown debugger version"); }); + expander.registerVariable("Debugger:Abi", DebuggerKitInformation::tr("Debugger"), + [this] { return !m_abis.isEmpty() ? abiNames().join(QLatin1Char(' ')) : + DebuggerKitInformation::tr("Unknown debugger ABI"); }); + return expander.expand(m_unexpandedDisplayName); +} + +void DebuggerItem::setUnexpandedDisplayName(const QString &displayName) +{ + m_unexpandedDisplayName = displayName; } void DebuggerItem::setEngineType(const DebuggerEngineType &engineType) diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index fc3f85541be..6ffb2e7873d 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -44,7 +44,9 @@ namespace Debugger { class DebuggerItemManager; + namespace Internal { +class DebuggerConfigWidget; class DebuggerItemConfigWidget; class DebuggerItemModel; } // namespace Internal @@ -68,8 +70,9 @@ public: QVariant id() const { return m_id; } - QString displayName() const { return m_displayName; } - void setDisplayName(const QString &displayName); + QString displayName() const; + QString unexpandedDisplayName() const { return m_unexpandedDisplayName; } + void setUnexpandedDisplayName(const QString &unexpandedDisplayName); DebuggerEngineType engineType() const { return m_engineType; } void setEngineType(const DebuggerEngineType &engineType); @@ -101,9 +104,10 @@ public: private: DebuggerItem(const QVariant &id); void reinitializeFromFile(); + void initMacroExpander(); QVariant m_id; - QString m_displayName; + QString m_unexpandedDisplayName; DebuggerEngineType m_engineType; Utils::FileName m_command; bool m_isAutoDetected; @@ -111,6 +115,7 @@ private: QString m_version; QList m_abis; + friend class Internal::DebuggerConfigWidget; friend class Internal::DebuggerItemConfigWidget; friend class Internal::DebuggerItemModel; friend class DebuggerItemManager; diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 924d493b63b..cc04db5bc9d 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -191,7 +191,7 @@ void DebuggerItemManager::autoDetectCdbDebuggers() item.setAbis(Abi::abisOfBinary(cdb)); item.setCommand(cdb); item.setEngineType(CdbEngineType); - item.setDisplayName(uniqueDisplayName(tr("Auto-detected CDB at %1").arg(cdb.toUserOutput()))); + item.setUnexpandedDisplayName(uniqueDisplayName(tr("Auto-detected CDB at %1").arg(cdb.toUserOutput()))); addDebugger(item); } } @@ -260,7 +260,7 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers() item.setCommand(command); item.reinitializeFromFile(); //: %1: Debugger engine type (GDB, LLDB, CDB...), %2: Path - item.setDisplayName(tr("System %1 at %2") + item.setUnexpandedDisplayName(tr("System %1 at %2") .arg(item.engineTypeName()).arg(command.toUserOutput())); item.setAutoDetected(true); addDebugger(item); @@ -299,7 +299,7 @@ void DebuggerItemManager::readLegacyDebuggers(const FileName &file) item.setCommand(command); item.setAutoDetected(true); item.reinitializeFromFile(); - item.setDisplayName(tr("Extracted from Kit %1").arg(kitName)); + item.setUnexpandedDisplayName(tr("Extracted from Kit %1").arg(kitName)); addDebugger(item); } } @@ -379,7 +379,7 @@ QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item) if (d.command() == item.command() && d.isAutoDetected() == item.isAutoDetected() && d.engineType() == item.engineType() - && d.displayName() == item.displayName() + && d.unexpandedDisplayName() == item.unexpandedDisplayName() && d.abis() == item.abis()) { return d.id(); } @@ -407,7 +407,7 @@ void DebuggerItemManager::deregisterDebugger(const QVariant &id) QString DebuggerItemManager::uniqueDisplayName(const QString &base) { foreach (const DebuggerItem &item, m_debuggers) - if (item.displayName() == base) + if (item.unexpandedDisplayName() == base) return uniqueDisplayName(base + QLatin1String(" (1)")); return base; diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index c477a14c742..7b22ae80b5a 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -304,18 +304,18 @@ KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const void DebuggerKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expander) const { + expander->registerVariable("Debugger:Name", tr("Name of Debugger"), + [this, kit]() -> QString { + const DebuggerItem *item = debugger(kit); + return item ? item->displayName() : tr("Unknown debugger"); + }); + expander->registerVariable("Debugger:Type", tr("Type of Debugger Backend"), [this, kit]() -> QString { const DebuggerItem *item = debugger(kit); return item ? item->engineTypeName() : tr("Unknown debugger type"); }); - expander->registerVariable("Debugger:Name", tr("Debugger"), - [this, kit]() -> QString { - const DebuggerItem *item = debugger(kit); - return item ? item->displayName() : tr("Unknown debugger"); - }); - expander->registerVariable("Debugger:Version", tr("Debugger"), [this, kit]() -> QString { const DebuggerItem *item = debugger(kit); diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp index fc343cbfcb7..be29c640bb2 100644 --- a/src/plugins/debugger/debuggeroptionspage.cpp +++ b/src/plugins/debugger/debuggeroptionspage.cpp @@ -259,7 +259,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model) DebuggerItem DebuggerItemConfigWidget::item() const { DebuggerItem item(m_id); - item.setDisplayName(m_displayNameLineEdit->text()); + item.setUnexpandedDisplayName(m_displayNameLineEdit->text()); item.setCommand(m_binaryChooser->fileName()); item.setAutoDetected(m_autodetected); QList abiList; @@ -295,7 +295,7 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item) m_autodetected = item->isAutoDetected(); m_displayNameLineEdit->setEnabled(!item->isAutoDetected()); - m_displayNameLineEdit->setText(item->displayName()); + m_displayNameLineEdit->setText(item->unexpandedDisplayName()); m_typeLineEdit->setText(item->engineTypeName()); @@ -435,11 +435,9 @@ void DebuggerConfigWidget::cloneDebugger() DebuggerItem newItem; newItem.createId(); - newItem.setAutoDetected(false); newItem.setCommand(item->command()); - newItem.setEngineType(item->engineType()); - newItem.setAbis(item->abis()); - newItem.setDisplayName(DebuggerItemManager::uniqueDisplayName(tr("Clone of %1").arg(item->displayName()))); + newItem.setUnexpandedDisplayName(DebuggerItemManager::uniqueDisplayName(tr("Clone of %1").arg(item->displayName()))); + newItem.reinitializeFromFile(); newItem.setAutoDetected(false); m_model.addDebugger(newItem, true); m_debuggerView->setCurrentIndex(m_model.lastIndex()); @@ -451,7 +449,7 @@ void DebuggerConfigWidget::addDebugger() item.createId(); item.setAutoDetected(false); item.setEngineType(NoEngineType); - item.setDisplayName(DebuggerItemManager::uniqueDisplayName(tr("New Debugger"))); + item.setUnexpandedDisplayName(DebuggerItemManager::uniqueDisplayName(tr("New Debugger"))); item.setAutoDetected(false); m_model.addDebugger(item, true); m_debuggerView->setCurrentIndex(m_model.lastIndex()); diff --git a/src/plugins/qnx/qnxbaseconfiguration.cpp b/src/plugins/qnx/qnxbaseconfiguration.cpp index b0509b73517..f98a7eb5b74 100644 --- a/src/plugins/qnx/qnxbaseconfiguration.cpp +++ b/src/plugins/qnx/qnxbaseconfiguration.cpp @@ -183,7 +183,7 @@ QVariant QnxBaseConfiguration::createDebuggerItem(QnxArchitecture arch, debugger.setAbi(Abi(arch == Qnx::ArmLeV7 ? Abi::ArmArchitecture : Abi::X86Architecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32)); debugger.setAutoDetected(true); - debugger.setDisplayName(displayName); + debugger.setUnexpandedDisplayName(displayName); return Debugger::DebuggerItemManager::registerDebugger(debugger); } From 7ebc031ad40e7ff534133d7dfc56e50ae7d86b4d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 4 Mar 2015 08:24:00 +0200 Subject: [PATCH 40/62] Project: Remove unused function Change-Id: I6e74577841d4c9c304393a1e2c672ec3e43fd7e4 Reviewed-by: Oswald Buddenhagen --- src/qtcreatorplugin.pri | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri index b88d9403142..e3536b35478 100644 --- a/src/qtcreatorplugin.pri +++ b/src/qtcreatorplugin.pri @@ -74,10 +74,6 @@ isEmpty(TARGET) { error("qtcreatorplugin.pri: You must provide a TARGET") } -defineReplace(stripOutDir) { - return($$relative_path($$1, $$OUT_PWD)) -} - PLUGINJSON = $$_PRO_FILE_PWD_/$${TARGET}.json PLUGINJSON_IN = $${PLUGINJSON}.in exists($$PLUGINJSON_IN) { From b79c4a37e4af4606665fa84d11e4177e34aff167 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 4 Mar 2015 14:35:27 +0100 Subject: [PATCH 41/62] Remove duplicated Qt 4 private headers used for building the Qt Designer plugin. As of Qt 5, the Qt Designer integration no longer relies on private Qt Designer headers. Change-Id: Ib2909e856232491e9067ccc9cad6df86e9da086b Reviewed-by: hjk --- src/plugins/designer/README.txt | 8 - .../qt_private/abstractnewformwidget_p.h | 77 ------- .../qt_private/abstractoptionspage_p.h | 68 ------ .../designer/qt_private/abstractsettings_p.h | 72 ------- .../designer/qt_private/formwindowbase_p.h | 194 ------------------ .../designer/qt_private/iconloader_p.h | 61 ------ .../designer/qt_private/pluginmanager_p.h | 148 ------------- .../qdesigner_formwindowmanager_p.h | 88 -------- .../qt_private/qdesigner_integration_p.h | 141 ------------- .../designer/qt_private/qsimpleresource_p.h | 153 -------------- .../designer/qt_private/qtresourcemodel_p.h | 134 ------------ .../designer/qt_private/shared_enums_p.h | 88 -------- .../designer/qt_private/shared_global_p.h | 65 ------ src/plugins/designer/syncqtheader.sh | 65 ------ 14 files changed, 1362 deletions(-) delete mode 100644 src/plugins/designer/qt_private/abstractnewformwidget_p.h delete mode 100644 src/plugins/designer/qt_private/abstractoptionspage_p.h delete mode 100644 src/plugins/designer/qt_private/abstractsettings_p.h delete mode 100644 src/plugins/designer/qt_private/formwindowbase_p.h delete mode 100644 src/plugins/designer/qt_private/iconloader_p.h delete mode 100644 src/plugins/designer/qt_private/pluginmanager_p.h delete mode 100644 src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h delete mode 100644 src/plugins/designer/qt_private/qdesigner_integration_p.h delete mode 100644 src/plugins/designer/qt_private/qsimpleresource_p.h delete mode 100644 src/plugins/designer/qt_private/qtresourcemodel_p.h delete mode 100644 src/plugins/designer/qt_private/shared_enums_p.h delete mode 100644 src/plugins/designer/qt_private/shared_global_p.h delete mode 100755 src/plugins/designer/syncqtheader.sh diff --git a/src/plugins/designer/README.txt b/src/plugins/designer/README.txt index bc6108425bc..51a274bfbf9 100644 --- a/src/plugins/designer/README.txt +++ b/src/plugins/designer/README.txt @@ -45,11 +45,3 @@ designer's internal file watcher updates the changes to qrc files silently. A call to setResourceEditingEnabled(false) removes the edit resources action form resource browser in designer - -Building --------- - -The plugin accesses some private headers of Qt Designer 4.5. -Copies of them are located in qt_private to achieve a clean build -from a standard Qt distribution. The script syncqtheader.sh -can be used to update them. diff --git a/src/plugins/designer/qt_private/abstractnewformwidget_p.h b/src/plugins/designer/qt_private/abstractnewformwidget_p.h deleted file mode 100644 index 256257e3689..00000000000 --- a/src/plugins/designer/qt_private/abstractnewformwidget_p.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef ABSTRACTNEWFORMWIDGET_H -#define ABSTRACTNEWFORMWIDGET_H - -#include - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QDesignerFormEditorInterface; - -class QDESIGNER_SDK_EXPORT QDesignerNewFormWidgetInterface : public QWidget -{ - Q_DISABLE_COPY(QDesignerNewFormWidgetInterface) - Q_OBJECT -public: - explicit QDesignerNewFormWidgetInterface(QWidget *parent = 0); - virtual ~QDesignerNewFormWidgetInterface(); - - virtual bool hasCurrentTemplate() const = 0; - virtual QString currentTemplate(QString *errorMessage = 0) = 0; - - static QDesignerNewFormWidgetInterface *createNewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent = 0); - -Q_SIGNALS: - void templateActivated(); - void currentTemplateChanged(bool templateSelected); -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // ABSTRACTNEWFORMWIDGET_H diff --git a/src/plugins/designer/qt_private/abstractoptionspage_p.h b/src/plugins/designer/qt_private/abstractoptionspage_p.h deleted file mode 100644 index 570422c4dc1..00000000000 --- a/src/plugins/designer/qt_private/abstractoptionspage_p.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef ABSTRACTOPTIONSPAGE_P_H -#define ABSTRACTOPTIONSPAGE_P_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QString; -class QWidget; - -class QDESIGNER_SDK_EXPORT QDesignerOptionsPageInterface -{ -public: - virtual ~QDesignerOptionsPageInterface() {} - virtual QString name() const = 0; - virtual QWidget *createPage(QWidget *parent) = 0; - virtual void apply() = 0; - virtual void finish() = 0; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // ABSTRACTOPTIONSPAGE_P_H diff --git a/src/plugins/designer/qt_private/abstractsettings_p.h b/src/plugins/designer/qt_private/abstractsettings_p.h deleted file mode 100644 index 0e147225d1a..00000000000 --- a/src/plugins/designer/qt_private/abstractsettings_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef ABSTRACTSETTINGS_P_H -#define ABSTRACTSETTINGS_P_H - -#include - -#include - -QT_BEGIN_NAMESPACE - -class QString; - -/*! - To be implemented by IDEs that want to control the way designer retrieves/stores its settings. - */ -class QDESIGNER_SDK_EXPORT QDesignerSettingsInterface -{ -public: - virtual ~QDesignerSettingsInterface() {} - - virtual void beginGroup(const QString &prefix) = 0; - virtual void endGroup() = 0; - - virtual bool contains(const QString &key) const = 0; - virtual void setValue(const QString &key, const QVariant &value) = 0; - virtual QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const = 0; - virtual void remove(const QString &key) = 0; -}; - -QT_END_NAMESPACE - -#endif // ABSTRACTSETTINGS_P_H diff --git a/src/plugins/designer/qt_private/formwindowbase_p.h b/src/plugins/designer/qt_private/formwindowbase_p.h deleted file mode 100644 index 0924cda63f0..00000000000 --- a/src/plugins/designer/qt_private/formwindowbase_p.h +++ /dev/null @@ -1,194 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef FORMWINDOWBASE_H -#define FORMWINDOWBASE_H - -#include "shared_global_p.h" - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -class QDesignerDnDItemInterface; -class QMenu; -class QtResourceSet; -class QDesignerPropertySheet; - -namespace qdesigner_internal { - -class QEditorFormBuilder; -class DeviceProfile; -class Grid; - -class DesignerPixmapCache; -class DesignerIconCache; -class FormWindowBasePrivate; - -class QDESIGNER_SHARED_EXPORT FormWindowBase: public QDesignerFormWindowInterface -{ - Q_OBJECT -public: - enum HighlightMode { Restore, Highlight }; - enum SaveResourcesBehaviour { SaveAll, SaveOnlyUsedQrcFiles, DontSaveQrcFiles }; - - explicit FormWindowBase(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0); - virtual ~FormWindowBase(); - - QVariantMap formData(); - void setFormData(const QVariantMap &vm); - - // Return contents without warnings. Should be 'contents(bool quiet)' - QString fileContents() const; - - // Return the widget containing the form. This is used to - // apply embedded design settings to that are inherited (for example font). - // These are meant to be applied to the form only and not to the other editors - // in the widget stack. - virtual QWidget *formContainer() const = 0; - - // Deprecated - virtual QPoint grid() const; - - // Deprecated - virtual void setGrid(const QPoint &grid); - - virtual bool hasFeature(Feature f) const; - virtual Feature features() const; - virtual void setFeatures(Feature f); - - const Grid &designerGrid() const; - void setDesignerGrid(const Grid& grid); - - bool hasFormGrid() const; - void setHasFormGrid(bool b); - - bool gridVisible() const; - - SaveResourcesBehaviour saveResourcesBehaviour() const; - void setSaveResourcesBehaviour(SaveResourcesBehaviour behaviour); - - static const Grid &defaultDesignerGrid(); - static void setDefaultDesignerGrid(const Grid& grid); - - // Overwrite to initialize and return a full popup menu for a managed widget - virtual QMenu *initializePopupMenu(QWidget *managedWidget); - // Helper to create a basic popup menu from task menu extensions (internal/public) - static QMenu *createExtensionTaskMenu(QDesignerFormWindowInterface *fw, QObject *o, bool trailingSeparator = true); - - virtual bool dropWidgets(const QList &item_list, QWidget *target, - const QPoint &global_mouse_pos) = 0; - - // Helper to find the widget at the mouse position with some flags. - enum WidgetUnderMouseMode { FindSingleSelectionDropTarget, FindMultiSelectionDropTarget }; - QWidget *widgetUnderMouse(const QPoint &formPos, WidgetUnderMouseMode m); - - virtual QWidget *widgetAt(const QPoint &pos) = 0; - virtual QWidget *findContainer(QWidget *w, bool excludeLayout) const = 0; - - void deleteWidgetList(const QWidgetList &widget_list); - - virtual void highlightWidget(QWidget *w, const QPoint &pos, HighlightMode mode = Highlight) = 0; - - enum PasteMode { PasteAll, PasteActionsOnly }; - virtual void paste(PasteMode pasteMode) = 0; - - // Factory method to create a form builder - virtual QEditorFormBuilder *createFormBuilder() = 0; - - virtual bool blockSelectionChanged(bool blocked) = 0; - virtual void emitSelectionChanged() = 0; - - DesignerPixmapCache *pixmapCache() const; - DesignerIconCache *iconCache() const; - QtResourceSet *resourceSet() const; - void setResourceSet(QtResourceSet *resourceSet); - void addReloadableProperty(QDesignerPropertySheet *sheet, int index); - void removeReloadableProperty(QDesignerPropertySheet *sheet, int index); - void addReloadablePropertySheet(QDesignerPropertySheet *sheet, QObject *object); - void removeReloadablePropertySheet(QDesignerPropertySheet *sheet); - void reloadProperties(); - - void emitWidgetRemoved(QWidget *w); - void emitObjectRemoved(QObject *o); - - DeviceProfile deviceProfile() const; - QString styleName() const; - QString deviceProfileName() const; - - enum LineTerminatorMode { - LFLineTerminator, - CRLFLineTerminator, - NativeLineTerminator = -#if defined (Q_OS_WIN) - CRLFLineTerminator -#else - LFLineTerminator -#endif - }; - - void setLineTerminatorMode(LineTerminatorMode mode); - LineTerminatorMode lineTerminatorMode() const; - - // Connect the 'activated' (doubleclicked) signal of the form window to a - // slot triggering the default action (of the task menu) - static void setupDefaultAction(QDesignerFormWindowInterface *fw); - -public slots: - void resourceSetActivated(QtResourceSet *resourceSet, bool resourceSetChanged); - -private slots: - void triggerDefaultAction(QWidget *w); - -private: - void syncGridFeature(); - - FormWindowBasePrivate *m_d; -}; - -} // namespace qdesigner_internal - -QT_END_NAMESPACE - -#endif // FORMWINDOWBASE_H diff --git a/src/plugins/designer/qt_private/iconloader_p.h b/src/plugins/designer/qt_private/iconloader_p.h deleted file mode 100644 index 777aa3dd451..00000000000 --- a/src/plugins/designer/qt_private/iconloader_p.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef ICONLOADER_H -#define ICONLOADER_H - -#include "shared_global_p.h" - -QT_BEGIN_NAMESPACE - -class QString; -class QIcon; - -namespace qdesigner_internal { - -QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name); -QDESIGNER_SHARED_EXPORT QIcon emptyIcon(); - -} // namespace qdesigner_internal - -QT_END_NAMESPACE - -#endif // ICONLOADER_H diff --git a/src/plugins/designer/qt_private/pluginmanager_p.h b/src/plugins/designer/qt_private/pluginmanager_p.h deleted file mode 100644 index 80f45d4de07..00000000000 --- a/src/plugins/designer/qt_private/pluginmanager_p.h +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef PLUGINMANAGER_H -#define PLUGINMANAGER_H - -#include "shared_global_p.h" -#include "shared_enums_p.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDesignerFormEditorInterface; -class QDesignerCustomWidgetInterface; -class QDesignerPluginManagerPrivate; - -class QDesignerCustomWidgetSharedData; - -/* Information contained in the Dom XML of a custom widget. */ -class QDESIGNER_SHARED_EXPORT QDesignerCustomWidgetData { -public: - // StringPropertyType: validation mode and translatable flag. - typedef QPair StringPropertyType; - - explicit QDesignerCustomWidgetData(const QString &pluginPath = QString()); - - enum ParseResult { ParseOk, ParseWarning, ParseError }; - ParseResult parseXml(const QString &xml, const QString &name, QString *errorMessage); - - QDesignerCustomWidgetData(const QDesignerCustomWidgetData&); - QDesignerCustomWidgetData& operator=(const QDesignerCustomWidgetData&); - ~QDesignerCustomWidgetData(); - - bool isNull() const; - - QString pluginPath() const; - - // Data as parsed from the widget's domXML(). - QString xmlClassName() const; - // Optional. The language the plugin is supposed to be used with. - QString xmlLanguage() const; - // Optional. method used to add pages to a container with a container extension - QString xmlAddPageMethod() const; - // Optional. Base class - QString xmlExtends() const; - // Optional. The name to be used in the widget box. - QString xmlDisplayName() const; - // Type of a string property - bool xmlStringPropertyType(const QString &name, StringPropertyType *type) const; - -private: - QSharedDataPointer m_d; -}; - -class QDESIGNER_SHARED_EXPORT QDesignerPluginManager: public QObject -{ - Q_OBJECT -public: - typedef QList CustomWidgetList; - - explicit QDesignerPluginManager(QDesignerFormEditorInterface *core); - virtual ~QDesignerPluginManager(); - - QDesignerFormEditorInterface *core() const; - - QObject *instance(const QString &plugin) const; - - QStringList registeredPlugins() const; - - QStringList findPlugins(const QString &path); - - QStringList pluginPaths() const; - void setPluginPaths(const QStringList &plugin_paths); - - QStringList disabledPlugins() const; - void setDisabledPlugins(const QStringList &disabled_plugins); - - QStringList failedPlugins() const; - QString failureReason(const QString &pluginName) const; - - QObjectList instances() const; - - CustomWidgetList registeredCustomWidgets() const; - QDesignerCustomWidgetData customWidgetData(QDesignerCustomWidgetInterface *w) const; - QDesignerCustomWidgetData customWidgetData(const QString &className) const; - - bool registerNewPlugins(); - -public slots: - bool syncSettings(); - void ensureInitialized(); - -private: - void updateRegisteredPlugins(); - void registerPath(const QString &path); - void registerPlugin(const QString &plugin); - -private: - static QStringList defaultPluginPaths(); - - QDesignerPluginManagerPrivate *m_d; -}; - -QT_END_NAMESPACE - -#endif // PLUGINMANAGER_H diff --git a/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h b/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h deleted file mode 100644 index 3f4bf925196..00000000000 --- a/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QDESIGNER_FORMWINDOWMANAGER_H -#define QDESIGNER_FORMWINDOWMANAGER_H - -#include "shared_global_p.h" -#include - -QT_BEGIN_NAMESPACE - -namespace qdesigner_internal { - -class PreviewManager; - -// -// Convenience functions to manage form previews (ultimately forwarded to PreviewManager). -// -class QDESIGNER_SHARED_EXPORT QDesignerFormWindowManager - : public QDesignerFormWindowManagerInterface -{ - Q_OBJECT -public: - explicit QDesignerFormWindowManager(QObject *parent = 0); - virtual ~QDesignerFormWindowManager(); - - virtual QAction *actionDefaultPreview() const; - virtual QActionGroup *actionGroupPreviewInStyle() const; - virtual QAction *actionShowFormWindowSettingsDialog() const; - - virtual QPixmap createPreviewPixmap(QString *errorMessage) = 0; - - virtual PreviewManager *previewManager() const = 0; - -Q_SIGNALS: - void formWindowSettingsChanged(QDesignerFormWindowInterface *fw); - -public Q_SLOTS: - virtual void closeAllPreviews() = 0; - void aboutPlugins(); - -private: - void *m_unused; -}; - -} // namespace qdesigner_internal - -QT_END_NAMESPACE - -#endif // QDESIGNER_FORMWINDOWMANAGER_H diff --git a/src/plugins/designer/qt_private/qdesigner_integration_p.h b/src/plugins/designer/qt_private/qdesigner_integration_p.h deleted file mode 100644 index 714a6f26547..00000000000 --- a/src/plugins/designer/qt_private/qdesigner_integration_p.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QDESIGNER_INTEGRATION_H -#define QDESIGNER_INTEGRATION_H - -#include "shared_global_p.h" -#include - -#include - -QT_BEGIN_NAMESPACE - -class QDesignerFormEditorInterface; -class QDesignerFormWindowInterface; -class QDesignerResourceBrowserInterface; - -class QVariant; -class QWidget; - -namespace qdesigner_internal { - -struct Selection; -class QDesignerIntegrationPrivate; - -class QDESIGNER_SHARED_EXPORT QDesignerIntegration: public QDesignerIntegrationInterface -{ - Q_OBJECT -public: - explicit QDesignerIntegration(QDesignerFormEditorInterface *core, QObject *parent = 0); - virtual ~QDesignerIntegration(); - - static void requestHelp(const QDesignerFormEditorInterface *core, const QString &manual, const QString &document); - - virtual QWidget *containerWindow(QWidget *widget) const; - - // Load plugins into widget database and factory. - static void initializePlugins(QDesignerFormEditorInterface *formEditor); - void emitObjectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object, - const QString &newName, const QString &oldName); - void emitNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames); - void emitNavigateToSlot(const QString &slotSignature); - - // Create a resource browser specific to integration. Language integration takes precedence - virtual QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent = 0); - - enum ResourceFileWatcherBehaviour { - NoWatcher, - ReloadSilently, - PromptAndReload - }; - - ResourceFileWatcherBehaviour resourceFileWatcherBehaviour() const; - bool isResourceEditingEnabled() const; - bool isSlotNavigationEnabled() const; - - QString contextHelpId() const; - -protected: - - void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour); // PromptAndReload by default - void setResourceEditingEnabled(bool enable); // true by default - void setSlotNavigationEnabled(bool enable); // false by default - -signals: - void propertyChanged(QDesignerFormWindowInterface *formWindow, const QString &name, const QVariant &value); - void objectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object, const QString &newName, const QString &oldName); - void helpRequested(const QString &manual, const QString &document); - - void navigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames); - void navigateToSlot(const QString &slotSignature); - -public slots: - virtual void updateProperty(const QString &name, const QVariant &value, bool enableSubPropertyHandling); - // Additional signals of designer property editor - virtual void resetProperty(const QString &name); - virtual void addDynamicProperty(const QString &name, const QVariant &value); - virtual void removeDynamicProperty(const QString &name); - - virtual void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow); - virtual void setupFormWindow(QDesignerFormWindowInterface *formWindow); - virtual void updateSelection(); - virtual void updateGeometry(); - virtual void activateWidget(QWidget *widget); - - void updateCustomWidgetPlugins(); - -private slots: - void updatePropertyPrivate(const QString &name, const QVariant &value); - -private: - void initialize(); - void getSelection(Selection &s); - QObject *propertyEditorObject(); - - QDesignerIntegrationPrivate *m_d; -}; - -} // namespace qdesigner_internal - -QT_END_NAMESPACE - -#endif // QDESIGNER_INTEGRATION_H diff --git a/src/plugins/designer/qt_private/qsimpleresource_p.h b/src/plugins/designer/qt_private/qsimpleresource_p.h deleted file mode 100644 index e0a7fcb25ef..00000000000 --- a/src/plugins/designer/qt_private/qsimpleresource_p.h +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QSIMPLERESOURCE_H -#define QSIMPLERESOURCE_H - -#include "shared_global_p.h" -#include "abstractformbuilder.h" -#include - -QT_BEGIN_NAMESPACE - -class DomScript; -class DomCustomWidgets; -class DomCustomWidget; -class DomSlots; - -class QDesignerFormEditorInterface; - -namespace qdesigner_internal { - -class WidgetDataBaseItem; - -class QDESIGNER_SHARED_EXPORT QSimpleResource : public QAbstractFormBuilder -{ -public: - explicit QSimpleResource(QDesignerFormEditorInterface *core); - virtual ~QSimpleResource(); - - QBrush setupBrush(DomBrush *brush); - DomBrush *saveBrush(const QBrush &brush); - - inline QDesignerFormEditorInterface *core() const - { return m_core; } - - // Query extensions for additional data - static void addExtensionDataToDOM(QAbstractFormBuilder *afb, - QDesignerFormEditorInterface *core, - DomWidget *ui_widget, QWidget *widget); - static void applyExtensionDataFromDOM(QAbstractFormBuilder *afb, - QDesignerFormEditorInterface *core, - DomWidget *ui_widget, QWidget *widget, - bool applyState); - // Enable warnings while saving. Turn off for backups. - static bool setWarningsEnabled(bool warningsEnabled); - static bool warningsEnabled(); - // Return the script returned by the CustomWidget codeTemplate API - static QString customWidgetScript(QDesignerFormEditorInterface *core, QObject *object); - static QString customWidgetScript(QDesignerFormEditorInterface *core, const QString &className); - static bool hasCustomWidgetScript(QDesignerFormEditorInterface *core, QObject *object); - - // Implementation for FormBuilder::createDomCustomWidgets() that adds - // the custom widgets to the widget database - static void handleDomCustomWidgets(const QDesignerFormEditorInterface *core, - const DomCustomWidgets *dom_custom_widgets); - -protected: - virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath); - virtual QString iconToFilePath(const QIcon &pm) const; - virtual QString iconToQrcPath(const QIcon &pm) const; - virtual QPixmap nameToPixmap(const QString &filePath, const QString &qrcPath); - virtual QString pixmapToFilePath(const QPixmap &pm) const; - virtual QString pixmapToQrcPath(const QPixmap &pm) const; - - enum ScriptSource { ScriptDesigner, ScriptExtension, ScriptCustomWidgetPlugin }; - static DomScript*createScript(const QString &script, ScriptSource source); - typedef QList DomScripts; - static void addScript(const QString &script, ScriptSource source, DomScripts &domScripts); - - static bool addFakeMethods(const DomSlots *domSlots, QStringList &fakeSlots, QStringList &fakeSignals); - -private: - static void addCustomWidgetsToWidgetDatabase(const QDesignerFormEditorInterface *core, - QList& custom_widget_list); - static void addFakeMethodsToWidgetDataBase(const DomCustomWidget *domCustomWidget, WidgetDataBaseItem *item); - - static bool m_warningsEnabled; - QDesignerFormEditorInterface *m_core; -}; - -// Contents of clipboard for formbuilder copy and paste operations -// (Actions and widgets) -struct QDESIGNER_SHARED_EXPORT FormBuilderClipboard { - typedef QList ActionList; - - FormBuilderClipboard() {} - FormBuilderClipboard(QWidget *w); - - bool empty() const; - - QWidgetList m_widgets; - ActionList m_actions; -}; - -// Base class for a form builder used in the editor that -// provides copy and paste.(move into base interface) -class QDESIGNER_SHARED_EXPORT QEditorFormBuilder : public QSimpleResource -{ -public: - explicit QEditorFormBuilder(QDesignerFormEditorInterface *core) : QSimpleResource(core) {} - - virtual bool copy(QIODevice *dev, const FormBuilderClipboard &selection) = 0; - virtual DomUI *copy(const FormBuilderClipboard &selection) = 0; - - // A widget parent needs to be specified, otherwise, the widget factory cannot locate the form window via parent - // and thus is not able to construct special widgets (QLayoutWidget). - virtual FormBuilderClipboard paste(DomUI *ui, QWidget *widgetParent, QObject *actionParent = 0) = 0; - virtual FormBuilderClipboard paste(QIODevice *dev, QWidget *widgetParent, QObject *actionParent = 0) = 0; -}; - -} // namespace qdesigner_internal - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/designer/qt_private/qtresourcemodel_p.h b/src/plugins/designer/qt_private/qtresourcemodel_p.h deleted file mode 100644 index 3a40d36445e..00000000000 --- a/src/plugins/designer/qt_private/qtresourcemodel_p.h +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QTRESOURCEMODEL_H -#define QTRESOURCEMODEL_H - -#include "shared_global_p.h" -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QtResourceModel; - -class QDESIGNER_SHARED_EXPORT QtResourceSet // one instance per one form -{ -public: - QStringList activeQrcPaths() const; - - // activateQrcPaths(): if this QtResourceSet is active it emits resourceSetActivated(); - // otherwise only in case if active QtResource set contains one of - // paths which was marked as modified by this resource set, the signal - // is emitted (with reload = true); - // If new path appears on the list it is automatically added to - // loaded list of QtResourceModel. In addition it is marked as modified in case - // QtResourceModel didn't contain the path. - // If some path is removed from that list (and is not used in any other - // resource set) it is automatically unloaded. The removed file can also be - // marked as modified (later when another resource set which contains - // removed path is activated will be reloaded) - void activateQrcPaths(const QStringList &paths, int *errorCount = 0, QString *errorMessages = 0); - - bool isModified(const QString &path) const; // for all paths in resource model (redundant here, maybe it should be removed from here) - void setModified(const QString &path); // for all paths in resource model (redundant here, maybe it should be removed from here) -private: - QtResourceSet(); - QtResourceSet(QtResourceModel *model); - ~QtResourceSet(); - friend class QtResourceModel; - - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QtResourceSet) - Q_DISABLE_COPY(QtResourceSet) -}; - -class QDESIGNER_SHARED_EXPORT QtResourceModel : public QObject // one instance per whole designer -{ - Q_OBJECT -public: - QtResourceModel(QObject *parent = 0); - ~QtResourceModel(); - - QStringList loadedQrcFiles() const; - bool isModified(const QString &path) const; // only for paths which are on loadedQrcFiles() list - void setModified(const QString &path); // only for paths which are on loadedQrcPaths() list - - QList resourceSets() const; - - QtResourceSet *currentResourceSet() const; - void setCurrentResourceSet(QtResourceSet *resourceSet, int *errorCount = 0, QString *errorMessages = 0); - - QtResourceSet *addResourceSet(const QStringList &paths); - void removeResourceSet(QtResourceSet *resourceSet); - - void reload(const QString &path, int *errorCount = 0, QString *errorMessages = 0); - void reload(int *errorCount = 0, QString *errorMessages = 0); - - // Contents of the current resource set (content file to qrc path) - QMap contents() const; - // Find the qrc file belonging to the contained file (from current resource set) - QString qrcPath(const QString &file) const; - - void setWatcherEnabled(bool enable); - bool isWatcherEnabled() const; - - void setWatcherEnabled(const QString &path, bool enable); - bool isWatcherEnabled(const QString &path); - -signals: - void resourceSetActivated(QtResourceSet *resourceSet, bool resourceSetChanged); // resourceSetChanged since last time it was activated! - void qrcFileModifiedExternally(const QString &path); - -private: - friend class QtResourceSet; - - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QtResourceModel) - Q_DISABLE_COPY(QtResourceModel) - - Q_PRIVATE_SLOT(d_func(), void slotFileChanged(const QString &)) -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/designer/qt_private/shared_enums_p.h b/src/plugins/designer/qt_private/shared_enums_p.h deleted file mode 100644 index ea58500bd0a..00000000000 --- a/src/plugins/designer/qt_private/shared_enums_p.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef SHAREDENUMS_H -#define SHAREDENUMS_H - -#include "shared_global_p.h" - -QT_BEGIN_NAMESPACE - -namespace qdesigner_internal { - - // Validation mode of text property line edits - enum TextPropertyValidationMode { - // Allow for multiline editing using literal "\n". - ValidationMultiLine, - // Allow for HTML rich text including multiline editing using literal "\n". - ValidationRichText, - // Validate a stylesheet - ValidationStyleSheet, - // Single line mode, suppresses newlines - ValidationSingleLine, - // Allow only for identifier characters - ValidationObjectName, - // Allow only for identifier characters and colons - ValidationObjectNameScope, - // URL - ValidationURL - }; - - // Container types - enum ContainerType { - // A container with pages, at least one of which one must always be present (for example, QTabWidget) - PageContainer, - // Mdi type container. All pages may be deleted, no concept of page order - MdiContainer, - // Wizard container - WizardContainer - }; - - enum AuxiliaryItemDataRoles { - // item->flags while being edited - ItemFlagsShadowRole = 0x13370551 - }; - -} - -QT_END_NAMESPACE - -#endif // SHAREDENUMS_H diff --git a/src/plugins/designer/qt_private/shared_global_p.h b/src/plugins/designer/qt_private/shared_global_p.h deleted file mode 100644 index 089f6740fde..00000000000 --- a/src/plugins/designer/qt_private/shared_global_p.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef SHARED_GLOBAL_H -#define SHARED_GLOBAL_H - -#include - -#ifdef QT_DESIGNER_STATIC -#define QDESIGNER_SHARED_EXTERN -#define QDESIGNER_SHARED_IMPORT -#else -#define QDESIGNER_SHARED_EXTERN Q_DECL_EXPORT -#define QDESIGNER_SHARED_IMPORT Q_DECL_IMPORT -#endif - -#ifndef QT_NO_SHARED_EXPORT -# ifdef QDESIGNER_SHARED_LIBRARY -# define QDESIGNER_SHARED_EXPORT QDESIGNER_SHARED_EXTERN -# else -# define QDESIGNER_SHARED_EXPORT QDESIGNER_SHARED_IMPORT -# endif -#else -# define QDESIGNER_SHARED_EXPORT -#endif - -#endif // SHARED_GLOBAL_H diff --git a/src/plugins/designer/syncqtheader.sh b/src/plugins/designer/syncqtheader.sh deleted file mode 100755 index 1e0a56248ba..00000000000 --- a/src/plugins/designer/syncqtheader.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh - -############################################################################# -# -# Copyright (C) 2015 The Qt Company Ltd. -# Contact: http://www.qt.io/licensing -# -# This file is part of Qt Creator. -# -# Commercial License Usage -# Licensees holding valid commercial Qt licenses may use this file in -# accordance with the commercial license agreement provided with the -# Software or, alternatively, in accordance with the terms contained in -# a written agreement between you and The Qt Company. For licensing terms and -# conditions see http://www.qt.io/terms-conditions. For further information -# use the contact form at http://www.qt.io/contact-us. -# -# GNU Lesser General Public License Usage -# Alternatively, this file may be used under the terms of the GNU Lesser -# General Public License version 2.1 or version 3 as published by the Free Software -# Foundation and appearing in the file LICENSE.LGPLv21 and LICENSE.LGPLv3 included in the -# packaging of this file. Please review the following information to -# ensure the GNU Lesser General Public License requirements -# will be met: https://www.gnu.org/licenses/lgpl.html and http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -# -# In addition, as a special exception, The Qt Company gives you certain additional -# rights. These rights are described in The Qt Company LGPL Exception -# version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -# -############################################################################# - -# Internal utility script that synchronizes the Qt Designer private headers -# used by the Qt Designer plugin (located in the qt_private) directory -# with the Qt source tree pointed to by the environment variable QTDIR. - -REQUIRED_HEADERS="pluginmanager_p.h iconloader_p.h qdesigner_formwindowmanager_p.h formwindowbase_p.h -abstractnewformwidget_p.h qtresourcemodel_p.h abstractoptionspage_p.h -shared_global_p.h abstractsettings_p.h qdesigner_integration_p.h qsimpleresource_p.h shared_enums_p.h" - -echo Using $QTDIR - -syncHeader() -{ - HDR=$1 - # Locate the Designer header: look in lib/shared or SDK - QTHDR=$QTDIR/tools/designer/src/lib/shared/$HDR - if [ ! -f $QTHDR ] - then - QTHDR=$QTDIR/tools/designer/src/lib/sdk/$HDR - fi - echo Syncing $QTHDR - - [ -f $QTHDR ] || { echo "$HDR does not exist" ; exit 1 ; } - - TARGET=qt_private/$HDR - - # Exchange license header - head -n 28 formwindowfile.h > $TARGET || exit 1 - tail -n +41 $QTHDR >> $TARGET || exit 1 -} - -for H in $REQUIRED_HEADERS -do - syncHeader $H -done From 46d515529a6c316b2032e82989493c89e60109d1 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 14:14:53 +0100 Subject: [PATCH 42/62] Tests: Use real project dependencies in memcheck test Change-Id: Iced26e5b2a4a4ba5e1075e19eeffe96b2e298d0f Reviewed-by: Christian Stenger --- tests/auto/valgrind/memcheck/memcheck.pro | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/auto/valgrind/memcheck/memcheck.pro b/tests/auto/valgrind/memcheck/memcheck.pro index eed8482d763..977beb79377 100644 --- a/tests/auto/valgrind/memcheck/memcheck.pro +++ b/tests/auto/valgrind/memcheck/memcheck.pro @@ -1,3 +1,14 @@ TEMPLATE = subdirs -CONFIG += ordered -SUBDIRS += parsertests.pro modeldemo.pro testapps testrunner.pro + +parsertests.file = parsertests.pro + +modeldemo.file = modeldemo.pro + +testapps.depends = modeldemo parsertests + +testrunner.file = testrunner.pro +testrunner.depends = testapps + +SUBDIRS += parsertests modeldemo testapps testrunner + + From d5f9f78172a18d5858550f0ff352061a7ffb8290 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 15:29:03 +0100 Subject: [PATCH 43/62] Debugger: Remove 'Lldb stdout:' qualification in debugger log That was an early aid to get LLDB up and running. Change-Id: Iac95806cee561a40cd90039f534739a2663e395f Reviewed-by: hjk --- src/plugins/debugger/lldb/lldbengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 8b5b8820d3b..fbf210997b9 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -964,7 +964,7 @@ void LldbEngine::readLldbStandardError() void LldbEngine::readLldbStandardOutput() { QByteArray out = m_lldbProc.readAllStandardOutput(); - showMessage(_("Lldb stdout: " + out)); + showMessage(_(out)); m_inbuffer.append(out); while (true) { int pos = m_inbuffer.indexOf("@\n"); From 02404afd9fa582814c9a261295de03dd831a78ba Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 14:00:00 +0100 Subject: [PATCH 44/62] Debugger: Allow evaluation of children of evaluated expressions Task-number: QTCREATORBUG-5920 Change-Id: I00a42b93e3840f106ee9d4e94e1bc9f677e13e3f Reviewed-by: Christian Stenger --- src/plugins/debugger/watchwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 2ea8632e58e..33cc5be3aff 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -744,9 +744,12 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev) actSelectWidgetToWatch.setEnabled(canHandleWatches && canInsertWatches && engine->hasCapability(WatchWidgetsCapability)); + bool canAddWatches = canHandleWatches && !exp.isEmpty(); + // Suppress for top-level watchers. + if (m_type == WatchersType && mi0.parent().isValid() && !mi0.parent().parent().isValid()) + canAddWatches = false; QAction actWatchExpression(addWatchActionText(exp), 0); - actWatchExpression.setEnabled( - canHandleWatches && !exp.isEmpty() && m_type == LocalsType); + actWatchExpression.setEnabled(canAddWatches); // Can remove watch if engine can handle it or session engine. QModelIndex p = mi0; From e747817c955bef982fac3966e446dd632139c6ed Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 4 Mar 2015 15:04:03 +0100 Subject: [PATCH 45/62] Clean headers of the Qt Designer plugin. Change-Id: Ie0906cf88043c78d109ab7e1b342e62547680d45 Reviewed-by: Jarek Kobus --- src/plugins/designer/formeditorw.cpp | 1 + src/plugins/designer/formeditorw.h | 9 ++++++--- src/plugins/designer/formwindoweditor.h | 1 - src/plugins/designer/settingspage.cpp | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 5231896b327..bc6ddba9f78 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h index 00fd5494b4b..42dcefe82b0 100644 --- a/src/plugins/designer/formeditorw.h +++ b/src/plugins/designer/formeditorw.h @@ -33,14 +33,17 @@ #include "designerconstants.h" -#include -#include +#include QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; QT_END_NAMESPACE -namespace Core { class IEditor; } +namespace Core { +class IEditor; +class IOptionsPage; +} + namespace SharedTools { class WidgetHost; } namespace Designer { diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h index 7b8c1439309..2e5251c128b 100644 --- a/src/plugins/designer/formwindoweditor.h +++ b/src/plugins/designer/formwindoweditor.h @@ -32,7 +32,6 @@ #define FORMWINDOWEDITOR_H #include "designer_export.h" -#include #include namespace Designer { diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp index f88aabd1eb8..d1c597904fd 100644 --- a/src/plugins/designer/settingspage.cpp +++ b/src/plugins/designer/settingspage.cpp @@ -31,6 +31,8 @@ #include "settingspage.h" #include "formeditorw.h" +#include + #include #include From 0b996210f6e0b7d98e505dd313fdc1ed69de3217 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 4 Mar 2015 08:24:16 +0200 Subject: [PATCH 46/62] Project: Deduplicate dependency resolving logic Change-Id: I6af80600b060fa6a99704df0709461799858d41e Reviewed-by: Oswald Buddenhagen --- src/qtcreatorplugin.pri | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri index e3536b35478..a478f498aa3 100644 --- a/src/qtcreatorplugin.pri +++ b/src/qtcreatorplugin.pri @@ -14,33 +14,27 @@ plugin_recmds = $$QTC_PLUGIN_RECOMMENDS include(../qtcreator.pri) +defineReplace(dependencyName) { + dependencies_file = + for(dir, QTC_PLUGIN_DIRS) { + exists($$dir/$$1/$${1}_dependencies.pri) { + dependencies_file = $$dir/$$1/$${1}_dependencies.pri + break() + } + } + isEmpty(dependencies_file): \ + error("Plugin dependency $$dep not found") + include($$dependencies_file) + return($$QTC_PLUGIN_NAME) +} + # for substitution in the .json dependencyList = for(dep, plugin_deps) { - dependencies_file = - for(dir, QTC_PLUGIN_DIRS) { - exists($$dir/$$dep/$${dep}_dependencies.pri) { - dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri - break() - } - } - isEmpty(dependencies_file): \ - error("Plugin dependency $$dep not found") - include($$dependencies_file) - dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\" }" + dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\" }" } for(dep, plugin_recmds) { - dependencies_file = - for(dir, QTC_PLUGIN_DIRS) { - exists($$dir/$$dep/$${dep}_dependencies.pri) { - dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri - break() - } - } - isEmpty(dependencies_file): \ - error("Plugin dependency $$dep not found") - include($$dependencies_file) - dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }" + dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }" } dependencyList = $$join(dependencyList, ",$$escape_expand(\\n)") From 93f57a99a1e9df7e427c346ef78fd1955ee89669 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 4 Mar 2015 10:59:19 +0200 Subject: [PATCH 47/62] C++: Fix nested type resolving in member functions Task-number: QTCREATORBUG-13976 Task-number: QTCREATORBUG-13978 Change-Id: I598f9cb99ffd044abfc6ed9aa16d4a3045985008 Reviewed-by: Przemyslaw Gorszkowski --- src/libs/cplusplus/LookupContext.cpp | 3 ++ src/plugins/cpptools/cppcompletion_test.cpp | 35 ++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 512700c016a..35be29d6f23 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -1705,11 +1705,14 @@ bool CreateBindings::visit(Declaration *decl) bool CreateBindings::visit(Function *function) { + ClassOrNamespace *previous = _currentClassOrNamespace; + _currentClassOrNamespace = lookupType(function, previous); for (unsigned i = 0, count = function->memberCount(); i < count; ++i) { Symbol *s = function->memberAt(i); if (Block *b = s->asBlock()) visit(b); } + _currentClassOrNamespace = previous; return false; } diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index fe82a7a1963..f2eebca8672 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -1482,7 +1482,7 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("A") << QLatin1String("a")); - QTest::newRow("nested_class_declaration_with_object_name_inside_function") << _( + QTest::newRow("nested_named_class_declaration_inside_function") << _( "int foo()\n" "{\n" " struct Nested\n" @@ -1495,6 +1495,39 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("Nested") << QLatin1String("i")); + QTest::newRow("nested_class_inside_member_function") << _( + "struct User { void use(); };\n" + "void User::use()\n" + "{\n" + " struct Foo { int bar; };\n" + " Foo foo;\n" + " @\n" + "}\n" + ) << _("foo.") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); + + QTest::newRow("nested_typedef_inside_member_function") << _( + "struct User { void use(); };\n" + "template\n" + "struct Pointer { T *operator->(); };\n" + "struct Foo\n" + "{\n" + " typedef Pointer Ptr;\n" + " int bar;\n" + "};\n" + "\n" + "void User::use()\n" + "{\n" + " typedef Foo MyFoo;\n" + " MyFoo::Ptr myfoo;\n" + " @\n" + "}\n" + ) << _("myfoo->") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("Ptr") + << QLatin1String("bar")); + QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_1") << _( "struct EnclosingStruct\n" "{\n" From 54da18eaaa2da91aaa3e6f7fba351a22b7a4693e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Feb 2015 13:38:54 +0100 Subject: [PATCH 48/62] Clean exported headers of the Core plugin. Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450 Reviewed-by: Orgad Shaneh --- src/plugins/analyzerbase/analyzermanager.cpp | 2 ++ src/plugins/analyzerbase/detailederrorview.cpp | 2 ++ src/plugins/android/androidmanifestdocument.cpp | 3 +++ src/plugins/android/androidmanifesteditor.h | 2 ++ src/plugins/android/javaeditor.cpp | 11 ++++++----- src/plugins/bazaar/bazaarplugin.cpp | 1 + src/plugins/beautifier/beautifierplugin.cpp | 1 + src/plugins/bookmarks/bookmarkmanager.cpp | 1 + src/plugins/classview/classviewmanager.cpp | 1 + .../cmakeprojectmanager/cmakeprojectmanager.cpp | 8 +++++--- .../coreplugin/actionmanager/actioncontainer.cpp | 1 + src/plugins/coreplugin/actionmanager/actionmanager.h | 2 ++ .../coreplugin/actionmanager/commandbutton.cpp | 4 +++- .../coreplugin/actionmanager/commandmappings.h | 2 -- src/plugins/coreplugin/basefilewizardfactory.h | 5 +---- src/plugins/coreplugin/coreplugin.cpp | 1 + src/plugins/coreplugin/designmode.cpp | 1 + src/plugins/coreplugin/dialogs/ioptionspage.cpp | 11 +++++++++++ src/plugins/coreplugin/dialogs/ioptionspage.h | 10 +++++++--- src/plugins/coreplugin/dialogs/newdialog.h | 1 + src/plugins/coreplugin/dialogs/saveitemsdialog.cpp | 2 ++ .../coreplugin/editormanager/documentmodel.cpp | 1 + src/plugins/coreplugin/editormanager/documentmodel.h | 7 ++++--- src/plugins/coreplugin/editormanager/editorarea.cpp | 1 + .../coreplugin/editormanager/editormanager.cpp | 2 ++ src/plugins/coreplugin/editormanager/editormanager.h | 10 +++------- src/plugins/coreplugin/editormanager/editorview.cpp | 1 + src/plugins/coreplugin/editormanager/ieditorfactory.h | 6 +++++- .../coreplugin/editormanager/openeditorsview.cpp | 1 + src/plugins/coreplugin/editortoolbar.cpp | 1 + src/plugins/coreplugin/editortoolbar.h | 2 -- src/plugins/coreplugin/externaltool.cpp | 1 + src/plugins/coreplugin/externaltoolmanager.cpp | 2 ++ src/plugins/coreplugin/featureprovider.h | 1 - src/plugins/coreplugin/find/findplugin.cpp | 3 +++ src/plugins/coreplugin/find/findtoolbar.cpp | 2 ++ src/plugins/coreplugin/find/searchresultwindow.cpp | 1 + src/plugins/coreplugin/idocument.h | 7 +++---- src/plugins/coreplugin/iwizardfactory.h | 2 -- src/plugins/coreplugin/jsexpander.h | 8 ++++---- src/plugins/coreplugin/locator/filesystemfilter.cpp | 1 + .../coreplugin/locator/opendocumentsfilter.cpp | 1 + src/plugins/coreplugin/modemanager.cpp | 1 + src/plugins/coreplugin/modemanager.h | 2 +- src/plugins/coreplugin/outputpanemanager.cpp | 1 + .../coreplugin/progressmanager/futureprogress.cpp | 1 + .../coreplugin/progressmanager/futureprogress.h | 2 +- .../coreplugin/progressmanager/progressmanager.cpp | 1 + src/plugins/coreplugin/variablechooser.h | 2 -- src/plugins/coreplugin/vcsmanager.h | 2 +- src/plugins/coreplugin/windowsupport.cpp | 1 + src/plugins/cpaster/cpasterplugin.cpp | 1 + src/plugins/cppeditor/cppeditorplugin.cpp | 1 + src/plugins/cppeditor/cppfunctiondecldeflink.cpp | 1 + .../followsymbol_switchmethoddecldef_test.cpp | 1 + src/plugins/cpptools/cppcurrentdocumentfilter.cpp | 1 + src/plugins/cpptools/cpptoolsplugin.cpp | 1 + src/plugins/cpptools/cpptoolsreuse.cpp | 1 + src/plugins/debugger/debuggerengine.cpp | 1 + src/plugins/debugger/debuggermainwindow.cpp | 5 ++++- src/plugins/debugger/debuggerplugin.cpp | 1 + src/plugins/debugger/imageviewer.cpp | 3 +++ src/plugins/debugger/memoryagent.cpp | 1 + src/plugins/designer/formeditorplugin.cpp | 6 +++++- src/plugins/designer/formeditorw.cpp | 1 + src/plugins/designer/formwindoweditor.cpp | 1 + src/plugins/designer/formwindowfile.cpp | 1 + src/plugins/diffeditor/diffeditor.cpp | 1 + src/plugins/diffeditor/diffeditorplugin.cpp | 1 + .../genericprojectmanager/genericprojectplugin.cpp | 1 + src/plugins/git/gitclient.cpp | 2 ++ src/plugins/git/gitplugin.cpp | 2 ++ src/plugins/help/helpwidget.cpp | 1 + src/plugins/imageviewer/imageviewer.cpp | 1 + src/plugins/imageviewer/imageviewerfile.cpp | 2 ++ src/plugins/macros/texteditormacrohandler.cpp | 1 + src/plugins/mercurial/mercurialplugin.cpp | 1 + src/plugins/projectexplorer/appoutputpane.cpp | 1 + .../projectexplorer/foldernavigationwidget.cpp | 1 + src/plugins/projectexplorer/projectexplorer.cpp | 2 ++ src/plugins/projectexplorer/projecttree.cpp | 2 ++ src/plugins/projectexplorer/projecttreewidget.cpp | 1 + src/plugins/projectexplorer/session.cpp | 1 + src/plugins/projectexplorer/taskwindow.cpp | 1 + .../qbsprojectmanager/qbsprojectmanagerplugin.cpp | 1 + .../qmakeprojectmanager/qmakeprojectmanagerplugin.cpp | 1 + .../components/componentcore/crumblebar.cpp | 1 + src/plugins/qmldesigner/designmodewidget.cpp | 1 + src/plugins/qmldesigner/qmldesignerplugin.cpp | 1 + src/plugins/qmldesigner/shortcutmanager.cpp | 2 ++ src/plugins/qmljstools/qmlconsoleview.cpp | 2 ++ src/plugins/qmljstools/qmljstoolsplugin.cpp | 1 + src/plugins/qmlprojectmanager/qmlapp.cpp | 1 + .../qmlprojectmanager/qmlprojectrunconfiguration.cpp | 1 + src/plugins/qnx/qnxplugin.cpp | 1 + src/plugins/qtsupport/uicodemodelsupport.cpp | 1 + src/plugins/resourceeditor/resourceeditorplugin.cpp | 2 ++ src/plugins/tasklist/taskfile.cpp | 2 ++ src/plugins/texteditor/texteditor.cpp | 1 + src/plugins/texteditor/texteditoractionhandler.cpp | 1 + src/plugins/texteditor/texteditorplugin.cpp | 1 + src/plugins/todo/todoitemsprovider.cpp | 1 + src/plugins/vcsbase/vcsbaseplugin.cpp | 1 + 103 files changed, 169 insertions(+), 49 deletions(-) diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index 4db3caedee7..42bddb42141 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/analyzerbase/detailederrorview.cpp b/src/plugins/analyzerbase/detailederrorview.cpp index 73e94b53ee3..1c31a7ff402 100644 --- a/src/plugins/analyzerbase/detailederrorview.cpp +++ b/src/plugins/analyzerbase/detailederrorview.cpp @@ -35,10 +35,12 @@ #include +#include #include #include #include #include +#include #include #include diff --git a/src/plugins/android/androidmanifestdocument.cpp b/src/plugins/android/androidmanifestdocument.cpp index cce32f2edfd..275e8db74cd 100644 --- a/src/plugins/android/androidmanifestdocument.cpp +++ b/src/plugins/android/androidmanifestdocument.cpp @@ -33,6 +33,9 @@ #include "androidconstants.h" #include +#include + +#include #include diff --git a/src/plugins/android/androidmanifesteditor.h b/src/plugins/android/androidmanifesteditor.h index 848a092c622..c8aade5314c 100644 --- a/src/plugins/android/androidmanifesteditor.h +++ b/src/plugins/android/androidmanifesteditor.h @@ -37,6 +37,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE class QToolBar; class QActionGroup; diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp index b190c338c54..ec3c026a090 100644 --- a/src/plugins/android/javaeditor.cpp +++ b/src/plugins/android/javaeditor.cpp @@ -34,15 +34,16 @@ #include "androidconstants.h" #include "javacompletionassistprovider.h" -#include -#include -#include #include - +#include +#include #include #include -#include +#include + #include +#include +#include #include diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index 9729f00d97c..1bc842a1ccb 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp index bc10838bfde..67bafd1a132 100644 --- a/src/plugins/beautifier/beautifierplugin.cpp +++ b/src/plugins/beautifier/beautifierplugin.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index fbca8c0a726..17936c7f10d 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp index caf39ef7ffc..ba2db7452bd 100644 --- a/src/plugins/classview/classviewmanager.cpp +++ b/src/plugins/classview/classviewmanager.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 2f5c2714992..4749d34f399 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -34,15 +34,17 @@ #include "cmakeproject.h" #include "cmakesettingspage.h" -#include - #include #include #include #include -#include #include #include +#include + +#include + +#include #include using namespace CMakeProjectManager::Internal; diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp index ef618123d6e..a1aef0885fa 100644 --- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp +++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp @@ -32,6 +32,7 @@ #include "actionmanager.h" #include +#include #include #include diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.h b/src/plugins/coreplugin/actionmanager/actionmanager.h index 493143cfbb5..7e924af38c9 100644 --- a/src/plugins/coreplugin/actionmanager/actionmanager.h +++ b/src/plugins/coreplugin/actionmanager/actionmanager.h @@ -48,6 +48,8 @@ QT_END_NAMESPACE namespace Core { class ActionContainer; +class Command; +class Context; namespace Internal { class CorePlugin; diff --git a/src/plugins/coreplugin/actionmanager/commandbutton.cpp b/src/plugins/coreplugin/actionmanager/commandbutton.cpp index 76e0fd4bf37..0b6c273d4ec 100644 --- a/src/plugins/coreplugin/actionmanager/commandbutton.cpp +++ b/src/plugins/coreplugin/actionmanager/commandbutton.cpp @@ -29,8 +29,10 @@ ****************************************************************************/ #include "commandbutton.h" +#include "actionmanager.h" +#include "command.h" +#include "../id.h" -#include #include using namespace Core; diff --git a/src/plugins/coreplugin/actionmanager/commandmappings.h b/src/plugins/coreplugin/actionmanager/commandmappings.h index 8fbb3951719..00da4509018 100644 --- a/src/plugins/coreplugin/actionmanager/commandmappings.h +++ b/src/plugins/coreplugin/actionmanager/commandmappings.h @@ -33,8 +33,6 @@ #include -#include - QT_BEGIN_NAMESPACE class QLineEdit; class QTreeWidget; diff --git a/src/plugins/coreplugin/basefilewizardfactory.h b/src/plugins/coreplugin/basefilewizardfactory.h index 44f3d64248b..e4028522616 100644 --- a/src/plugins/coreplugin/basefilewizardfactory.h +++ b/src/plugins/coreplugin/basefilewizardfactory.h @@ -33,14 +33,11 @@ #include "core_global.h" #include "generatedfile.h" -#include "featureprovider.h" #include -#include - -#include #include +#include QT_BEGIN_NAMESPACE class QIcon; diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 923bd2cdcb1..4246dfe7295 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -31,6 +31,7 @@ #include "coreplugin.h" #include "designmode.h" #include "editmode.h" +#include "idocument.h" #include "helpmanager.h" #include "mainwindow.h" #include "modemanager.h" diff --git a/src/plugins/coreplugin/designmode.cpp b/src/plugins/coreplugin/designmode.cpp index fe5dd3556f7..f119a29eba8 100644 --- a/src/plugins/coreplugin/designmode.cpp +++ b/src/plugins/coreplugin/designmode.cpp @@ -31,6 +31,7 @@ #include "designmode.h" #include +#include #include #include #include diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp index f25a8169abc..9b6bdd2ba86 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp +++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -80,6 +81,11 @@ side of the \gui Options dialog. */ +QIcon Core::IOptionsPage::categoryIcon() const +{ + return QIcon(m_categoryIcon); +} + /*! \fn QWidget *IOptionsPage::widget() @@ -183,3 +189,8 @@ bool Core::IOptionsPage::matches(const QString &searchKeyWord) const return true; return false; } + +QIcon Core::IOptionsPageProvider::categoryIcon() const +{ + return QIcon(m_categoryIcon); +} diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.h b/src/plugins/coreplugin/dialogs/ioptionspage.h index 247437fbb53..4d0a35af425 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.h +++ b/src/plugins/coreplugin/dialogs/ioptionspage.h @@ -33,10 +33,14 @@ #include -#include #include #include +QT_BEGIN_NAMESPACE +class QIcon; +class QWidget; +QT_END_NAMESPACE + namespace Core { class CORE_EXPORT IOptionsPage : public QObject @@ -51,7 +55,7 @@ public: QString displayName() const { return m_displayName; } Id category() const { return m_category; } QString displayCategory() const { return m_displayCategory; } - QIcon categoryIcon() const { return QIcon(m_categoryIcon); } + QIcon categoryIcon() const; virtual bool matches(const QString &searchKeyWord) const; virtual QWidget *widget() = 0; @@ -92,7 +96,7 @@ public: Id category() const { return m_category; } QString displayCategory() const { return m_displayCategory; } - QIcon categoryIcon() const { return QIcon(m_categoryIcon); } + QIcon categoryIcon() const; virtual QList pages() const = 0; virtual bool matches(const QString & /* searchKeyWord*/) const = 0; diff --git a/src/plugins/coreplugin/dialogs/newdialog.h b/src/plugins/coreplugin/dialogs/newdialog.h index 3ce9c6158c8..bf1b0d6da38 100644 --- a/src/plugins/coreplugin/dialogs/newdialog.h +++ b/src/plugins/coreplugin/dialogs/newdialog.h @@ -36,6 +36,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE class QAbstractProxyModel; diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp index 52f1f631e49..89b59da6d91 100644 --- a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp @@ -32,6 +32,8 @@ #include #include + +#include #include #include diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp index aa4b7b0401e..79652c1d380 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.cpp +++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/coreplugin/editormanager/documentmodel.h b/src/plugins/coreplugin/editormanager/documentmodel.h index daf2996755c..28d1f9348ea 100644 --- a/src/plugins/coreplugin/editormanager/documentmodel.h +++ b/src/plugins/coreplugin/editormanager/documentmodel.h @@ -36,9 +36,10 @@ #include -#include - -QT_FORWARD_DECLARE_CLASS(QIcon) +QT_BEGIN_NAMESPACE +class QAbstractItemModel; +class QIcon; +QT_END_NAMESPACE namespace Core { diff --git a/src/plugins/coreplugin/editormanager/editorarea.cpp b/src/plugins/coreplugin/editormanager/editorarea.cpp index ef5d1662b0a..d1227e5f5e9 100644 --- a/src/plugins/coreplugin/editormanager/editorarea.cpp +++ b/src/plugins/coreplugin/editormanager/editorarea.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index e7ff06cff02..82a156ab421 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -68,6 +69,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index f2b123c3baf..dc945802504 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -35,18 +35,14 @@ #include "documentmodel.h" -#include -#include // enumerations -#include - #include #include -#include #include -QT_BEGIN_NAMESPACE -QT_END_NAMESPACE +QT_FORWARD_DECLARE_CLASS(QMenu) + +namespace Utils { class MimeType; } namespace Core { diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index ae541c885a9..85fb0baf324 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -50,6 +50,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.h b/src/plugins/coreplugin/editormanager/ieditorfactory.h index e7e3e69ba08..ec979067447 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.h +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.h @@ -31,7 +31,11 @@ #ifndef IEDITORFACTORY_H #define IEDITORFACTORY_H -#include +#include +#include + +#include +#include namespace Core { diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 263f8ff7da4..08ab7770064 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index 50853a460b8..f2dc220f9e5 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -31,6 +31,7 @@ #include "editortoolbar.h" #include +#include #include #include #include diff --git a/src/plugins/coreplugin/editortoolbar.h b/src/plugins/coreplugin/editortoolbar.h index 7d13929607e..d2c16cf54e4 100644 --- a/src/plugins/coreplugin/editortoolbar.h +++ b/src/plugins/coreplugin/editortoolbar.h @@ -35,8 +35,6 @@ #include -#include - #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp index 66023c55349..f3c0acc2356 100644 --- a/src/plugins/coreplugin/externaltool.cpp +++ b/src/plugins/coreplugin/externaltool.cpp @@ -31,6 +31,7 @@ #include "externaltool.h" #include "externaltoolmanager.h" +#include "idocument.h" #include "messagemanager.h" #include "documentmanager.h" #include "editormanager/editormanager.h" diff --git a/src/plugins/coreplugin/externaltoolmanager.cpp b/src/plugins/coreplugin/externaltoolmanager.cpp index 72efa03bb29..a95f93c0b21 100644 --- a/src/plugins/coreplugin/externaltoolmanager.cpp +++ b/src/plugins/coreplugin/externaltoolmanager.cpp @@ -31,10 +31,12 @@ #include "externaltoolmanager.h" #include "externaltool.h" #include "coreconstants.h" +#include "icontext.h" #include "icore.h" #include "messagemanager.h" #include "actionmanager/actionmanager.h" #include "actionmanager/actioncontainer.h" +#include "actionmanager/command.h" #include diff --git a/src/plugins/coreplugin/featureprovider.h b/src/plugins/coreplugin/featureprovider.h index 32b3439cde5..8155653fa10 100644 --- a/src/plugins/coreplugin/featureprovider.h +++ b/src/plugins/coreplugin/featureprovider.h @@ -35,7 +35,6 @@ #include -#include #include #include diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index 36b7dc99f14..f1ca96d63aa 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -34,10 +34,13 @@ #include "findtoolbar.h" #include "findtoolwindow.h" #include "searchresultwindow.h" +#include "icontext.h" #include "ifindfilter.h" #include #include +#include + #include #include #include diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp index b21d7c05189..11fb61501ee 100644 --- a/src/plugins/coreplugin/find/findtoolbar.cpp +++ b/src/plugins/coreplugin/find/findtoolbar.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "findtoolbar.h" +#include "icontext.h" #include "ifindfilter.h" #include "findplugin.h" @@ -37,6 +38,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp index 1edc96f4a56..8233dd43885 100644 --- a/src/plugins/coreplugin/find/searchresultwindow.cpp +++ b/src/plugins/coreplugin/find/searchresultwindow.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/coreplugin/idocument.h b/src/plugins/coreplugin/idocument.h index 450a9bed17b..d65f43fd3a1 100644 --- a/src/plugins/coreplugin/idocument.h +++ b/src/plugins/coreplugin/idocument.h @@ -32,14 +32,13 @@ #define IDOCUMENT_H #include "core_global.h" -#include "id.h" - -#include #include -namespace Core { +namespace Utils { class FileName; } +namespace Core { +class Id; class InfoBar; namespace Internal { diff --git a/src/plugins/coreplugin/iwizardfactory.h b/src/plugins/coreplugin/iwizardfactory.h index 4c0d6b32a98..e18714e2cf9 100644 --- a/src/plugins/coreplugin/iwizardfactory.h +++ b/src/plugins/coreplugin/iwizardfactory.h @@ -32,13 +32,11 @@ #define IWIZARDFACTORY_H #include -#include #include #include #include #include -#include namespace Core { diff --git a/src/plugins/coreplugin/jsexpander.h b/src/plugins/coreplugin/jsexpander.h index 6508b26f950..9bf8f990000 100644 --- a/src/plugins/coreplugin/jsexpander.h +++ b/src/plugins/coreplugin/jsexpander.h @@ -33,10 +33,10 @@ #include "core_global.h" -#include - -#include -#include +QT_BEGIN_NAMESPACE +class QObject; +class QString; +QT_END_NAMESPACE namespace Core { diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp index 211cf535ca1..59ee3827aa7 100644 --- a/src/plugins/coreplugin/locator/filesystemfilter.cpp +++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp @@ -32,6 +32,7 @@ #include "locatorwidget.h" #include #include +#include #include #include diff --git a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp index 68cd2597412..61b9c46117f 100644 --- a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp +++ b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index 800d125d212..64c107def76 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -36,6 +36,7 @@ #include "mainwindow.h" #include +#include #include #include diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h index a219dcfd15b..ae74dd4a949 100644 --- a/src/plugins/coreplugin/modemanager.h +++ b/src/plugins/coreplugin/modemanager.h @@ -32,7 +32,6 @@ #define MODEMANAGER_H #include -#include #include QT_BEGIN_NAMESPACE @@ -41,6 +40,7 @@ QT_END_NAMESPACE namespace Core { +class Id; class IMode; namespace Internal { diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index 14865ff866b..e77fa29dd80 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp index e068d0ad2c4..837e35d05cd 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp +++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "futureprogress.h" +#include "id.h" #include "progressbar.h" #include diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.h b/src/plugins/coreplugin/progressmanager/futureprogress.h index 48ead2dfe4a..189d4edfa01 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.h +++ b/src/plugins/coreplugin/progressmanager/futureprogress.h @@ -32,13 +32,13 @@ #define FUTUREPROGRESS_H #include -#include #include #include #include namespace Core { +class Id; class FutureProgressPrivate; class CORE_EXPORT FutureProgress : public QWidget diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index dcfd838bcce..d20b22e4d84 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -33,6 +33,7 @@ #include "progressbar.h" #include "progressview.h" #include "../actionmanager/actionmanager.h" +#include "../actionmanager/command.h" #include "../icontext.h" #include "../coreconstants.h" #include "../icore.h" diff --git a/src/plugins/coreplugin/variablechooser.h b/src/plugins/coreplugin/variablechooser.h index 3326ca923ea..7266af6365a 100644 --- a/src/plugins/coreplugin/variablechooser.h +++ b/src/plugins/coreplugin/variablechooser.h @@ -38,8 +38,6 @@ #include #include -namespace Utils { class MacroExpander; } - namespace Core { namespace Internal { class VariableChooserPrivate; } diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h index 1cc5350e332..4631ee80bae 100644 --- a/src/plugins/coreplugin/vcsmanager.h +++ b/src/plugins/coreplugin/vcsmanager.h @@ -32,13 +32,13 @@ #define VCSMANAGER_H #include "core_global.h" -#include "id.h" #include #include namespace Core { +class Id; class IVersionControl; namespace Internal { class MainWindow; } diff --git a/src/plugins/coreplugin/windowsupport.cpp b/src/plugins/coreplugin/windowsupport.cpp index 742472e8f7d..5c46a1fbeef 100644 --- a/src/plugins/coreplugin/windowsupport.cpp +++ b/src/plugins/coreplugin/windowsupport.cpp @@ -32,6 +32,7 @@ #include "actionmanager/actioncontainer.h" #include "actionmanager/actionmanager.h" +#include "actionmanager/command.h" #include "coreconstants.h" #include "icore.h" diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 338cb5dab92..083394205ed 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -61,6 +61,7 @@ #include #include #include +#include #include using namespace Core; diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 377d5857039..c8afea541a3 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -52,6 +52,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp index 46bf00bc83c..80625bdf817 100644 --- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp +++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp @@ -34,6 +34,7 @@ #include "cppquickfixassistant.h" #include +#include #include #include #include diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 2de53e8e62a..6fad7736c89 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -42,6 +42,7 @@ #include #include +#include #include diff --git a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp index a068820e1c5..e4fb68f6db7 100644 --- a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp +++ b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp @@ -33,6 +33,7 @@ #include "cppmodelmanager.h" #include +#include #include diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 2a352a6b7de..5f1339c2eff 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp index d0dd2838e3d..77d2ade2986 100644 --- a/src/plugins/cpptools/cpptoolsreuse.cpp +++ b/src/plugins/cpptools/cpptoolsreuse.cpp @@ -31,6 +31,7 @@ #include "cpptoolsreuse.h" #include +#include #include #include diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 70f752d52ac..ee52c753008 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index 87075340d73..44583096165 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -55,9 +56,11 @@ #include +#include #include -#include +#include #include +#include using namespace Core; using namespace ProjectExplorer; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 5d6587f6efd..d63ce13af00 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -74,6 +74,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/debugger/imageviewer.cpp b/src/plugins/debugger/imageviewer.cpp index 26015f9fc68..898ef7069a2 100644 --- a/src/plugins/debugger/imageviewer.cpp +++ b/src/plugins/debugger/imageviewer.cpp @@ -33,8 +33,11 @@ #include #include +#include +#include #include +#include #include #include #include diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp index 18835e23636..5dbef0020f2 100644 --- a/src/plugins/debugger/memoryagent.cpp +++ b/src/plugins/debugger/memoryagent.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp index 36322b33f65..daeff861699 100644 --- a/src/plugins/designer/formeditorplugin.cpp +++ b/src/plugins/designer/formeditorplugin.cpp @@ -43,18 +43,22 @@ #include #include +#include #include #include +#include #include #include #include #include #include -# + +#include #include #include #include #include +#include #include #include diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index bc6ddba9f78..c46de4b52fd 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp index 7dfdaa4396a..4bf4ddea849 100644 --- a/src/plugins/designer/formwindoweditor.cpp +++ b/src/plugins/designer/formwindoweditor.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp index 082c3f6462b..cb6d053774b 100644 --- a/src/plugins/designer/formwindowfile.cpp +++ b/src/plugins/designer/formwindowfile.cpp @@ -32,6 +32,7 @@ #include "designerconstants.h" #include "resourcehandler.h" +#include #include #include diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp index 6058e119f9c..1b63b8f5a60 100644 --- a/src/plugins/diffeditor/diffeditor.cpp +++ b/src/plugins/diffeditor/diffeditor.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 984931dea05..4a980d99218 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -37,6 +37,7 @@ #include "diffeditorreloader.h" #include "differ.h" +#include #include #include #include diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp index 79aa8abcd25..2b784b24346 100644 --- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp +++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 54495670598..42767f0d253 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -75,6 +75,8 @@ #include #include +#include +#include #include #include #include diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 4c9f1b9dbde..f49ef9b6a9d 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +83,7 @@ #include #include +#include #include #ifdef WITH_TESTS diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index ed4a566e8eb..98ca352d44e 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp index 2520d59e11c..fd03c866a22 100644 --- a/src/plugins/imageviewer/imageviewer.cpp +++ b/src/plugins/imageviewer/imageviewer.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index 3216178bf9b..5e55f1b4405 100644 --- a/src/plugins/imageviewer/imageviewerfile.cpp +++ b/src/plugins/imageviewer/imageviewerfile.cpp @@ -33,6 +33,8 @@ #include "imageviewer.h" #include "imageviewerconstants.h" +#include + #include namespace ImageViewer { diff --git a/src/plugins/macros/texteditormacrohandler.cpp b/src/plugins/macros/texteditormacrohandler.cpp index a05ff0a00d7..6b42e0f7772 100644 --- a/src/plugins/macros/texteditormacrohandler.cpp +++ b/src/plugins/macros/texteditormacrohandler.cpp @@ -42,6 +42,7 @@ #include #include +#include #include #include diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 13ada03c798..1c077cde2ba 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index 8af58af9a38..a269723f362 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -36,6 +36,7 @@ #include "windebuginterface.h" #include +#include #include #include #include diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp index d6f3a39ad6b..6a51aa65382 100644 --- a/src/plugins/projectexplorer/foldernavigationwidget.cpp +++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 97be5283c66..78ccc8d2692 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -108,12 +108,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/src/plugins/projectexplorer/projecttree.cpp b/src/plugins/projectexplorer/projecttree.cpp index 3f7e0a1e6f2..66173a4856a 100644 --- a/src/plugins/projectexplorer/projecttree.cpp +++ b/src/plugins/projectexplorer/projecttree.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include #include +#include #include namespace { diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 29113512ce9..aba3e4c32ab 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 591fd04e895..716e03bddd7 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -37,6 +37,7 @@ #include "projectnodes.h" #include +#include #include #include #include diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 173a51bf183..07489dc7b2f 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -37,6 +37,7 @@ #include "taskmodel.h" #include +#include #include #include #include diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp index b9a2f234d01..8c68d5114a5 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp index de5d9168134..8a495d4accb 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp index d4fcfedb993..c66dbd8853e 100644 --- a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp +++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 3efb840e71f..5638c6d19a5 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp index 85c355fc03c..11e67f24eba 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.cpp +++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp index 5f8ccfcf8f1..dc65e459007 100644 --- a/src/plugins/qmldesigner/shortcutmanager.cpp +++ b/src/plugins/qmldesigner/shortcutmanager.cpp @@ -32,7 +32,9 @@ #include #include +#include #include +#include #include #include #include diff --git a/src/plugins/qmljstools/qmlconsoleview.cpp b/src/plugins/qmljstools/qmlconsoleview.cpp index 0d97940ed3f..ee374f0f008 100644 --- a/src/plugins/qmljstools/qmlconsoleview.cpp +++ b/src/plugins/qmljstools/qmlconsoleview.cpp @@ -36,6 +36,8 @@ #include #include +#include +#include #include #include #include diff --git a/src/plugins/qmljstools/qmljstoolsplugin.cpp b/src/plugins/qmljstools/qmljstoolsplugin.cpp index 43bdbca48de..8c2f637fed6 100644 --- a/src/plugins/qmljstools/qmljstoolsplugin.cpp +++ b/src/plugins/qmljstools/qmljstoolsplugin.cpp @@ -38,6 +38,7 @@ #include "qmlconsolemanager.h" #include "qmljsbundleprovider.h" +#include #include #include #include diff --git a/src/plugins/qmlprojectmanager/qmlapp.cpp b/src/plugins/qmlprojectmanager/qmlapp.cpp index 574677a30f7..32015d4a89d 100644 --- a/src/plugins/qmlprojectmanager/qmlapp.cpp +++ b/src/plugins/qmlprojectmanager/qmlapp.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 3da719d53b1..a5357373b2d 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp index 8bf083d2ec3..8d499e7f559 100644 --- a/src/plugins/qnx/qnxplugin.cpp +++ b/src/plugins/qnx/qnxplugin.cpp @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qtsupport/uicodemodelsupport.cpp b/src/plugins/qtsupport/uicodemodelsupport.cpp index 445dc1048d2..0fb3f4154b2 100644 --- a/src/plugins/qtsupport/uicodemodelsupport.cpp +++ b/src/plugins/qtsupport/uicodemodelsupport.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index df4d22a2958..bf2d9f3d403 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +59,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/tasklist/taskfile.cpp b/src/plugins/tasklist/taskfile.cpp index 1c3c889dba5..5e1fcf60fdf 100644 --- a/src/plugins/tasklist/taskfile.cpp +++ b/src/plugins/tasklist/taskfile.cpp @@ -32,6 +32,8 @@ #include "tasklistplugin.h" +#include + using namespace TaskList; using namespace TaskList::Internal; diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 342eceb8ed1..d52105f69b6 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 06fa947cec6..ae481a8b17d 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 88ac6b44690..1333f770166 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/src/plugins/todo/todoitemsprovider.cpp b/src/plugins/todo/todoitemsprovider.cpp index a4d531c1850..ccad022cfde 100644 --- a/src/plugins/todo/todoitemsprovider.cpp +++ b/src/plugins/todo/todoitemsprovider.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index ce0bc1bc1bb..366f76d51f6 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include From e79808a8f7b3a38bdd0b9709cd6796e941ee3003 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 17:43:59 +0100 Subject: [PATCH 49/62] Debugger: Don't show a location marker in the mixed master engine Task-number: QTCREATORBUG-14087 Change-Id: I7e8f116c97cdea0bd8234d060d068435229e6fc2 Reviewed-by: Christian Stenger --- src/plugins/debugger/cdb/cdbengine.h | 3 +++ src/plugins/debugger/debuggerengine.h | 1 + src/plugins/debugger/debuggerplugin.cpp | 10 ++++++---- src/plugins/debugger/gdb/gdbengine.h | 1 + src/plugins/debugger/lldb/lldbengine.h | 2 ++ src/plugins/debugger/qml/qmlcppengine.cpp | 5 ----- src/plugins/debugger/qml/qmlcppengine.h | 2 +- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.h b/src/plugins/debugger/cdb/cdbengine.h index 70055f29749..1b6845552a2 100644 --- a/src/plugins/debugger/cdb/cdbengine.h +++ b/src/plugins/debugger/cdb/cdbengine.h @@ -79,6 +79,9 @@ public: virtual bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget, const DebuggerToolTipContext &context); + + virtual DebuggerEngine *cppEngine() { return this; } + virtual void setupEngine(); virtual void setupInferior(); virtual void runEngine(); diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 2ebe99c70ed..80075c9e023 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -256,6 +256,7 @@ public: bool isSlaveEngine() const; bool isMasterEngine() const; DebuggerEngine *masterEngine() const; + virtual DebuggerEngine *cppEngine() { return 0; } virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; } diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index d63ce13af00..a684881c456 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -943,10 +943,12 @@ public slots: void handleOperateByInstructionTriggered(bool operateByInstructionTriggered) { // Go to source only if we have the file. - if (currentEngine()->stackHandler()->currentIndex() >= 0) { - const StackFrame frame = currentEngine()->stackHandler()->currentFrame(); - if (operateByInstructionTriggered || frame.isUsable()) - currentEngine()->gotoLocation(Location(frame, true)); + if (DebuggerEngine *cppEngine = currentEngine()->cppEngine()) { + if (cppEngine->stackHandler()->currentIndex() >= 0) { + const StackFrame frame = cppEngine->stackHandler()->currentFrame(); + if (operateByInstructionTriggered || frame.isUsable()) + cppEngine->gotoLocation(Location(frame, true)); + } } } diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index b76bac82a1e..51819122fba 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -72,6 +72,7 @@ public: ~GdbEngine(); private: ////////// General Interface ////////// + virtual DebuggerEngine *cppEngine() { return this; } virtual void setupEngine() = 0; virtual void handleGdbStartFailed(); diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index fa766fee453..46e8a780ea7 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -68,6 +68,8 @@ public: private: // DebuggerEngine implementation + DebuggerEngine *cppEngine() { return this; } + void executeStep(); void executeStepOut(); void executeNext(); diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 08bfb8cf0da..f2a5b82ab93 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -773,11 +773,6 @@ void QmlCppEngine::debugLastCommand() m_cppEngine->debugLastCommand(); } -DebuggerEngine *QmlCppEngine::cppEngine() const -{ - return m_cppEngine; -} - DebuggerEngine *QmlCppEngine::qmlEngine() const { return m_qmlEngine; diff --git a/src/plugins/debugger/qml/qmlcppengine.h b/src/plugins/debugger/qml/qmlcppengine.h index 898803ee69a..4546f177ee7 100644 --- a/src/plugins/debugger/qml/qmlcppengine.h +++ b/src/plugins/debugger/qml/qmlcppengine.h @@ -84,7 +84,7 @@ public: void assignValueInDebugger(const WatchData *data, const QString &expr, const QVariant &value); - DebuggerEngine *cppEngine() const; + DebuggerEngine *cppEngine() { return m_cppEngine; } DebuggerEngine *qmlEngine() const; void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result); From e2421afd1b2c100d35fe9b7d6a8775eba8b7b792 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 17:50:52 +0100 Subject: [PATCH 50/62] Debugger: Simplify *SlaveEngineType StartParameters members The secondSlaveEngineType was not really used, and the first either NoEngineType or identical to the cppEngineType. Change-Id: I1725728ca38636f228ff9b9d8ca7d643a34c64e8 Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerruncontrol.cpp | 7 ++----- src/plugins/debugger/debuggerstartparameters.h | 6 ------ src/plugins/debugger/qml/qmlcppengine.cpp | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index dc5711d30b3..4162ca16298 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -414,13 +414,10 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate const bool useCppDebugger = aspect->useCppDebugger() && (sp.languages & CppLanguage); const bool useQmlDebugger = aspect->useQmlDebugger() && (sp.languages & QmlLanguage); if (useQmlDebugger) { - if (useCppDebugger) { + if (useCppDebugger) sp.masterEngineType = QmlCppEngineType; - sp.firstSlaveEngineType = sp.cppEngineType; - sp.secondSlaveEngineType = QmlCppEngineType; - } else { + else sp.masterEngineType = QmlEngineType; - } } else { sp.masterEngineType = sp.cppEngineType; } diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index cb083d0173b..03ece7fc8b5 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -79,8 +79,6 @@ public: DebuggerStartParameters() : masterEngineType(NoEngineType), - firstSlaveEngineType(NoEngineType), - secondSlaveEngineType(NoEngineType), cppEngineType(NoEngineType), runConfiguration(0), isSnapshot(false), @@ -102,11 +100,7 @@ public: testCase(0) {} - //Core::Id profileId; - DebuggerEngineType masterEngineType; - DebuggerEngineType firstSlaveEngineType; - DebuggerEngineType secondSlaveEngineType; DebuggerEngineType cppEngineType; QString sysRoot; QString deviceSymbolsRoot; diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index f2a5b82ab93..be9a936b396 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -74,7 +74,7 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, QString *errorMess { setObjectName(QLatin1String("QmlCppEngine")); m_qmlEngine = new QmlEngine(sp, this); - m_cppEngine = DebuggerRunControlFactory::createEngine(sp.firstSlaveEngineType, sp, errorMessage); + m_cppEngine = DebuggerRunControlFactory::createEngine(sp.cppEngineType, sp, errorMessage); if (!m_cppEngine) { *errorMessage = tr("The slave debugging engine required for combined QML/C++-Debugging could not be created: %1").arg(*errorMessage); return; From 5eedf273be575112004893c79ff753b1c33f9ba2 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 4 Mar 2015 18:00:22 +0100 Subject: [PATCH 51/62] Debugger: Remove unused StartParameter members Change-Id: I38a0ea389bf4cb792c26f713660cbe0143c35f8a Reviewed-by: Christian Stenger Reviewed-by: Orgad Shaneh --- src/plugins/debugger/debuggerstartparameters.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index 03ece7fc8b5..abe24ae120e 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -72,11 +72,6 @@ public: class DEBUGGER_EXPORT DebuggerStartParameters { public: - enum CommunicationChannel { - CommunicationChannelTcpIp, - CommunicationChannelUsb - }; - DebuggerStartParameters() : masterEngineType(NoEngineType), cppEngineType(NoEngineType), @@ -95,8 +90,6 @@ public: startMode(NoStartMode), closeMode(KillAtClose), useCtrlCStub(false), - testReceiver(0), - testCallback(0), testCase(0) {} @@ -165,8 +158,6 @@ public: bool useCtrlCStub; // For Debugger testing. - QObject *testReceiver; - const char *testCallback; int testCase; }; From fb80206f3c2e9486e8521409d0e984b45e06b110 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 5 Mar 2015 08:22:48 +0100 Subject: [PATCH 52/62] Clean exported headers of the CppTools plugin. Change-Id: I0144ac33e88980c431c54a6d69bbde28da4b1967 Reviewed-by: Orgad Shaneh --- src/plugins/cppeditor/cppelementevaluator.cpp | 1 + src/plugins/cppeditor/cppelementevaluator.h | 2 ++ src/plugins/cppeditor/cppfunctiondecldeflink.cpp | 1 + src/plugins/cppeditor/cppquickfix_test.h | 2 ++ src/plugins/cppeditor/cppquickfixassistant.cpp | 1 + src/plugins/cpptools/baseeditordocumentparser.cpp | 1 + src/plugins/cpptools/builtinindexingsupport.cpp | 2 ++ src/plugins/cpptools/cppclassesfilter.h | 2 +- src/plugins/cpptools/cppcodeformatter.h | 1 - src/plugins/cpptools/cppcodemodelinspectordumper.cpp | 1 + src/plugins/cpptools/cppcodemodelinspectordumper.h | 4 +++- src/plugins/cpptools/cppcodestylesettings.cpp | 2 ++ src/plugins/cpptools/cppcodestylesettings.h | 6 +++--- src/plugins/cpptools/cppcodestylesettingspage.cpp | 1 + src/plugins/cpptools/cppcompletionassist.cpp | 1 + src/plugins/cpptools/cppcompletionassistprovider.h | 4 ++-- src/plugins/cpptools/cppcurrentdocumentfilter.cpp | 3 ++- src/plugins/cpptools/cppincludesfilter.cpp | 1 + src/plugins/cpptools/cppindexingsupport.h | 3 ++- src/plugins/cpptools/cppmodelmanager.cpp | 3 +++ src/plugins/cpptools/cppmodelmanager.h | 4 ---- src/plugins/cpptools/cppmodelmanager_test.cpp | 1 + .../cpptools/cpppointerdeclarationformatter.cpp | 3 +++ src/plugins/cpptools/cpppointerdeclarationformatter.h | 6 +++++- .../cpptools/cpppointerdeclarationformatter_test.cpp | 1 + src/plugins/cpptools/cppprojectfile.h | 2 -- src/plugins/cpptools/cppprojects.cpp | 3 +++ src/plugins/cpptools/cppprojects.h | 6 +++++- src/plugins/cpptools/cpprefactoringchanges.cpp | 2 ++ src/plugins/cpptools/cpprefactoringchanges.h | 5 ++--- src/plugins/cpptools/cpptoolsplugin.cpp | 1 + src/plugins/cpptools/cpptoolstestcase.cpp | 3 ++- src/plugins/cpptools/cpptoolstestcase.h | 6 ++++-- src/plugins/cpptools/doxygengenerator.h | 2 +- src/plugins/cpptools/editordocumenthandle.h | 2 +- src/plugins/cpptools/insertionpointlocator.cpp | 3 +++ src/plugins/cpptools/modelmanagertesthelper.h | 2 ++ src/plugins/cpptools/semantichighlighter.cpp | 3 +++ src/plugins/cpptools/semantichighlighter.h | 11 ++++++----- src/plugins/cpptools/symbolfinder.h | 11 +++++++++-- src/plugins/cpptools/symbolsearcher_test.cpp | 1 + src/plugins/cpptools/symbolsfindfilter.cpp | 2 ++ src/plugins/cpptools/symbolsfindfilter.h | 2 ++ src/plugins/cpptools/typehierarchybuilder.h | 5 +++-- src/plugins/designer/qtcreatorintegration.cpp | 1 + src/plugins/qmljstools/qmljsmodelmanager.cpp | 1 + 46 files changed, 96 insertions(+), 35 deletions(-) diff --git a/src/plugins/cppeditor/cppelementevaluator.cpp b/src/plugins/cppeditor/cppelementevaluator.cpp index 29759118fad..fa85a8eb05d 100644 --- a/src/plugins/cppeditor/cppelementevaluator.cpp +++ b/src/plugins/cppeditor/cppelementevaluator.cpp @@ -30,6 +30,7 @@ #include "cppelementevaluator.h" +#include #include #include diff --git a/src/plugins/cppeditor/cppelementevaluator.h b/src/plugins/cppeditor/cppelementevaluator.h index 03505769bbe..16fc718f482 100644 --- a/src/plugins/cppeditor/cppelementevaluator.h +++ b/src/plugins/cppeditor/cppelementevaluator.h @@ -35,6 +35,8 @@ #include #include +#include + #include #include #include diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp index 80625bdf817..4c359ed9b62 100644 --- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp +++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/src/plugins/cppeditor/cppquickfix_test.h b/src/plugins/cppeditor/cppquickfix_test.h index ec0345fc11f..2950a0be4db 100644 --- a/src/plugins/cppeditor/cppquickfix_test.h +++ b/src/plugins/cppeditor/cppquickfix_test.h @@ -30,6 +30,8 @@ #include "cppeditortestcase.h" +#include + #include #include #include diff --git a/src/plugins/cppeditor/cppquickfixassistant.cpp b/src/plugins/cppeditor/cppquickfixassistant.cpp index eb02f751fa7..87f436639db 100644 --- a/src/plugins/cppeditor/cppquickfixassistant.cpp +++ b/src/plugins/cppeditor/cppquickfixassistant.cpp @@ -33,6 +33,7 @@ #include "cppeditorconstants.h" #include "cppeditor.h" +#include #include #include diff --git a/src/plugins/cpptools/baseeditordocumentparser.cpp b/src/plugins/cpptools/baseeditordocumentparser.cpp index 93bd1b6d8a9..7f1e74785b1 100644 --- a/src/plugins/cpptools/baseeditordocumentparser.cpp +++ b/src/plugins/cpptools/baseeditordocumentparser.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "baseeditordocumentparser.h" +#include "baseeditordocumentprocessor.h" #include "editordocumenthandle.h" diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp index 9d75998816a..b9cc315b165 100644 --- a/src/plugins/cpptools/builtinindexingsupport.cpp +++ b/src/plugins/cpptools/builtinindexingsupport.cpp @@ -40,6 +40,7 @@ #include "searchsymbols.h" #include +#include #include #include @@ -47,6 +48,7 @@ #include #include +#include #include using namespace CppTools; diff --git a/src/plugins/cpptools/cppclassesfilter.h b/src/plugins/cpptools/cppclassesfilter.h index fd6b7e58a5b..8f63c3e2e17 100644 --- a/src/plugins/cpptools/cppclassesfilter.h +++ b/src/plugins/cpptools/cppclassesfilter.h @@ -32,11 +32,11 @@ #define CPPCLASSESFILTER_H #include "cpptools_global.h" -#include "cpplocatordata.h" #include "cpplocatorfilter.h" namespace CppTools { +class CppLocatorData; // TODO: un-export this class CPPTOOLS_EXPORT CppClassesFilter : public Internal::CppLocatorFilter diff --git a/src/plugins/cpptools/cppcodeformatter.h b/src/plugins/cpptools/cppcodeformatter.h index 053482fb6e7..eb09d0819e4 100644 --- a/src/plugins/cpptools/cppcodeformatter.h +++ b/src/plugins/cpptools/cppcodeformatter.h @@ -36,7 +36,6 @@ #include -#include #include #include diff --git a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp index 11bfdfa793e..11ecab7b3ba 100644 --- a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp +++ b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "cppcodemodelinspectordumper.h" +#include "cppmodelmanager.h" #include "cppworkingcopy.h" diff --git a/src/plugins/cpptools/cppcodemodelinspectordumper.h b/src/plugins/cpptools/cppcodemodelinspectordumper.h index b967ef98293..5257a404a99 100644 --- a/src/plugins/cpptools/cppcodemodelinspectordumper.h +++ b/src/plugins/cpptools/cppcodemodelinspectordumper.h @@ -33,13 +33,15 @@ #include "cpptools_global.h" -#include +#include #include #include #include namespace CppTools { +class WorkingCopy; + namespace CppCodeModelInspector { struct CPPTOOLS_EXPORT Utils diff --git a/src/plugins/cpptools/cppcodestylesettings.cpp b/src/plugins/cpptools/cppcodestylesettings.cpp index 7e9ce21c591..913461042e3 100644 --- a/src/plugins/cpptools/cppcodestylesettings.cpp +++ b/src/plugins/cpptools/cppcodestylesettings.cpp @@ -38,6 +38,8 @@ #include #include +#include + #include #include diff --git a/src/plugins/cpptools/cppcodestylesettings.h b/src/plugins/cpptools/cppcodestylesettings.h index bb5f2e4e5d6..de939badfc7 100644 --- a/src/plugins/cpptools/cppcodestylesettings.h +++ b/src/plugins/cpptools/cppcodestylesettings.h @@ -33,14 +33,14 @@ #include "cpptools_global.h" -#include - -#include +#include QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE +namespace CPlusPlus { class Overview; } + namespace CppTools { class CPPTOOLS_EXPORT CppCodeStyleSettings diff --git a/src/plugins/cpptools/cppcodestylesettingspage.cpp b/src/plugins/cpptools/cppcodestylesettingspage.cpp index e1b5807a203..d5fa67216de 100644 --- a/src/plugins/cpptools/cppcodestylesettingspage.cpp +++ b/src/plugins/cpptools/cppcodestylesettingspage.cpp @@ -45,6 +45,7 @@ #include #include +#include #include #include diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index f07ce5a13ae..58d09432677 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -59,6 +59,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/cpptools/cppcompletionassistprovider.h b/src/plugins/cpptools/cppcompletionassistprovider.h index 34bc2ae9747..735ca71c3bc 100644 --- a/src/plugins/cpptools/cppcompletionassistprovider.h +++ b/src/plugins/cpptools/cppcompletionassistprovider.h @@ -36,12 +36,12 @@ #include #include -#include - QT_BEGIN_NAMESPACE class QTextDocument; QT_END_NAMESPACE +namespace CPlusPlus { struct LanguageFeatures; } + namespace TextEditor { class BaseTextEditor; class AssistInterface; diff --git a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp index e4fb68f6db7..2f03519d196 100644 --- a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp +++ b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp @@ -32,8 +32,9 @@ #include "cppmodelmanager.h" -#include #include +#include +#include #include diff --git a/src/plugins/cpptools/cppincludesfilter.cpp b/src/plugins/cpptools/cppincludesfilter.cpp index 89855d7031a..3f6ae40feed 100644 --- a/src/plugins/cpptools/cppincludesfilter.cpp +++ b/src/plugins/cpptools/cppincludesfilter.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include diff --git a/src/plugins/cpptools/cppindexingsupport.h b/src/plugins/cpptools/cppindexingsupport.h index f6208fb9c91..4551a920d10 100644 --- a/src/plugins/cpptools/cppindexingsupport.h +++ b/src/plugins/cpptools/cppindexingsupport.h @@ -35,12 +35,13 @@ #include "cppmodelmanager.h" -#include #include #include #include +namespace Core { class SearchResultItem; } + namespace CppTools { class CPPTOOLS_EXPORT SymbolSearcher: public QObject diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index d52d209a1e1..6b4f8e24c0b 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -31,6 +31,7 @@ #include "cppmodelmanager.h" #include "abstracteditorsupport.h" +#include "baseeditordocumentprocessor.h" #include "builtinindexingsupport.h" #include "cppcodemodelinspectordumper.h" #include "cppcodemodelsettings.h" @@ -48,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +58,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h index 929275fee20..aab8a68f05a 100644 --- a/src/plugins/cpptools/cppmodelmanager.h +++ b/src/plugins/cpptools/cppmodelmanager.h @@ -35,10 +35,6 @@ #include "cppprojects.h" -#include -#include - -#include #include #include diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp index a9ee6ccddd0..16576454e1e 100644 --- a/src/plugins/cpptools/cppmodelmanager_test.cpp +++ b/src/plugins/cpptools/cppmodelmanager_test.cpp @@ -28,6 +28,7 @@ ** ****************************************************************************/ +#include "baseeditordocumentprocessor.h" #include "builtineditordocumentparser.h" #include "cppsourceprocessor.h" #include "cpptoolsplugin.h" diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp index 74a2df3d7e7..7e688675a30 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp +++ b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp @@ -31,6 +31,9 @@ #include "cpppointerdeclarationformatter.h" +#include + +#include #include #define DEBUG_OUTPUT 0 diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.h b/src/plugins/cpptools/cpppointerdeclarationformatter.h index 148aa8a3205..7cf3d069790 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter.h +++ b/src/plugins/cpptools/cpppointerdeclarationformatter.h @@ -34,7 +34,11 @@ #include "cpptools_global.h" #include "cpprefactoringchanges.h" -#include +#include + +#include + +namespace CPlusPlus { class Overview; } namespace CppTools { diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp index b41d66455f4..09a3c7cc85d 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp +++ b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp @@ -41,6 +41,7 @@ #include +#include #include #include diff --git a/src/plugins/cpptools/cppprojectfile.h b/src/plugins/cpptools/cppprojectfile.h index cf3b01fe8b5..bfc7d87b708 100644 --- a/src/plugins/cpptools/cppprojectfile.h +++ b/src/plugins/cpptools/cppprojectfile.h @@ -33,8 +33,6 @@ #include "cpptools_global.h" -#include - #include #include #include diff --git a/src/plugins/cpptools/cppprojects.cpp b/src/plugins/cpptools/cppprojects.cpp index 03d5bdcbe80..db84381fce9 100644 --- a/src/plugins/cpptools/cppprojects.cpp +++ b/src/plugins/cpptools/cppprojects.cpp @@ -34,11 +34,14 @@ #include #include #include +#include #include #include +#include #include +#include #include #include diff --git a/src/plugins/cpptools/cppprojects.h b/src/plugins/cpptools/cppprojects.h index f6c78c7852f..0851803511c 100644 --- a/src/plugins/cpptools/cppprojects.h +++ b/src/plugins/cpptools/cppprojects.h @@ -35,7 +35,6 @@ #include "cppprojectfile.h" -#include #include #include @@ -45,7 +44,12 @@ #include +namespace ProjectExplorer { class Project; } + +namespace Utils { class FileName; } + namespace CppTools { +class ProjectFile; class CPPTOOLS_EXPORT ProjectPart { diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp index 5498ead451f..ff6c1fa21c7 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.cpp +++ b/src/plugins/cpptools/cpprefactoringchanges.cpp @@ -39,6 +39,8 @@ #include +#include + using namespace CPlusPlus; namespace CppTools { diff --git a/src/plugins/cpptools/cpprefactoringchanges.h b/src/plugins/cpptools/cpprefactoringchanges.h index 897a7d06698..6701ee73c7e 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.h +++ b/src/plugins/cpptools/cpprefactoringchanges.h @@ -32,12 +32,11 @@ #define CPPREFACTORINGCHANGES_H #include "cpptools_global.h" -#include "cppmodelmanager.h" + +#include #include -#include - namespace CppTools { class CppRefactoringChanges; diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 5f1339c2eff..4c79948d9f1 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp index f1839b2493c..4d0627faa18 100644 --- a/src/plugins/cpptools/cpptoolstestcase.cpp +++ b/src/plugins/cpptools/cpptoolstestcase.cpp @@ -29,10 +29,11 @@ ****************************************************************************/ #include "cpptoolstestcase.h" - +#include "cppmodelmanager.h" #include "cppworkingcopy.h" #include +#include #include #include #include diff --git a/src/plugins/cpptools/cpptoolstestcase.h b/src/plugins/cpptools/cpptoolstestcase.h index a614911d9ff..acc76c6871b 100644 --- a/src/plugins/cpptools/cpptoolstestcase.h +++ b/src/plugins/cpptools/cpptoolstestcase.h @@ -31,10 +31,9 @@ #ifndef CPPTOOLSTESTCASE_H #define CPPTOOLSTESTCASE_H -#include "cppmodelmanager.h" #include "cpptools_global.h" -#include +#include #include #include @@ -53,6 +52,9 @@ class IAssistProposal; } namespace CppTools { +class CppModelManager; +class ProjectInfo; + namespace Tests { class CPPTOOLS_EXPORT TestDocument diff --git a/src/plugins/cpptools/doxygengenerator.h b/src/plugins/cpptools/doxygengenerator.h index 271ae230a39..c2229cf43fe 100644 --- a/src/plugins/cpptools/doxygengenerator.h +++ b/src/plugins/cpptools/doxygengenerator.h @@ -35,7 +35,7 @@ #include -#include +QT_FORWARD_DECLARE_CLASS(QTextCursor) namespace CPlusPlus { class DeclarationAST; } diff --git a/src/plugins/cpptools/editordocumenthandle.h b/src/plugins/cpptools/editordocumenthandle.h index 06ae5fc4df9..687449dd47c 100644 --- a/src/plugins/cpptools/editordocumenthandle.h +++ b/src/plugins/cpptools/editordocumenthandle.h @@ -31,10 +31,10 @@ #ifndef EDITORDOCUMENTHANDLE_H #define EDITORDOCUMENTHANDLE_H -#include "baseeditordocumentprocessor.h" #include "cpptools_global.h" namespace CppTools { +class BaseEditorDocumentProcessor; class CPPTOOLS_EXPORT CppEditorDocumentHandle { diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp index 9359bb7a553..529eada08c9 100644 --- a/src/plugins/cpptools/insertionpointlocator.cpp +++ b/src/plugins/cpptools/insertionpointlocator.cpp @@ -30,12 +30,15 @@ #include "insertionpointlocator.h" +#include "cppprojectfile.h" #include "cpptoolsreuse.h" #include "symbolfinder.h" #include "cpptoolsconstants.h" #include +#include + #include using namespace CPlusPlus; diff --git a/src/plugins/cpptools/modelmanagertesthelper.h b/src/plugins/cpptools/modelmanagertesthelper.h index 6da987a581f..85f4eb62d3b 100644 --- a/src/plugins/cpptools/modelmanagertesthelper.h +++ b/src/plugins/cpptools/modelmanagertesthelper.h @@ -33,6 +33,8 @@ #include "cppmodelmanager.h" +#include + #include namespace CppTools { diff --git a/src/plugins/cpptools/semantichighlighter.cpp b/src/plugins/cpptools/semantichighlighter.cpp index 2ebb0702446..13199596293 100644 --- a/src/plugins/cpptools/semantichighlighter.cpp +++ b/src/plugins/cpptools/semantichighlighter.cpp @@ -29,13 +29,16 @@ ****************************************************************************/ #include "semantichighlighter.h" +#include "cppsemanticinfo.h" #include #include +#include #include #include +#include using namespace CPlusPlus; using TextEditor::SemanticHighlighter::incrementalApplyExtraAdditionalFormats; diff --git a/src/plugins/cpptools/semantichighlighter.h b/src/plugins/cpptools/semantichighlighter.h index 947bc4d3a18..6cc81b9ba0c 100644 --- a/src/plugins/cpptools/semantichighlighter.h +++ b/src/plugins/cpptools/semantichighlighter.h @@ -31,18 +31,19 @@ #ifndef SEMANTICHIGHLIGHTER_H #define SEMANTICHIGHLIGHTER_H -#include "cppsemanticinfo.h" #include "cpptools_global.h" -#include -#include - #include #include -#include +#include #include +namespace TextEditor { +class HighlightingResult; +class TextDocument; +} + namespace CppTools { class CPPTOOLS_EXPORT SemanticHighlighter : public QObject diff --git a/src/plugins/cpptools/symbolfinder.h b/src/plugins/cpptools/symbolfinder.h index 9ef908e1625..e9c301aaf22 100644 --- a/src/plugins/cpptools/symbolfinder.h +++ b/src/plugins/cpptools/symbolfinder.h @@ -33,13 +33,20 @@ #include "cpptools_global.h" -#include - #include #include #include #include +namespace CPlusPlus { +class Class; +class Declaration; +class Function; +class LookupContext; +class Snapshot; +class Symbol; +} + namespace CppTools { class CPPTOOLS_EXPORT SymbolFinder diff --git a/src/plugins/cpptools/symbolsearcher_test.cpp b/src/plugins/cpptools/symbolsearcher_test.cpp index 6fcc0c08f4f..729feb3a848 100644 --- a/src/plugins/cpptools/symbolsearcher_test.cpp +++ b/src/plugins/cpptools/symbolsearcher_test.cpp @@ -36,6 +36,7 @@ #include "searchsymbols.h" #include +#include #include #include diff --git a/src/plugins/cpptools/symbolsfindfilter.cpp b/src/plugins/cpptools/symbolsfindfilter.cpp index da407a4baa2..cf2a622cfce 100644 --- a/src/plugins/cpptools/symbolsfindfilter.cpp +++ b/src/plugins/cpptools/symbolsfindfilter.cpp @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include #include diff --git a/src/plugins/cpptools/symbolsfindfilter.h b/src/plugins/cpptools/symbolsfindfilter.h index 177978e1db7..27d281ea46b 100644 --- a/src/plugins/cpptools/symbolsfindfilter.h +++ b/src/plugins/cpptools/symbolsfindfilter.h @@ -41,6 +41,8 @@ #include #include +namespace Core { class SearchResult; } + namespace CppTools { class CppModelManager; diff --git a/src/plugins/cpptools/typehierarchybuilder.h b/src/plugins/cpptools/typehierarchybuilder.h index 9323d5856bf..50691e94f5c 100644 --- a/src/plugins/cpptools/typehierarchybuilder.h +++ b/src/plugins/cpptools/typehierarchybuilder.h @@ -32,14 +32,15 @@ #define CPPTOOLS_TYPEHIERARCHYBUILDER_H #include "cpptools_global.h" -#include "cppmodelmanager.h" +#include #include #include -#include #include +QT_FORWARD_DECLARE_CLASS(QStringList) + namespace CppTools { class CPPTOOLS_EXPORT TypeHierarchy diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 79d2a6e8002..c62f50d8d0b 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index b4ef92c6bef..c02cb6e094b 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include From 1b9be3037170fe45d3a3f9728723acca09e289f7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 4 Mar 2015 16:46:23 +0100 Subject: [PATCH 53/62] Clean headers in lib qmljs and plugins qmljstools, qmljseditor. Change-Id: I3256db8f4d42b6326d986d754b45e6c6c2030839 Reviewed-by: Orgad Shaneh --- src/libs/qmljs/qmljsbind.h | 1 + src/libs/qmljs/qmljsbundle.h | 2 +- src/libs/qmljs/qmljscheck.cpp | 1 + src/libs/qmljs/qmljscompletioncontextfinder.cpp | 1 + src/libs/qmljs/qmljscontext.cpp | 2 ++ src/libs/qmljs/qmljscontext.h | 3 ++- src/libs/qmljs/qmljsdialect.cpp | 3 +++ src/libs/qmljs/qmljsdialect.h | 2 +- src/libs/qmljs/qmljsdocument.h | 5 ++++- src/libs/qmljs/qmljsevaluate.cpp | 1 + src/libs/qmljs/qmljsimportdependencies.cpp | 1 + src/libs/qmljs/qmljsimportdependencies.h | 3 ++- src/libs/qmljs/qmljsindenter.cpp | 1 + src/libs/qmljs/qmljsinterpreter.h | 5 ++++- src/libs/qmljs/qmljslineinfo.cpp | 1 + src/libs/qmljs/qmljslineinfo.h | 2 +- src/libs/qmljs/qmljsmodelmanagerinterface.cpp | 1 + src/libs/qmljs/qmljsmodelmanagerinterface.h | 8 ++------ src/libs/qmljs/qmljsreformatter.cpp | 1 + src/libs/qmljs/qmljsscopechain.cpp | 1 + src/libs/qmljs/qmljsstaticanalysismessage.cpp | 2 ++ src/libs/qmljs/qmljsstaticanalysismessage.h | 7 +++++-- src/libs/qmljs/qmljstypedescriptionreader.cpp | 1 + src/libs/qmljs/qmljstypedescriptionreader.h | 6 +++++- src/libs/qmljs/qmljsutils.cpp | 2 ++ src/libs/qmljs/qmljsutils.h | 2 +- src/libs/qmljs/qmljsviewercontext.h | 1 - .../designercore/filemanager/firstdefinitionfinder.cpp | 1 + .../qmldesigner/designercore/metainfo/nodemetainfo.cpp | 1 + .../designercore/metainfo/subcomponentmanager.cpp | 1 + .../designercore/model/modeltotextmerger.cpp | 1 + .../qmldesigner/designercore/model/rewriterview.cpp | 1 + .../designercore/model/texttomodelmerger.cpp | 1 + src/plugins/qmljseditor/qmljseditordocument.h | 1 - src/plugins/qmljseditor/qmljsfindreferences.h | 2 -- src/plugins/qmljseditor/qmljshoverhandler.cpp | 1 + src/plugins/qmljseditor/qmljswrapinloader.cpp | 1 + src/plugins/qmljseditor/qmloutlinemodel.cpp | 1 + src/plugins/qmljstools/qmljsmodelmanager.h | 4 ---- src/plugins/qmljstools/qmljssemanticinfo.cpp | 3 +++ src/plugins/qmljstools/qmljssemanticinfo.h | 10 ++++++++-- src/plugins/qmljstools/qmljstools_test.cpp | 1 + src/plugins/todo/qmljstodoitemsscanner.cpp | 2 ++ tests/auto/qml/codemodel/check/tst_check.cpp | 1 + tests/auto/qml/reformatter/tst_reformatter.cpp | 1 + tests/tools/qml-ast2dot/main.cpp | 1 + 46 files changed, 74 insertions(+), 27 deletions(-) diff --git a/src/libs/qmljs/qmljsbind.h b/src/libs/qmljs/qmljsbind.h index c40117efa64..14a64e024ee 100644 --- a/src/libs/qmljs/qmljsbind.h +++ b/src/libs/qmljs/qmljsbind.h @@ -39,6 +39,7 @@ namespace QmlJS { +class DiagnosticMessage; class Document; class QMLJS_EXPORT Bind: protected AST::Visitor diff --git a/src/libs/qmljs/qmljsbundle.h b/src/libs/qmljs/qmljsbundle.h index 3a75a1edb4e..110f56ee363 100644 --- a/src/libs/qmljs/qmljsbundle.h +++ b/src/libs/qmljs/qmljsbundle.h @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index ce06d4cd8e7..e71c0a21659 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -36,6 +36,7 @@ #include +#include #include using namespace QmlJS; diff --git a/src/libs/qmljs/qmljscompletioncontextfinder.cpp b/src/libs/qmljs/qmljscompletioncontextfinder.cpp index 448677ebf63..b260c5ba93c 100644 --- a/src/libs/qmljs/qmljscompletioncontextfinder.cpp +++ b/src/libs/qmljs/qmljscompletioncontextfinder.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "qmljscompletioncontextfinder.h" +#include "qmljsscanner.h" #include #include diff --git a/src/libs/qmljs/qmljscontext.cpp b/src/libs/qmljs/qmljscontext.cpp index f81cf2dccc5..df467ed304a 100644 --- a/src/libs/qmljs/qmljscontext.cpp +++ b/src/libs/qmljs/qmljscontext.cpp @@ -31,6 +31,8 @@ #include "qmljscontext.h" #include "parser/qmljsast_p.h" +#include "parser/qmljsengine_p.h" +#include "qmljsvalueowner.h" using namespace QmlJS; using namespace QmlJS::AST; diff --git a/src/libs/qmljs/qmljscontext.h b/src/libs/qmljs/qmljscontext.h index 13f43557718..deaadddee67 100644 --- a/src/libs/qmljs/qmljscontext.h +++ b/src/libs/qmljs/qmljscontext.h @@ -32,7 +32,8 @@ #define QMLJS_CONTEXT_H #include "qmljs_global.h" -#include "qmljsvalueowner.h" +#include "qmljsdocument.h" +#include "qmljsinterpreter.h" #include "qmljsviewercontext.h" #include diff --git a/src/libs/qmljs/qmljsdialect.cpp b/src/libs/qmljs/qmljsdialect.cpp index 277bd03dc1f..27069421bf4 100644 --- a/src/libs/qmljs/qmljsdialect.cpp +++ b/src/libs/qmljs/qmljsdialect.cpp @@ -29,6 +29,9 @@ ****************************************************************************/ #include "qmljsdialect.h" +#include "qmljsconstants.h" + +#include namespace QmlJS { diff --git a/src/libs/qmljs/qmljsdialect.h b/src/libs/qmljs/qmljsdialect.h index 6dac12cc3e0..9d9113ca7ee 100644 --- a/src/libs/qmljs/qmljsdialect.h +++ b/src/libs/qmljs/qmljsdialect.h @@ -31,7 +31,7 @@ #ifndef QMLJSDIALECT_H #define QMLJSDIALECT_H -#include "qmljsconstants.h" +#include "qmljs_global.h" #include diff --git a/src/libs/qmljs/qmljsdocument.h b/src/libs/qmljs/qmljsdocument.h index d984b2deb88..5c8b6df12d7 100644 --- a/src/libs/qmljs/qmljsdocument.h +++ b/src/libs/qmljs/qmljsdocument.h @@ -38,7 +38,7 @@ #include "qmljsdialect.h" #include "parser/qmldirparser_p.h" -#include "parser/qmljsengine_p.h" +#include "parser/qmljsastfwd_p.h" #include "qmljs_global.h" #include "qmljsconstants.h" #include "qmljsimportdependencies.h" @@ -46,11 +46,14 @@ namespace QmlJS { class Bind; +class DiagnosticMessage; +class Engine; class Snapshot; class ImportDependencies; class QMLJS_EXPORT Document { + Q_DISABLE_COPY(Document) public: typedef QSharedPointer Ptr; typedef QSharedPointer MutablePtr; diff --git a/src/libs/qmljs/qmljsevaluate.cpp b/src/libs/qmljs/qmljsevaluate.cpp index 2a7aa042d64..7c5ef71f468 100644 --- a/src/libs/qmljs/qmljsevaluate.cpp +++ b/src/libs/qmljs/qmljsevaluate.cpp @@ -31,6 +31,7 @@ #include "qmljsevaluate.h" #include "qmljscontext.h" #include "qmljsscopechain.h" +#include "qmljsvalueowner.h" #include "parser/qmljsast_p.h" using namespace QmlJS; diff --git a/src/libs/qmljs/qmljsimportdependencies.cpp b/src/libs/qmljs/qmljsimportdependencies.cpp index dc0e745822f..d383be41896 100644 --- a/src/libs/qmljs/qmljsimportdependencies.cpp +++ b/src/libs/qmljs/qmljsimportdependencies.cpp @@ -31,6 +31,7 @@ #include "qmljsimportdependencies.h" #include "qmljsinterpreter.h" #include "qmljsqrcparser.h" +#include "qmljsviewercontext.h" #include diff --git a/src/libs/qmljs/qmljsimportdependencies.h b/src/libs/qmljs/qmljsimportdependencies.h index 2125ac125f3..62d09282295 100644 --- a/src/libs/qmljs/qmljsimportdependencies.h +++ b/src/libs/qmljs/qmljsimportdependencies.h @@ -31,7 +31,7 @@ #ifndef QMLJSIMPORTCACHE_H #define QMLJSIMPORTCACHE_H -#include "qmljsviewercontext.h" +#include "qmljsconstants.h" #include "qmljsdialect.h" #include @@ -52,6 +52,7 @@ QT_END_NAMESPACE namespace QmlJS { class ImportInfo; +class ViewerContext; namespace Internal { class ImportDependenciesPrivate; } class ImportDependencies; diff --git a/src/libs/qmljs/qmljsindenter.cpp b/src/libs/qmljs/qmljsindenter.cpp index f73515c6a2d..89c17044427 100644 --- a/src/libs/qmljs/qmljsindenter.cpp +++ b/src/libs/qmljs/qmljsindenter.cpp @@ -67,6 +67,7 @@ */ #include +#include #include diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index 1756fbf3f6d..6b8ffe549d3 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -33,8 +33,10 @@ #include #include -#include #include +#include + +#include #include #include @@ -67,6 +69,7 @@ class JSImportScope; class NameId; class NullValue; class NumberValue; +class ModuleApiInfo; class ObjectValue; class QmlEnumValue; class QmlPrototypeReference; diff --git a/src/libs/qmljs/qmljslineinfo.cpp b/src/libs/qmljs/qmljslineinfo.cpp index e3e39d7e224..54c01a809d1 100644 --- a/src/libs/qmljs/qmljslineinfo.cpp +++ b/src/libs/qmljs/qmljslineinfo.cpp @@ -67,6 +67,7 @@ */ #include +#include using namespace QmlJS; diff --git a/src/libs/qmljs/qmljslineinfo.h b/src/libs/qmljs/qmljslineinfo.h index b002da8fce2..55b37021791 100644 --- a/src/libs/qmljs/qmljslineinfo.h +++ b/src/libs/qmljs/qmljslineinfo.h @@ -32,12 +32,12 @@ #define QMLJSLINEINFO_H #include -#include #include #include namespace QmlJS { +class Token; class QMLJS_EXPORT LineInfo { diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index be839396e8e..37d2e595c10 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -36,6 +36,7 @@ #include "qmljsplugindumper.h" #include "qmljstypedescriptionreader.h" #include "qmljsdialect.h" +#include "qmljsviewercontext.h" #include #include diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h index 8b4a91fc989..df232598811 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.h +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h @@ -33,25 +33,21 @@ #include "qmljs_global.h" #include "qmljsbundle.h" -#include "qmljsconstants.h" #include "qmljsdocument.h" #include "qmljsqrcparser.h" -#include "qmljsviewercontext.h" #include "qmljsdialect.h" #include #include -#include #include #include #include -#include #include #include #include -#include -#include + +QT_FORWARD_DECLARE_CLASS(QTimer) namespace ProjectExplorer { class Project; } diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp index be393f92ee3..fd987851b84 100644 --- a/src/libs/qmljs/qmljsreformatter.cpp +++ b/src/libs/qmljs/qmljsreformatter.cpp @@ -33,6 +33,7 @@ #include "qmljscodeformatter.h" #include "parser/qmljsast_p.h" #include "parser/qmljsastvisitor_p.h" +#include "parser/qmljsengine_p.h" #include #include diff --git a/src/libs/qmljs/qmljsscopechain.cpp b/src/libs/qmljs/qmljsscopechain.cpp index 1fa71328cea..5416b8e195b 100644 --- a/src/libs/qmljs/qmljsscopechain.cpp +++ b/src/libs/qmljs/qmljsscopechain.cpp @@ -32,6 +32,7 @@ #include "qmljsbind.h" #include "qmljsevaluate.h" #include "qmljsmodelmanagerinterface.h" +#include "parser/qmljsengine_p.h" using namespace QmlJS; diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.cpp b/src/libs/qmljs/qmljsstaticanalysismessage.cpp index bd8a7e78aab..df2cf1f61d2 100644 --- a/src/libs/qmljs/qmljsstaticanalysismessage.cpp +++ b/src/libs/qmljs/qmljsstaticanalysismessage.cpp @@ -30,10 +30,12 @@ #include "qmljsstaticanalysismessage.h" #include "qmljsconstants.h" +#include "parser/qmljsengine_p.h" #include #include +#include using namespace QmlJS; using namespace QmlJS::StaticAnalysis; diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.h b/src/libs/qmljs/qmljsstaticanalysismessage.h index f4f22e373ec..41e4bfd3ab2 100644 --- a/src/libs/qmljs/qmljsstaticanalysismessage.h +++ b/src/libs/qmljs/qmljsstaticanalysismessage.h @@ -33,13 +33,16 @@ #include "qmljs_global.h" #include "qmljsconstants.h" -#include "parser/qmljsengine_p.h" +#include "parser/qmljsastfwd_p.h" -#include #include #include +QT_FORWARD_DECLARE_CLASS(QRegExp) + namespace QmlJS { +class DiagnosticMessage; + namespace StaticAnalysis { enum Type diff --git a/src/libs/qmljs/qmljstypedescriptionreader.cpp b/src/libs/qmljs/qmljstypedescriptionreader.cpp index e37d72aba0a..a7351bd7407 100644 --- a/src/libs/qmljs/qmljstypedescriptionreader.cpp +++ b/src/libs/qmljs/qmljstypedescriptionreader.cpp @@ -30,6 +30,7 @@ #include "qmljstypedescriptionreader.h" +#include "qmljsdocument.h" #include "parser/qmljsparser_p.h" #include "parser/qmljslexer_p.h" #include "parser/qmljsengine_p.h" diff --git a/src/libs/qmljs/qmljstypedescriptionreader.h b/src/libs/qmljs/qmljstypedescriptionreader.h index 7a4fe1f61fe..f37367b59fb 100644 --- a/src/libs/qmljs/qmljstypedescriptionreader.h +++ b/src/libs/qmljs/qmljstypedescriptionreader.h @@ -31,7 +31,10 @@ #ifndef QMLJSTYPEDESCRIPTIONREADER_H #define QMLJSTYPEDESCRIPTIONREADER_H -#include "qmljsdocument.h" +#include "qmljs_global.h" +#include + +#include // for Q_DECLARE_TR_FUNCTIONS #include @@ -43,6 +46,7 @@ QT_END_NAMESPACE namespace QmlJS { +class ModuleApiInfo; namespace AST { class UiProgram; class UiObjectDefinition; diff --git a/src/libs/qmljs/qmljsutils.cpp b/src/libs/qmljs/qmljsutils.cpp index 3a721a54b06..bcbdde5ccc1 100644 --- a/src/libs/qmljs/qmljsutils.cpp +++ b/src/libs/qmljs/qmljsutils.cpp @@ -32,6 +32,8 @@ #include "parser/qmljsast_p.h" +#include + using namespace QmlJS; using namespace QmlJS::AST; diff --git a/src/libs/qmljs/qmljsutils.h b/src/libs/qmljs/qmljsutils.h index b0aab716b12..48de0b2229b 100644 --- a/src/libs/qmljs/qmljsutils.h +++ b/src/libs/qmljs/qmljsutils.h @@ -36,7 +36,7 @@ #include "parser/qmljsastfwd_p.h" #include "parser/qmljsengine_p.h" -#include +QT_FORWARD_DECLARE_CLASS(QColor) namespace QmlJS { diff --git a/src/libs/qmljs/qmljsviewercontext.h b/src/libs/qmljs/qmljsviewercontext.h index 955f384e4cc..3bf85c21250 100644 --- a/src/libs/qmljs/qmljsviewercontext.h +++ b/src/libs/qmljs/qmljsviewercontext.h @@ -32,7 +32,6 @@ #define VIEWERCONTEXT_H #include "qmljs_global.h" -#include "qmljsconstants.h" #include "qmljsdialect.h" #include diff --git a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp index 653ad1e98db..69c0f18ac7d 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp +++ b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp @@ -31,6 +31,7 @@ #include "firstdefinitionfinder.h" #include +#include #include diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index 8a2ec11d045..bc92db2ab47 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include namespace QmlDesigner { diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp index 244c2080b9f..d6d95409b72 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp @@ -45,6 +45,7 @@ #include #include +#include #include enum { debug = false }; diff --git a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp index 2966cc94adf..1774d7b43bd 100644 --- a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp index b693440e394..81f08d6231b 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp @@ -44,6 +44,7 @@ #include "signalhandlerproperty.h" +#include using namespace QmlDesigner::Internal; diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index a35a4b6d11d..fda7c9bb93a 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include diff --git a/src/plugins/qmljseditor/qmljseditordocument.h b/src/plugins/qmljseditor/qmljseditordocument.h index 2d1b385d469..76e1a066e5f 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.h +++ b/src/plugins/qmljseditor/qmljseditordocument.h @@ -33,7 +33,6 @@ #include "qmljseditor_global.h" -#include #include #include diff --git a/src/plugins/qmljseditor/qmljsfindreferences.h b/src/plugins/qmljseditor/qmljsfindreferences.h index 1435c40395f..995e4c2fdb4 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.h +++ b/src/plugins/qmljseditor/qmljsfindreferences.h @@ -38,8 +38,6 @@ #include #include #include -#include -#include QT_FORWARD_DECLARE_CLASS(QTimer) diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index 4084d7a4f82..7cefaa5a1a1 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/src/plugins/qmljseditor/qmljswrapinloader.cpp b/src/plugins/qmljseditor/qmljswrapinloader.cpp index 8c1b1fb52d7..333421d201c 100644 --- a/src/plugins/qmljseditor/qmljswrapinloader.cpp +++ b/src/plugins/qmljseditor/qmljswrapinloader.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/src/plugins/qmljseditor/qmloutlinemodel.cpp b/src/plugins/qmljseditor/qmloutlinemodel.cpp index 8fbc0845f86..7231abb171d 100644 --- a/src/plugins/qmljseditor/qmloutlinemodel.cpp +++ b/src/plugins/qmljseditor/qmloutlinemodel.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/qmljstools/qmljsmodelmanager.h b/src/plugins/qmljstools/qmljsmodelmanager.h index 3cef07c2272..03c4d568fea 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.h +++ b/src/plugins/qmljstools/qmljsmodelmanager.h @@ -34,10 +34,6 @@ #include "qmljstools_global.h" #include -#include -#include - -#include #include #include diff --git a/src/plugins/qmljstools/qmljssemanticinfo.cpp b/src/plugins/qmljstools/qmljssemanticinfo.cpp index b56a962ed8e..5cdb2491747 100644 --- a/src/plugins/qmljstools/qmljssemanticinfo.cpp +++ b/src/plugins/qmljstools/qmljssemanticinfo.cpp @@ -30,7 +30,10 @@ #include "qmljssemanticinfo.h" +#include #include +#include +#include using namespace QmlJS; using namespace QmlJS::AST; diff --git a/src/plugins/qmljstools/qmljssemanticinfo.h b/src/plugins/qmljstools/qmljssemanticinfo.h index cb1a5d8e4e0..314e0c672cd 100644 --- a/src/plugins/qmljstools/qmljssemanticinfo.h +++ b/src/plugins/qmljstools/qmljssemanticinfo.h @@ -33,12 +33,18 @@ #include "qmljstools_global.h" -#include -#include +#include +#include #include +#include #include +namespace QmlJS { +class ScopeChain; +namespace AST { class Node; } +} + namespace QmlJSTools { class QMLJSTOOLS_EXPORT Range diff --git a/src/plugins/qmljstools/qmljstools_test.cpp b/src/plugins/qmljstools/qmljstools_test.cpp index 6c2c539c2b3..90b153c5104 100644 --- a/src/plugins/qmljstools/qmljstools_test.cpp +++ b/src/plugins/qmljstools/qmljstools_test.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include diff --git a/src/plugins/todo/qmljstodoitemsscanner.cpp b/src/plugins/todo/qmljstodoitemsscanner.cpp index 7c508cdd082..1d35b6af7c7 100644 --- a/src/plugins/todo/qmljstodoitemsscanner.cpp +++ b/src/plugins/todo/qmljstodoitemsscanner.cpp @@ -33,6 +33,8 @@ #include +#include + namespace Todo { namespace Internal { diff --git a/tests/auto/qml/codemodel/check/tst_check.cpp b/tests/auto/qml/codemodel/check/tst_check.cpp index 84b669577b2..4cc48d4d70a 100644 --- a/tests/auto/qml/codemodel/check/tst_check.cpp +++ b/tests/auto/qml/codemodel/check/tst_check.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff --git a/tests/auto/qml/reformatter/tst_reformatter.cpp b/tests/auto/qml/reformatter/tst_reformatter.cpp index b69665a29d9..e7c0c52e8dd 100644 --- a/tests/auto/qml/reformatter/tst_reformatter.cpp +++ b/tests/auto/qml/reformatter/tst_reformatter.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp index da5eef842d6..6e369c16e86 100644 --- a/tests/tools/qml-ast2dot/main.cpp +++ b/tests/tools/qml-ast2dot/main.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include From cf58a1dc155bdab833aaefdafa759b6af5e9638e Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Mar 2015 09:16:17 +0100 Subject: [PATCH 54/62] Debugger: Mark unexpected state transitions of mixed engine ... prominently with red color in the log. Change-Id: Id9d86227bbcc269a0870ff93e372f28ab4b2618b Reviewed-by: Christian Stenger --- src/plugins/debugger/qml/qmlcppengine.cpp | 82 ++++++++++++----------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index be9a936b396..5fec4144dc0 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -52,6 +52,15 @@ enum { debug = 0 }; #define EDEBUG(s) do { if (debug) qDebug() << s; } while (0) +#define CHECK_STATE(s) \ + do { \ + if (state() != s) { \ + showMessage(QString::fromLatin1("UNEXPECTED STATE: %1 WANTED: %2 IN %3:%4") \ + .arg(state()).arg(s).arg(QLatin1String(__FILE__)).arg(__LINE__), LogError); \ + QTC_ASSERT(false, qDebug() << state() << s); \ + } \ + } while (0) + DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp, QString *errorMessage) { @@ -497,8 +506,8 @@ void QmlCppEngine::slaveEngineStateChanged break; } case EngineSetupRequested: { - // set by queueSetupEngine() - QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); + // Set by queueSetupEngine() + CHECK_STATE(EngineSetupRequested); break; } case EngineSetupFailed: { @@ -511,8 +520,8 @@ void QmlCppEngine::slaveEngineStateChanged break; } case InferiorSetupRequested: { - // set by queueSetupInferior() - QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); + // Set by queueSetupInferior() + CHECK_STATE(InferiorSetupRequested); break; } case InferiorSetupFailed: { @@ -539,20 +548,20 @@ void QmlCppEngine::slaveEngineStateChanged break; } case InferiorRunRequested: { - // might be set already by notifyInferiorRunRequested() - QTC_ASSERT(state() == InferiorRunRequested - || state() == InferiorStopOk, qDebug() << state()); - if (state() != InferiorRunRequested) + // Might be set already by notifyInferiorRunRequested() + if (state() != InferiorRunRequested) { + CHECK_STATE(InferiorStopOk); notifyInferiorRunRequested(); + } break; } case InferiorRunOk: { - QTC_ASSERT(state() == EngineRunRequested - || state() == InferiorRunRequested, qDebug() << state()); if (state() == EngineRunRequested) notifyEngineRunAndInferiorRunOk(); else if (state() == InferiorRunRequested) notifyInferiorRunOk(); + else + QTC_ASSERT(false, qDebug() << state()); if (qmlEngine()->state() == InferiorStopOk) { // track qml engine again @@ -569,17 +578,14 @@ void QmlCppEngine::slaveEngineStateChanged } case InferiorStopRequested: { if (m_activeEngine == cppEngine()) { - // might be set by doInterruptInferior() - QTC_ASSERT(state() == InferiorStopRequested - || state() == InferiorRunOk, qDebug() << state()); - if (state() == InferiorRunOk) + if (state() == InferiorRunOk) { setState(InferiorStopRequested); + } else { + // Might be set by doInterruptInferior() + CHECK_STATE(InferiorStopRequested); + } } else { - // we're debugging qml, but got an interrupt, or abort - QTC_ASSERT(state() == InferiorRunOk - || state() == InferiorStopOk - || state() == InferiorRunRequested, qDebug() << state()); - + // We're debugging qml, but got an interrupt, or abort if (state() == InferiorRunOk) { setState(InferiorStopRequested); } else if (state() == InferiorStopOk) { @@ -589,6 +595,8 @@ void QmlCppEngine::slaveEngineStateChanged } else if (state() == InferiorRunRequested) { notifyInferiorRunOk(); setState(InferiorStopRequested); + } else { + QTC_ASSERT(false, qDebug() << state()); } // now track cpp engine setActiveEngine(m_cppEngine); @@ -613,12 +621,6 @@ void QmlCppEngine::slaveEngineStateChanged showStatusMessage(tr("C++ debugger activated")); setActiveEngine(m_cppEngine); } - - QTC_ASSERT(state() == InferiorStopRequested - || state() == InferiorRunRequested - || state() == EngineRunRequested - || state() == InferiorRunOk - || state() == InferiorStopOk, qDebug() << state()); switch (state()) { case InferiorStopRequested: EDEBUG("... CPP ENGINE STOPPED EXPECTEDLY"); @@ -636,13 +638,14 @@ void QmlCppEngine::slaveEngineStateChanged // can happen if qml engine was active notifyInferiorRunFailed(); default: + CHECK_STATE(InferiorStopOk); break; } } break; } case InferiorStopFailed: { - QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state()); + CHECK_STATE(InferiorStopRequested); notifyInferiorStopFailed(); break; } @@ -653,16 +656,17 @@ void QmlCppEngine::slaveEngineStateChanged break; } case InferiorShutdownRequested: { - // might be set by queueShutdownInferior() already - QTC_ASSERT(state() == InferiorShutdownRequested - || state() == InferiorStopOk, qDebug() << state()); - if (state() == InferiorStopOk) + if (state() == InferiorStopOk) { setState(InferiorShutdownRequested); + } else { + // might be set by queueShutdownInferior() already + CHECK_STATE(InferiorShutdownRequested); + } qmlEngine()->quitDebugger(); break; } case InferiorShutdownFailed: { - QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state()); + CHECK_STATE(InferiorShutdownRequested); notifyInferiorShutdownFailed(); break; } @@ -677,22 +681,22 @@ void QmlCppEngine::slaveEngineStateChanged } case EngineShutdownRequested: { // set by queueShutdownEngine() - QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state()); + CHECK_STATE(EngineShutdownRequested); break; } case EngineShutdownFailed: { - QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state()); + CHECK_STATE(EngineShutdownRequested); notifyEngineShutdownFailed(); break; } case EngineShutdownOk: { - QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state()); + CHECK_STATE(EngineShutdownRequested); notifyEngineShutdownOk(); break; } case DebuggerFinished: { // set by queueFinishDebugger() - QTC_ASSERT(state() == DebuggerFinished, qDebug() << state()); + CHECK_STATE(DebuggerFinished); break; } } @@ -714,19 +718,17 @@ void QmlCppEngine::slaveEngineStateChanged setActiveEngine(m_qmlEngine); } - QTC_ASSERT(state() == InferiorRunOk - || state() == InferiorStopRequested - || state() == InferiorShutdownRequested, qDebug() << state()); - if (state() == InferiorRunOk) notifyInferiorSpontaneousStop(); else if (state() == InferiorStopRequested) notifyInferiorStopOk(); + else + CHECK_STATE(InferiorShutdownRequested); } } else if (newState == InferiorRunOk) { if (m_activeEngine == qmlEngine()) { - QTC_ASSERT(state() == InferiorRunRequested, qDebug() << state()); + CHECK_STATE(InferiorRunRequested); notifyInferiorRunOk(); } } From 11cee807b75cbd079e01dca40b653982d2850d40 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 2 Mar 2015 15:52:32 +0100 Subject: [PATCH 55/62] Timeline: Check end time for sanity before setting range Change-Id: I69a3ea81b1c4e1df51663d8e5c75972f67635a26 Reviewed-by: Joerg Bornemann --- src/libs/timeline/qml/TimelineContent.qml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/timeline/qml/TimelineContent.qml b/src/libs/timeline/qml/TimelineContent.qml index 998c5c108ba..c4d1a273537 100644 --- a/src/libs/timeline/qml/TimelineContent.qml +++ b/src/libs/timeline/qml/TimelineContent.qml @@ -172,12 +172,11 @@ ScrollView { if (modelData.endTime(selectedItem) < zoomer.rangeStart || modelData.startTime(selectedItem) > zoomer.rangeEnd) { - var newStart = (modelData.startTime(selectedItem) + - modelData.endTime(selectedItem) - - zoomer.rangeDuration) / 2; - zoomer.setRange(Math.max(newStart, zoomer.traceStart), - Math.min(newStart + zoomer.rangeDuration, - zoomer.traceEnd)); + var newStart = Math.max((modelData.startTime(selectedItem) + + modelData.endTime(selectedItem) - + zoomer.rangeDuration) / 2, zoomer.traceStart); + zoomer.setRange(newStart, + Math.min(newStart + zoomer.rangeDuration, zoomer.traceEnd)); } var row = modelData.row(selectedItem); From 43adc29a6e0a326b3c57269a510999700e018f53 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 26 Feb 2015 15:13:41 +0100 Subject: [PATCH 56/62] Timeline: Allow horizontal resizing of detail windows The details table can become quite large, so we elide the text. However, as we don't know what kind of information we're hiding and the user might want to see it it's quite practical to allow resizing. Also, make sure that the detail window (and the range window) is on top of everything else so that it can set the cursor shape. Task-number: QTCREATORBUG-14054 Change-Id: I12850124c327c57c148b69960687b7402bdead90 Reviewed-by: Joerg Bornemann --- src/libs/timeline/qml/Detail.qml | 4 +++- src/libs/timeline/qml/MainView.qml | 4 ++-- src/libs/timeline/qml/RangeDetails.qml | 28 ++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/libs/timeline/qml/Detail.qml b/src/libs/timeline/qml/Detail.qml index 83bd262ba0c..762ac62fff2 100644 --- a/src/libs/timeline/qml/Detail.qml +++ b/src/libs/timeline/qml/Detail.qml @@ -32,10 +32,12 @@ import QtQuick 2.1 Text { property bool isLabel: false + property int labelWidth: 85 + property int valueWidth: 170 font.pixelSize: 12 font.bold: isLabel textFormat: Text.PlainText renderType: Text.NativeRendering elide: Text.ElideRight - width: text === "" ? 0 : (isLabel ? 85 : 170) + width: text === "" ? 0 : (isLabel ? labelWidth : valueWidth) } diff --git a/src/libs/timeline/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml index 0c475183132..78d2be0c48c 100644 --- a/src/libs/timeline/qml/MainView.qml +++ b/src/libs/timeline/qml/MainView.qml @@ -325,7 +325,7 @@ Rectangle { } SelectionRangeDetails { - z: 1 + z: 3 x: 200 y: 125 @@ -351,7 +351,7 @@ Rectangle { RangeDetails { id: rangeDetails - z: 1 + z: 3 visible: false x: 200 y: 25 diff --git a/src/libs/timeline/qml/RangeDetails.qml b/src/libs/timeline/qml/RangeDetails.qml index 55d53c6de49..a8903863666 100644 --- a/src/libs/timeline/qml/RangeDetails.qml +++ b/src/libs/timeline/qml/RangeDetails.qml @@ -54,7 +54,7 @@ Item { signal clearSelection width: col.width + 25 - height: col.height + 30 + height: contentArea.height + titleBar.height function hide() { noteEdit.focus = false; @@ -146,8 +146,8 @@ Item { y: px + 1 } - // title bar Rectangle { + id: titleBar width: parent.width height: 20 color: "#55a3b8" @@ -186,6 +186,7 @@ Item { // Details area Rectangle { + id: contentArea color: "white" width: parent.width height: 10 + col.height + (noteEdit.visible ? (noteEdit.height + 5) : 0) @@ -204,6 +205,7 @@ Item { Repeater { model: eventInfo Detail { + valueWidth: dragHandle.x - x - 15 isLabel: index % 2 === 0 text: (content === undefined) ? "" : (isLabel ? (content + ":") : content) } @@ -298,4 +300,26 @@ Item { } } + Item { + id: dragHandle + width: 10 + height: 10 + x: 300 + anchors.bottom: parent.bottom + clip: true + MouseArea { + anchors.fill: parent + drag.target: parent + drag.axis: Drag.XAxis + cursorShape: Qt.SizeHorCursor + } + Rectangle { + color: "#55a3b8" + rotation: 45 + width: parent.width * Math.SQRT2 + height: parent.height * Math.SQRT2 + x: parent.width - width / 2 + y: parent.height - height / 2 + } + } } From cdb369931e8f499b8029f133f1f89206d0b17fae Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 27 Feb 2015 18:05:29 +0100 Subject: [PATCH 57/62] QmlProfiler: Show timeline view by default When starting the QML profiler for the first time there is no saved state and the V8 view was shown by default because of the way the dock widgets are created. This is not very useful. Change-Id: I5f8873405b3ebc0683ce8d578466631499932c08 Task-number: QTCREATORBUG-14060 Reviewed-by: Joerg Bornemann --- src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp index c24bcd1b93e..234e81e97f6 100644 --- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp @@ -137,6 +137,7 @@ void QmlProfilerViewManager::createViews() mw->splitDockWidget(mw->toolBarDockWidget(), timelineDock, Qt::Vertical); mw->tabifyDockWidget(timelineDock, eventsDock); mw->tabifyDockWidget(eventsDock, v8profilerDock); + timelineDock->raise(); new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, d->eventsView); new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, d->traceView); From a1abbb983bd4fef1561b71d9006acfe634b97a49 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 5 Mar 2015 11:56:15 +0100 Subject: [PATCH 58/62] Clean exported headers of the Remote Linux, Android plugins. Change-Id: Ie7825b9c7f3e131a8afaebbd4c245f1227c8dcd4 Reviewed-by: Daniel Teske --- src/plugins/android/androidbuildapkstep.h | 1 - src/plugins/android/androidconfigurations.h | 10 ++++++---- src/plugins/android/androidmanager.cpp | 1 + src/plugins/android/androidmanager.h | 3 ++- src/plugins/android/androidqtsupport.h | 13 ++++++------- src/plugins/android/androidrunconfiguration.h | 2 -- .../remotelinux/remotelinuxenvironmentaspect.cpp | 1 + .../remotelinux/remotelinuxenvironmentaspect.h | 2 -- .../remotelinuxenvironmentaspectwidget.cpp | 1 + .../remotelinux/remotelinuxsignaloperation.h | 1 - 10 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/plugins/android/androidbuildapkstep.h b/src/plugins/android/androidbuildapkstep.h index c8aff85c014..a32d78a6e83 100644 --- a/src/plugins/android/androidbuildapkstep.h +++ b/src/plugins/android/androidbuildapkstep.h @@ -34,7 +34,6 @@ #include "android_global.h" #include -#include QT_BEGIN_NAMESPACE class QAbstractItemModel; diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h index 7c1d7649f97..f35cce897a1 100644 --- a/src/plugins/android/androidconfigurations.h +++ b/src/plugins/android/androidconfigurations.h @@ -41,16 +41,18 @@ #include #include -#include - #include -#include QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE -namespace ProjectExplorer { class Project; } +namespace ProjectExplorer { +class Abi; +class Project; +} + +namespace Utils { class Environment; } namespace Android { class AndroidPlugin; diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 80b61e0bfa1..3c2625c8604 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "androidmanager.h" +#include "androidconstants.h" #include "androiddeployconfiguration.h" #include "androidconfigurations.h" #include "androidrunconfiguration.h" diff --git a/src/plugins/android/androidmanager.h b/src/plugins/android/androidmanager.h index acb81dfafdc..771963a1fca 100644 --- a/src/plugins/android/androidmanager.h +++ b/src/plugins/android/androidmanager.h @@ -32,7 +32,6 @@ #define ANDROIDMANAGER_H #include "android_global.h" -#include #include #include @@ -43,6 +42,8 @@ class Kit; class Target; } +namespace Utils { class FileName; } + namespace Android { class AndroidQtSupport; diff --git a/src/plugins/android/androidqtsupport.h b/src/plugins/android/androidqtsupport.h index 013e28a3b2a..b6e2867f5a5 100644 --- a/src/plugins/android/androidqtsupport.h +++ b/src/plugins/android/androidqtsupport.h @@ -31,21 +31,20 @@ #ifndef ANDROIDSUPPORT_H #define ANDROIDSUPPORT_H +#include "android_global.h" + #include #include -#include - -#include - -#include "android_global.h" - namespace ProjectExplorer { - class Target; class DeployConfiguration; class ProcessParameters; + class Project; + class Target; } +namespace Utils { class FileName; } + namespace Android { class ANDROID_EXPORT AndroidQtSupport : public QObject diff --git a/src/plugins/android/androidrunconfiguration.h b/src/plugins/android/androidrunconfiguration.h index 67b0d41db0b..d62936e8cda 100644 --- a/src/plugins/android/androidrunconfiguration.h +++ b/src/plugins/android/androidrunconfiguration.h @@ -32,8 +32,6 @@ #define ANDROIDRUNCONFIGURATION_H #include "android_global.h" -#include "androidconstants.h" -#include "androidconfigurations.h" #include diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp index a6a63f27d7f..66cd812653e 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp @@ -30,6 +30,7 @@ #include "remotelinuxenvironmentaspect.h" +#include "abstractremotelinuxrunconfiguration.h" #include "remotelinuxenvironmentaspectwidget.h" namespace RemoteLinux { diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h index f818cd7c6da..a920dce1a93 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h +++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h @@ -31,8 +31,6 @@ #ifndef REMOTELINUXENVIRONMENTASPECT_H #define REMOTELINUXENVIRONMENTASPECT_H -#include "abstractremotelinuxrunconfiguration.h" - #include "remotelinux_export.h" #include diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp index bb1b21cad40..2da43252ba0 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp +++ b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp @@ -30,6 +30,7 @@ #include "remotelinuxenvironmentaspectwidget.h" +#include "remotelinuxrunconfiguration.h" #include "remotelinuxenvironmentreader.h" #include diff --git a/src/plugins/remotelinux/remotelinuxsignaloperation.h b/src/plugins/remotelinux/remotelinuxsignaloperation.h index c387ba6ab9e..342ebe8ba6e 100644 --- a/src/plugins/remotelinux/remotelinuxsignaloperation.h +++ b/src/plugins/remotelinux/remotelinuxsignaloperation.h @@ -37,7 +37,6 @@ #include namespace QSsh { -class SshConnectionParameters; class SshRemoteProcessRunner; } From 673be1a3f8d28474d830762e46c7157a54ef3c39 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 5 Mar 2015 10:33:01 +0100 Subject: [PATCH 59/62] MimeDatabase: Do not crash/assert on invalid mime magic data Change-Id: I355241e472b1bb379ccc94fdd896c6d894206b0a Reviewed-by: Eike Ziller --- src/libs/utils/mimetypes/mimemagicrule.cpp | 46 ++++++++++++++++----- src/libs/utils/mimetypes/mimemagicrule_p.h | 3 +- src/libs/utils/mimetypes/mimetypeparser.cpp | 10 ++--- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/libs/utils/mimetypes/mimemagicrule.cpp b/src/libs/utils/mimetypes/mimemagicrule.cpp index 397bf23c903..6fa471f2cad 100644 --- a/src/libs/utils/mimetypes/mimemagicrule.cpp +++ b/src/libs/utils/mimetypes/mimemagicrule.cpp @@ -233,14 +233,13 @@ QByteArray MimeMagicRule::makePattern(const QByteArray &value) } MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType, - const QByteArray &theValue, - int theStartPos, - int theEndPos, - const QByteArray &theMask) : + const QByteArray &theValue, + int theStartPos, + int theEndPos, + const QByteArray &theMask, + QString *errorString) : d(new MimeMagicRulePrivate) { - Q_ASSERT(!theValue.isEmpty()); - d->type = theType; d->value = theValue; d->startPos = theStartPos; @@ -248,10 +247,23 @@ MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType, d->mask = theMask; d->matchFunction = 0; + if (d->value.isEmpty()) { + d->type = Invalid; + if (errorString) + *errorString = QLatin1String("Invalid empty magic rule value"); + return; + } + if (d->type >= Host16 && d->type <= Byte) { bool ok; d->number = d->value.toUInt(&ok, 0); // autodetect - Q_ASSERT(ok); + if (!ok) { + d->type = Invalid; + if (errorString) + *errorString = QString::fromLatin1("Invalid magic rule value \"%1\"").arg( + QString::fromLatin1(d->value)); + return; + } d->numberMask = !d->mask.isEmpty() ? d->mask.toUInt(&ok, 0) : 0; // autodetect } @@ -260,9 +272,23 @@ MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType, d->pattern = makePattern(d->value); d->pattern.squeeze(); if (!d->mask.isEmpty()) { - Q_ASSERT(d->mask.size() >= 4 && d->mask.startsWith("0x")); - d->mask = QByteArray::fromHex(QByteArray::fromRawData(d->mask.constData() + 2, d->mask.size() - 2)); - Q_ASSERT(d->mask.size() == d->pattern.size()); + if (d->mask.size() < 4 || !d->mask.startsWith("0x")) { + d->type = Invalid; + if (errorString) + *errorString = QString::fromLatin1("Invalid magic rule mask \"%1\"").arg( + QString::fromLatin1(d->mask)); + return; + } + const QByteArray &tempMask = QByteArray::fromHex(QByteArray::fromRawData( + d->mask.constData() + 2, d->mask.size() - 2)); + if (tempMask.size() != d->pattern.size()) { + d->type = Invalid; + if (errorString) + *errorString = QString::fromLatin1("Invalid magic rule mask size \"%1\"").arg( + QString::fromLatin1(d->mask)); + return; + } + d->mask = tempMask; } else { d->mask.fill(char(-1), d->pattern.size()); } diff --git a/src/libs/utils/mimetypes/mimemagicrule_p.h b/src/libs/utils/mimetypes/mimemagicrule_p.h index 495d2167043..b1ebe1060ce 100644 --- a/src/libs/utils/mimetypes/mimemagicrule_p.h +++ b/src/libs/utils/mimetypes/mimemagicrule_p.h @@ -65,7 +65,8 @@ class QTCREATOR_UTILS_EXPORT MimeMagicRule public: enum Type { Invalid = 0, String, Host16, Host32, Big16, Big32, Little16, Little32, Byte }; - MimeMagicRule(Type type, const QByteArray &value, int startPos, int endPos, const QByteArray &mask = QByteArray()); + MimeMagicRule(Type type, const QByteArray &value, int startPos, int endPos, + const QByteArray &mask = QByteArray(), QString *errorString = 0); MimeMagicRule(const MimeMagicRule &other); ~MimeMagicRule(); diff --git a/src/libs/utils/mimetypes/mimetypeparser.cpp b/src/libs/utils/mimetypes/mimetypeparser.cpp index 2b953a9168f..c1db64fb5c4 100644 --- a/src/libs/utils/mimetypes/mimetypeparser.cpp +++ b/src/libs/utils/mimetypes/mimetypeparser.cpp @@ -176,10 +176,6 @@ static bool createMagicMatchRule(const QXmlStreamAttributes &atts, return true; } const QString value = atts.value(QLatin1String(matchValueAttributeC)).toString(); - if (value.isEmpty()) { - *errorMessage = QString::fromLatin1("Empty match value detected."); - return false; - } // Parse for offset as "1" or "1:10" int startPos, endPos; const QString offsetS = atts.value(QLatin1String(matchOffsetAttributeC)).toString(); @@ -190,8 +186,12 @@ static bool createMagicMatchRule(const QXmlStreamAttributes &atts, return false; const QString mask = atts.value(QLatin1String(matchMaskAttributeC)).toString(); - rule = new MimeMagicRule(magicType, value.toUtf8(), startPos, endPos, mask.toLatin1()); + MimeMagicRule *tempRule = new MimeMagicRule(magicType, value.toUtf8(), startPos, endPos, + mask.toLatin1(), errorMessage); + if (!tempRule->isValid()) + return false; + rule = tempRule; return true; } #endif From 4d2359443fe870c69e73e5ebc4b73d7b1605510c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 5 Mar 2015 12:07:11 +0100 Subject: [PATCH 60/62] Mime settings: Fix crash when reading invalid custom data This also deduplicates the validity checks on MIME magic data Change-Id: I0ce0df61ca4459b3e1190f75b778abd04bc908bd Task-number: QTCREATORBUG-13987 Reviewed-by: Daniel Teske --- .../coreplugin/mimetypemagicdialog.cpp | 68 +++++++------------ src/plugins/coreplugin/mimetypemagicdialog.h | 1 + src/plugins/coreplugin/mimetypesettings.cpp | 11 ++- 3 files changed, 33 insertions(+), 47 deletions(-) diff --git a/src/plugins/coreplugin/mimetypemagicdialog.cpp b/src/plugins/coreplugin/mimetypemagicdialog.cpp index 5dd17c4dfc6..33be9bd02b0 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.cpp +++ b/src/plugins/coreplugin/mimetypemagicdialog.cpp @@ -93,45 +93,12 @@ void MimeTypeMagicDialog::applyRecommended(bool checked) void MimeTypeMagicDialog::validateAccept() { - Utils::Internal::MimeMagicRule::Type type = typeValue(ui.typeSelector->currentIndex()); - // checks similar to the one in MimeMagicRule constructor, which asserts on these... - if (ui.valueLineEdit->text().isEmpty()) { - QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Empty value not allowed.")); - return; - } else if (type >= Utils::Internal::MimeMagicRule::Host16 - && type <= Utils::Internal::MimeMagicRule::Byte) { - bool ok; - ui.valueLineEdit->text().toUInt(&ok, 0/*autodetect*/); - if (!ok) { - QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Value must be a number.")); - return; - } - } else if (type == Utils::Internal::MimeMagicRule::String) { - if (!ui.maskLineEdit->text().isEmpty()) { - QByteArray mask = ui.maskLineEdit->text().toLatin1(); - if (mask.size() < 4) { - QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Mask too short.")); - return; - } else if (!mask.startsWith("0x")) { - QMessageBox::critical(ICore::dialogParent(), tr("Error"), - tr("Mask must start with \"0x\".")); - return; - } else { - QByteArray pattern = Utils::Internal::MimeMagicRule::makePattern(ui.valueLineEdit->text().toUtf8()); - mask = QByteArray::fromHex(QByteArray::fromRawData(mask.constData() + 2, mask.size() - 2)); - if (mask.size() != pattern.size()) { - QMessageBox::critical(ICore::dialogParent(), tr("Error"), - tr("Mask has different size than pattern.")); - return; - } - } - } - } else if (type == Utils::Internal::MimeMagicRule::Invalid) { - QMessageBox::critical(ICore::dialogParent(), tr("Internal Error"), - tr("Type is invalid.")); - return; - } - accept(); + QString errorMessage; + Utils::Internal::MimeMagicRule rule = createRule(&errorMessage); + if (rule.isValid()) + accept(); + else + QMessageBox::critical(ICore::dialogParent(), tr("Error"), errorMessage); } void MimeTypeMagicDialog::setMagicData(const MagicData &data) @@ -147,12 +114,7 @@ void MimeTypeMagicDialog::setMagicData(const MagicData &data) MagicData MimeTypeMagicDialog::magicData() const { - MagicData data(Utils::Internal::MimeMagicRule(typeValue(ui.typeSelector->currentIndex()), - ui.valueLineEdit->text().toUtf8(), - ui.startRangeSpinBox->value(), - ui.endRangeSpinBox->value(), - ui.maskLineEdit->text().toLatin1()), - ui.prioritySpinBox->value()); + MagicData data(createRule(), ui.prioritySpinBox->value()); return data; } @@ -181,3 +143,19 @@ QByteArray MagicData::normalizedMask(const Utils::Internal::MimeMagicRule &rule) } return mask; } + +Utils::Internal::MimeMagicRule MimeTypeMagicDialog::createRule(QString *errorMessage) const +{ + Utils::Internal::MimeMagicRule::Type type = typeValue(ui.typeSelector->currentIndex()); + Utils::Internal::MimeMagicRule rule(type, + ui.valueLineEdit->text().toUtf8(), + ui.startRangeSpinBox->value(), + ui.endRangeSpinBox->value(), + ui.maskLineEdit->text().toLatin1(), + errorMessage); + if (type == Utils::Internal::MimeMagicRule::Invalid) { + if (errorMessage) + *errorMessage = tr("Internal error: Type is invalid"); + } + return rule; +} diff --git a/src/plugins/coreplugin/mimetypemagicdialog.h b/src/plugins/coreplugin/mimetypemagicdialog.h index af4873385a7..b65c9934cde 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.h +++ b/src/plugins/coreplugin/mimetypemagicdialog.h @@ -73,6 +73,7 @@ public: private: void applyRecommended(bool checked); void validateAccept(); + Utils::Internal::MimeMagicRule createRule(QString *errorMessage = 0) const; Ui::MimeTypeMagicDialog ui; int m_customRangeStart; diff --git a/src/plugins/coreplugin/mimetypesettings.cpp b/src/plugins/coreplugin/mimetypesettings.cpp index f979841344a..cd4a4f7f938 100644 --- a/src/plugins/coreplugin/mimetypesettings.cpp +++ b/src/plugins/coreplugin/mimetypesettings.cpp @@ -514,9 +514,16 @@ MimeTypeSettingsPrivate::UserMimeTypeHash MimeTypeSettingsPrivate::readUserModif QPair range = rangeFromString(rangeString); int priority = atts.value(QLatin1String(priorityAttributeC)).toString().toInt(); QByteArray mask = atts.value(QLatin1String(matchMaskAttributeC)).toLatin1(); + QString errorMessage; Utils::Internal::MimeMagicRule rule(Utils::Internal::MimeMagicRule::type(typeName), - value, range.first, range.second, mask); - mt.rules[priority].append(rule); + value, range.first, range.second, mask, + &errorMessage); + if (rule.isValid()) { + mt.rules[priority].append(rule); + } else { + qWarning("Error reading magic rule in custom mime type %s: %s", + qPrintable(mt.name), qPrintable(errorMessage)); + } } break; case QXmlStreamReader::EndElement: From 39f904957a991c712d034f1c4ffc07b172fff9aa Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Mar 2015 11:11:32 +0100 Subject: [PATCH 61/62] Debugger: Merge GDB/LLDB process error handling This also removes some of the "illegal" state transitions, partially addressing QTCREATORBUG-14089. Change-Id: I817d87a0b5e0a40285bc9b0880fef5bceaee3f16 Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerengine.cpp | 32 ++++++++++++++++++++++++ src/plugins/debugger/debuggerengine.h | 3 +++ src/plugins/debugger/gdb/gdbengine.cpp | 25 ++---------------- src/plugins/debugger/gdb/gdbengine.h | 2 +- src/plugins/debugger/lldb/lldbengine.cpp | 9 +++---- src/plugins/debugger/lldb/lldbengine.h | 2 +- 6 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index ee52c753008..061ad97253e 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1178,6 +1178,38 @@ void DebuggerEngine::notifyInferiorExited() d->queueShutdownEngine(); } +void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode, + QProcess::ExitStatus exitStatus, const QString &backendName) +{ + showMessage(_("%1 PROCESS FINISHED, status %2, exit code %3") + .arg(backendName).arg(exitStatus).arg(exitCode)); + + switch (state()) { + case DebuggerFinished: + // Nothing to do. + break; + case EngineShutdownRequested: + notifyEngineShutdownOk(); + break; + case InferiorRunOk: + // This could either be a real gdb/lldb crash or a quickly exited inferior + // in the terminal adapter. In this case the stub proc will die soon, + // too, so there's no need to act here. + showMessage(_("The %1 process exited somewhat unexpectedly.").arg(backendName)); + notifyEngineSpontaneousShutdown(); + break; + default: { + notifyEngineIll(); // Initiate shutdown sequence + const QString msg = exitStatus == QProcess::CrashExit ? + tr("The %1 process terminated.") : + tr("The %2 process terminated unexpectedly (exitCode %1)").arg(exitCode); + AsynchronousMessageBox::critical(tr("Unexpected %1 Exit").arg(backendName), + msg.arg(backendName)); + break; + } + } +} + void DebuggerEngine::slaveEngineStateChanged(DebuggerEngine *slaveEngine, DebuggerState state) { diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 80075c9e023..c65a4485683 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -35,6 +35,7 @@ #include "debuggerconstants.h" #include +#include QT_BEGIN_NAMESPACE class QDebug; @@ -313,6 +314,8 @@ protected: public: virtual void notifyInferiorExited(); + void notifyDebuggerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus, + const QString &backendName); protected: virtual void notifyInferiorShutdownOk(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 1731c22d717..c61ca86c34b 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4366,33 +4366,12 @@ void GdbEngine::handleGdbError(QProcess::ProcessError error) } } -void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type) +void GdbEngine::handleGdbFinished(int exitCode, QProcess::ExitStatus exitStatus) { if (m_commandTimer.isActive()) m_commandTimer.stop(); - showMessage(_("GDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code)); - - switch (state()) { - case EngineShutdownRequested: - notifyEngineShutdownOk(); - break; - case InferiorRunOk: - // This could either be a real gdb crash or a quickly exited inferior - // in the terminal adapter. In this case the stub proc will die soon, - // too, so there's no need to act here. - showMessage(_("The gdb process exited somewhat unexpectedly.")); - notifyEngineSpontaneousShutdown(); - break; - default: { - notifyEngineIll(); // Initiate shutdown sequence - const QString msg = type == QProcess::CrashExit ? - tr("The gdb process terminated.") : - tr("The gdb process terminated unexpectedly (code %1)").arg(code); - AsynchronousMessageBox::critical(tr("Unexpected GDB Exit"), msg); - break; - } - } + notifyDebuggerProcessFinished(exitCode, exitStatus, QLatin1String("GDB")); } void GdbEngine::abortDebugger() diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 51819122fba..a5bc93e88b3 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -132,7 +132,7 @@ protected: ////////// Gdb Process Management ////////// private slots: friend class GdbPlainEngine; void handleInterruptDeviceInferior(const QString &error); - void handleGdbFinished(int, QProcess::ExitStatus status); + void handleGdbFinished(int exitCode, QProcess::ExitStatus exitStatus); void handleGdbError(QProcess::ProcessError error); void readDebugeeOutput(const QByteArray &data); void readGdbStandardOutput(); diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index fbf210997b9..8370ea6730b 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -903,8 +903,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params) void LldbEngine::handleLldbError(QProcess::ProcessError error) { - qDebug() << "HANDLE LLDB ERROR"; - showMessage(_("HANDLE LLDB ERROR")); + showMessage(_("LLDB PROCESS ERROR: %1").arg(error)); switch (error) { case QProcess::Crashed: break; // will get a processExited() as well @@ -947,11 +946,9 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const } } -void LldbEngine::handleLldbFinished(int code, QProcess::ExitStatus type) +void LldbEngine::handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus) { - qDebug() << "LLDB FINISHED"; - showMessage(_("LLDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code)); - notifyEngineSpontaneousShutdown(); + notifyDebuggerProcessFinished(exitCode, exitStatus, QLatin1String("LLDB")); } void LldbEngine::readLldbStandardError() diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index 46e8a780ea7..87bdff27d93 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -134,7 +134,7 @@ private: QString errorMessage(QProcess::ProcessError error) const; bool hasCapability(unsigned cap) const; - void handleLldbFinished(int, QProcess::ExitStatus status); + void handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus); void handleLldbError(QProcess::ProcessError error); void readLldbStandardOutput(); void readLldbStandardError(); From 714240242955e626f2814ea8f5f5257e0c5c0dcf Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 25 Feb 2015 13:53:54 +0100 Subject: [PATCH 62/62] Squish: Fix tst_rename_file Changed behavior due to changes related to MIME database. Change-Id: I54bbfd8ca5d027716ef6bca308df0863635fe474 Reviewed-by: Robert Loehning --- .../system/suite_general/tst_rename_file/test.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py index 34309bbda2f..25fa7c48fd6 100644 --- a/tests/system/suite_general/tst_rename_file/test.py +++ b/tests/system/suite_general/tst_rename_file/test.py @@ -55,15 +55,13 @@ def main(): previous = filenames[-1] for filename in filenames: tempFiletype = filetype - if filetype == "QML" and previous[-4:] != ".qml": + if previous in ("test", "TEST"): + if tempFiletype in ("Headers", "Sources", "QML"): + tempFiletype = "Sources" + else: # then it must be Resources + tempFiletype = "Other files" + elif filetype == "QML" and previous[-4:] != ".qml": tempFiletype = "Other files" - # following is necessary due to QTCREATORBUG-10179 - # will be fixed when Qt5's MIME type database can be used - if ((filenames[-1] in ("main.cpp", "utility.cpp") and previous[-4:] != ".cpp") - or (filenames[-1] == "utility.h" and previous[-2:].lower() != ".h") - or (filetype == "Resources" and previous[-4:] != ".qrc")): - tempFiletype = "Other files" - # end of handling QTCREATORBUG-10179 renameFile(templateDir, usedProFile, projectName + "." + tempFiletype, previous, filename) # QTCREATORBUG-13176 does update the navigator async @@ -99,7 +97,7 @@ def renameFile(projectDir, proFile, branch, oldname, newname): if platform.system() == 'Darwin': waitFor("macHackActivateContextMenuItem('Rename...')", 5000) else: - if oldname.endswith(".qrc"): + if oldname.lower().endswith(".qrc"): menu = ":Qt Creator.Project.Menu.Folder_QMenu" else: menu = ":Qt Creator.Project.Menu.File_QMenu"