Fix a race condition in the following scenario:
QtcProcess proc(...)
...
proc.start();
proc.waitForStarted();
if (!proc.waitForFinished()) {
// handle failure here
return;
}
// handle success
Move all the data into the caller's handle
and manage the QtcProcess state only from
inside caller's thread. This eliminates race
conditions when state changed from inside launcher's
thread while the caller's thread isn't notified
immediately.
For example: currently, when the launcher's thread receives
finished signal it doesn't change the process state
immediately, but posts a finished signal to be
dispatched in the caller's thread. When the caller's
thread dispatches the posted signal (inside flush() method)
it changes its state and posts the finished signal to the
outside world.
Don't flush all signals from waitForStarted(). Flush
only started signal in this case.
Change-Id: Ia39c4021bf43b8d0e8fcda789c367c096bfd032c
Reviewed-by: hjk <hjk@qt.io>
Also define the themeUnimportedModuleColor value in the theme files.
Fixes: QDS-4935
Change-Id: I3fc0b2316ebc1b11e4de87c09e2136e768e5cbe2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
E.g. when the last use of the libraries was removed from .pro files.
This also makes the use more similar to the other build systems and
allows making Project::{add,remove}ProjectLanguage private.
Change-Id: Ib23d83f2fb5aab728b344c164a1331429b44e345
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There's only one kind of use, in the context of BuildConfiguration.
Change-Id: I09628ff443ef08e28738125a614c17d5d979189b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Change the lifetime of LauncherInterface. Now it's being
constructed when startLauncher() is called and
destructed on stopLauncher(). Before, we hold the
static LauncherInterface object and couldn't control when
it's being destructed, so in fact the destruction
started too late, after the QtSingleApplication's destructor
finished.
Simplify LauncherInterface::isStarted() method.
Change-Id: I91f38212177318746d2530a418eb3efd3d9258cb
Reviewed-by: hjk <hjk@qt.io>
There may exist components that do not belong to any project.
Task-number: QTCREATORBUG-26166
Change-Id: I77f5ec9c5d718300a38db203f9b5d1b1a4e96d1f
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also fix an untimely translation and its context.
Change-Id: I9859216a458d5cff93bc9caa93164435b86d8383
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
- New styles;
- Rework to be more reliable with complex names.
Task-number: QDS-4750
Change-Id: I63d89575540a463e8b6786c82a28effa185f10c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
With Design Studio branding the temporary path got just too long (107
chars). Make the file name shorter, and add a warning for future
reference.
Change-Id: Id5ff448d55a8b109234b7c113695ea54b1836a2f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
cancelChecker is an optional parameter.
Change-Id: Ie47ae834a34f8ebf8c901e4dcaf7a9c3af5c0ce4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Literals like 'true' or '1' are no bindings and should be set
as variant properties. This requires special handling for QVariant.
Task-number: QDS-4684
Change-Id: Ib831fb78e76fbd7563fe3897b8a2c5379ee9a9db
Reviewed-by: Tony Leinonen <tony.leinonen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Opening an editor starts a new parser, so we must do that before we wait
for the parsing to finish.
Change-Id: Iee9da8da1fb60bf496a093d8efd878101d91f53f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... using a new CommandLine::fromUserInput convenience function.
Change-Id: Ic786530af89ec80f4211e66f36caa22cb705effe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The type is implicitly given by the command's executble FilePath.
Also, rename the rarely used addArgs(const CommandLine &) overload
to addCommandLineAsArgs() and make it strip scheme and host from
the wrapped executable as there are no uses expected where keeping
them would be the right thing.
Change-Id: Id0b76778e7e01ac16e477f36bf30bb28d96bb177
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In shadow builds copies of the QML files are loaded.
When setting LOAD_QML_FROM_SOURCE the QML source files will be loaded
from the source directory instead.
Works only for cmake and qmake
Task-number: QDS-4317
Change-Id: I6e82864f073cb2fdf1111daf74a133c556e8721b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
std::iterator is deprecated in C++ 17. The aliases should be set directly.
The aliases are public too.
Change-Id: Ib4dc259b03bd9386ba9d177340b89cc7208c8643
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diverts to searchInDirectory(). Use it in some places.
Change-Id: I9e5642f0ae0ed4dd9fb9f34bcaa11a25bd26c690
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Switching back and forth between targets or build configurations could
result in an arbitrary amount of C++ parser threads running at the same
time, wasting valuable resources.
We now cancel a currently running parser thread when starting a new one
for the same project.
Fixes: QTCREATORBUG-24890
Change-Id: Ie1afc4971515fcad01dae182578fd77daa642cec
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
... as wrapper around FileUtils::normalizePathName, and use it
in some places.
Change-Id: I42792e1f175b8119c8db930eae80a9f822ac70fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Currently EditorManagerPrivate::addEditor() adds a Watcher for any
document unless it's set as temporary.
However some documents may have no associated file name (for example, VCS
editors content), yet not explicitly created as temporary. This
eventually leads to an empty file name in the list of paths to watch.
Thus this triggers a check-warning:
QFileSystemWatcher::addPaths: list is empty
Since IDocument::filePath() in general is not guaranteed to be non-empty,
then it makes sense to add a Watcher only for documents with an
associated file name.
Change-Id: Ie7eacb7f90af399e6b1a837e1644bd5a1fe99212
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Starting with version 3.20 CMake adds -std:c++20, which breaks the
code model when using MSVC.
Clang-cl 12 doesn't know about -std:c++20, but clang driver knows
about -std=c++20.
Fixes: QTCREATORBUG-26146
Change-Id: I696842e11b0a9ba8849455d2f81f8dde6dd95a27
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
...when creating a new project on first launch of the QDS using Qt6.
Task-number: QDS-4474
Change-Id: I486ecde9306bcacb3619e291d2967b411a362d5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Ignoring python, pure Qml debugging is fine without debugger in the kit,
everything else not.
Fixes: QTCREATORBUG-26152
Change-Id: If6ebb50968ede85e8210e191dbabd51cf61e177b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This way you will get the variables in the variables list and you only
need to change them from OFF to ON.
This won't fix the tasks below, but it will remove the lookup of the
special variable names.
Task-number: QTCREATORBUG-25680
Task-number: QTCREATORBUG-25891
Task-number: QTCREATORBUG-25972
Change-Id: I8ed1d5c4275516b10f4f10ad63b3de0f6b2ffbc8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>