This patch adds the missing include statements for QRegExp.
Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Also adding the NoOp functions. They can be used in models.
Task-number: QTCREATORBUG-17714
Change-Id: Ide9745613850580f0098d2fa7f8889809d18bd45
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The Math. function like Math.max() are quite useful
to define more complex layouts. Therefore we allow them.
Change-Id: Ia95dcbcc1b8e96c117650dc8643da4a9de0ecdba
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Inside a Connections item JavaScript blocks should be allowed.
Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Certain ids can be ambiguous and have name clashes with properties.
Those ids are not supported in the designer.
Change-Id: Ida293d24611c467df6ef813a541e8abfc06b51cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
States can of course contain PropertyChanges.
Change-Id: Ie78be1db58c6820a49356b1cd70102e10211030b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For a valid AST id should be never empty.
A crash has been reported. though. Most likely the parser
injected a UiQualifiedId for an incomplete document.
Change-Id: Id2f1b25cf9d78982524d7aaff2b43210e1ae2a3b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We properly distinguish between warnings in the Qt Quick Designer and
error in a .ui.qml file.
The warnings are a subset of the errors anyway.
Change-Id: Ib3b21a845436381df10863b464c975b0b39fc063
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Documents with those types do crash the qmlpuppet and confuse the users.
With this patch we give a clear error message and such files are not supported
anymore.
Change-Id: Iba19def2751d4dc81d90684c0c63c0274fdf49cf
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
We use forward slashes in all internal paths, even on Windows.
Change-Id: Ie0b418c770dad96829dd357fe425616b6d3a5b82
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
In some cases we use a Qt Quick 1 code model for a file with Qt Quick 2
imports. This patch adds a warning for this, since
auto completion is incomplete.
Change-Id: I60888fd269c02f38da097104f5ecc982dd65573a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
Added vector2d vector4d, quaternion and matrix4x4 to basic types
and extended completions related to them in the code model.
Task-number: QTCREATORBUG-9929
Change-Id: Iafdbdf5792f640e8eb29d866a372542ee07159a5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it (Parser excluded).
Change-Id: I5ec6e1076430009bb72094411b2c3386f8bea548
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
The typeStack has to stay in sync and initializers for
properties do not have a type.
Change-Id: I49f7d1679d083c994fd692a1c36e33ba7fce17ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This patch adds several warnings for qml code not supported by Qt Quick
Designer.
* WarnImperativeCodeNotEditableInVisualDesigner:
This warns about imperative code affecting a visual property.
e.g.: "x = 10;"
* WarnUnsupportedTypeInVisualDesigner:
This warns about types which are currently not supported.
* WarnReferenceToParentItemNotSupportedByDesigner:
This warns about things like: "width: parent.width" in
the root item.
* WarnUndefinedValueForDesigner:
This warns about visual properties that cannot be evaluated in
the local context.
e.g.: "x: somethingNotDefinedInTheLocalContext.x"
* WarnStatesOnlyInRootItemForDesigner:
This warns about states not defined in the root item.
All the Qt Quick designer related warnings are disabled by default
in Check.
Change-Id: If31a8199fb95dc8bf6ac613634a2e442e436e267
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Commit 75a0c7f9b52cde47f20fdc1b89e1264d60350848 in qt5/qtbase changed
some QRegExp methods to be non-const (they were previously const). This
change makes Qt Creator compile again.
Change-Id: Ibc98c678126c3b3189df7fcc043463b940951445
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>