Commit Graph

5028 Commits

Author SHA1 Message Date
Eike Ziller
5fcf0c438f PluginManager: Code clean up
Mostly refactor some explicit loops, and nicer reverse looping.

Change-Id: I102b86da597b37cd496762bd776af73ec407d838
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-24 12:30:05 +00:00
Eike Ziller
667518ad23 Convert some c-style casts
Change-Id: I0d7566d14941a17c3f171b32c9902c22558005bd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-24 12:29:46 +00:00
hjk
61e770e5a7 Tests: Treemodel compile fix
Change-Id: I28132baeb4b5b538f5d8c94c6182b3afe3ac2c78
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-24 12:25:36 +00:00
Nikolai Kosjar
05c1efd8ef Clang: Fix dot-arrow-correction for not-yet-parsed unsaved content
The issue was re-producible with e.g.:

    void g()
    {
        // Type 'foo.' as fast as possible in the next line

    }

This led to "foo->" with completion results as if there was no "foo." at
all in that line.

We relied on a correct position for
translationUnit.sourceLocationAtWithoutReparsing(), but the just typed
characters were not yet reparsed. And we do not want to reparse at that
point since takes too long. We already determine the utf8 position for
the dot character, so simply use that instead.

This completes commit 17c1325cc4.

Change-Id: I669888b5c17ee63b2aec7b16c9921f9d79e281f9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-24 08:31:28 +00:00
Marco Bubke
cc804d542d UnitTests: Disable small string test
Change-Id: I508e43923efc065fce9a79edebeff79606069abd
(cherry picked from commit 505c9be9af)
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-23 12:39:14 +00:00
Nikolai Kosjar
438bd85b84 Clang: Fix updating revision number for all translation units
Change-Id: I1ad305ed081aecadde968e041f7b99a24a1c4784
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-23 06:29:14 +00:00
Thiago Macieira
74fed1d5b7 Fix build on PPC: PPC is defined to 1
$ powerpc-poky-linux-gcc -dM -E -xc /dev/null | grep -i PPC
 #define _ARCH_PPC 1
 #define __PPC__ 1
 #define __PPC 1
 #define PPC 1

Not on PPC64, though (only __PPC__ and __PPC64__ are defined).

Change-Id: Ib57b52598e2f452985e9fffd145812f5098e441d
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-22 17:51:20 +00:00
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