Commit Graph

44349 Commits

Author SHA1 Message Date
Eike Ziller
546df37c98 Merge remote-tracking branch 'origin/4.1'
Conflicts:
	README.md
	src/plugins/modeleditor/actionhandler.cpp

Change-Id: I65c2885593b881eda94872168a3891cab9cafe71
2016-07-11 10:46:05 +02:00
Nikolai Kosjar
9650adad14 Clang: Require at least LLVM 3.8.0
Change-Id: I2de3eef7bc06cba6298d64a9a042a01decc05384
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-11 08:22:32 +00:00
Tobias Hunger
bdff47afd5 Git: Sprinkle C++11 goodness over the code
Just initializer lists for QStringLists (mostly arguments) and nullptr.

Remove lots of QLatin1* while at it.

Change-Id: I0d8354bcbdb759db65da6153bb356fb4b8ed0e8d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-11 07:49:00 +00:00
hjk
08dc992aef Core: Use QList's initializer list contructor for output panes
More concise code.

Change-Id: I0c83a02de725648294e1b6b49669bdec0c47fafe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-11 07:39:13 +00:00
Christian Kandeler
4f7e237c2f qbs build: Remove version part from more plugin file names
The QmlDesigner plugins do not conform to the plugin conventions, so
they do not derive from QtcPlugin and were thus overlooked in
35c17ac73a.

Change-Id: Idb67701be448c8d57759c94504cbbcb2dafa9775
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-08 10:54:39 +00:00
Nikolai Kosjar
ed8b910202 Clang: Honor fixits own locations in ClangFixItOperation
The fixits have own ranges/locations and thus might address more than
one file.

Change-Id: I5ee59944bef588e763a91f054a60823593373a0e
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-07-08 08:22:37 +00:00
David Schulz
c406f71296 Clang: Fix conversion warning on windows
Change-Id: Ieb7148738052a139e128fd26cab7e601f703fc35
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-08 08:22:13 +00:00
Nikolai Kosjar
98b66534d5 ClangStaticAnalyzer: Stop passing on toolchain defines for qmake/msvc case
Re-produce with:
  1) Open qt-essential-includes.pro and configure it with a Qt 5.7.0 MSVC2013
     64 Bit Kit.
  2) Run the analyzer.

Errors during analyzing occur in winnt.h [1]. This is somehow related to
/D__int32=long that we pass on. Removing it helps.

It looks like there is no reason anymore to pass on the toolchain defines with
clang-3.8 at all. Our unit test projects can be parsed by the analyzer without
them.

Tested with the following kits:

	Qt 5.6.0 (mingw39_32)
	Qt 5.6.0 (msvc2013)
	Qt 5.6.0 (msvc2013_64)
	Qt 5.6.0 (msvc2015)
	Qt 5.6.0 (msvc2015_64)
	Qt 5.7.0 (mingw53_32)
	Qt 5.7.0 (msvc2013)
	Qt 5.7.0 (msvc2013_64)
	Qt 5.7.0 (msvc2015)
	Qt 5.7.0 (msvc2015_64)

[1]
In file included from D:\dev\creator\creator-4.1\src\plugins\clangstaticanalyzer\unit-tests\qt-essential-includes\main.cpp:2:
In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include/QtGui\QtGui:32:
In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include/QtGui/qopenglcontext.h:60:
In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include\QtGui/qopengl.h:49:
In file included from D:/usr/qt-5.7.0-msvc2013_64/5.7/msvc2013_64/include\QtCore/qt_windows.h:61:
In file included from C:\Program Files (x86)\Windows Kits\8.1\include\um\windows.h:164:
In file included from C:\Program Files (x86)\Windows Kits\8.1\include\shared\windef.h:24:
In file included from C:\Program Files (x86)\Windows Kits\8.1\include\shared\minwindef.h:182:
C:\Program Files (x86)\Windows Kits\8.1\include\um\winnt.h(3077,1) :  error: functions that differ only in their return type cannot be overloaded
__getcallerseflags (
^
D:\dev\llvm\3.8\changingLibClang_install\bin\..\lib\clang\3.8.1\include\intrin.h(68,14) :  note: previous declaration is here
unsigned int __getcallerseflags(void);
~~~~~~~~     ^
1 error generated.

Change-Id: I2de8d0393a575f88dd59dfa71fbfb11f2debc158
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-07 14:41:41 +00:00
Nikolai Kosjar
08f0d37c17 ClangStaticAnalyzer: Undefine clang version macros for MSVC Kits
This fixes parsing of Qt 5.7.0 headers with a MSVC Kit.

Re-produce with:
  1) Open qt-essential-includes.pro or the *.qbs and configure it with a Qt
     5.7.0 MSVC2013 Kit.
  2) Run the analyzer.

Errors during analyzing occur in qtypetraits.h [1] because
 * Q_COMPILER_UNICODE_STRINGS is defined in qcompilerdetection.h because...
 * Q_CC_CLANG is defined because...
 * __clang* is defined.

Undefine the __clang* macros so the "right" compiler will be detected.

[1]
In file included from D:\dev\creator\creator-4.1\src\plugins\clangstaticanalyzer\unit-tests\qt-essential-includes\main.cpp:1:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include/QtCore\QtCore:4:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include/QtCore/qabstractanimation.h:43:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qobject.h:46:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qobjectdefs.h:48:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qnamespace.h:43:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qglobal.h:1139:
In file included from D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypeinfo.h:41:
D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypetraits.h(251,19) :  error: redefinition of 'QtPrivate::is_integral<unsigned short>'
template<> struct is_integral<char16_t> : true_type { };
                  ^~~~~~~~~~~~~~~~~~~~~
D:/usr/qt-5.7.0-msvc2013_32/5.7/msvc2013/include\QtCore/qtypetraits.h(235,19) :  note: previous definition is here
template<> struct is_integral<unsigned short> : true_type { };

Change-Id: I10da2a1daa6f5ea2828f7ea4bcf594050a585b61
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-07 14:41:36 +00:00
Nikolai Kosjar
73f0ac3788 ClangStaticAnalyzer: Fix gcc 4.x build for stdc++11-includes/main.cpp
Apparently the header file <codecvt> is unknown to gcc/mingw < 5.x.

Change-Id: Iad33fc6ffbab5a0a467c1c29db0df78896ca47b6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-07 14:41:29 +00:00
Takumi ASAKI
1ca0a21d4e ModelEditor: Add labels to commands
Some commands did not have labels for keyboard shortcuts setting.

Change-Id: Ifed0c2acfca614cdd9f7dbc3256ad644f280e60f
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-07 14:12:08 +00:00
Alessandro Portale
40c5213fdd Core: Move expand and collapse icons from autotest to core
...and replaced the duplicates of them in the debugger console.

Change-Id: If545800c47f3560e1f91d87bdd117abaf04dbd89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-07 14:06:25 +00:00
hjk
e48451b0a3 TreeModel: Consolidate child()/childAt() and rowCount()/childCount()
We never used the possibility to overload the virtual child() and
rowCount() functions, it's unlikely to be needed in future.

Change-Id: I7ebdf4dfc70bb0bcadea9ef3fb88f16632a95696
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-07 13:39:15 +00:00
David Schulz
f664cbb514 Cdb: Add benchmark to cdbextension
Change-Id: I830f5997f230435c400c0e688420af915263027a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-07 12:17:54 +00:00
Eike Ziller
4133ff0ab6 Add functionResult_t as convenience for using functionTraits
Allows
  functionResult_t<F>
instead of
  typename functionTraits<F>::ResultType

Change-Id: Ia85973a890303c38b598e25b2a476f659fc5c359
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-07 12:02:22 +00:00
Christian Stenger
4f13f074d9 AutoTest: Ignore generated files when parsing for tests
Change-Id: I66fcb2976f05d043ebc5a1c5a611ca688fe4fd16
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-07-07 11:58:43 +00:00
Christian Stenger
790040dddc AutoTest: Do not try to update tests for qbs files
qbs files are kind of qml documents which end up inside the
QmlJSModelManager. Ignore them by default.

Change-Id: I7136dee80a5f5bfc1b5262daeb00890df28e3f4b
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-07-07 11:58:37 +00:00
Christian Stenger
b570ee1b80 AutoTest: Fix initial parse when loading session
Avoid displaying tests from other projects of the same session
which have been indexed but do not belong to the current
startup project.

Change-Id: I6e0fb62cc97898ef3853ec61580dd2deb5ac64e5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-07-07 11:58:30 +00:00
Ulf Hermann
9e8999586a QmlProfiler: Don't double-insert pixmap end events
If the pixmap started loading before the trace started we already do
insert(...) a few lines above, which includes inserting the end.

Change-Id: Idce0aca84f1c935fc2d4614b758e1575dde59a40
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-07 10:52:57 +00:00
Nikolai Kosjar
3e5937792e Clang: Properly quote arguments
Change-Id: Id51bc93de028429f18fca1638b1db4051880971b
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-07-07 08:25:38 +00:00
hjk
717ff38140 Introduce AppManager plugin to simplify work with QtApplicationManager
This is currently an empty shell.

Change-Id: I0c2e5cb4b7052c78d5a93db3a6e8d96b9affcab1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-07 07:58:43 +00:00
David Schulz
3ecbce9b84 AutoTest: Allow guessing configuration for debugging
Guess the config if no matching run target was found.

Change-Id: If70881cd64ab6523bbca13b1c8c18d63e9fcdeb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-07 07:25:40 +00:00
Christian Kandeler
bc96860aff QmlDesigner: Fix qbs build
Change-Id: Ia89903f687cefdc2ce98cd2f456069a631f64fe6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-06 12:56:39 +00:00
Christian Kandeler
ba8a1647e1 Timeline: Fix qbs build
Change-Id: I0d71dae85d4d607824ed69c37ce8f37ca52fa60f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-06 12:56:14 +00:00
Tobias Hunger
4ac80fe3a0 ToolChains: Trigger ToolChainManager::toolChainChanged signal
Trigger ToolChainManager::toolChainChanged signal when something
changes. This was apparently missing in quite a few places of
some of the tool chains.

Change-Id: Ic94c6559e6267f4ff22dc74cc5b0865fb7aeac63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-06 12:53:52 +00:00
hjk
7b4c7d49a9 TreeModel: Introduce a destroyItem() convenience function
Shorthand for delete takeItem(...).

Change-Id: Icb7b60e5c19aa0d21650eefff65f7eb55e9f90b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-06 11:41:55 +00:00
hjk
3c431c92c9 TreeModel: Declare Utils::TreeItem * as meta type
Change-Id: I4a72646a7647c898fb2f5ce627d6381f9c7d23ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-06 11:37:47 +00:00
hjk
4c5ee0c02b ExtensionSystem: Fix PluginView model level types
LeveledTreeView lately names its RootItem type explicitly, the
PluginView model was not adapted, but still compilable (and not
harmed otherwise) as the types of first level were never used.

Change-Id: If64d609581782be86068d64e5a8f14f4418fb95b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-06 11:37:36 +00:00
Ulf Hermann
d786c33ed0 Timeline: Fix forward declaration
Change-Id: I9348268189cf35e75f5bb29573730f2c24ede8ba
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-06 10:48:14 +00:00
Ulf Hermann
c08862688a QmlProfiler: Avoid reloading notes twice on range restriction
We need to clear them before we restrict as otherwise the other models
will end up with invalid notes. Doing that by calling loadData() is
inefficient as we need to call the same method again after finalizing,
because the timeline models may have changed.

Change-Id: I4cd6e13bfb73804aab8f1cfee6db4069a7b808cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-06 10:26:17 +00:00
Ulf Hermann
d12c8806ac QmlProfiler: Add extra metadata to notes
This way we can improve the heuristic used for mapping notes to
timeline events, by taking the row into account. Also, by marking
notes as loaded when loading them we avoid accidentally dropping
them by restricting to ranges.

Change-Id: I031389880571805788c910728ee89333a5cd4727
Task-number: QTCREATORBUG-16542
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-06 10:26:12 +00:00
Alessandro Portale
5df7b1272d Themed Profiler timeline: Tool bar
This change implements theming of the toolbars and adds new, High-DPI
capable toolbar icons.

Task-number: QTCREATORBUG-16466
Change-Id: Ibcc774962c740995d8b15fa6c74345d3a48694de
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-06 08:29:41 +00:00
Ulf Hermann
561841b93b QmlProfiler: Use current restriction range when saving notes
We don't want to clear notes outside the current restriction as those
are still valid and need to be available for later reloading.

Change-Id: If3e75ff2b2ab9a93578c5ca63f1b4a2f539dc802
Task-number: QTCREATORBUG-16542
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-06 06:28:02 +00:00
Thomas Hartmann
268fea1c5a QmlDesigner.StatesEditor: Add StatesEditorIconProvider
The StatesEditorIconProvider provides the proper icons
from ICore:Icon.
This icon provider should be generally available in the future.
For High DPI support we need hardcoded image sizes.

Change-Id: I323c07501664b8038c8777998901a28554c568f0
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-05 18:39:01 +00:00
Lorenz Haas
6015ed133a Utils: Allow named colors for theme's palette section
This change allows color definitions like

[Palette]
a=ffff0000
b=a

with some restrictions:
 - the name "style" results in QColor() (behavior change)
 - the named color must be alphabetical less than the key (due to
QSettings::allKeys())

Change-Id: Idaa8569ce1e5b8502d287fd42b0ee7b75dc8b5d6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-05 17:19:54 +00:00
Tobias Hunger
96d04570c8 MSVC: Do not cut of last character of predefined macro values
The output is split at newlines, so remove the code that cuts of
the last character, claiming that to be a newline.

Task-number: QTCREATORBUG-16559
Change-Id: Id2c40bc919d257c4e3570441545ac6c43af151d2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-05 15:28:54 +00:00
Alessandro Portale
a52306c716 Core: Use native dir separators in user visible path names
Change-Id: I50123fea940b07ffa249a61ade16d65644242ef9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-05 14:35:14 +00:00
Christian Kandeler
615891736e qbs build: Rename the "qbs" sub-project
The old name would cause bogus warnings when overriding properties of
the qbs module on the command line.

Change-Id: I669c2ed173111981be50b28f480e692276ab1293
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 13:15:44 +00:00
Nikolai Kosjar
ea837bb8d8 ClangStaticAnalyzer: Improve debug output
* Normalize line endings from process output
* Do not print extra quotes

Change-Id: I39e055bed09c4fe52878d63fc443130d70be95cb
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-07-05 12:54:48 +00:00
Orgad Shaneh
dfe8bb0db7 WinRT: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: Iaa91215dd9f3adb44f39839901de56c07f0c8702
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-05 12:50:24 +00:00
Nikolai Kosjar
64c7f28c6a ClangStaticAnalyzer: Print shell quoted command line
...by using QtcProcess::quoteArg().

Change-Id: Ic7c160d0332456e94e0d5fa1ca51320b8c1dd394
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-07-05 09:42:18 +00:00
Eike Ziller
070e6235fa Merge remote-tracking branch 'origin/4.1'
Change-Id: I35ef0d667c759c959edce91569f05ebc7a8ff4d8
2016-07-05 11:28:32 +02:00
Eike Ziller
57c2c595ca Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	src/shared/qbs

Change-Id: Id363df58f4f9bda5128a486e942f14179160cb86
2016-07-05 11:15:19 +02:00
Ulf Hermann
71e3833185 QmlProfiler: Don't connect() null pointers
Change-Id: I0373e19a6d362f115e578420487a90875488837c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:21:36 +00:00
Ulf Hermann
6683597e3a QmlProfiler: Assert for sane configuration in local runner
Change-Id: Idec9531019b1b95bbacf5d5bd5ea68168e28e895
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:22 +00:00
Ulf Hermann
f7924a23b2 QmlProfiler: Fix LocalQmlProfilerRunner test for windows
Start the process with valid environment, connection, configuration,
and better suited arguments, and re-enable the test.

Change-Id: I4ff92ab60d46f3a96a1eb7c8414abf0fc56e8b26
Task-number: QTCREATORBUG-16436
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:15 +00:00
Ulf Hermann
80e6bf1ef5 QmlProfiler: Terminate waiting processes when Complete arrives
Previously, in AppStopRequested state we would wait until we are done
processing the data. This is problematic as when aggregating traces
this doesn't happen spontaneously. If we've explicitly asked the
process to terminate it's safe to do so after receiving Complete as
we won't need any more data after this.

Change-Id: I64111ce6039ffc7f6815425c6b7e4432ac528c86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:09 +00:00
Ulf Hermann
51055e6799 QmlProfiler: Don't needlessly defer state transition from dying to idle
Otherwise we can run into an inconsistent state when we try to restart
the process while we're still "waiting" for it to die.

Change-Id: I82afd272a73b3be79328c45c8d027621d1feeace
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:01 +00:00
Nikolai Kosjar
005c98817c ClangStaticAnalyzer: Add test project with C++11 includes
Task-number: QTCREATORBUG-16526
Change-Id: I67bbf172dabe993697d43b7b9d804a79ebfffa9c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-07-05 07:40:28 +00:00
Alessandro Portale
794d901c30 Core: Draw the separator also under a menu with "FlatMenuBar" flag
That separator under the Menu is drawn in the Classic and Flat themes.

This change ensures that it is also drawn for themes with "FlatMenuBar".
The "Flat Dark" and "Flat Light" need it.

Change-Id: I43c932cfc4634330a08f86a33c9d74555e420a2a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-05 07:32:48 +00:00