Commit Graph

44349 Commits

Author SHA1 Message Date
Tobias Hunger
4d32f3b7ce Session: Delay deletion of projects till all signals are processed
Delay actual deletion of projects till all signals related to the
removal event (incl. the startupProjectChanged signal) are handled.

Change-Id: I8e2c8db49f732b80234a3cfa81d73f17c8d02608
Reviewed-by: hjk <hjk@qt.io>
2017-10-06 10:52:54 +00:00
Christian Stenger
d9ac5ee2a1 AutoTest: Fix triggering debug from results pane
This functionality had been added for GTest, enable it
for QTest and Quick Test as well.

Task-number: QTCREATORBUG-16695
Change-Id: I5a8b219e140926325da3658a0ebe3149896a172d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-06 10:46:16 +00:00
Christian Stenger
8b32ff9343 QmlDesigner: Fix missing include
Change-Id: Ic70e159071d6908a2889d3e5b21add0b02ce5968
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-06 10:25:10 +00:00
Tobias Hunger
02533e61cf CMake: Fix project parsing notification
This builds on top of 08677c0b01 and
fixes one more code path to go through a common entry/exit point.

Change-Id: I1d00fa9242f247028e5d3b0ef3b5fe1d3f4cb03d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-06 09:53:40 +00:00
Christian Stenger
1fa26bd9b3 AutoTest: Restrict Run and Debug from results pane
Ensure to enable Run and Debug from results pane only for
items that are in fact capable to get re-run and debugged.
Preparation for enabling the functionality for QTest and
Quick Tests.

Change-Id: I7ec28e51ae7c9caa462023d55443bd3194ae81dd
Reviewed-by: Claus Steuer <claus755@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-06 08:48:20 +00:00
Christian Stenger
cf5d8509aa AutoTest: Avoid replacing a correct executable
If we already had a correct executable we might end up using
the wrong one when trying to complete the configuration again.
So, if the former configuration already had an executable set
do not try to complete the configuration again.

Change-Id: I270be71d87b311c6a5eaad14e0d5a2de60353e5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-06 08:48:13 +00:00
Thomas Hartmann
451cc10bba QmlDesigner: Fix compile with Qt 5.10
The QtQuick include at this point for some reasons tries to
include not existing Vulcan headers.

Change-Id: Ie2dc667b3438a2bbf7e8f251520502a836b109db
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-06 07:06:30 +00:00
Orgad Shaneh
d10fafae71 GDB: Fix reading executable from core dump on Windows
Multiarch GDB on Windows crashes if osabi is cygwin (the default) when
opening a core dump.

Change-Id: Ic04d508d99a3e947e05dcf3adc8bb2b265edc16b
Reviewed-by: hjk <hjk@qt.io>
2017-10-06 06:56:40 +00:00
hjk
f5ac79a20f Debugger: Combine some gdb startup code paths
After splitting out terminal and core handling they are
essentially the same.

Change-Id: I603cea74186eada5728295b430c9385812dcc4cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-06 06:10:14 +00:00
Marco Bubke
cd89951973 Clang: Fix warning
Change struct to class.

Change-Id: I47d43df24d31f3bed401ca316cf80fc899f679ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 18:46:35 +00:00
Marco Bubke
be939a80db Clang: Improve locking of string cache
The string cache is only very seldom written but very often read. To
improve thread scaling it is faster to lock it only for write operations.
So we use a shared mutex which is locked in shared mode for read
operations and locked exclusively for write operations.

Change-Id: I2cc742d1b9cc15c162be40ab339fa8310640bc44
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 17:48:23 +00:00
Marco Bubke
d2e15e5f1e Clang: Add file cache
The database is using file path integer ids to handle file paths because
otherwise we would save many redundant data. This patch is improving it
further with the introduction of a database based file path cache. The
entries are now divided in a directory path and file name. This is quite
handy for directory based file watching.

Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 17:36:37 +00:00
Andre Hartmann
62d971b30b Locator: De-duplicate highlightInfo generation for camel humps
Change-Id: I5a3fd28ddd68b2ac17a76384cffad12064d06259
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-05 15:47:13 +00:00
Friedemann Kleint
0be8240002 Add folding to Unified diff editor
Add folding for files and chunks.

Change-Id: I0dd278d0bc69208a0c9c116b94e4ead7aec5fede
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-10-05 14:29:38 +00:00
hjk
4d3ea43dbc Debugger: Allow {target,remote}:/* sysroot settings
They are valid,

Also downgrade some debugger errors to warnings in anticipation
of future "unusual" uses.

Change-Id: I80896b37e03fe39091d08319e71e11d64db183e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 13:43:48 +00:00
hjk
b268abb100 Debugger: Cleanup some GdbEngine code paths
Either dead code, or "Adapter" related abstractions that are not
used anymore.

Change-Id: I1f2418db13d4891d36c10b488c522582eff8afc5
Reviewed-by: hjk <hjk@qt.io>
2017-10-05 13:32:23 +00:00
hjk
2564e8d782 Debugger: Move core file unpacking into RunWorker of its own
Change-Id: I99b7e6fc8eb9054a4135f693581575c3b8b541df
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 12:21:30 +00:00
Tobias Hunger
b41cf10d71 Utils: Make Benchmarker log to a configurable loggingcategory
Change-Id: I2bb6b42af775827dae1c1cc41f9dabf63edf58e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 12:15:56 +00:00
Ulf Hermann
7842a309ce ProjectExplorer: Add missing import
Change-Id: Ida0e9387036d5ab3a5abe8661c55e34ecef32187
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 09:58:15 +00:00
Orgad Shaneh
f56b2bfe6d CamelHump: Fix case insensitive matching after the same case
For example: window -> MAINWINDOW.

This was broken by the constraint that the first char must follow a non-
matching case in 2fb54abd03. It was fixed for pure lowercase in f792475739,
but this fix was evidentially partial.

Change-Id: I0c29b54768c40d0501f006182f2bd1ae1e94f3bf
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-10-05 09:26:52 +00:00
Alexander Volkov
b884f6fdbc qmake: Add test functions for comparing version numbers
qmake really lacks version comparing functions:
users either use ugly constructions to compare versions
by components, such as
greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4):
or even incorrectly compare versions as strings:
!lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"):

Add test functions versionAtLeast and versionAtMost which use
QVersionNumber to compare version numbers by components.

Task-number: QTBUG-62984
Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
(cherry picked from qtbase/8a3e8856e5606ec616d4420ff8c4f77969432390)
2017-10-05 09:15:55 +00:00
hjk
82e0eefc8d Debugger: Move static type related code to CdbEngine constructor
Change-Id: I5d5489030eab9c16385df9af15f5974eaa2190e0
Reviewed-by: hjk <hjk@qt.io>
2017-10-05 09:02:32 +00:00
Ulf Hermann
fb370f460d Move URL utilities from ProjectExplorer to Utils
This way we can access them from the qmldebug library.

Change-Id: I90ba80228f44a9d5ea825ad59f4bd1572969980e
Reviewed-by: hjk <hjk@qt.io>
2017-10-05 08:54:39 +00:00
hjk
d0e419e02b Debugger: Move some CdbEngine member initialization
More concise.

Change-Id: I28ac441cacfceef1ad5622f15fecac1d2cca9395
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-05 08:20:41 +00:00
Tobias Hunger
033b641373 Session: Make sure startupProject is set whenever a project is open
Never let the startupProject become nullptr while projects are still loaded.

Change-Id: Ie442c3a9b6cc4a65564002edc45b60a7993d2a52
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 08:15:03 +00:00
Tobias Hunger
56086d6bb5 MiniProjectTargetSelector: Allow for startupProject to be nullptr
This should not happen, but currently it does during session loading.

Change-Id: Ic4da775010c8d947e8db210f618519080068e14a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 08:14:57 +00:00
hjk
9089b3acbd Debugger: Only set cppEngine if there's any C++ debugging
Fixes a regression introduced yesterday with 58a69c461a.

Change-Id: I9eea3d0adf45e2b65b7d395280ae0e0fbbe01127
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 08:11:20 +00:00
hjk
55d9fac2fb Debugger: Clean up outdated includes and files
Change-Id: I1b4b84ff9bfa3f6e0fe3030d70a114e2cf0f0604
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 08:06:43 +00:00
Robert Loehning
444e4f7ee6 Debugger: Initialize CdbEngine::m_autoBreakPointCorrection
Change-Id: I5baf137116e71d39c23dcc7bc12e87b363f30d98
Reviewed-by: hjk <hjk@qt.io>
2017-10-04 18:52:25 +00:00
Ulf Hermann
2f9d82791e QmlDebug: Move QmlDebugConnection into own file
Change-Id: I761658de7c19754cfaadf8cbbad7596a9bcdfbf3
Reviewed-by: hjk <hjk@qt.io>
2017-10-04 16:17:48 +00:00
Tim Jenssen
451f4a1e73 ProjectExplorer: fix testFlavorForOs()
Change-Id: I7e6e784c233159beead616149b7aeeb0f95225fe
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 16:15:27 +00:00
Knud Dollereder
5e3f52ef3b QMLDesigner: Fix Font size in form preview
If QT_SCREEN_SCALE_FACTORS is set we cannot set
QT_AUTO_SCREEN_SCALE_FACTOR.
Otherwise, we mess up the font sizes.

Change-Id: I7d1a07f4c671fdcae5a81556ab9e29df7ddf92d5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 14:19:14 +00:00
hjk
58a69c461a Debugger: Remove DebuggerRunParameter::masterEngineType
It is a fixed value in the respective contexts, no need to track
this 'state' separately.

Change-Id: Id442202ff7a72baf5a2b19ba4bb9dfec5f47fb70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-04 14:06:52 +00:00
Orgad Shaneh
674b4296db Debugger: Always set executable from user arguments
It is required also for coredump, attch to remote etc.

Change-Id: I99bdcf860fc7c4ffd7918213a121b56977bec19d
Reviewed-by: hjk <hjk@qt.io>
2017-10-04 14:04:07 +00:00
Orgad Shaneh
5e8e619dd0 Merge remote-tracking branch 'origin/4.4' into 4.5
Change-Id: I9b7cb3d845628abf69a73a279f5a79202c0976c2
2017-10-04 16:11:17 +03:00
Tobias Hunger
2966b7349f Qbs: Fix reparsing triggered by RunConfiguration changes
Task-number: QTCREATORBUG-18999
Change-Id: Ib44735d378029a30163ff2a5833d893bc0eb88c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-04 12:36:36 +00:00
Christian Stenger
3eb8c88974 AutoTest: Improve process error handling
If the test executable cannot be started or it seems
not to be the correct one or wrong arguments have been
passed to it the user now gets a respective message
inside the results pane.

Task-number: QTCREATORBUG-18955
Change-Id: Ica68cdbb9e401c8d48a9ce8b23b65d5410d2075a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-04 12:29:01 +00:00
Eike Ziller
1a19afc3e2 DocumentModel: Add safeguard
It should never happen, but in the worst case do not
crash anyhow.

Task-number: QTCREATORBUG-19011
Change-Id: I9cd6f26929bf090262845b72d59a0654ad4eefff
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 12:26:41 +00:00
Tobias Hunger
62b3f422c4 MiniProjectTargetSelector: Fix removal of BuildConfigurations
Task-number: QTCREATORBUG-19008
Change-Id: I8effc8739cb9cc7a347836fde8ae7a94a402ddb7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 12:26:03 +00:00
Christian Stenger
cff8dac2b8 AutoTest: Improve handling of canceled test configurations
If a test configuration cannot be guessed correctly and the
user cancels the dialog to select the correct runnable we still
have no valid executable.
Deselect the respective configuration for the current test run
and avoid warnings regarding empty executable.

Change-Id: I843bf2844a5530be047c142805992a5fb79cbc19
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-04 11:45:36 +00:00
Ulf Hermann
7749a47e62 QtSupport: Move populateFileFinder to BaseQtVersion
This populates a file finder so that it is best able to find QML files,
prioritizing the given project/target. Some of it would also apply to a
non QML file finder, but as we don't use FileInProjectFinder for other
file types we keep the code here, for now.

Change-Id: I14e2ac63e699afe27d2f3af8ca3d57dfe732da8c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 10:49:40 +00:00
Ulf Hermann
0693db3579 SessionManager: set startup project on addProject
If there is no startup project when we add a new project the new project
should become the startup project, as a situation where there are
projects, but no startup project is invalid. removeProject also checks
for the startupProject and adjusts it if necessary.

Change-Id: I5f12add832db82af553fc1e393e32185eb322866
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 10:49:29 +00:00
Tobias Hunger
7c94750d70 CMake: Modernize CMakeBuildConfiguration
Change-Id: Ie09ae7b765d6c2f72eb62b9db2937fbd68e232f5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 09:53:03 +00:00
Tobias Hunger
2dabdbd2fe CMake: Report cache configuration arguments in server-mode
Change-Id: I3cd7a9ac37a1b8c3c6018070c6fdc506abedd736
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 09:52:43 +00:00
Tobias Hunger
7ae35898b5 ProjectExplorer: Make Run button state more robust
Do not connect/disconnect all the time, just subscribe to the signals.

Change-Id: I57023e9c0c758f5b09f6ef592fc2dd2a679f7c94
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 09:51:40 +00:00
Tobias Hunger
f8ded0df26 SessionManager: Modernize code a bit
Change-Id: I9e44990c62ccca8e06919576bb9be463bb84cf19
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 09:50:00 +00:00
Tobias Hunger
db5a00231f Session: Fix removal of projects
When removing a project setStartupProject(nullptr) may fail, since
it will reject any attempt to set the startupProject to nullptr while
any project is still available.

So delay this till nullptr is an option:-)

Change-Id: I6f41a17d922cf6333b7b7e17f8300e831e4807d9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-04 09:49:52 +00:00
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +00:00
hjk
9f3e104e37 Debugger: Simplify QmlEngine construction
Change-Id: Id237998cf2d9a03f9c2929043fdb45ac49d4addb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-04 08:54:10 +00:00
Orgad Shaneh
84b57027c8 Git: Fix progress during rebase
Broke by c4b5048836.

Change-Id: I35b22b6ab5fd8767ef729906b8344a0d6aa1f0cf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 07:51:12 +00:00