Commit Graph

51703 Commits

Author SHA1 Message Date
Nikolai Kosjar
a570614f3c Clang: Fix test file name
Change-Id: I27b25e4b8521aabab804812c4cc27cd41c23b46e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-15 08:00:34 +00:00
Nikolai Kosjar
e6a4041003 Clang: Remove pointless member variable
The called function uses already static state.

Change-Id: I22c6cceea6c0c779c4b8ca94b74e0828e27b1f4e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-15 08:00:26 +00:00
hjk
f99352df5c Debugger: Add a display name to GdbServerPortsGatherer
For debugging reasons.

Change-Id: I8136bbfb9a6558ab89f775e8e1410081cda3f95d
Reviewed-by: hjk <hjk@qt.io>
2017-06-15 07:47:13 +00:00
Vikas Pachdha
50856d766d iOS: Fix run issue on iOS with xcode 8.3
Changed the algorithm to find the appropriate DeveloperDiskImage

Task-number: QTCREATORBUG-18380
Change-Id: I4e3ddbc8cfd856f6a503cfa42cb9cc319a21a0c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-15 07:42:11 +00:00
David Schulz
e199ab57d8 ClangCodeModel: Fix compile after ca72c29462
Change-Id: I7a720ce13741cb663628798078c74c98314905d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-15 05:28:22 +00:00
Christian Stenger
f16339f18d CMakePM: Ensure buildSystemTarget is initialized correctly
This ensures the buildSystemTarget will not set to an empty
string and not contains path elements.

Change-Id: Ib993fb3a64a277490e6596cc0662a781d89a4c49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-15 05:17:24 +00:00
Denis Klychkov
1b9e2f76d0 VCS: Fix lost extra options when executing diff and log in VcsBaseClient
Task-number: QTCREATORBUG-17987
Change-Id: I7480669d75137b0791236dce6b9c096c47276365
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-06-14 18:37:27 +00:00
Orgad Shaneh
28e8960a1e VCS: Filter out untracked files only if they don't appear in any project
Change-Id: I9a87f082467f4688c1ebe5dd5e832c9e5a684ca1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-14 15:01:12 +00:00
Ivan Donchevskii
ae10749ffe Clang: Fix slots and function pointers completion
Check completed functions for preceding & and
don't add parantheses in that case

Task-number: QTCREATORBUG-17578
Change-Id: I21b1e2c9ffb9d288f3267146e9afd575e6fef30b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 14:42:11 +00:00
Nikolai Kosjar
f9f10a1e32 Clang: Fix conversion warning in tests
mock-matchers.h:204:60: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
   bool operator()(const A& a, const B& b) const { return a == b; }
                                                             ~~^~~~

Change-Id: I58883118e1eb42f2e0129b760cdce07daf4ac8d3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2017-06-14 14:16:12 +00:00
Marco Bubke
ae485ac551 Clang: Return ClangString instead of Utf8String
Utf8String is allocating memory but for many compares it is not needed.
In an inner loop this can be expensive.

Change-Id: I6320823ab7e086008447eea255e52859a7faaad7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 14:04:49 +00:00
Ivan Donchevskii
02194a5542 Fix build (windows)
Change-Id: Ic57f7f633b73abec26f1d6b9f62ff6d4612911ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 14:01:32 +00:00
Ivan Donchevskii
33a2288c7d Clang: Fix extra space before left paren
Do not add space before left paren in function
because it must not be there

Task-number: QTCREATORBUG-14878
Change-Id: I0fd0e650aeeee59af7bbc157c2fae652109763bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 13:06:47 +00:00
Nikolai Kosjar
ca72c29462 Clang: Provide highlighting for identifier under cursor
Change-Id: I80ffe23cbcc84ab7323124581d9dd6afbe974fd0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:49:05 +00:00
Nikolai Kosjar
9de9da7423 CppEditor: Do not start CppUseSelectionsUpdater for same identifier
Saves some cycles when navigating with the text cursor over the
characters.

Change-Id: Ie9a23d97ac09ca45a32178cae5b8945d0c623811
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:35:26 +00:00
Nikolai Kosjar
38789eb0a6 CppTools: Use class member prefix "m_" in builtincursorinfo.cpp
Change-Id: I8e4079734f9167dcc9da2ceff027f8559bab367f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:33:22 +00:00
Nikolai Kosjar
fdf0a104ec CppEditor: Generalize CppUseSelectionsUpdater
Let CppUseSelectionsUpdater delegate the work to
*EditorDocumentProcessor so that the clang code model can also provide
results.

Change-Id: I6872afbfeea1a5c4a64fdf19fcb1992f134dde08
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:24:59 +00:00
Nikolai Kosjar
cd6bd3c4d8 Clang: Move completion test
Change-Id: I61cd72c131407415732ed1231a4614be57c1454b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:24:52 +00:00
Christian Stenger
706da24733 QbsPM: Fix compile with Qt5.6
Change-Id: I21855bfd173ad6e85329d83b2337efc37359be6e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-14 12:22:20 +00:00
Nikolai Kosjar
18bdbe1b0f Clang: Do not expire job requests with newer document revision
...than currently reflected in documents. Otherwise such requests expire
immediately.

Needed for a follow-up change.

Change-Id: I456aea02a0fee9b9602a59a99943da13a01472d9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:05:18 +00:00
Marco Bubke
bc22192813 Sqlite: Fix compile
Change-Id: I098ba3f2a896f3f1f675a81b48cd41364aeaa631
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-14 11:49:33 +00:00
Nikolai Kosjar
de5cbacae5 Clang: Rename JobRequest::Requirements to ExpirationsReasons
...to avoid ambiguity in regard to a new enum in a follow-up change.

Change-Id: I4f732b5200ed674b6708510ac8de0a795afe52da
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 11:48:54 +00:00
Nikolai Kosjar
e8ce2e62d2 CodeAssist: Do not retrigger completion when applying a snippet
This fixes the following case for the ClangCodeModel:

 1. Trigger non-member/non-prefix completion.
 2. Choose the generic "class" snippet.
    --> The snippet is inserted, cursor is right after "name", but it
        also triggers another completion that proposes e.g. the "namespace"
        snippet.

This does not happen with the built-in code model because at that cursor
position it provides "name" as completion result, which is a perfect
match and thus suppresses the completion list.

Change-Id: I2f797469b2a0952406b50c28f9704b113e19b16d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-14 10:43:36 +00:00
Marco Bubke
43d6726c70 Clang: Add equal operators for ClangString
Converting them in a Utf8String in an inner loop can be quite heavy.

Change-Id: I4f2ccde47a6e3ca08ed054462eb7772ded9e55c9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 10:14:07 +00:00
Marco Bubke
f22bd9dc4c Clang: Fix warning in HighlightingMark::punctuationKind
Actually mixing returns and not is not that well readable workflow. A other
option would be to use if.

Change-Id: I36f07adb77d50ddc6890b6292c7883a1b5f80f58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 10:07:20 +00:00
Marco Bubke
451123beea Clang: Clean up keyword highlighting
Change-Id: I8c2737718282d047e487b8ed82a40dc256d39ce5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 10:06:59 +00:00
Nikolai Kosjar
e6bf399003 Clang: Stop highlighting keywords in preprocessor directives
Task-number: QTCREATORBUG-15516
Change-Id: I30046ae7c1a73144985639800227012bf5a4e357
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 10:00:02 +00:00
Christian Kandeler
7ffdcd102d QbsProjectManager: Make the configuration name explicit
This is a prerequisite for being able to import builds.

Change-Id: I22bd8f201db943335edadc899bfe9fa64d39e845
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-14 09:11:56 +00:00
Nikolai Kosjar
e63841cf3e CppEditor: Fix nullptr access
...for invalid code.

Task-number: QTCREATORBUG-18355
Change-Id: If5d4d90a7dbaa770008e4e6c54c7ff3a86c6da89
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 09:07:17 +00:00
Marco Bubke
3fb25b28e3 Clang: Cleanup IPC code
Change-Id: I29571801b4093337e2c7cc1eec51cfcd07b3bdc5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 08:46:21 +00:00
hjk
f97875a870 Utils: Make Port::number error out with -1 in the invalid case
That's more consistent with 'default' cases QUrl::port() and internal
Utils::m_port representation.

Change-Id: Ia6ee413f92e94c202f70d734e79976a0cda0d9ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-14 08:43:20 +00:00
Eike Ziller
937bb39ff2 Work around slow painting on macOS
This got prominent by removing the OpenGL based QQuickWidget from the
Welcome mode.
Basically painting is very slow to the point of unusable when there is
no OpenGL widget in a window. The moment an OpenGL widget is in the
widget hierarchy of a window, painting is much faster. This is
especially notable on HiDPI screens, e.g. using 1.5x or 1x scaling on 4k
monitors.
This is also reproducible with older versions of Qt Creator when using
additional editor windows or diabling Welcome mode.

Restore the status quo by adding a dummy OpenGL widget to welcome mode
on macOS.

Task-number: QTBUG-61384
Change-Id: Ia1a4738dd2070d70d8be42d4d717099d3933248b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-14 08:40:47 +00:00
Alessandro Portale
646abdd445 Utils: Make the progress indicator themable
Ensures a consistent visibility with light and dark backgrounds.

Change-Id: I8e825ccf05248abb2c94c4cd3af56d0226bc7e96
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-14 08:30:03 +00:00
Eike Ziller
0316219f8d asConst: Simplify with C++11/14 and fix for rvalue refs
add_const is available since C++11, add_const_t since C++14
Use universal reference && to enable uses like

for (const auto item : Utils::asConst(foo->items())) ...

Change-Id: I17ee19dae22a306ccf92035f43e60e91b32dffd7
Reviewed-by: hjk <hjk@qt.io>
2017-06-14 07:30:57 +00:00
Christian Stenger
6621f5594f iOS: Fix compile with Qt5.6
Change-Id: I0ee2e97b94da72140631df01c6ddf59252e5138e
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-13 13:40:48 +00:00
Christian Stenger
931d334392 AutoTest: Clean up includes
Change-Id: I55a2ac8d3d625cbdd6b03c6a0ee11996e45cf981
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:50:30 +00:00
Christian Stenger
c1555b1d7e AutoTest: Provide way to access the original test output
When running tests the original output is processed and not presented
to the user at all. For crashing tests this could mean that output
was not able to get processed completely (e.g. when having XML as
output and relying on well-formed code)
Unhandled output could also lead to incorrect results.
This patch adds another view to the results pane which contains
the complete output of the last test run.

Change-Id: I923496e9c440de4ea68bee55415777ea5c2379c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:50:22 +00:00
Tobias Hunger
460e1d7e93 CMake: Add "test" target to cmake builds
Always show a test target for cmake projects. This will show even
if there are no tests in the project. But I think it is more annoying
*not* to be able to run tests via the locator when tests are available
than getting an error message when attempting that with a project that
does not have tests.

Task-number: QTCREATORBUG-18323
Change-Id: Iba85aa868cb9bfe6c3f44a7ffff620d081d3082f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-13 12:47:44 +00:00
Tobias Hunger
e78324dc17 ColorSchemaEdit: Make layout of color selection dialog cleaner
Add some section headers, make widgets align with more other widgets,
get rid of useless margins and make hiding elements not leave random
amounts of space between elements.

Change-Id: I3d2ce7a00a92cdff5af5b7aa5e2784460d388c85
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-13 12:47:27 +00:00
Tobias Hunger
190f2d9e8d Mobile platforms: Do not use QLatin1String in BuildSteps
Change-Id: I3d67e94e7dc2d86ac1eba641562ee4a045f95d6c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-13 12:46:51 +00:00
Tobias Hunger
05e0b001d3 ProcessExplorer: Remove QLatin1String from AbstractProcessStep
Change-Id: I1eed445b2e0400272ded021123420eee279ea1df
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-13 12:46:41 +00:00
Tobias Hunger
9f4583756b ProcessExplorer: Do not use QLatin1String in ProcessStep
Change-Id: Ic72e1cfe6d164d5f137ce4451033a9992bc2fd13
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-06-13 12:46:36 +00:00
Eike Ziller
a456375187 Do not put locator manager into object pool
Users should use the static interface (and they do).

Change-Id: I2b8f6a379a45975d94fc8e77f86df9a16f2c9cf1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:42:21 +00:00
Eike Ziller
247639d9c3 Remove 1-1 dependency between locator and locator input widget
Add possibility for filters to set a new search text when accepting
an entry.
Move placeholder text update from locator manager to widget.
Propagate filter update through signal-slot connection instead of directly.
LocatorManager::show is the only place left that directly references the locator widget.

Change-Id: Id61354d9f166c2af8c9d5528ad8998c7c6b8e1ab
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:42:13 +00:00
Eike Ziller
9f83808dc0 Add missing includes in projectmanager.h
Change-Id: I75df00be7832e5da350bf19cac8ef99f8cd17386
Reviewed-by: hjk <hjk@qt.io>
2017-06-13 11:29:32 +00:00
hjk
19a47fed29 ProjectExplorer: Remove various RunControl::report* functions
The interface has now moved to the RunWorkers.

Change-Id: I1ebf74c081697b8e44926ab00053417f9f60647d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-13 11:07:15 +00:00
Tim Jenssen
0448ac5ce2 add style icons to wizards
Change-Id: Ia5741e68d9ce0a812080bfba7b120f5d5575c210
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-06-13 11:03:12 +00:00
Alessandro Portale
a1d4b63f8d CPlusPlus: Add a property icon
Properties have been so useful in Qt for Years, and they will
continue being so. Properties deserve a proper icon.

Change-Id: Ifd19c97470a48a033bbe4017855f7b150befb365
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2017-06-13 09:53:28 +00:00
Marco Bubke
be42d40c44 Fix text style name for output argument
Change-Id: Ibfc3584b60a073ba6518f78d2aa67b69bd6dd2a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-13 09:16:40 +00:00
Christian Stenger
3cd688ca44 AutoTest: Avoid full rescans if not necessary
The file system watcher triggers way too often as it
acts not only for removal or addition of files, but
for any change like mtime or similar.
Doing always a full rescan is painful, so limit this
as much as possible to the files that have changed.

Task-number: QTCREATORBUG-18315
Change-Id: Iba4705ff58c34e998d8cf1b40761758c6fd65680
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-13 07:24:35 +00:00