Commit Graph

54723 Commits

Author SHA1 Message Date
David Schulz
c2686fd9ae TextEditor: Fix annotation rectangle caching
The rectangle of an annotation is cached after it was painted. If just a
part of an editor was updated all annotations were removed but only
redrawn annotations were added to the cache again.

This behavior is replaced by removing annotations that are not visible
and those which got redrawn. So annotations that are still visible but
were not redrawn are kept in the cache.

Change-Id: I9246f1347b8f795284fb4fc9aabe11f251d16c25
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-09 12:31:33 +00:00
David Schulz
26d0b536ca TextEditor: cleanup annotation rect cache after mark is removed
Change-Id: I8a0ab2df9d310da6025325ab3114eeadabfd4fb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-09 12:31:24 +00:00
David Schulz
5fb310828e TextEditor: reduce annotation painting artifacts
Request an update covering the complete annotation
rectangle if it is not part of the event rectangle
and Correctly calculate the position for the gradients.

Task-number: QTCREATORBUG-18855
Change-Id: I68b61459e6fd94949baebba25f965226f9d5e441
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-09 12:10:44 +00:00
David Schulz
cf624f92bd TextEditor: Optimize line annotation painting
Paint an annotation only if the event rectangle
contains the block for that specific annotation

Change-Id: I5f992f916da25268dd2c9e6b4703701934c8551d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-09 12:10:20 +00:00
Eike Ziller
07bec99e8f Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: Iaad0659293681cce4266fc3e4ba2a4f2068de911
2017-10-09 12:09:27 +02:00
Alessandro Portale
86ff493b99 ProjectExplorer: Reduce the size of the device status indicator a bit
Less In-Your-Face.

Change-Id: I4beb93e1db5f9fd7776fd07e49d7dc6f210468c1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-10-09 08:58:23 +00:00
David Schulz
efb67d277e CMake: fix qbs build
Change-Id: I91295b054b1603aa8daca297c6a29c0ac7f134d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-09 05:50:18 +00:00
Andre Hartmann
b1701ae933 TODO: Remove Latin1String
Change-Id: I2765abdafe508ad2d025f6c9b7b3374a6f1c79b5
Reviewed-by: hjk <hjk@qt.io>
2017-10-06 14:22:15 +00:00
Christian Stenger
508913e6b9 AutoTest: Fix compile with clang
Change-Id: I7657e0e823ae4c826efc987e2f414a51af3f1305
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-06 12:14:57 +00:00
Eike Ziller
c13e5bf21a Add changes file for 4.5
Change-Id: Ib30122c6fc5b14226a1560bc1e31e99f6930266c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-10-06 11:41:39 +00:00
Christian Kandeler
676d69b524 Fix qbs build
Change-Id: Icb2a8bcf4c6f60f02cdbe1cb509e871ce70165f6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-10-06 11:24:50 +00:00
Orgad Shaneh
3d5b077d86 QtSupport: Filter . and .. in paths lookup
Change-Id: Ibb5718fedeaf1dcc45d51dd5da42bf0043cbb485
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-06 10:58:47 +00:00
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
Ulf Hermann
dcb8681cb7 Wizards: Accept asynchronous root components for qtquickapplication
There are a number of reasons why the root component of a QtQuick
application may be loaded asynchronously. It might, for example, be
derived from a component loaded over the network.

In that case, checking that there is a root object right after calling
load() is misleading. The object is only created later. Therefore, we
need to listen for the objectCreated signal to decide if the root
component was correctly created.

As calling qApp->exit(-1) does nothing while the event loop isn't
running, we always connect the check with Qt::QueuedConnection.

Change-Id: Ie2814894b79bb3e467c5a838c7ec419291fcf591
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-10-06 10:37:55 +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
Andre Hartmann
82b22a552f QMake: Fix build with b884f6fdbc and BUILD_TESTS enabled
qchar.h: In member function ‘QMakeEvaluator::VisitReturn
    QMakeEvaluator::evaluateBuiltinConditional(
        int, const ProKey&, const ProStringList&)’:
qchar.h:562:5: error: ‘QChar::QChar(char)’ is private
     QChar(char c) Q_DECL_NOTHROW;

Change-Id: Idd25b20ecf68a2e801b73e916a5359ff3fc7a86f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-05 12:47:05 +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
Andre Hartmann
0fb6a1479f CamelHump: Extend tests
The else part within "if (!c.isLetter())"
(camelhumpmatcher.cpp:79) was not covered
by the tests at all, so far.

Change-Id: I35eb5908110e4692cda41b58f419867da00b6501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-05 09:25:59 +00:00
Andre Hartmann
7d35e08afe CamelHump: Leave the gauls alone (fix typo)
Change-Id: Idf2080fc4ba2ae64c7bc0d1ce7dc9c81c0c8585e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-05 09:25:28 +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