Replace 0 with nullptr where applicable
Initialize members in declaration
Change-Id: I3d8bae845be01e27db2c591f8037d3823f25f67d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
...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>
...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>
This trick is needed only for internal purposes.
Change-Id: Ic10c0898519eed663d14c4b1665a0d6b0d47b4a4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>
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>
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>
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>
There is no restriction of renaming the current branch.
Change-Id: I51f3f8d69d1fb108a23a9e9f98364361828531d3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
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>
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>
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>
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>
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>
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>
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>
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>
Reorganize and edit the information about run configurations.
Change-Id: I84f835da2f6b6cd4ff02831e387475e8c07c6e55
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...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>
+ fix display of install root with variables in equivalent command line.
Change-Id: I9f8ab6dba80afddd0ee5116947c11752ded8129f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
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>
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>
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>
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>
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>
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>