This adds cmd's executable and arguments one by one to this commandline.
Useful to construct command lines for 'sudo', 'nice', etc.
Change-Id: I76067bc10e269b8e7ff4d945449be3633b321281
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also update docs according to the API review results.
Fixes: QDS-3581
Change-Id: I163b75421432391f4ffea334ffbc4ddacbf3e4e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Do not remove items of a container while iterating over it
instead revert to old behavior of allocating a temporary.
Broke with cf010911f7.
Change-Id: Ie76974f1e74469f80ee28fb2011d66690dd9e917
Reviewed-by: David Schulz <david.schulz@qt.io>
This will be handy once we want to debug processes running as root.
The mechanism is the same as for "killProcess", and currently unused.
Change-Id: I2c5e5b77577ca32ed1118fcc81c03c6320db8800
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When we are going to delete Parser object, it may happen,
that its timer is still being active. A call to
parserThread.quit() won't stop the timer. When we quit the
thread and wait for it to finish, the thread's timer may
still be active. Then we delete the Parser in the main thread,
what cause the following warning to appear:
"QObject::killTimer: Timers cannot be stopped from another thread".
In order to fix it, we post a request to the parser's thread
for stopping the timer by a call to aboutToShutdown() with
Qt::BlockingQueuedConnection, just before quitting the thread,
as the thread's event loop should still be spinning and is
able to receive and handle our request. It's the only safe way
to stop the active timer that was started in another thread
- it must be stopped it the same thread it was started in.
Inside the call to aboutToShutdown() we mark that we don't want
to start the timer anymore with m_shuttingDown flag and we stop
the timer. After the blocking call returns to the main thread
we are sure that the timer is not active anymore and it won't
became active in the future, so we safely quit the thread and
delete the timer.
Task-number: QTCREATORBUG-25317
Change-Id: I3b95c062b5561588c45c223d8588b2b700ad4040
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make all of the fields of SymbolLocation and SymbolInformation
const members. Optimize a bit operator== of these structures:
check first if hashes are non-equal - in this case return
false early. Fix hash type of SymbolInformation for porting
to Qt6 purpose.
Task-number: QTCREATORBUG-25317
Task-number: QTCREATORBUG-24098
Change-Id: I769f99ff3157093e9f10ee3929bc7f6eb83f34e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make the API of ParserTreeItem const only.
Reorganize the code a bit:
Transform ParserTreeItem::add() method into private
mergeWith() and add a static method
ParserTreeItem::mergeTrees().
Remove ParserTreeItem::copy(), as in case of adding
projects we may use directly the instance from cache.
Remove now unneeded Parser::addProject() and use
directly getCachedOrParseProjectTree().
Transform ParserTreeItem::copyTree() into private
cloneTree() and make it a const method.
Move document symbols parsing code from Parser into
ParserTreeItem and add a static method
ParserTreeItem::parseDocument().
Remove ParserTreeItem::addChild() and provide instead
an overloaded constructor.
Allocate QElapedTimer object only when debug is on.
Fix some const correctness.
Remove some ugly usings.
Added some TODOs.
Task-number: QTCREATORBUG-25317
Change-Id: I6e7c48bb118b0d826fbb463cae94d59bf43a6938
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In fact, all the methods inside Parser class are
called only in one thread (parser thread), which runs
his own event loop. The exception is 3 methods
(canFetchMore(), fetchMore() and hasChildren()),
which may be called concurrently from the main thread.
However, they are protected with another mutex.
So, project and document mutex were protecting
the access to internals only when called from
one, always the same thread, what is not needed at all.
Task-number: QTCREATORBUG-25317
Change-Id: I0b44b762b5d76d003035e9c3099c90568b7faf80
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When parsing is being done we are producing a new
ParserTreeItem structure from scratch. This includes
creating new ParserTreeItems or getting data from
caches. So, we are not interferring with the
data stored in the rootItem. After the rootItem
is set, Parser doesn't modify this structure
anymore. There is no need to protect the parsing
with the mutex, as only 3 methods which are called
concurrently operate only on the rootItem: fetchMore(),
canFetchMore() and hasChildren(). Instead, we
protect only the process of setting the rootItem
to the new value. Similarly, we protect only
the process of reading the rootItem inside
findItemByRoot().
Task-number: QTCREATORBUG-25317
Change-Id: Ieda10107137f5031a81d67f2d608a90f6e72902d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Otherwise when we switch session we still keep
the data about the old session in the cache, which is pointless.
Protect clearing both caches with both mutexes, so it comes
atomically.
Task-number: QTCREATORBUG-25317
Change-Id: Ic5bc7ae2b8640e9290024e00c394ca9608f88da9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We had three different hashes that cached the document data.
Replace it with one cache. Provide a dedicated structure for it.
Task-number: QTCREATORBUG-25317
Change-Id: I6592de62b7c026a9236a295657c9c06f6e9e5b4c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We had three different hashes that cached the project data.
Replace it with one cache. Provide a dedicated structure for it.
Task-number: QTCREATORBUG-25317
Change-Id: Ib6bafd38ee3c48f3e4960be1650709af777f255a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
qlitehtml moved into its own playground repository,
get it from there instead of carrying our copy around.
Change-Id: I0e267344e5ccf95f579e4fb239e6789d177d7b78
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
... to be able to add more features to this dialog.
Change-Id: If8692bee484e25c1ba5e4ea629a77d14ff5d92ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Downloaded files get a quarantine flag on macOS, which prevents loading
them as a plugin in Qt Creator. Remove the quarantine flag when copying
the plugin.
Change-Id: I3edef3ddfbab299be750e728a9fac0536634ba1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is not exactly what the linked task complained about, but
solves the issue. Disabling the central editor is rarely useful
(it can be limited to three lines in height) but still temporarily
possible with this patch.
Task-number: QTCREATORBUG-25315
Change-Id: I18182e11d7d3e2167a24a340ab1ae7222009b8c9
Reviewed-by: David Schulz <david.schulz@qt.io>
These options indicate whether a server provides extra messages to track
the status of specific requests.
Change-Id: I3fb78f7fa7144a5a9418b32cb5b33d55b668c484
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... involving accessing the member of a nested anonymous union from
within the surrounding class. libclang reports a CXCursor_CXXThisExpr
for this location instead of a CXCursor_MemberRefExpr. However, the
latter is still locatable in the AST, so we can correct this.
Fixes: QTCREATORBUG-25342
Change-Id: I1eba13d5153205a52b3689d8ad52493a56b76c07
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Shader changes seem to be reflected to preview even without explicit
restart, and the explicit restart will cause preview to crash when
shader files are modified in QDS.
Fixes: QDS-3741
Change-Id: Iacba712bcfe38831d76febd8074c683e2124223a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Running applications on iOS requires declaring a bundle identifier and
version numbers in the application's Info.plist file.
Unconditionally add them, since they also make sense for desktop
applications, even if they are not strictly required.
Fixes: QTCREATORBUG-25297
Task-number: QTCREATORBUG-23574
Change-Id: I2269bec2d4eaf3e8dd3332a027b284049b3b8b42
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The next baby step towards full aspectification. Ultimate goal is
to dissolve CMakeBuildSettingswidget completely.
Change-Id: Idb2bb852d1010f69f11ec8ca87c4695361a38b83
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Instead of clearing the project's file list completely,
remove just a project (in case a removed file was a project)
and remove from all project's lists the removed file (in case
a removed file was contained in any project).
Task-number: QTCREATORBUG-25317
Change-Id: I63a5f9eb1043bd0d9b835d55f4a16f7f6af7bc6e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The formatting functionality was moved into languageclientformatter.cpp
Change-Id: Ieeafd49c297a854e478a11d4fcb81062b9cfcf19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This will become necessary when qlitehtml is a submodule with litehtml
as a sub-submodule.
Change-Id: I8a2ca47d24bc4b4f3ff88908a49d3f1933ec59ea
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
- Updating project template to match new CMake API of Qt for MCU v1.7
- Preserving backward compatibility with previous versions
Task-number: QTCREATORBUG-25307
Change-Id: I8e45b69f440c7b7b63d3803c315658c6ef618952
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
After fixing QTCREATORBUG-17977 we don't have Subprojects
mode anymore, since currently Parser::addProjectTree() and
Parser::addFlatTree() are identical. For now, we just
remove this duplication. The subproject mode to be fixed later.
Amends 8634aa4cbd
Change-Id: I53d1b5a7354295449c2995c4421f8fa21a3ac2be
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Visual Studio / Xcode generators are not setting the CMAKE_C|XX_COMPILER
variables, and when importing such a build the generated kit will have
no
compilers and won't be much of a use.
Luckily CMAKE_LINKER has the path to link.exe / ld, which is the same
path for the compiler cl.exe / clang.
Change-Id: Id21bb0ec2d5aa6ab5a185e03992477c433ac4798
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Until Qt Creator 4.14, the QuickFix for setter/getter creation for
simple members added the implementation in the .cpp file.
The new QuickFix settings in Qt Creator 4.15 in theory keep the default
like before, but the threshold of 2 lines is usually not reached, which
causes the getter/setter implementations to now land in the header file.
This change sets the default threshold to 1 to restore the previous
default behavior.
Fixes: QTCREATORBUG-25331
Change-Id: I570deaa8b81686dc31254e8261b59ddcf8731f91
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We have quick fix factories that do not require an ast path at the
cursor position nowadays, for example the quick fix factories that
provide fixes from the clang tools. Move the check to those factories
that rely on a valid ast.
Change-Id: Iab4b30d5935fbd32f101fb5fda60e994f14dc94c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make this method just virtual, not a pure virtual.
Remove all empty reimplementations of this method.
Change-Id: Idf10e492355e8519172facd421ea0b2b13ce3b80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When Locator::refresh is called, the refresh may be currently
ongoing - in this case we cancel it (and don't wait for it to
be finished) and start a new refresh. So, in theory, refresh
may be running in parallel on more than one non-gui thread.
The consequence may be, that when we then shutdown, we wait
only for the last refresh to finish (we are connected to
m_refreshTask), and doesn't wait for the canceled one to be
finished. This may potentially cause a crash.
We fix it by ensuring, that only one refresh task is run.
Change-Id: I62eeb00375124cdc0ab4651e9280226071d47f3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>