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>
This change reflects what the macOS users will see when they use the
command line to call Qt Creator.
Change-Id: If6b644390ad06d5ddbe349507713eb2d2e27cef6
Reviewed-by: Jake Petroules <jake.petroules@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>
...fixes file saving on Windows in specific circumstances.
File deletion on Windows is quite tricky. If you simply
remove the file opened by another app that shares it for
deletion the file might become semi-removed. It looks
like it still exists but it is in fact inaccessible for
any operations until the other app frees the handle.
To solve that case there is a ReplaceFile API call
which carefully deals with that case.
[Backstory] Oswald Buddenhagen insists that this fix is
rather a workaround and we should solve file access
problem in llvm.
For that purpose we have QTCREATORBUG-19404 and upstream
https://bugs.llvm.org/show_bug.cgi?id=35558
Task-number: QTCREATORBUG-15449
Change-Id: If37d484231b79d8e33822c795232dc31243c88c0
Reviewed-by: David Schulz <david.schulz@qt.io>
When we derive from QTemporaryFile we can't unlock file
to be used by outer functions.
With this change lock is managed by m_tempFile variable and
can be released by reseting m_tempFile.
Change-Id: I41339410471c69d1e73df49f04bc2d5c2036a064
Reviewed-by: David Schulz <david.schulz@qt.io>
If the settings dialog contains more than one visible tabbar when
trying to access its tabs Squish fails to distinguish them.
Assign a unique name for the main tabbar of a category inside
the settings dialog.
Change-Id: I349b480871306784b5adc9858984933dc26d7958
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
... into QuickFixAssistProcessor and QmlJSQuickFixAssistProcessor,
by essentially duplicating the class, but moving the actual work to
a new a GenericProposal::createProposal(...QuickFixOperations...)
Less indirection, and less code in total.
Change-Id: I2f8cba970bf587c9cbf04321269a60ed51bfae2a
Reviewed-by: David Schulz <david.schulz@qt.io>
Make it return 'this' if 'this' is the master engine itself.
Adapt users.
Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.
Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
It did not contain any functionality beyond the base IAssistProvider
anymore.
Change-Id: I0198b3d629f81be8c994ffed3904b5f12ee7f9b9
Reviewed-by: David Schulz <david.schulz@qt.io>
It's a copy of the locally direct accessible g_outputPanes.
Change-Id: I22d34946d777ef63b1888382c2d2bd49a0da8f8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We have a few off-by-ones in the visualization of selection, boundary,
etc. Also, there are differences between low and high DPI, aswell as
different platforms.
This manual test is supposed to enable proper analysis whether the
visualizations are correct or not.
Change-Id: Iee407d37a2c6f2f272e11a4d9774532343463bc1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The previous "<<<" and ">>>" are visually hard to catch in the output.
Change-Id: I7313645454d92ca3534b19070173129676d49e18
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.ipc") is already in
clangbackendlogging.cpp.
Change-Id: If1afa6f266505e696ea00c6ca6bdf0751640784d
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>