diff --git a/doc/src/overview/creator-commercial-overview.qdoc b/doc/src/overview/creator-commercial-overview.qdoc index 8e2d9243d33..cf195a8b38a 100644 --- a/doc/src/overview/creator-commercial-overview.qdoc +++ b/doc/src/overview/creator-commercial-overview.qdoc @@ -47,5 +47,7 @@ integration \li \l{http://doc.qt.io/QtForDeviceCreation/index.html}{Developing for embedded devices} + \li \l{http://doc.qt.io/qtcreator/creator-overview-qtasam.html} + {Qt Application Manager} integration \endlist */ diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc index 2b8d03b44e5..e690ac14d19 100644 --- a/doc/src/overview/creator-mobile-targets.qdoc +++ b/doc/src/overview/creator-mobile-targets.qdoc @@ -85,4 +85,16 @@ \endlist + \section1 Related Topics + + \list + + \li \l{http://doc.qt.io/qtcreator/creator-overview-qtasam.html} + {Qt Application Manager} + + You can use the experimental Qt Application Manager plugin + (commercial only) to deploy, run, and debug applications on the + local Linux PC, remote generic SSH Linux targets, or + \l{Embedded Devices}{embedded devices}. + \endlist */ diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp index ebce839f659..ed232355b55 100644 --- a/src/plugins/android/androiddebugsupport.cpp +++ b/src/plugins/android/androiddebugsupport.cpp @@ -55,7 +55,7 @@ namespace Internal { static const char * const qMakeVariables[] = { "QT_INSTALL_LIBS", "QT_INSTALL_PLUGINS", - "QT_INSTALL_IMPORTS" + "QT_INSTALL_QML" }; static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index 8fb8775194d..ad6363bc0e6 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -161,7 +161,8 @@ static void prependTargetTripleIfNotIncludedAndNotEmpty(QStringList *arguments, } // Removes (1) inputFile (2) -o . -QStringList inputAndOutputArgumentsRemoved(const QString &inputFile, const QStringList &arguments) +QStringList inputAndOutputArgumentsRemoved(const QString &inputFile, const QStringList &arguments, + bool isMsvc) { QStringList newArguments; @@ -173,6 +174,9 @@ QStringList inputAndOutputArgumentsRemoved(const QString &inputFile, const QStri } else if (argument == QLatin1String("-o")) { skip = true; continue; + } else if (isMsvc && argument == QLatin1String("-target")) { + skip = true; + continue; } else if (QDir::fromNativeSeparators(argument) == inputFile) { continue; // TODO: Let it in? } @@ -233,11 +237,23 @@ public: ClangStaticAnalyzerOptionsBuilder(const CppTools::ProjectPart &projectPart) : CompilerOptionsBuilder(projectPart) - , m_isMsvcToolchain(m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) + , m_isMsvcToolchain(m_projectPart.toolchainType + == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) + , m_isMinGWToolchain(m_projectPart.toolchainType + == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID) { } public: + bool excludeHeaderPath(const QString &headerPath) const override + { + if (CompilerOptionsBuilder::excludeHeaderPath(headerPath)) + return true; + if (m_isMinGWToolchain && headerPath.contains(m_projectPart.toolChainTargetTriple)) + return true; + return false; + } + void undefineClangVersionMacrosForMsvc() { if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) { @@ -260,7 +276,7 @@ private: // For MSVC toolchains we use clang-cl.exe, so there is nothing to do here since // 1) clang-cl.exe does not understand the "-triple" option // 2) clang-cl.exe already hardcodes the right triple value (even if built with mingw) - if (m_projectPart.toolchainType != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) + if (!m_isMsvcToolchain) CompilerOptionsBuilder::addTargetTriple(); } @@ -317,6 +333,7 @@ private: private: bool m_isMsvcToolchain; + bool m_isMinGWToolchain; }; static QStringList createMsCompatibilityVersionOption(const ProjectPart &projectPart) @@ -364,9 +381,12 @@ static QStringList tweakedArguments(const ProjectPart &projectPart, const QStringList &arguments, const QString &targetTriple) { - QStringList newArguments = inputAndOutputArgumentsRemoved(filePath, arguments); + const bool isMsvc = projectPart.toolchainType + == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID; + QStringList newArguments = inputAndOutputArgumentsRemoved(filePath, arguments, isMsvc); prependWordWidthArgumentIfNotIncluded(&newArguments, projectPart.toolChainWordWidth); - prependTargetTripleIfNotIncludedAndNotEmpty(&newArguments, targetTriple); + if (!isMsvc) + prependTargetTripleIfNotIncludedAndNotEmpty(&newArguments, targetTriple); newArguments.append(createHeaderPathsOptionsForClangOnMac(projectPart)); newArguments.append(createMsCompatibilityVersionOption(projectPart)); newArguments.append(createOptionsToUndefineClangVersionMacrosForMsvc(projectPart)); diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp index c69855ecd28..2ab8c18d9ba 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp @@ -75,6 +75,13 @@ void ClangStaticAnalyzerUnitTests::testProject() { QFETCH(QString, projectFilePath); QFETCH(int, expectedDiagCount); + if (projectFilePath.contains("mingw")) { + const ToolChain * const toolchain + = ToolChainKitInformation::toolChain(KitManager::kits().first(), + Constants::CXX_LANGUAGE_ID); + if (toolchain->typeId() != ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID) + QSKIP("This test is mingw specific, does not run for other toolchais"); + } CppTools::Tests::ProjectOpenerAndCloser projectManager; const CppTools::ProjectInfo projectInfo = projectManager.open(projectFilePath, true); @@ -107,6 +114,9 @@ void ClangStaticAnalyzerUnitTests::testProject_data() addTestRow("qt-essential-includes/qt-essential-includes.qbs", 0); addTestRow("qt-essential-includes/qt-essential-includes.pro", 0); + + addTestRow("mingw-includes/mingw-includes.qbs", 0); + addTestRow("mingw-includes/mingw-includes.pro", 0); } void ClangStaticAnalyzerUnitTests::addTestRow(const QByteArray &relativeFilePath, diff --git a/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/main.cpp b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/main.cpp new file mode 100644 index 00000000000..fc104e426d5 --- /dev/null +++ b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/main.cpp @@ -0,0 +1,7 @@ +#include +#include "intrin.h" + +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.pro b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.pro new file mode 100644 index 00000000000..c5faffece4c --- /dev/null +++ b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.pro @@ -0,0 +1,3 @@ +CONFIG -= QT + +SOURCES += main.cpp diff --git a/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.qbs b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.qbs new file mode 100644 index 00000000000..f6ae698a0cb --- /dev/null +++ b/src/plugins/clangstaticanalyzer/unit-tests/mingw-includes/mingw-includes.qbs @@ -0,0 +1,5 @@ +import qbs + +CppApplication { + files: ["main.cpp"] +} diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp index 52478b78282..a4cd157c71a 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -91,6 +92,7 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString * const Core::Context projectContext(::QbsProjectManager::Constants::PROJECT_ID); Core::FileIconProvider::registerIconOverlayForSuffix(ProjectExplorer::Constants::FILEOVERLAY_QT, "qbs"); + Core::HelpManager::registerDocumentation({Core::ICore::documentationPath() + "/qbs.qch"}); ProjectManager::registerProjectType(QmlJSTools::Constants::QBS_MIMETYPE); KitManager::registerKitInformation(new QbsKitInformation); diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index 2860d0513ab..b994c6f9be8 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -79,6 +79,8 @@ private: arguments.append(Utils::QtcProcess::splitArgs(r.commandLineArguments)); r.commandLineArguments = Utils::QtcProcess::joinArgs(arguments); + setRunnable(r); + SimpleTargetRunner::start(); } @@ -102,9 +104,9 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl) debuggeeRunner->addStartDependency(m_portsGatherer); auto slog2InfoRunner = new Slog2InfoRunner(runControl); - slog2InfoRunner->addStartDependency(debuggeeRunner); + debuggeeRunner->addStartDependency(slog2InfoRunner); - addStartDependency(slog2InfoRunner); + addStartDependency(debuggeeRunner); } void QnxDebugSupport::start() @@ -136,15 +138,9 @@ void QnxDebugSupport::start() if (qtVersion) params.solibSearchPath = QnxUtils::searchPaths(qtVersion); - reportStarted(); -} + setStartParameters(params); -void QnxDebugSupport::stop() -{ - // We have to kill the inferior process, as invoking "kill" in - // gdb doesn't work on QNX gdb. - auto stdRunnable = runnable().as(); - device()->signalOperation()->killProcess(stdRunnable.executable); + DebuggerRunTool::start(); } } // namespace Internal diff --git a/src/plugins/qnx/qnxdebugsupport.h b/src/plugins/qnx/qnxdebugsupport.h index 452dc581562..4bc75283c44 100644 --- a/src/plugins/qnx/qnxdebugsupport.h +++ b/src/plugins/qnx/qnxdebugsupport.h @@ -39,7 +39,6 @@ public: private: void start() override; - void stop() override; Debugger::GdbServerPortsGatherer *m_portsGatherer; }; diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index 527dc16ceb9..b5075285b4c 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -43,6 +43,7 @@ namespace Internal { Slog2InfoRunner::Slog2InfoRunner(RunControl *runControl) : RunWorker(runControl) { + setDisplayName("Slog2InfoRunner"); auto qnxRunConfig = qobject_cast(runControl->runConfiguration()); QTC_ASSERT(qnxRunConfig, return); m_applicationId = FileName::fromString(qnxRunConfig->remoteExecutableFilePath()).fileName(); @@ -75,6 +76,7 @@ void Slog2InfoRunner::start() StandardRunnable r; r.executable = QLatin1String("slog2info"); m_testProcess->start(r); + reportStarted(); } void Slog2InfoRunner::stop() @@ -86,6 +88,7 @@ void Slog2InfoRunner::stop() m_logProcess->kill(); processLog(true); } + reportStopped(); } bool Slog2InfoRunner::commandFound() const diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index db4c4e1cd56..b331ddb6671 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -243,7 +243,7 @@ def getOutputFromCmdline(cmdline, environment=None, acceptedError=0): test.warning("Command '%s' returned %d" % (e.cmd, e.returncode)) return e.output -def selectFromFileDialog(fileName, waitForFile=False): +def selectFromFileDialog(fileName, waitForFile=False, ignoreFinalSnooze=False): if platform.system() == "Darwin": snooze(1) nativeType("") @@ -253,7 +253,8 @@ def selectFromFileDialog(fileName, waitForFile=False): nativeType("") snooze(3) nativeType("") - snooze(1) + if not ignoreFinalSnooze: + snooze(1) else: fName = os.path.basename(os.path.abspath(fileName)) pName = os.path.dirname(os.path.abspath(fileName)) + os.sep @@ -271,9 +272,12 @@ def selectFromFileDialog(fileName, waitForFile=False): nativeType("") nativeType("") nativeType(pName + fName) - snooze(1) + seconds = len(pName + fName) / 20 + test.log("Using snooze(%d) [problems with event processing of nativeType()]" % seconds) + snooze(seconds) nativeType("") - snooze(3) + if not ignoreFinalSnooze: + snooze(3) if waitForFile: fileCombo = waitForObject(":Qt Creator_FilenameQComboBox") if not waitFor("str(fileCombo.currentText) in fileName", 5000): diff --git a/tests/system/suite_general/tst_tasks_handling/test.py b/tests/system/suite_general/tst_tasks_handling/test.py index 69e7a6719cb..6870cceeadc 100644 --- a/tests/system/suite_general/tst_tasks_handling/test.py +++ b/tests/system/suite_general/tst_tasks_handling/test.py @@ -99,7 +99,7 @@ def main(): model = waitForObject(":Qt Creator.Issues_QListView").model() test.verify(model.rowCount() == 0, 'Got an empty issue list to start from.') invokeMenuItem("File", "Open File or Project...") - selectFromFileDialog(tasksFile) + selectFromFileDialog(tasksFile, False, True) starttime = datetime.utcnow() waitFor("model.rowCount() == expectedNo", 10000) endtime = datetime.utcnow() diff --git a/tests/unit/unittest/clangdocumentsuspenderresumer-test.cpp b/tests/unit/unittest/clangdocumentsuspenderresumer-test.cpp index 8c1954410fb..8f51e7b0896 100644 --- a/tests/unit/unittest/clangdocumentsuspenderresumer-test.cpp +++ b/tests/unit/unittest/clangdocumentsuspenderresumer-test.cpp @@ -183,7 +183,7 @@ TEST_F(DocumentSuspenderResumer, CategorizeWithMoreVisibleDocumentsThanHotDocume ASSERT_THAT(coldDocuments, IsEmpty()); } -TEST_F(DocumentSuspenderResumer, CreateSuspendJobForInvisible) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendJobForInvisible)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(false); @@ -199,7 +199,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobForInvisible) ASSERT_THAT(jobs, ContainerEq(expectedJobs)); } -TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForVisible) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateSuspendJobForVisible)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(false); @@ -210,7 +210,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForVisible) ASSERT_THAT(jobs, IsEmpty()); } -TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForUnparsed) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateSuspendJobForUnparsed)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(false); @@ -221,7 +221,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForUnparsed) ASSERT_THAT(jobs, IsEmpty()); } -TEST_F(DocumentSuspenderResumer, CreateSuspendJobsForDocumentWithSupportiveTranslationUnit) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendJobsForDocumentWithSupportiveTranslationUnit)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(false); @@ -238,7 +238,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobsForDocumentWithSupportiveTrans ASSERT_THAT(jobs, ContainerEq(expectedJobs)); } -TEST_F(DocumentSuspenderResumer, CreateResumeJob) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateResumeJob)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(true); @@ -252,7 +252,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJob) ASSERT_THAT(jobs, ContainerEq(expectedJobs)); } -TEST_F(DocumentSuspenderResumer, DoNotCreateResumeJobForInvisible) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateResumeJobForInvisible)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(true); @@ -263,7 +263,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateResumeJobForInvisible) ASSERT_THAT(jobs, IsEmpty()); } -TEST_F(DocumentSuspenderResumer, CreateResumeJobsForDocumentWithSupportiveTranslationUnit) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateResumeJobsForDocumentWithSupportiveTranslationUnit)) { Document document = documents.create({fileContainer1})[0]; document.setIsSuspended(true); @@ -279,7 +279,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJobsForDocumentWithSupportiveTransl ASSERT_THAT(jobs, ContainerEq(expectedJobs)); } -TEST_F(DocumentSuspenderResumer, CreateSuspendAndResumeJobs) +TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendAndResumeJobs)) { Document hotDocument = documents.create({fileContainer1})[0]; hotDocument.setIsSuspended(true); diff --git a/tests/unit/unittest/clangsuspenddocumentjob-test.cpp b/tests/unit/unittest/clangsuspenddocumentjob-test.cpp index b9f92f3beb5..a6aeaf9efe3 100644 --- a/tests/unit/unittest/clangsuspenddocumentjob-test.cpp +++ b/tests/unit/unittest/clangsuspenddocumentjob-test.cpp @@ -58,7 +58,7 @@ TEST_F(SuspendDocumentJob, RunAsync) ASSERT_TRUE(waitUntilJobFinished(job)); } -TEST_F(SuspendDocumentJob, DocumentIsSuspendedAfterRun) +TEST_F(SuspendDocumentJob, DISABLED_WITHOUT_SUSPEND_PATCH(DocumentIsSuspendedAfterRun)) { document.parse(); job.setContext(jobContext); diff --git a/tests/unit/unittest/conditionally-disabled-tests.h b/tests/unit/unittest/conditionally-disabled-tests.h index 88bec6b0b33..29879bbee5c 100644 --- a/tests/unit/unittest/conditionally-disabled-tests.h +++ b/tests/unit/unittest/conditionally-disabled-tests.h @@ -26,6 +26,8 @@ #include #include +#include + #ifdef Q_OS_WIN # define DISABLED_ON_WINDOWS(x) DISABLED_##x #else @@ -37,3 +39,9 @@ #else # define DISABLED_ON_CLANG3(x) x #endif + +#ifdef IS_SUSPEND_SUPPORTED +# define DISABLED_WITHOUT_SUSPEND_PATCH(x) x +#else +# define DISABLED_WITHOUT_SUSPEND_PATCH(x) DISABLED_##x +#endif