diff --git a/qtcreator.qbp b/qtcreator.qbp index 46c7801609a..8e91007aa0d 100644 --- a/qtcreator.qbp +++ b/qtcreator.qbp @@ -136,8 +136,8 @@ Project { Depends { name: "app_version_header" } Depends { name: "cpp" } Depends { name: "Qt"; submodules: ["gui", "network"] } - Depends { name: "utils" } - Depends { name: "extensionsystem" } + Depends { name: "Utils" } + Depends { name: "ExtensionSystem" } files: [ "src/app/main.cpp", diff --git a/src/libs/3rdparty/botan/botan.qbs b/src/libs/3rdparty/botan/botan.qbs index 7fe9388e8c3..a41a3fee688 100644 --- a/src/libs/3rdparty/botan/botan.qbs +++ b/src/libs/3rdparty/botan/botan.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { - name: "botan" - destination: "lib" +QtcLibrary { + name: "Botan" Depends { name: "cpp" } Depends { name: "qt"; submodules: 'core' } diff --git a/src/libs/QtcLibrary.qbs b/src/libs/QtcLibrary.qbs new file mode 100644 index 00000000000..f2116d77d63 --- /dev/null +++ b/src/libs/QtcLibrary.qbs @@ -0,0 +1,10 @@ +import qbs.base 1.0 + +DynamicLibrary { + destination: { + if (qbs.targetOS === "windows") + return "bin" + else + return "lib" + } +} diff --git a/src/libs/aggregation/aggregation.qbs b/src/libs/aggregation/aggregation.qbs index 6e254144f76..ac34d281dbe 100644 --- a/src/libs/aggregation/aggregation.qbs +++ b/src/libs/aggregation/aggregation.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { - name: "aggregation" - destination: "lib" +QtcLibrary { + name: "Aggregation" cpp.includePaths: [ ".", diff --git a/src/libs/cplusplus/cplusplus.qbs b/src/libs/cplusplus/cplusplus.qbs index d79a5e01487..44aef810c2f 100644 --- a/src/libs/cplusplus/cplusplus.qbs +++ b/src/libs/cplusplus/cplusplus.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "CPlusPlus" - destination: "lib" cpp.includePaths: [ ".", diff --git a/src/libs/extensionsystem/extensionsystem.qbs b/src/libs/extensionsystem/extensionsystem.qbs index dd87667eec7..13125b66510 100644 --- a/src/libs/extensionsystem/extensionsystem.qbs +++ b/src/libs/extensionsystem/extensionsystem.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { - name: "extensionsystem" - destination: "lib" +QtcLibrary { + name: "ExtensionSystem" cpp.includePaths: [ ".", @@ -15,7 +15,7 @@ DynamicLibrary { Depends { name: "cpp" } Depends { name: "Qt"; submodules: ["core", "gui"] } - Depends { name: "aggregation" } + Depends { name: "Aggregation" } files: [ "plugindetailsview.ui", diff --git a/src/libs/glsl/glsl.qbs b/src/libs/glsl/glsl.qbs index e208cf7b8db..75e39267091 100644 --- a/src/libs/glsl/glsl.qbs +++ b/src/libs/glsl/glsl.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "GLSL" - destination: "lib" cpp.includePaths: [ ".", diff --git a/src/libs/languageutils/languageutils.qbs b/src/libs/languageutils/languageutils.qbs index fa267951808..4ac659b6304 100644 --- a/src/libs/languageutils/languageutils.qbs +++ b/src/libs/languageutils/languageutils.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "LanguageUtils" - destination: "lib" cpp.includePaths: [ ".", diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs index 55a7d8ce8c8..bf8b1dec83f 100644 --- a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs +++ b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "QmlEditorWidgets" - destination: "lib" cpp.includePaths: [ ".", diff --git a/src/libs/qmljs/qmljs.qbs b/src/libs/qmljs/qmljs.qbs index 518b6bac13f..46d6865171e 100644 --- a/src/libs/qmljs/qmljs.qbs +++ b/src/libs/qmljs/qmljs.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "QmlJS" - destination: "lib" cpp.includePaths: [ ".", @@ -15,8 +15,8 @@ DynamicLibrary { ] cpp.optimization: "fast" - Depends { name: "utils" } - Depends { name: "languageutils" } + Depends { name: "Utils" } + Depends { name: "LanguageUtils" } Depends { name: "cpp" } Depends { name: "Qt"; submodules: ['gui', 'script'] } diff --git a/src/libs/qmljsdebugclient/qmljsdebugclient.qbs b/src/libs/qmljsdebugclient/qmljsdebugclient.qbs index a53a64715a9..926c4e283c8 100644 --- a/src/libs/qmljsdebugclient/qmljsdebugclient.qbs +++ b/src/libs/qmljsdebugclient/qmljsdebugclient.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "QmlJSDebugClient" - destination: "lib" cpp.includePaths: [ ".", diff --git a/src/libs/symbianutils/symbianutils.qbs b/src/libs/symbianutils/symbianutils.qbs index bf4af60aa3c..a586dc8a287 100644 --- a/src/libs/symbianutils/symbianutils.qbs +++ b/src/libs/symbianutils/symbianutils.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "symbianutils" - destination: "lib" cpp.includePaths: [ ".", @@ -21,7 +21,7 @@ DynamicLibrary { Depends { name: "cpp" } Depends { name: "Qt"; submodules: ["network"]} - Depends { name: "utils" } + Depends { name: "Utils" } Group { condition: qbs.targetOS == "linux" || qbs.targetOS == "mac" diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index 7a930a8dc5b..19083fb1b57 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { - name: "utils" - destination: "lib" +QtcLibrary { + name: "Utils" cpp.defines: ["QTCREATOR_UTILS_LIB"] cpp.includePaths: [ ".", "..", @@ -19,7 +19,7 @@ DynamicLibrary { Depends { name: "cpp" } Depends { name: "Qt"; submodules: ['gui', 'network', 'script'] } - Depends { name: "botan" } + Depends { name: "Botan" } Depends { name: "app_version_header" } files: [ diff --git a/src/libs/zeroconf/zeroconf.qbs b/src/libs/zeroconf/zeroconf.qbs index 5611b205b8c..279ce89510e 100644 --- a/src/libs/zeroconf/zeroconf.qbs +++ b/src/libs/zeroconf/zeroconf.qbs @@ -1,8 +1,8 @@ import qbs.base 1.0 +import "../QtcLibrary.qbs" as QtcLibrary -DynamicLibrary { +QtcLibrary { name: "zeroconf" - destination: "lib" Depends { name: "cpp" } Depends { name: "Qt.network" } diff --git a/src/plugins/QtcPlugin.qbs b/src/plugins/QtcPlugin.qbs index 7ff705a08fd..4f5d0b5194e 100644 --- a/src/plugins/QtcPlugin.qbs +++ b/src/plugins/QtcPlugin.qbs @@ -4,6 +4,18 @@ import qbs.fileinfo 1.0 as FileInfo Product { type: ["dynamiclibrary", "pluginSpec"] destination: "lib/qtcreator/plugins/Nokia" + targetName: { + // see PluginSpecPrivate::loadLibrary() + if (qbs.debugInformation) { + switch (qbs.targetOS) { + case "windows": + return name + "d"; + case "mac": + return name + "_debug"; + } + } + return name; + } Depends { name: "pluginspec" } Depends { name: 'cpp' } diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp index 3a3131b9641..7d7a156489c 100644 --- a/src/plugins/coreplugin/basefilewizard.cpp +++ b/src/plugins/coreplugin/basefilewizard.cpp @@ -434,7 +434,7 @@ QString BaseFileWizard::descriptionImage() const return d->m_parameters.descriptionImage(); } -void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform) +void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues) { QTC_ASSERT(!path.isEmpty(), return); @@ -500,7 +500,7 @@ void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QStri } if (firstExtensionPageHit) foreach (IFileWizardExtension *ex, extensions) - ex->firstExtensionPageShown(files); + ex->firstExtensionPageShown(files, extraValues); if (accepted) break; } diff --git a/src/plugins/coreplugin/basefilewizard.h b/src/plugins/coreplugin/basefilewizard.h index 181d8017345..4f424058a6c 100644 --- a/src/plugins/coreplugin/basefilewizard.h +++ b/src/plugins/coreplugin/basefilewizard.h @@ -169,7 +169,7 @@ public: virtual QString descriptionImage() const; - virtual void runWizard(const QString &path, QWidget *parent, const QString &platform); + virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues); virtual Core::FeatureSet requiredFeatures() const; virtual WizardFlags flags() const; diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index 128b2650477..6fa9516b784 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -5,10 +5,9 @@ QtcPlugin { name: "Core" Depends { name: "qt"; submodules: ['core', 'gui', 'xml', 'network', 'script', 'sql', 'help'] } - Depends { name: "utils" } - Depends { name: "extensionsystem" } - Depends { name: "aggregation" } - Depends { name: "pluginspec" } + Depends { name: "Utils" } + Depends { name: "ExtensionSystem" } + Depends { name: "Aggregation" } cpp.includePaths: [ ".", @@ -240,9 +239,9 @@ QtcPlugin { } ProductModule { - Depends { name: "aggregation" } - Depends { name: "extensionsystem" } - Depends { name: "utils" } + Depends { name: "Aggregation" } + Depends { name: "ExtensionSystem" } + Depends { name: "Utils" } cpp.includePaths: [ "../..", "../../libs", diff --git a/src/plugins/coreplugin/dialogs/iwizard.h b/src/plugins/coreplugin/dialogs/iwizard.h index 0c6dde768fd..fe7b2ee0ca8 100644 --- a/src/plugins/coreplugin/dialogs/iwizard.h +++ b/src/plugins/coreplugin/dialogs/iwizard.h @@ -37,6 +37,7 @@ #include #include +#include QT_BEGIN_NAMESPACE class QIcon; @@ -78,7 +79,7 @@ public: virtual FeatureSet requiredFeatures() const = 0; virtual WizardFlags flags() const = 0; - virtual void runWizard(const QString &path, QWidget *parent, const QString &platform) = 0; + virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &variables) = 0; bool isAvailable(const QString &platformName) const; QStringList supportedPlatforms() const; diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index ff9f8619fec..185ed4868e9 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -385,9 +385,10 @@ ICore::~ICore() void ICore::showNewItemDialog(const QString &title, const QList &wizards, - const QString &defaultLocation) + const QString &defaultLocation, + const QVariantMap &extraVariables) { - m_mainwindow->showNewItemDialog(title, wizards, defaultLocation); + m_mainwindow->showNewItemDialog(title, wizards, defaultLocation, extraVariables); } bool ICore::showOptionsDialog(const QString &group, const QString &page, QWidget *parent) diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h index 5b06c7fbf62..169fd0d4f02 100644 --- a/src/plugins/coreplugin/icore.h +++ b/src/plugins/coreplugin/icore.h @@ -81,7 +81,8 @@ public: static void showNewItemDialog(const QString &title, const QList &wizards, - const QString &defaultLocation = QString()); + const QString &defaultLocation = QString(), + const QVariantMap &extraVariables = QVariantMap()); static bool showOptionsDialog(const QString &group = QString(), const QString &page = QString(), diff --git a/src/plugins/coreplugin/ifilewizardextension.h b/src/plugins/coreplugin/ifilewizardextension.h index 0d0cf5cfc1d..cadb2b44952 100644 --- a/src/plugins/coreplugin/ifilewizardextension.h +++ b/src/plugins/coreplugin/ifilewizardextension.h @@ -37,6 +37,7 @@ #include #include +#include QT_BEGIN_NAMESPACE class QWizardPage; @@ -71,8 +72,9 @@ public: public slots: /* Notification about the first extension page being shown. */ - virtual void firstExtensionPageShown(const QList &files) { + virtual void firstExtensionPageShown(const QList &files, const QVariantMap &extraValues) { Q_UNUSED(files) + Q_UNUSED(extraValues) } }; diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index a1dac7a7ef9..c4123834e7c 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -966,7 +966,8 @@ void MainWindow::setFocusToEditor() void MainWindow::showNewItemDialog(const QString &title, const QList &wizards, - const QString &defaultLocation) + const QString &defaultLocation, + const QVariantMap &extraVariables) { // Scan for wizards matching the filter and pick one. Don't show // dialog if there is only one. @@ -1007,7 +1008,7 @@ void MainWindow::showNewItemDialog(const QString &title, break; } } - wizard->runWizard(path, this, selectedPlatform); + wizard->runWizard(path, this, selectedPlatform, extraVariables); } bool MainWindow::showOptionsDialog(const QString &category, diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h index 48d33bc90a4..96a50729bfe 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -141,7 +141,8 @@ public slots: void showNewItemDialog(const QString &title, const QList &wizards, - const QString &defaultLocation = QString()); + const QString &defaultLocation = QString(), + const QVariantMap &extraVariables = QVariantMap()); bool showOptionsDialog(const QString &category = QString(), const QString &page = QString(), diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 0eaec5cc218..0b31cef0736 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -805,7 +805,7 @@ void GdbEngine::interruptInferior() qDebug() << "INTERRUPT INFERIOR: " << state(); return); if (usesExecInterrupt()) { - postCommand("-exec-interrupt"); + postCommand("-exec-interrupt", Immediate); } else { showStatusMessage(tr("Stop requested..."), 5000); showMessage(_("TRYING TO INTERRUPT INFERIOR")); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 9f64737e1ee..1611a7356df 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2577,10 +2577,12 @@ void ProjectExplorerPlugin::addNewFile() QTC_ASSERT(d->m_currentNode, return) QString location = directoryFor(d->m_currentNode); + QVariantMap map; + map.insert(QLatin1String(Constants::PREFERED_PROJECT_NODE), d->m_currentNode->projectNode()->path()); Core::ICore::showNewItemDialog(tr("New File", "Title of dialog"), Core::IWizard::wizardsOfKind(Core::IWizard::FileWizard) + Core::IWizard::wizardsOfKind(Core::IWizard::ClassWizard), - location); + location, map); } void ProjectExplorerPlugin::addNewSubproject() @@ -2591,9 +2593,11 @@ void ProjectExplorerPlugin::addNewSubproject() if (d->m_currentNode->nodeType() == ProjectNodeType && d->m_currentNode->projectNode()->supportedActions( d->m_currentNode->projectNode()).contains(ProjectNode::AddSubProject)) { + QVariantMap map; + map.insert(QLatin1String(Constants::PREFERED_PROJECT_NODE), d->m_currentNode->projectNode()->path()); Core::ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"), Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard), - location); + location, map); } } diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index fa845bfeec2..decd9d73508 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -209,6 +209,9 @@ const char PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplore const char IMPORT_WIZARD_CATEGORY[] = "T.Import"; const char IMPORT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Import Project"); +// Wizard extra values +const char PREFERED_PROJECT_NODE[] = "ProjectExplorer.PreferedProjectNode"; + // Build step lists ids: const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean"; const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build"; diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index 828948d44b6..2386645d07c 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -231,15 +231,23 @@ static QList findDeployProject(const QList &projects // the longest matching path (list containing"/project/subproject1" matching // common path "/project/subproject1/newuserpath"). static int findMatchingProject(const QList &projects, - const QString &commonPath) + const QString &commonPath, + const QString &preferedProjectNode) { if (projects.isEmpty() || commonPath.isEmpty()) return -1; + const int count = projects.size(); + if (!preferedProjectNode.isEmpty()) { + for (int p = 0; p < count; ++p) { + if (projects.at(p).node->path() == preferedProjectNode) + return p; + } + } + int bestMatch = -1; int bestMatchLength = 0; bool bestMatchIsProFile = false; - const int count = projects.size(); for (int p = 0; p < count; p++) { // Direct match or better match? (note that the wizards' files are native). const ProjectEntry &entry = projects.at(p); @@ -268,7 +276,8 @@ static QString generatedProjectFilePath(const QList &files) } void ProjectFileWizardExtension::firstExtensionPageShown( - const QList &files) + const QList &files, + const QVariantMap &extraValues) { initProjectChoices(generatedProjectFilePath(files)); @@ -302,7 +311,8 @@ void ProjectFileWizardExtension::firstExtensionPageShown( m_context->page->setAdditionalInfo(text); bestProjectIndex = -1; } else { - bestProjectIndex = findMatchingProject(m_context->projects, m_context->commonDirectory); + bestProjectIndex = findMatchingProject(m_context->projects, m_context->commonDirectory, + extraValues.value(QLatin1String(Constants::PREFERED_PROJECT_NODE)).toString()); m_context->page->setNoneLabel(tr("")); } diff --git a/src/plugins/projectexplorer/projectfilewizardextension.h b/src/plugins/projectexplorer/projectfilewizardextension.h index f413c4fd4cc..c8e31675952 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.h +++ b/src/plugins/projectexplorer/projectfilewizardextension.h @@ -54,7 +54,7 @@ public: void applyCodeStyle(Core::GeneratedFile *file) const; public slots: - void firstExtensionPageShown(const QList &files); + void firstExtensionPageShown(const QList &files, const QVariantMap &extraValues); void initializeVersionControlChoices(); private: diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp index 0c58f4a45bc..fb603ca1242 100644 --- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp @@ -83,9 +83,15 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener { const SubdirsProjectWizardDialog *wizard = qobject_cast< const SubdirsProjectWizardDialog *>(w); if (QtWizard::qt4ProjectPostGenerateFiles(wizard, files, errorMessage)) { + const QtProjectParameters params = wizard->parameters(); + const QString projectPath = params.projectPath(); + const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix()); + QVariantMap map; + map.insert(QLatin1String(ProjectExplorer::Constants::PREFERED_PROJECT_NODE), profileName); Core::ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"), Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard), - wizard->parameters().projectPath()); + wizard->parameters().projectPath(), + map); } else { return false; } diff --git a/src/plugins/vcsbase/basecheckoutwizard.cpp b/src/plugins/vcsbase/basecheckoutwizard.cpp index b19c281c1ea..6b0892ceea2 100644 --- a/src/plugins/vcsbase/basecheckoutwizard.cpp +++ b/src/plugins/vcsbase/basecheckoutwizard.cpp @@ -129,8 +129,9 @@ void BaseCheckoutWizard::setId(const QString &id) d->id = id; } -void BaseCheckoutWizard::runWizard(const QString &path, QWidget *parent, const QString & /*platform*/) +void BaseCheckoutWizard::runWizard(const QString &path, QWidget *parent, const QString & /*platform*/, const QVariantMap &extraValues) { + Q_UNUSED(extraValues) // Create dialog and launch d->parameterPages = createParameterPages(path); Internal::CheckoutWizardDialog dialog(d->parameterPages, parent); diff --git a/src/plugins/vcsbase/basecheckoutwizard.h b/src/plugins/vcsbase/basecheckoutwizard.h index 0a46d1811b7..1148b73cb73 100644 --- a/src/plugins/vcsbase/basecheckoutwizard.h +++ b/src/plugins/vcsbase/basecheckoutwizard.h @@ -66,7 +66,7 @@ public: virtual QString descriptionImage() const; - virtual void runWizard(const QString &path, QWidget *parent, const QString &platform); + virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues); virtual Core::FeatureSet requiredFeatures() const; diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index ac886a3ed5e..6d69d938014 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -12,8 +12,15 @@ def __handleProcessExited__(object, exitCode): processExited = True def openQmakeProject(projectPath, targets=QtQuickConstants.Targets.DESKTOP): + cleanUpUserFiles(projectPath) invokeMenuItem("File", "Open File or Project...") selectFromFileDialog(projectPath) + try: + # handle update generated files dialog + waitForObject("{type='QMessageBox' unnamed='1' visible='1' windowTitle='Update of Generated Files'}", 3000) + clickButton(waitForObject("{text='Yes' type='QPushButton' unnamed='1' visible='1'}")) + except: + pass selectFromCombo(waitForObject(":Qt Creator.Create Build Configurations:_QComboBox", 180000), "For Each Qt Version One Debug And One Release") __chooseTargets__(targets) diff --git a/tests/system/shared/suites_qtta.py b/tests/system/shared/suites_qtta.py index 1c52ca3ebe4..c177e0132ac 100755 --- a/tests/system/shared/suites_qtta.py +++ b/tests/system/shared/suites_qtta.py @@ -34,3 +34,9 @@ def checkSyntaxError(issuesView, expectedTextsArray, warnIfMoreIssues = True): return True return False +# copy example project (sourceExample is path to project) to /template dir +def prepareTemplate(sourceExample): + templateDir = os.path.abspath(tempDir() + "/template") + shutil.copytree(sourceExample, templateDir) + return templateDir + diff --git a/tests/system/suite_CCOM/envvars b/tests/system/suite_CCOM/envvars new file mode 100644 index 00000000000..00aad3eab7d --- /dev/null +++ b/tests/system/suite_CCOM/envvars @@ -0,0 +1 @@ +QT_PLATFORM_PLUGIN=nonesuch diff --git a/tests/system/suite_CCOM/objects.map b/tests/system/suite_CCOM/objects.map new file mode 100644 index 00000000000..c1475218e08 --- /dev/null +++ b/tests/system/suite_CCOM/objects.map @@ -0,0 +1,13 @@ +:Compile Output - Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Issues - Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'} +:Qt Creator.Create Build Configurations:_QComboBox {leftWidget=':Qt Creator.Create Build Configurations:_QLabel' type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Create Build Configurations:_QLabel {text='Create build configurations:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} +:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1' windowTitle?='*Qt Creator'} +:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:scrollArea.Edit build configuration:_QComboBox {container=':Qt Creator.scrollArea_QScrollArea' leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'} +:scrollArea.Edit build configuration:_QLabel {container=':Qt Creator.scrollArea_QScrollArea' text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'} diff --git a/tests/system/suite_CCOM/suite.conf b/tests/system/suite_CCOM/suite.conf new file mode 100755 index 00000000000..09d3aa120fe --- /dev/null +++ b/tests/system/suite_CCOM/suite.conf @@ -0,0 +1,10 @@ +AUT=qtcreator +CLASS= +CLASSPATH= +ENVVARS=envvars +HOOK_SUB_PROCESSES=false +IMPLICITAUTSTART=0 +LANGUAGE=Python +TEST_CASES=tst_CCOM01 tst_CCOM02 +VERSION=2 +WRAPPERS=Qt diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py new file mode 100755 index 00000000000..733943d1600 --- /dev/null +++ b/tests/system/suite_CCOM/tst_CCOM01/test.py @@ -0,0 +1,32 @@ +source("../../shared/suites_qtta.py") +source("../../shared/qtcreator.py") + +# entry of test +def main(): + # prepare example project + sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") + if not neededFilePresent(sourceExample): + return + # copy example project to temp directory + templateDir = prepareTemplate(sourceExample) + examplePath = templateDir + "/propertyanimation.pro" + startApplication("qtcreator" + SettingsPath) + # open example project + openQmakeProject(examplePath) + # build and wait until finished - on all (except Qt 4.7.0 (would fail)) build configurations + for config in iterateBuildConfigs(1, 0, "(?!.*4\.7\.0.*)"): + selectBuildConfig(1, 0, config) + # try to build project + test.log("Testing build configuration: " + config) + invokeMenuItem("Build", "Build All") + waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)") + # verify build successful + ensureChecked(waitForObject(":Compile Output - Qt Creator_Core::Internal::OutputPaneToggleButton")) + compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow") + if not test.verify(str(compileOutput.plainText).endswith("exited normally."), + "Verifying building of existing complex qt application."): + test.log(compileOutput.plainText) + # exit + invokeMenuItem("File", "Exit") +# no cleanup needed, as whole testing directory gets properly removed after test finished + diff --git a/tests/system/suite_CCOM/tst_CCOM02/test.py b/tests/system/suite_CCOM/tst_CCOM02/test.py new file mode 100755 index 00000000000..8050b1f033e --- /dev/null +++ b/tests/system/suite_CCOM/tst_CCOM02/test.py @@ -0,0 +1,32 @@ +source("../../shared/suites_qtta.py") +source("../../shared/qtcreator.py") + +# entry of test +def main(): + # prepare example project + sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") + if not neededFilePresent(sourceExample): + return + # copy example project to temp directory + templateDir = prepareTemplate(sourceExample) + examplePath = templateDir + "/propertyanimation.pro" + startApplication("qtcreator" + SettingsPath) + # open example project + openQmakeProject(examplePath) + # create syntax error + doubleClickItem(":Qt Creator_Utils::NavigationTreeView", "propertyanimation.QML.qml.property-animation\\.qml", 5, 5, 0, Qt.LeftButton) + if not appendToLine(waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"), "Image {", "SyntaxError"): + invokeMenuItem("File", "Exit") + return + # save all to invoke qml parsing + invokeMenuItem("File", "Save All") + # open issues list view + ensureChecked(waitForObject(":Issues - Qt Creator_Core::Internal::OutputPaneToggleButton")) + issuesView = waitForObject(":Qt Creator.Issues_QListView") + # verify that error is properly reported + test.verify(checkSyntaxError(issuesView, ["Syntax error"], True), + "Verifying QML syntax error while parsing complex qt quick application.") + # exit qt creator + invokeMenuItem("File", "Exit") +# no cleanup needed, as whole testing directory gets properly removed after test finished + diff --git a/tests/system/suite_debugger/tst_build_new_project/test.py b/tests/system/suite_debugger/tst_build_new_project/test.py index 80f40748b11..e0ebaf94456 100644 --- a/tests/system/suite_debugger/tst_build_new_project/test.py +++ b/tests/system/suite_debugger/tst_build_new_project/test.py @@ -10,7 +10,7 @@ def main(): selectBuildConfig(1, 0, config) test.log("Testing build configuration: " + config) runAndCloseApp() - sendEvent("QCloseEvent", waitForObject(":Qt Creator_Core::Internal::MainWindow")) + invokeMenuItem("File", "Exit") waitForCleanShutdown() def init():