Commit Graph

54723 Commits

Author SHA1 Message Date
Marco Bubke
b5fdfe46c5 UnitTests: Cleanup Diagnostic test
Change-Id: Idf7d50ad15862508c2d57167f2147389e3bacba4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:18 +00:00
Marco Bubke
17080d70d4 UnitTests: Cleanup ClientServerOutsideProcess test
The data member could not be made constant. So it was quite propable that
the tests were order dependent.

Change-Id: I9e3792ea45434ad8318ef6325ca516a74ca222c2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:12 +00:00
Marco Bubke
409fecd3a0 UnitTests: Cleanup SupportiveTranslationUnitInitializer test
Change-Id: I0c43baeb13fe2a1004622267deb4e588f941d254
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:06 +00:00
Marco Bubke
872f3ee9c3 UnitTests: Cleanup ReferencesCollector test
Change-Id: I5c6d25e28116fb7e608044c2c187ff64bfcac9c9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:00 +00:00
Marco Bubke
d755986827 Clang: Cleanup ClangQueryProjectFindFilter test
Change-Id: I8e9246490c8501c71a5f0cc10aa45a0914fdda62
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:53 +00:00
Marco Bubke
cf4b2aec86 UnitTests: Cleanup FollowSymbol test
Change-Id: Idfacd3737b6a830a1e7c08f7b3745277ace3f756
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:47 +00:00
Marco Bubke
8dac5ff1c4 UnitTests: Remove heap allocations in the DocumentProcessor test
A fixture class is called for every test, so we don't need that setup
code.

Change-Id: I7fb2ee8248a161f701292a90eb6b8b88e9df08a7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:26 +00:00
Marco Benelli
7376336e15 QmlJs: prevent "copy" icon in outline drag and drop
Copying items in the outline tree is not allowed, so the icon it is
not shown while dragging with the CTRL button pressed.

Task-number: QTCREATORBUG-13450
Change-Id: Ibfcf954c273051ef03112d11ee6a3457530802bb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-12-05 10:16:39 +00:00
Orgad Shaneh
2559ad48a8 Git: Show success message on push
Change-Id: I78433d7c7aec65fbafcba49fabf0562571dfbeff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-05 10:12:09 +00:00
Christian Kandeler
9dadec8fc4 Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: I191d40886d1cb343401fb603f7741905801e1fec
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-04 20:27:33 +00:00
Alessandro Portale
2349a0a5c4 Git: Gerritpushdialog: Fix draft push for older Gerrits
Logic for "Non-Draft" and "Draft" was swapped.

Change-Id: I14640e1a6321332c6f0cc0b3e8364194f52bcbaf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-12-03 18:37:41 +00:00
Tobias Hunger
769afa9f97 Utils: Move variadice template arguments to the end
Move variadic template arguments to the end for all users in algorithm.h.

Change-Id: I7c8f1254e7de6ee9737e73d1a4721e71c188438e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 14:41:22 +00:00
Tobias Hunger
2c09424c13 Utils: Clean up Utils::findOr and Utils::findOrDefault
Change-Id: I638e68480d3985b6df9a18aa96a067ee68484b12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 14:41:15 +00:00
Tobias Hunger
b81d788793 Utils: Support more containers with Utils::transform
Support std::vector and similar classes as input and output.

Change-Id: I1d202d54c18e868ce0e71e4c2b6288565710baa8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 14:11:28 +00:00
Tobias Hunger
b712b1bc7c Utils: Make Utils::indexOf work with all iterator types
Change-Id: I5b9b577bdfb26bd03583ca8349b960625124a929
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:51 +00:00
Tobias Hunger
33fc20ab51 Utils: Improve Utils::contains
* Consistently use anyOf to implement contains.
* Support contains over an container of std::unique_ptr matching a pointer.

Change-Id: I0180f3ec3d5935d8afeeac67a745d4b38a01674d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:43 +00:00
Tobias Hunger
9b832f670d Utils: Implement more Utils::anyOf variations
Change-Id: I0cba5b58dde6003f5c5cb399142f985cbe83f0a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:37 +00:00
Tobias Hunger
8cd2c234db QmlProjectManager: Fix warning about unused lambda capture
Change-Id: I3fd8f89dc3f5f54a7479c7e1d118766fedd66ba7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:26 +00:00
Robert Loehning
fcea6ceba6 Squish: Partial fix of tst_opencreator_qbs
Change-Id: Idaa228e4efcdac05e72932ed95c410af8a7bc80f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
v4.5.0
2017-12-01 10:22:06 +00:00
Robert Loehning
fe5249c401 Squish: Update expected line in tst_simple_debug
Project template changed again.

Change-Id: Ibd2767719e13e3de041e63e0977d838aa6c34f3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 10:20:43 +00:00
David Schulz
2f42bc447b Debugger: detect cdb in non default install roots
Change-Id: Ic5b484c674d750bdcbc24d607720589ee9f056c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 07:59:32 +00:00
David Schulz
d0bf2a4528 TextEditor: fix animate navigation within file
The calculation based on visible lines is not working as
expected when we have collapsed blocks. Using QPlainTextEdit
functions to get the correct target scroll bar value.

Task-number: QTCREATORBUG-19327
Change-Id: I0393fc94ba2a11caeaa77d6d87bc69c6c7de1bb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 07:58:43 +00:00
Ulf Hermann
8c504dc61e QmlProjectManager: Drop support for QtQuick1
Change-Id: Id60c9768d8fad03f588207af07bba676dbfc76fc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-30 15:57:53 +00:00
Eike Ziller
0c9c747d92 Add "Rename" to file system view
Renames the file on disk, notifies editors, and tries to change the file
in all open projects that had it (and support renaming).

Task-number: QTCREATORBUG-19209
Change-Id: I165e9468c7235f9f503a3820bda3eb00f3c086d0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-30 14:43:41 +00:00
Robert Loehning
09f0d1a2ca Squish: Stabilize tst_HELP05
Change-Id: I9296dc577fac4ea06c7c8f482a44948ba327568f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-30 13:20:44 +00:00
Tobias Hunger
fe038630fb SettingsAccessor: Remove SettingsAccessorPrivate::Settings::isValid
It is unused.

Change-Id: I9cace756479a2af2a1b96a3e4bde790f31b319ae
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:41:10 +00:00
Tobias Hunger
da205fd41b SettingsAccessor: Move code around
No change is intended but the moving of entire classes, methods or
functions.

Change-Id: I18d3462bb97c203aee1b81f3c0d7a429a9aa3e86
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:41:02 +00:00
Tobias Hunger
ee834b7e2f SettingsAccessor: Add setters to VersionUpgrader
Add setters to VersionUpgrader and use them. This shortens the
implementation classes a bit.

Change-Id: I5ffe6f085752bf39bbcb08c286844cc1088eeea5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:40:53 +00:00
Nikolai Kosjar
ae750aa3a3 Clang: Fix qbs build
Broken with

  commit 9ad760efda
  Clang: Store the database in user resources

Change-Id: Idca0709e3e28291e43594f6b43f24faf7957a1a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-30 09:41:46 +00:00
Christian Kandeler
b98d5822f5 qbs build: Use the proper way to check the Qt version
Doing this via the product condition silently switches the product off
if Qt is too old, which will leave users wondering about the reason.
Instead, use the long-supported version check functionality of the
Depends item, which will result in a clear message in case of a failure.
Also, move the check to QtcProduct. The version requirement is for all
of QtCreator, not just the plugins.

Change-Id: Id445823e0243f5ad3b7a0ccb747a90e4fb18889b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-30 09:34:46 +00:00
hjk
edcce9c1f3 Do not show accelerators in dock window titles
The dock widget's togglViewActions text is tied to the widget title,
but the view headers should not display a potential "&" accelerator.

So stash the &'d string away when setting up the title and retrieve
it when re-creating the view menu.

Task-number: QTCREATORBUG-19378
Change-Id: I6bf49ca526d12ddd57dfa33a94327a83baeaa6b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-30 09:33:49 +00:00
hjk
19d93d29a9 Introduce a ChannelProvider run worker
... to provide a set of urls indicating usable connection
points for 'server-using' tools (typically one, like gdbserver
and the Qml tooling, but two for mixed debugging).

Urls can describe local or tcp servers that are directly
accessible to the host tools, if needed port forwarding
could be set up when needed.

Use it as new base for GdbServerPortsGatherer for starters.

Note: Since none of the customization points for actual port
forwarding are currently provided by device implementations
only non-forwarding cases are working right now. Incidentally
this does not affect existing setups, as the only case where
it would be needed (Android/adb) have a complete custom
implementation. The medium-term plan there is of course to use
this new setup here and have the AndroidDevice implementation
only provide the forwarding, not the whole debugging (etc...)

Change-Id: I42c9783348cd430b1c435bbca56329c678ac485c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-11-30 09:32:40 +00:00
Christian Kandeler
9488b7e604 QbsProjectManager: Set the default working directory in the run config
... rather than in the run config widget. Otherwise merely opening the
run settings can change the behavior of applications.

Task-number: QTCREATORBUG-19374
Change-Id: Ib227ab07d09b7a8ce34909ae0b08b6b222bcee14
Reviewed-by: Georger Araujo <georger_br@yahoo.com.br>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-30 09:23:38 +00:00
Christian Stenger
e5fae9b914 Tests: Fix compile on Windows and Linux
Template code inside utils/algorithm.h is not correctly instantiated when
respective containers that shall use these functions are included after
the algorithm file.
Additionally there had been issues using nullptr as comparison inside
QCOMPARE().

Change-Id: I2bd6baf3890090c5f5bbbd6229afb9aeeb7617ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-30 09:21:51 +00:00
David Schulz
173ed5b6fd qtcdebugger: don't abort unregister if Debugger.Default is not defined
Task-number: QTCREATORBUG-19252
Change-Id: Idc986a52276c40f20a983495ab4423c8753a9dda
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-30 05:40:05 +00:00
Oliver Wolff
e05f2889ad winrt: Add runnable to run configuration
When Creator checks whether the application that is being debugged
is a debug build, it gets its information from the runnable so we
have to provide one when winrt is used.

Change-Id: I2259783f82eef96b50ba5f804306e5225919d24b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-29 14:27:07 +00:00
Marco Bubke
67767f9925 UnitTests: Add mockup for Core::ICore::userResourcePath()
Otherwise the unit tests does not linked any more.

Change-Id: I1d756b8bef18d65174a8924a15995cc179af61f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-29 13:04:13 +00:00
Eike Ziller
c1aa745813 Add missing include to algorithm test
Change-Id: Ia7302723a0ec41456ca99704b7f8c680f6893c5d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 12:09:49 +00:00
Ivan Donchevskii
21b8e10814 Clang: Fix FilePathView constructor
Do not keep pointer of a temporary object.

Change-Id: I5251c7dbc8581be96afaa947e1a58adaeb0b17e3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-29 10:44:37 +00:00
Marco Bubke
9ad760efda Clang: Store the database in user resources
We used temporary directories but this can be different paths.

Task-number: QTCREATORBUG-19372
Change-Id: Id6ac18e6eecdc5bb354bda3741e16cb87c552ba6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-29 09:57:53 +00:00
Eike Ziller
c90e5b50dc Algorithm: Support std::vector<std::unique_ptr> with contains and findOr
Change-Id: I01cb71c06b405f071498ed8752f9acac44d2b223
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 08:59:52 +00:00
Eike Ziller
e2baa116ca Merge remote-tracking branch 'origin/4.5'
Change-Id: I86852d289c22210a0439e8e297819dc7276a96de
2017-11-29 09:56:22 +01:00
Tobias Hunger
78ef474c71 Qmake: Set up environment for initial project parsing
Set up a better environment for initial project parsing (before Kits
are configured).

Task-number: QTCREATORBUG-19241
Change-Id: I2431113dbbe6fb6a66f95fb1efb36834fa184f3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 16:33:47 +00:00
Marco Bubke
4007828820 Clang: Disconnect from server if process is a zombie
Task-number: QTCREATORBUG-19370
Change-Id: Ibf96c38004e0e0e9aa436df946076979f07df0da
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-28 15:09:08 +00:00
Marco Bubke
f70bf3d2d1 Clang: Move QLocalServer in ConnectionClient
Before the QLocalServer was in the ConnectionServer so more than one
client could connect to the server. But we never used that possibility
which made the hand shaking much more difficult. It is now moved
in the client, so that there is always a QLocalServer.

Change-Id: Ifa357074b0c0809434c49d23b1cee38496f72f43
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-28 15:08:58 +00:00
Christian Stenger
45c667d52c Add environment variable for internal profiling
Change-Id: Idd9197a7610aec550945fc0cb1c0a1dd833b7cba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-28 14:42:41 +00:00
Alessandro Portale
8c3bd61594 Qt Quick Application wizards: Qt::AA_EnableHighDpiScaling only on WIN
Setting Qt::AA_EnableHighDpiScaling causes a few graphics backends to
malfunction. This patch reduced the setting of the flag to happen only
on Windows (it is automatically set on macOS with retina).

Task-number: QTBUG-64815
Change-Id: I08fa5d1bd2c93e7a39c23487b684bd3f7b358783
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
2017-11-28 13:36:29 +00:00
Hugo Holgersson
bf3c67e0d0 TextEditor: Implement highlighting of function definitions
This allows users to style function names at their definitions.

Once set, the XML-style token "FunctionDefinition" will
highlight all function definitions: the style option is a
mixin to Function and Virtual Function.

TEST=Default themes and locally hacked themes that lack Function,
FunctionDefinition, Declaration-styling look as they did before
this patch.

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I49d8e401211bdf28ff74699feac16fe98f6d64ce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-28 12:54:29 +00:00
Tobias Hunger
e050622f55 Nim: WS-only fix
Change-Id: Ia968cf8a24b85bd90bd2d0e9353779ac41ff385f
Reviewed-by: hjk <hjk@qt.io>
2017-11-28 12:33:42 +00:00
David Schulz
a4cd04cd61 Debugger: modernize cdb detection
Change-Id: Icc01ee47311fdd6d34df7555afd93bb323fdd05c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-28 12:07:53 +00:00