Commit Graph

57025 Commits

Author SHA1 Message Date
Oliver Wolff
e0b0c30748 winrt: Code cleanup
Replace 0 with nullptr where applicable
Initialize members in declaration

Change-Id: I3d8bae845be01e27db2c591f8037d3823f25f67d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-11-01 07:02:37 +00:00
Nikolai Kosjar
d52ac9a708 Clang: Fix unresolved #includes for ui_*.h headers
...with an extra parse.

Previously, the creation of an e.g. "Qt Widgets Application" from the
wizard could show code model errors in mainwindow.cpp. Depending on
timing issues, the first error is either

  1. 'ui_mainwindow.h' file not found (QTCREATORBUG-15187)
    The parse happened before the in-memory ui_mainwindow.h was
    generated by uic. The file system watcher can't help here as the
    #include was not resolved successfully. And libclang's reparse does
    not handle this case (it would need to remember all failed #include
    stats...).
    ==> Detect this case with the help of the include paths and trigger
    a full parse.

  2. or: allocation of incomplete type... (QTCREATORBUG-15187)
    The parse happened after the generation of the in-memory
    ui_mainwindow.h, but before the clangbackend received the unsaved
    file.
    ==> Fix this by also writing the content of the unsaved file to our
    behind-the-scenes-created ui_mainwindow.h.

Fixes: QTCREATORBUG-15187
Fixes: QTCREATORBUG-17002
Change-Id: I4f3a81adaa3d604746977a402c29f83fbc5b0e44
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-31 10:38:27 +00:00
Sergey Belyashov
91ed30ffac Update Russian translation
Change-Id: I4d94737f7e542c02b9e7137b150c8a4888c36092
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-31 09:44:24 +00:00
Nikolai Kosjar
8bccd8a428 Clang: Do not insert "::" after namespace completion
...as currently libclang does not provide "::" consistently and it
confuses users.

Ideally, once libclang provides it consistently, we probably want to
insert "::", but allow to "overtype" it by the user, similar to what we
do with function parentheses. That is, if the user accepts such a
completion and types "::" due to muscle memory, he should not end up
with "::::".

Change-Id: Ibfd19c22457641956ace0ba976672eddc51ecc88
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-30 14:11:35 +00:00
Ivan Donchevskii
b385171eb8 Clang: Don't wrap Qt headers when generating compilation database
This trick is needed only for internal purposes.

Change-Id: Ic10c0898519eed663d14c4b1665a0d6b0d47b4a4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-30 13:07:45 +00:00
Ulf Hermann
1b6d57263b Tracing: Force alpha channel of RangeMove into a sane range
We want the range mover to be visible, but not completely opaque and we
don't want to depend on the theme for this. Therefore if the alpha
channel is < 0.3 or or > 0.7 just clamp it.

Change-Id: I4e5ee32bd890dc8db2bc4b9bcd77b4687b23e22d
Fixes: QTCREATORBUG-21402
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-10-30 08:29:44 +00:00
Ivan Donchevskii
8ab9b93b79 CompilationDatabase: Fix opening relative file paths
Change-Id: I0d0ac8af9cd48510b8b8a80adfb20b8c526cd2e4
Fixes: QTCREATORBUG-21386
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-29 11:45:39 +00:00
Thomas Hartmann
9ab3a69c65 QmlDesigner: Crash fix
This is likely to fix a crash we could only reproduce
with the Qt Design Studio release on one machine.

Task-number: QDS-270
Change-Id: Idc33ba145169613b866903fa5e259f8cd6ec4ee8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-29 11:45:30 +00:00
Orgad Shaneh
5b7e0afc10 Revert "Android/ProjectExplorer: Include parameters into quotes"
This is wrong. The executable can contain spaces, so it needs the quotes,
and arguments with spaces are also enclosed with quotes.

This reverts commit 9c5afd8e96.

Change-Id: I9c0d3ae7452170195441d0b47b76b5d16252e2c4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-29 11:01:56 +00:00
Thomas Hartmann
4f7d24acb6 QmnlDesigner: Avoid paths starting with '//'
Windows these are interpreted as network hosts
and the timeout when resolving those is way too long.

Task-number: QTCREATORBUG-21372
Change-Id: Ib796473158cec620de26592bf628ab18d676153d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-29 10:54:25 +00:00
Christian Kandeler
81f019f033 Update qbs submodule
To HEAD of 1.12 branch.

Change-Id: I804b5f44e3b468140c20c1cf381d1c4a19f0bce9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-29 08:54:41 +00:00
Orgad Shaneh
8278b4a24d Git: Remove wrong soft assertion
There is no restriction of renaming the current branch.

Change-Id: I51f3f8d69d1fb108a23a9e9f98364361828531d3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-28 11:51:52 +00:00
Orgad Shaneh
ce15a0f447 Git: Fix detection of current selected index
Comparing the row is not enough. Row is relative to the parent, so the
second row in locals was wrongfully considered identical to the second row
in a remote.

This amends commit 299c777c01.

Change-Id: I4c5e43e3107a1f01bbed7abf9b7e2a2d3feb4feb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-28 11:51:33 +00:00
Christian Kandeler
4c82dd6d12 SSH: Fix decryption in CBC mode
Two function call arguments got switched around. Their types, while
looking different, were in fact just aliases for the same underlying
type, so this was not detected by the compiler.

Fixes: QTCREATORBUG-21387
Change-Id: I631d37634501759e37bfc594656f569c4ff1aa72
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-10-26 12:30:32 +00:00
Ivan Donchevskii
93269f3ecd Clang: Add unit-tests for function overloads completion order
Make sure that the same function overloads with different priorities
come together in the completions list.

Fixes the case when we complete the method without '.' or '->'.

Change-Id: Icaf7ea47f5e58b3ae5cc9764ad79c857f6f6e231
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-26 07:22:24 +00:00
Orgad Shaneh
fe87339888 Git: Fix resolving top level for non-existent sub-sub-directory
When a directory is renamed, and it has sub{sub-}*directories, executing
git blame on a file in the subdirectory -> Blame Revision (or parent) for
the file in the previous name -> Show failed because it couldn't determine
the top level directory.

You can test by opening qmakeprojectmanager/wizards/filespage.cpp and
blaming one of the lines that had it as qt4projectmanager/...

Change-Id: I7ac964c12f1f368c5ce92e9bedd972a2bc824935
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 17:52:28 +00:00
Robert Loehning
9c5afd8e96 Android/ProjectExplorer: Include parameters into quotes
Change-Id: I7778d3749e29497365e1bce4f599cc31a161bb01
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 16:40:05 +00:00
Marco Bubke
f8ec57919f ClangPchManager: Add PchTaskGenerator
Task-number: QTCREATORBUG-21358
Change-Id: Ia460ce82c3c896f4d0ac00638d03800a55dd27dc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:35:11 +00:00
Marco Bubke
ee2122be70 ClangPchManager: Add build dependencies to include collector
It's a first step but we have to refactor the interface later.

Task-number: QTCREATORBUG-21379
Change-Id: Idda666bcaec950203f001c993c54a926779527e0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:35:02 +00:00
Marco Bubke
e571220663 Clang: Add top system includes to include collector
If we want to split the project part we have to filter out the top system
includes.

Task-number: QTCREATORBUG-21345
Change-Id: I258fa33ac39bd94b4699f4f39923d6ad274c1dc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:34:52 +00:00
Marco Bubke
be3e06cc7e Clang: Fix test
Change-Id: I599d42f3a2584b40cbcec1368db9a2b11b0112d5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:34:44 +00:00
Leena Miettinen
4d892acbbb Coreplugin: Fix UI text
The context menu command name is "Open Command Prompt Here" on Windows.

Change-Id: I250cbf464ae185e548733ce94769a52ec1c99dbc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-25 13:24:21 +00:00
Eike Ziller
1c17ed6db8 Debugger: Use engine specific contexts for delegating actions
Some actions that are engine specific are visible globally in the Debug
menu, like stopping, interrupting and continuing the debugger, and
various step variants.
These are registered in the action manager by the debugger plugin.

Avoid duplicating the state management of these actions in the debugger
plugin, by registering these actions as disabled dummies.
The actual actions of the specific debugger run are now registered in
the action manager by the debugger engine instance, for a debugger
engine instance specific context.
The engine manager sets the engine instance specific context when the UI
is switched to the specific debugger run.

Change-Id: I0a311cec0856365b830460dec2ce33d14a2289c0
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 12:58:25 +00:00
Leena Miettinen
9274a42485 Doc: Add info on disabling automatic creation of run configs
Reorganize and edit the information about run configurations.

Change-Id: I84f835da2f6b6cd4ff02831e387475e8c07c6e55
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 12:48:24 +00:00
Leena Miettinen
f61c8c680d Doc: Describe the Clang Format plugin
Change-Id: I596af2775a4abb8e0331e1eb3de1b55cae0f15d7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:48:04 +00:00
Leena Miettinen
45ec0aea37 Doc: Describe the Compilation Database Project Manager plugin
Change-Id: Ie548caa6e3b7288cf554fd898a5b69f267f65bbb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:47:47 +00:00
Nikolai Kosjar
9d6a0c7055 Clang: Adapt plugin test testCompleteWithDotToArrowCorrection
Change-Id: Ibc272eb768f6d92c4b02c3164f7171fc769cfd41
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:14:03 +00:00
Nikolai Kosjar
d946ff5403 Clang: Fix adding completion snippets after {
...e.g. as in "void f() {".

The criteria whether to change snippets got invalidated with

    commit 8d0391a4f9
    Clang: Treat brace initialization as constructor completion

as the completion operator might be T_LBRACE now instead of T_EOF_SYMBOL
for normal completions.

This fixes the plugin test ClangCodeCompletionTest::testCompleteGlobals.

Add also unit tests.

Change-Id: I85cf522b9b307359c5c3e25198dd228cbb68ded0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 12:13:57 +00:00
Eike Ziller
7d3686359a Fix missing translation contexts
Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-25 11:46:57 +00:00
Ivan Donchevskii
83a63c7914 Clang: Go through CLANG-UPGRADE-CHECK
Change-Id: Iaaaea598d020a44bcdc60a8d06ee28a1f28386bb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-25 10:34:18 +00:00
Orgad Shaneh
4162543cf2 Qbs: Add variable chooser to install path chooser
+ fix display of install root with variables in equivalent command line.

Change-Id: I9f8ab6dba80afddd0ee5116947c11752ded8129f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-10-25 10:25:47 +00:00
Ivan Donchevskii
d05fe2fe15 Clang: Re-enable tests which do not fail anymore
Change-Id: I1f8f396eeb8e97a8910bc2bd454227a395330f31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-25 10:25:01 +00:00
Orgad Shaneh
618d8e02d1 GitEditor: Fix resolving of working directory for non-existent source
Change-Id: Ie92be6b0aa6816b5c3a2bfed4a89163f2260d12b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 08:27:05 +00:00
Ivan Donchevskii
039a34a369 Clang: Adapt priorities for the same method/constructor overloads
CXXMethod and CXXConstructor may have different priorities
depending ony their origin and attributes. To keep them together
in the sorted list we adapt their priorities to have the same
value if their names match.
To continue keeping ClassCompletion before ConstructorCompletion
change the order of the completion kinds for the sort purposes.

Change-Id: I36efe5d5dbaa77d604a54b1dafe07d67f44db4c9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-25 07:10:12 +00:00
Orgad Shaneh
b00017e0ad FileName: Add a soft assertion against invalid parent in parentDir
In case isRoot() returns false, but cleanPath fails to find the parent
directory, return an empty string.

For example: QDir::cleanPath("D:/..") returns "D:/.." on Windows.

I'm not aware of any concrete case when this can happen, but let's be
cautious.

Change-Id: I0f4af5f5c11bb768d99d90290a4a1a6a1bda7c27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-25 07:08:25 +00:00
Thiago Macieira
030901a743 Fix build with Qt 5.12: fully-qualify base class
Without the full name, moc will generate invalid code. This will happen
for any base class whose name exactly matches the namespace it is in,
because in

  struct A : public B::B

inside class A, B is the injected name of the parent class, not the
namespace, which in turn means B::B is the constructor.

Change-Id: If7e743cf8476463880ccfffd155f3f51aa29e8b9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 05:52:36 +00:00
Christian Stenger
1b231d1dc6 Tests: Fix linking without lib tooling
Change-Id: I51110089b1bed337de54dfa7167b2a5aff761837
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-24 15:30:51 +00:00
Tim Jenssen
2bfe4bbf06 QmlDesigner: use better settings names
The name is better and we avoid problems if the default was
saved by wrong old code which is fixed in the current code.
(The fix does not save the path if it is the default path)

Change-Id: Ifd1d4fc7931fed976de12e3e256915458ffc762a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-10-24 14:10:35 +00:00
Christian Kandeler
e0acdaf191 Fix warning about duplicated messages in qtcreator_uk.ts
The file was edited manually, as the C++ file no longer seems to have
the duplication, and lupdate produced too much noise.

Change-Id: I96f186bee16fcd39711e6beaa9c375d5ce3d26f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-24 14:08:12 +00:00
Nikolai Kosjar
110fb7943e Clang: Remove pointless function
Change-Id: Ia4239f5b2aa1cfdd515ec0ff43fc10cb49c6f335
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 12:52:22 +00:00
Nikolai Kosjar
f1290da3cd Clang: Avoid running pointless UpdateDocumentJobs
Opening a document (without typing in it), switching away and back to it
resulted in running UpdateDocumentJobs for that document for nothing.

As for documents we are going to reset, simply set opened documents
initially dirty.

Change-Id: I8edc2d1fb8f6f92950b4e2067f60609176bd5b26
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 12:52:14 +00:00
Nikolai Kosjar
aac1bebace C++: Fix parsing enum specifier II
This amends the obviously wrong
de975aca4f, which did not honored nameless
enum specifiers.

This fixes e.g. "Find Usages" for declarations following "enum {};".

Change-Id: Id98c074156f576b9a63e6c25dab38721ca34e496
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 12:47:03 +00:00
Vikas Pachdha
623294cd38 Android: Fix Android SDK license dialog text
Task-number: QTCREATORBUG-21374
Change-Id: I33a145498d514a47028123639bb0808fc714d371
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-24 12:37:33 +00:00
Ivan Donchevskii
918713a059 ClangFormat: Make more readable helper functions
Change-Id: I25828a17104a778d4be156bf2a2879cefbd08691
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-24 12:23:49 +00:00
Leena Miettinen
075ead9cd9 Doc: Add info about setting the -j option for parallel builds
...on Linux and macOS

Change-Id: Ica8a4714a1f1fa50200613c02b174ae3cc53810c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-24 12:07:10 +00:00
Eike Ziller
d1430c9542 Merge remote-tracking branch 'origin/4.7' into 4.8
Change-Id: I6780d8103a88e31f42c674a96d0f6bcbba16e4bb
2018-10-24 13:39:21 +02:00
Christian Stenger
03fece349b Tests: Fix plugin path for macOS
Change-Id: I085ddbbff09d52878b82f311381c13b94739e84c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-24 11:19:46 +00:00
Robert Loehning
f633801790 Clang: Remove superfluous white space
Change-Id: I4a37e18ca18c673ab5d0906ebb59823baa1b2879
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 10:25:24 +00:00
Ivan Donchevskii
353cc0e5f3 Clang: Fix the completion fix-it wording
Change-Id: Ifc3ab9946caf3716681a1bffd590f0780b796176
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-24 09:45:23 +00:00
Robert Loehning
a81f8dd0e1 Clang: Use multi-arg version of arg()
Change-Id: Iaaf95ea7a8057a66f044ece79c9b40ecd825d59c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-24 08:41:50 +00:00