Commit Graph

54723 Commits

Author SHA1 Message Date
Kevin Funk
65234d3614 Fix crash when attaching GammaRay to running proc
Backtrace (excerpt):
```
Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
0  0x00007fffe2a809d0 in ProjectExplorer::Runnable::Runnable (this=0x7fffffffc5c0, other=...) at /home/kfunk/devel/src/qt-creator-4.3/src/plugins/projectexplorer/runconfiguration.h:175
1  0x00007fffe2a81eab in QPair<ProjectExplorer::Runnable, Utils::ProcessHandle>::QPair (this=0x7fffffffc5c0, t1=..., t2=...) at ../../../../qt5.8/qtbase/include/QtCore/../../../../../src/qt5.8/qtbase/src/corelib/tools/qpair.h:61
2  0x00007fffe2a81f04 in qMakePair<ProjectExplorer::Runnable, Utils::ProcessHandle> (x=..., y=...) at ../../../../qt5.8/qtbase/include/QtCore/../../../../../src/qt5.8/qtbase/src/corelib/tools/qpair.h:151
3  0x00007fffe2a6e74a in ProjectExplorer::ProjectExplorerPlugin::runningRunControlProcesses () at /home/kfunk/devel/src/qt-creator-4.3/src/plugins/projectexplorer/projectexplorer.cpp:2568
4  0x00007fffdfcfef4e in GammaRayIntegration::Internal::ProcessTrackerBackendQtCreator::checkProcess (this=0x555556240c10, pid=6881) at ../../../src/qtauto/kdab-plugin-gammaray-qtas1.2/gammarayprocesstrackerbackendqtc.cpp:112
5  0x00007fffdf943b6a in GammaRay::ProcessTracker::D::requestUpdate (this=0x555556230800) at /home/kfunk/devel/src/qtauto/gammaray-qtas1.2/common/processtracker.cpp:72
6  0x00007fffdf943548 in GammaRay::ProcessTracker::D::qt_static_metacall (_o=0x555556230800, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffc800) at common/processtracker.moc:77
7  0x00007ffff66cf95a in QMetaObject::activate (sender=0x555556230900, signalOffset=3, local_signal_index=0, argv=0x0) at /home/kfunk/devel/src/qt5.8/qtbase/src/corelib/kernel/qobject.cpp:3743

(gdb) frame 0
0  0x00007fffe2a809d0 in ProjectExplorer::Runnable::Runnable (this=0x7fffffffc5c0, other=...) at /home/kfunk/devel/src/qt-creator-4.3/src/plugins/projectexplorer/runconfiguration.h:175
(gdb) p other.d
8 = std::unique_ptr<ProjectExplorer::Runnable::Concept> containing 0x0
```

Fixed both locations where there's a potential nullptr derefence in this
file.

Change-Id: I23f7db6f18675470b19cdf39dce449c5b694160d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-05-12 14:52:22 +00:00
Tobias Hunger
3e8e82b2e3 Wizards: Fix wizards in KDE environments
KDE checks for a "text" property in the wizard pages and will then replace the
text it sees there with some text with added '&' characters. This breaks the
wizards, so rename the properties to something that is not "text".

Task-number: QTCREATORBUG-17503
Change-Id: Ie513848cef9cd795f06a47659abb550abd268b11
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 13:34:37 +00:00
Nikolai Kosjar
3c02b9b968 C++: Fix invalid read in isQtReservedWord()
The change

    CPlusPlus: Fix isQtReservedWord
    commit 7d76dd0079

enabled the problematic code path.

Change-Id: Ic89e3976b07ad55976c474f9c4b6d6f6cf64d29e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-12 13:18:46 +00:00
Tobias Hunger
112254dc67 CMake: Improve detection of build directory in server-mode
Detect both build directories next to the sources as well as below the source
directory properly. Without this patch all files that normally go into "Build
Directory" node were listed below "Source Directory" when the build directory
was a child of the source directory.

Task-number: QTCREATORBUG-18196
Change-Id: Ib8674489cfe04958f76df24904107bb7aa093162
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 13:15:32 +00:00
Oswald Buddenhagen
d0f3f7f7e5 remove executable permission from .ts file
Change-Id: Ie5817708c942523721421a4c1c9d553ec1bf2be0
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-05-12 12:44:48 +00:00
hjk
69521da36e Debugger: Fix crash on second options opening
Change-Id: I6ca5d860e9c2a82e7032873a0a2c939ab2f4c69f
Task-number: QTCREATORBUG-18189
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-12 12:41:21 +00:00
Robert Loehning
47198b44e4 Squish: Exclude HTML when reading version from dialog
Change-Id: I2e73a27aaa3b8c28cdce93576a8cdfc861e37b8d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-12 11:30:14 +00:00
Tobias Hunger
4e6fd0a2c0 CMake: Improve handling of CMAKE_RUNTIME_OUTPUT_DIRECTORY
Set the working directory of binaries which got moved from the
build directory using CMAKE_RUNTIME_OUTPUT_DIRECTORY to the directory
the binay is actualy in.

Task-number: QTCREATORBUG-18158
Change-Id: I059d55a6c408799f3220bd90c271a6d743e6cd82
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 11:17:47 +00:00
Tobias Hunger
5f03b47f36 Qmake: Hide dummy.cpp files in unconfigured projects, too
Change-Id: I6580377c1a43996eb6d7737a095de29112840c26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-12 11:07:03 +00:00
Tobias Hunger
18537a5594 ProjectNodes: Sprinkle QTC_ASSERT over code looking at parentFolderNode
Not checking the parentFolderNode triggered a crash elsewhere already, so
double check other uses of parentFolderNode and use QTC_ASSERT to make sure
no nullptr is going to be accessed.

This is necessary now that we have a forest of project trees and no longer
have a sessionnode anymore.

Change-Id: Ibc380c2ec9b12b983e709d2eeb03a8b741fe1058
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 10:33:15 +00:00
Nikolai Kosjar
e788333510 Clang: Add -Wno-used-but-marked-unused
...to built-in diagnostic configuration "Warnings for almost
everything".

Change-Id: I2a70c76c5b876cc0dc8cebd80c2457550b608593
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 10:13:55 +00:00
Thomas Hartmann
2e5d91d9de QmlDesigner: Fix function name
Change-Id: Ie32583be28bca622c668de7a89a206aeca745683
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:12:02 +00:00
Thomas Hartmann
39d32e7dba QmlDesigner: Some cleanup
Change-Id: Id54ceb09ada16ef41ebd568f5e8fe0559cc52e76
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:11:54 +00:00
Thomas Hartmann
00e9b99161 QmlDesigner: Introduce NavigatorModelInterface
We use NavigatorModelInterface to encapsulate different models.

Change-Id: Ia7bcdfffea18942cb07ca3495e078a97ca51d97c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-05-12 08:11:47 +00:00
Thomas Hartmann
967f4d4271 QmlDesigner: Add missing override
Change-Id: I949a5e96c0a0ac0e2b88860c191095543de417f5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:08:36 +00:00
Thomas Hartmann
18e758eac0 QmlDesigner: Use the model Role to retrieve ModelNodes
We have to avoid to use the model directly, since
we will have two different models in the future.

Change-Id: I3bffc897c2c15bdd37da42df701a0e6995ba6c6f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:08:29 +00:00
Thomas Hartmann
33c6ffc6ee QmlDesigner: Remove dead code from NavigatorTreeModel
This code has been moved to the delegates.

Change-Id: I3e44a3eb2038299d3b0a7de1e86ed92c3d835bd4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:08:21 +00:00
Thomas Hartmann
8f0c5397e6 QmlDesigner: Remove NavigatorTreeModel from NameItemDelegate
NameItemDelegate does not require internals of the model anymore.
The delegates are now agnostic about the model.

Change-Id: Ibf19674b765353f1f55a361a76ab4002534b73b6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:08:14 +00:00
Thomas Hartmann
9c4ea2c457 QmlDesigner: Remove NavigatorTreeModel from IconCheckboxItemDelegate
IconCheckboxItemDelegate does not require internals of the model anymore.

Change-Id: Ia4d2787cf34c56e8b2a3b82184b9d5f2378ce607
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 08:08:07 +00:00
Orgad Shaneh
f603a115d0 Dumper: Put object address for pointer also when it is not dereferenced
int main()
{
    int foo = 42;
    void *bar = &foo; // bar has no object address
    return 0;
}

Change-Id: I917c2976bd618c096bfd704abff8b3538e38a0d3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-12 08:04:21 +00:00
Thomas Hartmann
14d4ebd312 QmlDesigner: Decouple NameItemDelegate from model
We introduce a role for the model node.
This way we do not have to access the model directly.

Change-Id: If3eb006894e1d227ec9c58bbd99cdcd500cd62d7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:59 +00:00
Thomas Hartmann
4fe63ed702 QmlDesigner: Remove unused code
Change-Id: Id35a743377d77882c7fc5e33e2a69a01c0fde140
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:51 +00:00
Thomas Hartmann
31142bdf86 QmlDesigner: Remove unused code
Change-Id: I5c74437bf2ba9dad06b452c58286a5168e6f392e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:43 +00:00
Thomas Hartmann
6e8e660f3c QmlDesigner: Some cleanup
This was just some reference/leftover. It is now used
in the WIP implementation of the new/alternate model.

Change-Id: I2909f3b7c24121277b1b05b03716d0a2dbdbcd73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:35 +00:00
Thomas Hartmann
7a9f3d9d76 QmlDesigner: Do not paint icons for property rows
Change-Id: I8abd54b20371ffaec37c044e8cdefe4010c520dd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:26 +00:00
Thomas Hartmann
790f17573d QmlDesigner: Handle missing icons
In the complex model we will not always have icons.
We keep 4 pixels for indentation.

Change-Id: I07b66d3846a36a73a2dcbe4910f2da895756ef07
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-12 07:57:11 +00:00
Eike Ziller
ae2a9dbb78 Work around issue with vanishing menu bar with Unity
When Widget Designer is opened with a QMainWindow based form, the
"native" Unity menu bar vanishes. This is a workaround by disabling the
native menu bar integration on Linux.

Task-number: QTCREATORBUG-17519
Change-Id: I93eb3a590200fb8fff90017d8d6eddda8edaa42e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-05-12 07:12:30 +00:00
Thomas Hartmann
e510ede1e4 QmlDesigner: Handle visibility by role
Since there will be two models we have to decouple things
in the delegates.

Change-Id: If20b7ca1ab211bbf953968fb0994679b588e8b4a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 18:35:53 +00:00
Ulf Hermann
d4fe5310d6 QmlProfiler: Don't delete suspended models when acquiring is aborted
AcquiringData to ClearingData is a valid transition, for example when
the application crashes. We don't want to drop all models then.

Change-Id: Ibb1b5a551e0dbec121a44054d36c132d038153f4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-11 14:47:57 +00:00
Thomas Hartmann
0732b9c094 QmlDesigner: Move isNodeVisible to NavigatorView
Change-Id: If1e73d218c2647074ecb198749b176b4618111b0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:59:42 +00:00
Thomas Hartmann
5823de4e9c QmlDesigner: Move handleChangedExport to NavigatorView
This allows to share functionality with an alternative tree model.

Change-Id: I2737ce2e7d93cc92695a6b888afda9da411c9fa4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:59:28 +00:00
Nikolai Kosjar
64ec695566 Clang: Show function signature hint for constructors and functors
For "foo(|" [1] we requested a completion from libclang with the cursor
position just before "foo" and then filtered the function declarations
for functions matching the name "foo". This worked fine for ordinary
functions, but obviously not for constructors and functors.

Recent versions of libclang support proper function call completion with
XCursor_OverloadCandidate, so make use of that.

[1] '|' represents the cursor position

Task-number: QTCREATORBUG-14882
Task-number: QTCREATORBUG-14884
Change-Id: I9d31b3960ccff6a8b9440dbcb7ff9f5ca9f61266
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:54:09 +00:00
Nikolai Kosjar
f127cb3c59 Clang: Make use of CXTranslationUnit_KeepGoing
From the documentation:

 Do not stop processing when fatal errors are encountered.

 When fatal errors are encountered while parsing a translation unit,
 semantic analysis is typically stopped early when compiling code. A common
 source for fatal errors are unresolvable include files. For the
 purposes of an IDE, this is undesirable behavior and as much information
 as possible should be reported. Use this flag to enable this behavior.

Change-Id: I0af9f7b1ed68c41e9bcf0abf97d8a4e22dc124ca
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:53:54 +00:00
Christian Stenger
ff6a20687d CPaster: Fix URLs for pastebin.ca
Protocol switched to HTTPS recently.

Task-number: QTCREATORBUG-18192
Change-Id: I467534142478f5511e645a2e959ad3422640a0a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-11 11:46:23 +00:00
Thomas Hartmann
514e0a8d47 QmlDesigner: Move icon retrieviel to ModelNode
This allows to use the icon in other places.

Change-Id: I3c67351273f3be3c0fbe19eb58984cf54d057a3d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 07:52:11 +00:00
Orgad Shaneh
f6c6224ebc Autotest: Avoid needless iterations over the project files
Task-number: QTCREATORBUG-18185
Change-Id: I6c541cfa577331edc1ff3083d2f9b705ffc7ce73
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-11 06:04:15 +00:00
Orgad Shaneh
c7d7cb9d40 Autotest: De-noise TestCodeParser
Change-Id: Ide351ed081417d3520714dcc44d543797f75dd4a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-11 05:51:39 +00:00
Christian Stenger
bae0368034 Squish: Fix switching to build or run settings
If too many kits are present and/or the screen resolution is
too low to have QC having the correct minimum windows size
Squish fails to click on the items as it might be necessary
to scroll to them to have them really (user-) visible.
There is an obvious difference between 'visible' for Squish
and 'visible' for the interacting user.

Change-Id: Id658a323fcf2ae3882b225c6ce9383ed2c876e81
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-05-11 05:48:21 +00:00
Robert Loehning
d7f79349ed Squish: Verify project was found when adding file
Change-Id: I313d1ba1b621d45620bf613760cefdf0a2d2341c
Task-number: QTCREATORBUG-17994
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-10 14:01:16 +00:00
Vikas Pachdha
9b44c6ea4f iOS: Stop ios-tool gracefully before killing
Task-number: QTCREATORBUG-18147
Change-Id: Ic6b4c179fca5f51f5052dcffffefd1079a686233
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-10 11:24:18 +00:00
Thomas Hartmann
94e02994bb QmlDesigner: Adjust color
The rectangle that indicates selection has now the selection color.

Change-Id: I59bcd070bfb8b16f297e648ff53d83c8953b4896
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-10 11:20:44 +00:00
Thomas Hartmann
8c2467d48d QmlDesigner: Reimplement navigator model
This patch gets rid of of QStandardItemModel.
Instead we implement a simple tree model without
any explicit structure. The model simply maps
the generic Model to a tree.

The advantage of the new model is that is does not use
a shadow data structure (QStandardItemModel) anymore.
The original model is always directly mapped to the tree model.
This makes initialization a lot faster and and there cannot
be any synchronization issues anymore.

Change-Id: I0e71ff2d4067f29a4c25c78ad3d626a5daf206a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-10 11:20:38 +00:00
Ulf Hermann
d79dde6dfa QmlProfiler: Increase flame graph view context menu test timeout
Apparently macOS will block the event loop until a real mouse click
happens if you open and close context menus in quick succession. When
it does that, the timer won't hit anymore and the mouse event to trigger
the next test step won't be generated.

Change-Id: Ie0c05d8a5a2020fe46381358133cd7cdbbf42299
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-10 11:04:36 +00:00
Ulf Hermann
8e8283b342 QmlProfiler: Keep flamegraph details window around
When moving the mouse pointer out of an item the window should not
disappear, so that you can reposition it then.

Change-Id: Ic2fa0e41bcab5fada6c3c5fca68a5f82fcd0fc7a
Task-number: QTCREATORBUG-16698
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-10 08:20:02 +00:00
Eike Ziller
452a057179 Bump version
Change-Id: I744550af5e37d5863b42534608f2c8289b22c674
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-10 08:09:21 +00:00
Robert Loehning
1957c8bc66 Squish: Update tst_opencreator_qbs
Change-Id: I2aac18170ee7d4490852e587b2c016f913b242e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-09 14:21:03 +00:00
Friedemann Kleint
98820ab3e6 TemporaryDir: Use qAddPostRoutine() for cleanup
Otherwise, the directory is not cleaned up on Windows.

Task-number: QTCREATORBUG-18063
Change-Id: I2e89f7de7642879ea402b50866fbee7e462501b6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-09 13:46:07 +00:00
Leena Miettinen
939913de5a Doc: Describe To-Do options
Update the screenshot and add a new one hat shows the options.

Change-Id: I7ceccef2c7c5bad5be4af58588c378a0df5e1383
Reviewed-by: Niels Weber <niels.weber@qt.io>
2017-05-09 13:36:21 +00:00
Tobias Hunger
9f9776c4c9 Qmake: Show executable in Run Configuration widget at all times
Task-number: QTCREATORBUG-18168
Change-Id: I3db248c6db4c58206d64982f10f8ca641c1145c3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-09 13:22:17 +00:00
Tobias Hunger
2b4715c208 QbsProject: Use deleteLater to free QObjects
Change-Id: I33af237b271f32adc606befef081b97ded5e67ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-09 13:21:16 +00:00