Commit Graph

44349 Commits

Author SHA1 Message Date
Ulf Hermann
1e7bf7f721 QmlJS: Reparse cpp types when component headers change
Previously the code model would only get updated when the document that
contains the qmlRegisterType changed. If the actual component exported
to QML lives in a different file, any updates to that component would
be lost. With this change we keep track of the header files the
components are declared in and rescan if any of them changes.

This is still not the greatest way to do it as there are a number of
ways to introduce dependencies the system cannot detect. It's better
than before, though.

Change-Id: Ic077c516dca3ac720f78973c84e5e6e91b6a5c07
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-07-15 16:22:42 +00:00
Tobias Hunger
b851b57ea3 Utils::ShellCommand: Force fully synchronous execution from UI thread
Force runCommand when run from the UI thread to do fully synchronous
operations. This prevents two event loops in one thread with (sometimes)
interesting side effects.

This also stops signals from being sent while the process is running,
but the remaining users seem to be able to handle that.

Change-Id: Id5eb9868b660419987730c60e3fbfb4cbced1218
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-15 14:49:02 +00:00
Thomas Hartmann
05b5b61673 Loading .ttf fonts from share/qtcreator/fonts
We add all .ttf fonts found in share/qtcreator/fonts to
QFontDatabase.

Change-Id: I133a5298bd4696b99fa2350758baf8abd8b16fd8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-15 14:45:30 +00:00
Alessandro Portale
26246af9b3 ProjectExplorer: Don't cut off the summary label in the selector
Replace the manual height calculation with what Qt offers.

Task-number: QTCREATORBUG-16610
Change-Id: Icd18ef92d608d01c6343bb778343258d56461933
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-15 14:36:45 +00:00
Tobias Hunger
7c910e8b16 Git: Some more cleanup
* Remove some more QLatin1String/QStringLiteral
* Use algorithms

Change-Id: Iaa1042684c58be5ff0a42b9126b63ec681053fdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-15 14:27:22 +00:00
Tobias Hunger
2c5095c94d Utils::ShellCommand: Use SynchronousProcess where posssible
Use SynchronousProcess::run and SynchronousProcess::runBlocking.

Using SynchronousProcess::run in ShellCommand::runSynchronous
is generally safe, since this method is usually called in its
own thread. This makes the processing of cancel requests work
again and makes output available via signals.

Task-number: QTCREATORBUG-16532
Change-Id: I6907194bd00cd5713673d9b1911978d69b996a80
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:24:05 +00:00
Tobias Hunger
d1be129abe Utils::ShellCommand: Add runSynchronous method
Add runSynchronous method and move code from runCommand there.

Change-Id: Ic7c452d583fd88468fc6466a683159ecd8328b48
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:22:39 +00:00
Tobias Hunger
c2075f6a73 ShellCommand: Pass OutputProxy to runFullySynchronous
No need to create a fresh one.

Change-Id: I3c7b92319ab43030620428987dfa254be7ac03a7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:22:02 +00:00
Tobias Hunger
53c602633c Utils::ShellCommand: Rename runSynchronous to runFullySynchronous
This name just got free, so use it for the method that actually is
called if the process runs with the FullySynchronously flag set.

Change-Id: Ic86bb291d578ad06b74db1ab89a22b1b8cb4f4bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:21:40 +00:00
Tobias Hunger
cc27125092 Utils::Shellcommand: Remove runFullySynchronous
Nobody uses that anymore.

Change-Id: I24935ac8d25eb639eb253250749750993c740516
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:21:21 +00:00
Tobias Hunger
ca7a924a06 VCS: VcsBaseClient::vcsFullySynchronousExec returns a SynchronousProcessResponse
Change-Id: Ic155da2ed1fd36f1f91327ac90f34a5cad3c210e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:16:29 +00:00
Tobias Hunger
5efd82468b SynchronousProcess: Store raw bytes from stdout/stderr of the process
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.

This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).

Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.

Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:16:03 +00:00
Orgad Shaneh
2ec82a2a93 Utils: Support pattern substitution in macro expansion
Syntax is similar to bash substitution:

%{variable/pattern/replacement} takes the expansion of variable, and
replaces the regular expression pattern with replacement once.

%{variable//pattern/replacement} replaces all occurrences.

Capture groups are supported for both forms.

Change-Id: I67ff91e2dad4dd8be81573ea446cd1093a05ccf6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: hjk <hjk@qt.io>
2016-07-15 13:26:41 +00:00
Orgad Shaneh
86882018dd IosTool: Use Qt5-style connects
Change-Id: I5035b450c1f2c3498f356fc82bef8ea54bcfd61b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-15 13:26:24 +00:00
hjk
7c48f9c567 QNX: Prevent crash on failing attach to running process
Change-Id: Ibe8c8e83f81e7111bdd782881eb9f44df71521fe
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-07-15 12:45:51 +00:00
Christian Kandeler
2b3d4685db QbsProjectManager: Have one qbs::Project per target
The class qbs::Project corresponds to a Qt Creator target, not to a Qt
Creator project. It represents a project set up for a particular
configuration.

Task-number: QTCREATORBUG-16545
Change-Id: I9e4fa6a4bf763e49335f294609d7465545df4559
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 12:32:34 +00:00
Eike Ziller
7e1b4ccebb Merge remote-tracking branch 'origin/4.1'
Change-Id: I041b949aff8bee481a572ba6f7e2ef72b9010923
2016-07-15 14:10:38 +02:00
Alessandro Portale
cc18dc3cd8 Core: Remove text shadow from progress label
This removes the last occurrence of "Text with shadow". The progress
label was not only inconsistent but also bad on light themes.

Task-number: QTCREATORBUG-15999
Change-Id: I9c17402607d413fcfa0edcf342a50575d405dc1f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-15 11:42:14 +00:00
Tobias Hunger
7f81c09097 Add variable substitution for different toolchain languages
Extend the existing "Compiler:*" substitutions with "Compiler:*:<LANGUAGE>"
which can be used to query all the information about different compilers
used for different languages.

The original "Compiler:*" is kept for compatibility reasons and points to
the Cxx compiler.

Change-Id: I356b8b3cb6b55a44581f2c78db90f8a197b0aff0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 11:41:05 +00:00
Christian Stenger
ac1c04b6b3 AutoTest: Fix document update handling while code model indexing
Avoid fetching all files for the startup project again and again
while code model is indexing files. The indexing emits documentUpdated
signals for all (relevant) processed files.
If code model is indexing we perform a full parse anyhow after the
indexing has finished.

Change-Id: Ibfdb47f403da19d5bab3eb2295447ad451fca2b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-15 10:27:59 +00:00
Christian Stenger
9a3a0fa7ce AutoTest: Fix detection of gtests inside namespaces
Task-number: QTCREATORBUG-16535
Change-Id: I3285d2545e2861607b6e1406ee24f950405c4367
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 10:17:44 +00:00
Ulf Hermann
b333b30c78 QmlDebug: Properly close connection on invalid messages
Change-Id: I5411a576bde22193bc997908ca2c87d9660d3ea8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-15 09:22:53 +00:00
Ulf Hermann
1cc8cd7f02 QmlProfiler: Move connection failure message to QmlProfilerTool
and show it on any kind of connection failure, not only on timeout.

Change-Id: I6b9c44cd3455d5dd383a552f9b422d3d236b67c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-15 09:22:45 +00:00
Christian Stenger
38484d463c AutoTest: Correctly release resources
Change-Id: I8023c1468f9cf9cc0c549a466b298e19a6b40a15
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-15 09:19:18 +00:00
Christian Stenger
0b527de52e AutoTest: Fix parsing for QuickTests
If the scan for quick tests was triggered just by a change of a
qml file (including indexing by the respective modelmanager) we
might find tests that won't be able to execute.
If we have already found quick tests we know their respective
project files. If we cannot find the files to be scanned inside the
already found ignore scan requests for such files.

This patch is kind of a continuation of b570ee1b80
(Fix initial parsing when loading session)

Change-Id: Ic1228641f60abf127134acbd4232a0ddd30ef159
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-15 09:19:12 +00:00
Christian Stenger
e51443ce62 AutoTest: Add handling for system messages
QTest uses special type for critical and for special internal messages.

Change-Id: I980b2ccd2913012be24183ea503247331eeb97e1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 09:18:13 +00:00
Christian Stenger
48b2af5e77 AutoTest: Cancel possible running tasks on shutdown
If tasks are running while shutting down we might end up in a crash,
so cancel all tasks and handle possible invalid accesses of the
current running processing.

Change-Id: I69f7cac5f44390e322fa301af6d6794270c95c2a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-15 09:18:01 +00:00
Christian Stenger
e70adf820e AutoTest: Allow run/debug without deployment
Task-number: QTCREATORBUG-16486
Change-Id: I7ef5887e065830152744a9bd7d7727058b4521d9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 09:17:48 +00:00
Tobias Hunger
ebfdac357c ToolChain: Change languageId for C++
"C++" might end up clashing with Orgad's work to make variable substitution
more powerful. Use a pure-ASCII-string name (Cxx) instead.

No conversion code since the impact can't be big so far, considering how
new the code is.

Change-Id: Iab1c91cd89d6c11dfaad80472a312e619abb6d97
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 09:17:14 +00:00
Jochen Becher
dfda517a1e Kits: Fix compilation error
Change-Id: I63089089bd59c5ce594ff6268075e3bb52caeb43
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 08:46:08 +00:00
Alessandro Portale
63eae6bd85 QmlDesigner: Theming of property editor checkbox and "tr" button
Change-Id: I599cd52c1b2b2e24952a9738f07eed0826802d4c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-15 08:33:00 +00:00
Ulf Hermann
72890f69a1 QmlDebug: Signal an error if local socket cannot be opened
Change-Id: I61fa544f454e22de45d6a6ef9180a896231662c9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-15 08:24:08 +00:00
Tobias Hunger
32b484e26e Introduce ToolChainKitInformation::targetAbi(Kit *)
Use that in the debugger. That simplifies the logic a bit.

Change-Id: Ia72607283373ee0f89a91f347db0ef2c87cf9fb3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:46:47 +00:00
Tobias Hunger
7ab2ed5730 Pass C or Cxx toolchain to code model
Pass the C toolChain to the code model for all the C-versions creator
supports.

Change-Id: I0300a19d35861fcee76fb92ce14c6e04996bac7f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:33 +00:00
Tobias Hunger
abcb276453 GccToolChain: Auto-detect C compilers
* Autodetect gcc and clang C compilers (in different flavors)

Change-Id: I7e61f2c6101b146ad63bb29278c05b1a574cf75e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:24 +00:00
Tobias Hunger
ed8773c596 Kits: Show multiple toolchains in the kits options page
Change-Id: I6135fc089486252247981a33ff796328eabe9943
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:19 +00:00
Tobias Hunger
f1f4741615 ToolChainKitInformation: Warn on targetABI mismatch
Create a warning when targetAbis of the compiler mismatch. That means
that the compile output can not be linked together, which is probably
not what is intended.

Change-Id: I167ee526c1dec89d39698195e1feccea30a26825
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:11 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Tobias Hunger
ce9ca1f0ef ToolChain: Create toolchains for different languages
Enable creation of toolchains for different languages and wire
up the logic in the ToolChain Options Page.

Change-Id: I9fbd95607d30cc1aa10f73d6532338f07f3e2b4e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:00 +00:00
Tobias Hunger
c071f68942 ToolChainOptionsPage: Enabling adding toolchains for different languages
Change-Id: I7e0984c6229c8583433a9efe0063337a18c5f716
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:56 +00:00
Tobias Hunger
d4624b9297 ToolChainOptionsPage: Handle toolchain languages
Properly display toolchain languages in the tree view of the
tool chains options page.

Change-Id: I27cb42cd2c5bf0cd7be8da921b94d8da10110841
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:52 +00:00
Tobias Hunger
ca04c4c264 ToolChainFactory: Add support for different languages
* Add a pure virtual method to get supportedLanguges with

Change-Id: Ida4445ca045c90fb9f7656a661af83e5b6801b30
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:40 +00:00
Tobias Hunger
1304b250eb ToolChain: Make sure all ToolChains have a language set
* Add code to toolchains
* Assert that this is the case in the toolchainmanager

Change-Id: I82452689e83279fd9d1afb3140b0070bef9b6cd8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:33 +00:00
Tobias Hunger
dbf5f74352 ToolChain: Add a language field
* Make sure this field can not change during the lifetime of the
  toolchain
* Save/restore it, default to Cxx if no language is set in the
  toolchain.xml file

Change-Id: Ie79321f9913521b087cb8a735660cf1e1faeec3b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:27 +00:00
Thomas Hartmann
dc6a3c4fef QmlDesigner: Remove triangle icons
Change-Id: I32e0cb8a2d1b406c464ada33685def1149626a72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-14 15:30:17 +00:00
Tobias Hunger
43b0d2ad48 KitOptionsPage: Fix layout when showing/hiding kit details
Task-number: QTCREATORBUG-16261
Change-Id: Idf1beedfa427895a54498f1fb4658708ea5e4cc1
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:23:34 +00:00
Eike Ziller
defb18aef4 Algorithm: Fix build issue with MSVC2015
Be more specific on which overload to call.

Change-Id: Ie38252403774ea34c165daedd74c02bbed693439
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-14 13:29:41 +00:00
Tim Jenssen
dd009004f5 ClangBackend: fix windows build
Change-Id: I10aa1df96d5e1381056b33c03009ae19301a3f3e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-07-14 12:21:02 +00:00
Ulf Hermann
5fe450fa63 Utils: Q_DECLARE_METATYPE Utils::Port
... so that we can pass it through signals

Change-Id: I11930f39372054271e94a0f07e3e2f8627f5ce1d
Reviewed-by: hjk <hjk@qt.io>
2016-07-14 12:03:16 +00:00
Ulf Hermann
5c32406296 QmlProfiler: Add binding loops render pass test
Change-Id: I64fbc8fae00e859ce6433ff85ceb5706675b88cc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-14 12:00:40 +00:00