As of commit aaa8beab88, template files for XML wizards go through
Utils::TemplateEngine::processText and thus need to have their
backlashes escaped.
Fixes: QTCREATORBUG-22945
Change-Id: I33aaa73b66be065f0ba3ed9b45cb8c9558f70d31
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Wizard authors can now provide a persistence key to values where that
makes sense.
For now, we make use of it for the build system type in all wizards and
the minimum Qt version as well as the virtual keyboard settings in the
QtQuick wizards.
Fixes: QTCREATORBUG-16657
Change-Id: I179930665bd163b1cf198467ab8b43bc72f8ec4a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
"\." is an invalid backslash escape sequence in JSON. QJSON accepts
this though and silently "fixes" the string by removing the stray
'\' character. This is QTBUG-78443 now, as a conforming JSON parser
should reject invalid data.
The string as "fixed" by QJSON is also not what we wanted in the
first place.
Change-Id: I070999957c6a0c3d0f1753d907ac460e9e341fc1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The original version is not valid JSON, even though the QJSON parser
will accept it:-/
Change-Id: Id408e4b83a62bca358191cf6fe4b3a7ce7d7c59e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Make the need for the googletest repository optional. The user
may have gtest installed inside the system instead.
Change-Id: I4959878fa893d6b8ed53fd612934d7cd4504a6b7
Reviewed-by: David Schulz <david.schulz@qt.io>
Provide all wizards for Qt-based projects with the ability to set up a
skeleton .ts file and add it to the generated project.
Task-number: QTCREATORBUG-7453
Change-Id: I4dfb34c0101062edd0209173f83737e69063e27a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This change adds a thin gray outline to the cvs, git and qmake/generic
import wizard icons. In the selected state, they should now have a
better visual contrast.
Task-number: QTCREATORBUG-18936
Change-Id: I2a0f5dab74cdc5958f869a63756a4fc974ccad32
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Slots have become rather irrelevant with Qt5 and C++11. Let's not annoy
and/or confuse users by reserving a segment for them in our generated
classes.
Change-Id: Ied26bd627c87654ac26f6577387397f39367c0ee
Reviewed-by: hjk <hjk@qt.io>
Shall be consistent with other wizards
Change-Id: I810cf55abf519f5b67155063ce515c4442fc6637
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The plugin does not only contain a pure editor, but all kind of support
for a programming language like project and run support.
Change-Id: I1251367c8db2e7a54986415ffc5b860cb210de3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This lets users specify that a class derived from a custom base should
have a Q_OBJECT macro, and it also allows them to opt out of it for
classes derived directly from QObject & friends.
Fixes: QTCREATORBUG-21810
Change-Id: I850bd3bcb7b6eb71720afe5fa097178ff5d5c620
Reviewed-by: hjk <hjk@qt.io>
Although this is valid JavaScript matching the '.' is
not working as expected.
The directory always gets messed up by replacing the
first character with a dash. Use an alternate regular
expression and also ensure the replacement happens
globally instead of once as we want to replace all
dots by a dash.
As at it fix handling of the file suffixes as well.
Task-number: QTCREATORBUG-22625
Change-Id: Ide189fe50e29994abfb368e503050b9b413aba9f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Provide general infrastrucure and implementation for qmake.
Fixes: QTCREATORBUG-16067
Change-Id: I8c6368fe2724c9450dcbc3410b6ca459bbbdc043
Reviewed-by: hjk <hjk@qt.io>
* Updated CMake minimum version to 3.5 (Ubuntu LTS 16.04)
* Lowercase commands
* Used the target name instead of ${PROJECT_NAME}, which nobody uses in practice
* No string quotes around the source filenames, which do not contain spaces
Change-Id: Ide9b3eb85535213798c6c35e08624cae080ebd9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This was broken in 63c339ffba while trying to fix a different bug.
Fixes: QTCREATORBUG-18157
Change-Id: Iec7e14de257195ed9bb20314b8031d3ef59df2ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Fix wrong string evaluation of boolean values which made
in turn the generated files partially wrong.
Introduced with cb63706f83 (but wrong also before for
the no-Qt-dependency case).
Change-Id: I404534d4b21d0d1c496635adfcd8a73716ba13d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Only Qt 5.12 got true ECMA Script capabilities, so arrow function
expressions are not supported before that.
To be able to use "regular" inline functions, we allow usage of } by escaping with backslash.
For variables that do not start with "JS:" we already supported backslash for escaping.
Fixes: QTCREATORBUG-22336
Change-Id: I9fc638e64d2757a21fffc16355635e2fcff87a36
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If one uses the Python - Window template and does not explicitly
change the custom base class to an existing the generated project
lacks some essential stuff.
Make the generated main file usable even for first time users.
Change-Id: I898189fd4edff88f13987d6d1df9f77e2ef6bd68
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
While at it use the same environment variable used for
Qmake or Qbs based project.
Change-Id: Ieefb4e1da4ce4155863b80a1b275b67e664273c6
Reviewed-by: David Schulz <david.schulz@qt.io>
GoogleTest started using the term Test Suite for grouping
related tests and Test Case for general tests.
This patch adapts the visual strings as well as some
internal API which used the same terms.
This completes 6189745a3b.
Change-Id: I0307c10b8b5f8574f31a68ee4320732f3e829532
Reviewed-by: David Schulz <david.schulz@qt.io>
The JSON wizard code expects that at least one file gets opened either
as a project or in an editor. This was not true when adding an empty
qmake project, because its .pro file loses the "open as project"
property when added as a sub-project, and there are no other files to
open.
We fix this by also setting "open in editor" for the .pro file, which
makes sense (also for the top-level case), because a user is likely to
add custom content there right away.
Change-Id: Icdf68bccb2488bdb26b6b3c8410da901a4eb32df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Avoid ending up with a wrong named class when specifying the
file name instead of the class name.
Change-Id: I5e2ddaae1a16d60aa40fb9303e8d49efa9f51b7e
Reviewed-by: Eike Ziller <eike.ziller@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>
It's a valid use case to put new files into a new directory.
Task-number: QTCREATORBUG-15599
Change-Id: Iea479d7a723302a14ba8cc887c1036ea6a120ced
Reviewed-by: Eike Ziller <eike.ziller@qt.io>