Avoid the potential side effects from the toString/fromUserInput round
trip.
Fixes: QTCREATORBUG-31259
Change-Id: Id004d71079b4ef8ac26b927921c5cd7a23531110
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fix some missing Tr::, and some namespace usages that confused lupdate.
Change-Id: Ib5a411fc53a28a6b807600db50aacc68955ca5dc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Make usages of QList consistent. In some cases the
declaration contained QVector arg, while the definition
had QList arg.
Remove some unneeded includes of QList.
Change-Id: I7c15b39f261cefdeec6aaaf506ff4cc981432855
Reviewed-by: hjk <hjk@qt.io>
When macro-expanding FilePaths with environment variables, it can happen
that non-conformant path separators end up in the intermediate expanded
string. For example with "%{Env:PROGRAMFILES}" on Windows.
Since we generally treat paths from environment variables as user input,
it makes sense to treat macros as user input as-well in this case.
Change-Id: I0daa57b7dbf3d8fd25c98fb82b2beb1bc6ded825
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
They should have / separator.
Amends commit 4fbc56d453.
Change-Id: I7218c345b271360f24c03aea5ee62be05342afe0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In the New Project wizards, we do have e.g. %{ProFile} that should
expand to {scheme}://{device}//{path-to-pro}, not to
{}://{}//{schemedevicepath-to-pro} or similar.
Task-number: QTCREATORBUG-28355
Change-Id: Idbad709f3fce583f21186a1d43f27ecac15be2ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It's a result of a team work consisting of yellow triangle and me.
Change-Id: I8b4812766da70e0785ae71bf0cb71357379e2514
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Only used once.
Also allow logging of expansion failures.
Change-Id: I357ed6ed28fe379d482358c46b495bc727f86902
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... to take a function returning a FilePath as base.
Implementation is (not) yet changed.
Change-Id: I624efab35cf38631c816b630be5296bdf696899e
Reviewed-by: David Schulz <david.schulz@qt.io>
At least for the host it is imaginable that variables might be useful.
Change-Id: Ia8aeeef49c195db3877256c6726a832ec966c420
Reviewed-by: David Schulz <david.schulz@qt.io>
to ProcessArgs and rename the files to commandline.*.
fileutils was a strange place for CommandLine, and this
reduces the dependencies needed for sdktool.
Change-Id: I9d7e8ffe8a3560f5d12934457b086f9446976883
Reviewed-by: hjk <hjk@qt.io>
There's not much interaction between ProcessArgs and QtcProcess
and both .cpp are still quite big, with non-trivial bits.
Change-Id: Id84202f6c34057bf87cc8f27fbb45f78f105e9a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface
So move these items out of QtcProcess, later potentially to a separate
file pair.
Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
readability-static-accessed-through-instance fixes the places where
the originally non-static, now static functions were called through
instance.
Change-Id: I8cf16c01f7988a7c9d073b5f8ede6a9706b94fb0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Global variables with names such as "CurrentProject*", "CurrentKit*" etc
are harmful, because the term "current project" as used in Qt Creator
does not refer to the "active project", but simply stands for the
project that contains the node that is currently selected in the project
tree, which in turn may or may not correspond to the current editor
document, depending on the "sync with editor" setting. In other words,
the "current project" is almost a random value with little meaning
outside the project tree itself.
Therefore, we remove "CurrentProject*" and friends, except the ones that
are currently intentionally in use. The latter get renamed to
"CurrentDocument:Project*", so their purpose becomes clear. Their old
names are kept around for backward compatibility, but are not suggested
by the variable chooser anymore, so new usages are unlikely and we can
remove them at some point.
We also add some ActiveProject* variants that have been requested in the
past.
Also remove the "CurrentSession" prefix that was deprecated six years
ago.
Fixes: QTCREATORBUG-12724
Fixes: QTCREATORBUG-24606
Change-Id: Ibba5d0e0ce3d2beb444a5eec01fbb9b745d90a1d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.
This is mostly mechanical, with various include/using changes
to make it compile.
Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
For the command and the working directory.
Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.
The patch also makes it actually possible to assign JSON lists and
dictionaries to values.
This removes some hacks involving creating complex JavaScript objects
through string substitution.
Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Prevent a loop where a subprovider of a macroexpander creates
the macroexpander itself.
Change-Id: Id2f3e29651aeb22c818091d8c785a6ea01545463
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The 'invisible' flag is only ever used in the VariableChooser,
which iterates over visible descriptions. Not registering the
descriptions of the unwanted variables serves the same purpose
and simplify the code.
Change-Id: If5c38bc9b61ca66dae5068983181ec1a85a2c8e6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Resolving "Prefix:<value>" does not make any sense, so let's not
do that.
Task-number: QTCREATORBUG-15072
Change-Id: Ia9741f9b48d269a7be31163ad73c3bc232856419
Reviewed-by: hjk <hjk@theqtcompany.com>
Qt 5.3 is the only version we are going to support that does
not offer ui.qml file support. So just check for the QtQuick
version shipped in Qt 5.3 to decide whether or not to display
the checkbox.
Task-number: QTCREATORBUG-14712
Change-Id: Ibb2204f2bcff819b749e1ed744c14a2e96769351
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Since we cannot know if the path should be represented with native
separators or not, we have to leave the decision to the user, by
providing separate variables for it.
Change-Id: I4d06d0a29627f4e82f8b2c7acac06f442c5c5eb4
Task-number: QTCREATORBUG-11896
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>