Commit Graph

202 Commits

Author SHA1 Message Date
Tobias Hunger
d2adc30335 BuildConfigurationFactory: Refactor code
Refactor the code of the build configuration factories. The idea is to
generalize the code so much that we can allow plugins to install
custom build configuration factories for the platforms they support.

To support this use case the following changes where done here:
 * BuildInfo class was introduced to describe one build configuration that
   can be created by a factory.
 * Factories report a list of BuildInfo to describe what they can produce.
   This fixes the need for factories to implicitly create one buildconfiguration
   and then create another one 'officially' to support debug and release build
   configurations to be set up for projects.
 * Do no longer work around factories to create build configurations.

Change-Id: Ic372e4a9b5c582633b467d130538948472b89d91
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-17 12:00:01 +02:00
Tobias Hunger
89b28ef249 Qmake: Rename emitBuildDirectoryChanged()
The method is used to reset the build directory if shadow building
becomes unavailable due to the Qt version changing. It does not
explicitly emit anything anymore.

Change-Id: I27b46b77f334be62f4db5f269529f8a2d62d834b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-06 12:28:35 +02:00
Tobias Hunger
1f8cb204de Qmake: Do not have qmake config change build directory
Change-Id: I538b4576490d62f3c1f8555fdeffdafecf797e7a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-06 12:28:29 +02:00
Tobias Hunger
cc5c45f454 Qmake: Re-parse project after changing the build directory
That is necessary so that the executables get updated.

Task-number: QTCREATORBUG-10107
Change-Id: I42e3ce38a5824e285546c43a3ec0045b090c6af5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-06 12:28:20 +02:00
hjk
0ed9b97a1f QtVersionManager et al: Code cosmetics
Apply static 'pattern' for QtVersionManager, de-noise using code.

Change-Id: Id66ac90094cd7312d1e72abbdbce4c02b078456e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 10:54:16 +02:00
Tobias Hunger
a7bb77288d BC: Move builddirectory handling into BC itself
Use setBuildDirectory() in the different BuildConfigurations instead
of reimplementing that over and over again.

Change-Id: Ic355fdb4624c71667ce470b3e2865c9a8722ef09
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-28 11:41:38 +02:00
Tobias Hunger
52a41ecb0c Qt4BC: Simplify shadowbuild/builddirectory handling
Change-Id: Id46a239588d21b6aa5d4c43e4d85b52a04bd17ab
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-28 11:39:29 +02:00
Tobias Hunger
5422b2c4da Introduce Project::projectFilePath()
Use it instead of retrieving this information from the document.

Change-Id: I809fcb2daf59021cf503c371a5d40d75d7448796
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-01 11:42:41 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +02:00
Robert Loehning
1f62d7c90d Normalized connect()s
Change-Id: I82e891a73724cdfa0db8c84e9daeb72e00e87029
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-16 13:55:14 +02:00
Tobias Hunger
83b0c7d710 Fix warning
Change-Id: I21ca429d6add9d9757ecccef8776b3b762b21cce
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-16 13:21:38 +02:00
Daniel Teske
237c82fe47 Remove explicit debug and release arguments in makestep
They serve no purpose, the default target in debug_and_release Makefiles
is to build only debug or release.

Change-Id: I4e403a2d25e09c8f31a4619d7588bfb34a5acf5e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-16 12:10:28 +02:00
Friedemann Kleint
c0b6d1d3f2 Clean headers in Qt4ProjectManager.
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.

Change-Id: I53fa1aafaf98fd3105ef35b595e4311854cf9cbc
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-28 13:38:30 +01:00
Friedemann Kleint
2c9d93a328 Qt4ProjectManager: Forward-declare some classes.
Change-Id: Ia05cbfec090bf42d8b9c0475e8904dbad12486d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-28 12:41:44 +01:00
Friedemann Kleint
7d154671e9 Fix Krazy warnings about non-const comparison operators.
Change-Id: Ibb5ee6c58dc8118f115bf2f1ce9c0d9999d65726
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-08 16:34:22 +01:00
Daniel Teske
2545a32a66 Qt4Project: Fix add BuildConfiguration
The names and actual config did not agree.

Task-number: QTCREATORBUG-8562
Change-Id: I23b270199d2bea12024937e1f950eaf67873ee33
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-11 12:02:44 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
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
2013-01-31 16:25:33 +01:00
Tobias Hunger
54d0f91b94 Qt4BuildConfiguration: Allow for "Release" and "Debug" BCs
No longer require some text additional text.

Change-Id: I0bc1f64e6cbc9577cd4d79e04ce95b24a614ac7f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-31 12:17:03 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
Eike Ziller
a8a33b9a3b Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: I288eeb1137e1b08d6c0d69f394cbb0fe1a937b68
2012-12-14 08:20:49 +01:00
Daniel Teske
0fa18d48c5 Qt4BuildConfiguration: Make debug the default
This changes the qt creator behaviour to be different from the command
line behaviour of qmake. That is it now matters which way the user runs
qmake.

Change-Id: I5763fb45f0508cde6fce80824dc9f3c935a00797
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-11 20:53:40 +01:00
Daniel Teske
cf7f778c2b Remove ToolChain::defaultMakeTarget
That was a Symbian specific hack.

Change-Id: I6c9ed3d4c856699ce0930aa507b3aba43ca94785
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-27 13:52:00 +01:00
Eike Ziller
387f5a7006 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/cpptools/cppcompletion_test.cpp
	src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/findusages/tst_findusages.cpp

Change-Id: Idd2abc09753a71a6c252bfa9914274459b2c7e63
2012-11-26 10:52:28 +01:00
Aurindam Jana
4930fbcc1e QML Debugging: Qt 5 CONFIG+=declarative_debug qml_debug
Pass both arguments to qmake. The assumption being that most
projects will not mix both Qt Quick 1 and Qt Quick 2. In the
case of others, debugging will be enabled only for the first
debugging client that is enabled. This is inline with the
current behaviour where debugging multiple engines is not
supported.

Change-Id: I90cd6c6ff559a3a7519ee3ee10690c0e8135c97b
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-22 17:33:30 +01:00
Daniel Teske
51bca85117 Replace BuildConfigWidge with NamedWidget
They have a identical interface.

Change-Id: Ia626496fbaffedefff6ee20b958cd505085d89f7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:43:26 +01:00
Daniel Teske
b5bbdb38d9 Remove BuildConfigWidget::init()
It no longer serves a purpose.

Change-Id: Icdcb69c87112e295cefd4975dfa2b3d65818365a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:43:09 +01:00
Daniel Teske
613f3345e1 BuildConfiugration::subConfigWidge() Provide a default implementation
Which simply returns a BuildEnvironmentWidget. A long time ago
BuildConfigurations had no environment, nowdays they do. So it makes
sense for all BuildConfigurations to have the BuildEnvironmentWidget.

Change-Id: I824c45df79a0dcd2b624bf67a4730fb5dab098bc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:40:10 +01:00
Daniel Teske
e08b38ffd6 Move Project::subConfigWidgets to BuildConfiguration
Change-Id: Idf58ebbb02e9cd0ab4ff7e74fbed17250e274693
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:40:00 +01:00
Daniel Teske
31e2ddd085 Kit: Add createOutputParser method
Which asks each KitInformation for their parser, thus currently creating
a toolchain + qt chain if that is applicable. Remove all code that does
that by hand from various buildsteps/buildconfigurations.

Change-Id: I79a07ffd1dbe9a43bdbc838bc0098071aa412009
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-02 14:49:34 +01:00
Daniel Teske
68a7861263 Qt4Project: Evaluate .pro and update codemodel only on some kit changes
Task-number: QTCREATORBUG-8037

Change-Id: I5c89a712be9429b49d65f6886b5b3b2dade7fc20
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-22 11:16:42 +02:00
Daniel Teske
a81563afdd Qt4BuildConfiguration: Don't emit environmentChanged()
The BuildConfiguration already takes care of that on kit updates and I
can't see a reason to emit it for changing the build directory.

Change-Id: I58f13dbddf4d4c3f99b444de21c74326ee4ac182
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-22 11:16:21 +02:00
Daniel Teske
d45716a820 Remove unnecessary overloads of BuildConfiguration::baseEnvironment()
Change-Id: I9805f5cb87f6c30b7952f9970b007f883eb62507
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-17 14:25:49 +02:00
Eike Ziller
70b5e1f64d Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Id870f70aa35c232dbbd455f83429bab80f266c2d
2012-10-16 17:42:10 +02:00
Daniel Teske
c3190f6e7f Kits should affect all buildconfiguration environments
Not just qt4 and cmake but also generic projects.

Change-Id: I4a7e86fb2dbf6c6e32b4da78953ad3199c554470
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-16 16:46:47 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
Eike Ziller
68c796e244 Merge origin/2.6
Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
	src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
	src/plugins/cmakeprojectmanager/makestep.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: I153295bad2d97609d96d28945e9f942c5b46b2da
2012-10-05 20:51:31 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Daniel Teske
2cc4ec031a Qt4BuildConfiguration: Fix extractSpecFromArguments with symlinked dirs
The canonical form of the -spec argument is a relative path if the
mkspec is a child of the mkspec dir. Since we resolve all symlinks for
the mkspec, we must do the same for the mkspec dir.

Task-number: QTCREATORBUG-7908
Change-Id: I24628c2d49ff7ad078caa6fd3896cb407d0d7906
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-05 11:12:55 +02:00
Oswald Buddenhagen
e730e2bb8a Merge remote-tracking branch 'gerrit/2.6'
Conflicts:
	src/libs/utils/environment.cpp
	src/plugins/android/androidtoolchain.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/shared/proparser/qmakeevaluator.cpp

Change-Id: I554e96445a4d2b9ba0cc173ecd766091ee921aa2
2012-09-12 17:27:37 +02:00
Orgad Shaneh
4ef2fbd4ce Profile -> Kit variable renaming
Change-Id: I6cc06684134030bd527d9dcce21ad17938a56927
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-09-11 17:08:52 +02:00
Eike Ziller
887456e38a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemoglobal.cpp
	src/plugins/madde/maemoinstalltosysrootstep.cpp
	src/plugins/madde/maemopublisherfremantlefree.cpp
	src/plugins/madde/qt4maemodeployconfiguration.cpp
	src/plugins/qt4projectmanager/librarydetailscontroller.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qt4projectmanager/qt4project.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/plugins/remotelinux/abstractremotelinuxdeployservice.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
	src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
	src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp

Change-Id: I2560b528596f284e7b45a2260d8d3037891c5d17
2012-09-04 18:04:16 +02:00
Tobias Hunger
8ba422d07c s/profile/kit/
* 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>
2012-09-04 15:24:25 +02:00
Daniel Teske
9e5c6518c0 Qt4BuildConfiguration: Allow relative paths for the build directory
Task-number: QTCREATORBUG-7791

Change-Id: Ied2dcd8f8ccb16f427d60c6f6b2d93afb4c4b7e4
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-09-04 13:42:05 +02:00
hjk
9df46317a4 qt4buildconfiguration: code cosmetics
Change-Id: I39e60655384798fe5dcfc9d2c7c01747650774bb
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-31 10:25:19 +02:00
Daniel Teske
36f6c02f1c Remove evaluateBuildSystem signal
It adds almost nothing and introduced some bugs.
This fixes:
Double evaluation in cmakeproject on build directory changes.
Wrong runconfiguration update in cmake for set_target_properties(target
PROPERTIES OUTPUT_NAME [..]) changes.

Unecessary runconfiguration removal in AutoTools and Generic projectmanager.

Reevaluation of .pro files on changing the active runconfiguration or deploy
configuration.

Task-number: QTCREATORBUG-7723
Task-number: QTCREATORBUG-7761

Change-Id: I50249b186917cd3a4f399f187f09ac8428ab6f9e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-24 12:13:48 +02:00
Daniel Teske
8d8ab020b1 Make buildDirectoryInitialized a Qt4Project specific signal again
And fix it to the old behaviour while at it.

Change-Id: Ifd786e085c621fb3cd59b98cc665d9e3c7fcce51
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-24 12:13:36 +02:00
Daniel Teske
c900abe378 Qt4BuildConfigurationFactory: Remove strange directory existence check
Change-Id: Ic6b71b464f3a16cb2afda535a0b2b0135e5814ae
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-22 16:33:30 +02:00
Alessandro Portale
ae23d50576 Removal of Symbian support
Qt Creator's support for Symbian was at its peak in version
2.4.x. Nobody really verified it in Qt Creator 2.5 or 2.6.
It is most likely rotten. Let's remove it!

Also, the Symbian support code was spread throughout the whole
Qt Creator code base. The plugin interfaces evolved in the
meantime and target platforms like Android or QNX have 99% of
their code in separate plugins.

In case anyone wants to revive Symbian support in Qt Creator,
please create a plugin for it.

Change-Id: I56a758a3e2fd5b8c64d9aeb8f63d8e916c4883be
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
2012-08-22 13:42:42 +02:00
Christian Stenger
a787391c63 Qt4ProjectBuildConfiguration: Fix QML debug checkbox
Task-number: QTCREATORBUG-7682

Change-Id: Icdd20c48724b09d687095745b8106dec3357a814
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-15 11:03:57 +02:00