Commit Graph

439 Commits

Author SHA1 Message Date
Eike Ziller
53819123e7 Simplify RPATHs for qmake build
Use central rpath.pri for setting RPATHs and qttestrpath.pri for tests.
Simplify install names of plugins and libraries on macOS to be just
@rpath/libName, which follows convention better and makes setting up
RPATHs easier.

Preparation for moving tools one directory level down on macOS, to
be able to add a qt.conf for the tools generically.

Task-number: QTCREATORBUG-23120
Change-Id: I16625d48904abd3a7f4c2ad7bbba5916cdc400cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-04 10:31:55 +00:00
Ulf Hermann
3d21c7fdc3 Retain ".pragma library" when reformatting JavaScript files
For ".pragma library" there is a special flag in QmlJS::Directives.
We just need to actually set the flag and query it when re-emitting the
code.

Change-Id: Ia3455fda18aba3219b02ecf092bb28987a6ccef5
Fixes: QTCREATORBUG-22326
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-10 14:05:18 +00:00
Nikolai Kosjar
ea0b7e4563 QmlJS: Fix build of tst_check.cpp
tst_check.cpp:151:36: error: reference to 'Type' is ambiguous
In file included from src/libs/qmljs/qmljscheck.h:30:0,
 src/libs/qmljs/qmljsstaticanalysismessage.h:42:6:
	note: candidates are: enum QmlJS::StaticAnalysis::Type
 src/libs/qmljs/parser/qmljsast_p.h:347:46:
	note:                 class QmlJS::AST::Type

Change-Id: I2f2af3e19fc0cbb7cef359c28d5f5d1505778882
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-07 08:03:46 +00:00
Cristian Adam
486aaabd21 CMake Build: Use same Qt compiler defines for tests
Source code needed adjustments though.

Change-Id: I78b4610a6bb895a385c7c30a6c92c97a276b89dd
Reviewed-by: hjk <hjk@qt.io>
2019-09-10 15:05:59 +00:00
hjk
47cd385536 QmlProjectManager: Remove warnings in file format test
Change-Id: I6c37f7da544c8e568ca33ecd4573cddaba173e04
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-31 08:06:59 +00:00
Thomas Hartmann
c3e3d40f90 QmlDesigner: Extend test
Change-Id: I3850814303bc791934044f10a955cfcbc78e76ef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-30 13:10:02 +00:00
Cristian Adam
8ae9cfe39d CMake build: Add "Devel" package
The "Devel" package will contain headers, libraries, documentation
needed by the 3rd parties to build Qt Creator plugins.

Fixes: QTCREATORBUG-22514
Change-Id: If54929f823982b921b98a63ff6085d53618a3a49
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-25 14:06:46 +00:00
Tim Jenssen
a3fb2051ad QmlJS: Fix code re-formatter for property
Fixes: QTCREATORBUG-22515
Change-Id: Ie560f8cf9e43081a37f2210ea2f6df741f14ced6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-06-20 08:19:10 +00:00
Giuseppe D'Angelo
885cd63e8f Port from QLatin1Literal to QLatin1String
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.

Change-Id: I42347a2128e7b4280aaafeea5ebdee5a1b623c82
Reviewed-by: hjk <hjk@qt.io>
2019-06-13 23:07:35 +00:00
Uladzislau Paulovich
70fecd518e qml | Fix functions and loops formatting
Bugs fixed in this change:

1. Incorrect function arguments formatting:
function(a, b, c) -> function(abc)
2. Incorrect foreach loop formatting:
for (var a in b) -> for (a in b)
3. Incorrect for loop formatting:
for (var a = 1; a < 100; ++a) -> for(; a < 100; ++a)

Change-Id: I8afef6e5f2485a2225931b7ecb7210506e06dc6c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-11 15:23:42 +00:00
Uladzislau Paulovich
8f7cbd6416 qml | Fix trailing comments formatting
Change-Id: I0461c4616cff15b7010e3844850d32e9f07469ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-11 15:23:17 +00:00
Uladzislau Paulovich
8dc16d55c2 qml | Fix empty objects formatting
Change-Id: I760f3420fef9ca83c2a28586575a72d580658d0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-11 15:22:36 +00:00
Uladzislau Paulovich
ab87bdf4ea qml | Add support for enums formatting
Change-Id: Id7e435a7c556c7fc469b9055ca772a7850e16676
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-11 10:04:29 +00:00
Uladzislau Paulovich
69cd74f25d qml | Fix let/const variables formatting
Change-Id: Ia2a4ee482e84a6c24abea7ea6fe05925eee11d1d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-11 10:03:57 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
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>
2019-05-28 12:23:26 +00:00
hjk
92a52a7181 Use Qt's QFileInfoList instead of QList<QFileInfo>
Helps to adapt to potential upstream changes in Qt 6

Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 07:19:45 +00:00
hjk
0595e67c82 More FileName::pathAppended()
Change-Id: Ie20ec34ea9712b3ec49e6233b23cef84c2019f03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-20 14:37:13 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00
Christian Stenger
7fa1643a1d Tests: Fix missing curly brace
Change-Id: Ib24625cdeae1b2f9a1b41eecb59e52f572eb793b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-17 12:33:45 +00:00
Thomas Hartmann
3f423fc139 QmlDesigner: Fix subtle issue with transaction
In an transaction adding a property after reparenting did fail
without real reason.
If a node does not have a position (yet) we can ingore the operation.

Change-Id: I959f1cf50ac6bcacda2a29b37ae69e37158e9acd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-05-17 11:25:59 +00:00
hjk
4dd72bd899 Compile fix
... after f99d69ee43

Change-Id: I711f8809dbdd7878b6c7fcc092f3391a2c4cebfe
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-15 09:32:29 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
Thomas Hartmann
76206c63b0 QmlDesigner.Tests: Add regression test
Adding regression test for revisioned properties

Task-number: QTCREATORBUG-22057
Change-Id: I79d1bf1167944fc005179b064703e217a6494e33
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-05-02 12:22:39 +00:00
Alessandro Portale
a1c67da0a2 Tools: Use "QTC_" prefix for build-system environment variables
Change-Id: I4b75dce6a2c7bd794b8c330521292c86057e63ef
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-04-29 09:45:27 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
Thomas Hartmann
af07a2cdc7 QmlDesigner.Tests: import Qt 4.7 is not supported anymore
Change-Id: I47479f13985a0b143845870983fe28baa52badbc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-04-03 11:29:01 +00:00
Christian Kandeler
babb0166fe qrc parser autotest: Fix qmake build
Amends 2f7f1aaec3.

Change-Id: Ice5db9b7e789edcf9aa9b15f3dd49eacc1ca09a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-13 13:20:31 +00:00
Christian Kandeler
2f7f1aaec3 Move qrc parser from QmlJS to Utils
We'd like to make use of it in a more general context, and it's not
directly related to QML.

Change-Id: I025ec67829f85544667684cdb8c99d1ee4c18197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-13 11:48:27 +00:00
David Schulz
14834e6b0a TextEditor: replace generic highlighter with ksyntaxhighlighting
Fixes: QTCREATORBUG-21029
Change-Id: I9894c4384e0e47da6bf030b7b8e07c3ad4737ff3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-28 11:37:08 +00:00
Marco Benelli
51f93c0dfc qmljs: basic ECMAscript 7 test suite
Change-Id: Ib313ba1be60265784fc6f699b5aa6990277fa33f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-12-20 15:19:19 +00:00
Orgad Shaneh
5e8ec97d69 Do not build QmlDesigner tests when the plugin is disabled
Change-Id: Iaf7e06be6b81040c36726aa76923b285e2402aef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-12-03 07:40:08 +00:00
Christian Stenger
217636886c Tests: Fix QmlJs auto tests
Change-Id: Iba5e5e786e8241db120359f95850207021d61c49
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-11-27 08:13:27 +00:00
Thomas Hartmann
323136f403 QmlDesigner: Skip failing test
Change-Id: Ie23bef2faa45cd6ac2b96b49bfc02ce6d55d6639
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-11-23 09:25:52 +00:00
Christian Stenger
03fece349b Tests: Fix plugin path for macOS
Change-Id: I085ddbbff09d52878b82f311381c13b94739e84c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-24 11:19:46 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Ulf Hermann
2b582ed455 QmlJS: Fix reformatter test
Apparently the reformatting truncates any sequence of multiple empty
lines into one. That seems to be by design. Therefore, remove one of the
two adjacent empty lines from commments.qml. Also, don't invert the
actual and expected values in the test code.

Change-Id: Id87c6fa0b2c7a03884d42d109b7d55f5040a927a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-12 08:09:51 +00:00
Ulf Hermann
88074a4aa8 QmlJSEditor: Remove disabled qmllookup test
This test has been disabled since Qt4 times and is unfixable. In order
to test lookup of QML types, we need to write a new test.

Change-Id: I13909c277d0b9552c158b74529c350cb28fb3794
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:59:41 +00:00
Ulf Hermann
51adb199ab QmlJS: Fix and enable remaining pieces of importscheck test
Change-Id: Idaaf19cee1a0a971b9c3bf5ad3371a68ebd81f40
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:13:29 +00:00
Ulf Hermann
b6195f3de7 QmlJS: Fix case-fallthrough.qml test
The warning about strange interactions between QtQuick1 and QtQuick2
doesn't exist anymore, and I don't see why it would show up in that case
anyway. QmlJS::StaticAnalysis::Type used to have a member 324, and the
comment references that.

Change-Id: I4f0a256588919a146068b8771954bcabf0468dbc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 10:31:31 +00:00
Orgad Shaneh
f615c9aa42 QmlDesigner: Remove outdated Qt version conditions
Change-Id: I7fa3147afbdc07814f8710a44140072e7bbd8511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-11 12:41:20 +00:00
Marco Benelli
9678ea5755 QmlJs: add test for code model
Change-Id: I3e60274dcce578a170e12d44533e6f83e77d448a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-27 08:27:03 +00:00
Marco Benelli
a874cf581d Qml/js reformatter: use quotes in objects literals
The reformatter used to remove the quotes that wraps the property name
in object literals.  This causes problem when the name is not a
valid identifier, resulting in that valid code become invalid after
reformatting.
This patch forces wrapping of property's name in quotes: in this way,
the reformatted code is consistent and it never get invalidated.

However the resulting formatted code is not consisted with the one
formatted by previous versions.

Task-number: QTCREATORBUG-17455
Change-Id: I1e361102819055de210d6c81020f204c08aaa253
Reviewed-by: Markus Maier <markus.maier.sw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-05 06:50:03 +00:00
Marco Benelli
b9d72a5737 qmljs: remove remaining references to QtQuick1
This patch removes all references to QtQuick1 in qml library,
plugin, designer, profiler and tests.

Change-Id: Ie286fad96060299caae3ef328330597cf53e90d3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-03 14:40:30 +00:00
Orgad Shaneh
27063168ad QmlDesigner: void static -> static void
That's the order everywhere in the codebase.

Change-Id: I62e57f2ddddd6e4fac0dc26d81b05839cf80a9db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-12 06:35:58 +00:00
Christian Stenger
32188f448a QmlDesigner: Fix compile before Qt5.10
QString::back() was introduced in Qt5.10.
Beside this fix the signature change of void checkNode().

Change-Id: I4945e618274e1a67fc36d33e875c14284a4b160c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-09 06:33:06 +00:00
Thomas Hartmann
cf82b8e685 QmlDesigner: Allow annotations in comments
This patch allows to store the auxiliary data of model nodes
as meta data in the QML file.
The meta data is encoded in a comment at the end of the QML file.
By default such meta data is attached to the clipboard.

Change-Id: I794d2c1297d270c5c1099c6c1be98b6b7a7f650b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-03-08 11:19:01 +00:00
Christian Stenger
cafb0760f6 Tests: Fix compile with Qt5.11
Function to convert char[] into QString has been deleted.

Change-Id: Iedf5db322b907d4ea1a20cc5c70394388d54f214
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-02-13 08:47:45 +00:00
Christian Stenger
0fcbe60cd6 Tests: Fix qml import check
Change-Id: I7fcf4a3b718c3b2124171187cdb06493c84ff7b8
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-12-19 13:51:35 +00:00
Tim Jenssen
d5342eff77 fix property spelling
Change-Id: I00f84ec8d2c83d7f3937d2e21a24e02ba28991b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-17 10:38:08 +00:00
Orgad Shaneh
b57372f2b5 Replace include guards with #pragma once
Change-Id: Ic36cf0e9cac61d4d9a7e4434192944f5301b8aaa
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-28 08:07:56 +00:00