...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>
... 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>
This helps to overview debug output in case several files are involved.
Change-Id: I12ee23bd7cec4cd344746ef1323afb3f0ab54d4b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Previosly the JobQueue cancelled job requests for some reasons, but not
for others. Conceptually, JobQueue should not make any difference
between those.
Introduce equal treatment and always cancel if a job request could not
be added or is expired as this avoids leaving the Qt Creator side
waiting for a response.
Change-Id: I26b392b7f80b89ba2ae9a46a8d1b51403ec6eb4a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
The one in ProjectExplorer does the same except that it also has a @2x
variant, thus looks less ugly on HighDPI.
Change-Id: Ic6faa8fd48b73cfe0b94eba776433fa12b8e0b09
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We always provide the full includes list ourselves so
it will not change the includes order.
Change-Id: I84ee2ca7f05bfb71ae400f0e9e0b8f52810252b3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Having native dir separators in the autodetected C++ build tools 2015
caused Qt Creator to add all msvc compilers a second time as manual
MSVC versions. Reason was one different dir separator during string
comparison in AbstractMsvcToolChain::operator ==
detectCppBuildTools2017 did the conversion right
Change-Id: Iff04428bcc47636b161b944c94cadf12b0c549da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
From several places in DebuggerEngine::* to one place in
DebuggerEnginePrivate.
Change-Id: Ic87110a11087e338cc9a6b66ea30ea2259861d9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The test executable of the process must be set before creating
an instance of the output reader as the process' command file
path is only read on construction.
This lead to wrong ordering inside the result model at least for
the first test case.
Change-Id: I4140ee02c8e2ea4105d276017a460676514abc91
Reviewed-by: David Schulz <david.schulz@qt.io>
At least TagCurrentChanged can be triggered with a nullptr tag. That
means the current tag is reset to "none". We should thus handle nullptr
in all receivers of beginTagChange and endTagChange.
Change-Id: Ife558beca9fb1ed5ab246b76bbaab19c1c227e8a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
... into a EngineShutdownFinished. They were never handled differently,
and the only option is to proceed to DebuggerFinished anyway. So
simplify the state machine a bit.
Change-Id: Ied3be86fff6750abca578dc6788e4be1d895692b
Reviewed-by: David Schulz <david.schulz@qt.io>
The printing functions are only used by the unit tests and they use an
external API. So we can easily move them to the printing functions in
the unit test project. We have to move the TokenInfo print functions too
because the depend on other print functions. The rest of the print
functions will be moved in other patches.
Change-Id: I87c452f8ca40687ec47de675ba6bee13efa5655b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
It's unlikely you want to have two instances running at the same time,
and SFTP does not let you overwrite a running executable anyway.
Task-number: QTCREATORBUG-19326
Change-Id: Iac48d28f538307fc1764f973ce0c9959ef89af03
Reviewed-by: hjk <hjk@qt.io>
The compression in the rewriter currently cannot handle slides
in transactions.
Change-Id: I2daa77d35b2de5676149d55c2c5efdf55528d868
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Since we clip against the bounding rectangle we increase
the size a bit. This ensures we do not get painting artefacts if
something is 1 or 2 pixels off.
Change-Id: I4d9c40dd25aaa4469b568df914a1290f21790271
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
‘ProjectExplorer::IRunConfigurationFactory’ is already a friend of
‘ProjectExplorer::RunConfiguration’
Change-Id: Ia0c9830b20406f3f94393e1525040dbabb9ba19e
Reviewed-by: hjk <hjk@qt.io>
There's nothing Qmake related in there (anymore?).
Change-Id: I8842d4824065cf3cba61d50b6f333ec3b52e3851
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Can come in handy when the function or member does not directly return
the right value type for the result list, but is implicitly convertable
to it. For example from pointer to class to pointer to superclass, or
from int to double.
const auto result
= Utils::transform<QVector<double>>(v, &ValueType::intMember)
Change-Id: I0e1914d70bb2580b91098dd37e85a31ca14b0ae6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Do no longer expose Nodes from the SessionManager's API. These are now
exclusively handled by the ProjectTree.
Change-Id: I585c2ac919462073870363436e767640775d9045
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The project tree is static nowadays, and the QmakePriFileNodes hold
pointers to their corresponding PriFiles. This is fast, but not
entirely safe: The PriFiles are constantly updating as the project
is parsed.
So make sure not to rely on the stored pointer while the project
is parsing and go through Project::rootProFile() in that case.
Once the parsing is done, the project tree has been updated with
new data, that reflects the current QmakePriFile tree.
Task-number: QTCREATORBUG-19428
Change-Id: Ifaa3432cad7774142d562648d93104629736d478
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
compare file names case insensitive on windows
Task-number: QTCREATORBUG-19418
Change-Id: I4925a7b33f35ce18e906990ffc104b22ea6d73dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>