summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: Introduce a SimpleRunWorkerFactory templatehjk2019-03-191-43/+0
| | | | | | | | | | | | | | | ... and use in as replacement for RunConfiguration::addRunWorkerFactory. It is still convenient to have a simple way to set up run worker factories for the typical "just run for this configuration" case, but it's even better if it follows the nowadays predominant pattern of keeping factories in the plugin's pimpl. Also, it turned out there were two copies of QmlProjectRunconfigurationFactory code, one is enough. Change-Id: I0b28c4ea18d0f52165a49f6133dc8687a3b9c7cf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: De-qobject-ify RunConfigurationFactoryhjk2018-04-091-1/+1
| | | | | | | | Some translations moved over to the corresponding RunConfigurations, one setParent() replaced by direct deletion. Change-Id: Ib5e527b71353a6be70b332ac2dfd2f5cd2499a60 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Rename IRunConfigurationFactory to RunConfigurationFactoryhjk2018-03-071-3/+2
| | | | | | | | | | | It's not an *I*nterface anymore Also, remove the in-all-but-one case unused QObject parent and the object name that was only there for debugging purposes. The class type serves the same purpose in the debugger. Change-Id: I0dafb01e6b4fd7c7df04a63aaa3ef3e4bd693f6f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Show non-desktop device names in remote run config nameshjk2018-02-151-1/+1
| | | | | | | | | | | So far we used device type in some cases, not even following a specific pattern. Showing the device name gives a bit more detail in cases of multiple devices of the same type and offers the user a bit more control on what it shown. Change-Id: I2bd6bbd404577db3afca0f84b8a976cb07b1cfd0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlProjectManager: Allow QmlProjectRunconfigurations on non-DesktopUlf Hermann2018-02-081-1/+0
| | | | | | | | This is an artificial restriction accidentally added by a previous commit. Change-Id: I6c3273ed3f0b9f223304ecce35e81ed6013ae275 Reviewed-by: hjk <hjk@qt.io>
* IRunConfiguration: Remove BuildTargetInfo from the RC factory APIsTobias Hunger2018-02-061-2/+2
| | | | | | Change-Id: I1d77d22a1c1ce1cbcfca8af7855ae7b935ac1c2c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
* QmlProjectManager: Prepare for running on remote devicesUlf Hermann2018-01-231-1/+0
| | | | | | | | We add a "targetDirectory" property to the file format and fill in the deployment data. Change-Id: I372f2c9f5f3c4252431963eeab7b8b420f8bccd5 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Add a IRunConfigurationFactory::addFixedBuildTarget()hjk2018-01-031-10/+1
| | | | | | | | | To be used for "special" build targets (Custom executables etc) that do not depend on the project. This reduces user side boiler plate in a couple of cases and is a bit clearer than the magic {QString()} result anyway. Change-Id: I105b6ab952981143b2abf9b218fed30cee80b648 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Use ids in RunConfigFactory:: setSupportedProjectTypehjk2017-12-191-1/+1
| | | | | | | More similar to what build/deploy uses. Change-Id: Icf8bd7031d00a6e2831f8c1f3b1bdcaa8bf259b4 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setuphjk2017-12-081-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follow the rough pattern of recent *RunConfigurationFactory changes for build and deploy configurations. - Collapse the two lines of constructors similar to what 890c1906e6fb2ec did for RunConfigurations * Deploy* was purely mechanical * Build* ctors are split in connects() in the ctor body to create "empty shell for clone" etc and build step additions in initialize() functions which are only used in the create() case. -- Allows to collapse the shared 'ctor()' functions, too. - Move FooBuildConfigurationFactory::create() implementations to FooBuildConfiguration() constructor. That was a strange and unneeded ping-pong between factories and objects, and furthermore allows one level less of indirection (and for a later, left out here, some reduction of the FooBuildConfiguration interfaces that were only used to accommodate the *Factory::create() functions. - Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(), but there wasn't one in the base classses. Have one there. - Most canHandle() functions were checking simple restrictions on e.g. project or target types, specify those by setters in the constructors instead and check them in the base canHandle() - clone() is generally replaced by a creation of a "shell object" and a fromMap(source->toMap()), implemented in the base, there are two cases left for Android and Qbs that needed(?) some extra polish - generally use canHandle() in base implementation, instead of doing that in all Derived::canFoo() - as a result, canCreate/create/canClone/clone reimplementations are not needed anymore, keep the base implementation for now (could be inlined into their only users later), but de-virtualize them. - Combine Ios{Preset,DSym}BuildStepFactory. There was only one 'dsym' build step they could create. - Split the 'mangled' id into the ProjectConfiguration subtype specific constant identifier, and a QString extraId() bit. Only maintain the mangled id in saved settings. - Make ProjectConfiguration::m_id a constant member, adapt all constructors of derived classe. Not done in this patch: - Finish possible cosmetic changes on top - Add a way to specify restrictions to supported Qt versions (used in Android/Ios), as the base implementation does not depend on the qtsupport plugin - Combine the QList<X> availableFoo() + createFoo(X) function pairs to somthing like a direct QList<struct { X; std::function<X()>; }> fooCreators() to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base) pingpong - Remove the *Factories from the global object pool - Do something about priority(). Falling back to plain qmake in android+qmake setup is not helpful. Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* QmlProjectManager: Drop support for QtQuick1Ulf Hermann2017-11-301-32/+8
| | | | | Change-Id: Id60c9768d8fad03f588207af07bba676dbfc76fc Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* ProjectExplorer: Register createes' base id in RunConfigurationFactoryhjk2017-11-271-38/+19
| | | | | | | | | | | | | | | This shifts the resposibility of creation/splitting of RunConfiguration ids into what are essentially "type ids" and "build targets" to the base implementation, possibly opening the path of abandoning the mangled ids in favor of explicitly storing their constituent parts. Take advantage of base id split in RunConfigurations for availableIds /displayNameForId and for canCreate/canRestore/canClone. Change-Id: I19fefb32757407ab5053a2ae0e5a79438659f6ec Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
* ProjectExplorer: Add a RunConfigurationFactory::canHandle(Target *)hjk2017-11-201-10/+2
| | | | | | | | All RunConfiguration factories had some kind of canHandle(Target *) implementation. Centralize this notion. Change-Id: Ie24a355e857bddfd76b866859b8c7a42ffc83840 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Implement RunConfiguration::do{Clone,Restore} in basehjk2017-11-161-11/+0
| | | | | | | | It's possible now. Change-Id: I49ed73312aea1627a9543890431e2e379e3fb3ec Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Simplify IRunConfigurationFactory::clone() usehjk2017-11-141-9/+2
| | | | | Change-Id: I005d6c87142d26dfc7ae1349329737a68f54c427 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Re-organize RunConfiguration constructorshjk2017-09-131-3/+3
| | | | | | | | | | | | | | | | | | | | The idea is to massage the setup in a way to make implementation of new configurations less error prone by identifying recurring patterns and sharing repetitive code that tends to be forgotten (see Android cloning). The former two lines of constructors (owner-and-id, owner-and-source) are split into a simple, shared, constructor and new setId() and copyFrom() functions. The change is mostly mechanical, some multiple calls to fromMap have been removed, though, some consts added. Otherwise, to keep the patch small it temporarily introduces two helper templates in IRunConfigurationFactory. Also, setId() signatures have not been unified yet. These won't be needed in the final setup. Change-Id: I8c0734496caae744a9883fe6d92c1d8f8e0234ea Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Sprinkle overrides over the codeTobias Hunger2016-01-291-4/+0
| | | | | | | Sprinkle overrides over code derived from classes in ProjectExplorer Change-Id: Ia4cc25649f7dc00b0ea126d8176a59afbc5ed574 Reviewed-by: hjk <hjk@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Always pass Core::Id by value.Christian Kandeler2014-07-011-2/+2
| | | | | | | | | | | Currently we pass in some places by value, elsewhere by const ref and for some weird reason also by const value in a lot of places. The latter is particularly annoying, as it is also used in interfaces and therefore forces all implementors to do the same, since leaving the "const" off is causing compiler warnings with MSVC. Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803 Reviewed-by: hjk <hjk121@nokiamail.com>
* Allow the user to restrict rc creation to certain .proDaniel Teske2014-06-161-1/+2
| | | | | | Task-number: QTCREATORBUG-10953 Change-Id: Iff1a31c007ac777bfa390d48237480ef56ffc0e4 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Clean headers in QmlProjectManager.Friedemann Kleint2013-04-091-1/+0
| | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: I2d1d2ec5a3071de9d2a0a03bc69ec653becc7f85 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* RunConfigurationFactory: Centralize much of the restore codeTobias Hunger2013-04-051-10/+3
| | | | | Change-Id: I30c92dd5082eed050c2796a014919788710baafa Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* RunConfigurationAspect: Add RunConfiguration parameter to factory methodTobias Hunger2013-04-051-3/+1
| | | | | Change-Id: I7fbb82dc3ff83593473a57c69d0eb89bc33f50f5 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Fix Krazy warnings about includes/header guards in QML-Projectmanager.Friedemann Kleint2013-03-131-1/+1
| | | | | | Change-Id: I3972016d65b789be5c689582afd7d6b9968b0767 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | QmlProject: Detect import type from mainFileKai Koehne2013-01-211-5/+19
|/ | | | | | | | | | Detect the default import (QtQuick 1.x vs QtQuick 2.x) from main file, and use it to restrict kits + select the right runtime. Task-number: QTCREATORBUG-8358 Change-Id: Ib8cfd3eb989953f607fee6043c43e588f798c774 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* s/profile/kit/Tobias Hunger2012-09-041-6/+6
| | | | | | | | | | | | | | | * Rename profiles to kits. * Update some strings: * projects mode has a Kits tab, not a Targets tab. * " Settings" was dropped from the sub-tabs of the Kits tab * menu entry "Build/Open Build/Run Target Selector" was renamed to "Build/Open Build and Run Kits Selector". * Use "Kit" instead of "Target" in miniprojecttargetselector. (The class was not renamed as it does indeed select targets, not kits) Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* QmlProject: Fix compilation failureKai Koehne2012-08-231-0/+1
| | | | | | | Fix breakage introduced by Iaff13619 Change-Id: I1123f34d0bfb70049d6ee584ef7cb3bd94c48c55 Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
* QmlProject: Support both qmlscene and qmlviewer in run configurationKai Koehne2012-08-231-8/+34
| | | | | | | | Provide both qmlviewer and qmlscene as run configurations if the active Qt version is 5.0.0. Change-Id: Iaff1361921bdd2d6b2256c4c4cb51e96802c2519 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* use new id comparison operators to reduce line noise and save cycleshjk2012-08-061-4/+6
| | | | | Change-Id: I2e7d81a4efb75877901d29964df4f71314e951b4 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Profile introductionTobias Hunger2012-06-211-11/+19
| | | | | | | | | | | | | Introduce Profiles to store sets of values that describe a system/device. These profiles are held by a target, getting rid of much of the information stored in the Build-/Run-/DeployConfigurations, greatly simplifying those. This is a squash of the wip/profile branch which has been on gerrit for a while, rebased to current master. Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* Use Core::Id in project-related objectsTobias Hunger2012-04-251-10/+9
| | | | | | | | Use Core::Id for all the project related objects in favor of plain QStrings. Change-Id: I790ab40cb29899efdb49c413a77609486f52e683 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* Update license.hjk2011-04-131-14/+13
|
* It's 2011 now.con2011-01-121-1/+1
| | | | Reviewed-by: hjk
* License headers.con2010-12-171-7/+11
|
* code cosmeticshjk2010-06-101-5/+5
|
* Long live the king!hjk2010-03-051-1/+1
|
* QmlProjectManager refactoringKai Koehne2010-02-161-0/+113
Putting every class in it's own files + avoid "using namespace"