Commit Graph

44349 Commits

Author SHA1 Message Date
Joerg Bornemann
7aaaade138 QbsProjectManager: Add missing emit keywords
Found by clazy.

Change-Id: I55126cc2f6d19ea9f713f4c83cbf02e48d5ddf8e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-19 14:22:44 +00:00
hjk
597488bef4 Debugger: Move some code around
Parts of the Debugger engine rampdown mechanisms are
essentially one code path now, don't distribute that
over four classes.

Change-Id: I4c6edbc0db94d1f658b0c1d9c154552f286db876
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-19 14:10:42 +00:00
Eike Ziller
5dfd48331f Json: Avoid using iterators from temporaries
Doing it can lead to unexpected behavior

Change-Id: If3f838cc5b5a381d7c33223adcf53051a43b7c3c
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-10-19 12:22:02 +00:00
Thomas Hartmann
558730ac24 QmlDesigner: Fix crash
Change-Id: Ife1a3760a4578b37f7942530ed698fad723fb784
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-19 12:07:51 +00:00
Eike Ziller
bb9663529b Merge remote-tracking branch 'origin/4.5'
Change-Id: Ie83666bd18e899dabf5190c360027bf02abecdaf
2017-10-19 13:01:12 +02:00
Filipe Azevedo
17f44b5a8f Don't run controls that get no produced workers
Change-Id: I9630620753f32934020d18266436472c869d9cd1
Reviewed-by: hjk <hjk@qt.io>
2017-10-19 09:40:28 +00:00
Eike Ziller
9b8169d42f Remove unused class BraceMatcher
Change-Id: I8caac292ab36a28ed7e3d73d0a90d06ea1e88b0d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-19 08:33:22 +00:00
hjk
3d11a27ad0 Debugger: Consolidate "Attach to running process"
Change-Id: I78e89a662140f37f5f9719dbbbff070f1e2fbe84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-19 08:31:33 +00:00
Christian Stenger
6a470f0a70 AutoTest: Do not overwrite already found build system targets
Especially when using CMake based projects in combination with GTest
we might have lots of build targets defined inside the same
'project file'. Overwriting the already assigned content is purely
wrong. Instead handle each found build system target on its own.

Task-number: QTCREATORBUG-17882
Task-number: QTCREATORBUG-18932
Change-Id: I3297a9e1da8ae4186fd4267e3485368b1a059314
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-19 08:25:47 +00:00
Nikolai Kosjar
7cbc7af022 Clang: Fix completion after qualification (::)
...and maybe other cases.

Since

    Clang: fix findStartOfName handling
    commit 82d0650b11

the proposal's base position was calculated wrong. As a result, an early
return triggert in CodeAssistantPrivate::displayProposal (call to
newProposal->hasItemsToPropose(prefix, reason)) and no completions were
displayed.

Fix by ensuring that the added code from the mentioned commit is only
called when needed, namely only for function expressions.

Task-number: QTCREATORBUG-19083
Change-Id: I8f23c9b7186f9d81159939c8b3ef475a09bbe760
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-19 07:43:21 +00:00
Leena Miettinen
2aed9f5c97 Debugger: Fix punctuation and capitalization of UI text
Change-Id: Ifbe95f063c00401f6ad777e95b0d0ee96c77969b
Reviewed-by: hjk <hjk@qt.io>
2017-10-19 07:23:03 +00:00
Tim Jenssen
7208ef1ff5 Qmljs: remove unused method
Change-Id: Id3bce005ed4c972d6cbb7f37cf609ff551c7066c
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-10-19 07:11:25 +00:00
Leena Miettinen
ebf2bb7304 Qt Quick Designer: Fix the capitalization of a message box title
Change-Id: I4c0e84373c0d9cc31106b77c190daa52a83b02db
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-19 07:04:19 +00:00
Eike Ziller
c4dfd88444 QmlProjectRunConfiguration: Use QFileInfo::exists
One less indirection

Change-Id: I4b4f8000c2493a676bc02cff87a475f1f185e569
Reviewed-by: hjk <hjk@qt.io>
2017-10-19 06:42:09 +00:00
Eike Ziller
f2ef88aada QmlDesigner: Avoid some unneeded QFileInfo constructions
Change-Id: I0289c3187f07e26d05a7ca591cc8b12b767c3502
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-19 06:38:41 +00:00
Leena Miettinen
c7c0bbf511 Plugins: Fix capitalization of Plugin Loader Messages dialog
Change-Id: I5f3c45559f867fdc3751ff893b87279fe6fab79c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 15:11:11 +00:00
Tobias Hunger
613519c3d5 QtSupport: Do not prepend QT_HOST_BINS to PATH
Do not unconditionally prepend QT_HOST_BINS to PATH as part of the Kit
setup.

Prepend this directory to PATH in the Qmake- and GenericBuildConfigurations
instead.

Task-number: QTCREATORBUG-18714
Change-Id: I1c1d1362105b82f9c369d989e90d4f7079c2c9a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:48:01 +00:00
Tobias Hunger
813212396b BuildConfiguration: Make method name clearer
Make it clear that emitEnvironmentChanged also updates the cache of the
current environment.

Change-Id: I012c5a2b3d7d4037ed609b26e053ce0ce36f6cec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:36:28 +00:00
Tobias Hunger
015bb14ed9 GccToolChain: Improve addCommandPathToEnvironment
Use logic more similar to
BuildConfiguration::prependCompilerPathToEnvironment

Change-Id: I24935cc354f136b19ec71afd6e8a4d795446db4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:35:26 +00:00
Tobias Hunger
10cb0b77a0 ProjectExplorer: Do not prepend compiler path to PATH everywhere!
Do not unconditionally prepend the (c++) compiler path to PATH for
all projects using GCC-derived toolchains.

Prepend the compiler path in the Qmake- and GenericBuildConfigurations
instead.

Also change the order: Apply buildconfiguration's addToEnvironment first,
only then apply the kit's addToEnvironment.

This does change a few things:
 * CMake and Qbs will now get the normal PATH
 * MSVC compilers will have their compiler path prepended to PATH
   by the effected BuildConfigurations. This should be harmless,
   since that happens before the environment setup script is appended.

Task-number: QTCREATORBUG-18714
Change-Id: I548182bc447d80d24f4de4ce7cf12ee1a753ed26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:35:07 +00:00
Tim Jenssen
668c87ffd9 QmlDesigner: reduce editor changed signals
- detaching the TextEditView already emits the TextEditor change signal
   -> so removing the call from QmlDesignerPlugin::deactivateAutoSynchronization()
 - in case the user closed explicit the editor we do not want to emit any
   signals anymore

Change-Id: Idb5c2cdde583f7d32f2a9ef5628d1b6d3fc7bb3f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-10-18 14:16:30 +00:00
Thomas Hartmann
b25d21f42e QmlDesigner: Load plugins early enough for views
This ensures the plugins are loaded early enough to install views.

Change-Id: Ie2dfaf510a8ab1cd924ed96cdc8efba454ffb29b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-18 14:11:54 +00:00
Thomas Hartmann
89dcc22d11 QmlDesigner: Add enablers for timeline
Change-Id: Id5a75aaeb7de329a72ca468c8299d4f798f60766
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-18 14:11:42 +00:00
Marco Bubke
0d3ee85c51 Sqlite: Cleanup error handling in sqlite statement
We mixed result code and error handling which is now separated.

Change-Id: Ibb9c5f0eb3b77c350eac67884d377ba1baaf76c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 13:13:37 +00:00
Marco Bubke
5e0b207a89 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: I7dfd4a02c5484683e4d0becd39269c0146126a96
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 13:13:29 +00:00
Christian Stenger
8fd3f55dbb PythonEditor: Ensure project file is listed first
Change-Id: I43377a97d4ef82e8ed3824a766ba86db086f4dc7
Reviewed-by: hjk <hjk@qt.io>
2017-10-18 12:46:33 +00:00
Christian Stenger
0a931c56a4 PythonEditor: Avoid creation of useless empty run config
Opening a python project created an empty 'Custom RunConfiguration'
the first time it had been opened.
Avoid this by re-ordering and simplifying the processing of the
project and its respective settings.

Change-Id: I0c0f71e0dab6f03df46e5ddbdc7e1dbf73e8bef8
Reviewed-by: hjk <hjk@qt.io>
2017-10-18 12:46:24 +00:00
Thomas Hartmann
172f25d97d QmlDesigner: Fix crash
We have to forward the event to GraphicsView in any case.

Task-number: QTCREATORBUG-19064
Change-Id: I50e7fc73dca4d8aa5deaf2be7bec5fb89778111d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 12:16:50 +00:00
Thomas Hartmann
bc9cea81e9 QmlDesigner: Fix navigator context menu
Depending on the context and focus we are disabling actions.
But we did not enable actions when setting the focus/context
back to e.g. the navigator. We "simulate" a selection change
to set the proper state of the actions.

Task-number: QTCREATORBUG-19110
Change-Id: Ie4eefb498956de22d33d72bd7189bacd3177912b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 08:56:03 +00:00
Thomas Hartmann
6c690f68cb QmlDesigner: Remove dependency on utils
The dependency is not required and
we do not set the rpath on Linux.

Change-Id: Ife1a8ae46f9087bd507d1f0abd465fec0bd31ca3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-18 08:19:33 +00:00
Ulf Hermann
e902980dde Treat .ui.qml mime type the same as .qml
Right now, the qmake project manager offers a "Build" context menu entry
for .ui.qml files and various other things are off because the mime
types are different.

Change-Id: Icc966e56513b9c5aed05f929dc8cb728ed408723
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-10-18 08:11:42 +00:00
Orgad Shaneh
371b2bbbab Merge remote-tracking branch 'origin/4.5' into master
Change-Id: Ibcdd1230b40d1ca7a414843ee0f9ae4cddb29f6f
2017-10-17 20:00:44 +03:00
Tobias Hunger
aa4e05f07b CMakeBuildSettingsWidget: Fix filtering in cmake configuration
This got broken with the introduction of the grouping.

Task-number: QTCREATORBUG-15814
Change-Id: Ic9908d01a1ecb636db0c8f4b7f1db926ccaedd4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-17 14:47:02 +00:00
Tobias Hunger
b49722c820 CMakeBuildSettingsWidget: Forward-declare ProgressIndicator
Change-Id: I3808e973671849c6014780ee99896cb2d139dc18
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-17 14:46:56 +00:00
Tobias Hunger
0a5f32ff75 CMake: Fix crashes when last target is removed from a project
Task-number: QTCREATORBUG-19112
Change-Id: I17893c3e15e9cabc09bf5ebb6746a5d76d9cc0bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-17 14:46:49 +00:00
hjk
87cd4495a9 Debugger: Pass interrupt request more directly to engines
De-virtualize requestInterruptInferior() and let always
the master engine react to the request. interruptInferior()
diverts to the active slave in case of the combined engine.

Change-Id: I5d62cf9379c8a452132827897a9ac51e4027f595
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 13:57:34 +00:00
Ivan Donchevskii
5c554c0de9 CppTools: add multiple refactoring engines support
Make model manager able to select the most functional
refactoring engine from the available ones.

Change-Id: I74031c910706fd694a0a7def022531501f1ea005
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-10-17 13:32:51 +00:00
Tobias Hunger
dfe23b210d Qnx: Code cosmetics
Change-Id: I8ac1ff2bbe2c16b080dcfced489c1c932dbd102a
Reviewed-by: hjk <hjk@qt.io>
2017-10-17 13:22:17 +00:00
hjk
f3b886c4c1 Debugger: Make some error message translatable
Change-Id: I4573c26df5d41d6fdab4ddeb1d70ee5d2bc10c11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-10-17 12:28:32 +00:00
Orgad Shaneh
e633b49cd0 Gerrit: Suppress updates while remotes are cleared
Change-Id: Iec13f7002816db54279507250a6b5050f41b45f2
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 11:54:58 +00:00
David Schulz
ae68aa5610 TextEditor: Update position of annotations outside event rectangle
Change-Id: Ie7d3db989b48a605fad4642c339940d67e505e1e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 11:48:39 +00:00
Christian Stenger
13717262a1 TextEditor: Fix determination of maximum width
Width is not zero-based.

Task-number: QTCREATORBUG-19091
Change-Id: I32134727bed204f6bb10748cd067a775f673b89b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-17 11:46:10 +00:00
hjk
4977c91544 Debugger: Directly pass from engine to inferior setup in all engines
This removes the setupSlaveInferior() synchronization point which
wasn't really needed anymore as it was always triggered in
response to a notifyEngineSetupOk() of the master engine.

Change-Id: I24faec36b180fa961e10dfd88fe4d874f7310140
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 11:20:09 +00:00
Andre Hartmann
6221746466 Qmake: Fix Build File (context) menu for non-source files
Enable Build File for source or header files only and
de-duplicate the corresponding code.

Before, the menus were incorrectly enabled for e.g. .pro
and .ui files also: While the menu was already hidden for
these  non-source files in updateContextActions(), the
following  call to updateBuildFileAction() did enable it
again.

Task-number: QTCREATORBUG-19098
Change-Id: I87f40e64ab044b33be9c465d1c5dfa36c3cf1260
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 10:25:30 +00:00
Eike Ziller
46a5133f4b TestFrameworkManager: Add missing static keyword
Change-Id: I22aced21a8c951c746c6617d20d95fd81f5cef63
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 10:01:28 +00:00
Ulf Hermann
eeb0358d65 Debugger: Re-add quotes to JS strings after editing
The quotes are stripped when the string is presented for editing, so
they have to be added back when we're done editing.

This is what we already did if we were talking to the inspector rather
than the V4 debugger.

In order for this to work, JS numbers need to be identified as numbers,
rather than strings. So, we have to add "number" to the types recognized
as float.

Change-Id: I2054f4ad36ec1d14fb2dfee3705a80c8ec84d5ac
Task-number: QTCREATORBUG-19032
Reviewed-by: hjk <hjk@qt.io>
2017-10-17 09:47:51 +00:00
Tim Jenssen
562fd0a040 ProjectExplorer: code sugar
Change-Id: Ia78fd000a4836fa54567bc57ef401eedb3dcc7b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 09:17:35 +00:00
Ulf Hermann
afbffb01fa QtSupport: Don't try to get Qt version if QtVersionManager isn't loaded
Otherwise we get a soft assert there.

Change-Id: I701672d1f479f2281c85fa1bc77fa2216b0b0d98
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 09:01:57 +00:00
Orgad Shaneh
2310ec5891 Gerrit: Support Private/Work-In-Progress push on Gerrit >= 2.15
A private change[1] is only visible to the uploader and reviewers (like
draft in older Gerrit).

A WIP change[2] does not generate notifications until it becomes ready.

[1] https://gerrit-review.googlesource.com/Documentation/intro-user.html#private-changes
[2] https://gerrit-review.googlesource.com/Documentation/user-upload.html#wip

Change-Id: I4905461c529e93e86be934c60eab218ff7474fcd
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 08:58:14 +00:00
hjk
34d7b26a88 ProjectExplorer: Shield against null project
.. in MiniProjectTargetSelector::addedDeployConfiguration. Similar
was already present in  MiniProjectTargetSelector::addedRunConfiguration

Change-Id: Ie1c86a8e12bdbfd5c0beea58a1a41a2cbf3d52f2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-17 08:56:22 +00:00