Commit Graph

44349 Commits

Author SHA1 Message Date
Tim Jenssen
429163ea1e Qmljs: fix a crash when m_treeview is deleted
Change-Id: I3743815c14151b49784a20cdb0c0bba2fbde4e7b
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-11 12:30:07 +00:00
hjk
e9718b253a Debugger: Partially dissolve DebuggerRunControlFactory
Aspect creation must stay for now as the object pool is the only
central registry for it right now.

Change-Id: Ibe42009db6b0351aaa36e9ac8f0f6f7a0562167e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-11 11:10:44 +00:00
hjk
6f0a600bcf Debugger: Streamline error string handling
Let the workers keep track of errors instead of passing around
string pointers in some but not all interesting places.

Change-Id: I3956bc947a50747dd3a0c9302b9f9873d192e9c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-11 10:53:00 +00:00
Tobias Hunger
53c85a2676 Project: Use more std::unique_ptr
Change-Id: I06114e79b0a5b58b3dc4d13279232392709e9efc
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-11 09:54:18 +00:00
Jake Petroules
091ae3db31 Remove the last usage of deprecated Carbon APIs from Qt Creator
Change-Id: I05c8345e5f1618e7ecbb8a9c27feb5b9a321dc11
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 16:49:11 +00:00
Christian Kandeler
3b956976d7 QbsProjectManager: Fix qbs build against installed qbs
Change-Id: Icfe86b98ab8162fe613dbf089fec1692c5d3dbea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-10 14:14:14 +00:00
Ivan Donchevskii
287ae7ae61 Completion: improve complete in the middle
Apply clang fix to the old code model
Do not replace the text after cursor if
the proposal does not contain it or
if proposal matches 100% the text after it

Task-number: QTCREATORBUG-18471
Change-Id: I662cb6e48a9e0ee14065594f5c823f114fff2474
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-10 13:52:18 +00:00
Nikolai Kosjar
e1de989e16 Clang: Show inline diagnostics only for project files
When navigating to headers that are not part of the project, avoid
showing the inline diagnostics. In most cases, these files can't be
changed.

This helps also for the session-load case where files are opened/parsed
when no project information is available yet.

Change-Id: I7fce24af78b3b1efbf64dd27d8ca2a053e02d4ec
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 12:32:07 +00:00
David Schulz
4b787386ae Debugger: Fix detection of the latest cdb in qbs builds
Change-Id: Idd0115937c6db36f64087f49c116339f291bfcd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-10 11:09:28 +00:00
Eike Ziller
c363c1d4ee Add locator input widget to help windows
And move the "Show Sidebar" button into the status bar that we
need now anyhow.

Change-Id: I24bfa0991cbdcdba4d1a8cd6cbacde28d459972d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 09:58:02 +00:00
hjk
acc86aee5a ProjectExplorer: Move re-runnable decision to RunWorkers
A RunControl is re-runnable if all its workers are,
a RunWorker is re-runnable if it's Stopped and unless it
says otherwise.

Also ensure SimpleTargetRunner only reportStop() once
per run and make process error message re-usable.

Change-Id: I73f5fb724d3026ceb81d5e32a3a71b4814b2bca9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-10 09:02:17 +00:00
Tobias Hunger
19c9194b11 VcsManager: Register IVersionControls with VcsManager
Get some more objects out of the pool.

Change-Id: Id93021b712307c4777dc39b9d15aa18a46318885
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 08:44:47 +00:00
Vikas Pachdha
34dad7e3a3 iOS: Enable sorting for simulator listing
Task-number: QTCREATORBUG-18512
Change-Id: I4713165f131894bd9b881d8de25ff1e8a1a39e51
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 08:44:25 +00:00
Tim Jenssen
9a4394fa2d VcsManager: Simplify caching
Use value types in the cache and remove the code used to manage the
pointers.

Change-Id: I3babc69d571de161e161037da7cd731f70d0695d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-10 08:38:36 +00:00
Orgad Shaneh
a78fd02574 Debugger: Do no warn when debugging with MinGW
Change-Id: Iee9cc2232c002ea960f05848df02ac0658017911
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 08:22:18 +00:00
Tobias Hunger
74c1ebdcaa VcsManager: Simplify usage of clearVersionControlCache
Change-Id: Iaf2f65da31a33979c30e63c29a706a568cc5fd1c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 08:21:42 +00:00
David Schulz
671e3eba3d TextEditor: Use a constant offset for the annotations
Do not check whether a refactoring marker is visible, but always provide
enough space to display one.

Change-Id: I3f9dbb973b9067bd8177773d6fc878b47427232e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-10 08:19:27 +00:00
Jarek Kobus
323bee675a DiffEditor: make some public methods private
Change-Id: Idb7a506e81001fda79eff72c0c23b9945103cad0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-10 08:19:05 +00:00
Eike Ziller
3158981e9d Merge remote-tracking branch 'origin/4.4'
Conflicts:
	qtcreator.pri

Change-Id: Ibb67815f6bb33a4c5ddc33b71f9c436624685e11
2017-07-10 09:59:56 +02:00
Alessandro Portale
e2ad4c282d TextEditor: Simplify the overlay selection path
The algorithm that creates the overlay selection path adds many
redundant curve elements. That is quite ineffecient when painting and it
also creates visual gaps.

This patch simplifies the path and therefore substantially reduces the
elements and removes the gaps.

Task-number: QTCREATORBUG-18518
Change-Id: If3558e226825426ca6b143eeba4239e6f0061df0
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 07:59:07 +00:00
Eike Ziller
345ea0307c Merge remote-tracking branch 'origin/4.3' into 4.4
Conflicts:
	qtcreator.qbs

Change-Id: Ic5e268326d93172208de291d31a716e437b9cedf
2017-07-10 09:54:52 +02:00
Orgad Shaneh
491ab37b1f Beautifier: Show version in command tooltips
Change-Id: I897ac7ed45ff50a7dfd7c1c7c5abd8ad417f84af
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 07:44:06 +00:00
Orgad Shaneh
e49ccd0747 Beautifier: Minor cleanup
* Use initializer list and Utils::transform
* Remove unneeded override

Change-Id: I36ff9b9900fa6169ed1529bbbbdba13075353332
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-10 07:42:31 +00:00
Eike Ziller
6b0d9f7047 Locator: Fix data processing from multiple filters
The tree view uses a connection to rowsInserted internally for updating
the view, so we may only remove our specific connection to updateSize.
Otherwise the view stops showing items after the first rowsInserted.

Task-number: QTCREATORBUG-18522
Change-Id: Ib80fa39ee5556221a447db3556495a3608e3f62b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-10 07:37:07 +00:00
Orgad Shaneh
af98652215 Debugger: Fix core dump with project from command-line
Change-Id: I223dc3c00aa7d4b2cda743a9292272387177ed93
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 07:36:25 +00:00
Orgad Shaneh
4832f75d53 Debugger: Avoid soft assertions in register list values
Change-Id: Ia5444b935c964fd450bed67306dc10ed9d54e7c7
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 07:35:11 +00:00
Orgad Shaneh
267b0431e2 Debugger: Fix typo
Change-Id: I1ef2db7ce7546118d68925708dc2c1573653417c
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 07:23:52 +00:00
Eike Ziller
72e9afd8d0 Fix underline color in diff description when hovering
Since e.g. whitespace can have a different foreground color than
"normal" text, we have to explicitly set the color for the underline
when hovering. Use foreground color if there is no specific text color
set for "normal" text.

Change-Id: I9825d24af0d598b039a0db9ed86966605e22ac04
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-07-10 07:17:19 +00:00
Jake Petroules
4196534759 Fix the deployment target problem once and for all
Instead of hardcoding the value of LSMinimumSystemVersion in Info.plist
where we will always forget to update it (and since Qt Creator can be
built with multiple versions of Qt, it will almost certainly be wrong
for one of those versions), automatically determine the value from
QMAKE_MACOSX_DEPLOYMENT_TARGET, which is authoritative.

This should prevent mishaps where users try to run Qt Creator on older
OS versions and receive a crash dialog instead of the friendly "This
app requires a newer version of macOS" message that a properly set
LSMinimumSystemVersion value will induce.

The Qbs build is not affected by this problem, as Qbs automatically
handles the minimum deployment target even when a custom Info.plist is
specified.

The solution chosen in this patch was used instead of QMAKE_SUBSTITUTES
because the Qbs build also uses the Info.plist input file and it would
break the Qbs build if the quotes were to be escaped, since it would
become invalid XML.

Change-Id: I20625a2fae546c6597a567f28864b12917e8ac39
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 17:50:02 +00:00
Jake Petroules
b80d5c1c95 Qbs: fix bundle installation with Qbs 1.8
This patch also sets the minimumQbsVersion to 1.7 because that's the version
that is actually documented as being required in the README.

Change-Id: I862daaf5fa34ab2cc5db47581689e08aa34f0910
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-07-07 17:28:33 +00:00
hjk
e829ca8e31 FakeVim: Fix gt/gT/:tabnext/:tabprevious
The mapping was there, but not connected to the core actions.

Change-Id: I9faa1c47afe409caaa0462740a6865d99d959b44
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 15:31:18 +00:00
hjk
eb0aa0b76f Debugger: Connect GdbServerPortsGatherer signals in constructor
Not in start(), when it would add extra connections on each re-run.

Change-Id: I5fe9e047a188276f3bde54227dc0509ab77366c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-07 14:55:27 +00:00
hjk
9c738cea42 ProjectExplorer: Remove RunControl::notifyRemote* function
As promised in 112e32228. The temporary workaround can go now.

Change-Id: Ia98abfb21577ff073b069eaaf0edb5fb1227114d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-07 14:42:47 +00:00
hjk
8f1f333004 Debugger: Use a SimpleTargetLaucher for gdbserver
Makes remote output appear again in the Application Output pane,
and is arguably the right thing to do anyway.

Change-Id: I05c365eec43f60a85482b8ae7d5856b3a31ee6f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-07 14:36:39 +00:00
Eike Ziller
3188a5abb1 Fix style of whitespace in diff description
Task-number: QTCREATORBUG-9445
Change-Id: I1c60181b7e15c66b88cc1d5ec7584951d3aa46a0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-07-07 13:27:37 +00:00
Orgad Shaneh
c04569a04d FancyMainWindow: Disregard accelerators when sorting docks
Change-Id: Ib21a62152008a0b428f93a58d32685e2c0b0dc3b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-07 12:32:04 +00:00
Orgad Shaneh
c841dc551c Introduce and use Utils::stripAccelerator
Change-Id: I8c37728ca5de20e2b68e6d0ac7fc120baa696040
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-07 12:17:40 +00:00
Kai Koehne
510a00ea35 Hide "?" button in plugins dialog
Change-Id: Icdfe9a58a0b0c0d5773c2c5a0d433ea903e66138
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-07 11:14:06 +00:00
hjk
8376afd9d7 ProjectExplorer: Remove RunControl::worker<Type>()
It looks like the case where workers need talk to each other by
only knowing the type of the 'partner' does not exist in practice
anymore. With the now-common setup of a 'primary' worker that one
can introduce the 'lesser' workers to each other directly.

That's also conceptually more robust that picking a partner by
type only only from some 'pool' (all the workers in a runcontrol),
scales better (it e.g. is imaginable that a RunControl needs
more than one PortGatherer in complex setups where more than one
device is involved) saves a few cycles, and even removes the need
for workers to be qobject_cast-able.

Change-Id: Ib3d8c942c893d6c198d9813cce7df28ba3260ce8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 10:56:25 +00:00
Christian Kandeler
8f57264742 Update qbs submodule
To HEAD of 1.9 branch.

Change-Id: I9318013728c25e18f2dbf60aa408e0fe75b095d2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-07 08:35:53 +00:00
Orgad Shaneh
2dc906961e RunConfig: Do not log debug messages to output pane
Looks like this was done for debugging, but the user is not supposed to be
aware of internal implementation.

Change-Id: If24a2b0f85a04c2e88c5ef5fd66d34a606d46712
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-07 08:21:31 +00:00
hjk
f82bb1ec3a ProjectExplorer: Remove Connection as concept
It turns out that one "Connection" per RunControl doesn't map
well to the uses we have. Instead, RunWorkers need to know
individually how to connect to the place where they can work,
but they are already specific enough to be able to use a
standard class (like QUrl) as their way to specify the needed
entry point.

In theory one could see a RunControl's connection as an
aggregation of its workers connection bits, but that does
not really seem to be needed in code.

As consequence, replace UrlConnection by a plain QUrl, and also
the HostName connection by a QUrl with hostName set.

Change-Id: I40c97e37779314ac0a77041e864a18eadb78f987
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-07-07 06:23:52 +00:00
Orgad Shaneh
72775ab8c4 Debugger: Add missing state cases in quitDebugger
* Aborting a core dump debugging is a valid state
* Do not try to abort more than once (happens on shutdown)

Change-Id: I075409b3fa1231420fcd72706b18eaa0383fd4f2
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 06:16:20 +00:00
Eike Ziller
85da204e12 Fix mouse usage of locator popup on some systems
The logic to not hide the popup if it got active was lost in
e133ee8928

Change-Id: Ic3af147194f7ad18d510e827db1d5804e48e1f97
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-06 10:18:52 +00:00
Eike Ziller
fe7ec24982 Fix size of locator popup
The item delegate's sizeHint will only be correct after there are actual
items to show. So behave similar to uniformRowHeights by waiting for the
first data to arrive and then setting the size of the completion list
and the popup.

Task-number: QTCREATORBUG-18457
Change-Id: I7aa18988e07e21c2ec6587e83fb0de2dce6552ef
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-06 10:17:50 +00:00
Christian Stenger
7c6c808486 AutoTest: Fix condition for finish message
Slipped in with cc8bff67.

Change-Id: I02968395cf3ac5671326d874e5c58fef944225a9
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-06 10:04:50 +00:00
Marco Bubke
79ec3b3cdd Clang: Fix CodeCompletionsExtractor
Setting a unsigned int to -1 is really stupid.

Change-Id: I43cd1ca1d92eed4a57575f21858a6ce50bcc4fe0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-06 09:29:07 +00:00
Marco Bubke
608b157247 Clang: Disable lib tooling for unsupported versions
We do only support version 3.9 currently.

Change-Id: I3ecb2dbb56a2990e401ce6cf485f8e3a910fede6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-06 09:28:54 +00:00
Nikolai Kosjar
f51d7a2314 C++: Fix crash for invalid code
...due to indirect recursion:

  ...
  CPlusPlus::ClassOrNamespace::lookupType        LookupContext.cpp 833  0x7fffd6c954cc
  CPlusPlus::ClassOrNamespace::nestedType        LookupContext.cpp 1364 0x7fffd6c94bc6
  CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 955  0x7fffd6c9517f
  CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 983  0x7fffd6c952ad
  CPlusPlus::ClassOrNamespace::lookupType        LookupContext.cpp 833  0x7fffd6c954cc
  CPlusPlus::ClassOrNamespace::nestedType        LookupContext.cpp 1364 0x7fffd6c94bc6
  CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 955  0x7fffd6c9517f
  CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 983  0x7fffd6c952ad
  CPlusPlus::ClassOrNamespace::lookupType        LookupContext.cpp 833  0x7fffd6c954cc
  ...

ClassOrNamespace::lookupType(const Name *) already guards with a list of
entries already processed, but some calls deeper the list is not passed
on and lookupType() starts again with an empty list. Handle that case,
too.

Task-number: QTCREATORBUG-18499
Change-Id: Iab8978f6ac1d0aea16f49b3547415f43de887b07
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-07-06 09:18:39 +00:00
Thomas Hartmann
89e3262edf QmlDesigner: Support Qt Quick 2.9
Change-Id: I784584806819eb667cb596e1d46ffe9b393087fd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-06 08:43:53 +00:00