Commit Graph

3443 Commits

Author SHA1 Message Date
Tobias Hunger
ddefe062c7 Fix up QProcess::waitForFinished()
waitForFinish returns false if the process is no longer running at
the time of the call. Handle that throughout the codebase.

Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-11 10:04:38 +00:00
Christian Kandeler
47a19dcacb CMakeProjectManager: Fix qbs build.
Was broken in 2f301bc45b.

Change-Id: Ibd055e65443dc224a28905c57c792ffb0f86a43b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-05-02 08:52:05 +00:00
Wolfgang Bremer
2f301bc45b CMake: Update qmljs codemodel
With this patch it is possible to specify QML_IMPORT_PATH in
CMake projects and QtCreator will scan those paths.
One only has to make sure that the variable which is set in the
CMakeLists.txt is also added to the CMakeCache.txt

Task-number: QTCREATORBUG-11328
Change-Id: I11c7694806664d3203d855983e7db4a89fac267d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-29 09:08:05 +00:00
Tobias Hunger
e872966494 CMake: Better error parsing
Change-Id: I9065851f6c2b994d4819e202e6ce1571a3f53308
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-27 11:42:06 +00:00
Eike Ziller
5097768552 Merge remote-tracking branch 'origin/4.0'
Change-Id: Ic82bea5abc6f9539044873b9872c70b3d66a642e
2016-04-25 16:23:15 +02:00
Tobias Hunger
e8b538985d CMake: Do not forget "current executable" build target
Do not forget to build the current executable target when there is a change
of available build targets.

Task-number: QTCREATORBUG-16131
Change-Id: I7fb0dfcd06cdbe3d23dbd194ed27fd3825068c62
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-25 11:52:20 +00:00
Tobias Hunger
2e5102f45e BuildStep: Remove finished() signal and use FutureInterface to report
Remove the finished() signal that is (sometimes) used to report that
a buildstep is done and use the FutureInterface for that purpose
consistently.

Change-Id: Ibe5520b562b91f1a7f4fc73ee898b33b930029ec
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-25 11:23:42 +00:00
Robert Loehning
8372d2199f CMake: Fix typo
Change-Id: I8c0e8acc74b5c87375c9f54a6a889ca0031f6e13
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-22 08:42:23 +00:00
Tobias Hunger
f32a1b1e4c ProjectExplorer: Add some more functions to buildsteplist
Use those functions instead of repeating code all over the place.

Change-Id: I03161663b4d5c538fb2ea667353ab7846373ad81
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-20 12:16:25 +00:00
Tobias Hunger
73123779aa CMake: Do not warn if there is no cmake but a generator is selected
Task-number: QTCREATORBUG-16103
Change-Id: I4fcefd8ab68b6e34ca92e0d0c6fc1a8e6ec6b70c
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-20 10:52:55 +00:00
Tobias Hunger
42385146c7 CMake: Handle STATIC types in CMakeCache.txt
Read STATIC types, but never write them out to the user. They are
still useful for Creator-internal sanity checks.

Change-Id: I8a13820291378de2370761be537f78fba1e45a0f
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-19 11:05:56 +00:00
Tobias Hunger
12708d9b25 CMake: Make sure null-configuration items do not end up in output
Make sure there are no empty strings returned by null configuration
items visible in the output.

Change-Id: I467f33f41b8eeb25b6cb2b1aa3ada4dd7e1d5950
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-19 11:05:49 +00:00
Tobias Hunger
7276da8212 CMake: Reuse code to turn CMakeConfigItems into strings
Change-Id: Iecb553ce562e22daa5429cef431fe12994637f9a
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-19 11:05:46 +00:00
Tobias Hunger
95ac4edfd4 Projectexplorer: Modernize codebase
Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
2016-04-15 09:40:53 +00:00
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
Tobias Hunger
b9efc096f6 CMake: Do not purge the configuration to change the EXTRA_GENERATOR
CMake does change the EXTRA_GENERATOR without having to clear the
configuration. So do not do that anymore.

Change-Id: I09a8ee32e3e2577381fbfb86d55caa75c43c5bf2
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-13 11:25:14 +00:00
Tobias Hunger
54e96679fc CMake: Improve parent selection for dialog to kit options page
Change-Id: I398d7e530d7878ca3a775942c5632e5424335266
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-13 09:15:26 +00:00
Tobias Hunger
51a6dadc77 CMake: Make fromMap more robust for CMakeBuildConfigurations
Do not add broken configuration items read in from the .user file.

Change-Id: Ia4372d040456252fdd0750b597777979ad568ca6
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-12 11:03:12 +00:00
Tobias Hunger
badd6d0125 CMake: Add VariableChooser to cmake configuration setup widget
Add a VariableChooser to the configuration widget of a kit's cmake
configuration.

Change-Id: I4096905b831b069a26779fdb16fbede218d69a92
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-12 11:03:00 +00:00
Tobias Hunger
3e30319634 CMake: WS-only change
Change-Id: I55a9b8dc25d642e8a865821191712b906d7d4bc2
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-12 11:02:42 +00:00
Tobias Hunger
118e42ecce CMake: Make cache clean detection better
Do clean the cache when necessary. The logic used to be wrong in that
it sometimes would just force a reparse where a cache clean was necessary.

Change-Id: Ice5e3bceaea83d4fd4d7c2ae6e21e76118e2d2c0
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-12 11:02:38 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Jarek Kobus
3f19774c0f Set LC_MESSAGES instead of LC_ALL for parsing the error output
Task-number: QTCREATORBUG-15855
Change-Id: I05aa83acb356840cfdacc92796b190fb8754ada0
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-04-11 12:36:29 +00:00
Tobias Hunger
58c326cb73 CMake: Add a reset button to the CMake Configuration edit in Kits
Add a reset button to the CMake configuration edit dialog that is
available in the kits configuration panel. It restores the default
value for the kit.

Change-Id: I89921e2c86cbf8d9658a32fe5fa51dc2f903ff00
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-04-08 10:10:56 +00:00
Tobias Hunger
83ae0cb934 CMake: Mark cmake as imperfect and disable RunConfigurations as necessary
CMake does not know whether a build target was configured out of the
current build or removed entirely, so implement the relevant marker.

Mark all of the "vanished" RunConfigurations as disabled.

Also remove one unnecessary level of indirection when setting up
RunConfigurations.

Change-Id: I30a21581823b4bff5a5be29480e64423b9379983
Task-number: QTCREATORBUG-15950
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-07 09:57:20 +00:00
Tobias Hunger
44aaec767f CMake: Simplify cmakeproject code a bit
No behavior change is intended in this patch.

Change-Id: I5c49a0a97ede443dbb25bf34b96c346a63f549d2
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-06 08:11:10 +00:00
Leena Miettinen
c77abc4230 CMake: Fix capitalization of "CMake Tool"
...to be consistent with the capitalization elsewhere.

Change-Id: I947e2a5bff3a368ee9a456261186325821870552
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-04-05 15:14:30 +00:00
Oswald Buddenhagen
e426d08e54 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/debugger/debuggerruncontrol.cpp

Change-Id: I81b43480a1369e3d7be60ae26e812dda6b962b0b
2016-04-01 17:31:39 +02:00
Tobias Hunger
6ea1b07ceb CMake: Simplify reparsing code
This still fixes the parsing issue when switching build configurations,
but the code is simpler.

Change-Id: I5748788224c5b49399550c33bcef592f193cfa8a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-01 09:56:27 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Tobias Hunger
6059527951 CMake: Trigger reparse when target changed
Change-Id: I47959361a345e372265a19982c1b1e6ea778dd89
Task-number: QTCREATORBUG-15927
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:15 +00:00
Tobias Hunger
8799188be5 CMake: Force a cmake run if no data is available yet
It makes no sense to not parse if we never parsed before. This got
broken when I tried to reduce the number of cmake runs.

Change-Id: Id70a6550faf248cc983b61f6d2456a93d8454a50
Task-number: QTCREATORBUG-15927
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:11 +00:00
Tobias Hunger
82b9e9ed37 CMake: Do not crash when cloning cmake buildconfigurations
Change-Id: I832981cdea16ab058f92758c9bae9b64b904d573
Task-number: QTCREATORBUG-15926
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:06 +00:00
Tobias Hunger
2c822ae3c1 CMake: Only allow one target in cmake build step
CMake will silently ignore all but the last target (or fail to build
anything). This allows to simplify our code.

Change-Id: Ieee3931aca0788307107e2021d507073ef42a21f
Task-number: QTCREATORBUG-15928
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 12:20:58 +00:00
Tobias Hunger
34b18c699c CMake: Normalize file paths before comparing them
On windows we got false negatives due to one path starting with "C:" and
the other with "c:". Use Utils::FileName which should do the right thing.

Change-Id: I7dcf8ad3f61caca7ac7c183d492ebfd57fe1b669
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-29 11:46:19 +00:00
Orgad Shaneh
c860fe2e6e Remove unnecessary Q_OBJECT from IDocument subclasses
They don't have signals, properties or translatable strings.

Change-Id: Id27df47d1fb8d0530fdf0f5f0d33a2e7b70360af
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 10:53:09 +00:00
Oswald Buddenhagen
3c2f0096ea Merge remote-tracking branch 'origin/4.0' 2016-03-22 15:23:12 +01:00
Orgad Shaneh
13dea114e2 CMake: Show build progress in compile output
Broken by 578c107a16.

Change-Id: I2427dbc36f70a20a453fc6fd13f29589f07a7fcf
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-22 10:42:02 +00:00
Christian Stenger
47f5c13573 CMake: Fix compile for gcc 4.7.3
Change-Id: I2f07dc1d47d68786a9d62ab980e5f1e719726132
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-21 08:00:33 +00:00
Tobias Hunger
79c710463e CMakeKitInformation: Expose cmake path to MacroExpander
Task-number: QTCREATORBUG-15367
Change-Id: Ia685b738c242b77eef2a96932dee1f7ebfe1787e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-18 14:23:10 +00:00
Alexander Drozdov
93c1840740 CMake: omit configuration dropping on cache clear
Setting CMake configuration to the provided by the Kit, drops all users
settings to the default one. CMAKE_BUILD_TYPE too.

Change-Id: I8be556f553376273933872a74e47937df5a74f30
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-17 22:26:31 +00:00
hjk
00119ab509 Cmake: Use double quote marks in a status message
Change-Id: I0de727659189230ec71f9f6f6d30040d77794251
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-17 16:48:27 +00:00
Tobias Hunger
07d9b769aa CMake: Only reparse cmake build directory for active buildconfigurations
This fixes the several progress bars from popping up when creating a
cmake project via wizards.

Change-Id: I1d61e74db8a190afd6302cd56f141e08e521a587
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-17 12:10:07 +00:00
Tobias Hunger
2db184db60 CMake: Make sure processes are dead before cleaning temporary directory
This should stop messages about processes still running when cleaning
up the directory on windows.

This also makes sure the progress bars are closed again.

Change-Id: Ic3e94efc8bdecca35437987e0647284cb48af121
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-17 12:09:57 +00:00
Orgad Shaneh
a5a4f02ced Core: Make IDocument concrete
Change-Id: I8290943614ea4a2060cf09a71fb4f957852ab705
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-17 07:43:55 +00:00
Tobias Hunger
5e623ddfd1 CMake: Improve handling of cmake configuration in kits
Use macros. This makes it possible to address the current qt version
and toolchain without having to update those values all the time.

This significantly simplifies changing Qt versions and toolchains in
the kit as well as the code itself.

Change-Id: I35128eebdc96fe6175f565b2e9bdaa40862516a7
Task-number: QTCREATORBUG-15830
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-16 15:37:48 +00:00
Tobias Hunger
c70af100ec CMake: Remove usused member variable
Change-Id: I338a41cc9a4f3e91ed0613f047a2da7ca0ed6cb4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-16 10:29:51 +00:00
Alexander Drozdov
a618eb2a9f Don't use quoting for additional tool arguments...
...that passed to the build tool (cmake --build...)
and specified by user.

Change-Id: I0de51161b5dd700f3160f048fa6f02743a5186e6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-16 09:38:47 +00:00
Tobias Hunger
54febaef31 CMake: Use pragma once
Change-Id: I946c819196c5f0f00a13d2f98bae3dff66a43428
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-14 13:23:50 +00:00
Tobias Hunger
578c107a16 CMake: Do not try to parse progress information lines
The lines with "[x%] Building something" do not contain errors,
so there is no need to parse them (causing false positives to show
up).

Change-Id: Iee87deb73db9e82040cab5401b74c70be91e6191
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-14 13:23:46 +00:00