summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor
Commit message (Collapse)AuthorAgeFilesLines
* Compile fix with recent Qt devhjk2019-07-292-6/+3
| | | | | | | | | The reasoning in 1b4766e26c6b 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>
* Standardize on int for line and column valueshjk2019-07-261-1/+1
| | | | | | | | | | | | | | | Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-2/+2
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJsEditor: Avoid unneeded exports of constantsEike Ziller2019-07-196-60/+43
| | | | | Change-Id: I332ff9a01963fe4d37dce9ecd0586d8f0fa6573c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlJSEditor: Remove registration of json filesChristian Stenger2019-07-111-1/+0
| | | | | | | | | | | | | Do not open json files with the QmlJSEditor as this produces strange warnings and Json is not JavaScript at all. Rely on the correct syntax highlighting by the generic highlighter and KSyntaxHighlighting respectively. Beside this it helps also when using a json language server. Task-number: QTCREATORBUG-22697 Change-Id: Iebd0009c550d9ea701d504797d528226dc32b0ec Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-284-10/+10
| | | | | | | | 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>
* ProjectExplorer: Introduce a alias for QList<Tasks>hjk2019-05-282-7/+7
| | | | | Change-Id: I91391ad22b420926b0f512cac23cfe009048b218 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove excess blank lines after namespaceOrgad Shaneh2019-05-271-1/+0
| | | | | Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Qt Creator CMake portCristian Adam2019-05-179-8/+44
| | | | | | | | | | | | | | 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>
* Replace static_casts by QOverload where possiblehjk2019-02-262-6/+6
| | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-02-151-4/+6
|\ | | | | | | Change-Id: If4e8f52fc94c4e5fd9ec69c9000436d4ded913ff
| * QmlJSEditor: Fix nullptr accessChristian Stenger2019-02-141-4/+6
| | | | | | | | | | | | | | Avoids a crash when triggering 'Find Usage' on a Qml Item. Change-Id: I3980e6a7aae891f853148017341a2f29a07e03ad Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Move qrc parser from QmlJS to UtilsChristian Kandeler2019-02-131-2/+2
|/ | | | | | | | 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>
* Help: Lookup in index if ID is not foundEike Ziller2019-02-111-5/+4
| | | | | | | | | | And if multiple topics are found in the index, show the topic chooser dialog that we already have for the help index. Fixes: QTCREATORBUG-12704 Task-number: QTCREATORBUG-15959 Change-Id: I7afa6f44bbecc12f602aaaa4a11209ec72399689 Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.8' into 4.9Eike Ziller2019-02-041-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/android/androidrunnerworker.cpp src/plugins/android/androidrunnerworker.h Change-Id: I52b9117c8a57dc4a34cfc09d1ae9bc76e0752bfc
| * QML: Fix auto-insertion of single quoteEike Ziller2019-02-011-1/+1
| | | | | | | | | | | | | | | | | | After inserting a matching single quote it should not add yet another single quote when typing one explicitly. Change-Id: I568f02e4edbb78ef11665bb7f4a9f3b91cf9b887 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | HelpItem: Remove senseless constructorEike Ziller2019-02-041-2/+1
| | | | | | | | | | | | | | | | If we are already passing a URL, we do not need to pass a map of URLs in addition. We already know exactly which URL we want. Change-Id: I955e03a611667733e9734e7996725d51857c71b1 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Help: Move resolution of help from multiple candidate IDs to HelpItemEike Ziller2019-02-011-47/+29
| | | | | | | | | | | | | | | | No need for code duplication. Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | Help: Avoid ambiguity of help ID being interpreted as URLEike Ziller2019-01-311-3/+5
| | | | | | | | | | | | | | | | Users know if they have a URL or not, we should not guess (and then even guess differently at different places) Change-Id: Iaaf69a94baadbee0ff427a2bc9065b714dcf8478 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Fix warning: "Don't call QVector::first() on temporary QList/QVector"Alessandro Portale2019-01-281-1/+1
| | | | | | | | | | | | | | [-Wclazy-detaching-temporary] Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0 Reviewed-by: hjk <hjk@qt.io>
* | Move Help item from text editor to coreEike Ziller2019-01-251-1/+1
| | | | | | | | | | | | | | The functionality is not text editor specific. Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e Reviewed-by: David Schulz <david.schulz@qt.io>
* | QmlJsEditor: fix completion item orderDavid Schulz2019-01-251-2/+0
| | | | | | | | | | | | | | | | | | | | Items with assigned data were preferred over items without data, leading to always preferring some special functions over objects like parent and parentChanged. Change-Id: I69e7e3ee2e80283daa16cd3df0260ebdb9a2b7f9 Fixes: QTCREATORBUG-21527 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | TextEditor: Use callback in refactoring markersDavid Schulz2019-01-253-24/+12
| | | | | | | | | | | | | | | | Allows to trigger actions without adding specific handling into the editor. Change-Id: Ia63d65d3feca37bcefca1b6322ade039027a92d8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ClangFormat: Refactor indenter to allow ClangFormat unit-testsIvan Donchevskii2019-01-223-4/+4
| | | | | | | | | | | | | | | | | | | | We do not build texteditor files in unit-tests so some tricks were required to make ClangFormatIndenter available. First simple unit-test proofs it builds and runs. Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | QmlJS: remove qtquick1 leftoversTim Jenssen2019-01-181-1/+1
| | | | | | | | | | | | | | | | QT_INSTALL_IMPORTS and the used ProjectInfo.qtImportsPath variable were only used for QtQuick1. Change-Id: I34da0cfc77effa84f3a7578e7f91fed0768a9bf4 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Fix warning: "Don't call QList::last() on temporary"Alessandro Portale2019-01-171-2/+2
| | | | | | | | | | | | | | [-Wclazy-detaching-temporary] Change-Id: I5e06e44fc45c80ea1dca518611d4f0c28a738061 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | qmljs: fix a crash in the highlighterMarco Benelli2018-12-141-1/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-21728 Change-Id: I0508d55ec8fc248833597f8e19e9aa1128f1b7ad Reviewed-by: hjk <hjk@qt.io>
* | QmlJSEditor: ModernizeAlessandro Portale2018-12-1036-333/+298
| | | | | | | | | | | | | | modernize-* Change-Id: I4dceb82c3904069a0d9848b2af61122d9282cb36 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | move find usages to TextEditorDavid Schulz2018-11-283-13/+2
| | | | | | | | | | | | | | | | | | In preperation for supporting find usages by the language client plugin Task-number: QTCREATORBUG-21577 Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | qmljs: update parserMarco Benelli2018-11-225-56/+47
|/ | | | | | | | | Update the qtcreator qmljs parser to the one of Qt 5.12. It supports EcmaScript 7. Task-number: QTCREATORBUG-20341 Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Replace QString::null with default constructed QStringOrgad Shaneh2018-09-211-1/+1
| | | | | | | QString::null is deprecated since Qt 5.9. Change-Id: Ib84f338ed8cecaee0c164191fb580c851bd84ab4 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QmlJSEditor: Fix missing overrideEike Ziller2018-09-181-2/+2
| | | | | Change-Id: I617d7363779b30c882ce96b08e56c74f3cb1df96 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Fix context of Locator inputEike Ziller2018-08-091-1/+1
| | | | | | | | | | | | | | | - In the main window, the locator input (actually the status bar) visually feels like being part of the mode widget, so give it its context. - In extra editor windows, the whole editor window should have "editor manager" context, so that is also active for the locator input. Task-number: QTCREATORBUG-20626 Task-number: QTCREATORBUG-20071 Change-Id: Ib68d6a8177446572ea59c3cc057eca0706173e11 Reviewed-by: Xing Xiong Reviewed-by: David Schulz <david.schulz@qt.io>
* Move PathChooserDelegate to UtilsDavid Schulz2018-07-232-2/+2
| | | | | Change-Id: I94b3c0b60477145f0f084719fc1cf5f3f4a98534 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Prefer using 'override' instead of 'virtual'Alessandro Portale2018-07-115-54/+54
| | | | | | | | warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-06-191-1/+0
|\ | | | | | | Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
| * Fix that bookmarks couldn't be added to .pro files with mouseEike Ziller2018-06-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | The area with the marks was not showing up. This patch reverses the logic for showing the marks area to opt-out. Almost all editors were opting in for it already. The AndroidManifest editor, VCS base editor, and widget designer text editor opt out now. Task-number: QTCREATORBUG-20339 Change-Id: Iccb6d0256618f7ef70e8921847ce2fd46fd660c0 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-06-111-0/+4
|\ \ | |/ | | | | Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
| * Merge remote-tracking branch 'origin/4.6' into 4.7Eike Ziller2018-06-111-0/+4
| |\ | | | | | | | | | Change-Id: I5ffa9febea2ced10892a145aa0b930d45d84aea5
| | * QmlJs: check markers before cleaning themMarco Benelli2018-06-081-0/+4
| | | | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-20197 Change-Id: If4594a72abf4acf2455e55688679ba7f78900f76 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | | Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-06-061-3/+16
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri Change-Id: I3d42bd52fb7b977cfdfad83092fb6f6eac974e24
| * | Fix compilation issues with C++17Eike Ziller2018-06-051-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testable on Linux/macOS by changing c++14 to c++1z in qtcreator.pri. Testable with latest MSVC2017 by setting _CL_=/std:c++17. unary_function, binary_function, and a few other things that were deprecated are removed in C++17. std::string got a non-const overload for its "data" member function, so we cannot create a function pointer on it without specifying its type. Use std::declval instead (though it requires a default constructor for the type). MSVC seems to have an issue with Utils::transform for std::vector (used in Nim plugin), but that looks like a compiler issue. Change-Id: I94f9a93d591d55b610f86fabfc618158927d6221 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | QmlJSEditor: Remove unused class QmlJSPreviewRunnerhjk2018-05-305-136/+0
| | | | | | | | | | | | | | | Change-Id: Ide6f2ba000e361545500da398740cc6b54efdc6d Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | | Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-05-281-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
| * | Finish merging Runnable and StandardRunnablehjk2018-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As all Runnables are known to be StandardRunnables, this here essentially replaces all .is<StandardRunnable> by 'true'. .as<StandardRunnable> by no-op, and fixes the fallout. Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | | QmlJS: improve support for enum declarationsMarco Benelli2018-05-231-2/+19
|/ / | | | | | | | | | | | | | | | | | | Add indentation and little highlighting for enums. It just highlights the 'enum' keyword and the name of the enum, not its values. Task-number: QTCREATORBUG-19226 Change-Id: I36e46a27b0e32c4aecc8e91875c3d22df1814d93 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Utils: remove Clang from ClangCodeModel_*_TextMarkColorDavid Schulz2018-05-171-2/+2
| | | | | | | | | | | | | | | | They are also used by the qml code model, and may be used by additional code models in the future. Change-Id: If216cbeb7b77be0f3b6f31671c71d913206315cb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Qml: Consistently use nullptrTobias Hunger2018-05-081-1/+1
| | | | | | | | | | | | | | Fixed by clang-tidy modernize-use-nullptr. Change-Id: Ibe0dddaacbabd47b5a0519ae361132818d5b8be2 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | QmlJsEditor/QmlJsTools: Use override consistentlyTobias Hunger2018-05-073-3/+3
| | | | | | | | | | | | | | clang-tidy fixes from modernize-use-override check. Change-Id: I29716dcf73946b5762568d349a3f5a3da4f656e6 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | Use FileName in TextMarkEike Ziller2018-05-033-8/+8
| | | | | | | | | | Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493 Reviewed-by: David Schulz <david.schulz@qt.io>