Slims down publicly visible interface and could be one step towards
replacing the CppQuickFixFactory derived classes by plain
stand-alone functions.
Change-Id: I9c6a8bcbd8481e14fb21dd41b11a1e6153a35e4b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We cannot simply assume that stateIndex + 1 is a valid index.
The removed state might be the last state.
This triggers an assert in Qt 5.11.
Unfortunately there seems to be an issue that forces us
to reset the model. Without reset model the ListView delivers
the wrong data to delegates, after the item was deleted.
Some minor code clean up.
Change-Id: I935e3358382371d31f0ff44c0ded229d35950648
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
...when the cursor points to the next token but
the current one is selected.
Change-Id: I73fe1b0c82ccda0489b878f3909b8767c54b5ec2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Dropping something on QtCreator will now signal either file drop or
other value drops. With the old implementation drop receiver might
not be able to differ between the two.
Also dropping files signals the drop position (which may be ignored
by the receiver).
This change is needed for a future change to fix issue
QTCREATORBUG-19117.
Change-Id: I56a72ba3d925de19979f3f90d161adc4f4986e20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
(and fixed the cases with non-const Qt container)
* Sort includes to common style
Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Qt Quick Controls from latest Qt dev (upcoming 5.11) now complains:
QML ImageToolButton: Detected anchors on an item that is part of a
layout. This is undefined behavior.
Instead of anchoring we can use the fillHeight attached property for the
same effect.
Change-Id: I7fa49400bace04e78c2db8cc53e5bab2a0dfbabe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Override the target setup, so that we don't try to initialize build
configurations.
Change-Id: I8f8022c705ea54dd66df828fdb4837d4a41bc96e
Reviewed-by: hjk <hjk@qt.io>
The possibly intented flexibility e.g. to have different project types
share the same idea of a common context was never used, in all cases
we had a 1:1 relation ship between project ids and ids that were used
as context. This led to oversights like the one fixed in 60fb35a2.
This patch here uses the project id unconditionally as context and
drops all context ids. If we'll ever have the situation where the
original flexibility was needed, Project::projectContext() could be
made virtual and overridden were needed.
Also, the context was never modified for any given project, so the
updating machinery is not needed.
Change-Id: I3f7fac0ed5e4704e126558987c48577f26082dfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Previous fix accidently broke saving files that do not
exist yet. They need to call rename instead of ReplaceFile.
Change-Id: Ida47845a59c1f2fe26a39dc593ab0f83fae9d18b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The mapping was not quite right. In particular, cpp.cCompilerName needs
to be set if the compiler name is not the default.
Task-number: QTCREATORBUG-19467
Change-Id: I6c190fdda98ff15dce6066bfb082d24853538a78
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Add support for output as std::map/unordered_map/set and QMap and QHash,
when giving the full result type as template argument. For std::
(unordered_)map, the function must return a std::pair<Key,Value>, for
QMap and QHash it can also be QPair<Key,Value>.
Change-Id: If3dff17ab6aa5d1b11abc244813fd885d10c75a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Support containers without reserve() as result container, for example
std::set/deque/list
Change-Id: Ia96b834c67d5ee74bfb9de2cf6b86639f6b3d5d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Sometimes you want to get raw pointer container from smart pointer
container and reference container from value container.
Change-Id: Ia018d572ac0a7bf742f3937dc38ee30670a3ca73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Replace Evaluate with AddSymbol and create a PyValue representing
that expression
Change-Id: Ibb8ab70c41df81e9d7d683b633a070caa03036d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
"enableInfo" actually was the reverse of "suppressInfo", so make that
obvious in the naming.
Change-Id: Ie9210533d9169d9bf486eb4034c8264b5bddda8b
Reviewed-by: David Schulz <david.schulz@qt.io>
We can now give FunctionDefintion *any* fore/background color.
FunctionDefinition is now a "color overriding mixin" to
Function and Virtual Function. Previously, FunctionDefinition
could only get a color that was an offset to the color already
given to Function and Virtual Function.
TEST=The FunctionDefinition-option can now set fore/background colors.
Requires Clang.
Task-number: QTCREATORBUG-16625
Change-Id: I0ef5fd30a3762aa2cb4a7684fea2620041f7cf7e
Reviewed-by: David Schulz <david.schulz@qt.io>
This is the first implementation of "color overriding mixins".
Mixins are already initialized with fore/background color =
QColor() = "invalid color" (see Format::createMixinFormat).
This patch uses above contract in FontSettings::addMixinStyle.
Only mixins with a valid fore- or background color can override
other style options' colors. Unset mixins will have no effect.
TEST=No functional change (will be enabled in a follow-up).
Requires Clang.
Task-number: QTCREATORBUG-16625
Change-Id: I983bb876c060963f6d66cc64881bc138e384f5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
Combine host, port, username and password into a 'url' member and
add some convenience accessors.
Change-Id: Iddc26ff00dad1285c96aa56f196dbc4febe8e974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
They are not time-ordered like normal messages, so we need to buffer
them and only insert them when the normal event stream arrives at their
timestamp.
The time ordering is important as the "restrict to range" feature uses
it to determine the start of the range.
Change-Id: If27a3f667c4c39e69efa95fcb9cdfd3dbf01e657
Task-number: QTCREATORBUG-19456
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
All of a sudden, using modulo with a negative divisor in qml/js crashes
with the latest Qt dev (upcoming 5.11).
Change-Id: Iabd7fbaf7367ff630065d6863e03c10710bf0cd4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Since we do not have a specific project node where to add the file(s),
the user has to rely on the guess that is already done by the project
management wizard page.
Task-number: QTCREATORBUG-19213
Change-Id: I4ee2f81cd7b8d7ac2391d2c11eb53a695968233c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
It's only ever used in the filtered Cpp/QmlJs variants. Splitting
the class simplifies the code and avoids re-doing filtering over
and over again.
Also inline QuickFixFactory::matchingOperations() into callers
Change-Id: I730756315f2e0321649259ef229631233b12fbdd
Reviewed-by: David Schulz <david.schulz@qt.io>
When building Qt Creator with MSVC, this is the only warning I get:
warning: C4309: 'initializing': truncation of constant value
It would be great to silence it.
MSVC supports the "i8" literal extension, which would be fancier than
the cast, here. But I don't know what other compilers think of it.
Change-Id: I3f1bb4f58f6ab378cbeb44a667aebc5ddee25eec
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>