Commit Graph

7671 Commits

Author SHA1 Message Date
Dmitry Ashkadov
43075f5fb1 C++: Add support of ref-qualifier for functions.
Now the ref-qualifier (& or &&) of the function declaration
is propagated to GUI. For example,  'Refactor' -> 'Add Definition'
preserves the ref-qualifier.

Change-Id: I8ac4e1cad4e44985e94230aabbd9858a7e929fee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-22 17:47:59 +00:00
Philip Lorenz
c0f3094866 C++: Fix lexing of >> / >>=
The current code always ends up setting the token to T_GREATER_GREATER.

Change-Id: If75ff1f5bccffd5918ec2bf491724cd0981220ae
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-22 17:46:40 +00:00
Nikolai Kosjar
b032038781 Clang: Tests: Use test data working with clang 3.6 *and* clang 3.8
The test data produces different results when it is run with libclang
3.6 and libclang 3.8. (lib)clang 3.8 will generate an error instead of a
warning and suppress further diagnostics. See below.

Use simpler test data that is agnostic to the different clang versions.

$ cat input.cpp
    class X {
	X(X&&) noexcept;
    };

    X::X(X&&) = default;

    int function()
    {
    }

$ clang++-3.6 -fsyntax-only -std=c++11 input.cpp
    input.cpp:5:4: warning: 'X' is missing exception specification 'noexcept'
    X::X(X&&) = default;
       ^
	      noexcept
    input.cpp:2:5: note: previous declaration is here
	X(X&&) noexcept;
	^
    input.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    2 warnings generated.

$ clang++-3.8 -fsyntax-only -std=c++11 input.cpp
    input.cpp:5:4: error: 'X' is missing exception specification 'noexcept'
    X::X(X&&) = default;
       ^
	      noexcept
    input.cpp:2:5: note: previous declaration is here
	X(X&&) noexcept;
	^
    1 error generated.

Change-Id: I6d786a8b87eb4438fa8db36540db9358181b9a5b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-22 12:39:39 +00:00
Eike Ziller
0e923c2a75 Merge remote-tracking branch 'origin/4.1'
Change-Id: I5cdc704c827a6f5abf4dc39e2a131d53df328bd2
2016-06-22 11:29:12 +02:00
Eike Ziller
4f9016e03f Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/android.qbs
	src/plugins/android/androiddevice.cpp
	src/plugins/autotest/testcodeparser.cpp
	src/plugins/debugger/analyzer/analyzerstartparameters.h
	src/plugins/projectexplorer/devicesupport/desktopdevice.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.h

Change-Id: I2474d06f2309fa71210a8401846bc2ef85bebf1d
2016-06-22 11:09:32 +02:00
David Schulz
de0ceea956 Clang: Adjust mockup code to creator code.
Change-Id: I83c5b7c1af2ee4b77b2f3d8e06b54218838056f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-06-21 13:37:42 +00:00
David Schulz
8c7913e0ba Clang: Fix compiling unittest on windows.
Change-Id: Id48d494510ee53a9e888e22a752e8210f3d4ae2d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-06-21 13:37:35 +00:00
Marco Benelli
2d03eb8bb9 QmlJs code model: added test cases.
Added test cases and modified the test suite in order to make it
data-driven.  Each sample file can now declare the number of
expected messages.  If there is no declaration, zero is assumed.

Change-Id: Ife3daa10a258f51ea8f896156f6f6af783406b84
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-21 07:40:03 +00:00
Orgad Shaneh
246e72262c CppTools: Separate highlighting for function declarations and calls
Task-number: QTCREATORBUG-15564
Change-Id: Iab1b60e19448202432f98295c89769cd376aa03f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-20 10:55:31 +00:00
Tim Jenssen
29e51517f4 QmlDesigner: fix linking error in tests
Change-Id: I67b47ab3dc509d317786bc7eda6fa13f8877a00d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-20 08:09:07 +00:00
hjk
fb482846fc TreeModel: Add a StaticTreeItem(QString) convenience constructor
Covers the common case and hopefully avoids the recurring MSVC
problem with initializer lists in this location.

Change-Id: I1b2bbb083f9fc86af3b51b8f52615fb70c832b95
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-17 08:09:48 +00:00
Orgad Shaneh
0ca1142aae Fix test compilation with MSVC2013
Change-Id: Id34ee1f906e378dd57ca30c585e0a3df4ddc9ffd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-17 05:00:31 +00:00
hjk
b281d6dad7 TreeModel: Introduce a StaticTreeItem
This splits out the case of static string displays from the
TreeItem base class, making the base more lightweight.

Change-Id: If1f442011ec60094399a41b65d9b5015f432f82e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-15 08:55:16 +00:00
Thomas Hartmann
159976062e Enable tests for QmlDesigner
Change-Id: I7dda2efdc92d5ec5c736c8e18fa1f6bada935f20
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-15 07:52:31 +00:00
Tim Jenssen
383026abb5 QmlDesigner: remove qDebug in tests
Change-Id: Icbcfffede77acd0b6e2b577aab7a30e73e02717a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-14 18:05:19 +00:00
Thomas Hartmann
d7f24031dc Adding test for standard issues with QtQuick Controls 2
This test is covering the standard issues we had with the
code model regarding QtQuick Controls (2).

We check if ApplicationWindow is derived from QtQuick.Window
and if Button is derived from QtQuick.Item.

Change-Id: I1a2ed894daeb06743fb950bf629a8dcf2b9a78e6
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-06-14 15:43:12 +00:00
Tim Jenssen
1d0b45b881 QmlDesigner: fix tests in shadow builds
Change-Id: Iaabe1516a30be520b1b0be0dd5557004312a67ec
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-14 15:06:21 +00:00
Thomas Hartmann
89d22b6eb0 QmlDesigner: Use QtQuick 2 in tests
Also cleaning up some tests.

Change-Id: I531997bc6eb0b9cb8057b7e408bca1c301c88ad0
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-14 14:42:40 +00:00
Tim Jenssen
0a67076ef4 QmlDesigner: remove unused code
Change-Id: I4c888f69d3bedc510f0f0a9f67d96caf17c4bcee
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-10 14:31:45 +00:00
Tim Jenssen
4d008299f3 QmlDesigner: remove outdated tests
Change-Id: I761d2af520f55d4a4bf405ede83af9228d7d7abb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-10 14:31:37 +00:00
Tim Jenssen
044743d407 QmlDesigner: reduce tests output
Change-Id: Ia68cf7c859323c5ef82969c54f0168bf4a5ebbef
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-10 14:06:14 +00:00
Thomas Hartmann
568e80b591 QmlDesigner: get tests compiling and running
105 passing, 1 failing, one test seems flaky
I skip many nodeinstance/puppet related tests,
because the tests/test framework cannot deal with the qml2puppet/emulation
layer being out of process.

Change-Id: I5b254c7e6e944b8fbd8ba490c1e8bb43d0eb38c3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-10 11:57:06 +00:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
Marco Bubke
505c9be9af UnitTests: Disable small string test
There are some compiler problems and before I change the code I want to
investigate them deeper.

Change-Id: I497aa594fe0ea67be5927cc75bf6d64158952663
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-08 14:16:57 +00:00
Ulf Hermann
eb948c0214 Timeline: Remove selectionIdForLocation()
Nobody needs that.

Change-Id: I83feeb55af24393a3feebfbbd4d0f085b208bb20
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-08 09:44:35 +00:00
Christian Kandeler
a0f956f050 qbs build: Introduce new module "qtc".
The qtc module gathers properties that used to live in the top-level
project file. This is the first step towards making it possible to build
plugins against an installed Qt Creator ("out of source build").

Change-Id: Ia1514cc9c888e80be01b308e908de48980fcbdb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-08 08:46:00 +00:00
hjk
b198d482cf Debugger: Robustify Qt version extraction
Task-number: QTCREATORBUG-15497
Change-Id: I61b52d23e0acf69e2030f8dca2691fbaa6b309ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-07 05:33:13 +00:00
Eike Ziller
33210099f1 Merge remote-tracking branch 'origin/4.0'
Change-Id: I9793f0f9019b16f3725c5a9708a5ccf81557cdc6
2016-06-03 09:50:43 +02:00
Robert Loehning
79623d5774 Squish: Base getPaths() on new path functions
Change-Id: I54cd03bc1d24b715df15de37291f776f9867416f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-02 09:35:16 +00:00
Christian Stenger
b04b5e5d75 Squish: Provide functions for getting paths inside Qt installation
Change-Id: I273304f0c6d451d28a256c99588479525eef95e4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-06-01 14:50:25 +00:00
David Schulz
6c18ed50d2 Tests: Fix linking reactivated manual plugins on win.
Change-Id: Ibd4db0c6a065dd264f693d663b4a940d2f3a7e58
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-01 11:05:03 +00:00
Orgad Shaneh
8de20c9d6c ExtensionSystem: Revive manual test
Change-Id: I24c627e964afa33883bde571960ed390b07be985
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-01 05:34:28 +00:00
Robert Loehning
4117ba7313 Squish: Replace remaining shell usages
Change-Id: Id7c2c1a17fed053f2e8601fc4c7716705e260431
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-31 14:52:17 +00:00
hjk
e108d6fe48 Debugger: Fix transport of negative signed chars
Change-Id: I9b25d4b8e4b68d9cef674581d1a42eb75e21ec56
Task-number: QTCREATORBUG-16353
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-31 12:12:33 +00:00
Eike Ziller
73bb92c5a6 Merge remote-tracking branch 'origin/4.0'
Change-Id: I89c52ca2145a43c94d3366367ba72fde605dd577
2016-05-31 12:02:13 +02:00
Robert Loehning
7d51d3849a Squish: Silence more warnings
Change-Id: I6259382a2359a795654a6d6536112c090ede130f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-31 09:15:35 +00:00
Christian Stenger
0e331a2e29 Squish: Adapt to changes in Quick Application template
The template has slightly changed in 6b506b34ec.

Change-Id: Id58e67beacaac046c6dd235b715f360dc7ef4c09
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-30 12:35:39 +00:00
Tim Jenssen
f59759f9da msvc 2013 build fix
Change-Id: Ice81612dd358a51c6847a1c7dfbf5115ad43cbab
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-30 11:06:51 +00:00
Robert Loehning
7e9aa9c908 Squish: Silence warnings in tst_default_settings
Change-Id: I668cc7b1fcb569b50d2178fe792f566721c9d4d4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-30 10:40:12 +00:00
Robert Loehning
c1e7cf84e4 Squish: Do not use shell in getOutputFromCmdline
Change-Id: I731b119169063912cd3b528a1a6a58727002ae67
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-30 09:13:04 +00:00
hjk
7a80f2f01e TreeModel: Take responsibility for some of the casting
This adds a templated layer on top of TreeModel that can specify
item types for the top three layers in the model, relieving user
code from some of the previously necessary type casting.

Two common setups get an extra layer with convenience functions
on top: TwoLevelTreeModel for two-level model with a first level
of static headers and a uniform second level, and UniformTreeModel
where all non-root nodes are the same.

"Untyped" plain TreeModels are still possible.

The walkTree() feature and untyped iteration in the base
TreeItem and TreeModel is retained for now to ease transition
in downstream modules, but is planned to be removed soon.

Change-Id: I67d75a1a4e18e8f254dbfb458db03510d8990d8b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-30 06:25:48 +00:00
Eike Ziller
0c5bae640b Merge remote-tracking branch 'origin/4.0'
Change-Id: I80bc3371c6d7cf9f2d46cbcf8e79e4761213d8aa
2016-05-27 12:01:36 +02:00
Christian Stenger
e564abdd9a Squish: Use more stable subprocess code
Change-Id: I9a895831f9d57562a9eeb8491cc7f46c1da2eba1
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-27 04:35:49 +00:00
Christian Stenger
a00a73a74d Squish: Fix expected failure in tst_SCOM04
Change-Id: If09e33b616356e0f0eb5aa37c035acaf2c2adaac
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 13:54:44 +00:00
Christian Stenger
2b57a1afa6 Squish: Fix handling of context menu on OSX
Change-Id: I6f5d50eca0199826e8af0f11016a1dfeb924f046
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 13:31:25 +00:00
Christian Stenger
1f1a9e5870 Squish: Fix expected sort order
Change-Id: I882ad3633f7cf827aea086b5f5fd2a9204eeb482
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 13:07:47 +00:00
Christian Stenger
3b820cc9a4 Squish: Fix tst_installed_languages on OSX
Change-Id: I470047d663ec4c2bfebaa17baf67bc811d9c0c65
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 13:06:15 +00:00
Robert Loehning
b2f869c411 Squish: Test code model's reaction to decimal separator in float
Must not be interpreted as member access operator.

Task-number: QTCREATORBUG-16188
Change-Id: Iec252fbc63899cef5b004a5770e3ebee5af7188e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-26 11:48:03 +00:00
Christian Stenger
91d7886313 Squish: Fix tst_designer_edit on OSX
Change-Id: Idabdd1577373636d9b39c83447febdf4da7b04f1
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 11:31:15 +00:00
Christian Stenger
b1e9290b73 Squish: Raise some timeouts a bit...
...as these frequently fail on OSX.

Change-Id: I200fa1e57e8ec98221c9a82177565d9e60b79356
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-05-26 05:08:23 +00:00