Commit Graph

60654 Commits

Author SHA1 Message Date
Marco Bubke
f9fb4508d4 Clang: Optimize file path cache
We now fetch all directories and sources from the database at file
path cache creation.

Change-Id: I92510b49a234128f4c82b840611db82ead3f1a54
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:28 +00:00
Marco Bubke
912b4763e0 ClangPchManager: Optimize difference computing
Don't create temporary containers.

Change-Id: I28e8999c3443a20c8ef6da3a048ec90fbb99a3c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:17 +00:00
Marco Bubke
d610cf3793 Clang: Sort file path ids
We will move that code to an other place where we will implement the tests
for the sorting.

Change-Id: Ia6e868466e2c43acdc0f5a8ed73b32cfc24613c1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:06 +00:00
Marco Bubke
4280a68d9f ClangPchManager: Watch unchanged PCHs
Change-Id: I7f4c0f12e4fbf3714e5bfe7655cfa13cac85f71f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:52 +00:00
Marco Bubke
56d611e0a3 ClangPchManager: Update PCHs if time stamps of dependencies changed
If there is a newer file than the last indexing or if a file is added or
removed from the project or system PCH we have to reindex the project and
maybe the system PCH.

Change-Id: Ibce2a244190a79b5c422c469c065ddc11e44b2cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:39 +00:00
Marco Bubke
f1be7793c4 ClangPchManager: Expose more internals from BuildDependenciesProvider
We will need it later.

Change-Id: Ic2c85780bf965be8e4c8603fed365d806576fdc6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:26 +00:00
Marco Bubke
d086bbdc9a ClangPchManager: Fix transactions in precompiled header storage
Change-Id: Ia0333ef7110c97a42d73c70c33157849323fb34d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:15 +00:00
Marco Bubke
578b70e998 Clang: Add fetchTimeStamps to PrecompiledHeaderStorage
Change-Id: I75552a971fbc39a81e14e3b9ec0c5125d3858025
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:02 +00:00
Marco Bubke
0fe6811acd ClangPchManager: Use TimeStamp instead of long long
Change-Id: If8a429238d31492506c68bb523ceeb4bacad157e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:48 +00:00
Marco Bubke
1e703a6901 ClangRefactoring: Remove file status collection
It is not needed anymore. If we need it again we can reintroduce it.

Change-Id: If8897ddb404daaf52b249ddd3763deb685c35fe5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:31 +00:00
Marco Bubke
cc78969bdb Clang: Improve updating of PCHs
Instead of deleting the path and time stamp of the project PCH we always
set the time stamp but delete only the path if PCH creation failed. A
failed PCH will be no rebuilt if the files changed. We have to add that
feature later.

Change-Id: I1094271f9ead5d906e94b68ac91c0becd2371ca9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:16 +00:00
Marco Bubke
2ae4c35a65 ClangPchManager: Set the time stamp to -1 if a file changed
Change-Id: I2919201b5c9dc67a2d212d7bf2fb433def8be891
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:03 +00:00
Marco Bubke
cdda564946 Clang: Set indexing time stamp by dependent sources
Instead of using the time stamp from clang we simply set one time stamp
for all dependent sources.

Change-Id: I0adbe59d46c88ddd1ac491a7f7db568bcf2ac540
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:48:54 +00:00
Marco Bubke
ac22760043 ClangPchManager: Return always a null entry if there is no file status
It's done by a left join which is creation null entries for missing
right join values.

Change-Id: I61715791d454546834ad3dcfc4c4bee92c31b0e5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:48:45 +00:00
Marco Bubke
e23ec051cd ClangPchManager: Take argument by reference
Change-Id: I7a6ee30497d7542feab7ea78d1f90123b3f3aef0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:48:33 +00:00
Marco Bubke
2fd72ed9d9 Clang: Remove reset from ModifiedTimeChecker
Change-Id: I8eb7258e929ad851310b3dfae818152eed88960e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:48:12 +00:00
Marco Bubke
c9f5a9d410 Clang: Return zero as time stamp if file does not exists
Change-Id: I738abd4c5c12a1f63dd8ddae7f8bbba468d5855a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:48:00 +00:00
Marco Bubke
4e5e4899d5 Clang: Improve modified timer checker
Make the algorithm a little bit more clear.

Change-Id: I71b04cdd947272edf9fade8f93b7300a945a2fc8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:47:49 +00:00
Marco Bubke
8c1b803fad Clang: Return source ids in order
We expect them always in order.

Change-Id: I837d4dd2d015d32cea4ffcd3ae28f3f18d3e21ad
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:47:40 +00:00
Marco Bubke
eadd37572a Clang: Move transactions to storage
We call the function anyway only isolated from other queries, so we can
move the transaction guards to the project storage.

Change-Id: I7cca26b25c2258856c68821671085c0a68044693
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:47:29 +00:00
hjk
19580ab203 ProjectExplorer: Less use of stored RunConfiguration in RunControl
Change-Id: I501433dcbc3d40c6439f5ab003e06f5a72b9d83e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-27 10:44:49 +00:00
Christian Kandeler
69b4e2a118 CompilationDb: Properly set up build info
Avoids e.g. soft asserts in TargetSetupWidget.

Change-Id: I9640ada5d2d015c25c04ddfa2a2443b7444788db
Reviewed-by: hjk <hjk@qt.io>
2019-08-27 10:21:52 +00:00
hjk
989b8a9e6d Android: Rename a 'profiler' to 'worker'
Also used for the preview runner.

Change-Id: I3f8ba0890bc36799bddcf1137bd98a2b6d851382
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-27 08:34:59 +00:00
Nikolai Kosjar
0979a58689 ClangTools: Extract filtering in readSerializedDiagnostics()
Change-Id: I07a4339af72d1e232eb7fe152a6af133a6a94436
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-08-27 08:27:09 +00:00
Nikolai Kosjar
c4889e9904 Clang: Extract Utils::utf8AdvanceCodePoint
Change-Id: I922c7b0f2f0e0d50f34035e9affef4504df59892
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-08-27 08:26:45 +00:00
Leander Schulten
75a065d3d1 DoxygenGenerator: Ignore Q_INVOKABLE in front of function declarations
Otherwise the doxygen generation will not work.

Fixes: QTCREATORBUG-12411
Change-Id: I3e887dfeb5caba727da6e56a056c092c5a2e23f9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-08-27 08:13:35 +00:00
hjk
3844f59806 ProjectExplorer: Standardize RunWorker creation logic
This unifies the remaining paths of RunWorker creation to always
use RunWorkerFactories in the plugin pimpls.

There were, and are, still effectively three basic kinds of workers:
 - "toplevel" tools corresponding to the run modes, that are often all
    that's used for local runs and directly started via the fat buttons
    or e.g. entries in the analyze menu, with factories already previously
    located in the plugin pimpls
 -  core "tool helpers", providing tool specific functionality typically
    used in conjunction with a remote device specific run mechanism,
    set up via RunControl::registerWorkerCreator
 -  target/device specific runhelper like port gatherers contructed e.g.
    via *Device::workerCreator(Core::Id id)

Worse, these categories are partially overlapping, so it was not
clear how a "clean" setup would look like, instead some ad-hoc cobbling
"to make it work" happened.

In some cases, the runMode id was used throughout the whole ensemble
of run workers for a given run, and which worker exactly was created
depended on which of the mechanism above was used in which order.

With the new central setup, the top-level runmodes remain, but the
second kind gets new ids, so the implicit dependencies on order
of setup mechanism are avoided.

This also helps in the cases where there was previously unclarity of where
and how to set up worker factories: It's always and only the plugin
pimpl now.

Change-Id: Icd9a08e2d53e19abe8b21fe546f469fae353a69f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-27 07:54:45 +00:00
Eike Ziller
38feea7e25 Merge remote-tracking branch 'origin/4.10'
Change-Id: Idfe86eb91c7a9a16f15d528a2a03beecca1cb208
2019-08-27 09:47:14 +02:00
Nikolai Kosjar
835477b52f Deploy clang-tidy binary for the ClangTools plugin
Change-Id: I4491c985cdcb93ca94be491d1acb9d960f96a190
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-27 06:42:38 +00:00
Dmitry Nuzhdin
309e345818 Debugger: Fix mapping std::set in Locals window via gdb
Currently QtCreator incorrectly shows content of a std::set.
For example set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
is shown as {0, 1, 2, 1, 2, 1, 2, 1, 2}.

Change-Id: Idaff66451827657ef129aa3d27895c43938e6fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2019-08-26 16:11:23 +00:00
Christian Kandeler
dcea77f2dd ProjectExplorer: Update build directories in target setup page
... on a kit update.
Our default build directory template references the kit name, so changes
to the name should update the default value.

Fixes: QTCREATORBUG-19453
Change-Id: Iffbdd95043be5137696e5af021d4735f494d47d7
Reviewed-by: hjk <hjk@qt.io>
2019-08-26 16:02:26 +00:00
Thomas Hartmann
8751d0c7d9 QmlDesigner: Resize Loader
Task-number: QDS-745
Change-Id: Idf126f5ed00cce74921a320d9bf17ef620ccd511
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-26 14:30:50 +00:00
Knud Dollereder
00b29fd90d Improve update behavior
- Suppress reflections
- Keep selection when updating the model

Change-Id: I0e165f0019c8c24802193f3a59902876d4cb5060
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-26 14:13:21 +00:00
Christian Kandeler
ca7e6bd1b1 ProjectExplorer: Fix restoring the issues pane warning button state
The wrong button function was called.
This does not fully fix the linked problem for the default session,
because there is the additional issue of TaskView::loadSettings() not
getting called at all.

Task-number: QTCREATORBUG-19388
Change-Id: I64dcec9c6d07c8ac614c9a2ecd783e7eaa1a204c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-26 13:59:58 +00:00
hjk
5ba05d9f79 Android: Remove unused enum AndroidQemuStatus
Change-Id: I951da00d4f802c0a130c617aa34ddaf2ac9aad4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-26 13:04:41 +00:00
hjk
2231080678 QmlDesigner: Work around yet another Qt deprecation warning
Change-Id: I9a0bce549fac39b1aa180782ccb20bbe69967163
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-26 12:01:14 +00:00
Christian Kandeler
5e6c9947ad Update qbs submodule
To HEAD of 1.14 branch.

Change-Id: I11b99311234f981c3f6917079c6119b475396d0a
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-26 12:01:04 +00:00
Eike Ziller
10d3772b7a CMake: Fix regression that a "Build" build configuration was available
And the default selected when configuring a project, since it was the
first.

Broke with 5dbfd46bcf which merged
"availableBuilds" and "availableSetups".

Change-Id: Ibc8c241595f3fee6f35e08fa83e499550eff869b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-26 11:40:12 +00:00
Tobias Hunger
14b1b3137b ProjectExplorer: Assert that the filter passed to Project::files is valid
QTC_ASSERT that the filter passed to Project::files is valid before
calling it.

Change-Id: I17776fa4ab3e2aa21ac34db015fdbbb382439669
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-26 11:10:15 +00:00
Alessandro Portale
b98596490e Utils/Android: Add themable, DPI-endabled Download icon to Utils::Icons
And use it in AdroidSettingsDialog

Change-Id: Ia847b6df0e5ab26fc02157f888565a3e6d86bb34
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-26 10:27:28 +00:00
Christian Kandeler
2cad0733c2 ProjectExplorer: Do not reset kit selection in target setup widget
... on kit update. We don't know why the kit was originally selected,
and keeping track of this information would add unreasonable book-
keeping effort. Plus, the user probably does not expect the selection to
change anyway.

Change-Id: I341e1727a3f1fdd481c3a1670f821aee0e6b9cdd
Reviewed-by: hjk <hjk@qt.io>
2019-08-26 09:04:10 +00:00
hjk
dca7edbeef Let PortsGatherer produce full URLs instead of ports only
This is what the consuming code expects in most cases.

Change-Id: I135592039e28b994996186f627215ab1d2f8d6dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-26 08:16:03 +00:00
Eike Ziller
89f3b32104 Merge remote-tracking branch 'origin/4.10'
Change-Id: I0d4655b195d0615719d5d391aa69e682f8c6f78f
2019-08-26 09:45:01 +02:00
Andre Hartmann
a1db400e65 CppLocatorFilterTest: De-noise
Change-Id: Ie7c8bdb55764a229b24a9acf68d1e93d82f5edef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-08-25 19:18:57 +00:00
Henning Gruendl
b4d8e67e0d QmlDesigner: Fix UrlChooser reset behavior
* Cleanup ColorLogic (imports and source)
 * Shifting a value from Constants.js to Values.qml
 * Add a property alias on AbstractButton to allow changing the font
   family

Change-Id: I51542f69f8f2190030a97164167d71d277147391
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-23 14:30:16 +00:00
Nikolai Kosjar
4c9ef26817 Clang: Fix clang installation macros
LLVMConfig.cmake (version 8 at least) does not set

  CLANG_VERSION
  CLANG_RESOURCE_DIR
  CLANG_BINDIR

Task-number: QTCREATORBUG-22825
Change-Id: I83de1b73fd777df1ee980cb3189fd3be2e4a9f3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-23 13:56:01 +00:00
Henning Gruendl
9f7fe2fb82 QmlDesigner: Add AbstractButton wrapper
Add AbstractButton wrapper to HelperWidgets this enables tooltips
on Buttons again.

Change-Id: If82bfcf3097f9e09d5cc19e4363b2428ad0ca872
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-23 13:37:03 +00:00
Henning Gruendl
995f09d6dc QmlDesigner: Set reasonable padding range
Change-Id: I84b9e0e2286aaf1574a7a8b68689540e0ca54bc5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-23 13:36:47 +00:00
Henning Gruendl
4ff0ee4ab1 QmlDesigner: Swap unicode of alignment icons
Change-Id: I1d40f2c25843d90c20569c349c586ad7393b2255
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-23 13:36:35 +00:00
Henning Gruendl
e817b95b8a QmlDesigner: Remove redundant backend value call
Change-Id: I9e0701da02a694d83ab4ce5ed391da96d41c2edf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-23 13:35:23 +00:00