Commit Graph

44349 Commits

Author SHA1 Message Date
Alessandro Portale
ebf8c1eaf0 QmakeProjectManager: Use "Default encoding" for mechanized editing
When performing mechanized editing on .pro/.pri files, until now, Qt
Creator reloaded and restored the file with [from|to]Local8Bit.

That broke #comments in unicode.

This change implements that the the "Default encoding" from the text
editor options is used instead.

Task-number: QTCREATORBUG-10274
Change-Id: I783fc3a2c6a2638e4603ced2eef25c2a3998e2c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-05 11:58:55 +00:00
Francois Ferrand
38ae5aec10 C++: Fix handling of Objective-C/C++
- Objective C/C++ was not enabled in highlighter.
- QMake project part for Objective C/C++ did not have ObjectiveC extension enabled.
- As languageFeatures.objCEnabled is a bitfield, it was actually always set to 0.
- Highlight ObjC class & protocol declarations.
- Highlight ObjC message passing.

Change-Id: I64d12c9509058d05f7adce94598cb7ce91727ac8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-12-05 10:27:58 +00:00
Eike Ziller
8f0ddff1cc Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/shared/qbs

Change-Id: I5050baa31f4a892d00cd6f7e088d1b597921474d
2016-12-05 10:55:35 +01:00
Filippo Cucchetto
1e70a156f9 ProjectExplorer: Fixed missing check for futureinterface nullness
Change-Id: I56808b84964218038ac9709583f07c212391f601
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-05 09:30:38 +00:00
Tobias Hunger
c9f7aef71d CMake: Stop progressindicator on build settings widget on error
Change-Id: I75051aa23baa88d984092ba594dda72c489d7c19
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 09:27:57 +00:00
Tobias Hunger
4f8769d844 CMake: Tealeafreader: Emit start signal before actually starting
This way we will get the start signal before the done signal if something
fails early.

Change-Id: I015017fdba16dd84f830b2e1fe2742eb0bec02a0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 09:22:50 +00:00
Tobias Hunger
183cdbc91f CMake: Emit errorOccurred on errors in server-mode
Change-Id: I0dd262ccaad3704c70dedff5e0b102032c46d2df
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 09:22:41 +00:00
hjk
c390c716d1 BuildConfiguration: De-virtualize setBuildConfiguration
... and adjust users in Nim and Autotoolsplugins.

Change-Id: I6133ca933a5a4dc4d7d9ff73c8ca7afaa51ae516
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-05 09:21:37 +00:00
hjk
532c9d49ac QmakeBuildConfiguration: Pass build dir to base setter
Change-Id: I55bd47d62ef644257b49d3423c4d43a6443564aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-05 09:20:55 +00:00
Tobias Hunger
73e45e30a3 CMake: Clear tasks when forceParse-ing
Server-mode only used to clear the tasks for normal parsing.

Change-Id: Ibbc3ac30f00afaff4874cb0682f5d7e8f1abafcd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 09:19:11 +00:00
Christian Stenger
24969964f2 CVS: Re-enable plugin unit tests
They had been lost while the latest refactorings.

Change-Id: I248b274c948a2265aa11d95bbeff143b4a439735
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-12-05 06:11:15 +00:00
Filippo Cucchetto
ad771f9750 Nim: Removed unused FileSystemWatcher
Change-Id: I093b1536a10e5914fbfb14fc2e954c3f07907371
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-12-04 16:21:36 +00:00
Christian Kandeler
f1fc8824c0 Update qbs submodule
To HEAD of 1.7 branch.

Change-Id: Ic47bfa33e826cded51369fbd35572f0d7d5cca6f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-02 16:26:59 +00:00
Tobias Hunger
e545f8a105 CMake: Work-around first config argument getting skipped by cmake
Work-around the first configure argument getting ignored by cmake 3.7.0
and CMake 3.7.1.

Change-Id: Iaf164cbf973672c1d899738a374c65ea5641132c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 15:33:55 +00:00
Tobias Hunger
cae9f70d75 CMake: Do not forget cmake generator information on load
Task-number: QTCREATORBUG-17311
Change-Id: I3439933e396f74a092c9b46aaced0a73c33c4407
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 15:33:32 +00:00
Christian Stenger
349ad040d6 AutoTest: Limit purging of test tree to project switching
Instead of purging the current test tree on all full parses, just
purge the whole tree if the user switches the current project.
If an item can no more be found after the full parse it gets
removed anyhow.
This avoids losing the check state on any full-parse.

Change-Id: Ia7bae6ced65a69444adf0d7e2a554d90ddd5caa4
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-02 12:29:32 +00:00
Tobias Hunger
63c0fbc4e4 CMake: Cache cmake configuration only once
This fixes saves memory and fixes some update issues with the cmake
configuration, where the three layers of caches used to interfere
with each other.

Task-number: QTCREATORBUG-17360
Change-Id: I5564bbe46ca8de6b38dd710100bfc18fad98eac5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 12:00:09 +00:00
Tobias Hunger
5a88e4c9ad CMake: Fix the config model merging data
Old user-settings used to get lost.

Change-Id: I5197c3b57b12d94e7464a86261a1364dd9aca266
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 12:00:03 +00:00
Tobias Hunger
ea220ccec1 CMake: Emit necessary signal in server-mode
Change-Id: I35066deebbd0b7330cbf9864442073966af9203f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:58 +00:00
Tobias Hunger
b328a6357f CMake: Make project configuration win over kit configuration
removeDuplicates keeps the first instance, so pass in the project
configuration first.

Change-Id: I2549b8043905687fecc3b690f1d54456c42a4cf3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:54 +00:00
Tobias Hunger
168c5c67a2 CMake: No need to update the reader when it already is up to date
The reader notifies us about the configuration being changed, so there
is no need to tell it about those changes again.

Change-Id: I458947babf1cd9c50a66ea7863f37d1e43d6c5f2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:44 +00:00
Tobias Hunger
0edb16d4f3 CMake: Log server-mode teardown
Change-Id: I68ef20b855b9b7d6ed6fded9a599d74162a50390
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:37 +00:00
Tobias Hunger
46fb4f430f CMake: Clean cmake cache on compiler changes
According to the cmake developers this needs to be done.

Change-Id: I85670da11be31a71dd22fe2ea8d9102e47cc6535
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:33 +00:00
hjk
2275d68373 Debugger: Switch on QObject name display by default
... and use the option to govern general QObject guts display.

This allows people to completely avoid the performance impact
of attempted QObject display and still makes the feature
more prominent for our favorite use case.

Change-Id: I1e53b6448f646ab7eea9168a3cd24c77769e6328
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-02 11:23:46 +00:00
Maurice Kalinowski
de9c2d3bf0 Fix potential startup crashes
Change-Id: Id0f03b4fa9ff6a8f0f5b0de11fe51c3729065140
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-02 09:03:01 +00:00
Jarek Kobus
ed64ef4530 Use 3rd person in tooltips
Change-Id: I5a562f50acc3ba9bb14a8f87a5219ef311508076
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-12-01 20:41:59 +00:00
Alessandro Portale
15148d8e44 ProParser: Use the "Default Codec" when reading qmake files
This change adds a QTextCodec* member to QMakeVfs. It is used to decode
the qmake file contents in QMakeVfs::readFile. The QMakeProjectManager
sets it to the current "Default Codec".

This is necessary only in Qt Creator, where the parser would actually
use Local8Bit (unlike qmake's Latin1), which would sometimes lead to
misinterpreted multi-byte chars in comments swallowing newlines and thus
falsifying the actual code.

Bootstrapped qmake is not affected by this addition.

Task-number: QTCREATORBUG-17309
Change-Id: I34b42bd19e0de973deb2291e91f306d1ca7c630e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-01 17:06:41 +00:00
Ulf Hermann
a228ad7e49 QmlProfiler: Use QML_MIN_LEVEL in DebugMessagesModel
... replacing some magic numbers.

Change-Id: Ib77aa53d6b892867abe337a69b6f8caf89e58a14
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-12-01 16:08:44 +00:00
Tobias Hunger
1b0c2a28d1 Debugger: Fix cdbMatcher to match on wordsize
Change-Id: Iaf08cefb9327628d79a87e8664c38f96b6894e8c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-01 14:54:51 +00:00
Tobias Hunger
7c4d993640 ProjectExplorer: Avoid possible nullptr dereference
Change-Id: I1c82c4187e075055a44746879df1513e48853c22
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-01 14:50:54 +00:00
Tobias Hunger
afa226ea23 Qmake: Initialize members of LastKit
Change-Id: I7effa619403df78acd34cab3d41a9913a1e4aea1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-01 14:50:30 +00:00
Tobias Hunger
9c26041b63 QmlDebug: Simplify messageclient
Change-Id: I6a5fbecc5c4cbdaff82ec671ad8667d6b187ee9e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-01 14:50:18 +00:00
Eike Ziller
36b443dfba Add defines for relative data paths
Derive the relative paths used in code from the paths used by the build
system.

Change-Id: I208ee55d3c1ee76921734f5c1c6c40d3fcb9724c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-12-01 14:24:53 +00:00
Alessandro Portale
b3a9031b9f WinRT: Windows RT device icons
Change-Id: I6dfe99273b4c168bbaf4ec1bd647b42a6573949a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-12-01 12:21:58 +00:00
Eike Ziller
c269cc1c6d Revert "Revert "Revert "Algorithms: Simplify Utils::transform implementation"""
This reverts commit defb18aef4.
This reverts commit 602f8e72be.

The refactoring of transform does not compile with
MSVC2015 Update 2. Retry when we can upgrade to update 3.

Change-Id: I8bfd6ad12c71759af4840c2615d9a8f2390fd4bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-01 11:36:12 +00:00
Eike Ziller
c9208db68d Advanced Find: Check regular expressions for validity
If regular expression flag is enabled, check the search term for a valid
expression and disable searching in case it is not.

Uses QRegularExpression (Perl-compatible) which is used by all the
existing searches.

Task-number: QTCREATORBUG-14928
Change-Id: I37d536d8d0ac190de486790aca87616e9b320eb1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-12-01 10:44:22 +00:00
David Schulz
54a363b36c Debugger: Move symbolgroup indices after expanding
Change-Id: I0c2078b5c780a8f8f018e72c27575825c076cdd3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-01 10:16:29 +00:00
Marco Bubke
b888520598 Utils: Reserve in smallstring was flaky
We have to copy the content of SmallString before we instantiate a new
constructor in the same memory. So the content to which data() is pointing
can be already invalid.

Change-Id: I3a0ab4f9ac0c1219c2bd75fc4412eaf56209ca64
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-30 15:32:48 +00:00
Alessandro Portale
ba30a5654d ProjectExplorer: Remove IDevice::[set]Icon
It turned out that IDeviceFactory::iconForId is a better solution which
supercedes the IDevice specific icon.

Change-Id: I82cd7aefc97e515849d00f59b87a8ba34082d0a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-30 14:33:21 +00:00
Tobias Hunger
49e255c4d5 CMake: Check result of file open
Change-Id: Ia4a11359f7cb08ee3fa55c77dc54d42890f37845
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-30 14:24:55 +00:00
Tobias Hunger
2d8d90bc79 CMake: Cache buildtargets in builddirmanager
No need to have the builddirreaders to so.

Change-Id: Ia7e38f6483b29d6a4f4b65baacc17bf184a3cb34
Task-number: QTCREATORBUG-17359
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-30 14:23:36 +00:00
Tobias Hunger
c9be75fe65 CMake: Handle executables properly in server-mode
Change-Id: Idabfc2449377d0d81cc1639ad4992d8710ec8b7d
Task-number: QTCREATORBUG-17359
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-30 14:23:28 +00:00
Tobias Hunger
c54fe23579 CMake: Send compact JSON output to cmake server
Change-Id: I0e02f122bdb2b1b417a70aa4933cc4246d6969c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-30 14:23:16 +00:00
Eike Ziller
e487b3bd55 Merge remote-tracking branch 'origin/4.2'
Change-Id: I575f1cf98f2a4740577cdd94da21687d3392cdb7
2016-11-30 15:09:11 +01:00
hjk
ac2ceb36d7 Debugger: Split related settings
GDB's 'target extended-remote' and 'set detach-on-fork' are related,
but neither the same nor orthogonal. Better use two bools.

Task-number: QTCREATORBUG-17264
Task-number: QTCREATORBUG-16978
Change-Id: I50dfcdf8f69fadcc6dff2dcf632e4bdfe28a28bf
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-11-30 13:56:46 +00:00
Alessandro Portale
a00ee753fe ProjectExplorer: Introduce IDeviceFactory::iconForId()
This adds the possibility to have an icon for a device type. Now,
a Kit can have a proper icon if just the device type but not device
is selected.

Change-Id: I2a382ffd5b46cbbf74cdd0b934b3d450d300bfff
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-30 13:55:38 +00:00
Tobias Hunger
2584366f6e Todo: Simplify code
Qt::ForgroundRole and Qt::TextColorRole are aliases for the same thing

Change-Id: I5d5e9ad562a7308988ba3bc402ef8b81872825b8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-30 13:39:49 +00:00
Tobias Hunger
b88e7ff6ae Core: Override icon method of QFileIconProvider
Change-Id: Id622ec37351394ba6fc7d5bf9c3464f3da9c21a6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-30 13:39:35 +00:00
Tobias Hunger
16bb89fee9 Qmake: Remove useless nullptr check
Change-Id: I6fe9ca620d6bac9e3cab44fb90623fa984229416
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-30 13:39:21 +00:00
hjk
f85c6efcd1 Debugger: Consolidate watcher insertion code paths
All were targeting the same running engine, doing the same thing.

Change-Id: If1186f6467cde6b44a051ea5845d4528917ca8f9
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-30 12:55:29 +00:00