Nikolai Kosjar
b8dbac0b9c
Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
...
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 >
2013-10-10 15:56:12 +02:00
Friedemann Kleint
e43e466b5b
Reduce usage of QStringRef::toString() in QmlJS/QmlJSTools.
...
Change-Id: I9db2a0b21bf430d6f450e1e860a0c2a02272536f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com >
2013-08-29 11:35:41 +02:00
Fawzi Mohamed
30ff6da868
qmljs: add vector*d, quaternion, and matrix4x4 to code model
...
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 >
2013-08-22 15:55:54 +02:00
Friedemann Kleint
7dce2f9899
Clean headers in QmlJs.
...
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 >
2013-04-04 10:08:07 +02:00
Oswald Buddenhagen
1fda2111d4
Merge remote-tracking branch 'origin/2.6'
...
Conflicts:
src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
src/plugins/debugger/qtmessageloghandler.cpp
src/plugins/debugger/qtmessagelogwindow.cpp
src/plugins/madde/maemodeployconfigurationwidget.cpp
src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
src/plugins/qmldesigner/designercore/include/widgetqueryview.h
src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
src/plugins/qnx/bardescriptormagicmatcher.h
src/plugins/qt4projectmanager/profilekeywords.cpp
src/plugins/remotelinux/deployablefilesperprofile.cpp
src/plugins/remotelinux/deployablefilesperprofile.h
src/plugins/remotelinux/deploymentinfo.cpp
src/plugins/remotelinux/deploymentsettingsassistant.cpp
src/plugins/remotelinux/profilesupdatedialog.cpp
tests/auto/icheckbuild/ichecklib.cpp
tests/auto/icheckbuild/parsemanager.cpp
tests/auto/icheckbuild/parsemanager.h
Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370
Incremented year in copyright info
...
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com >
2013-01-29 16:27:03 +01:00
Orgad Shaneh
29a93998df
Remove braces for single lines of conditions
...
#!/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 >
2013-01-08 10:48:18 +01:00
David Schulz
2db4fb4bea
Fix: build failure for qmljscheck an qmljscodeformatter
...
Change-Id: Iba9686506d971f92e525361e93d648dc940fe2d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com >
2012-11-28 15:11:08 +01:00
Orgad Shaneh
5ea0937167
QmlJS: Compile with QT_NO_CAST_FROM_ASCII
...
Change-Id: I0c5654a978f47a4db5428936fd44633f21394830
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com >
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com >
2012-11-28 11:11:47 +01:00
Thomas Hartmann
587adf5084
QmlJSEditor: crash fix
...
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 >
2012-10-10 11:26:06 +02:00
Eike Ziller
6fd252b0a5
Merge remote-tracking branch 'origin/2.6'
...
Conflicts:
share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
src/plugins/debugger/qtmessageloghandler.cpp
src/plugins/debugger/qtmessageloghandler.h
src/plugins/debugger/qtmessagelogwindow.cpp
src/plugins/madde/maemodeployconfigurationwidget.cpp
src/plugins/madde/maemodeployconfigurationwidget.h
src/plugins/remotelinux/deployablefilesperprofile.cpp
src/plugins/remotelinux/deployablefilesperprofile.h
src/plugins/remotelinux/deploymentinfo.cpp
src/plugins/remotelinux/deploymentinfo.h
src/plugins/remotelinux/deploymentsettingsassistant.cpp
src/plugins/remotelinux/profilesupdatedialog.cpp
src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
tests/auto/icheckbuild/ichecklib.cpp
tests/auto/icheckbuild/ichecklib_global.h
tests/auto/icheckbuild/parsemanager.cpp
tests/auto/icheckbuild/parsemanager.h
tests/manual/ssh/tunnel/tunnel.h
Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd
Adjust license headers
...
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com >
2012-10-05 17:12:56 +02:00
Thomas Hartmann
e5699c0925
QmlJS.Check: Warnings for qml code not supported by Qt Quick Designer
...
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 >
2012-09-17 14:45:56 +02:00
Tobias Hunger
8da8d21c18
Remove some unused member variables
...
Change-Id: I4b1bcfe8da32bd48c601d1efdb7c3aac1d39cbce
Reviewed-by: Leandro Melo <leandro.melo@nokia.com >
2012-08-22 16:18:54 +02:00
Eike Ziller
e0e8cf3ada
Contact -> qt-project.org
...
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com >
2012-07-19 13:23:21 +02:00
Bradley T. Hughes
fb9146a9c3
Compile after qt5/qtbase commit 75a0c7f9
...
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 >
2012-04-30 14:32:08 +02:00
Erik Verbruggen
3fa55b7ab9
Removed module names from #include directives.
...
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com >
2012-02-15 16:24:46 +01:00
hjk
2931a499e6
Long live the king!
...
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com >
2012-01-26 19:55:36 +01:00
Christian Kamm
37bcdcf4f0
QmlJS checks: Disable warnings about expression statements in bindings.
...
Change-Id: Ic3aca50bec93ec3b810dbda2f9b57eefb966bbdf
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2011-12-02 14:49:59 +01:00
Christian Kamm
d02b647bbf
QmlJS checks: Don't warn for fallthrough on the last clause.
...
Change-Id: Ica84ced241eafd82cededa65d2e90f855e448f89
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2011-11-29 11:11:41 +01:00
Christian Kamm
a920096c97
QmlJS checks: Accept 'fallthrough' comment to terminate case blocks.
...
Change-Id: Icf71416e8aa892089b0918529b94f4cd6a1db5a3
Reviewed-by: Leandro Melo <leandro.melo@nokia.com >
2011-11-29 08:25:51 +01:00
Christian Kamm
eaf4b5be53
QmlJS check: Extend "don't use var" performance warning.
...
* now also recognizes color, rect, point, size, vector3d
* to do detect these correctly, set the return types on a number of
builtin Qt.* functions
* add test
Change-Id: Ieaeb73be208af2d47e1bb4fa1485dc876705ee20
Reviewed-by: Leandro Melo <leandro.melo@nokia.com >
2011-11-22 13:25:14 +01:00
Eike Ziller
85cf2b661e
Merge remote-tracking branch 'origin/2.4'
...
Conflicts:
src/libs/qmljs/qmljsinterpreter.cpp
src/libs/qmljs/qmljsinterpreter.h
src/plugins/debugger/qml/scriptconsole.cpp
src/plugins/git/gitplugin.cpp
src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h
Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Christian Kamm
88d480cd61
QmlJS checks: Fix // @disable-check at beginning of line.
...
Change-Id: Iae9b9f499d3c2c6b3e3cc1be93e2b62508363aec
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-11-08 09:05:24 +01:00
hjk
31600758de
all: s/info@qt.nokia.com/qt-info@nokia.com/
...
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com >
2011-11-03 10:33:19 +01:00
Christian Kamm
e733cb2155
QmlJS checks: Add @enable-all-checks annotation.
...
It enables all checks, even those that we deem to annoying to be
enabled by default.
Also fix a bug where some disabled checks had the wrong severity.
Change-Id: Id434ad62dabafac979ee2304a85d368b9ea98fa4
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-31 09:38:03 +01:00
Christian Kamm
5ac449a708
QmlJS checks: Change suppression annotation to @disable-check.
...
Change-Id: I913cd757c4f8339a518c947569c5ba651153f1c1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-31 09:37:57 +01:00
Eike Ziller
81cce8902e
Merge remote-tracking branch 'origin/2.4'
...
Conflicts:
qtcreator.pri
src/libs/qmljs/qmljscheck.cpp
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/remotegdbserveradapter.cpp
src/plugins/plugins.pro
src/plugins/projectexplorer/buildmanager.cpp
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
Change-Id: Id2dcebf95b94dc46c1d85908ba1d1378aaf362ac
2011-10-28 10:17:44 +02:00
Christian Kamm
fc7cd25849
QmlJS checks: Make 'unintentional empty block' warning less annoying.
...
Already fixed differently in master.
Change-Id: I92f7665166b2b1ca4f3d4598825b04f3f19d4772
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com >
2011-10-24 10:23:19 +02:00
Christian Kamm
e906bbdb56
QmlJS checks: Warn about extra message suppressions.
...
Reviewed-by: Fawzi Mohamed
Change-Id: I4038cd863ba80c1719417cd03b755b047f7d8b5e
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com >
2011-10-21 08:31:45 +02:00
Christian Kamm
0ed824762c
QmlJS checks: Suppression of static analysis messages.
...
* Use '// @disable M123' to suppress
* Add quick fix to add these comments
Change-Id: I499f5a6004148afbb346218c6fb01c9ca77b9f73
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2011-10-19 15:09:35 +02:00
Christian Kamm
85d78c6082
QmlJS checks: Add hint about not using var/variant property types.
...
Change-Id: I79c5c4db78eb96eda7c6f5d543bb5063d5670968
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2011-10-19 14:12:47 +02:00
Christian Kamm
89ff3cebe6
QmlJS: Introduce UnknownValue.
...
To distinguish known-to-be-undefined from a genuinely unknown value.
Change-Id: I606b4ea4d726f94553400b8950d3c0a4e76564a8
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-18 13:16:18 +02:00
Christian Kamm
8532e7b1b7
QmlJS checks: Limit warning about unintentional empty blocks.
...
width: {
}
should not trigger a warning. We now only warn if { and } are
on the same line.
Change-Id: I45fa846ff63d0a83de782c412212165845c07e72
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-18 08:15:11 +02:00
Christian Kamm
7ed717ca62
QmlJS: Add more value_casts.
...
And switch all existing dynamic_casts to value_casts.
Change-Id: I93b89358e4802080f40b332074c64f4e91a2bc4c
Reviewed-on: http://codereview.qt-project.org/6311
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-12 10:55:55 +02:00
Christian Kamm
03689eeb50
QmlJS checks: Allow calling some builtin constructors as functions.
...
String, Boolean, Number and Object perform type conversion. Date returns
the current date.
Change-Id: I51e5bcbb0fa85ceb30b3ee3749f96c3e3b12ca21
Reviewed-on: http://codereview.qt-project.org/6043
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-12 08:50:26 +02:00
Christian Kamm
d48566234f
QmlJS checks: Hint about extra parentheses.
...
Migrated from QtChecker.
Change-Id: I85f7dd039ac858b103dfe0af257f66031540c5de
Reviewed-on: http://codereview.qt-project.org/5969
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-12 08:49:41 +02:00
Christian Kamm
038111c384
QmlJS checks: Disable some checks when imports failed.
...
The important error in this case is on the import.
Change-Id: I3a547ca7ac44a89aba6819ea80ec52185071408a
Reviewed-on: http://codereview.qt-project.org/5879
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com >
Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com >
2011-10-12 08:49:30 +02:00
Christian Kamm
bf3bf658c4
QmlJS checks: Add hint about not using multiple statements per line.
...
Migrated from QtChecker.
Change-Id: Ia76067a5f0e443a61a7b78ca9081f5a1bb51b471
Reviewed-on: http://codereview.qt-project.org/5861
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-10 14:40:17 +02:00
Christian Kamm
1b0dc76564
QmlJS checks: Add warning about 'eval'.
...
Migrated from QtChecker.
Change-Id: I4b3e8993c7b9f697497d2199b24bf49379dbc1b4
Reviewed-on: http://codereview.qt-project.org/5860
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-10 14:40:10 +02:00
Christian Kamm
be9d25ec64
QmlJS checks: Warn when using some builtin constructors.
...
Number, String, Array, Object, Function and Boolean should not
be used.
Migrated from QtChecker.
Change-Id: I8aee41f12389196ed49c44e26eb04d3fac040a2b
Reviewed-on: http://codereview.qt-project.org/5859
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-10 14:40:03 +02:00
Christian Kamm
c82d53d4ae
QmlJS checks: Add confusing +/- check.
...
Migrated from QtChecker.
Change-Id: I06115152f979f9abfa9cbdf4a3e2e63a51ea7284
Reviewed-on: http://codereview.qt-project.org/5858
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
2011-10-10 14:39:56 +02:00
Christian Kamm
aeadbcae40
QmlJS checks: Add check for spacing around binary operators.
...
Adapted from QtChecker.
Change-Id: I434582314e6431c56c9628a5a642bbfb032dfc2f
Reviewed-on: http://codereview.qt-project.org/5857
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
2011-10-10 14:39:49 +02:00
Christian Kamm
da123becaf
QmlJS checks: Add Hint about anonymous function formatting.
...
Migrated from QtChecker.
Change-Id: I0178cc189d1c98b51e1aeb43db7421ba8c43fc7e
Reviewed-on: http://codereview.qt-project.org/5856
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
2011-10-10 14:39:39 +02:00
Christian Kamm
55713a1514
QmlJS checks: Add severity and unique id to messages.
...
Change-Id: I2cded26524c3f64152107e65d740658e3003ffac
Reviewed-on: http://codereview.qt-project.org/5790
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-10-10 14:39:20 +02:00
Christian Kamm
a7f78991c9
QmlJS: Move commonly used functions to qmlutils.h.
...
Change-Id: I22376d96fe575bc00a55094c06af80e32a5587e6
Reviewed-on: http://codereview.qt-project.org/6238
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
2011-10-10 09:36:12 +02:00
Christian Kamm
909c61247c
QmlJS: Allow 'var' property type.
...
It's new in Qt 5.
Change-Id: If3e670d42528ca6996ae280d96077ce744d281d9
Reviewed-on: http://codereview.qt-project.org/6121
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2011-10-06 10:58:29 +02:00
Christian Kamm
a225f7a0af
QmlJS checks: Add tests and fix small bugs for 'unreachable'.
...
Change-Id: Iaf9febc841130fa913fcc071ed0bf28ff9e0b63b
Reviewed-on: http://codereview.qt-project.org/5149
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com >
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-09-20 13:21:03 +02:00
Christian Kamm
f8462cca65
QmlJS: Change from QMap to QHash for QString keys.
...
Tests indicate that lookup in QHash<QString, ...> is more performant
even for short strings.
Change-Id: I8e5a73d0f1a72e202522f397b16901887f9c3591
Reviewed-on: http://codereview.qt-project.org/5070
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com >
2011-09-19 09:09:28 +02:00
Christian Kamm
b3bb5d700e
QmlJS checks: Don't crash if try has no catch or finally.
...
Change-Id: If7001963bc11f2fa01f058c903ee014f6acb0c04
Reviewed-on: http://codereview.qt-project.org/5102
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com >
2011-09-16 15:35:07 +02:00