Commit Graph

44349 Commits

Author SHA1 Message Date
hjk
1ad6c9465c RemoteLinux: Make mode parameter in RemoteLinuxAnalyzeSupport optional
It's available through the runControl. Plan is to completely
remove when downstream users (B2Qt, GammaRay) have adapted.

Change-Id: Iab78513dfc99fa775dafae56ae8c1bfa5bcc3b03
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-06 09:22:01 +00:00
hjk
87b3ea9af4 ClassView: Make Internal::ParserPrivate::timer a real member
Two indirections suffice.

Change-Id: Ie6cb6a32e1482074266f450f8bba004468e5e1b0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-06 09:03:17 +00:00
hjk
8e56c5be3e Debugger: Simplify DebuggerRunControl construction
The indirection was to prevent "others" to create "wrong"
DebuggerRunControls, but this is getting into the way now when
making the DebuggerRunControls/DebuggerEngine a ToolRunner.

Change-Id: I6c45e28affebc6b8db16c5d4bbc77325ef63604f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-06 08:51:10 +00:00
hjk
2f664a375b TextEditor: Squash warning about unused parameter
Change-Id: I1bf321869b99ebc603486e896a4fcf3e4520420e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-06 08:04:00 +00:00
hjk
fa3d597e5f ProjectExplorer/RemoteLinux/Qnx: Use centralized access to device
ToolRunner have access to the RunControl, which have a device.
No need for another copy anymore.

Change-Id: I1b71cf2fad9ecbadba859b7963175c1b7057f94d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-06 07:57:40 +00:00
Lorenz Haas
4a102213b9 Sessions: Make manager usable again... for Linux
With the change that the activated signal switches to the current
session the manager becomes unusable e.g. in Linux/KDE with a single
click policy. This is because you can't select a session by mouse any
more in order to use one of the delete/rename/etc buttons.

Change-Id: I4e81ee21f37fba0b4f456e02e9ce2e9da14c5a88
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 16:21:47 +00:00
hjk
0410f4e0ba Debugger: Remove some useless assignments
That object is destructed soon, no data is ever read back.

Change-Id: Ida479c4dd934c6f45621b54adcfeda3f573a00bd
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-04-05 15:26:50 +00:00
Leena Miettinen
4a6d387cb7 SCXML editor: Fix UI text
... capitalization, punctualization, and grammar

Change-Id: I15205b899387e8a91529c3a6b6a2e81cf4315a4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-05 14:18:13 +00:00
Leena Miettinen
b25ae51163 Qt Quick Designer: Fix UI text capitalization
Change-Id: Idc9fc90fc63d3154ed893dab85c9806ece485825
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-05 14:02:03 +00:00
hjk
112e32228a ProjectExplorer: Merge AnalyzerRunControl into RunControl
The change is "conceptually wrong", the AnalyzerRunControl derived
classes' functionality should be provided by ToolRunners based classes
encapsulating/"being" the current Analyzer*Runner classes.

However, the AnalyzerRunControl is only three (empty even) virtual
functions, but a big obstacle in merging attempt due to a lot of
mechanical followup changes in downstream users.

The current construction mechanism of analyzer run controls is actually
two different mechanisms (locally direct RunControlFactories, and a
"generic" createAnalyzerRunControl wrapper for remote cases). The generic
createAnalyzerRunControl makes it difficult to migrated them one-by-one,
due to the various downstream users.

So instead of merging the per-analyzer two uses directly reduce
the "indirection" distance by removing the AnalyzerRunControl
intermediate layer. After that the createAnalyzerRunControl mechanism
can be dissolved by using normal RunControlFactories also for
the remote cases. After that, porting to ToolRunner, and combining
with ther local equivalent can be done one by one.

Change-Id: I0ddace33fcce210cf3a547ac5bb23b3d85013934
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:47:53 +00:00
Orgad Shaneh
e58c4ead93 QmakePM: Use a single constant for async update interval
Change-Id: Ifc8f466c615d90095cba0908ba40c43d74f7e053
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:45:23 +00:00
hjk
8d1f4834b6 ProjectExplorer: Don't rebuild all projects' tree when one is closed
Removes some quadratic-in-number-of-projects behavior on session
close/switch.

Change-Id: If93bb9a67b0bebddda5319a7594a99ae66f50f5a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:44:27 +00:00
hjk
2a6237705c TreeModel/Find: Save a few cycles when searching
Calls parent() only ~two out of three times and remove some
function calls in the TreeModel::parent() implementation,
reducing the overall footprint of this bit from ~5 to ~1.5%
when searching something in the project tree (test case
was Creator-in-Creator, and searching for 'dddddddddd',
resulting in 8 complete scans of the tree.

Task-number: QTCREATORBUG-17956
Change-Id: I4e46ef0467dd2aea58a7c944e1a2ee5c01e6fbba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:25:12 +00:00
Leena Miettinen
778d711393 Project explorer: Fix UI text capitalization
Change-Id: I59c391b1d910ad74e30592217451a956463bd804
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:23:12 +00:00
hjk
bd5e2faa75 ProjectNodes: Handle supported actions one-by-one
Getting the full list for a node can get quite expensive e.g. in
cases of recursive calls of QMakeProjectManager::findPriFile.

However, the FlatModel needs to decide quickly on whether an item
is editable to potentially allow renaming.

So split up QList<Actions> supportedActions() into individual
bool supportsAction(action) calls and make sure Rename is not
on the critical path.

Task-number: QTCREATORBUG-17953
Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 12:47:03 +00:00
Leena Miettinen
8410c0bbad CMake: Fix UI text capitalization
Change-Id: I590343937f8fbe0df2c664e0e7e4c2ce353c1897
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 12:31:04 +00:00
Leena Miettinen
c749ec507c Nim: Fix product name capitalization and writing style in UI text
Change-Id: I277c10f87e9645a09bd7a6910fb9d5182417c9c9
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 12:26:49 +00:00
Leena Miettinen
71f2181ffb Debugger: Fix UI text capitalization
Change-Id: Iccd08dae2ef2a86c0d0d5fb5d572b24664c40431
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 12:26:03 +00:00
Robert Loehning
ad92439930 qmljs/qmljsdescribevalue: Remove pointless check
Change-Id: I4b932550ccaebd8b02d52da2b00c158011cbc4bf
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Christian Kamm <mail@ckamm.de>
2017-04-05 09:36:07 +00:00
Tim Jenssen
e4a6f62001 QmlJSEditor: remove unused method
Change-Id: Idab6b104a9e057afde3bcc3059f00592deacfed7
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-04-05 08:37:19 +00:00
Orgad Shaneh
b66baab4b7 Debugger: Run user commands as native commands
Change-Id: I2b13880eace49818c20815a21c3e327f87ec04bc
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 05:49:10 +00:00
Thiago Macieira
b34dc8fdb2 Cast enum to the an integer type before streaming out to QDataStream
We stream in as int or as qint32, so this is symmetric.

Change-Id: Ic46ff326a6ba46bc877cfffd148325c21241f3b1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 05:13:43 +00:00
Orgad Shaneh
1af52db32e Git: Replace lambdas with std::bind
Reduces release build from by ~5K (255->250), and slightly shorter.

Change-Id: I326297b08374fe34cdd2dd05db3b978ae7775e06
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 19:02:24 +00:00
Orgad Shaneh
1bc2610b0b GDB: Fix break on main for console applications on Windows
It relies on the user setting (which has a correct default, but can be
changed), but that's better than nothing.

Change-Id: Ib74b348a8932b3522074f122cf939fcb20ccefb8
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 14:36:44 +00:00
Orgad Shaneh
8a4b0aeabf Debugger: Fix crash on shutdown
If the application fails to start (like an empty exe file), the debugger
remains in "active" state, and it crashes on shutdown.

Change-Id: I6ae3a98d507856ea40375edb15c9ea4605e3efc6
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 14:30:06 +00:00
Orgad Shaneh
43cc499409 Debugger: Terminate gracefully when the debuggee is invalid
To reproduce, try to debug an empty exe file as a terminal app on
Windows.

Change-Id: Ie47848be04b8f7d4a8dae485d938a71febfed1ab
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 14:26:42 +00:00
Joerg Bornemann
ead66987d4 Update qbs submodule
To HEAD of 1.8 branch, and adapt to changes of qbs's doc_targets.pri

Change-Id: I8027b02bd88691ce6460836d9cc67279f442058b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-04 13:57:14 +00:00
Tobias Hunger
cfda627abc Qmake: Fix workdirectory for qmake projects
The rootProjectNode was not set when the desktopqmakerunconfiguration tried
to use it to figure out the default work directory. Move this code over to
using rootProFile() instead of rootProjectNode(), which is the right thing
to do: rootProFile() is the tree of objects used to parse the qmake project
now.

Task-number: QTCREATORBUG-17728
Change-Id: I76167ba2bbd395d58af7d3bfd50f33c4e37338db
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 13:27:43 +00:00
Tobias Hunger
8b956868bb CMake: Register a feature for CMake-capable kits
This in theory enables to fix QTCREATORBUG-16204, but for that the wizard needs logic to adapt
the required features for the listed kits. That is still missing.

Task-number: QTCREATORBUG-16204
Change-Id: Ia01c11bb8c8567a9fc65b06912d6836b70a0195c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-04 13:27:30 +00:00
Christian Stenger
f28e6dd029 CPaster: Fix fetching list of pastebin.ca
Page now uses websockets internally that updates respective
content asynchronously. Initial GET of the page only fetches
an empty list - work around by using a pre-constructed json
array that is contained within the initial content.

Change-Id: Id8619450ecc758057fce23079e7eed6de8abe5dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-04 12:36:47 +00:00
Thomas Hartmann
49e7f07526 QmlDesigner: Fix crash
I found the crash when opening:
qtquickcontrols2\examples\quickcontrols2\contactlist\ContactForm.ui.qml.
The crash was triggered by the root item being a layout.

Change-Id: Id95aee6c76fbe1102578fb5a297b155645ebb157
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-04 12:31:16 +00:00
Robert Loehning
60e3030082 Valgrind: Check function early to avoid nullptr deref
Change-Id: I19da2e8f9dd3f6d7af0d412e07a257ba33ecb680
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 09:06:47 +00:00
Robert Loehning
a49df50443 qmljs: Prevent possible nullptr access
Change-Id: Ice4a2dd102ed4afda351dc7d011752120d3952b5
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Christian Kamm <mail@ckamm.de>
2017-04-04 08:57:51 +00:00
Thomas Hartmann
180653128f QmlDesigner: Reset error messages wehen restarting puppet
We store generic error messages in the root node.
Those have to be reset.
Also we have to reset the type icon if there is no error anymore.

Change-Id: Ibe6274f651113f26aef6240bb9efa005862378f4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-04 07:39:15 +00:00
Alessandro Portale
f23e454370 ProjectExplorer: Small welcome page improvement
Use the complete height of the (unexpanded) session label for the click-
to-open region. Also, give some magic numbers a name.

Change-Id: Ie972d669cca943105cdd2e7e99394b61ca0a6e37
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-04-03 14:06:12 +00:00
Christian Kandeler
f1b50837e4 Update qbs submodule
To HEAD of 1.8 branch. This update is needed to be able to build
Creator from Creator again.

Change-Id: I0d9840e98ee347b7c3233d59fd3a7ac0daeaab24
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-03 12:58:50 +00:00
Thomas Hartmann
5ee452aa9f QmlDesigner: Ensure proper current text editor in edit mode
When changing back to the edit mode we have to set the
edit modes text editor as the current editor.

Change-Id: I0bf7edbdf66285443402e2196f8ba655661e6dc4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-03 12:52:36 +00:00
Thomas Hartmann
081bbc440e QmlDesigner: Handle missing type information
We always had the problem that the design mode might become
active while type information is still being loaded.
This causes an error message and the user had to trigger
a reload of the QML document.
Due to changes in the project management Qt Creator
starts reading the type information, once the first QML file
is opened.
This triggers the error far more frequently.

This patch fixes the issue by triggering a reaload after 1s,
if type information has not been read completely.
This fixes the issue.

Change-Id: I23ad011294044690fd582e808227c3ccde8bda54
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-03 12:52:27 +00:00
Tim Jenssen
7e6d88ed49 QmlJSEditor: add some overrides to QmlJSOutlineWidget
Change-Id: I6053900493728433a5631f5aa6f1e3e967e270e9
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-04-03 12:28:58 +00:00
Tim Jenssen
99f2fc9b45 QmlJSEditor: use direct member initialization
Change-Id: I03aada10107a9d80d920d18c92df7ec36e6a22d4
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-04-03 12:28:49 +00:00
Tim Jenssen
cff6a97a9b QmlJSEditor: add missing class forward
Change-Id: Ic2f7c8e9366f86f6f768cc21a060112f25c31278
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-04-03 12:28:41 +00:00
Thomas Hartmann
6f1d23711d QmlDesigner: Keep background color in integrated text editor
Applying a .css style overrides the text editor background color
from the theme.
To avoid this we cannot apply any .css on the integrated text editor or
its parents:

 * Only apply the center widget .css to the tab bar.
 * Apply the scrollbar.css only to the scrollbars.

Change-Id: Id9b009a208ea2830c64be8174dbb548ada692560
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-03 12:23:02 +00:00
Orgad Shaneh
ed8fdec74f MSVCParser: De-noise
* Use namespace Utils
* Remove Q[Latin1]{String,Char} explicit conversions
* Fix indentation

Change-Id: I045ebb8b8d6893398b3c86009693bf18169a56ab
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-03 11:56:30 +00:00
Orgad Shaneh
6ffabeec07 MSVCParser: Support "note" lines
main.cpp(7): error C2733: 'func': second C linkage of overloaded function not allowed
main.cpp(6): note: see declaration of 'func'

Change-Id: I46bbc86add628e7eadd5930ddf2fe9518b9e7adf
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-03 11:56:05 +00:00
Orgad Shaneh
7fce93d7a7 MSVCParser: Minor cleanup
Change-Id: Ieae5f68eb6c881d71570bfe5d5670fc4085ac575
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-03 11:42:53 +00:00
Orgad Shaneh
0ceb734b5b ProjectExplorer: Fix crash when deleting 2 files
Task-number: QTCREATORBUG-17961
Change-Id: I167d75ef5ab4e64c518913887d0aeb2fba6c0d65
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-03 11:37:10 +00:00
Tobias Hunger
a3be2c08ee CMake: Fix clean target
Always list a "all" and "clean" targets and remove the similar code
in the tealeaf reader.

This fixes the clean-step falling back to "all" in server-mode.

Task-number: QTCREATORBUG-17138
Change-Id: I1ce84f03c2e9829e4bb5f550c10cdef772fabf5b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-03 11:21:47 +00:00
Ulf Hermann
5605337f6a QmlProfiler: Improve robustness of flamegraph view test
If the context menu disappears for whatever reason, just open a new one.
Making sure that the context menu stays around when we don't do anything
is not Qt Creator's job, so we don't have to test for it. Also, when
trying to remove the context menu, click a spot that's certainly inside
the screen.

Change-Id: If6e574d84bedf2ab552c8c29d756501e9d2282bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-03 08:49:19 +00:00
Orgad Shaneh
aa80b23f99 ProjectExplorer: Replace hard assertions with soft ones
Task-number: QTCREATORBUG-17961
Change-Id: I8f0aa0382b21ea7923cb1d4396833b33b226a247
Reviewed-by: hjk <hjk@qt.io>
2017-04-03 07:23:37 +00:00
Orgad Shaneh
173cb9f20e QbsPM: Fix size_t -> int conversion MSVC warning (64bit)
Change-Id: Ib1f79c2e0e203c5cc6cfaadac0b3ae1ee09d88b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-02 05:08:16 +00:00