Commit Graph

50665 Commits

Author SHA1 Message Date
David Schulz
767d988891 Debugger: Cache reference to an unresolvables type as struct
This fixes throwing an uncaught exception if local variables contain
arrays or pointer to a type that can not be looked up.

Change-Id: If9407e5cf5d86bb89594266d4122a53dd65a80bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-27 13:19:13 +00:00
David Schulz
bb04bbe9d4 Debugger: Add dumper for Utf8String
Change-Id: I0f9411a246d121e22c8b65bf188598c427993726
Reviewed-by: hjk <hjk@qt.io>
2017-03-27 12:01:16 +00:00
hjk
173186c31d ProjectExplorer: Show something during parsing again
This partially reverts 5ac13620. Looks like "soon enough" is not
soon enough for non-trivial projects.

Change-Id: Ib0d317c36e78f1af12b6c1f2a2aab48922517e98
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-27 11:57:49 +00:00
Tobias Hunger
7da1e233eb ProjectExplorer: Add missing breaks to switch in Abi class
Change-Id: I6c855d221e7a4d81f7338bc119c7ecff815e7ea6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 11:54:09 +00:00
Tobias Hunger
3a20cec60a CMake: Break loop in error handling
Block access to the BuildDirManager while one of its errors is
processed. This prevents more errors being raised as part of
error handling, which can trigger a loop.

Task-number: QTCREATORBUG-17869
Change-Id: Ic6f8d9a3c3b4e63f27260c40f27ab09d20b62b3e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 11:53:43 +00:00
Tobias Hunger
17b89cd422 CMake: Speed up server-mode reader
This patch reduces the time to generate a project tree by 15% in
my test project.

Change-Id: Ie5956cdd2108873118654857dc299bdb0b6d3636
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 11:53:35 +00:00
Tobias Hunger
54be52a4fa ProjectNodes: Enable nested nodes outside of the top level node
Enable adding nested nodes not a child of the top level node.

Change-Id: Ia6bb4ed6e3e6649a98151c88133ff5ec7197573d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 11:53:29 +00:00
Ulf Hermann
2703d02db6 Timeline: Only search hovered events when !selectionLocked
Otherwise we are not going to do anything with the result. The
searching can be very expensive would happen whenever the mouse moves.
This also makes the q_ptr in TimelineRendererPrivate obsolete.

Change-Id: I582d0e85b63925f3f329e9a7463f2abee7947c5b
Task-number: QTCREATORBUG-14983
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-27 09:25:42 +00:00
hjk
54fa601e5f ProjectExplorer: Remove unused Project::displayName() signal
Only ever emitted by the cmake project and never consumed

Change-Id: I689120a2ac2c77896eed72da9bd0be194ac1af86
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-27 08:51:40 +00:00
Nikolai Kosjar
b26143561a Clang: Make diagnostic display adapt to size of the info bar
Change-Id: Ibc7431234b8a68c8e2b0c3f25387de96b203c4c5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-27 08:13:10 +00:00
BogDan Vatra
48c17a1e07 Update only old gradle distributionUrl
Task-number: QTCREATORBUG-17814
Task-number: QTCREATORBUG-17672
Change-Id: I658e8edec5c231a30ef4e99bae5d15cb6f6497f5
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-27 08:00:42 +00:00
David Schulz
c73bcd32a8 Debugger: Prepend additional info to cdb exception task entry
Most users expect build related entries in the Issues pane, so prepend
debugger related exception entries with a prefix making clear that these
entries are not build related.

Task-number: QTCREATORBUG-17806
Change-Id: I8a78c1eff3a4386f108997954329b694c223400f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-27 07:58:15 +00:00
Andre Hartmann
cf40d98dc9 QMake: Prettify file lists in generated project files
Having each source/header/form file on its own line
makes further moving around (e.g. sorting) much easier.

Also make sure there is a space between file name and
trailing backslash.

Change-Id: I54fccf7b6249c86034b8f41f58391ffcc63a0a27
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-26 20:38:19 +00:00
Orgad Shaneh
b30b4f8a11 Git: Fix inline nested branch rename
We can't just change the node name. A branch named foo/bar can be
renamed to baz/yyy. We have to refresh the model after rename.

Change-Id: Id9dfaa15b9e0384668223ae746376025267f89a3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:38:03 +00:00
Orgad Shaneh
5736ef2c54 Git: Improve detection of nested local branch
If the current branch was foo/bar it was not detected correctly.

Change-Id: Ic030a6f4659801c6da2716c272a418c89585e22f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:37:58 +00:00
Orgad Shaneh
07921dee77 Git: Expand branches also on internal model refresh
Change-Id: I91e3b875be1a2c3b5da9ae7720709b34a7d83232
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:37:53 +00:00
Orgad Shaneh
8478e35384 Git: Minor cleanup in BranchModel
* Use member initialization
* Use nullptr
* Remove unneeded local var

Change-Id: Ibca6c3bc5caf9e028166b833ba1ed9fc165e290b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:37:49 +00:00
hjk
ad8b797860 QmlDesigner: Add core-private dependencies
Seems to be needed explicitly at least on linux due to the use of
sharedmemory_unix.cpp.

Change-Id: I59e5b5c6dabbe05afa26c4367cce62286986b069
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-26 05:48:13 +00:00
Tobias Hunger
e8498acde0 ProjectNodes: Be less enthusiastic about compression opportunities
Do not compress foldernodes that differ on their type. This makes it
possible to use FolderNode::compress() in one more place in CMake.

Change-Id: I4721d5d12e3032ee70a1c3d9e87df49d59751f04
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 17:41:07 +00:00
Tobias Hunger
b302eb2d0f ProjectNodes: Avoid QFileInfo
Avoid creating an unnecessary QFileInfo object.

Change-Id: Ibd85ccdf948872c2505085aa04cc5525d25c4d29
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 17:40:58 +00:00
Cristian Adam
87f7725b5a Prevent compilation of the QmlDesigner if qtquick-private is not present
Checking for qtquick is not sufficient in some distributions that
install the development packages for the real thing but not *-private.

Change-Id: I5e6959f92b0da0a7a1b7770ed6e591a3ed1dae29
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 17:11:45 +00:00
Tobias Hunger
55a4a62797 CMake: Speed up server-mode
Use a QSet to avoid having to search in a QList.

Change-Id: I2261a83acd3924a8483495e1f03322c7574a78a8
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 15:55:10 +00:00
hjk
5a13a2b5b4 Prevent compilation of the QmlPuppet if qtquick-private is not present
Checking for qtquick is not sufficient in some distributions that
install the development packages for the real thing but not *-private.

Change-Id: I866539c54c845cecb37df8761f006046b28aec80
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-24 15:28:29 +00:00
Eike Ziller
ad869ba7c7 SearchResultDelegate: Fix display of icons on HiDPI screens
Visible in e.g. the C++ Symbols search. The icon returns a higher
resolution pixmap, and QItemDelegate::drawDecoration does not position
pixmaps with higher devicePixelRatio correctly. Just draw the icon
ourselves with similar code as QItemDelegate draws icons.

Change-Id: Ia412de026c3fb38d91cb87381475b6884005a231
Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-03-24 15:22:07 +00:00
Alessandro Portale
3729500740 WelcomeMode: Remove screenDependHeightDistance()
That function always returns 16.

Change-Id: I65cb0c62c5e553791f25e964de9eaf23a0f65687
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-24 15:11:07 +00:00
Thomas Hartmann
5f28650c23 QmlDesigner: Remove private Qt dependencies from qbs
We have no private Qt dependencies anymore.

Change-Id: I7f6b33b593e9493920c59945cf451c1c66f0a46d
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 15:04:36 +00:00
Eike Ziller
7da34ce33a Welcome: Reimplement session and project shortcuts
Got disabled in 16944277d2 during
refactoring.

Delegates and models are not the right places for registering commands,
since there can be multiple instances. Do registration in project
welcome page, and let delegates retrieve shortcut string from the
models.

Task-number: QTCREATORBUG-17881
Change-Id: I06e3c29e57ee893865bf108a2f13bdb385c26d70
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 14:46:52 +00:00
Ulf Hermann
551efd9199 QmlProfiler: Use QList for QmlRange container when loading .qtd
As we are using this as a queue, with many calls to takeFirst(), a
QVector is prohibitively expensive here.

Change-Id: I151452ae1299ab520a3aceae7ff3da0e29fe9bf9
Reviewed-by: hjk <hjk@qt.io>
2017-03-24 14:25:06 +00:00
hjk
5ac136204e ProjectExplorer: Don't update flat model on projectAdd
We get called back soon enough when projects are parsed.

Also, mark the container node for initial expansion  not
the project's root which typically does not exist yet.

Change-Id: I49100f83f8c57d5ef80d0f6f369330b646707260
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-24 13:25:47 +00:00
hjk
9c18e718a7 ProjectExplorer: Merge the two loops in FlatModel::addFolderNode
And inline the filtering to avoid the duplicated type check
and save a few cycles.

Change-Id: I0dae5e51b05b0a4e581359e7ad7d3b9d4f684141
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-24 13:24:54 +00:00
hjk
a63998f55b ProjectExplorer: Avoid some needless intermediate lists
... when creating folder nodes in the flat model.

Change-Id: I28f95589d774fc83e1a30c8328707bd1db6be03e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from commit 1a416d3f98)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-24 13:13:56 +00:00
Thomas Hartmann
2df18ec34f QmlDesigner: Fix drag and drop
The release mouse event does not come through if we start a drag.
There was already a workaround that stopped working with 5.8 and
did rely on private API.
I removed all usage of private API and added a simple workaround
that synthesises a mouse release event.

The actual execution of the drag is now asynchronous to
ensure the release event is delivered properly.

I removed all dependencies on private API in the designer.

In Qt 5.9 the issue seems to be fixed in Qt.
The workaround does not seem to get in the way of the fix.
Eventually, the workaround can be removed.

Change-Id: I9b45b255da5e44c26aba2acf4a42f88537126f75
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:21:42 +00:00
Thomas Hartmann
975c283ec7 QmlDesigner: Use the same usage pattern for sidebars as edit mode
Change-Id: Ia1ec631b8b486e98e957b5dbcccbc7b91baecb0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:21:33 +00:00
Tobias Hunger
b021660c1e ProjectExplorer: Treat empty root project nodes better
Do not set up empty root project nodes and fall back to the default
project tree instead. A project can not ever be empty: It should at
least include the project file itself so that the user can fix
breakages when project parsing fails.

Change-Id: I692e299f56727305120777cdc532607d5b0be99e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:16:19 +00:00
Tobias Hunger
3492da1246 ResourceEditor: Prevent possible nullptr access
Change-Id: Iad958d26272f471530a8494bee0e326ce9835aa9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:16:12 +00:00
Nikolai Kosjar
1074d97432 Clang: Avoid fragmentation in diagnostic display
A "diagnostic row" is displayed in two columns with the help of table,
one cell being the location, the other cell the diagnostic text. At
times, the location is wrapped too, which makes the whole diagnostic
display look fragmented/broken.

It looks like there is no way to avoid the wrapping of the location
column because Qt's CSS does not support the needed

    style='white-space:nowrap'

Avoid the columns for a consistent display at all times.

Change-Id: I35e4a1c831f18e2bce6a4c9ed891fcae439d1a1b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 10:52:12 +00:00
Nikolai Kosjar
dca76c9889 Clang: Leave space between category and option in diagnostic display
For some diagnostics ("#include_next is a language extension"), the text
has a smaller width than the category and option together. In this case,
there is no space between category and option, which looks terse.

Change-Id: I27e4736a0d2aa527d5733c6115bc8d40fe7794e0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 10:52:06 +00:00
Nikolai Kosjar
7d39f94f3d Clang: Avoid warnings about unknown pragmas
Task-number: QTCREATORBUG-17460
Change-Id: Ic57f59f87b58c44ac738fb87039b4844d82bc924
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 10:51:43 +00:00
Tobias Hunger
d5f242f3d6 Qmake: Do not warn when a compiler misses an .exe on windows
Task-number: QTCREATORBUG-17489
Change-Id: I8fbbf48b41b84adf8905d81ae21ded4ed2fd541d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 09:45:52 +00:00
Nikolai Kosjar
535cc76cac Clang: Avoid dot-arrow-correction if dot is gone
Change-Id: Iba23a17ba9345ed4f08e16faad02054903c04afc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:26:06 +00:00
Alessandro Portale
a9012ce747 QmlDesigner: Provide proper form/text editor split icons
Change-Id: Ic52197afb7a6bd381d95ec3a63ef2dfef8aaf5c3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-23 17:19:26 +00:00
Thomas Hartmann
b3763d9496 QmlDesigener: Remove C casts
Change-Id: I66317b46d7463545961f01b06baadf48470334ec
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:10:21 +00:00
Thomas Hartmann
c035cb81ce QmlDesigner: Fix warning
Change-Id: If8fe5c9f3db5f1927b9e2dd979a88ce97fdf88a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:10:14 +00:00
Thomas Hartmann
4ca71590db QmlDesigner: Fix warning
Change-Id: Iff2c50439521e602bd2703716590a3e95c8ab2b1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:00:42 +00:00
Thomas Hartmann
7d7c54fe74 QmlDesigner: Only show debug output if enabled
Change-Id: I6ad7c44c72ca7b87f3c119df33d01c561dd3d614
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:00:35 +00:00
Thomas Hartmann
95ecd506c1 QmlDesigner: Fix warning
We should avoid C casts.

Change-Id: Ib88dfab642a8f55bf81f428d4fe1cd59af1858da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:00:27 +00:00
Thomas Hartmann
9c12e0b7dc QmlDesigner: Fix warning
Change-Id: Idc3c8340b7eabef74d70bc0158307e464d5413ec
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 16:41:19 +00:00
Thomas Hartmann
970496b24c QmlDesigner: Fix help
The designer used a over simplified lookup,
that did not distinguish between e.g. Controls 1 and Controls 2.
Instead of fixing the lookup we simply use the working lookup from
the QmlJSEditor.

Change-Id: I2d31e633eaadc67e211d44bad307b26993f21fc9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 16:41:10 +00:00
Thomas Hartmann
316ed6943c QmlDesigner: Fix setting size if anchors are present
To ignore width or height the item has to be anchored
on both sides.

Task-number: QTCREATORBUG-15915
Change-Id: I3f4595788a08c295be93b20ebfabd20eb4fe3a63
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 16:41:01 +00:00
Thomas Hartmann
0cfe9f5c72 QmlDesigner: Use logging category for debug output
Task-number: QTCREATORBUG-12973
Change-Id: Idbd0236f8bb3e25be75b572e8507af619427e385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 16:27:34 +00:00