Commit Graph

44349 Commits

Author SHA1 Message Date
Orgad Shaneh
689aa3891d CMake: Ignore dirty signal on server-mode on Windows
CMake sends false signals on Windows. Until this is fixed, ignore them.

Task-number: QTCREATORBUG-17944
Change-Id: If59f04fd68a899069ecc02df592d3105e531f5bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-15 13:23:30 +00:00
Alessandro Portale
36c8227caf App: (Re-)enable automatic HighDPI scaling for Linux
The original reason for disabling HighDPI scaling on Linux in
7da2b4a3cb was unhinted fonts for non-
scaled scenario: QTBUG-46435. That issue had been fixed long ago:
0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8

HighDPI support on Linux should by now be good enough to give it another
try by default.

Change-Id: I5b74f46310254c2916a2f16a7655d9f096453cc3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-15 12:08:35 +00:00
Nikolai Kosjar
c9a9aadde7 QmlDesigner: Remove unused acceptedModelNodeChildren()
Change-Id: I3f584e94135852a1a3619fc2ebb877897a7eef60
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-15 11:23:15 +00:00
Orgad Shaneh
7e8bac1512 Gerrit: Terminate previous query when remote is changed
Change-Id: Ifafaa9068dca069562973151361e653f6db3617e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-15 08:19:59 +00:00
Christian Kandeler
4b38b09a81 Update qbs submodule
To HEAD of 1.8 branch.

Change-Id: Icebf0374b92612b7823d9e21b489205a94e34cc2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-15 07:42:55 +00:00
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
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
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
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
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
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
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
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Ulf Hermann
d571e8d442 RunConfiguration: Don't call virtual methods by pointer to base method
Change-Id: Idcd939eff52a9d00addada8ddba0513619b1d432
Reviewed-by: hjk <hjk@qt.io>
2017-05-09 13:00:08 +00:00
Vikas Pachdha
3282f85f3d Update the application output tab's title
Output tab might be reused but title nevertheless be updated

Task-number: QTCREATORBUG-18109
Change-Id: I497fa3086e840131fbfcc81a5002da06ac70978f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-09 11:55:31 +00:00