summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md38
-rw-r--r--dist/changes-4.9.0.md240
-rw-r--r--doc/images/creator-gs-01.pngbin5074 -> 4401 bytes
-rw-r--r--doc/src/overview/creator-acknowledgements.qdoc35
-rw-r--r--share/qtcreator/qml-type-descriptions/qbs.qmltypes17
-rw-r--r--src/app/qtcreator.icobin115160 -> 128904 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128.pngbin5928 -> 5926 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128@2x.pngbin12709 -> 12879 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16.pngbin527 -> 511 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16@2x.pngbin1348 -> 1150 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256.pngbin12740 -> 12879 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256@2x.pngbin29292 -> 30296 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32.pngbin1332 -> 1150 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32@2x.pngbin2772 -> 2384 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512.pngbin29340 -> 30296 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512@2x.pngbin67721 -> 68179 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128.pngbin5256 -> 5303 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128@2x.pngbin11304 -> 10500 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16.pngbin487 -> 515 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16@2x.pngbin1374 -> 790 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256.pngbin11304 -> 10500 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256@2x.pngbin26984 -> 25277 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32.pngbin1374 -> 790 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32@2x.pngbin2423 -> 2571 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512.pngbin26984 -> 25277 bytes
-rw-r--r--src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512@2x.pngbin63576 -> 56457 bytes
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0001-Remove-highlight-definitions-with-incompatible-licen.patch1381
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0002-Remove-autotests.patch2901
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0003-Add-qmake-Qbs-files-and-files-generated-by-CMake.patch389
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0004-Compile-with-namespaced-Qt.patch281
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0005-Prevent-assertion-in-RegExpr-doLoad.patch29
-rw-r--r--src/libs/3rdparty/syntax-highlighting/patches/0006-Syntax-Highlighter-return-all-definitions-for-a-file.patch101
-rw-r--r--src/libs/clangsupport/commandlinebuilder.h31
-rw-r--r--src/libs/clangsupport/progresscounter.h32
-rw-r--r--src/libs/languageserverprotocol/lsptypes.cpp25
-rw-r--r--src/libs/languageserverprotocol/lsptypes.h2
-rw-r--r--src/libs/utils/jsontreeitem.cpp99
-rw-r--r--src/libs/utils/jsontreeitem.h56
-rw-r--r--src/libs/utils/tooltip/tooltip.cpp1
-rw-r--r--src/libs/utils/utils-lib.pri7
-rw-r--r--src/libs/utils/utils.qbs2
-rw-r--r--src/plugins/clangcodemodel/clanghoverhandler.cpp77
-rw-r--r--src/plugins/clangformat/clangformatbaseindenter.cpp96
-rw-r--r--src/plugins/clangformat/clangformatbaseindenter.h8
-rw-r--r--src/plugins/clangtools/clangselectablefilesdialog.ui4
-rw-r--r--src/plugins/clangtools/clangtidyclazytool.cpp14
-rw-r--r--src/plugins/clangtools/clangtool.cpp6
-rw-r--r--src/plugins/clangtools/clangtoolruncontrol.cpp4
-rw-r--r--src/plugins/clangtools/clangtoolsbasicsettings.cpp2
-rw-r--r--src/plugins/clangtools/clangtoolsbasicsettings.h2
-rw-r--r--src/plugins/clangtools/clangtoolsbasicsettings.ui4
-rw-r--r--src/plugins/clangtools/clangtoolsconfigwidget.ui4
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp109
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnosticmodel.h6
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnosticview.cpp156
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnosticview.h12
-rw-r--r--src/plugins/clangtools/clangtoolslogfilereader.cpp2
-rw-r--r--src/plugins/coreplugin/helpitem.cpp9
-rw-r--r--src/plugins/coreplugin/helpitem.h2
-rw-r--r--src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.pngbin3799 -> 5303 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.pngbin487 -> 515 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.pngbin650 -> 557 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.pngbin8195 -> 10500 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.pngbin976 -> 790 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.pngbin1386 -> 1985 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.pngbin18951 -> 25277 bytes
-rw-r--r--src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.pngbin1873 -> 2571 bytes
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp8
-rw-r--r--src/plugins/cpptools/cpphoverhandler.cpp9
-rw-r--r--src/plugins/cpptools/cpptoolsreuse.cpp87
-rw-r--r--src/plugins/cpptools/cpptoolsreuse.h1
-rw-r--r--src/plugins/languageclient/client.cpp77
-rw-r--r--src/plugins/languageclient/client.h11
-rw-r--r--src/plugins/languageclient/languageclient.pro6
-rw-r--r--src/plugins/languageclient/languageclient.qbs6
-rw-r--r--src/plugins/languageclient/languageclientcompletionassist.cpp (renamed from src/plugins/languageclient/languageclientcodeassist.cpp)2
-rw-r--r--src/plugins/languageclient/languageclientcompletionassist.h (renamed from src/plugins/languageclient/languageclientcodeassist.h)2
-rw-r--r--src/plugins/languageclient/languageclientquickfix.cpp166
-rw-r--r--src/plugins/languageclient/languageclientquickfix.h45
-rw-r--r--src/plugins/languageclient/languageclientsettings.cpp46
-rw-r--r--src/plugins/languageclient/languageclientutils.cpp18
-rw-r--r--src/plugins/languageclient/languageclientutils.h1
-rw-r--r--src/plugins/perfprofiler/perfdatareader.cpp10
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanager.cpp43
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanager.pro2
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanager.qbs6
-rw-r--r--src/plugins/qmljseditor/qmljsfindreferences.cpp10
-rw-r--r--src/plugins/remotelinux/linuxdeviceprocess.cpp5
-rw-r--r--src/plugins/texteditor/textdocument.cpp13
-rw-r--r--src/plugins/texteditor/textdocument.h2
-rw-r--r--src/plugins/texteditor/textmark.cpp7
-rw-r--r--src/plugins/welcome/introductionwidget.cpp14
-rw-r--r--src/shared/proparser/prowriter.cpp55
m---------src/shared/qbs0
-rw-r--r--src/shared/shared.pro5
-rw-r--r--src/tools/clangpchmanagerbackend/clangpchmanagerbackendmain.cpp51
-rw-r--r--src/tools/clangpchmanagerbackend/source/builddependencycollector.cpp52
-rw-r--r--src/tools/clangpchmanagerbackend/source/builddependencycollector.h19
-rw-r--r--src/tools/clangpchmanagerbackend/source/collectbuilddependencyaction.h33
-rw-r--r--src/tools/clangpchmanagerbackend/source/collectbuilddependencypreprocessorcallbacks.h32
-rw-r--r--src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h38
-rw-r--r--src/tools/clangpchmanagerbackend/source/pchcreator.cpp24
-rw-r--r--src/tools/clangpchmanagerbackend/source/pchcreator.h3
-rw-r--r--src/tools/clangrefactoringbackend/clangrefactoringbackendmain.cpp51
-rw-r--r--src/tools/clangrefactoringbackend/source/clangtool.cpp25
-rw-r--r--src/tools/clangrefactoringbackend/source/clangtool.h2
-rw-r--r--src/tools/clangrefactoringbackend/source/collectmacrossourcefilecallbacks.cpp2
-rw-r--r--src/tools/clangrefactoringbackend/source/collectsymbolsaction.h7
-rw-r--r--src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp24
-rw-r--r--src/tools/clangrefactoringbackend/source/indexdataconsumer.h5
-rw-r--r--src/tools/clangrefactoringbackend/source/symbolindexer.cpp62
-rw-r--r--src/tools/clangrefactoringbackend/source/symbolscollector.cpp29
-rw-r--r--src/tools/clangrefactoringbackend/source/symbolscollector.h2
-rw-r--r--src/tools/clangrefactoringbackend/source/symbolscollectorinterface.h2
m---------src/tools/perfparser0
-rw-r--r--tests/auto/profilewriter/profilewriter.qbs1
-rw-r--r--tests/manual/qml/testfiles_quick2/images/qtcreator.icobin20929 -> 128904 bytes
-rw-r--r--tests/manual/qml/testfiles_quick2/images/qtcreator.jpgbin9489 -> 6475 bytes
-rw-r--r--tests/manual/qml/testfiles_quick2/images/qtcreator.pngbin12498 -> 10500 bytes
-rw-r--r--tests/system/shared/clang.py6
-rw-r--r--tests/system/shared/editor_utils.py4
-rw-r--r--tests/system/suite_APTW/tst_APTW03/test.py73
-rw-r--r--tests/system/suite_QMLS/tst_QMLS03/test.py4
-rw-r--r--tests/system/suite_debugger/tst_qml_js_console/test.py13
-rw-r--r--tests/system/suite_debugger/tst_qml_locals/test.py11
-rw-r--r--tests/system/suite_editors/tst_generic_highlighter/test.py91
-rw-r--r--tests/system/suite_editors/tst_qml_editor/test.py35
-rw-r--r--tests/system/suite_general/tst_create_proj_wizard/test.py4
-rw-r--r--tests/system/suite_tools/tst_git_local/test.py2
-rw-r--r--tests/unit/unittest/builddependencycollector-test.cpp239
-rw-r--r--tests/unit/unittest/clangquery-test.cpp12
-rw-r--r--tests/unit/unittest/clangquerygatherer-test.cpp3
-rw-r--r--tests/unit/unittest/commandlinebuilder-test.cpp152
-rw-r--r--tests/unit/unittest/data/symbolscollector/defines.h (renamed from tests/unit/unittest/data/symbolscollector_defines.h)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/error.cpp1
-rw-r--r--tests/unit/unittest/data/symbolscollector/header1.h3
-rw-r--r--tests/unit/unittest/data/symbolscollector/header2.h (renamed from tests/unit/unittest/data/symbolscollector_header2.h)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/header3.h3
-rw-r--r--tests/unit/unittest/data/symbolscollector/include/unmodified_header.h (renamed from tests/unit/unittest/data/include/symbolscollector_unmodified_header.h)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/include/unmodified_header2.h (renamed from tests/unit/unittest/data/include/symbolscollector_unmodified_header2.h)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/main.cpp4
-rw-r--r--tests/unit/unittest/data/symbolscollector/main2.cpp5
-rw-r--r--tests/unit/unittest/data/symbolscollector/simple.cpp (renamed from tests/unit/unittest/data/symbolscollector_simple.cpp)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/symbolkind.cpp (renamed from tests/unit/unittest/data/symbolscollector_symbolkind.cpp)0
-rw-r--r--tests/unit/unittest/data/symbolscollector/unmodified.cpp (renamed from tests/unit/unittest/data/symbolscollector_unmodified.cpp)2
-rw-r--r--tests/unit/unittest/data/symbolscollector/unmodified2.cpp (renamed from tests/unit/unittest/data/symbolscollector_unmodified2.cpp)2
-rw-r--r--tests/unit/unittest/data/symbolscollector/unmodified3.cpp9
-rw-r--r--tests/unit/unittest/data/symbolscollector/unsaved.cpp1
-rw-r--r--tests/unit/unittest/data/symbolscollector_header1.h3
-rw-r--r--tests/unit/unittest/data/symbolscollector_header3.h3
-rw-r--r--tests/unit/unittest/data/symbolscollector_main.cpp4
-rw-r--r--tests/unit/unittest/data/symbolscollector_main2.cpp5
-rw-r--r--tests/unit/unittest/data/symbolscollector_unmodified3.cpp9
-rw-r--r--tests/unit/unittest/data/symbolscollector_unsaved.cpp1
-rw-r--r--tests/unit/unittest/gtest-creator-printing.h4
-rw-r--r--tests/unit/unittest/mocksymbolscollector.h3
-rw-r--r--tests/unit/unittest/pchcreator-test.cpp14
-rw-r--r--tests/unit/unittest/refactoringclientserverinprocess-test.cpp39
-rw-r--r--tests/unit/unittest/refactoringserver-test.cpp40
-rw-r--r--tests/unit/unittest/sourcerangeextractor-test.cpp4
-rw-r--r--tests/unit/unittest/symbolfinder-test.cpp64
-rw-r--r--tests/unit/unittest/symbolindexer-test.cpp116
-rw-r--r--tests/unit/unittest/symbolscollector-test.cpp176
-rw-r--r--tests/unit/unittest/usedmacrocollector-test.cpp64
164 files changed, 7470 insertions, 1063 deletions
diff --git a/README.md b/README.md
index 0140bacb3b..f3d1b9baf0 100644
--- a/README.md
+++ b/README.md
@@ -287,6 +287,44 @@ http://llvm.org/docs/GettingStarted.html#git-mirror:
Qt Creator includes the following third-party components,
we thank the authors who made this possible:
+### KSyntaxHighlighting
+
+ Syntax highlighting engine for Kate syntax definitions
+
+ This is a stand-alone implementation of the Kate syntax highlighting
+ engine. It's meant as a building block for text editors as well as
+ for simple highlighted text rendering (e.g. as HTML), supporting both
+ integration with a custom editor as well as a ready-to-use
+ QSyntaxHighlighter sub-class.
+
+ Distributed under the:
+
+ MIT License
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ The source code of KSyntaxHighlighting can be found here:
+ https://cgit.kde.org/syntax-highlighting.git
+ QtCreator/src/libs/3rdparty/syntax-highlighting
+ https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/syntax-highlighting
+
### Clazy
https://github.com/KDE/clazy
diff --git a/dist/changes-4.9.0.md b/dist/changes-4.9.0.md
new file mode 100644
index 0000000000..5bc79fca88
--- /dev/null
+++ b/dist/changes-4.9.0.md
@@ -0,0 +1,240 @@
+Qt Creator version 4.9 contains bug fixes and new features.
+
+The most important changes are listed in this document. For a complete
+list of changes, see the Git log for the Qt Creator sources that
+you can check out from the public Git repository. For example:
+
+ git clone git://code.qt.io/qt-creator/qt-creator.git
+ git log --cherry-pick --pretty=oneline origin/4.8..v4.9.0
+
+General
+
+* Added high-level introduction to Qt Creator's UI for first-time users
+ (QTCREATORBUG-21585)
+* Added option to run external tools in build or run environment of
+ active project (QTCREATORBUG-18394, QTCREATORBUG-19892)
+* Improved selection colors in dark themes (QTCREATORBUG-18888)
+
+Editing
+
+* Language Client
+ * Added support for document outline (QTCREATORBUG-21573)
+ * Added support for `Find Usages` (QTCREATORBUG-21577)
+ * Added support for code actions
+* Highlighter
+ * Replaced custom highlighting file parser with `KSyntaxHighlighting`
+ (QTCREATORBUG-21029)
+* Made it possible to filter bookmarks by line and text content in Locator
+ (QTCREATORBUG-21771)
+* Fixed document sort order after rename (QTCREATORBUG-21565)
+
+Help
+
+* Improved context help in case of code errors or diagnostics
+ (QTCREATORBUG-15959, QTCREATORBUG-21686)
+* Improved lookup performance for context help
+
+All Projects
+
+* Added `Expand All` to context menu (QTCREATORBUG-17243)
+* Added `Close All Files in Project` action (QTCREATORBUG-15593)
+* Added closing of all files of a project when project is closed
+ (QTCREATORBUG-15721)
+* Added display of command line parameters to `Application Output`
+ (QTCREATORBUG-20577)
+* Fixed that dragging file from `Projects` view to desktop moved the file
+ (QTCREATORBUG-14494)
+
+QMake Projects
+
+* Fixed that adding files did not respect alphabetic sorting and indentation
+ with tabs (QTCREATORBUG-553, QTCREATORBUG-21807)
+* Fixed updating of `LD_LIBRARY_PATH` environment variable (QTCREATORBUG-21475)
+* Fixed updating of project tree in case of wildcards in corresponding QMake
+ variable (QTCREATORBUG-21603)
+
+CMake Projects
+
+* Fixed that default build directory names contained spaces (QTCREATORBUG-18442)
+* Fixed that build targets were reset on CMake parse error (QTCREATORBUG-21617)
+* Fixed scroll behavior when adding configuration item
+
+Qbs Projects
+
+* Fixed crash when switching kits (QTCREATORBUG-21544)
+
+Generic Projects
+
+* Added deployment via `QtCreatorDeployment.txt` file (QTCREATORBUG-19202)
+* Added setting C/C++ flags for the code model via `.cflags` and `.cxxflags`
+ files (QTCREATORBUG-19668)
+* Fixed `Apply Filter` when editing file list (QTCREATORBUG-16237)
+
+C++ Support
+
+* Added code snippet for range-based `for` loops
+* Added option to synchronize `Include Hierarchy` with current document
+ (QTCREATORBUG-12022)
+* Clang Code Model
+ * Added buttons for copying and ignoring diagnostics to tooltip
+ * Fixed issue with high memory consumption (QTCREATORBUG-19543)
+* Clang Format
+ * Added option to format code instead of only indenting code
+
+QML Support
+
+* Updated to parser from Qt 5.12, adding support for ECMAScript 7
+ (QTCREATORBUG-20341, QTCREATORBUG-21301)
+* Improved error handling in Qt Quick Application project template (QTBUG-39469)
+* Fixed crash on `Find Usages`
+
+Python
+
+* Added project templates for Qt for Python
+
+Nim Support
+
+* Added code completion based on `NimSuggest`
+
+Debugging
+
+* GDB
+ * Added support for rvalue references in function arguments
+* LLDB
+ * Fixed `Source Paths Mappings` functionality (QTCREATORBUG-17468)
+
+Clang Analyzer Tools
+
+* Made Clazy configuration options more fine grained (QTCREATORBUG-21120)
+* Improved Fix-its handling in case of selecting multiple diagnostics and
+ after editing files
+* Added diagnostics from header files (QTCREATORBUG-21452)
+* Added sorting to result list (QTCREATORBUG-20660)
+* Fixed that files were analyzed that are not part of current build
+ configuration (QTCREATORBUG-16016)
+
+Perf Profiler
+
+* Made Perf profiler integration opensource
+
+Qt Quick Designer
+
+* Made QML Live Preview integration opensource
+
+Version Control Systems
+
+* Git
+ * Improved messages when submit editor validation fails and when editor
+ is closed
+ * Added `Subversion` > `DCommit`
+ * `Branches` View
+ * Added `Push` action
+ * Added entry for detached `HEAD` (QTCREATORBUG-21311)
+ * Added tracking of external changes to `HEAD` (QTCREATORBUG-21089)
+* Subversion
+ * Improved handling of commit errors (QTCREATORBUG-15227)
+* Perforce
+ * Disabled by default
+ * Fixed issue with setting P4 environment variables (QTCREATORBUG-21573)
+* Mercurial
+ * Added side-by-side diff viewer (QTCREATORBUG-21124)
+
+Test Integration
+
+* Added `Uncheck All Filters`
+* Added grouping results by application (QTCREATORBUG-21740)
+* QTest
+ * Added support for `BXPASS` and `BXFAIL`
+ * Fixed parsing of `BFAIL` and `BPASS`
+
+FakeVim
+
+* Added option for blinking cursor (QTCREATORBUG-21613)
+* Added closing completion popups with `Ctrl+[` (QTCREATORBUG-21886)
+
+Model Editor
+
+* Added display of base class names
+
+Serial Terminal
+
+* Improved error message on connection failure
+
+Platform Specific
+
+Windows
+
+* Added support for MSVC 2019
+* Changed toolchain detection to use `vswhere` by default, which is recommended
+ by Microsoft
+
+Linux
+
+macOS
+
+* Added support for Touch Bar (QTCREATORBUG-21263)
+
+Android
+
+* Removed separate `QmakeAndroidSupport` plugin and merged functionality into
+ other plugins
+
+Remote Linux
+
+* Removed use of Botan, exchanging it by use of separately installed OpenSSH
+ tools (QTCREATORBUG-15744, QTCREATORBUG-15807, QTCREATORBUG-19306,
+ QTCREATORBUG-20210)
+* Added support for `ssh-askpass`
+* Added optional deployment of public key for authentication to device setup
+ wizard
+* Added support for X11 forwarding
+* Added `rsync` based deployment method
+* Added support for `Run in Terminal`
+* Added support for opening a remote terminal from device settings
+* Fixed incremental deployment when target directory is changed
+ (QTCREATORBUG-21225)
+* Fixed issue with killing remote process (QTCREATORBUG-19941)
+
+Credits for these changes go to:
+Aaron Barany
+Alessandro Portale
+Andre Hartmann
+André Pönitz
+Asit Dhal
+Bernhard Beschow
+Chris Rizzitello
+Christian Kandeler
+Christian Stenger
+Cristian Adam
+Cristian Maureira-Fredes
+Daniel Wingerd
+David Schulz
+Eike Ziller
+Filip Bucek
+Filippo Cucchetto
+Frank Meerkoetter
+Friedemann Kleint
+Ivan Donchevskii
+James McDonnell
+Jochen Becher
+Kai Köhne
+Leena Miettinen
+Marco Benelli
+Marco Bubke
+Michael Kopp
+Michael Weghorn
+Miklós Márton
+Mitch Curtis
+Nikolai Kosjar
+Oliver Wolff
+Orgad Shaneh
+Przemyslaw Gorszkowski
+Robert Löhning
+Thiago Macieira
+Thomas Hartmann
+Tim Jenssen
+Tobias Hunger
+Ulf Hermann
+Vikas Pachdha
+Ville Nummela
+Xiaofeng Wang
diff --git a/doc/images/creator-gs-01.png b/doc/images/creator-gs-01.png
index 1bbf086b49..c67a633aa5 100644
--- a/doc/images/creator-gs-01.png
+++ b/doc/images/creator-gs-01.png
Binary files differ
diff --git a/doc/src/overview/creator-acknowledgements.qdoc b/doc/src/overview/creator-acknowledgements.qdoc
index e12926398f..09d9c7d9d3 100644
--- a/doc/src/overview/creator-acknowledgements.qdoc
+++ b/doc/src/overview/creator-acknowledgements.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -90,6 +90,39 @@
\li \l{https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/syntax-highlighting}
\endlist
+ \li \b{Clazy}
+
+ \l {https://github.com/KDE/clazy}
+
+ Copyright (C) 2015-2019 Clazy Team
+
+ Distributed under the \l {https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html}
+ {GNU LIBRARY GENERAL PUBLIC LICENSE Version 2 (LGPL2)}.
+
+ Integrated with patches from
+ \list
+ \li \l{http://code.qt.io/cgit/clang/clang-tools-extra.git}
+ \endlist
+
+ \li \b{LLVM/Clang}
+
+ \list
+ \li \l{http://llvm.org/svn/llvm-project/llvm}
+ \li \l{http://llvm.org/svn/llvm-project/cfe/trunk}
+ \li \l{http://llvm.org/svn/llvm-project/clang-tools-extra/trunk}
+ \endlist
+
+ Copyright (C) 2003-2019 LLVM Team
+
+ Distributed under the \l {https://github.com/llvm-mirror/llvm/blob/master/LICENSE.TXT}
+ {University of Illinois/NCSA Open Source License (NCSA)}.
+
+ With backported/additional patches from
+ \list
+ \li \l{http://code.qt.io/cgit/clang/llvm.git}
+ \li \l{http://code.qt.io/cgit/clang/clang.git}
+ \endlist
+
\li \b{Reference implementation for std::experimental::optional}
Copyright (C) 2011-2012 Andrzej Krzemienski
diff --git a/share/qtcreator/qml-type-descriptions/qbs.qmltypes b/share/qtcreator/qml-type-descriptions/qbs.qmltypes
index 056d94ffbe..bc4244b63f 100644
--- a/share/qtcreator/qml-type-descriptions/qbs.qmltypes
+++ b/share/qtcreator/qml-type-descriptions/qbs.qmltypes
@@ -19,6 +19,7 @@ Module {
exports: [ "qbs/Depends 1.0" ]
prototype: "QQuickItem"
Property { name: "condition"; type: "bool" }
+ Property { name: "enableFallback"; type: "bool" }
Property { name: "limitToSubProject"; type: "bool" }
Property { name: "multiplexConfigurationIds"; type: "string"; isList: true }
Property { name: "name"; type: "string" }
@@ -67,6 +68,14 @@ Module {
Property { name: "prefix"; type: "string" }
}
Component {
+ name: "JobLimit"
+ exports: [ "qbs/JobLimit 1.0" ]
+ prototype: "QQuickItem"
+ Property { name: "condition"; type: "bool" }
+ Property { name: "jobCount"; type: "int" }
+ Property { name: "jobPool"; type: "string" }
+ }
+ Component {
name: "Module"
exports: [ "qbs/Module 1.0" ]
prototype: "QQuickItem"
@@ -81,6 +90,14 @@ Module {
Property { name: "version"; type: "string" }
}
Component {
+ name: "ModuleProvider"
+ exports: [ "qbs/ModuleProvider 1.0" ]
+ prototype: "QQuickItem"
+ Property { name: "name"; type: "string" }
+ Property { name: "outputBaseDir"; type: "string" }
+ Property { name: "relativeSearchPaths"; type: "string"; isList: true }
+ }
+ Component {
name: "Parameter"
exports: [ "qbs/Parameter 1.0" ]
prototype: "QQuickItem"
diff --git a/src/app/qtcreator.ico b/src/app/qtcreator.ico
index 9e06d9eae5..4bf9505ee3 100644
--- a/src/app/qtcreator.ico
+++ b/src/app/qtcreator.ico
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128.png
index 9fb0b850ed..41efea2cdb 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128@2x.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128@2x.png
index 48923af95a..fc05e560f3 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_128x128@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16.png
index e6d3674071..f9ef151821 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16@2x.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16@2x.png
index bd9d250839..d2d1be1b16 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_16x16@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256.png
index 4956ea009a..fc05e560f3 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256@2x.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256@2x.png
index 218534a85e..26f9765d1f 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_256x256@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32.png
index 9cac26d704..d2d1be1b16 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32@2x.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32@2x.png
index b5f4bc827f..fd3ed0aa9d 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_32x32@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512.png
index a9ef0f4a74..26f9765d1f 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512@2x.png b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512@2x.png
index dedd2f5e57..c11fe74891 100644
--- a/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator-project.iconset/icon_512x512@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128.png
index 6c556a8356..53a42c20fe 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128@2x.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128@2x.png
index 4442d3eb27..3a9cf292bc 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_128x128@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16.png
index 2adcdb5f49..d48df57e63 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16@2x.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16@2x.png
index 2a7030fd70..87ab1ba5cb 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_16x16@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256.png
index 4442d3eb27..3a9cf292bc 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256@2x.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256@2x.png
index 069b5c0502..acbb5a5134 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_256x256@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32.png
index 2a7030fd70..87ab1ba5cb 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32@2x.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32@2x.png
index c5e4581649..1a89d932f5 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_32x32@2x.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512.png
index 069b5c0502..acbb5a5134 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512.png
Binary files differ
diff --git a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512@2x.png b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512@2x.png
index 0b810615e0..579ec88ad7 100644
--- a/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512@2x.png
+++ b/src/app/qtcreator.xcassets/qtcreator.appiconset/icon_512x512@2x.png
Binary files differ
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0001-Remove-highlight-definitions-with-incompatible-licen.patch b/src/libs/3rdparty/syntax-highlighting/patches/0001-Remove-highlight-definitions-with-incompatible-licen.patch
new file mode 100644
index 0000000000..7854f3a218
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0001-Remove-highlight-definitions-with-incompatible-licen.patch
@@ -0,0 +1,1381 @@
+From 40ee252983bd0d74b43d204de195ef4426ccb690 Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:43:26 +0100
+Subject: [PATCH 1/6] Remove highlight definitions with incompatible license
+
+---
+ data/syntax/4dos.xml | 924 ----
+ data/syntax/abap.xml | 285 --
+ data/syntax/abc.xml | 86 -
+ data/syntax/actionscript.xml | 336 --
+ data/syntax/ada.xml | 201 -
+ data/syntax/adblock.xml | 87 -
+ data/syntax/agda.xml | 107 -
+ data/syntax/ahdl.xml | 145 -
+ data/syntax/ahk.xml | 1143 -----
+ data/syntax/ample.xml | 3234 ------------
+ data/syntax/ansforth94.xml | 595 ---
+ data/syntax/ansic89.xml | 134 -
+ data/syntax/ansys.xml | 2056 --------
+ data/syntax/apache.xml | 633 ---
+ data/syntax/apparmor.xml | 1555 ------
+ data/syntax/asm-avr.xml | 212 -
+ data/syntax/asm-dsp56k.xml | 329 --
+ data/syntax/asm-m68k.xml | 651 ---
+ data/syntax/asm6502.xml | 117 -
+ data/syntax/asn1.xml | 70 -
+ data/syntax/asp.xml | 389 --
+ data/syntax/awk.xml | 288 --
+ data/syntax/bibtex.xml | 108 -
+ data/syntax/bitbake.xml | 183 -
+ data/syntax/bmethod.xml | 96 -
+ data/syntax/boo.xml | 304 --
+ data/syntax/c.xml | 260 -
+ data/syntax/carto-css.xml | 405 --
+ data/syntax/ccss.xml | 655 ---
+ data/syntax/cg.xml | 273 -
+ data/syntax/cgis.xml | 134 -
+ data/syntax/changelog.xml | 29 -
+ data/syntax/chicken.xml | 435 --
+ data/syntax/cisco.xml | 302 --
+ data/syntax/clipper.xml | 498 --
+ data/syntax/clojure.xml | 883 ----
+ data/syntax/coffee.xml | 340 --
+ data/syntax/coldfusion.xml | 731 ---
+ data/syntax/commonlisp.xml | 1177 -----
+ data/syntax/component-pascal.xml | 172 -
+ data/syntax/context.xml | 130 -
+ data/syntax/cpp.xml | 2030 --------
+ data/syntax/crk.xml | 163 -
+ data/syntax/cs.xml | 168 -
+ data/syntax/cubescript.xml | 456 --
+ data/syntax/cue.xml | 74 -
+ data/syntax/curry.xml | 364 --
+ data/syntax/d.xml | 819 ---
+ data/syntax/debianchangelog.xml | 241 -
+ data/syntax/debiancontrol.xml | 65 -
+ data/syntax/desktop.xml | 30 -
+ data/syntax/diff.xml | 118 -
+ data/syntax/djangotemplate.xml | 330 --
+ data/syntax/dockerfile.xml | 67 -
+ data/syntax/dosbat.xml | 309 --
+ data/syntax/dot.xml | 172 -
+ data/syntax/doxyfile.xml | 350 --
+ data/syntax/doxygenlua.xml | 497 --
+ data/syntax/e.xml | 260 -
+ data/syntax/eiffel.xml | 125 -
+ data/syntax/elixir.xml | 225 -
+ data/syntax/email.xml | 101 -
+ data/syntax/erlang.xml | 250 -
+ data/syntax/euphoria.xml | 378 --
+ data/syntax/fasm.xml | 898 ----
+ data/syntax/fastq.xml | 35 -
+ data/syntax/ferite.xml | 117 -
+ data/syntax/fgl-4gl.xml | 363 --
+ data/syntax/fgl-per.xml | 172 -
+ data/syntax/fortran.xml | 584 ---
+ data/syntax/freebasic.xml | 573 ---
+ data/syntax/fsharp.xml | 283 --
+ data/syntax/fstab.xml | 96 -
+ data/syntax/ftl.xml | 84 -
+ data/syntax/gap.xml | 7835 -----------------------------
+ data/syntax/gcc.xml | 610 ---
+ data/syntax/gcode.xml | 202 -
+ data/syntax/gdb-bt.xml | 53 -
+ data/syntax/gdb.xml | 72 -
+ data/syntax/gdbinit.xml | 24 -
+ data/syntax/gdl.xml | 313 --
+ data/syntax/gettext.xml | 170 -
+ data/syntax/git-ignore.xml | 41 -
+ data/syntax/git-rebase.xml | 65 -
+ data/syntax/gitolite.xml | 44 -
+ data/syntax/glosstex.xml | 45 -
+ data/syntax/glsl.xml | 1217 -----
+ data/syntax/gnuassembler.xml | 303 --
+ data/syntax/gnuplot.xml | 890 ----
+ data/syntax/go.xml | 175 -
+ data/syntax/grammar.xml | 145 -
+ data/syntax/groovy.xml | 3889 --------------
+ data/syntax/haml.xml | 500 --
+ data/syntax/hamlet.xml | 104 -
+ data/syntax/haskell.xml | 649 ---
+ data/syntax/haxe.xml | 181 -
+ data/syntax/hunspell-aff.xml | 239 -
+ data/syntax/hunspell-dat.xml | 48 -
+ data/syntax/hunspell-dic.xml | 85 -
+ data/syntax/hunspell-idx.xml | 40 -
+ data/syntax/idconsole.xml | 2145 --------
+ data/syntax/idl.xml | 114 -
+ data/syntax/ilerpg.xml | 701 ---
+ data/syntax/inform.xml | 405 --
+ data/syntax/intelhex.xml | 41 -
+ data/syntax/isocpp.xml | 825 ---
+ data/syntax/j.xml | 119 -
+ data/syntax/jam.xml | 340 --
+ data/syntax/javascript-react.xml | 259 -
+ data/syntax/javascript.xml | 283 --
+ data/syntax/jira.xml | 718 ---
+ data/syntax/jsp.xml | 3061 -----------
+ data/syntax/julia.xml | 289 --
+ data/syntax/k.xml | 430 --
+ data/syntax/kbasic.xml | 97 -
+ data/syntax/kconfig.xml | 1144 -----
+ data/syntax/kdesrc-buildrc.xml | 247 -
+ data/syntax/kotlin.xml | 298 --
+ data/syntax/latex.xml | 697 ---
+ data/syntax/ld.xml | 84 -
+ data/syntax/ldif.xml | 304 --
+ data/syntax/less.xml | 1467 ------
+ data/syntax/lex.xml | 144 -
+ data/syntax/lilypond.xml | 1199 -----
+ data/syntax/literate-curry.xml | 50 -
+ data/syntax/literate-haskell.xml | 38 -
+ data/syntax/logcat.xml | 202 -
+ data/syntax/logtalk.xml | 248 -
+ data/syntax/lpc.xml | 167 -
+ data/syntax/lsl.xml | 1050 ----
+ data/syntax/lua.xml | 538 --
+ data/syntax/m3u.xml | 51 -
+ data/syntax/m4.xml | 193 -
+ data/syntax/mab.xml | 30 -
+ data/syntax/magma.xml | 154 -
+ data/syntax/mako.xml | 253 -
+ data/syntax/mandoc.xml | 88 -
+ data/syntax/mason.xml | 233 -
+ data/syntax/mathematica.xml | 3229 ------------
+ data/syntax/matlab.xml | 230 -
+ data/syntax/maxima.xml | 1890 -------
+ data/syntax/mediawiki.xml | 622 ---
+ data/syntax/mel.xml | 1380 -----
+ data/syntax/mergetagtext.xml | 145 -
+ data/syntax/meson.xml | 117 -
+ data/syntax/metafont.xml | 986 ----
+ data/syntax/metamath.xml | 122 -
+ data/syntax/mib.xml | 182 -
+ data/syntax/mips.xml | 359 --
+ data/syntax/modelica.xml | 260 -
+ data/syntax/modelines.xml | 197 -
+ data/syntax/modula-2-iso-only.xml | 342 --
+ data/syntax/modula-2-pim-only.xml | 308 --
+ data/syntax/modula-2-r10-only.xml | 347 --
+ data/syntax/modula-2.xml | 1191 -----
+ data/syntax/monobasic.xml | 216 -
+ data/syntax/mup.xml | 865 ----
+ data/syntax/nagios.xml | 83 -
+ data/syntax/nasm.xml | 893 ----
+ data/syntax/nemerle.xml | 208 -
+ data/syntax/nesc.xml | 185 -
+ data/syntax/noweb.xml | 52 -
+ data/syntax/nsis.xml | 494 --
+ data/syntax/objectivec.xml | 130 -
+ data/syntax/objectivecpp.xml | 300 --
+ data/syntax/ocaml.xml | 624 ---
+ data/syntax/ocamllex.xml | 81 -
+ data/syntax/ocamlyacc.xml | 160 -
+ data/syntax/octave.xml | 2218 --------
+ data/syntax/oors.xml | 87 -
+ data/syntax/opal.xml | 331 --
+ data/syntax/opencl.xml | 260 -
+ data/syntax/openscad.xml | 164 -
+ data/syntax/pango.xml | 160 -
+ data/syntax/pascal.xml | 219 -
+ data/syntax/pgn.xml | 108 -
+ data/syntax/php.xml | 5705 ---------------------
+ data/syntax/picsrc.xml | 401 --
+ data/syntax/pig.xml | 205 -
+ data/syntax/pike.xml | 121 -
+ data/syntax/pli.xml | 454 --
+ data/syntax/ply.xml | 54 -
+ data/syntax/pony.xml | 314 --
+ data/syntax/postscript.xml | 434 --
+ data/syntax/povray.xml | 967 ----
+ data/syntax/ppd.xml | 58 -
+ data/syntax/praat.xml | 510 --
+ data/syntax/progress.xml | 1707 -------
+ data/syntax/prolog.xml | 1031 ----
+ data/syntax/protobuf.xml | 120 -
+ data/syntax/pug.xml | 118 -
+ data/syntax/puppet.xml | 711 ---
+ data/syntax/purebasic.xml | 1767 -------
+ data/syntax/q.xml | 210 -
+ data/syntax/qmake.xml | 659 ---
+ data/syntax/qml.xml | 168 -
+ data/syntax/r.xml | 152 -
+ data/syntax/rapidq.xml | 432 --
+ data/syntax/rdoc.xml | 388 --
+ data/syntax/relaxng.xml | 119 -
+ data/syntax/relaxngcompact.xml | 108 -
+ data/syntax/replicode.xml | 196 -
+ data/syntax/rest.xml | 108 -
+ data/syntax/rexx.xml | 199 -
+ data/syntax/rhtml.xml | 1237 -----
+ data/syntax/rib.xml | 143 -
+ data/syntax/rmarkdown.xml | 81 -
+ data/syntax/roff.xml | 197 -
+ data/syntax/rpmspec.xml | 505 --
+ data/syntax/rsiidl.xml | 440 --
+ data/syntax/rtf.xml | 49 -
+ data/syntax/rust.xml | 374 --
+ data/syntax/sather.xml | 141 -
+ data/syntax/scala.xml | 3505 -------------
+ data/syntax/scheme.xml | 394 --
+ data/syntax/sci.xml | 1191 -----
+ data/syntax/scss.xml | 2242 ---------
+ data/syntax/sed.xml | 267 -
+ data/syntax/selinux-cil.xml | 683 ---
+ data/syntax/selinux-fc.xml | 299 --
+ data/syntax/selinux.xml | 1627 ------
+ data/syntax/sgml.xml | 46 -
+ data/syntax/sieve.xml | 152 -
+ data/syntax/sisu.xml | 154 -
+ data/syntax/sml.xml | 104 -
+ data/syntax/spice.xml | 51 -
+ data/syntax/sql-mysql.xml | 481 --
+ data/syntax/sql-oracle.xml | 1954 -------
+ data/syntax/sql-postgresql.xml | 1074 ----
+ data/syntax/sql.xml | 955 ----
+ data/syntax/stan.xml | 129 -
+ data/syntax/stata.xml | 3223 ------------
+ data/syntax/stl.xml | 31 -
+ data/syntax/systemc.xml | 133 -
+ data/syntax/systemverilog.xml | 1005 ----
+ data/syntax/tads3.xml | 176 -
+ data/syntax/taskjuggler.xml | 390 --
+ data/syntax/tcl.xml | 565 ---
+ data/syntax/tcsh.xml | 810 ---
+ data/syntax/template-toolkit.xml | 321 --
+ data/syntax/texinfo.xml | 63 -
+ data/syntax/textile.xml | 100 -
+ data/syntax/tibasic.xml | 71 -
+ data/syntax/tiger.xml | 96 -
+ data/syntax/toml.xml | 135 -
+ data/syntax/txt2tags.xml | 67 -
+ data/syntax/uscript.xml | 188 -
+ data/syntax/vala.xml | 288 --
+ data/syntax/varnish.xml | 349 --
+ data/syntax/varnish4.xml | 372 --
+ data/syntax/varnishcc.xml | 101 -
+ data/syntax/varnishcc4.xml | 128 -
+ data/syntax/varnishtest.xml | 547 --
+ data/syntax/varnishtest4.xml | 706 ---
+ data/syntax/vcard.xml | 45 -
+ data/syntax/velocity.xml | 51 -
+ data/syntax/vera.xml | 648 ---
+ data/syntax/verilog.xml | 252 -
+ data/syntax/vhdl.xml | 654 ---
+ data/syntax/vrml.xml | 139 -
+ data/syntax/wavefront-obj.xml | 69 -
+ data/syntax/winehq.xml | 34 -
+ data/syntax/wml.xml | 209 -
+ data/syntax/xharbour.xml | 539 --
+ data/syntax/xmldebug.xml | 592 ---
+ data/syntax/xonotic-console.xml | 5660 ---------------------
+ data/syntax/xorg.xml | 65 -
+ data/syntax/xslt.xml | 440 --
+ data/syntax/xul.xml | 624 ---
+ data/syntax/yacas.xml | 236 -
+ data/syntax/yaml.xml | 572 ---
+ data/syntax/yang.xml | 155 -
+ data/syntax/zonnon.xml | 144 -
+ data/syntax/zsh.xml | 959 ----
+ 274 files changed, 145722 deletions(-)
+ delete mode 100644 data/syntax/4dos.xml
+ delete mode 100644 data/syntax/abap.xml
+ delete mode 100644 data/syntax/abc.xml
+ delete mode 100644 data/syntax/actionscript.xml
+ delete mode 100644 data/syntax/ada.xml
+ delete mode 100644 data/syntax/adblock.xml
+ delete mode 100644 data/syntax/agda.xml
+ delete mode 100644 data/syntax/ahdl.xml
+ delete mode 100644 data/syntax/ahk.xml
+ delete mode 100644 data/syntax/ample.xml
+ delete mode 100644 data/syntax/ansforth94.xml
+ delete mode 100644 data/syntax/ansic89.xml
+ delete mode 100644 data/syntax/ansys.xml
+ delete mode 100644 data/syntax/apache.xml
+ delete mode 100644 data/syntax/apparmor.xml
+ delete mode 100644 data/syntax/asm-avr.xml
+ delete mode 100644 data/syntax/asm-dsp56k.xml
+ delete mode 100644 data/syntax/asm-m68k.xml
+ delete mode 100644 data/syntax/asm6502.xml
+ delete mode 100644 data/syntax/asn1.xml
+ delete mode 100644 data/syntax/asp.xml
+ delete mode 100644 data/syntax/awk.xml
+ delete mode 100644 data/syntax/bibtex.xml
+ delete mode 100644 data/syntax/bitbake.xml
+ delete mode 100644 data/syntax/bmethod.xml
+ delete mode 100644 data/syntax/boo.xml
+ delete mode 100644 data/syntax/c.xml
+ delete mode 100644 data/syntax/carto-css.xml
+ delete mode 100644 data/syntax/ccss.xml
+ delete mode 100644 data/syntax/cg.xml
+ delete mode 100644 data/syntax/cgis.xml
+ delete mode 100644 data/syntax/changelog.xml
+ delete mode 100644 data/syntax/chicken.xml
+ delete mode 100644 data/syntax/cisco.xml
+ delete mode 100644 data/syntax/clipper.xml
+ delete mode 100644 data/syntax/clojure.xml
+ delete mode 100644 data/syntax/coffee.xml
+ delete mode 100644 data/syntax/coldfusion.xml
+ delete mode 100644 data/syntax/commonlisp.xml
+ delete mode 100644 data/syntax/component-pascal.xml
+ delete mode 100644 data/syntax/context.xml
+ delete mode 100644 data/syntax/cpp.xml
+ delete mode 100644 data/syntax/crk.xml
+ delete mode 100644 data/syntax/cs.xml
+ delete mode 100644 data/syntax/cubescript.xml
+ delete mode 100644 data/syntax/cue.xml
+ delete mode 100644 data/syntax/curry.xml
+ delete mode 100644 data/syntax/d.xml
+ delete mode 100644 data/syntax/debianchangelog.xml
+ delete mode 100644 data/syntax/debiancontrol.xml
+ delete mode 100644 data/syntax/desktop.xml
+ delete mode 100644 data/syntax/diff.xml
+ delete mode 100644 data/syntax/djangotemplate.xml
+ delete mode 100644 data/syntax/dockerfile.xml
+ delete mode 100644 data/syntax/dosbat.xml
+ delete mode 100644 data/syntax/dot.xml
+ delete mode 100644 data/syntax/doxyfile.xml
+ delete mode 100644 data/syntax/doxygenlua.xml
+ delete mode 100644 data/syntax/e.xml
+ delete mode 100644 data/syntax/eiffel.xml
+ delete mode 100644 data/syntax/elixir.xml
+ delete mode 100644 data/syntax/email.xml
+ delete mode 100644 data/syntax/erlang.xml
+ delete mode 100644 data/syntax/euphoria.xml
+ delete mode 100644 data/syntax/fasm.xml
+ delete mode 100644 data/syntax/fastq.xml
+ delete mode 100644 data/syntax/ferite.xml
+ delete mode 100644 data/syntax/fgl-4gl.xml
+ delete mode 100644 data/syntax/fgl-per.xml
+ delete mode 100644 data/syntax/fortran.xml
+ delete mode 100644 data/syntax/freebasic.xml
+ delete mode 100644 data/syntax/fsharp.xml
+ delete mode 100644 data/syntax/fstab.xml
+ delete mode 100644 data/syntax/ftl.xml
+ delete mode 100644 data/syntax/gap.xml
+ delete mode 100644 data/syntax/gcc.xml
+ delete mode 100644 data/syntax/gcode.xml
+ delete mode 100644 data/syntax/gdb-bt.xml
+ delete mode 100644 data/syntax/gdb.xml
+ delete mode 100644 data/syntax/gdbinit.xml
+ delete mode 100644 data/syntax/gdl.xml
+ delete mode 100644 data/syntax/gettext.xml
+ delete mode 100644 data/syntax/git-ignore.xml
+ delete mode 100644 data/syntax/git-rebase.xml
+ delete mode 100644 data/syntax/gitolite.xml
+ delete mode 100644 data/syntax/glosstex.xml
+ delete mode 100644 data/syntax/glsl.xml
+ delete mode 100644 data/syntax/gnuassembler.xml
+ delete mode 100644 data/syntax/gnuplot.xml
+ delete mode 100644 data/syntax/go.xml
+ delete mode 100644 data/syntax/grammar.xml
+ delete mode 100644 data/syntax/groovy.xml
+ delete mode 100644 data/syntax/haml.xml
+ delete mode 100644 data/syntax/hamlet.xml
+ delete mode 100644 data/syntax/haskell.xml
+ delete mode 100644 data/syntax/haxe.xml
+ delete mode 100644 data/syntax/hunspell-aff.xml
+ delete mode 100644 data/syntax/hunspell-dat.xml
+ delete mode 100644 data/syntax/hunspell-dic.xml
+ delete mode 100644 data/syntax/hunspell-idx.xml
+ delete mode 100644 data/syntax/idconsole.xml
+ delete mode 100644 data/syntax/idl.xml
+ delete mode 100644 data/syntax/ilerpg.xml
+ delete mode 100644 data/syntax/inform.xml
+ delete mode 100644 data/syntax/intelhex.xml
+ delete mode 100644 data/syntax/isocpp.xml
+ delete mode 100644 data/syntax/j.xml
+ delete mode 100644 data/syntax/jam.xml
+ delete mode 100644 data/syntax/javascript-react.xml
+ delete mode 100644 data/syntax/javascript.xml
+ delete mode 100644 data/syntax/jira.xml
+ delete mode 100644 data/syntax/jsp.xml
+ delete mode 100644 data/syntax/julia.xml
+ delete mode 100644 data/syntax/k.xml
+ delete mode 100644 data/syntax/kbasic.xml
+ delete mode 100644 data/syntax/kconfig.xml
+ delete mode 100644 data/syntax/kdesrc-buildrc.xml
+ delete mode 100644 data/syntax/kotlin.xml
+ delete mode 100644 data/syntax/latex.xml
+ delete mode 100644 data/syntax/ld.xml
+ delete mode 100644 data/syntax/ldif.xml
+ delete mode 100644 data/syntax/less.xml
+ delete mode 100644 data/syntax/lex.xml
+ delete mode 100644 data/syntax/lilypond.xml
+ delete mode 100644 data/syntax/literate-curry.xml
+ delete mode 100644 data/syntax/literate-haskell.xml
+ delete mode 100644 data/syntax/logcat.xml
+ delete mode 100644 data/syntax/logtalk.xml
+ delete mode 100644 data/syntax/lpc.xml
+ delete mode 100644 data/syntax/lsl.xml
+ delete mode 100644 data/syntax/lua.xml
+ delete mode 100644 data/syntax/m3u.xml
+ delete mode 100644 data/syntax/m4.xml
+ delete mode 100644 data/syntax/mab.xml
+ delete mode 100644 data/syntax/magma.xml
+ delete mode 100644 data/syntax/mako.xml
+ delete mode 100644 data/syntax/mandoc.xml
+ delete mode 100644 data/syntax/mason.xml
+ delete mode 100644 data/syntax/mathematica.xml
+ delete mode 100644 data/syntax/matlab.xml
+ delete mode 100644 data/syntax/maxima.xml
+ delete mode 100644 data/syntax/mediawiki.xml
+ delete mode 100644 data/syntax/mel.xml
+ delete mode 100644 data/syntax/mergetagtext.xml
+ delete mode 100644 data/syntax/meson.xml
+ delete mode 100644 data/syntax/metafont.xml
+ delete mode 100644 data/syntax/metamath.xml
+ delete mode 100644 data/syntax/mib.xml
+ delete mode 100644 data/syntax/mips.xml
+ delete mode 100644 data/syntax/modelica.xml
+ delete mode 100644 data/syntax/modelines.xml
+ delete mode 100644 data/syntax/modula-2-iso-only.xml
+ delete mode 100644 data/syntax/modula-2-pim-only.xml
+ delete mode 100644 data/syntax/modula-2-r10-only.xml
+ delete mode 100644 data/syntax/modula-2.xml
+ delete mode 100644 data/syntax/monobasic.xml
+ delete mode 100644 data/syntax/mup.xml
+ delete mode 100644 data/syntax/nagios.xml
+ delete mode 100644 data/syntax/nasm.xml
+ delete mode 100644 data/syntax/nemerle.xml
+ delete mode 100644 data/syntax/nesc.xml
+ delete mode 100644 data/syntax/noweb.xml
+ delete mode 100644 data/syntax/nsis.xml
+ delete mode 100644 data/syntax/objectivec.xml
+ delete mode 100644 data/syntax/objectivecpp.xml
+ delete mode 100644 data/syntax/ocaml.xml
+ delete mode 100644 data/syntax/ocamllex.xml
+ delete mode 100644 data/syntax/ocamlyacc.xml
+ delete mode 100644 data/syntax/octave.xml
+ delete mode 100644 data/syntax/oors.xml
+ delete mode 100644 data/syntax/opal.xml
+ delete mode 100644 data/syntax/opencl.xml
+ delete mode 100644 data/syntax/openscad.xml
+ delete mode 100644 data/syntax/pango.xml
+ delete mode 100644 data/syntax/pascal.xml
+ delete mode 100644 data/syntax/pgn.xml
+ delete mode 100644 data/syntax/php.xml
+ delete mode 100644 data/syntax/picsrc.xml
+ delete mode 100644 data/syntax/pig.xml
+ delete mode 100644 data/syntax/pike.xml
+ delete mode 100644 data/syntax/pli.xml
+ delete mode 100644 data/syntax/ply.xml
+ delete mode 100644 data/syntax/pony.xml
+ delete mode 100644 data/syntax/postscript.xml
+ delete mode 100644 data/syntax/povray.xml
+ delete mode 100644 data/syntax/ppd.xml
+ delete mode 100644 data/syntax/praat.xml
+ delete mode 100644 data/syntax/progress.xml
+ delete mode 100644 data/syntax/prolog.xml
+ delete mode 100644 data/syntax/protobuf.xml
+ delete mode 100644 data/syntax/pug.xml
+ delete mode 100644 data/syntax/puppet.xml
+ delete mode 100644 data/syntax/purebasic.xml
+ delete mode 100644 data/syntax/q.xml
+ delete mode 100644 data/syntax/qmake.xml
+ delete mode 100644 data/syntax/qml.xml
+ delete mode 100644 data/syntax/r.xml
+ delete mode 100644 data/syntax/rapidq.xml
+ delete mode 100644 data/syntax/rdoc.xml
+ delete mode 100644 data/syntax/relaxng.xml
+ delete mode 100644 data/syntax/relaxngcompact.xml
+ delete mode 100644 data/syntax/replicode.xml
+ delete mode 100644 data/syntax/rest.xml
+ delete mode 100644 data/syntax/rexx.xml
+ delete mode 100644 data/syntax/rhtml.xml
+ delete mode 100644 data/syntax/rib.xml
+ delete mode 100644 data/syntax/rmarkdown.xml
+ delete mode 100644 data/syntax/roff.xml
+ delete mode 100644 data/syntax/rpmspec.xml
+ delete mode 100644 data/syntax/rsiidl.xml
+ delete mode 100644 data/syntax/rtf.xml
+ delete mode 100644 data/syntax/rust.xml
+ delete mode 100644 data/syntax/sather.xml
+ delete mode 100644 data/syntax/scala.xml
+ delete mode 100644 data/syntax/scheme.xml
+ delete mode 100644 data/syntax/sci.xml
+ delete mode 100644 data/syntax/scss.xml
+ delete mode 100644 data/syntax/sed.xml
+ delete mode 100644 data/syntax/selinux-cil.xml
+ delete mode 100644 data/syntax/selinux-fc.xml
+ delete mode 100644 data/syntax/selinux.xml
+ delete mode 100644 data/syntax/sgml.xml
+ delete mode 100644 data/syntax/sieve.xml
+ delete mode 100644 data/syntax/sisu.xml
+ delete mode 100644 data/syntax/sml.xml
+ delete mode 100644 data/syntax/spice.xml
+ delete mode 100644 data/syntax/sql-mysql.xml
+ delete mode 100644 data/syntax/sql-oracle.xml
+ delete mode 100644 data/syntax/sql-postgresql.xml
+ delete mode 100644 data/syntax/sql.xml
+ delete mode 100644 data/syntax/stan.xml
+ delete mode 100644 data/syntax/stata.xml
+ delete mode 100644 data/syntax/stl.xml
+ delete mode 100644 data/syntax/systemc.xml
+ delete mode 100644 data/syntax/systemverilog.xml
+ delete mode 100644 data/syntax/tads3.xml
+ delete mode 100644 data/syntax/taskjuggler.xml
+ delete mode 100644 data/syntax/tcl.xml
+ delete mode 100644 data/syntax/tcsh.xml
+ delete mode 100644 data/syntax/template-toolkit.xml
+ delete mode 100644 data/syntax/texinfo.xml
+ delete mode 100644 data/syntax/textile.xml
+ delete mode 100644 data/syntax/tibasic.xml
+ delete mode 100644 data/syntax/tiger.xml
+ delete mode 100644 data/syntax/toml.xml
+ delete mode 100644 data/syntax/txt2tags.xml
+ delete mode 100644 data/syntax/uscript.xml
+ delete mode 100644 data/syntax/vala.xml
+ delete mode 100644 data/syntax/varnish.xml
+ delete mode 100644 data/syntax/varnish4.xml
+ delete mode 100644 data/syntax/varnishcc.xml
+ delete mode 100644 data/syntax/varnishcc4.xml
+ delete mode 100644 data/syntax/varnishtest.xml
+ delete mode 100644 data/syntax/varnishtest4.xml
+ delete mode 100644 data/syntax/vcard.xml
+ delete mode 100644 data/syntax/velocity.xml
+ delete mode 100644 data/syntax/vera.xml
+ delete mode 100644 data/syntax/verilog.xml
+ delete mode 100644 data/syntax/vhdl.xml
+ delete mode 100644 data/syntax/vrml.xml
+ delete mode 100644 data/syntax/wavefront-obj.xml
+ delete mode 100644 data/syntax/winehq.xml
+ delete mode 100644 data/syntax/wml.xml
+ delete mode 100644 data/syntax/xharbour.xml
+ delete mode 100644 data/syntax/xmldebug.xml
+ delete mode 100644 data/syntax/xonotic-console.xml
+ delete mode 100644 data/syntax/xorg.xml
+ delete mode 100644 data/syntax/xslt.xml
+ delete mode 100644 data/syntax/xul.xml
+ delete mode 100644 data/syntax/yacas.xml
+ delete mode 100644 data/syntax/yaml.xml
+ delete mode 100644 data/syntax/yang.xml
+ delete mode 100644 data/syntax/zonnon.xml
+ delete mode 100644 data/syntax/zsh.xml
+
+diff --git a/data/syntax/4dos.xml b/data/syntax/4dos.xml
+deleted file mode 100644
+index b5f72ec..0000000
+diff --git a/data/syntax/abap.xml b/data/syntax/abap.xml
+deleted file mode 100644
+index 12c604a..0000000
+diff --git a/data/syntax/abc.xml b/data/syntax/abc.xml
+deleted file mode 100644
+index a4c3d9f..0000000
+diff --git a/data/syntax/actionscript.xml b/data/syntax/actionscript.xml
+deleted file mode 100644
+index 89c91a9..0000000
+diff --git a/data/syntax/ada.xml b/data/syntax/ada.xml
+deleted file mode 100644
+index 64bb9b6..0000000
+diff --git a/data/syntax/adblock.xml b/data/syntax/adblock.xml
+deleted file mode 100644
+index 796b299..0000000
+diff --git a/data/syntax/agda.xml b/data/syntax/agda.xml
+deleted file mode 100644
+index 958bc95..0000000
+diff --git a/data/syntax/ahdl.xml b/data/syntax/ahdl.xml
+deleted file mode 100644
+index 76bd335..0000000
+diff --git a/data/syntax/ahk.xml b/data/syntax/ahk.xml
+deleted file mode 100644
+index 79965c4..0000000
+diff --git a/data/syntax/ample.xml b/data/syntax/ample.xml
+deleted file mode 100644
+index 2c77865..0000000
+diff --git a/data/syntax/ansforth94.xml b/data/syntax/ansforth94.xml
+deleted file mode 100644
+index 44876e8..0000000
+diff --git a/data/syntax/ansic89.xml b/data/syntax/ansic89.xml
+deleted file mode 100644
+index e442560..0000000
+diff --git a/data/syntax/ansys.xml b/data/syntax/ansys.xml
+deleted file mode 100644
+index d405220..0000000
+diff --git a/data/syntax/apache.xml b/data/syntax/apache.xml
+deleted file mode 100644
+index 732d769..0000000
+diff --git a/data/syntax/apparmor.xml b/data/syntax/apparmor.xml
+deleted file mode 100644
+index 0b81467..0000000
+diff --git a/data/syntax/asm-avr.xml b/data/syntax/asm-avr.xml
+deleted file mode 100644
+index 7075d10..0000000
+diff --git a/data/syntax/asm-dsp56k.xml b/data/syntax/asm-dsp56k.xml
+deleted file mode 100644
+index c9d7cd1..0000000
+diff --git a/data/syntax/asm-m68k.xml b/data/syntax/asm-m68k.xml
+deleted file mode 100644
+index bd5c36f..0000000
+diff --git a/data/syntax/asm6502.xml b/data/syntax/asm6502.xml
+deleted file mode 100644
+index 47e1179..0000000
+diff --git a/data/syntax/asn1.xml b/data/syntax/asn1.xml
+deleted file mode 100644
+index ec3432a..0000000
+diff --git a/data/syntax/asp.xml b/data/syntax/asp.xml
+deleted file mode 100644
+index e03e23b..0000000
+diff --git a/data/syntax/awk.xml b/data/syntax/awk.xml
+deleted file mode 100644
+index 9288a13..0000000
+diff --git a/data/syntax/bibtex.xml b/data/syntax/bibtex.xml
+deleted file mode 100644
+index 339f477..0000000
+diff --git a/data/syntax/bitbake.xml b/data/syntax/bitbake.xml
+deleted file mode 100644
+index 056edf6..0000000
+diff --git a/data/syntax/bmethod.xml b/data/syntax/bmethod.xml
+deleted file mode 100644
+index 153b114..0000000
+diff --git a/data/syntax/boo.xml b/data/syntax/boo.xml
+deleted file mode 100644
+index 26ec818..0000000
+diff --git a/data/syntax/c.xml b/data/syntax/c.xml
+deleted file mode 100644
+index 6f224fc..0000000
+diff --git a/data/syntax/carto-css.xml b/data/syntax/carto-css.xml
+deleted file mode 100644
+index 5ce4474..0000000
+diff --git a/data/syntax/ccss.xml b/data/syntax/ccss.xml
+deleted file mode 100644
+index 4648420..0000000
+diff --git a/data/syntax/cg.xml b/data/syntax/cg.xml
+deleted file mode 100644
+index 0ad61f1..0000000
+diff --git a/data/syntax/cgis.xml b/data/syntax/cgis.xml
+deleted file mode 100644
+index 5b718c7..0000000
+diff --git a/data/syntax/changelog.xml b/data/syntax/changelog.xml
+deleted file mode 100644
+index e004816..0000000
+diff --git a/data/syntax/chicken.xml b/data/syntax/chicken.xml
+deleted file mode 100644
+index eaa9e97..0000000
+diff --git a/data/syntax/cisco.xml b/data/syntax/cisco.xml
+deleted file mode 100644
+index c3d78f9..0000000
+diff --git a/data/syntax/clipper.xml b/data/syntax/clipper.xml
+deleted file mode 100644
+index 898ff31..0000000
+diff --git a/data/syntax/clojure.xml b/data/syntax/clojure.xml
+deleted file mode 100644
+index 855e01a..0000000
+diff --git a/data/syntax/coffee.xml b/data/syntax/coffee.xml
+deleted file mode 100644
+index 58dc498..0000000
+diff --git a/data/syntax/coldfusion.xml b/data/syntax/coldfusion.xml
+deleted file mode 100644
+index 1875eee..0000000
+diff --git a/data/syntax/commonlisp.xml b/data/syntax/commonlisp.xml
+deleted file mode 100644
+index 49dd7f5..0000000
+diff --git a/data/syntax/component-pascal.xml b/data/syntax/component-pascal.xml
+deleted file mode 100644
+index 5017e06..0000000
+diff --git a/data/syntax/context.xml b/data/syntax/context.xml
+deleted file mode 100644
+index c1f1296..0000000
+diff --git a/data/syntax/cpp.xml b/data/syntax/cpp.xml
+deleted file mode 100644
+index e370efb..0000000
+diff --git a/data/syntax/crk.xml b/data/syntax/crk.xml
+deleted file mode 100644
+index 211ddcc..0000000
+diff --git a/data/syntax/cs.xml b/data/syntax/cs.xml
+deleted file mode 100644
+index 264d1f4..0000000
+diff --git a/data/syntax/cubescript.xml b/data/syntax/cubescript.xml
+deleted file mode 100644
+index 5677dbf..0000000
+diff --git a/data/syntax/cue.xml b/data/syntax/cue.xml
+deleted file mode 100644
+index fc4eb1b..0000000
+diff --git a/data/syntax/curry.xml b/data/syntax/curry.xml
+deleted file mode 100644
+index b289f1c..0000000
+diff --git a/data/syntax/d.xml b/data/syntax/d.xml
+deleted file mode 100644
+index 91cb3e8..0000000
+diff --git a/data/syntax/debianchangelog.xml b/data/syntax/debianchangelog.xml
+deleted file mode 100644
+index 5de2900..0000000
+diff --git a/data/syntax/debiancontrol.xml b/data/syntax/debiancontrol.xml
+deleted file mode 100644
+index d3149c6..0000000
+diff --git a/data/syntax/desktop.xml b/data/syntax/desktop.xml
+deleted file mode 100644
+index fc508c4..0000000
+diff --git a/data/syntax/diff.xml b/data/syntax/diff.xml
+deleted file mode 100644
+index 0d2ade7..0000000
+diff --git a/data/syntax/djangotemplate.xml b/data/syntax/djangotemplate.xml
+deleted file mode 100644
+index 6b1fa4f..0000000
+diff --git a/data/syntax/dockerfile.xml b/data/syntax/dockerfile.xml
+deleted file mode 100644
+index 980fd04..0000000
+diff --git a/data/syntax/dosbat.xml b/data/syntax/dosbat.xml
+deleted file mode 100644
+index 807763b..0000000
+diff --git a/data/syntax/dot.xml b/data/syntax/dot.xml
+deleted file mode 100644
+index 6f8aacf..0000000
+diff --git a/data/syntax/doxyfile.xml b/data/syntax/doxyfile.xml
+deleted file mode 100644
+index 1002d67..0000000
+diff --git a/data/syntax/doxygenlua.xml b/data/syntax/doxygenlua.xml
+deleted file mode 100644
+index f3298b5..0000000
+diff --git a/data/syntax/e.xml b/data/syntax/e.xml
+deleted file mode 100644
+index 0b96d97..0000000
+diff --git a/data/syntax/eiffel.xml b/data/syntax/eiffel.xml
+deleted file mode 100644
+index 51420ec..0000000
+diff --git a/data/syntax/elixir.xml b/data/syntax/elixir.xml
+deleted file mode 100644
+index f7a4cab..0000000
+diff --git a/data/syntax/email.xml b/data/syntax/email.xml
+deleted file mode 100644
+index de1d44c..0000000
+diff --git a/data/syntax/erlang.xml b/data/syntax/erlang.xml
+deleted file mode 100644
+index 7bbcbc9..0000000
+diff --git a/data/syntax/euphoria.xml b/data/syntax/euphoria.xml
+deleted file mode 100644
+index ef28077..0000000
+diff --git a/data/syntax/fasm.xml b/data/syntax/fasm.xml
+deleted file mode 100644
+index 04158a5..0000000
+diff --git a/data/syntax/fastq.xml b/data/syntax/fastq.xml
+deleted file mode 100644
+index 30387fc..0000000
+diff --git a/data/syntax/ferite.xml b/data/syntax/ferite.xml
+deleted file mode 100644
+index 13951c7..0000000
+diff --git a/data/syntax/fgl-4gl.xml b/data/syntax/fgl-4gl.xml
+deleted file mode 100644
+index b546243..0000000
+diff --git a/data/syntax/fgl-per.xml b/data/syntax/fgl-per.xml
+deleted file mode 100644
+index b3cea4d..0000000
+diff --git a/data/syntax/fortran.xml b/data/syntax/fortran.xml
+deleted file mode 100644
+index 3baf579..0000000
+diff --git a/data/syntax/freebasic.xml b/data/syntax/freebasic.xml
+deleted file mode 100644
+index e7f3831..0000000
+diff --git a/data/syntax/fsharp.xml b/data/syntax/fsharp.xml
+deleted file mode 100644
+index ad42ca0..0000000
+diff --git a/data/syntax/fstab.xml b/data/syntax/fstab.xml
+deleted file mode 100644
+index c047037..0000000
+diff --git a/data/syntax/ftl.xml b/data/syntax/ftl.xml
+deleted file mode 100644
+index e20db76..0000000
+diff --git a/data/syntax/gap.xml b/data/syntax/gap.xml
+deleted file mode 100644
+index 43bcaff..0000000
+diff --git a/data/syntax/gcc.xml b/data/syntax/gcc.xml
+deleted file mode 100644
+index 258686d..0000000
+diff --git a/data/syntax/gcode.xml b/data/syntax/gcode.xml
+deleted file mode 100644
+index 23b6318..0000000
+diff --git a/data/syntax/gdb-bt.xml b/data/syntax/gdb-bt.xml
+deleted file mode 100644
+index 2ebe7e1..0000000
+diff --git a/data/syntax/gdb.xml b/data/syntax/gdb.xml
+deleted file mode 100644
+index ec385de..0000000
+diff --git a/data/syntax/gdbinit.xml b/data/syntax/gdbinit.xml
+deleted file mode 100644
+index 7999bf5..0000000
+diff --git a/data/syntax/gdl.xml b/data/syntax/gdl.xml
+deleted file mode 100644
+index 8966f5b..0000000
+diff --git a/data/syntax/gettext.xml b/data/syntax/gettext.xml
+deleted file mode 100644
+index 858fcf2..0000000
+diff --git a/data/syntax/git-ignore.xml b/data/syntax/git-ignore.xml
+deleted file mode 100644
+index ceb25e4..0000000
+diff --git a/data/syntax/git-rebase.xml b/data/syntax/git-rebase.xml
+deleted file mode 100644
+index 49c2dae..0000000
+diff --git a/data/syntax/gitolite.xml b/data/syntax/gitolite.xml
+deleted file mode 100644
+index d82838e..0000000
+diff --git a/data/syntax/glosstex.xml b/data/syntax/glosstex.xml
+deleted file mode 100644
+index 751cce4..0000000
+diff --git a/data/syntax/glsl.xml b/data/syntax/glsl.xml
+deleted file mode 100644
+index 09d171a..0000000
+diff --git a/data/syntax/gnuassembler.xml b/data/syntax/gnuassembler.xml
+deleted file mode 100644
+index 3820342..0000000
+diff --git a/data/syntax/gnuplot.xml b/data/syntax/gnuplot.xml
+deleted file mode 100644
+index 97ee96a..0000000
+diff --git a/data/syntax/go.xml b/data/syntax/go.xml
+deleted file mode 100644
+index 61d422d..0000000
+diff --git a/data/syntax/grammar.xml b/data/syntax/grammar.xml
+deleted file mode 100644
+index b797f3c..0000000
+diff --git a/data/syntax/groovy.xml b/data/syntax/groovy.xml
+deleted file mode 100644
+index 16118a9..0000000
+diff --git a/data/syntax/haml.xml b/data/syntax/haml.xml
+deleted file mode 100644
+index 1358edd..0000000
+diff --git a/data/syntax/hamlet.xml b/data/syntax/hamlet.xml
+deleted file mode 100644
+index 9d5b61b..0000000
+diff --git a/data/syntax/haskell.xml b/data/syntax/haskell.xml
+deleted file mode 100644
+index c105be9..0000000
+diff --git a/data/syntax/haxe.xml b/data/syntax/haxe.xml
+deleted file mode 100644
+index 3c8cd0d..0000000
+diff --git a/data/syntax/hunspell-aff.xml b/data/syntax/hunspell-aff.xml
+deleted file mode 100644
+index 843d505..0000000
+diff --git a/data/syntax/hunspell-dat.xml b/data/syntax/hunspell-dat.xml
+deleted file mode 100644
+index a57fd58..0000000
+diff --git a/data/syntax/hunspell-dic.xml b/data/syntax/hunspell-dic.xml
+deleted file mode 100644
+index d714d8d..0000000
+diff --git a/data/syntax/hunspell-idx.xml b/data/syntax/hunspell-idx.xml
+deleted file mode 100644
+index 27ba59a..0000000
+diff --git a/data/syntax/idconsole.xml b/data/syntax/idconsole.xml
+deleted file mode 100644
+index 5464bd9..0000000
+diff --git a/data/syntax/idl.xml b/data/syntax/idl.xml
+deleted file mode 100644
+index a8a2787..0000000
+diff --git a/data/syntax/ilerpg.xml b/data/syntax/ilerpg.xml
+deleted file mode 100644
+index 4858efb..0000000
+diff --git a/data/syntax/inform.xml b/data/syntax/inform.xml
+deleted file mode 100644
+index 8bc04a2..0000000
+diff --git a/data/syntax/intelhex.xml b/data/syntax/intelhex.xml
+deleted file mode 100644
+index cfadf67..0000000
+diff --git a/data/syntax/isocpp.xml b/data/syntax/isocpp.xml
+deleted file mode 100644
+index 56f171b..0000000
+diff --git a/data/syntax/j.xml b/data/syntax/j.xml
+deleted file mode 100644
+index fae5b2f..0000000
+diff --git a/data/syntax/jam.xml b/data/syntax/jam.xml
+deleted file mode 100644
+index 0d8e520..0000000
+diff --git a/data/syntax/javascript-react.xml b/data/syntax/javascript-react.xml
+deleted file mode 100644
+index 98d0612..0000000
+diff --git a/data/syntax/javascript.xml b/data/syntax/javascript.xml
+deleted file mode 100644
+index a76e9cc..0000000
+diff --git a/data/syntax/jira.xml b/data/syntax/jira.xml
+deleted file mode 100644
+index 8274223..0000000
+diff --git a/data/syntax/jsp.xml b/data/syntax/jsp.xml
+deleted file mode 100644
+index 90614ac..0000000
+diff --git a/data/syntax/julia.xml b/data/syntax/julia.xml
+deleted file mode 100644
+index ed21005..0000000
+diff --git a/data/syntax/k.xml b/data/syntax/k.xml
+deleted file mode 100644
+index 9cd0fe3..0000000
+diff --git a/data/syntax/kbasic.xml b/data/syntax/kbasic.xml
+deleted file mode 100644
+index 41fc705..0000000
+diff --git a/data/syntax/kconfig.xml b/data/syntax/kconfig.xml
+deleted file mode 100644
+index c430772..0000000
+diff --git a/data/syntax/kdesrc-buildrc.xml b/data/syntax/kdesrc-buildrc.xml
+deleted file mode 100644
+index 6eaddff..0000000
+diff --git a/data/syntax/kotlin.xml b/data/syntax/kotlin.xml
+deleted file mode 100644
+index db58f67..0000000
+diff --git a/data/syntax/latex.xml b/data/syntax/latex.xml
+deleted file mode 100644
+index 9583e55..0000000
+diff --git a/data/syntax/ld.xml b/data/syntax/ld.xml
+deleted file mode 100644
+index 0f7a8af..0000000
+diff --git a/data/syntax/ldif.xml b/data/syntax/ldif.xml
+deleted file mode 100644
+index c49dbf7..0000000
+diff --git a/data/syntax/less.xml b/data/syntax/less.xml
+deleted file mode 100644
+index 38eb490..0000000
+diff --git a/data/syntax/lex.xml b/data/syntax/lex.xml
+deleted file mode 100644
+index 7f60575..0000000
+diff --git a/data/syntax/lilypond.xml b/data/syntax/lilypond.xml
+deleted file mode 100644
+index fc92d54..0000000
+diff --git a/data/syntax/literate-curry.xml b/data/syntax/literate-curry.xml
+deleted file mode 100644
+index ceb53b2..0000000
+diff --git a/data/syntax/literate-haskell.xml b/data/syntax/literate-haskell.xml
+deleted file mode 100644
+index 0089cb1..0000000
+diff --git a/data/syntax/logcat.xml b/data/syntax/logcat.xml
+deleted file mode 100644
+index 3481bdc..0000000
+diff --git a/data/syntax/logtalk.xml b/data/syntax/logtalk.xml
+deleted file mode 100644
+index 43d063c..0000000
+diff --git a/data/syntax/lpc.xml b/data/syntax/lpc.xml
+deleted file mode 100644
+index bf1dac5..0000000
+diff --git a/data/syntax/lsl.xml b/data/syntax/lsl.xml
+deleted file mode 100644
+index 2d0fc51..0000000
+diff --git a/data/syntax/lua.xml b/data/syntax/lua.xml
+deleted file mode 100644
+index cb842c9..0000000
+diff --git a/data/syntax/m3u.xml b/data/syntax/m3u.xml
+deleted file mode 100644
+index 99171b0..0000000
+diff --git a/data/syntax/m4.xml b/data/syntax/m4.xml
+deleted file mode 100644
+index 687c3ea..0000000
+diff --git a/data/syntax/mab.xml b/data/syntax/mab.xml
+deleted file mode 100644
+index 387432d..0000000
+diff --git a/data/syntax/magma.xml b/data/syntax/magma.xml
+deleted file mode 100644
+index a2fe461..0000000
+diff --git a/data/syntax/mako.xml b/data/syntax/mako.xml
+deleted file mode 100644
+index 7e9a071..0000000
+diff --git a/data/syntax/mandoc.xml b/data/syntax/mandoc.xml
+deleted file mode 100644
+index ed23b82..0000000
+diff --git a/data/syntax/mason.xml b/data/syntax/mason.xml
+deleted file mode 100644
+index 32c2885..0000000
+diff --git a/data/syntax/mathematica.xml b/data/syntax/mathematica.xml
+deleted file mode 100644
+index 3deb3de..0000000
+diff --git a/data/syntax/matlab.xml b/data/syntax/matlab.xml
+deleted file mode 100644
+index 1a93ccc..0000000
+diff --git a/data/syntax/maxima.xml b/data/syntax/maxima.xml
+deleted file mode 100644
+index cd06a3a..0000000
+diff --git a/data/syntax/mediawiki.xml b/data/syntax/mediawiki.xml
+deleted file mode 100644
+index accd0ec..0000000
+diff --git a/data/syntax/mel.xml b/data/syntax/mel.xml
+deleted file mode 100644
+index 8806852..0000000
+diff --git a/data/syntax/mergetagtext.xml b/data/syntax/mergetagtext.xml
+deleted file mode 100644
+index efcc1f7..0000000
+diff --git a/data/syntax/meson.xml b/data/syntax/meson.xml
+deleted file mode 100644
+index 4ecf547..0000000
+diff --git a/data/syntax/metafont.xml b/data/syntax/metafont.xml
+deleted file mode 100644
+index 88166ef..0000000
+diff --git a/data/syntax/metamath.xml b/data/syntax/metamath.xml
+deleted file mode 100644
+index 232603a..0000000
+diff --git a/data/syntax/mib.xml b/data/syntax/mib.xml
+deleted file mode 100644
+index 0455206..0000000
+diff --git a/data/syntax/mips.xml b/data/syntax/mips.xml
+deleted file mode 100644
+index 6802706..0000000
+diff --git a/data/syntax/modelica.xml b/data/syntax/modelica.xml
+deleted file mode 100644
+index 76cf281..0000000
+diff --git a/data/syntax/modelines.xml b/data/syntax/modelines.xml
+deleted file mode 100644
+index 0f3c882..0000000
+diff --git a/data/syntax/modula-2-iso-only.xml b/data/syntax/modula-2-iso-only.xml
+deleted file mode 100644
+index 9da7ae3..0000000
+diff --git a/data/syntax/modula-2-pim-only.xml b/data/syntax/modula-2-pim-only.xml
+deleted file mode 100644
+index 9906339..0000000
+diff --git a/data/syntax/modula-2-r10-only.xml b/data/syntax/modula-2-r10-only.xml
+deleted file mode 100644
+index de4fd1b..0000000
+diff --git a/data/syntax/modula-2.xml b/data/syntax/modula-2.xml
+deleted file mode 100644
+index da3676b..0000000
+diff --git a/data/syntax/monobasic.xml b/data/syntax/monobasic.xml
+deleted file mode 100644
+index 558dded..0000000
+diff --git a/data/syntax/mup.xml b/data/syntax/mup.xml
+deleted file mode 100644
+index a33fb49..0000000
+diff --git a/data/syntax/nagios.xml b/data/syntax/nagios.xml
+deleted file mode 100644
+index 20b81ea..0000000
+diff --git a/data/syntax/nasm.xml b/data/syntax/nasm.xml
+deleted file mode 100644
+index ba50d50..0000000
+diff --git a/data/syntax/nemerle.xml b/data/syntax/nemerle.xml
+deleted file mode 100644
+index 208d70d..0000000
+diff --git a/data/syntax/nesc.xml b/data/syntax/nesc.xml
+deleted file mode 100644
+index 5a5d0db..0000000
+diff --git a/data/syntax/noweb.xml b/data/syntax/noweb.xml
+deleted file mode 100644
+index 09641af..0000000
+diff --git a/data/syntax/nsis.xml b/data/syntax/nsis.xml
+deleted file mode 100644
+index 567419d..0000000
+diff --git a/data/syntax/objectivec.xml b/data/syntax/objectivec.xml
+deleted file mode 100644
+index bdad6fe..0000000
+diff --git a/data/syntax/objectivecpp.xml b/data/syntax/objectivecpp.xml
+deleted file mode 100644
+index a48f9c9..0000000
+diff --git a/data/syntax/ocaml.xml b/data/syntax/ocaml.xml
+deleted file mode 100644
+index 4d47d7b..0000000
+diff --git a/data/syntax/ocamllex.xml b/data/syntax/ocamllex.xml
+deleted file mode 100644
+index 14b5837..0000000
+diff --git a/data/syntax/ocamlyacc.xml b/data/syntax/ocamlyacc.xml
+deleted file mode 100644
+index 6d4d7ba..0000000
+diff --git a/data/syntax/octave.xml b/data/syntax/octave.xml
+deleted file mode 100644
+index 5cdd261..0000000
+diff --git a/data/syntax/oors.xml b/data/syntax/oors.xml
+deleted file mode 100644
+index d28011c..0000000
+diff --git a/data/syntax/opal.xml b/data/syntax/opal.xml
+deleted file mode 100644
+index e390d13..0000000
+diff --git a/data/syntax/opencl.xml b/data/syntax/opencl.xml
+deleted file mode 100644
+index f18ac7f..0000000
+diff --git a/data/syntax/openscad.xml b/data/syntax/openscad.xml
+deleted file mode 100644
+index b5005df..0000000
+diff --git a/data/syntax/pango.xml b/data/syntax/pango.xml
+deleted file mode 100644
+index 2a4f420..0000000
+diff --git a/data/syntax/pascal.xml b/data/syntax/pascal.xml
+deleted file mode 100644
+index 54ae266..0000000
+diff --git a/data/syntax/pgn.xml b/data/syntax/pgn.xml
+deleted file mode 100644
+index ee508df..0000000
+diff --git a/data/syntax/php.xml b/data/syntax/php.xml
+deleted file mode 100644
+index acad510..0000000
+diff --git a/data/syntax/picsrc.xml b/data/syntax/picsrc.xml
+deleted file mode 100644
+index a60c890..0000000
+diff --git a/data/syntax/pig.xml b/data/syntax/pig.xml
+deleted file mode 100644
+index fe2a6f1..0000000
+diff --git a/data/syntax/pike.xml b/data/syntax/pike.xml
+deleted file mode 100644
+index 5a111e2..0000000
+diff --git a/data/syntax/pli.xml b/data/syntax/pli.xml
+deleted file mode 100644
+index 15148bc..0000000
+diff --git a/data/syntax/ply.xml b/data/syntax/ply.xml
+deleted file mode 100644
+index 852f4b3..0000000
+diff --git a/data/syntax/pony.xml b/data/syntax/pony.xml
+deleted file mode 100644
+index 43c24ae..0000000
+diff --git a/data/syntax/postscript.xml b/data/syntax/postscript.xml
+deleted file mode 100644
+index 474167d..0000000
+diff --git a/data/syntax/povray.xml b/data/syntax/povray.xml
+deleted file mode 100644
+index 152559a..0000000
+diff --git a/data/syntax/ppd.xml b/data/syntax/ppd.xml
+deleted file mode 100644
+index a049512..0000000
+diff --git a/data/syntax/praat.xml b/data/syntax/praat.xml
+deleted file mode 100644
+index a10219d..0000000
+diff --git a/data/syntax/progress.xml b/data/syntax/progress.xml
+deleted file mode 100644
+index c467ae1..0000000
+diff --git a/data/syntax/prolog.xml b/data/syntax/prolog.xml
+deleted file mode 100644
+index 7c1b15b..0000000
+diff --git a/data/syntax/protobuf.xml b/data/syntax/protobuf.xml
+deleted file mode 100644
+index bc05a15..0000000
+diff --git a/data/syntax/pug.xml b/data/syntax/pug.xml
+deleted file mode 100644
+index b960317..0000000
+diff --git a/data/syntax/puppet.xml b/data/syntax/puppet.xml
+deleted file mode 100644
+index 57b6eea..0000000
+diff --git a/data/syntax/purebasic.xml b/data/syntax/purebasic.xml
+deleted file mode 100644
+index be1a33b..0000000
+diff --git a/data/syntax/q.xml b/data/syntax/q.xml
+deleted file mode 100644
+index c8fbc8b..0000000
+diff --git a/data/syntax/qmake.xml b/data/syntax/qmake.xml
+deleted file mode 100644
+index bae7296..0000000
+diff --git a/data/syntax/qml.xml b/data/syntax/qml.xml
+deleted file mode 100644
+index b41680d..0000000
+diff --git a/data/syntax/r.xml b/data/syntax/r.xml
+deleted file mode 100644
+index 144418a..0000000
+diff --git a/data/syntax/rapidq.xml b/data/syntax/rapidq.xml
+deleted file mode 100644
+index 67a7a8e..0000000
+diff --git a/data/syntax/rdoc.xml b/data/syntax/rdoc.xml
+deleted file mode 100644
+index e6d73cd..0000000
+diff --git a/data/syntax/relaxng.xml b/data/syntax/relaxng.xml
+deleted file mode 100644
+index 28fdb31..0000000
+diff --git a/data/syntax/relaxngcompact.xml b/data/syntax/relaxngcompact.xml
+deleted file mode 100644
+index 6bcc484..0000000
+diff --git a/data/syntax/replicode.xml b/data/syntax/replicode.xml
+deleted file mode 100644
+index 189a0ff..0000000
+diff --git a/data/syntax/rest.xml b/data/syntax/rest.xml
+deleted file mode 100644
+index 6ca3a1a..0000000
+diff --git a/data/syntax/rexx.xml b/data/syntax/rexx.xml
+deleted file mode 100644
+index a51eb3f..0000000
+diff --git a/data/syntax/rhtml.xml b/data/syntax/rhtml.xml
+deleted file mode 100644
+index 291cea5..0000000
+diff --git a/data/syntax/rib.xml b/data/syntax/rib.xml
+deleted file mode 100644
+index e8ec3da..0000000
+diff --git a/data/syntax/rmarkdown.xml b/data/syntax/rmarkdown.xml
+deleted file mode 100644
+index 6d27305..0000000
+diff --git a/data/syntax/roff.xml b/data/syntax/roff.xml
+deleted file mode 100644
+index 6b428be..0000000
+diff --git a/data/syntax/rpmspec.xml b/data/syntax/rpmspec.xml
+deleted file mode 100644
+index 3ae4eb9..0000000
+diff --git a/data/syntax/rsiidl.xml b/data/syntax/rsiidl.xml
+deleted file mode 100644
+index 11c5c69..0000000
+diff --git a/data/syntax/rtf.xml b/data/syntax/rtf.xml
+deleted file mode 100644
+index 42ce267..0000000
+diff --git a/data/syntax/rust.xml b/data/syntax/rust.xml
+deleted file mode 100644
+index 6657cf2..0000000
+diff --git a/data/syntax/sather.xml b/data/syntax/sather.xml
+deleted file mode 100644
+index 89819cf..0000000
+diff --git a/data/syntax/scala.xml b/data/syntax/scala.xml
+deleted file mode 100644
+index 284281e..0000000
+diff --git a/data/syntax/scheme.xml b/data/syntax/scheme.xml
+deleted file mode 100644
+index 749a913..0000000
+diff --git a/data/syntax/sci.xml b/data/syntax/sci.xml
+deleted file mode 100644
+index 20af7ac..0000000
+diff --git a/data/syntax/scss.xml b/data/syntax/scss.xml
+deleted file mode 100644
+index e4efc0a..0000000
+diff --git a/data/syntax/sed.xml b/data/syntax/sed.xml
+deleted file mode 100644
+index 10e4b8c..0000000
+diff --git a/data/syntax/selinux-cil.xml b/data/syntax/selinux-cil.xml
+deleted file mode 100644
+index 8f6f972..0000000
+diff --git a/data/syntax/selinux-fc.xml b/data/syntax/selinux-fc.xml
+deleted file mode 100644
+index 5bab65f..0000000
+diff --git a/data/syntax/selinux.xml b/data/syntax/selinux.xml
+deleted file mode 100644
+index cb396d1..0000000
+diff --git a/data/syntax/sgml.xml b/data/syntax/sgml.xml
+deleted file mode 100644
+index 87f2fe3..0000000
+diff --git a/data/syntax/sieve.xml b/data/syntax/sieve.xml
+deleted file mode 100644
+index 448766a..0000000
+diff --git a/data/syntax/sisu.xml b/data/syntax/sisu.xml
+deleted file mode 100644
+index 8376855..0000000
+diff --git a/data/syntax/sml.xml b/data/syntax/sml.xml
+deleted file mode 100644
+index 7d63002..0000000
+diff --git a/data/syntax/spice.xml b/data/syntax/spice.xml
+deleted file mode 100644
+index b67763c..0000000
+diff --git a/data/syntax/sql-mysql.xml b/data/syntax/sql-mysql.xml
+deleted file mode 100644
+index f37b706..0000000
+diff --git a/data/syntax/sql-oracle.xml b/data/syntax/sql-oracle.xml
+deleted file mode 100644
+index 7bb32fc..0000000
+diff --git a/data/syntax/sql-postgresql.xml b/data/syntax/sql-postgresql.xml
+deleted file mode 100644
+index 6cf5a6a..0000000
+diff --git a/data/syntax/sql.xml b/data/syntax/sql.xml
+deleted file mode 100644
+index 1e33b86..0000000
+diff --git a/data/syntax/stan.xml b/data/syntax/stan.xml
+deleted file mode 100644
+index 10c1696..0000000
+diff --git a/data/syntax/stata.xml b/data/syntax/stata.xml
+deleted file mode 100644
+index ce3b435..0000000
+diff --git a/data/syntax/stl.xml b/data/syntax/stl.xml
+deleted file mode 100644
+index 41f4856..0000000
+diff --git a/data/syntax/systemc.xml b/data/syntax/systemc.xml
+deleted file mode 100644
+index eb43a8e..0000000
+diff --git a/data/syntax/systemverilog.xml b/data/syntax/systemverilog.xml
+deleted file mode 100644
+index b0e78aa..0000000
+diff --git a/data/syntax/tads3.xml b/data/syntax/tads3.xml
+deleted file mode 100644
+index 7df8690..0000000
+diff --git a/data/syntax/taskjuggler.xml b/data/syntax/taskjuggler.xml
+deleted file mode 100644
+index bb81dfe..0000000
+diff --git a/data/syntax/tcl.xml b/data/syntax/tcl.xml
+deleted file mode 100644
+index 3de1876..0000000
+diff --git a/data/syntax/tcsh.xml b/data/syntax/tcsh.xml
+deleted file mode 100644
+index dc63b3c..0000000
+diff --git a/data/syntax/template-toolkit.xml b/data/syntax/template-toolkit.xml
+deleted file mode 100644
+index b004cb5..0000000
+diff --git a/data/syntax/texinfo.xml b/data/syntax/texinfo.xml
+deleted file mode 100644
+index a43394a..0000000
+diff --git a/data/syntax/textile.xml b/data/syntax/textile.xml
+deleted file mode 100644
+index b0e8250..0000000
+diff --git a/data/syntax/tibasic.xml b/data/syntax/tibasic.xml
+deleted file mode 100644
+index d1a0fca..0000000
+diff --git a/data/syntax/tiger.xml b/data/syntax/tiger.xml
+deleted file mode 100644
+index 482fdc4..0000000
+diff --git a/data/syntax/toml.xml b/data/syntax/toml.xml
+deleted file mode 100644
+index 2369854..0000000
+diff --git a/data/syntax/txt2tags.xml b/data/syntax/txt2tags.xml
+deleted file mode 100644
+index 1635f99..0000000
+diff --git a/data/syntax/uscript.xml b/data/syntax/uscript.xml
+deleted file mode 100644
+index 13d3262..0000000
+diff --git a/data/syntax/vala.xml b/data/syntax/vala.xml
+deleted file mode 100644
+index 8f9aab7..0000000
+diff --git a/data/syntax/varnish.xml b/data/syntax/varnish.xml
+deleted file mode 100644
+index 5916872..0000000
+diff --git a/data/syntax/varnish4.xml b/data/syntax/varnish4.xml
+deleted file mode 100644
+index 03ad852..0000000
+diff --git a/data/syntax/varnishcc.xml b/data/syntax/varnishcc.xml
+deleted file mode 100644
+index 0a0052b..0000000
+diff --git a/data/syntax/varnishcc4.xml b/data/syntax/varnishcc4.xml
+deleted file mode 100644
+index 481ad93..0000000
+diff --git a/data/syntax/varnishtest.xml b/data/syntax/varnishtest.xml
+deleted file mode 100644
+index ceb94d2..0000000
+diff --git a/data/syntax/varnishtest4.xml b/data/syntax/varnishtest4.xml
+deleted file mode 100644
+index ec0d96f..0000000
+diff --git a/data/syntax/vcard.xml b/data/syntax/vcard.xml
+deleted file mode 100644
+index 5eafaa0..0000000
+diff --git a/data/syntax/velocity.xml b/data/syntax/velocity.xml
+deleted file mode 100644
+index cf901d8..0000000
+diff --git a/data/syntax/vera.xml b/data/syntax/vera.xml
+deleted file mode 100644
+index c3802c8..0000000
+diff --git a/data/syntax/verilog.xml b/data/syntax/verilog.xml
+deleted file mode 100644
+index 9f113b4..0000000
+diff --git a/data/syntax/vhdl.xml b/data/syntax/vhdl.xml
+deleted file mode 100644
+index 6a59911..0000000
+diff --git a/data/syntax/vrml.xml b/data/syntax/vrml.xml
+deleted file mode 100644
+index 25839fd..0000000
+diff --git a/data/syntax/wavefront-obj.xml b/data/syntax/wavefront-obj.xml
+deleted file mode 100644
+index 46d6ea7..0000000
+diff --git a/data/syntax/winehq.xml b/data/syntax/winehq.xml
+deleted file mode 100644
+index 112f67d..0000000
+diff --git a/data/syntax/wml.xml b/data/syntax/wml.xml
+deleted file mode 100644
+index 433649c..0000000
+diff --git a/data/syntax/xharbour.xml b/data/syntax/xharbour.xml
+deleted file mode 100644
+index 43336fd..0000000
+diff --git a/data/syntax/xmldebug.xml b/data/syntax/xmldebug.xml
+deleted file mode 100644
+index 68a1e8d..0000000
+diff --git a/data/syntax/xonotic-console.xml b/data/syntax/xonotic-console.xml
+deleted file mode 100644
+index 13ef083..0000000
+diff --git a/data/syntax/xorg.xml b/data/syntax/xorg.xml
+deleted file mode 100644
+index 8ea8855..0000000
+diff --git a/data/syntax/xslt.xml b/data/syntax/xslt.xml
+deleted file mode 100644
+index 37b8577..0000000
+diff --git a/data/syntax/xul.xml b/data/syntax/xul.xml
+deleted file mode 100644
+index 8dc6b65..0000000
+diff --git a/data/syntax/yacas.xml b/data/syntax/yacas.xml
+deleted file mode 100644
+index 12dd078..0000000
+diff --git a/data/syntax/yaml.xml b/data/syntax/yaml.xml
+deleted file mode 100644
+index 7c69ab6..0000000
+diff --git a/data/syntax/yang.xml b/data/syntax/yang.xml
+deleted file mode 100644
+index 051be6a..0000000
+diff --git a/data/syntax/zonnon.xml b/data/syntax/zonnon.xml
+deleted file mode 100644
+index ebe51e1..0000000
+diff --git a/data/syntax/zsh.xml b/data/syntax/zsh.xml
+deleted file mode 100644
+index be40144..0000000
+--
+2.20.1.windows.1
+
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0002-Remove-autotests.patch b/src/libs/3rdparty/syntax-highlighting/patches/0002-Remove-autotests.patch
new file mode 100644
index 0000000000..a7174cabea
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0002-Remove-autotests.patch
@@ -0,0 +1,2901 @@
+From 5191890626af72cabcf49a2b6197ef2e29af218b Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:35:08 +0100
+Subject: [PATCH 2/6] Remove autotests
+
+---
+ CMakeLists.txt | 3 -
+ autotests/CMakeLists.txt | 49 -
+ autotests/folding/Dockerfile.fold | 19 -
+ autotests/folding/Doxyfile.example.fold | 2406 ----------------
+ autotests/folding/Kconfig.fold | 15 -
+ autotests/folding/Makefile.fold | 28 -
+ autotests/folding/adblock.txt.fold | 53 -
+ autotests/folding/apache.conf.fold | 67 -
+ autotests/folding/basic.markdown.fold | 6 -
+ autotests/folding/basic.xml.fold | 4 -
+ autotests/folding/build.gradle.fold | 57 -
+ autotests/folding/clojure.clj.fold | 73 -
+ autotests/folding/complex.xml.fold | 13 -
+ autotests/folding/craftenv.ps1.fold | 109 -
+ autotests/folding/csharp.cs.fold | 38 -
+ autotests/folding/cube.obj.fold | 33 -
+ autotests/folding/cube.ply.fold | 26 -
+ autotests/folding/cube.stl.fold | 30 -
+ autotests/folding/example.rmd.fold | 39 -
+ autotests/folding/firstNonSpace.c.fold | 7 -
+ autotests/folding/folding.cpp.fold | 15 -
+ autotests/folding/git-rebase.fold | 32 -
+ autotests/folding/hello.exs.fold | 11 -
+ autotests/folding/highlight.ahdl.fold | 43 -
+ autotests/folding/highlight.asm-avr.fold | 75 -
+ autotests/folding/highlight.asm-nasm.fold | 27 -
+ autotests/folding/highlight.asp.fold | 58 -
+ autotests/folding/highlight.awk.fold | 52 -
+ autotests/folding/highlight.bib.fold | 31 -
+ autotests/folding/highlight.bt.fold | 31 -
+ autotests/folding/highlight.cmake.fold | 111 -
+ autotests/folding/highlight.cpp.fold | 507 ----
+ autotests/folding/highlight.css.fold | 286 --
+ autotests/folding/highlight.d.fold | 195 --
+ autotests/folding/highlight.do.fold | 89 -
+ autotests/folding/highlight.dox.fold | 227 --
+ autotests/folding/highlight.erl.fold | 68 -
+ autotests/folding/highlight.exu.fold | 97 -
+ autotests/folding/highlight.f90.fold | 181 --
+ autotests/folding/highlight.gdb.fold | 156 --
+ autotests/folding/highlight.gdbinit.fold | 9 -
+ autotests/folding/highlight.glsl.fold | 62 -
+ autotests/folding/highlight.hex.fold | 8 -
+ autotests/folding/highlight.hs.fold | 139 -
+ autotests/folding/highlight.java.fold | 48 -
+ autotests/folding/highlight.js.fold | 139 -
+ autotests/folding/highlight.jsp.fold | 170 --
+ autotests/folding/highlight.less.fold | 701 -----
+ autotests/folding/highlight.lex.fold | 82 -
+ autotests/folding/highlight.lgt.fold | 448 ---
+ autotests/folding/highlight.lhs.fold | 124 -
+ autotests/folding/highlight.lisp.fold | 36 -
+ autotests/folding/highlight.lua.fold | 160 --
+ autotests/folding/highlight.ly.fold | 114 -
+ autotests/folding/highlight.m.fold | 61 -
+ autotests/folding/highlight.mac.fold | 145 -
+ autotests/folding/highlight.mup.fold | 103 -
+ autotests/folding/highlight.pb.fold | 87 -
+ autotests/folding/highlight.php.fold | 26 -
+ autotests/folding/highlight.pike.fold | 24 -
+ autotests/folding/highlight.pl.fold | 75 -
+ autotests/folding/highlight.pony.fold | 219 --
+ autotests/folding/highlight.pov.fold | 76 -
+ autotests/folding/highlight.prg.fold | 71 -
+ autotests/folding/highlight.qml.fold | 59 -
+ autotests/folding/highlight.rb.fold | 551 ----
+ autotests/folding/highlight.scad.fold | 23 -
+ autotests/folding/highlight.scheme.fold | 186 --
+ autotests/folding/highlight.scss.fold | 693 -----
+ autotests/folding/highlight.sh.fold | 207 --
+ autotests/folding/highlight.spec.fold | 212 --
+ autotests/folding/highlight.stan.fold | 380 ---
+ autotests/folding/highlight.t2t.fold | 90 -
+ autotests/folding/highlight.tcl.fold | 50 -
+ autotests/folding/highlight.tex.fold | 85 -
+ autotests/folding/highlight.tig.fold | 78 -
+ autotests/folding/highlight.wrl.fold | 41 -
+ autotests/folding/highlight.xml.fold | 67 -
+ autotests/folding/highlight.xsl.fold | 109 -
+ autotests/folding/highlight.y.fold | 93 -
+ autotests/folding/highlight.yang.fold | 38 -
+ autotests/folding/highlight_lpc.c.fold | 64 -
+ autotests/folding/highlight_ocaml.ml.fold | 105 -
+ autotests/folding/highlight_octave.m.fold | 74 -
+ autotests/folding/learnelixir.exs.fold | 397 ---
+ autotests/folding/light52_muldiv.vhdl.fold | 239 --
+ autotests/folding/light52_tb.vhdl.fold | 186 --
+ autotests/folding/meson.build.fold | 21 -
+ autotests/folding/modelines.py.fold | 10 -
+ autotests/folding/or1200_dc_fsm.v.fold | 563 ----
+ autotests/folding/or1200_du.v.fold | 1803 ------------
+ .../folding/preprocessor-bug363280.c.fold | 8 -
+ .../folding/preprocessor-bug363280.cpp.fold | 8 -
+ autotests/folding/review128925-1.css.fold | 112 -
+ autotests/folding/review128925-1.scss.fold | 211 --
+ autotests/folding/review128925-2.css.fold | 62 -
+ autotests/folding/review128925-2.scss.fold | 81 -
+ autotests/folding/review128935.html.fold | 164 --
+ autotests/folding/test-iso.mod.fold | 96 -
+ autotests/folding/test-pim.mod.fold | 90 -
+ autotests/folding/test-r10.mod.fold | 112 -
+ autotests/folding/test.Rd.fold | 51 -
+ autotests/folding/test.bash.fold | 23 -
+ autotests/folding/test.bb.fold | 34 -
+ autotests/folding/test.c.fold | 56 -
+ autotests/folding/test.cil.fold | 153 --
+ autotests/folding/test.coffee.fold | 71 -
+ autotests/folding/test.css.fold | 18 -
+ autotests/folding/test.desktop.fold | 19 -
+ autotests/folding/test.diff.fold | 48 -
+ autotests/folding/test.eml.fold | 94 -
+ autotests/folding/test.fc.fold | 116 -
+ autotests/folding/test.frag.fold | 26 -
+ autotests/folding/test.htm.fold | 17 -
+ autotests/folding/test.ijs.fold | 61 -
+ autotests/folding/test.ini.fold | 18 -
+ autotests/folding/test.js.fold | 23 -
+ autotests/folding/test.json.fold | 13 -
+ autotests/folding/test.jsx.fold | 50 -
+ autotests/folding/test.logcat.fold | 90 -
+ autotests/folding/test.markdown.fold | 67 -
+ autotests/folding/test.mib.fold | 526 ----
+ autotests/folding/test.mm.fold | 42 -
+ autotests/folding/test.mod.fold | 96 -
+ autotests/folding/test.mss.fold | 215 --
+ autotests/folding/test.py.fold | 50 -
+ autotests/folding/test.qdocconf.fold | 65 -
+ autotests/folding/test.qml.fold | 23 -
+ autotests/folding/test.rexx.fold | 52 -
+ autotests/folding/test.rs.fold | 87 -
+ autotests/folding/test.sieve.fold | 387 ---
+ autotests/folding/test.sql.fold | 65 -
+ autotests/folding/test.sql_oracle.fold | 54 -
+ autotests/folding/test.te.fold | 139 -
+ autotests/folding/test.tex.fold | 5 -
+ autotests/folding/test.yaml.fold | 151 --
+ autotests/folding/test.zsh.fold | 66 -
+ .../usr.bin.apparmor-profile-test.fold | 270 --
+ autotests/foldingtest.cpp | 191 --
+ autotests/highlighter_benchmark.cpp | 145 -
+ autotests/html/Dockerfile.html | 26 -
+ autotests/html/Doxyfile.example.html | 2413 -----------------
+ autotests/html/Kconfig.html | 22 -
+ autotests/html/Makefile.html | 35 -
+ autotests/html/adblock.txt.html | 60 -
+ autotests/html/apache.conf.html | 74 -
+ autotests/html/basic.markdown.html | 13 -
+ autotests/html/basic.xml.html | 11 -
+ autotests/html/build.gradle.html | 64 -
+ autotests/html/clojure.clj.html | 80 -
+ autotests/html/complex.xml.html | 20 -
+ autotests/html/craftenv.ps1.html | 116 -
+ autotests/html/csharp.cs.html | 45 -
+ autotests/html/cube.obj.html | 40 -
+ autotests/html/cube.ply.html | 33 -
+ autotests/html/cube.stl.html | 37 -
+ autotests/html/example.rmd.html | 46 -
+ autotests/html/firstNonSpace.c.html | 14 -
+ autotests/html/folding.cpp.html | 22 -
+ autotests/html/git-rebase.html | 39 -
+ autotests/html/hello.exs.html | 18 -
+ autotests/html/highlight.ahdl.html | 50 -
+ autotests/html/highlight.asm-avr.html | 82 -
+ autotests/html/highlight.asm-nasm.html | 34 -
+ autotests/html/highlight.asp.html | 65 -
+ autotests/html/highlight.awk.html | 59 -
+ autotests/html/highlight.bib.html | 38 -
+ autotests/html/highlight.bt.html | 38 -
+ autotests/html/highlight.cmake.html | 118 -
+ autotests/html/highlight.cpp.html | 514 ----
+ autotests/html/highlight.css.html | 293 --
+ autotests/html/highlight.d.html | 202 --
+ autotests/html/highlight.do.html | 96 -
+ autotests/html/highlight.dox.html | 234 --
+ autotests/html/highlight.erl.html | 75 -
+ autotests/html/highlight.exu.html | 104 -
+ autotests/html/highlight.f90.html | 188 --
+ autotests/html/highlight.gdb.html | 163 --
+ autotests/html/highlight.gdbinit.html | 16 -
+ autotests/html/highlight.glsl.html | 69 -
+ autotests/html/highlight.hex.html | 15 -
+ autotests/html/highlight.hs.html | 146 -
+ autotests/html/highlight.java.html | 55 -
+ autotests/html/highlight.js.html | 146 -
+ autotests/html/highlight.jsp.html | 177 --
+ autotests/html/highlight.less.html | 708 -----
+ autotests/html/highlight.lex.html | 89 -
+ autotests/html/highlight.lgt.html | 455 ----
+ autotests/html/highlight.lhs.html | 131 -
+ autotests/html/highlight.lisp.html | 43 -
+ autotests/html/highlight.lua.html | 167 --
+ autotests/html/highlight.ly.html | 121 -
+ autotests/html/highlight.m.html | 68 -
+ autotests/html/highlight.mac.html | 152 --
+ autotests/html/highlight.mup.html | 110 -
+ autotests/html/highlight.pb.html | 94 -
+ autotests/html/highlight.php.html | 33 -
+ autotests/html/highlight.pike.html | 31 -
+ autotests/html/highlight.pl.html | 82 -
+ autotests/html/highlight.pony.html | 226 --
+ autotests/html/highlight.pov.html | 83 -
+ autotests/html/highlight.prg.html | 78 -
+ autotests/html/highlight.qml.html | 66 -
+ autotests/html/highlight.rb.html | 558 ----
+ autotests/html/highlight.scad.html | 30 -
+ autotests/html/highlight.scheme.html | 193 --
+ autotests/html/highlight.scss.html | 700 -----
+ autotests/html/highlight.sh.html | 214 --
+ autotests/html/highlight.spec.html | 219 --
+ autotests/html/highlight.stan.html | 387 ---
+ autotests/html/highlight.t2t.html | 97 -
+ autotests/html/highlight.tcl.html | 57 -
+ autotests/html/highlight.tex.html | 92 -
+ autotests/html/highlight.tig.html | 85 -
+ autotests/html/highlight.wrl.html | 48 -
+ autotests/html/highlight.xml.html | 74 -
+ autotests/html/highlight.xsl.html | 116 -
+ autotests/html/highlight.y.html | 100 -
+ autotests/html/highlight.yang.html | 45 -
+ autotests/html/highlight_lpc.c.html | 71 -
+ autotests/html/highlight_ocaml.ml.html | 112 -
+ autotests/html/highlight_octave.m.html | 81 -
+ autotests/html/learnelixir.exs.html | 404 ---
+ autotests/html/light52_muldiv.vhdl.html | 246 --
+ autotests/html/light52_tb.vhdl.html | 193 --
+ autotests/html/meson.build.html | 28 -
+ autotests/html/modelines.py.html | 17 -
+ autotests/html/or1200_dc_fsm.v.html | 570 ----
+ autotests/html/or1200_du.v.html | 1810 -------------
+ autotests/html/preprocessor-bug363280.c.html | 15 -
+ .../html/preprocessor-bug363280.cpp.html | 15 -
+ autotests/html/review128925-1.css.html | 119 -
+ autotests/html/review128925-1.scss.html | 218 --
+ autotests/html/review128925-2.css.html | 69 -
+ autotests/html/review128925-2.scss.html | 88 -
+ autotests/html/review128935.html.html | 171 --
+ autotests/html/test-iso.mod.html | 103 -
+ autotests/html/test-pim.mod.html | 97 -
+ autotests/html/test-r10.mod.html | 119 -
+ autotests/html/test.Rd.html | 58 -
+ autotests/html/test.bash.html | 30 -
+ autotests/html/test.bb.html | 41 -
+ autotests/html/test.c.html | 63 -
+ autotests/html/test.cil.html | 160 --
+ autotests/html/test.coffee.html | 78 -
+ autotests/html/test.css.html | 25 -
+ autotests/html/test.desktop.html | 26 -
+ autotests/html/test.diff.html | 55 -
+ autotests/html/test.eml.html | 101 -
+ autotests/html/test.fc.html | 123 -
+ autotests/html/test.frag.html | 33 -
+ autotests/html/test.htm.html | 24 -
+ autotests/html/test.ijs.html | 68 -
+ autotests/html/test.ini.html | 25 -
+ autotests/html/test.js.html | 30 -
+ autotests/html/test.json.html | 20 -
+ autotests/html/test.jsx.html | 57 -
+ autotests/html/test.logcat.html | 97 -
+ autotests/html/test.markdown.html | 74 -
+ autotests/html/test.mib.html | 533 ----
+ autotests/html/test.mm.html | 49 -
+ autotests/html/test.mod.html | 103 -
+ autotests/html/test.mss.html | 222 --
+ autotests/html/test.py.html | 57 -
+ autotests/html/test.qdocconf.html | 72 -
+ autotests/html/test.qml.html | 30 -
+ autotests/html/test.rexx.html | 59 -
+ autotests/html/test.rs.html | 94 -
+ autotests/html/test.sieve.html | 394 ---
+ autotests/html/test.sql.html | 72 -
+ autotests/html/test.sql_oracle.html | 61 -
+ autotests/html/test.te.html | 146 -
+ autotests/html/test.tex.html | 12 -
+ autotests/html/test.yaml.html | 158 --
+ autotests/html/test.zsh.html | 73 -
+ .../html/usr.bin.apparmor-profile-test.html | 277 --
+ autotests/htmlhighlighter_test.cpp | 121 -
+ autotests/input/Dockerfile | 19 -
+ autotests/input/Doxyfile.example | 2406 ----------------
+ autotests/input/Kconfig | 15 -
+ autotests/input/Makefile | 28 -
+ autotests/input/adblock.txt | 53 -
+ autotests/input/adblock.txt.syntax | 1 -
+ autotests/input/apache.conf | 67 -
+ autotests/input/apache.conf.syntax | 1 -
+ autotests/input/basic.markdown | 6 -
+ autotests/input/basic.xml | 4 -
+ autotests/input/build.gradle | 57 -
+ autotests/input/clojure.clj | 73 -
+ autotests/input/complex.xml | 13 -
+ autotests/input/craftenv.ps1 | 109 -
+ autotests/input/csharp.cs | 38 -
+ autotests/input/cube.obj | 33 -
+ autotests/input/cube.ply | 26 -
+ autotests/input/cube.stl | 30 -
+ autotests/input/example.rmd | 39 -
+ autotests/input/firstNonSpace.c | 7 -
+ autotests/input/folding.cpp | 15 -
+ autotests/input/git-rebase | 32 -
+ autotests/input/git-rebase.syntax | 1 -
+ autotests/input/hello.exs | 11 -
+ autotests/input/highlight.ahdl | 43 -
+ autotests/input/highlight.asm-avr | 75 -
+ autotests/input/highlight.asm-nasm | 27 -
+ autotests/input/highlight.asm-nasm.syntax | 1 -
+ autotests/input/highlight.asp | 58 -
+ autotests/input/highlight.awk | 52 -
+ autotests/input/highlight.bib | 31 -
+ autotests/input/highlight.bt | 31 -
+ autotests/input/highlight.cmake | 111 -
+ autotests/input/highlight.cpp | 507 ----
+ autotests/input/highlight.css | 286 --
+ autotests/input/highlight.d | 195 --
+ autotests/input/highlight.do | 89 -
+ autotests/input/highlight.dox | 227 --
+ autotests/input/highlight.erl | 68 -
+ autotests/input/highlight.exu | 97 -
+ autotests/input/highlight.f90 | 181 --
+ autotests/input/highlight.gdb | 156 --
+ autotests/input/highlight.gdbinit | 9 -
+ autotests/input/highlight.glsl | 62 -
+ autotests/input/highlight.hex | 8 -
+ autotests/input/highlight.hs | 139 -
+ autotests/input/highlight.java | 48 -
+ autotests/input/highlight.js | 139 -
+ autotests/input/highlight.jsp | 170 --
+ autotests/input/highlight.less | 701 -----
+ autotests/input/highlight.lex | 82 -
+ autotests/input/highlight.lgt | 448 ---
+ autotests/input/highlight.lhs | 124 -
+ autotests/input/highlight.lisp | 36 -
+ autotests/input/highlight.lua | 160 --
+ autotests/input/highlight.ly | 114 -
+ autotests/input/highlight.m | 61 -
+ autotests/input/highlight.m.syntax | 1 -
+ autotests/input/highlight.mac | 145 -
+ autotests/input/highlight.mup | 103 -
+ autotests/input/highlight.pb | 87 -
+ autotests/input/highlight.php | 26 -
+ autotests/input/highlight.pike | 24 -
+ autotests/input/highlight.pl | 75 -
+ autotests/input/highlight.pony | 219 --
+ autotests/input/highlight.pov | 76 -
+ autotests/input/highlight.prg | 71 -
+ autotests/input/highlight.prg.syntax | 1 -
+ autotests/input/highlight.qml | 59 -
+ autotests/input/highlight.rb | 551 ----
+ autotests/input/highlight.scad | 23 -
+ autotests/input/highlight.scheme | 186 --
+ autotests/input/highlight.scss | 693 -----
+ autotests/input/highlight.sh | 207 --
+ autotests/input/highlight.sh.syntax | 1 -
+ autotests/input/highlight.spec | 212 --
+ autotests/input/highlight.stan | 380 ---
+ autotests/input/highlight.t2t | 90 -
+ autotests/input/highlight.tcl | 50 -
+ autotests/input/highlight.tex | 85 -
+ autotests/input/highlight.tig | 78 -
+ autotests/input/highlight.wrl | 41 -
+ autotests/input/highlight.xml | 67 -
+ autotests/input/highlight.xsl | 109 -
+ autotests/input/highlight.y | 93 -
+ autotests/input/highlight.yang | 38 -
+ autotests/input/highlight_lpc.c | 64 -
+ autotests/input/highlight_lpc.c.syntax | 1 -
+ autotests/input/highlight_ocaml.ml | 105 -
+ autotests/input/highlight_octave.m | 74 -
+ autotests/input/highlight_octave.m.syntax | 1 -
+ autotests/input/learnelixir.exs | 397 ---
+ autotests/input/light52_muldiv.vhdl | 239 --
+ autotests/input/light52_tb.vhdl | 186 --
+ autotests/input/meson.build | 21 -
+ autotests/input/modelines.py | 10 -
+ autotests/input/or1200_dc_fsm.v | 563 ----
+ autotests/input/or1200_du.v | 1803 ------------
+ autotests/input/preprocessor-bug363280.c | 8 -
+ autotests/input/preprocessor-bug363280.cpp | 8 -
+ autotests/input/review128925-1.css | 112 -
+ autotests/input/review128925-1.scss | 211 --
+ autotests/input/review128925-2.css | 62 -
+ autotests/input/review128925-2.scss | 81 -
+ autotests/input/review128935.html | 164 --
+ autotests/input/syntax/testlang.xml | 27 -
+ autotests/input/test-iso.mod | 96 -
+ autotests/input/test-iso.mod.syntax | 1 -
+ autotests/input/test-pim.mod | 90 -
+ autotests/input/test-pim.mod.syntax | 1 -
+ autotests/input/test-r10.mod | 112 -
+ autotests/input/test-r10.mod.syntax | 1 -
+ autotests/input/test.Rd | 51 -
+ autotests/input/test.bash | 23 -
+ autotests/input/test.bb | 34 -
+ autotests/input/test.c | 56 -
+ autotests/input/test.c.syntax | 1 -
+ autotests/input/test.cil | 153 --
+ autotests/input/test.coffee | 71 -
+ autotests/input/test.css | 18 -
+ autotests/input/test.css.syntax | 1 -
+ autotests/input/test.desktop | 19 -
+ autotests/input/test.diff | 48 -
+ autotests/input/test.eml | 94 -
+ autotests/input/test.fc | 116 -
+ autotests/input/test.frag | 26 -
+ autotests/input/test.htm | 17 -
+ autotests/input/test.htm.syntax | 1 -
+ autotests/input/test.ijs | 61 -
+ autotests/input/test.ini | 18 -
+ autotests/input/test.js | 23 -
+ autotests/input/test.json | 13 -
+ autotests/input/test.jsx | 50 -
+ autotests/input/test.logcat | 90 -
+ autotests/input/test.markdown | 67 -
+ autotests/input/test.mib | 526 ----
+ autotests/input/test.mm | 42 -
+ autotests/input/test.mm.syntax | 1 -
+ autotests/input/test.mod | 96 -
+ autotests/input/test.mss | 215 --
+ autotests/input/test.py | 50 -
+ autotests/input/test.qdocconf | 65 -
+ autotests/input/test.qml | 23 -
+ autotests/input/test.rexx | 52 -
+ autotests/input/test.rs | 87 -
+ autotests/input/test.sieve | 387 ---
+ autotests/input/test.sql | 65 -
+ autotests/input/test.sql.syntax | 1 -
+ autotests/input/test.sql_oracle | 54 -
+ autotests/input/test.sql_oracle.syntax | 1 -
+ autotests/input/test.te | 139 -
+ autotests/input/test.tex | 5 -
+ autotests/input/test.yaml | 151 --
+ autotests/input/test.zsh | 66 -
+ autotests/input/themes/customtheme.theme | 46 -
+ autotests/input/usr.bin.apparmor-profile-test | 270 --
+ autotests/reference/Dockerfile.ref | 19 -
+ autotests/reference/Doxyfile.example.ref | 2406 ----------------
+ autotests/reference/Kconfig.ref | 15 -
+ autotests/reference/Makefile.ref | 28 -
+ autotests/reference/adblock.txt.ref | 53 -
+ autotests/reference/apache.conf.ref | 67 -
+ autotests/reference/basic.markdown.ref | 6 -
+ autotests/reference/basic.xml.ref | 4 -
+ autotests/reference/build.gradle.ref | 57 -
+ autotests/reference/clojure.clj.ref | 73 -
+ autotests/reference/complex.xml.ref | 13 -
+ autotests/reference/craftenv.ps1.ref | 109 -
+ autotests/reference/csharp.cs.ref | 38 -
+ autotests/reference/cube.obj.ref | 33 -
+ autotests/reference/cube.ply.ref | 26 -
+ autotests/reference/cube.stl.ref | 30 -
+ autotests/reference/example.rmd.ref | 39 -
+ autotests/reference/firstNonSpace.c.ref | 7 -
+ autotests/reference/folding.cpp.ref | 15 -
+ autotests/reference/git-rebase.ref | 32 -
+ autotests/reference/hello.exs.ref | 11 -
+ autotests/reference/highlight.ahdl.ref | 43 -
+ autotests/reference/highlight.asm-avr.ref | 75 -
+ autotests/reference/highlight.asm-nasm.ref | 27 -
+ autotests/reference/highlight.asp.ref | 58 -
+ autotests/reference/highlight.awk.ref | 52 -
+ autotests/reference/highlight.bib.ref | 31 -
+ autotests/reference/highlight.bt.ref | 31 -
+ autotests/reference/highlight.cmake.ref | 111 -
+ autotests/reference/highlight.cpp.ref | 507 ----
+ autotests/reference/highlight.css.ref | 286 --
+ autotests/reference/highlight.d.ref | 195 --
+ autotests/reference/highlight.do.ref | 89 -
+ autotests/reference/highlight.dox.ref | 227 --
+ autotests/reference/highlight.erl.ref | 68 -
+ autotests/reference/highlight.exu.ref | 97 -
+ autotests/reference/highlight.f90.ref | 181 --
+ autotests/reference/highlight.gdb.ref | 156 --
+ autotests/reference/highlight.gdbinit.ref | 9 -
+ autotests/reference/highlight.glsl.ref | 62 -
+ autotests/reference/highlight.hex.ref | 8 -
+ autotests/reference/highlight.hs.ref | 139 -
+ autotests/reference/highlight.java.ref | 48 -
+ autotests/reference/highlight.js.ref | 139 -
+ autotests/reference/highlight.jsp.ref | 170 --
+ autotests/reference/highlight.less.ref | 701 -----
+ autotests/reference/highlight.lex.ref | 82 -
+ autotests/reference/highlight.lgt.ref | 448 ---
+ autotests/reference/highlight.lhs.ref | 124 -
+ autotests/reference/highlight.lisp.ref | 36 -
+ autotests/reference/highlight.lua.ref | 160 --
+ autotests/reference/highlight.ly.ref | 114 -
+ autotests/reference/highlight.m.ref | 61 -
+ autotests/reference/highlight.mac.ref | 145 -
+ autotests/reference/highlight.mup.ref | 103 -
+ autotests/reference/highlight.pb.ref | 87 -
+ autotests/reference/highlight.php.ref | 26 -
+ autotests/reference/highlight.pike.ref | 24 -
+ autotests/reference/highlight.pl.ref | 75 -
+ autotests/reference/highlight.pony.ref | 219 --
+ autotests/reference/highlight.pov.ref | 76 -
+ autotests/reference/highlight.prg.ref | 71 -
+ autotests/reference/highlight.qml.ref | 59 -
+ autotests/reference/highlight.rb.ref | 551 ----
+ autotests/reference/highlight.scad.ref | 23 -
+ autotests/reference/highlight.scheme.ref | 186 --
+ autotests/reference/highlight.scss.ref | 693 -----
+ autotests/reference/highlight.sh.ref | 207 --
+ autotests/reference/highlight.spec.ref | 212 --
+ autotests/reference/highlight.stan.ref | 380 ---
+ autotests/reference/highlight.t2t.ref | 90 -
+ autotests/reference/highlight.tcl.ref | 50 -
+ autotests/reference/highlight.tex.ref | 85 -
+ autotests/reference/highlight.tig.ref | 78 -
+ autotests/reference/highlight.wrl.ref | 41 -
+ autotests/reference/highlight.xml.ref | 67 -
+ autotests/reference/highlight.xsl.ref | 109 -
+ autotests/reference/highlight.y.ref | 93 -
+ autotests/reference/highlight.yang.ref | 38 -
+ autotests/reference/highlight_lpc.c.ref | 64 -
+ autotests/reference/highlight_ocaml.ml.ref | 105 -
+ autotests/reference/highlight_octave.m.ref | 74 -
+ autotests/reference/learnelixir.exs.ref | 397 ---
+ autotests/reference/light52_muldiv.vhdl.ref | 239 --
+ autotests/reference/light52_tb.vhdl.ref | 186 --
+ autotests/reference/meson.build.ref | 21 -
+ autotests/reference/modelines.py.ref | 10 -
+ autotests/reference/or1200_dc_fsm.v.ref | 563 ----
+ autotests/reference/or1200_du.v.ref | 1803 ------------
+ .../reference/preprocessor-bug363280.c.ref | 8 -
+ .../reference/preprocessor-bug363280.cpp.ref | 8 -
+ autotests/reference/review128925-1.css.ref | 112 -
+ autotests/reference/review128925-1.scss.ref | 211 --
+ autotests/reference/review128925-2.css.ref | 62 -
+ autotests/reference/review128925-2.scss.ref | 81 -
+ autotests/reference/review128935.html.ref | 164 --
+ autotests/reference/test-iso.mod.ref | 96 -
+ autotests/reference/test-pim.mod.ref | 90 -
+ autotests/reference/test-r10.mod.ref | 112 -
+ autotests/reference/test.Rd.ref | 51 -
+ autotests/reference/test.bash.ref | 23 -
+ autotests/reference/test.bb.ref | 34 -
+ autotests/reference/test.c.ref | 56 -
+ autotests/reference/test.cil.ref | 153 --
+ autotests/reference/test.coffee.ref | 71 -
+ autotests/reference/test.css.ref | 18 -
+ autotests/reference/test.desktop.ref | 19 -
+ autotests/reference/test.diff.ref | 48 -
+ autotests/reference/test.eml.ref | 94 -
+ autotests/reference/test.fc.ref | 116 -
+ autotests/reference/test.frag.ref | 26 -
+ autotests/reference/test.htm.ref | 17 -
+ autotests/reference/test.ijs.ref | 61 -
+ autotests/reference/test.ini.ref | 18 -
+ autotests/reference/test.js.ref | 23 -
+ autotests/reference/test.json.ref | 13 -
+ autotests/reference/test.jsx.ref | 50 -
+ autotests/reference/test.logcat.ref | 90 -
+ autotests/reference/test.markdown.ref | 67 -
+ autotests/reference/test.mib.ref | 526 ----
+ autotests/reference/test.mm.ref | 42 -
+ autotests/reference/test.mod.ref | 96 -
+ autotests/reference/test.mss.ref | 215 --
+ autotests/reference/test.py.ref | 50 -
+ autotests/reference/test.qdocconf.ref | 65 -
+ autotests/reference/test.qml.ref | 23 -
+ autotests/reference/test.rexx.ref | 52 -
+ autotests/reference/test.rs.ref | 87 -
+ autotests/reference/test.sieve.ref | 387 ---
+ autotests/reference/test.sql.ref | 65 -
+ autotests/reference/test.sql_oracle.ref | 54 -
+ autotests/reference/test.te.ref | 139 -
+ autotests/reference/test.tex.ref | 5 -
+ autotests/reference/test.yaml.ref | 151 --
+ autotests/reference/test.zsh.ref | 66 -
+ .../usr.bin.apparmor-profile-test.ref | 270 --
+ autotests/repository_benchmark.cpp | 49 -
+ autotests/syntaxrepository_test.cpp | 406 ---
+ autotests/test-config.h.in | 103 -
+ autotests/testhighlighter.cpp | 189 --
+ autotests/theme_test.cpp | 311 ---
+ autotests/update-reference-data.sh.in | 5 -
+ autotests/wildcardmatcher_test.cpp | 91 -
+ 576 files changed, 79310 deletions(-)
+ delete mode 100644 autotests/CMakeLists.txt
+ delete mode 100644 autotests/folding/Dockerfile.fold
+ delete mode 100644 autotests/folding/Doxyfile.example.fold
+ delete mode 100644 autotests/folding/Kconfig.fold
+ delete mode 100644 autotests/folding/Makefile.fold
+ delete mode 100644 autotests/folding/adblock.txt.fold
+ delete mode 100644 autotests/folding/apache.conf.fold
+ delete mode 100644 autotests/folding/basic.markdown.fold
+ delete mode 100644 autotests/folding/basic.xml.fold
+ delete mode 100644 autotests/folding/build.gradle.fold
+ delete mode 100644 autotests/folding/clojure.clj.fold
+ delete mode 100644 autotests/folding/complex.xml.fold
+ delete mode 100644 autotests/folding/craftenv.ps1.fold
+ delete mode 100644 autotests/folding/csharp.cs.fold
+ delete mode 100644 autotests/folding/cube.obj.fold
+ delete mode 100644 autotests/folding/cube.ply.fold
+ delete mode 100644 autotests/folding/cube.stl.fold
+ delete mode 100644 autotests/folding/example.rmd.fold
+ delete mode 100644 autotests/folding/firstNonSpace.c.fold
+ delete mode 100644 autotests/folding/folding.cpp.fold
+ delete mode 100644 autotests/folding/git-rebase.fold
+ delete mode 100644 autotests/folding/hello.exs.fold
+ delete mode 100644 autotests/folding/highlight.ahdl.fold
+ delete mode 100644 autotests/folding/highlight.asm-avr.fold
+ delete mode 100644 autotests/folding/highlight.asm-nasm.fold
+ delete mode 100644 autotests/folding/highlight.asp.fold
+ delete mode 100644 autotests/folding/highlight.awk.fold
+ delete mode 100644 autotests/folding/highlight.bib.fold
+ delete mode 100644 autotests/folding/highlight.bt.fold
+ delete mode 100644 autotests/folding/highlight.cmake.fold
+ delete mode 100644 autotests/folding/highlight.cpp.fold
+ delete mode 100644 autotests/folding/highlight.css.fold
+ delete mode 100644 autotests/folding/highlight.d.fold
+ delete mode 100644 autotests/folding/highlight.do.fold
+ delete mode 100644 autotests/folding/highlight.dox.fold
+ delete mode 100644 autotests/folding/highlight.erl.fold
+ delete mode 100644 autotests/folding/highlight.exu.fold
+ delete mode 100644 autotests/folding/highlight.f90.fold
+ delete mode 100644 autotests/folding/highlight.gdb.fold
+ delete mode 100644 autotests/folding/highlight.gdbinit.fold
+ delete mode 100644 autotests/folding/highlight.glsl.fold
+ delete mode 100644 autotests/folding/highlight.hex.fold
+ delete mode 100644 autotests/folding/highlight.hs.fold
+ delete mode 100644 autotests/folding/highlight.java.fold
+ delete mode 100644 autotests/folding/highlight.js.fold
+ delete mode 100644 autotests/folding/highlight.jsp.fold
+ delete mode 100644 autotests/folding/highlight.less.fold
+ delete mode 100644 autotests/folding/highlight.lex.fold
+ delete mode 100644 autotests/folding/highlight.lgt.fold
+ delete mode 100644 autotests/folding/highlight.lhs.fold
+ delete mode 100644 autotests/folding/highlight.lisp.fold
+ delete mode 100644 autotests/folding/highlight.lua.fold
+ delete mode 100644 autotests/folding/highlight.ly.fold
+ delete mode 100644 autotests/folding/highlight.m.fold
+ delete mode 100644 autotests/folding/highlight.mac.fold
+ delete mode 100644 autotests/folding/highlight.mup.fold
+ delete mode 100644 autotests/folding/highlight.pb.fold
+ delete mode 100644 autotests/folding/highlight.php.fold
+ delete mode 100644 autotests/folding/highlight.pike.fold
+ delete mode 100644 autotests/folding/highlight.pl.fold
+ delete mode 100644 autotests/folding/highlight.pony.fold
+ delete mode 100644 autotests/folding/highlight.pov.fold
+ delete mode 100644 autotests/folding/highlight.prg.fold
+ delete mode 100644 autotests/folding/highlight.qml.fold
+ delete mode 100644 autotests/folding/highlight.rb.fold
+ delete mode 100644 autotests/folding/highlight.scad.fold
+ delete mode 100644 autotests/folding/highlight.scheme.fold
+ delete mode 100644 autotests/folding/highlight.scss.fold
+ delete mode 100644 autotests/folding/highlight.sh.fold
+ delete mode 100644 autotests/folding/highlight.spec.fold
+ delete mode 100644 autotests/folding/highlight.stan.fold
+ delete mode 100644 autotests/folding/highlight.t2t.fold
+ delete mode 100644 autotests/folding/highlight.tcl.fold
+ delete mode 100644 autotests/folding/highlight.tex.fold
+ delete mode 100644 autotests/folding/highlight.tig.fold
+ delete mode 100644 autotests/folding/highlight.wrl.fold
+ delete mode 100644 autotests/folding/highlight.xml.fold
+ delete mode 100644 autotests/folding/highlight.xsl.fold
+ delete mode 100644 autotests/folding/highlight.y.fold
+ delete mode 100644 autotests/folding/highlight.yang.fold
+ delete mode 100644 autotests/folding/highlight_lpc.c.fold
+ delete mode 100644 autotests/folding/highlight_ocaml.ml.fold
+ delete mode 100644 autotests/folding/highlight_octave.m.fold
+ delete mode 100644 autotests/folding/learnelixir.exs.fold
+ delete mode 100644 autotests/folding/light52_muldiv.vhdl.fold
+ delete mode 100644 autotests/folding/light52_tb.vhdl.fold
+ delete mode 100644 autotests/folding/meson.build.fold
+ delete mode 100644 autotests/folding/modelines.py.fold
+ delete mode 100644 autotests/folding/or1200_dc_fsm.v.fold
+ delete mode 100644 autotests/folding/or1200_du.v.fold
+ delete mode 100644 autotests/folding/preprocessor-bug363280.c.fold
+ delete mode 100644 autotests/folding/preprocessor-bug363280.cpp.fold
+ delete mode 100644 autotests/folding/review128925-1.css.fold
+ delete mode 100644 autotests/folding/review128925-1.scss.fold
+ delete mode 100644 autotests/folding/review128925-2.css.fold
+ delete mode 100644 autotests/folding/review128925-2.scss.fold
+ delete mode 100644 autotests/folding/review128935.html.fold
+ delete mode 100644 autotests/folding/test-iso.mod.fold
+ delete mode 100644 autotests/folding/test-pim.mod.fold
+ delete mode 100644 autotests/folding/test-r10.mod.fold
+ delete mode 100644 autotests/folding/test.Rd.fold
+ delete mode 100644 autotests/folding/test.bash.fold
+ delete mode 100644 autotests/folding/test.bb.fold
+ delete mode 100644 autotests/folding/test.c.fold
+ delete mode 100644 autotests/folding/test.cil.fold
+ delete mode 100644 autotests/folding/test.coffee.fold
+ delete mode 100644 autotests/folding/test.css.fold
+ delete mode 100644 autotests/folding/test.desktop.fold
+ delete mode 100644 autotests/folding/test.diff.fold
+ delete mode 100644 autotests/folding/test.eml.fold
+ delete mode 100644 autotests/folding/test.fc.fold
+ delete mode 100644 autotests/folding/test.frag.fold
+ delete mode 100644 autotests/folding/test.htm.fold
+ delete mode 100644 autotests/folding/test.ijs.fold
+ delete mode 100644 autotests/folding/test.ini.fold
+ delete mode 100644 autotests/folding/test.js.fold
+ delete mode 100644 autotests/folding/test.json.fold
+ delete mode 100644 autotests/folding/test.jsx.fold
+ delete mode 100644 autotests/folding/test.logcat.fold
+ delete mode 100644 autotests/folding/test.markdown.fold
+ delete mode 100644 autotests/folding/test.mib.fold
+ delete mode 100644 autotests/folding/test.mm.fold
+ delete mode 100644 autotests/folding/test.mod.fold
+ delete mode 100644 autotests/folding/test.mss.fold
+ delete mode 100644 autotests/folding/test.py.fold
+ delete mode 100644 autotests/folding/test.qdocconf.fold
+ delete mode 100644 autotests/folding/test.qml.fold
+ delete mode 100644 autotests/folding/test.rexx.fold
+ delete mode 100644 autotests/folding/test.rs.fold
+ delete mode 100644 autotests/folding/test.sieve.fold
+ delete mode 100644 autotests/folding/test.sql.fold
+ delete mode 100644 autotests/folding/test.sql_oracle.fold
+ delete mode 100644 autotests/folding/test.te.fold
+ delete mode 100644 autotests/folding/test.tex.fold
+ delete mode 100644 autotests/folding/test.yaml.fold
+ delete mode 100644 autotests/folding/test.zsh.fold
+ delete mode 100644 autotests/folding/usr.bin.apparmor-profile-test.fold
+ delete mode 100644 autotests/foldingtest.cpp
+ delete mode 100644 autotests/highlighter_benchmark.cpp
+ delete mode 100644 autotests/html/Dockerfile.html
+ delete mode 100644 autotests/html/Doxyfile.example.html
+ delete mode 100644 autotests/html/Kconfig.html
+ delete mode 100644 autotests/html/Makefile.html
+ delete mode 100644 autotests/html/adblock.txt.html
+ delete mode 100644 autotests/html/apache.conf.html
+ delete mode 100644 autotests/html/basic.markdown.html
+ delete mode 100644 autotests/html/basic.xml.html
+ delete mode 100644 autotests/html/build.gradle.html
+ delete mode 100644 autotests/html/clojure.clj.html
+ delete mode 100644 autotests/html/complex.xml.html
+ delete mode 100644 autotests/html/craftenv.ps1.html
+ delete mode 100644 autotests/html/csharp.cs.html
+ delete mode 100644 autotests/html/cube.obj.html
+ delete mode 100644 autotests/html/cube.ply.html
+ delete mode 100644 autotests/html/cube.stl.html
+ delete mode 100644 autotests/html/example.rmd.html
+ delete mode 100644 autotests/html/firstNonSpace.c.html
+ delete mode 100644 autotests/html/folding.cpp.html
+ delete mode 100644 autotests/html/git-rebase.html
+ delete mode 100644 autotests/html/hello.exs.html
+ delete mode 100644 autotests/html/highlight.ahdl.html
+ delete mode 100644 autotests/html/highlight.asm-avr.html
+ delete mode 100644 autotests/html/highlight.asm-nasm.html
+ delete mode 100644 autotests/html/highlight.asp.html
+ delete mode 100644 autotests/html/highlight.awk.html
+ delete mode 100644 autotests/html/highlight.bib.html
+ delete mode 100644 autotests/html/highlight.bt.html
+ delete mode 100644 autotests/html/highlight.cmake.html
+ delete mode 100644 autotests/html/highlight.cpp.html
+ delete mode 100644 autotests/html/highlight.css.html
+ delete mode 100644 autotests/html/highlight.d.html
+ delete mode 100644 autotests/html/highlight.do.html
+ delete mode 100644 autotests/html/highlight.dox.html
+ delete mode 100644 autotests/html/highlight.erl.html
+ delete mode 100644 autotests/html/highlight.exu.html
+ delete mode 100644 autotests/html/highlight.f90.html
+ delete mode 100644 autotests/html/highlight.gdb.html
+ delete mode 100644 autotests/html/highlight.gdbinit.html
+ delete mode 100644 autotests/html/highlight.glsl.html
+ delete mode 100644 autotests/html/highlight.hex.html
+ delete mode 100644 autotests/html/highlight.hs.html
+ delete mode 100644 autotests/html/highlight.java.html
+ delete mode 100644 autotests/html/highlight.js.html
+ delete mode 100644 autotests/html/highlight.jsp.html
+ delete mode 100644 autotests/html/highlight.less.html
+ delete mode 100644 autotests/html/highlight.lex.html
+ delete mode 100644 autotests/html/highlight.lgt.html
+ delete mode 100644 autotests/html/highlight.lhs.html
+ delete mode 100644 autotests/html/highlight.lisp.html
+ delete mode 100644 autotests/html/highlight.lua.html
+ delete mode 100644 autotests/html/highlight.ly.html
+ delete mode 100644 autotests/html/highlight.m.html
+ delete mode 100644 autotests/html/highlight.mac.html
+ delete mode 100644 autotests/html/highlight.mup.html
+ delete mode 100644 autotests/html/highlight.pb.html
+ delete mode 100644 autotests/html/highlight.php.html
+ delete mode 100644 autotests/html/highlight.pike.html
+ delete mode 100644 autotests/html/highlight.pl.html
+ delete mode 100644 autotests/html/highlight.pony.html
+ delete mode 100644 autotests/html/highlight.pov.html
+ delete mode 100644 autotests/html/highlight.prg.html
+ delete mode 100644 autotests/html/highlight.qml.html
+ delete mode 100644 autotests/html/highlight.rb.html
+ delete mode 100644 autotests/html/highlight.scad.html
+ delete mode 100644 autotests/html/highlight.scheme.html
+ delete mode 100644 autotests/html/highlight.scss.html
+ delete mode 100644 autotests/html/highlight.sh.html
+ delete mode 100644 autotests/html/highlight.spec.html
+ delete mode 100644 autotests/html/highlight.stan.html
+ delete mode 100644 autotests/html/highlight.t2t.html
+ delete mode 100644 autotests/html/highlight.tcl.html
+ delete mode 100644 autotests/html/highlight.tex.html
+ delete mode 100644 autotests/html/highlight.tig.html
+ delete mode 100644 autotests/html/highlight.wrl.html
+ delete mode 100644 autotests/html/highlight.xml.html
+ delete mode 100644 autotests/html/highlight.xsl.html
+ delete mode 100644 autotests/html/highlight.y.html
+ delete mode 100644 autotests/html/highlight.yang.html
+ delete mode 100644 autotests/html/highlight_lpc.c.html
+ delete mode 100644 autotests/html/highlight_ocaml.ml.html
+ delete mode 100644 autotests/html/highlight_octave.m.html
+ delete mode 100644 autotests/html/learnelixir.exs.html
+ delete mode 100644 autotests/html/light52_muldiv.vhdl.html
+ delete mode 100644 autotests/html/light52_tb.vhdl.html
+ delete mode 100644 autotests/html/meson.build.html
+ delete mode 100644 autotests/html/modelines.py.html
+ delete mode 100644 autotests/html/or1200_dc_fsm.v.html
+ delete mode 100644 autotests/html/or1200_du.v.html
+ delete mode 100644 autotests/html/preprocessor-bug363280.c.html
+ delete mode 100644 autotests/html/preprocessor-bug363280.cpp.html
+ delete mode 100644 autotests/html/review128925-1.css.html
+ delete mode 100644 autotests/html/review128925-1.scss.html
+ delete mode 100644 autotests/html/review128925-2.css.html
+ delete mode 100644 autotests/html/review128925-2.scss.html
+ delete mode 100644 autotests/html/review128935.html.html
+ delete mode 100644 autotests/html/test-iso.mod.html
+ delete mode 100644 autotests/html/test-pim.mod.html
+ delete mode 100644 autotests/html/test-r10.mod.html
+ delete mode 100644 autotests/html/test.Rd.html
+ delete mode 100644 autotests/html/test.bash.html
+ delete mode 100644 autotests/html/test.bb.html
+ delete mode 100644 autotests/html/test.c.html
+ delete mode 100644 autotests/html/test.cil.html
+ delete mode 100644 autotests/html/test.coffee.html
+ delete mode 100644 autotests/html/test.css.html
+ delete mode 100644 autotests/html/test.desktop.html
+ delete mode 100644 autotests/html/test.diff.html
+ delete mode 100644 autotests/html/test.eml.html
+ delete mode 100644 autotests/html/test.fc.html
+ delete mode 100644 autotests/html/test.frag.html
+ delete mode 100644 autotests/html/test.htm.html
+ delete mode 100644 autotests/html/test.ijs.html
+ delete mode 100644 autotests/html/test.ini.html
+ delete mode 100644 autotests/html/test.js.html
+ delete mode 100644 autotests/html/test.json.html
+ delete mode 100644 autotests/html/test.jsx.html
+ delete mode 100644 autotests/html/test.logcat.html
+ delete mode 100644 autotests/html/test.markdown.html
+ delete mode 100644 autotests/html/test.mib.html
+ delete mode 100644 autotests/html/test.mm.html
+ delete mode 100644 autotests/html/test.mod.html
+ delete mode 100644 autotests/html/test.mss.html
+ delete mode 100644 autotests/html/test.py.html
+ delete mode 100644 autotests/html/test.qdocconf.html
+ delete mode 100644 autotests/html/test.qml.html
+ delete mode 100644 autotests/html/test.rexx.html
+ delete mode 100644 autotests/html/test.rs.html
+ delete mode 100644 autotests/html/test.sieve.html
+ delete mode 100644 autotests/html/test.sql.html
+ delete mode 100644 autotests/html/test.sql_oracle.html
+ delete mode 100644 autotests/html/test.te.html
+ delete mode 100644 autotests/html/test.tex.html
+ delete mode 100644 autotests/html/test.yaml.html
+ delete mode 100644 autotests/html/test.zsh.html
+ delete mode 100644 autotests/html/usr.bin.apparmor-profile-test.html
+ delete mode 100644 autotests/htmlhighlighter_test.cpp
+ delete mode 100644 autotests/input/Dockerfile
+ delete mode 100644 autotests/input/Doxyfile.example
+ delete mode 100644 autotests/input/Kconfig
+ delete mode 100644 autotests/input/Makefile
+ delete mode 100644 autotests/input/adblock.txt
+ delete mode 100644 autotests/input/adblock.txt.syntax
+ delete mode 100644 autotests/input/apache.conf
+ delete mode 100644 autotests/input/apache.conf.syntax
+ delete mode 100644 autotests/input/basic.markdown
+ delete mode 100644 autotests/input/basic.xml
+ delete mode 100644 autotests/input/build.gradle
+ delete mode 100644 autotests/input/clojure.clj
+ delete mode 100644 autotests/input/complex.xml
+ delete mode 100644 autotests/input/craftenv.ps1
+ delete mode 100644 autotests/input/csharp.cs
+ delete mode 100644 autotests/input/cube.obj
+ delete mode 100644 autotests/input/cube.ply
+ delete mode 100644 autotests/input/cube.stl
+ delete mode 100644 autotests/input/example.rmd
+ delete mode 100644 autotests/input/firstNonSpace.c
+ delete mode 100644 autotests/input/folding.cpp
+ delete mode 100644 autotests/input/git-rebase
+ delete mode 100644 autotests/input/git-rebase.syntax
+ delete mode 100644 autotests/input/hello.exs
+ delete mode 100644 autotests/input/highlight.ahdl
+ delete mode 100644 autotests/input/highlight.asm-avr
+ delete mode 100644 autotests/input/highlight.asm-nasm
+ delete mode 100644 autotests/input/highlight.asm-nasm.syntax
+ delete mode 100644 autotests/input/highlight.asp
+ delete mode 100644 autotests/input/highlight.awk
+ delete mode 100644 autotests/input/highlight.bib
+ delete mode 100644 autotests/input/highlight.bt
+ delete mode 100644 autotests/input/highlight.cmake
+ delete mode 100644 autotests/input/highlight.cpp
+ delete mode 100644 autotests/input/highlight.css
+ delete mode 100644 autotests/input/highlight.d
+ delete mode 100644 autotests/input/highlight.do
+ delete mode 100644 autotests/input/highlight.dox
+ delete mode 100644 autotests/input/highlight.erl
+ delete mode 100644 autotests/input/highlight.exu
+ delete mode 100644 autotests/input/highlight.f90
+ delete mode 100644 autotests/input/highlight.gdb
+ delete mode 100644 autotests/input/highlight.gdbinit
+ delete mode 100644 autotests/input/highlight.glsl
+ delete mode 100644 autotests/input/highlight.hex
+ delete mode 100644 autotests/input/highlight.hs
+ delete mode 100644 autotests/input/highlight.java
+ delete mode 100644 autotests/input/highlight.js
+ delete mode 100644 autotests/input/highlight.jsp
+ delete mode 100644 autotests/input/highlight.less
+ delete mode 100644 autotests/input/highlight.lex
+ delete mode 100644 autotests/input/highlight.lgt
+ delete mode 100644 autotests/input/highlight.lhs
+ delete mode 100644 autotests/input/highlight.lisp
+ delete mode 100644 autotests/input/highlight.lua
+ delete mode 100644 autotests/input/highlight.ly
+ delete mode 100644 autotests/input/highlight.m
+ delete mode 100644 autotests/input/highlight.m.syntax
+ delete mode 100644 autotests/input/highlight.mac
+ delete mode 100644 autotests/input/highlight.mup
+ delete mode 100644 autotests/input/highlight.pb
+ delete mode 100644 autotests/input/highlight.php
+ delete mode 100644 autotests/input/highlight.pike
+ delete mode 100644 autotests/input/highlight.pl
+ delete mode 100644 autotests/input/highlight.pony
+ delete mode 100644 autotests/input/highlight.pov
+ delete mode 100644 autotests/input/highlight.prg
+ delete mode 100644 autotests/input/highlight.prg.syntax
+ delete mode 100644 autotests/input/highlight.qml
+ delete mode 100644 autotests/input/highlight.rb
+ delete mode 100644 autotests/input/highlight.scad
+ delete mode 100644 autotests/input/highlight.scheme
+ delete mode 100644 autotests/input/highlight.scss
+ delete mode 100644 autotests/input/highlight.sh
+ delete mode 100644 autotests/input/highlight.sh.syntax
+ delete mode 100644 autotests/input/highlight.spec
+ delete mode 100644 autotests/input/highlight.stan
+ delete mode 100644 autotests/input/highlight.t2t
+ delete mode 100644 autotests/input/highlight.tcl
+ delete mode 100644 autotests/input/highlight.tex
+ delete mode 100644 autotests/input/highlight.tig
+ delete mode 100644 autotests/input/highlight.wrl
+ delete mode 100644 autotests/input/highlight.xml
+ delete mode 100644 autotests/input/highlight.xsl
+ delete mode 100644 autotests/input/highlight.y
+ delete mode 100644 autotests/input/highlight.yang
+ delete mode 100644 autotests/input/highlight_lpc.c
+ delete mode 100644 autotests/input/highlight_lpc.c.syntax
+ delete mode 100644 autotests/input/highlight_ocaml.ml
+ delete mode 100644 autotests/input/highlight_octave.m
+ delete mode 100644 autotests/input/highlight_octave.m.syntax
+ delete mode 100644 autotests/input/learnelixir.exs
+ delete mode 100644 autotests/input/light52_muldiv.vhdl
+ delete mode 100644 autotests/input/light52_tb.vhdl
+ delete mode 100644 autotests/input/meson.build
+ delete mode 100644 autotests/input/modelines.py
+ delete mode 100644 autotests/input/or1200_dc_fsm.v
+ delete mode 100644 autotests/input/or1200_du.v
+ delete mode 100644 autotests/input/preprocessor-bug363280.c
+ delete mode 100644 autotests/input/preprocessor-bug363280.cpp
+ delete mode 100644 autotests/input/review128925-1.css
+ delete mode 100644 autotests/input/review128925-1.scss
+ delete mode 100644 autotests/input/review128925-2.css
+ delete mode 100644 autotests/input/review128925-2.scss
+ delete mode 100644 autotests/input/review128935.html
+ delete mode 100644 autotests/input/syntax/testlang.xml
+ delete mode 100644 autotests/input/test-iso.mod
+ delete mode 100644 autotests/input/test-iso.mod.syntax
+ delete mode 100644 autotests/input/test-pim.mod
+ delete mode 100644 autotests/input/test-pim.mod.syntax
+ delete mode 100644 autotests/input/test-r10.mod
+ delete mode 100644 autotests/input/test-r10.mod.syntax
+ delete mode 100644 autotests/input/test.Rd
+ delete mode 100644 autotests/input/test.bash
+ delete mode 100644 autotests/input/test.bb
+ delete mode 100644 autotests/input/test.c
+ delete mode 100644 autotests/input/test.c.syntax
+ delete mode 100644 autotests/input/test.cil
+ delete mode 100644 autotests/input/test.coffee
+ delete mode 100644 autotests/input/test.css
+ delete mode 100644 autotests/input/test.css.syntax
+ delete mode 100644 autotests/input/test.desktop
+ delete mode 100644 autotests/input/test.diff
+ delete mode 100644 autotests/input/test.eml
+ delete mode 100644 autotests/input/test.fc
+ delete mode 100644 autotests/input/test.frag
+ delete mode 100644 autotests/input/test.htm
+ delete mode 100644 autotests/input/test.htm.syntax
+ delete mode 100644 autotests/input/test.ijs
+ delete mode 100644 autotests/input/test.ini
+ delete mode 100644 autotests/input/test.js
+ delete mode 100644 autotests/input/test.json
+ delete mode 100644 autotests/input/test.jsx
+ delete mode 100644 autotests/input/test.logcat
+ delete mode 100644 autotests/input/test.markdown
+ delete mode 100644 autotests/input/test.mib
+ delete mode 100644 autotests/input/test.mm
+ delete mode 100644 autotests/input/test.mm.syntax
+ delete mode 100644 autotests/input/test.mod
+ delete mode 100644 autotests/input/test.mss
+ delete mode 100644 autotests/input/test.py
+ delete mode 100644 autotests/input/test.qdocconf
+ delete mode 100644 autotests/input/test.qml
+ delete mode 100644 autotests/input/test.rexx
+ delete mode 100644 autotests/input/test.rs
+ delete mode 100644 autotests/input/test.sieve
+ delete mode 100644 autotests/input/test.sql
+ delete mode 100644 autotests/input/test.sql.syntax
+ delete mode 100644 autotests/input/test.sql_oracle
+ delete mode 100644 autotests/input/test.sql_oracle.syntax
+ delete mode 100644 autotests/input/test.te
+ delete mode 100644 autotests/input/test.tex
+ delete mode 100644 autotests/input/test.yaml
+ delete mode 100644 autotests/input/test.zsh
+ delete mode 100644 autotests/input/themes/customtheme.theme
+ delete mode 100644 autotests/input/usr.bin.apparmor-profile-test
+ delete mode 100644 autotests/reference/Dockerfile.ref
+ delete mode 100644 autotests/reference/Doxyfile.example.ref
+ delete mode 100644 autotests/reference/Kconfig.ref
+ delete mode 100644 autotests/reference/Makefile.ref
+ delete mode 100644 autotests/reference/adblock.txt.ref
+ delete mode 100644 autotests/reference/apache.conf.ref
+ delete mode 100644 autotests/reference/basic.markdown.ref
+ delete mode 100644 autotests/reference/basic.xml.ref
+ delete mode 100644 autotests/reference/build.gradle.ref
+ delete mode 100644 autotests/reference/clojure.clj.ref
+ delete mode 100644 autotests/reference/complex.xml.ref
+ delete mode 100644 autotests/reference/craftenv.ps1.ref
+ delete mode 100644 autotests/reference/csharp.cs.ref
+ delete mode 100644 autotests/reference/cube.obj.ref
+ delete mode 100644 autotests/reference/cube.ply.ref
+ delete mode 100644 autotests/reference/cube.stl.ref
+ delete mode 100644 autotests/reference/example.rmd.ref
+ delete mode 100644 autotests/reference/firstNonSpace.c.ref
+ delete mode 100644 autotests/reference/folding.cpp.ref
+ delete mode 100644 autotests/reference/git-rebase.ref
+ delete mode 100644 autotests/reference/hello.exs.ref
+ delete mode 100644 autotests/reference/highlight.ahdl.ref
+ delete mode 100644 autotests/reference/highlight.asm-avr.ref
+ delete mode 100644 autotests/reference/highlight.asm-nasm.ref
+ delete mode 100644 autotests/reference/highlight.asp.ref
+ delete mode 100644 autotests/reference/highlight.awk.ref
+ delete mode 100644 autotests/reference/highlight.bib.ref
+ delete mode 100644 autotests/reference/highlight.bt.ref
+ delete mode 100644 autotests/reference/highlight.cmake.ref
+ delete mode 100644 autotests/reference/highlight.cpp.ref
+ delete mode 100644 autotests/reference/highlight.css.ref
+ delete mode 100644 autotests/reference/highlight.d.ref
+ delete mode 100644 autotests/reference/highlight.do.ref
+ delete mode 100644 autotests/reference/highlight.dox.ref
+ delete mode 100644 autotests/reference/highlight.erl.ref
+ delete mode 100644 autotests/reference/highlight.exu.ref
+ delete mode 100644 autotests/reference/highlight.f90.ref
+ delete mode 100644 autotests/reference/highlight.gdb.ref
+ delete mode 100644 autotests/reference/highlight.gdbinit.ref
+ delete mode 100644 autotests/reference/highlight.glsl.ref
+ delete mode 100644 autotests/reference/highlight.hex.ref
+ delete mode 100644 autotests/reference/highlight.hs.ref
+ delete mode 100644 autotests/reference/highlight.java.ref
+ delete mode 100644 autotests/reference/highlight.js.ref
+ delete mode 100644 autotests/reference/highlight.jsp.ref
+ delete mode 100644 autotests/reference/highlight.less.ref
+ delete mode 100644 autotests/reference/highlight.lex.ref
+ delete mode 100644 autotests/reference/highlight.lgt.ref
+ delete mode 100644 autotests/reference/highlight.lhs.ref
+ delete mode 100644 autotests/reference/highlight.lisp.ref
+ delete mode 100644 autotests/reference/highlight.lua.ref
+ delete mode 100644 autotests/reference/highlight.ly.ref
+ delete mode 100644 autotests/reference/highlight.m.ref
+ delete mode 100644 autotests/reference/highlight.mac.ref
+ delete mode 100644 autotests/reference/highlight.mup.ref
+ delete mode 100644 autotests/reference/highlight.pb.ref
+ delete mode 100644 autotests/reference/highlight.php.ref
+ delete mode 100644 autotests/reference/highlight.pike.ref
+ delete mode 100644 autotests/reference/highlight.pl.ref
+ delete mode 100644 autotests/reference/highlight.pony.ref
+ delete mode 100644 autotests/reference/highlight.pov.ref
+ delete mode 100644 autotests/reference/highlight.prg.ref
+ delete mode 100644 autotests/reference/highlight.qml.ref
+ delete mode 100644 autotests/reference/highlight.rb.ref
+ delete mode 100644 autotests/reference/highlight.scad.ref
+ delete mode 100644 autotests/reference/highlight.scheme.ref
+ delete mode 100644 autotests/reference/highlight.scss.ref
+ delete mode 100644 autotests/reference/highlight.sh.ref
+ delete mode 100644 autotests/reference/highlight.spec.ref
+ delete mode 100644 autotests/reference/highlight.stan.ref
+ delete mode 100644 autotests/reference/highlight.t2t.ref
+ delete mode 100644 autotests/reference/highlight.tcl.ref
+ delete mode 100644 autotests/reference/highlight.tex.ref
+ delete mode 100644 autotests/reference/highlight.tig.ref
+ delete mode 100644 autotests/reference/highlight.wrl.ref
+ delete mode 100644 autotests/reference/highlight.xml.ref
+ delete mode 100644 autotests/reference/highlight.xsl.ref
+ delete mode 100644 autotests/reference/highlight.y.ref
+ delete mode 100644 autotests/reference/highlight.yang.ref
+ delete mode 100644 autotests/reference/highlight_lpc.c.ref
+ delete mode 100644 autotests/reference/highlight_ocaml.ml.ref
+ delete mode 100644 autotests/reference/highlight_octave.m.ref
+ delete mode 100644 autotests/reference/learnelixir.exs.ref
+ delete mode 100644 autotests/reference/light52_muldiv.vhdl.ref
+ delete mode 100644 autotests/reference/light52_tb.vhdl.ref
+ delete mode 100644 autotests/reference/meson.build.ref
+ delete mode 100644 autotests/reference/modelines.py.ref
+ delete mode 100644 autotests/reference/or1200_dc_fsm.v.ref
+ delete mode 100644 autotests/reference/or1200_du.v.ref
+ delete mode 100644 autotests/reference/preprocessor-bug363280.c.ref
+ delete mode 100644 autotests/reference/preprocessor-bug363280.cpp.ref
+ delete mode 100644 autotests/reference/review128925-1.css.ref
+ delete mode 100644 autotests/reference/review128925-1.scss.ref
+ delete mode 100644 autotests/reference/review128925-2.css.ref
+ delete mode 100644 autotests/reference/review128925-2.scss.ref
+ delete mode 100644 autotests/reference/review128935.html.ref
+ delete mode 100644 autotests/reference/test-iso.mod.ref
+ delete mode 100644 autotests/reference/test-pim.mod.ref
+ delete mode 100644 autotests/reference/test-r10.mod.ref
+ delete mode 100644 autotests/reference/test.Rd.ref
+ delete mode 100644 autotests/reference/test.bash.ref
+ delete mode 100644 autotests/reference/test.bb.ref
+ delete mode 100644 autotests/reference/test.c.ref
+ delete mode 100644 autotests/reference/test.cil.ref
+ delete mode 100644 autotests/reference/test.coffee.ref
+ delete mode 100644 autotests/reference/test.css.ref
+ delete mode 100644 autotests/reference/test.desktop.ref
+ delete mode 100644 autotests/reference/test.diff.ref
+ delete mode 100644 autotests/reference/test.eml.ref
+ delete mode 100644 autotests/reference/test.fc.ref
+ delete mode 100644 autotests/reference/test.frag.ref
+ delete mode 100644 autotests/reference/test.htm.ref
+ delete mode 100644 autotests/reference/test.ijs.ref
+ delete mode 100644 autotests/reference/test.ini.ref
+ delete mode 100644 autotests/reference/test.js.ref
+ delete mode 100644 autotests/reference/test.json.ref
+ delete mode 100644 autotests/reference/test.jsx.ref
+ delete mode 100644 autotests/reference/test.logcat.ref
+ delete mode 100644 autotests/reference/test.markdown.ref
+ delete mode 100644 autotests/reference/test.mib.ref
+ delete mode 100644 autotests/reference/test.mm.ref
+ delete mode 100644 autotests/reference/test.mod.ref
+ delete mode 100644 autotests/reference/test.mss.ref
+ delete mode 100644 autotests/reference/test.py.ref
+ delete mode 100644 autotests/reference/test.qdocconf.ref
+ delete mode 100644 autotests/reference/test.qml.ref
+ delete mode 100644 autotests/reference/test.rexx.ref
+ delete mode 100644 autotests/reference/test.rs.ref
+ delete mode 100644 autotests/reference/test.sieve.ref
+ delete mode 100644 autotests/reference/test.sql.ref
+ delete mode 100644 autotests/reference/test.sql_oracle.ref
+ delete mode 100644 autotests/reference/test.te.ref
+ delete mode 100644 autotests/reference/test.tex.ref
+ delete mode 100644 autotests/reference/test.yaml.ref
+ delete mode 100644 autotests/reference/test.zsh.ref
+ delete mode 100644 autotests/reference/usr.bin.apparmor-profile-test.ref
+ delete mode 100644 autotests/repository_benchmark.cpp
+ delete mode 100644 autotests/syntaxrepository_test.cpp
+ delete mode 100644 autotests/test-config.h.in
+ delete mode 100644 autotests/testhighlighter.cpp
+ delete mode 100644 autotests/theme_test.cpp
+ delete mode 100755 autotests/update-reference-data.sh.in
+ delete mode 100644 autotests/wildcardmatcher_test.cpp
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b23d482..49923fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -90,9 +90,6 @@ add_subdirectory(data)
+ add_subdirectory(src)
+ if(TARGET Qt5::Gui)
+ add_subdirectory(examples)
+- if (BUILD_TESTING)
+- add_subdirectory(autotests)
+- endif()
+ endif()
+
+ #
+diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
+deleted file mode 100644
+index 827a182..0000000
+diff --git a/autotests/folding/Dockerfile.fold b/autotests/folding/Dockerfile.fold
+deleted file mode 100644
+index 95a81d3..0000000
+diff --git a/autotests/folding/Doxyfile.example.fold b/autotests/folding/Doxyfile.example.fold
+deleted file mode 100644
+index ef39bfc..0000000
+diff --git a/autotests/folding/Kconfig.fold b/autotests/folding/Kconfig.fold
+deleted file mode 100644
+index 26df6be..0000000
+diff --git a/autotests/folding/Makefile.fold b/autotests/folding/Makefile.fold
+deleted file mode 100644
+index 1cea5dd..0000000
+diff --git a/autotests/folding/adblock.txt.fold b/autotests/folding/adblock.txt.fold
+deleted file mode 100644
+index 7ad85dd..0000000
+diff --git a/autotests/folding/apache.conf.fold b/autotests/folding/apache.conf.fold
+deleted file mode 100644
+index 8d8baa5..0000000
+diff --git a/autotests/folding/basic.markdown.fold b/autotests/folding/basic.markdown.fold
+deleted file mode 100644
+index f9a5bb3..0000000
+diff --git a/autotests/folding/basic.xml.fold b/autotests/folding/basic.xml.fold
+deleted file mode 100644
+index 1d6ab4b..0000000
+diff --git a/autotests/folding/build.gradle.fold b/autotests/folding/build.gradle.fold
+deleted file mode 100644
+index 2d0d25f..0000000
+diff --git a/autotests/folding/clojure.clj.fold b/autotests/folding/clojure.clj.fold
+deleted file mode 100644
+index b2f3768..0000000
+diff --git a/autotests/folding/complex.xml.fold b/autotests/folding/complex.xml.fold
+deleted file mode 100644
+index 0c79e82..0000000
+diff --git a/autotests/folding/craftenv.ps1.fold b/autotests/folding/craftenv.ps1.fold
+deleted file mode 100644
+index 9a8fbfc..0000000
+diff --git a/autotests/folding/csharp.cs.fold b/autotests/folding/csharp.cs.fold
+deleted file mode 100644
+index 906705c..0000000
+diff --git a/autotests/folding/cube.obj.fold b/autotests/folding/cube.obj.fold
+deleted file mode 100644
+index ef06c98..0000000
+diff --git a/autotests/folding/cube.ply.fold b/autotests/folding/cube.ply.fold
+deleted file mode 100644
+index 08d5f89..0000000
+diff --git a/autotests/folding/cube.stl.fold b/autotests/folding/cube.stl.fold
+deleted file mode 100644
+index ae74fd9..0000000
+diff --git a/autotests/folding/example.rmd.fold b/autotests/folding/example.rmd.fold
+deleted file mode 100644
+index c198d13..0000000
+diff --git a/autotests/folding/firstNonSpace.c.fold b/autotests/folding/firstNonSpace.c.fold
+deleted file mode 100644
+index 570ba90..0000000
+diff --git a/autotests/folding/folding.cpp.fold b/autotests/folding/folding.cpp.fold
+deleted file mode 100644
+index be50e40..0000000
+diff --git a/autotests/folding/git-rebase.fold b/autotests/folding/git-rebase.fold
+deleted file mode 100644
+index 43041bb..0000000
+diff --git a/autotests/folding/hello.exs.fold b/autotests/folding/hello.exs.fold
+deleted file mode 100644
+index cca72a1..0000000
+diff --git a/autotests/folding/highlight.ahdl.fold b/autotests/folding/highlight.ahdl.fold
+deleted file mode 100644
+index 26924b4..0000000
+diff --git a/autotests/folding/highlight.asm-avr.fold b/autotests/folding/highlight.asm-avr.fold
+deleted file mode 100644
+index 62e3ee9..0000000
+diff --git a/autotests/folding/highlight.asm-nasm.fold b/autotests/folding/highlight.asm-nasm.fold
+deleted file mode 100644
+index a5da4d1..0000000
+diff --git a/autotests/folding/highlight.asp.fold b/autotests/folding/highlight.asp.fold
+deleted file mode 100644
+index b938201..0000000
+diff --git a/autotests/folding/highlight.awk.fold b/autotests/folding/highlight.awk.fold
+deleted file mode 100644
+index 2ad62f1..0000000
+diff --git a/autotests/folding/highlight.bib.fold b/autotests/folding/highlight.bib.fold
+deleted file mode 100644
+index 9d521ee..0000000
+diff --git a/autotests/folding/highlight.bt.fold b/autotests/folding/highlight.bt.fold
+deleted file mode 100644
+index 51d2075..0000000
+diff --git a/autotests/folding/highlight.cmake.fold b/autotests/folding/highlight.cmake.fold
+deleted file mode 100644
+index 30688fa..0000000
+diff --git a/autotests/folding/highlight.cpp.fold b/autotests/folding/highlight.cpp.fold
+deleted file mode 100644
+index 5f80fa2..0000000
+diff --git a/autotests/folding/highlight.css.fold b/autotests/folding/highlight.css.fold
+deleted file mode 100644
+index ff27482..0000000
+diff --git a/autotests/folding/highlight.d.fold b/autotests/folding/highlight.d.fold
+deleted file mode 100644
+index 44bcb09..0000000
+diff --git a/autotests/folding/highlight.do.fold b/autotests/folding/highlight.do.fold
+deleted file mode 100644
+index 83ae062..0000000
+diff --git a/autotests/folding/highlight.dox.fold b/autotests/folding/highlight.dox.fold
+deleted file mode 100644
+index ad907ab..0000000
+diff --git a/autotests/folding/highlight.erl.fold b/autotests/folding/highlight.erl.fold
+deleted file mode 100644
+index 5b485cb..0000000
+diff --git a/autotests/folding/highlight.exu.fold b/autotests/folding/highlight.exu.fold
+deleted file mode 100644
+index 84f561f..0000000
+diff --git a/autotests/folding/highlight.f90.fold b/autotests/folding/highlight.f90.fold
+deleted file mode 100644
+index 2ea0f76..0000000
+diff --git a/autotests/folding/highlight.gdb.fold b/autotests/folding/highlight.gdb.fold
+deleted file mode 100644
+index 7246b73..0000000
+diff --git a/autotests/folding/highlight.gdbinit.fold b/autotests/folding/highlight.gdbinit.fold
+deleted file mode 100644
+index 70c9820..0000000
+diff --git a/autotests/folding/highlight.glsl.fold b/autotests/folding/highlight.glsl.fold
+deleted file mode 100644
+index 53df4f1..0000000
+diff --git a/autotests/folding/highlight.hex.fold b/autotests/folding/highlight.hex.fold
+deleted file mode 100644
+index 7c3f3ea..0000000
+diff --git a/autotests/folding/highlight.hs.fold b/autotests/folding/highlight.hs.fold
+deleted file mode 100644
+index 71ee81f..0000000
+diff --git a/autotests/folding/highlight.java.fold b/autotests/folding/highlight.java.fold
+deleted file mode 100644
+index e3b4cbc..0000000
+diff --git a/autotests/folding/highlight.js.fold b/autotests/folding/highlight.js.fold
+deleted file mode 100644
+index 122c0ac..0000000
+diff --git a/autotests/folding/highlight.jsp.fold b/autotests/folding/highlight.jsp.fold
+deleted file mode 100644
+index b938095..0000000
+diff --git a/autotests/folding/highlight.less.fold b/autotests/folding/highlight.less.fold
+deleted file mode 100644
+index b6e9075..0000000
+diff --git a/autotests/folding/highlight.lex.fold b/autotests/folding/highlight.lex.fold
+deleted file mode 100644
+index d2336c7..0000000
+diff --git a/autotests/folding/highlight.lgt.fold b/autotests/folding/highlight.lgt.fold
+deleted file mode 100644
+index c444473..0000000
+diff --git a/autotests/folding/highlight.lhs.fold b/autotests/folding/highlight.lhs.fold
+deleted file mode 100644
+index 9dc52e5..0000000
+diff --git a/autotests/folding/highlight.lisp.fold b/autotests/folding/highlight.lisp.fold
+deleted file mode 100644
+index 5b6bf55..0000000
+diff --git a/autotests/folding/highlight.lua.fold b/autotests/folding/highlight.lua.fold
+deleted file mode 100644
+index 183a258..0000000
+diff --git a/autotests/folding/highlight.ly.fold b/autotests/folding/highlight.ly.fold
+deleted file mode 100644
+index a7e787b..0000000
+diff --git a/autotests/folding/highlight.m.fold b/autotests/folding/highlight.m.fold
+deleted file mode 100644
+index 302659f..0000000
+diff --git a/autotests/folding/highlight.mac.fold b/autotests/folding/highlight.mac.fold
+deleted file mode 100644
+index ad7ee63..0000000
+diff --git a/autotests/folding/highlight.mup.fold b/autotests/folding/highlight.mup.fold
+deleted file mode 100644
+index e9afd19..0000000
+diff --git a/autotests/folding/highlight.pb.fold b/autotests/folding/highlight.pb.fold
+deleted file mode 100644
+index aad9803..0000000
+diff --git a/autotests/folding/highlight.php.fold b/autotests/folding/highlight.php.fold
+deleted file mode 100644
+index d0a5bc8..0000000
+diff --git a/autotests/folding/highlight.pike.fold b/autotests/folding/highlight.pike.fold
+deleted file mode 100644
+index 5c65bae..0000000
+diff --git a/autotests/folding/highlight.pl.fold b/autotests/folding/highlight.pl.fold
+deleted file mode 100644
+index 6845697..0000000
+diff --git a/autotests/folding/highlight.pony.fold b/autotests/folding/highlight.pony.fold
+deleted file mode 100644
+index d89d314..0000000
+diff --git a/autotests/folding/highlight.pov.fold b/autotests/folding/highlight.pov.fold
+deleted file mode 100644
+index 01e848c..0000000
+diff --git a/autotests/folding/highlight.prg.fold b/autotests/folding/highlight.prg.fold
+deleted file mode 100644
+index 9f03189..0000000
+diff --git a/autotests/folding/highlight.qml.fold b/autotests/folding/highlight.qml.fold
+deleted file mode 100644
+index 2494d70..0000000
+diff --git a/autotests/folding/highlight.rb.fold b/autotests/folding/highlight.rb.fold
+deleted file mode 100644
+index 8ae2980..0000000
+diff --git a/autotests/folding/highlight.scad.fold b/autotests/folding/highlight.scad.fold
+deleted file mode 100644
+index 68de2e0..0000000
+diff --git a/autotests/folding/highlight.scheme.fold b/autotests/folding/highlight.scheme.fold
+deleted file mode 100644
+index c42b22f..0000000
+diff --git a/autotests/folding/highlight.scss.fold b/autotests/folding/highlight.scss.fold
+deleted file mode 100644
+index afef111..0000000
+diff --git a/autotests/folding/highlight.sh.fold b/autotests/folding/highlight.sh.fold
+deleted file mode 100644
+index 9f81112..0000000
+diff --git a/autotests/folding/highlight.spec.fold b/autotests/folding/highlight.spec.fold
+deleted file mode 100644
+index 6ed00cf..0000000
+diff --git a/autotests/folding/highlight.stan.fold b/autotests/folding/highlight.stan.fold
+deleted file mode 100644
+index 38bfe01..0000000
+diff --git a/autotests/folding/highlight.t2t.fold b/autotests/folding/highlight.t2t.fold
+deleted file mode 100644
+index 428f204..0000000
+diff --git a/autotests/folding/highlight.tcl.fold b/autotests/folding/highlight.tcl.fold
+deleted file mode 100644
+index 7b6264c..0000000
+diff --git a/autotests/folding/highlight.tex.fold b/autotests/folding/highlight.tex.fold
+deleted file mode 100644
+index 772b210..0000000
+diff --git a/autotests/folding/highlight.tig.fold b/autotests/folding/highlight.tig.fold
+deleted file mode 100644
+index 8f3d99e..0000000
+diff --git a/autotests/folding/highlight.wrl.fold b/autotests/folding/highlight.wrl.fold
+deleted file mode 100644
+index c800b08..0000000
+diff --git a/autotests/folding/highlight.xml.fold b/autotests/folding/highlight.xml.fold
+deleted file mode 100644
+index b120aea..0000000
+diff --git a/autotests/folding/highlight.xsl.fold b/autotests/folding/highlight.xsl.fold
+deleted file mode 100644
+index feea15b..0000000
+diff --git a/autotests/folding/highlight.y.fold b/autotests/folding/highlight.y.fold
+deleted file mode 100644
+index 4f6242b..0000000
+diff --git a/autotests/folding/highlight.yang.fold b/autotests/folding/highlight.yang.fold
+deleted file mode 100644
+index 2de6183..0000000
+diff --git a/autotests/folding/highlight_lpc.c.fold b/autotests/folding/highlight_lpc.c.fold
+deleted file mode 100644
+index 350ce06..0000000
+diff --git a/autotests/folding/highlight_ocaml.ml.fold b/autotests/folding/highlight_ocaml.ml.fold
+deleted file mode 100644
+index 2403ed1..0000000
+diff --git a/autotests/folding/highlight_octave.m.fold b/autotests/folding/highlight_octave.m.fold
+deleted file mode 100644
+index ee3fdbd..0000000
+diff --git a/autotests/folding/learnelixir.exs.fold b/autotests/folding/learnelixir.exs.fold
+deleted file mode 100644
+index 1f51bd1..0000000
+diff --git a/autotests/folding/light52_muldiv.vhdl.fold b/autotests/folding/light52_muldiv.vhdl.fold
+deleted file mode 100644
+index c5d461e..0000000
+diff --git a/autotests/folding/light52_tb.vhdl.fold b/autotests/folding/light52_tb.vhdl.fold
+deleted file mode 100644
+index 17be507..0000000
+diff --git a/autotests/folding/meson.build.fold b/autotests/folding/meson.build.fold
+deleted file mode 100644
+index f20c35b..0000000
+diff --git a/autotests/folding/modelines.py.fold b/autotests/folding/modelines.py.fold
+deleted file mode 100644
+index 9c02779..0000000
+diff --git a/autotests/folding/or1200_dc_fsm.v.fold b/autotests/folding/or1200_dc_fsm.v.fold
+deleted file mode 100644
+index c54fbe7..0000000
+diff --git a/autotests/folding/or1200_du.v.fold b/autotests/folding/or1200_du.v.fold
+deleted file mode 100644
+index 97a6319..0000000
+diff --git a/autotests/folding/preprocessor-bug363280.c.fold b/autotests/folding/preprocessor-bug363280.c.fold
+deleted file mode 100644
+index bf559fb..0000000
+diff --git a/autotests/folding/preprocessor-bug363280.cpp.fold b/autotests/folding/preprocessor-bug363280.cpp.fold
+deleted file mode 100644
+index f9aabcc..0000000
+diff --git a/autotests/folding/review128925-1.css.fold b/autotests/folding/review128925-1.css.fold
+deleted file mode 100644
+index 05621d3..0000000
+diff --git a/autotests/folding/review128925-1.scss.fold b/autotests/folding/review128925-1.scss.fold
+deleted file mode 100644
+index 0b1f50b..0000000
+diff --git a/autotests/folding/review128925-2.css.fold b/autotests/folding/review128925-2.css.fold
+deleted file mode 100644
+index f10e2f0..0000000
+diff --git a/autotests/folding/review128925-2.scss.fold b/autotests/folding/review128925-2.scss.fold
+deleted file mode 100644
+index 056e331..0000000
+diff --git a/autotests/folding/review128935.html.fold b/autotests/folding/review128935.html.fold
+deleted file mode 100644
+index 9a5887a..0000000
+diff --git a/autotests/folding/test-iso.mod.fold b/autotests/folding/test-iso.mod.fold
+deleted file mode 100644
+index 57faabc..0000000
+diff --git a/autotests/folding/test-pim.mod.fold b/autotests/folding/test-pim.mod.fold
+deleted file mode 100644
+index dd152a7..0000000
+diff --git a/autotests/folding/test-r10.mod.fold b/autotests/folding/test-r10.mod.fold
+deleted file mode 100644
+index 7dc2e0d..0000000
+diff --git a/autotests/folding/test.Rd.fold b/autotests/folding/test.Rd.fold
+deleted file mode 100644
+index 77d07c4..0000000
+diff --git a/autotests/folding/test.bash.fold b/autotests/folding/test.bash.fold
+deleted file mode 100644
+index 216f11c..0000000
+diff --git a/autotests/folding/test.bb.fold b/autotests/folding/test.bb.fold
+deleted file mode 100644
+index 98d9089..0000000
+diff --git a/autotests/folding/test.c.fold b/autotests/folding/test.c.fold
+deleted file mode 100644
+index 7b43b2d..0000000
+diff --git a/autotests/folding/test.cil.fold b/autotests/folding/test.cil.fold
+deleted file mode 100644
+index 6ff2ff2..0000000
+diff --git a/autotests/folding/test.coffee.fold b/autotests/folding/test.coffee.fold
+deleted file mode 100644
+index de7ad09..0000000
+diff --git a/autotests/folding/test.css.fold b/autotests/folding/test.css.fold
+deleted file mode 100644
+index 0edd45b..0000000
+diff --git a/autotests/folding/test.desktop.fold b/autotests/folding/test.desktop.fold
+deleted file mode 100644
+index 77db817..0000000
+diff --git a/autotests/folding/test.diff.fold b/autotests/folding/test.diff.fold
+deleted file mode 100644
+index 95ef591..0000000
+diff --git a/autotests/folding/test.eml.fold b/autotests/folding/test.eml.fold
+deleted file mode 100644
+index 1e43110..0000000
+diff --git a/autotests/folding/test.fc.fold b/autotests/folding/test.fc.fold
+deleted file mode 100644
+index 3b90d3c..0000000
+diff --git a/autotests/folding/test.frag.fold b/autotests/folding/test.frag.fold
+deleted file mode 100644
+index a6a7bc1..0000000
+diff --git a/autotests/folding/test.htm.fold b/autotests/folding/test.htm.fold
+deleted file mode 100644
+index 23df023..0000000
+diff --git a/autotests/folding/test.ijs.fold b/autotests/folding/test.ijs.fold
+deleted file mode 100644
+index 7ff269b..0000000
+diff --git a/autotests/folding/test.ini.fold b/autotests/folding/test.ini.fold
+deleted file mode 100644
+index 27d80c8..0000000
+diff --git a/autotests/folding/test.js.fold b/autotests/folding/test.js.fold
+deleted file mode 100644
+index 90eecbf..0000000
+diff --git a/autotests/folding/test.json.fold b/autotests/folding/test.json.fold
+deleted file mode 100644
+index 622ad42..0000000
+diff --git a/autotests/folding/test.jsx.fold b/autotests/folding/test.jsx.fold
+deleted file mode 100644
+index bb0ffe8..0000000
+diff --git a/autotests/folding/test.logcat.fold b/autotests/folding/test.logcat.fold
+deleted file mode 100644
+index 80f0657..0000000
+diff --git a/autotests/folding/test.markdown.fold b/autotests/folding/test.markdown.fold
+deleted file mode 100644
+index 5078865..0000000
+diff --git a/autotests/folding/test.mib.fold b/autotests/folding/test.mib.fold
+deleted file mode 100644
+index aa273c2..0000000
+diff --git a/autotests/folding/test.mm.fold b/autotests/folding/test.mm.fold
+deleted file mode 100644
+index 6c8c39a..0000000
+diff --git a/autotests/folding/test.mod.fold b/autotests/folding/test.mod.fold
+deleted file mode 100644
+index 57faabc..0000000
+diff --git a/autotests/folding/test.mss.fold b/autotests/folding/test.mss.fold
+deleted file mode 100644
+index 49e0b97..0000000
+diff --git a/autotests/folding/test.py.fold b/autotests/folding/test.py.fold
+deleted file mode 100644
+index 8f9cdf4..0000000
+diff --git a/autotests/folding/test.qdocconf.fold b/autotests/folding/test.qdocconf.fold
+deleted file mode 100644
+index 0a382be..0000000
+diff --git a/autotests/folding/test.qml.fold b/autotests/folding/test.qml.fold
+deleted file mode 100644
+index 316ff65..0000000
+diff --git a/autotests/folding/test.rexx.fold b/autotests/folding/test.rexx.fold
+deleted file mode 100644
+index 378f8b7..0000000
+diff --git a/autotests/folding/test.rs.fold b/autotests/folding/test.rs.fold
+deleted file mode 100644
+index 7e43837..0000000
+diff --git a/autotests/folding/test.sieve.fold b/autotests/folding/test.sieve.fold
+deleted file mode 100644
+index c3344eb..0000000
+diff --git a/autotests/folding/test.sql.fold b/autotests/folding/test.sql.fold
+deleted file mode 100644
+index b76fae2..0000000
+diff --git a/autotests/folding/test.sql_oracle.fold b/autotests/folding/test.sql_oracle.fold
+deleted file mode 100644
+index e123cdf..0000000
+diff --git a/autotests/folding/test.te.fold b/autotests/folding/test.te.fold
+deleted file mode 100644
+index e266975..0000000
+diff --git a/autotests/folding/test.tex.fold b/autotests/folding/test.tex.fold
+deleted file mode 100644
+index 8da60c9..0000000
+diff --git a/autotests/folding/test.yaml.fold b/autotests/folding/test.yaml.fold
+deleted file mode 100644
+index e044140..0000000
+diff --git a/autotests/folding/test.zsh.fold b/autotests/folding/test.zsh.fold
+deleted file mode 100644
+index 924d798..0000000
+diff --git a/autotests/folding/usr.bin.apparmor-profile-test.fold b/autotests/folding/usr.bin.apparmor-profile-test.fold
+deleted file mode 100644
+index 64deede..0000000
+diff --git a/autotests/foldingtest.cpp b/autotests/foldingtest.cpp
+deleted file mode 100644
+index 5d10166..0000000
+diff --git a/autotests/highlighter_benchmark.cpp b/autotests/highlighter_benchmark.cpp
+deleted file mode 100644
+index 0b945ff..0000000
+diff --git a/autotests/html/Dockerfile.html b/autotests/html/Dockerfile.html
+deleted file mode 100644
+index ef324f6..0000000
+diff --git a/autotests/html/Doxyfile.example.html b/autotests/html/Doxyfile.example.html
+deleted file mode 100644
+index 0f2a6a5..0000000
+diff --git a/autotests/html/Kconfig.html b/autotests/html/Kconfig.html
+deleted file mode 100644
+index ab4ca14..0000000
+diff --git a/autotests/html/Makefile.html b/autotests/html/Makefile.html
+deleted file mode 100644
+index 801c14a..0000000
+diff --git a/autotests/html/adblock.txt.html b/autotests/html/adblock.txt.html
+deleted file mode 100644
+index 04dc5d1..0000000
+diff --git a/autotests/html/apache.conf.html b/autotests/html/apache.conf.html
+deleted file mode 100644
+index 50f254c..0000000
+diff --git a/autotests/html/basic.markdown.html b/autotests/html/basic.markdown.html
+deleted file mode 100644
+index 8ee1f19..0000000
+diff --git a/autotests/html/basic.xml.html b/autotests/html/basic.xml.html
+deleted file mode 100644
+index 770b081..0000000
+diff --git a/autotests/html/build.gradle.html b/autotests/html/build.gradle.html
+deleted file mode 100644
+index 5f0e056..0000000
+diff --git a/autotests/html/clojure.clj.html b/autotests/html/clojure.clj.html
+deleted file mode 100644
+index 548e3ea..0000000
+diff --git a/autotests/html/complex.xml.html b/autotests/html/complex.xml.html
+deleted file mode 100644
+index 117029d..0000000
+diff --git a/autotests/html/craftenv.ps1.html b/autotests/html/craftenv.ps1.html
+deleted file mode 100644
+index cfdf0e2..0000000
+diff --git a/autotests/html/csharp.cs.html b/autotests/html/csharp.cs.html
+deleted file mode 100644
+index fb4b469..0000000
+diff --git a/autotests/html/cube.obj.html b/autotests/html/cube.obj.html
+deleted file mode 100644
+index 6ecd1df..0000000
+diff --git a/autotests/html/cube.ply.html b/autotests/html/cube.ply.html
+deleted file mode 100644
+index 39d9102..0000000
+diff --git a/autotests/html/cube.stl.html b/autotests/html/cube.stl.html
+deleted file mode 100644
+index 0a23eab..0000000
+diff --git a/autotests/html/example.rmd.html b/autotests/html/example.rmd.html
+deleted file mode 100644
+index 9d7b639..0000000
+diff --git a/autotests/html/firstNonSpace.c.html b/autotests/html/firstNonSpace.c.html
+deleted file mode 100644
+index 55e02dd..0000000
+diff --git a/autotests/html/folding.cpp.html b/autotests/html/folding.cpp.html
+deleted file mode 100644
+index a920612..0000000
+diff --git a/autotests/html/git-rebase.html b/autotests/html/git-rebase.html
+deleted file mode 100644
+index 17d6da9..0000000
+diff --git a/autotests/html/hello.exs.html b/autotests/html/hello.exs.html
+deleted file mode 100644
+index 43d76a5..0000000
+diff --git a/autotests/html/highlight.ahdl.html b/autotests/html/highlight.ahdl.html
+deleted file mode 100644
+index b833298..0000000
+diff --git a/autotests/html/highlight.asm-avr.html b/autotests/html/highlight.asm-avr.html
+deleted file mode 100644
+index 867894e..0000000
+diff --git a/autotests/html/highlight.asm-nasm.html b/autotests/html/highlight.asm-nasm.html
+deleted file mode 100644
+index 6ae4028..0000000
+diff --git a/autotests/html/highlight.asp.html b/autotests/html/highlight.asp.html
+deleted file mode 100644
+index 85a1bba..0000000
+diff --git a/autotests/html/highlight.awk.html b/autotests/html/highlight.awk.html
+deleted file mode 100644
+index d92268a..0000000
+diff --git a/autotests/html/highlight.bib.html b/autotests/html/highlight.bib.html
+deleted file mode 100644
+index 48cc672..0000000
+diff --git a/autotests/html/highlight.bt.html b/autotests/html/highlight.bt.html
+deleted file mode 100644
+index dca943a..0000000
+diff --git a/autotests/html/highlight.cmake.html b/autotests/html/highlight.cmake.html
+deleted file mode 100644
+index a70c5ad..0000000
+diff --git a/autotests/html/highlight.cpp.html b/autotests/html/highlight.cpp.html
+deleted file mode 100644
+index 07be9db..0000000
+diff --git a/autotests/html/highlight.css.html b/autotests/html/highlight.css.html
+deleted file mode 100644
+index a3efe69..0000000
+diff --git a/autotests/html/highlight.d.html b/autotests/html/highlight.d.html
+deleted file mode 100644
+index 5e97d7b..0000000
+diff --git a/autotests/html/highlight.do.html b/autotests/html/highlight.do.html
+deleted file mode 100644
+index 40ac67d..0000000
+diff --git a/autotests/html/highlight.dox.html b/autotests/html/highlight.dox.html
+deleted file mode 100644
+index 990dc60..0000000
+diff --git a/autotests/html/highlight.erl.html b/autotests/html/highlight.erl.html
+deleted file mode 100644
+index 8424c84..0000000
+diff --git a/autotests/html/highlight.exu.html b/autotests/html/highlight.exu.html
+deleted file mode 100644
+index 5631898..0000000
+diff --git a/autotests/html/highlight.f90.html b/autotests/html/highlight.f90.html
+deleted file mode 100644
+index 897b853..0000000
+diff --git a/autotests/html/highlight.gdb.html b/autotests/html/highlight.gdb.html
+deleted file mode 100644
+index 5341b3c..0000000
+diff --git a/autotests/html/highlight.gdbinit.html b/autotests/html/highlight.gdbinit.html
+deleted file mode 100644
+index 84f3083..0000000
+diff --git a/autotests/html/highlight.glsl.html b/autotests/html/highlight.glsl.html
+deleted file mode 100644
+index bb22782..0000000
+diff --git a/autotests/html/highlight.hex.html b/autotests/html/highlight.hex.html
+deleted file mode 100644
+index b43e169..0000000
+diff --git a/autotests/html/highlight.hs.html b/autotests/html/highlight.hs.html
+deleted file mode 100644
+index b0ae90c..0000000
+diff --git a/autotests/html/highlight.java.html b/autotests/html/highlight.java.html
+deleted file mode 100644
+index e2b38e2..0000000
+diff --git a/autotests/html/highlight.js.html b/autotests/html/highlight.js.html
+deleted file mode 100644
+index 9c0f8d3..0000000
+diff --git a/autotests/html/highlight.jsp.html b/autotests/html/highlight.jsp.html
+deleted file mode 100644
+index 919297f..0000000
+diff --git a/autotests/html/highlight.less.html b/autotests/html/highlight.less.html
+deleted file mode 100644
+index 1491037..0000000
+diff --git a/autotests/html/highlight.lex.html b/autotests/html/highlight.lex.html
+deleted file mode 100644
+index dc1a884..0000000
+diff --git a/autotests/html/highlight.lgt.html b/autotests/html/highlight.lgt.html
+deleted file mode 100644
+index 5edceb3..0000000
+diff --git a/autotests/html/highlight.lhs.html b/autotests/html/highlight.lhs.html
+deleted file mode 100644
+index 086360e..0000000
+diff --git a/autotests/html/highlight.lisp.html b/autotests/html/highlight.lisp.html
+deleted file mode 100644
+index 6d59f6b..0000000
+diff --git a/autotests/html/highlight.lua.html b/autotests/html/highlight.lua.html
+deleted file mode 100644
+index 6ea0df4..0000000
+diff --git a/autotests/html/highlight.ly.html b/autotests/html/highlight.ly.html
+deleted file mode 100644
+index 3eafd4b..0000000
+diff --git a/autotests/html/highlight.m.html b/autotests/html/highlight.m.html
+deleted file mode 100644
+index 3296705..0000000
+diff --git a/autotests/html/highlight.mac.html b/autotests/html/highlight.mac.html
+deleted file mode 100644
+index 62a6068..0000000
+diff --git a/autotests/html/highlight.mup.html b/autotests/html/highlight.mup.html
+deleted file mode 100644
+index 48c6a3b..0000000
+diff --git a/autotests/html/highlight.pb.html b/autotests/html/highlight.pb.html
+deleted file mode 100644
+index 09a3ee8..0000000
+diff --git a/autotests/html/highlight.php.html b/autotests/html/highlight.php.html
+deleted file mode 100644
+index 08cf9ad..0000000
+diff --git a/autotests/html/highlight.pike.html b/autotests/html/highlight.pike.html
+deleted file mode 100644
+index 7f63985..0000000
+diff --git a/autotests/html/highlight.pl.html b/autotests/html/highlight.pl.html
+deleted file mode 100644
+index 4e31dda..0000000
+diff --git a/autotests/html/highlight.pony.html b/autotests/html/highlight.pony.html
+deleted file mode 100644
+index 97ae59d..0000000
+diff --git a/autotests/html/highlight.pov.html b/autotests/html/highlight.pov.html
+deleted file mode 100644
+index e566558..0000000
+diff --git a/autotests/html/highlight.prg.html b/autotests/html/highlight.prg.html
+deleted file mode 100644
+index cc6f18a..0000000
+diff --git a/autotests/html/highlight.qml.html b/autotests/html/highlight.qml.html
+deleted file mode 100644
+index e74d91c..0000000
+diff --git a/autotests/html/highlight.rb.html b/autotests/html/highlight.rb.html
+deleted file mode 100644
+index 8e2bb99..0000000
+diff --git a/autotests/html/highlight.scad.html b/autotests/html/highlight.scad.html
+deleted file mode 100644
+index 31a7b10..0000000
+diff --git a/autotests/html/highlight.scheme.html b/autotests/html/highlight.scheme.html
+deleted file mode 100644
+index a561179..0000000
+diff --git a/autotests/html/highlight.scss.html b/autotests/html/highlight.scss.html
+deleted file mode 100644
+index ec36e31..0000000
+diff --git a/autotests/html/highlight.sh.html b/autotests/html/highlight.sh.html
+deleted file mode 100644
+index b661a14..0000000
+diff --git a/autotests/html/highlight.spec.html b/autotests/html/highlight.spec.html
+deleted file mode 100644
+index 459655b..0000000
+diff --git a/autotests/html/highlight.stan.html b/autotests/html/highlight.stan.html
+deleted file mode 100644
+index 44f7274..0000000
+diff --git a/autotests/html/highlight.t2t.html b/autotests/html/highlight.t2t.html
+deleted file mode 100644
+index 044837e..0000000
+diff --git a/autotests/html/highlight.tcl.html b/autotests/html/highlight.tcl.html
+deleted file mode 100644
+index cda9499..0000000
+diff --git a/autotests/html/highlight.tex.html b/autotests/html/highlight.tex.html
+deleted file mode 100644
+index f277153..0000000
+diff --git a/autotests/html/highlight.tig.html b/autotests/html/highlight.tig.html
+deleted file mode 100644
+index ea1b29e..0000000
+diff --git a/autotests/html/highlight.wrl.html b/autotests/html/highlight.wrl.html
+deleted file mode 100644
+index 4ddc08f..0000000
+diff --git a/autotests/html/highlight.xml.html b/autotests/html/highlight.xml.html
+deleted file mode 100644
+index cccbe3b..0000000
+diff --git a/autotests/html/highlight.xsl.html b/autotests/html/highlight.xsl.html
+deleted file mode 100644
+index 44208fb..0000000
+diff --git a/autotests/html/highlight.y.html b/autotests/html/highlight.y.html
+deleted file mode 100644
+index a11c230..0000000
+diff --git a/autotests/html/highlight.yang.html b/autotests/html/highlight.yang.html
+deleted file mode 100644
+index 0be31a1..0000000
+diff --git a/autotests/html/highlight_lpc.c.html b/autotests/html/highlight_lpc.c.html
+deleted file mode 100644
+index 2ac3653..0000000
+diff --git a/autotests/html/highlight_ocaml.ml.html b/autotests/html/highlight_ocaml.ml.html
+deleted file mode 100644
+index 0e85e63..0000000
+diff --git a/autotests/html/highlight_octave.m.html b/autotests/html/highlight_octave.m.html
+deleted file mode 100644
+index 25d8cd8..0000000
+diff --git a/autotests/html/learnelixir.exs.html b/autotests/html/learnelixir.exs.html
+deleted file mode 100644
+index 9c0a390..0000000
+diff --git a/autotests/html/light52_muldiv.vhdl.html b/autotests/html/light52_muldiv.vhdl.html
+deleted file mode 100644
+index e5e27d3..0000000
+diff --git a/autotests/html/light52_tb.vhdl.html b/autotests/html/light52_tb.vhdl.html
+deleted file mode 100644
+index 8e73226..0000000
+diff --git a/autotests/html/meson.build.html b/autotests/html/meson.build.html
+deleted file mode 100644
+index 66e7942..0000000
+diff --git a/autotests/html/modelines.py.html b/autotests/html/modelines.py.html
+deleted file mode 100644
+index 0b3feff..0000000
+diff --git a/autotests/html/or1200_dc_fsm.v.html b/autotests/html/or1200_dc_fsm.v.html
+deleted file mode 100644
+index 7f26b75..0000000
+diff --git a/autotests/html/or1200_du.v.html b/autotests/html/or1200_du.v.html
+deleted file mode 100644
+index daf06ab..0000000
+diff --git a/autotests/html/preprocessor-bug363280.c.html b/autotests/html/preprocessor-bug363280.c.html
+deleted file mode 100644
+index e7b930b..0000000
+diff --git a/autotests/html/preprocessor-bug363280.cpp.html b/autotests/html/preprocessor-bug363280.cpp.html
+deleted file mode 100644
+index 1cdb7cc..0000000
+diff --git a/autotests/html/review128925-1.css.html b/autotests/html/review128925-1.css.html
+deleted file mode 100644
+index 192353d..0000000
+diff --git a/autotests/html/review128925-1.scss.html b/autotests/html/review128925-1.scss.html
+deleted file mode 100644
+index 79db0f9..0000000
+diff --git a/autotests/html/review128925-2.css.html b/autotests/html/review128925-2.css.html
+deleted file mode 100644
+index f519726..0000000
+diff --git a/autotests/html/review128925-2.scss.html b/autotests/html/review128925-2.scss.html
+deleted file mode 100644
+index 3c6d98e..0000000
+diff --git a/autotests/html/review128935.html.html b/autotests/html/review128935.html.html
+deleted file mode 100644
+index 4e59fc3..0000000
+diff --git a/autotests/html/test-iso.mod.html b/autotests/html/test-iso.mod.html
+deleted file mode 100644
+index e931d2c..0000000
+diff --git a/autotests/html/test-pim.mod.html b/autotests/html/test-pim.mod.html
+deleted file mode 100644
+index 38457df..0000000
+diff --git a/autotests/html/test-r10.mod.html b/autotests/html/test-r10.mod.html
+deleted file mode 100644
+index b35222f..0000000
+diff --git a/autotests/html/test.Rd.html b/autotests/html/test.Rd.html
+deleted file mode 100644
+index de292d6..0000000
+diff --git a/autotests/html/test.bash.html b/autotests/html/test.bash.html
+deleted file mode 100644
+index 161a975..0000000
+diff --git a/autotests/html/test.bb.html b/autotests/html/test.bb.html
+deleted file mode 100644
+index 9be6849..0000000
+diff --git a/autotests/html/test.c.html b/autotests/html/test.c.html
+deleted file mode 100644
+index 06d8a22..0000000
+diff --git a/autotests/html/test.cil.html b/autotests/html/test.cil.html
+deleted file mode 100644
+index ef2aa91..0000000
+diff --git a/autotests/html/test.coffee.html b/autotests/html/test.coffee.html
+deleted file mode 100644
+index 6fe3b4d..0000000
+diff --git a/autotests/html/test.css.html b/autotests/html/test.css.html
+deleted file mode 100644
+index b08cd84..0000000
+diff --git a/autotests/html/test.desktop.html b/autotests/html/test.desktop.html
+deleted file mode 100644
+index 66cdb27..0000000
+diff --git a/autotests/html/test.diff.html b/autotests/html/test.diff.html
+deleted file mode 100644
+index 8aa506d..0000000
+diff --git a/autotests/html/test.eml.html b/autotests/html/test.eml.html
+deleted file mode 100644
+index 7231c81..0000000
+diff --git a/autotests/html/test.fc.html b/autotests/html/test.fc.html
+deleted file mode 100644
+index 7302ed7..0000000
+diff --git a/autotests/html/test.frag.html b/autotests/html/test.frag.html
+deleted file mode 100644
+index 9ad3654..0000000
+diff --git a/autotests/html/test.htm.html b/autotests/html/test.htm.html
+deleted file mode 100644
+index 4c5eca5..0000000
+diff --git a/autotests/html/test.ijs.html b/autotests/html/test.ijs.html
+deleted file mode 100644
+index b9b91dd..0000000
+diff --git a/autotests/html/test.ini.html b/autotests/html/test.ini.html
+deleted file mode 100644
+index e834c8a..0000000
+diff --git a/autotests/html/test.js.html b/autotests/html/test.js.html
+deleted file mode 100644
+index fb47bde..0000000
+diff --git a/autotests/html/test.json.html b/autotests/html/test.json.html
+deleted file mode 100644
+index 1c3ec27..0000000
+diff --git a/autotests/html/test.jsx.html b/autotests/html/test.jsx.html
+deleted file mode 100644
+index 4af3ffa..0000000
+diff --git a/autotests/html/test.logcat.html b/autotests/html/test.logcat.html
+deleted file mode 100644
+index 2b2f6ee..0000000
+diff --git a/autotests/html/test.markdown.html b/autotests/html/test.markdown.html
+deleted file mode 100644
+index 2a6f8d7..0000000
+diff --git a/autotests/html/test.mib.html b/autotests/html/test.mib.html
+deleted file mode 100644
+index 30c2806..0000000
+diff --git a/autotests/html/test.mm.html b/autotests/html/test.mm.html
+deleted file mode 100644
+index 8ae2f11..0000000
+diff --git a/autotests/html/test.mod.html b/autotests/html/test.mod.html
+deleted file mode 100644
+index c03fea4..0000000
+diff --git a/autotests/html/test.mss.html b/autotests/html/test.mss.html
+deleted file mode 100644
+index 47b6292..0000000
+diff --git a/autotests/html/test.py.html b/autotests/html/test.py.html
+deleted file mode 100644
+index 0420ef4..0000000
+diff --git a/autotests/html/test.qdocconf.html b/autotests/html/test.qdocconf.html
+deleted file mode 100644
+index 3a000d5..0000000
+diff --git a/autotests/html/test.qml.html b/autotests/html/test.qml.html
+deleted file mode 100644
+index 39cc95d..0000000
+diff --git a/autotests/html/test.rexx.html b/autotests/html/test.rexx.html
+deleted file mode 100644
+index d528f24..0000000
+diff --git a/autotests/html/test.rs.html b/autotests/html/test.rs.html
+deleted file mode 100644
+index dd4da52..0000000
+diff --git a/autotests/html/test.sieve.html b/autotests/html/test.sieve.html
+deleted file mode 100644
+index f619d21..0000000
+diff --git a/autotests/html/test.sql.html b/autotests/html/test.sql.html
+deleted file mode 100644
+index 91e2ff4..0000000
+diff --git a/autotests/html/test.sql_oracle.html b/autotests/html/test.sql_oracle.html
+deleted file mode 100644
+index 72486e3..0000000
+diff --git a/autotests/html/test.te.html b/autotests/html/test.te.html
+deleted file mode 100644
+index 88dac5e..0000000
+diff --git a/autotests/html/test.tex.html b/autotests/html/test.tex.html
+deleted file mode 100644
+index e3ab47c..0000000
+diff --git a/autotests/html/test.yaml.html b/autotests/html/test.yaml.html
+deleted file mode 100644
+index 94c5d71..0000000
+diff --git a/autotests/html/test.zsh.html b/autotests/html/test.zsh.html
+deleted file mode 100644
+index 12683d7..0000000
+diff --git a/autotests/html/usr.bin.apparmor-profile-test.html b/autotests/html/usr.bin.apparmor-profile-test.html
+deleted file mode 100644
+index 4e2a486..0000000
+diff --git a/autotests/htmlhighlighter_test.cpp b/autotests/htmlhighlighter_test.cpp
+deleted file mode 100644
+index f7cc30a..0000000
+diff --git a/autotests/input/Dockerfile b/autotests/input/Dockerfile
+deleted file mode 100644
+index 95a81d3..0000000
+diff --git a/autotests/input/Doxyfile.example b/autotests/input/Doxyfile.example
+deleted file mode 100644
+index ef39bfc..0000000
+diff --git a/autotests/input/Kconfig b/autotests/input/Kconfig
+deleted file mode 100644
+index 5ebfaf4..0000000
+diff --git a/autotests/input/Makefile b/autotests/input/Makefile
+deleted file mode 100644
+index 05e4590..0000000
+diff --git a/autotests/input/adblock.txt b/autotests/input/adblock.txt
+deleted file mode 100644
+index 7ad85dd..0000000
+diff --git a/autotests/input/adblock.txt.syntax b/autotests/input/adblock.txt.syntax
+deleted file mode 100644
+index 0ce0446..0000000
+diff --git a/autotests/input/apache.conf b/autotests/input/apache.conf
+deleted file mode 100644
+index 2afa0be..0000000
+diff --git a/autotests/input/apache.conf.syntax b/autotests/input/apache.conf.syntax
+deleted file mode 100644
+index eab529d..0000000
+diff --git a/autotests/input/basic.markdown b/autotests/input/basic.markdown
+deleted file mode 100644
+index f9a5bb3..0000000
+diff --git a/autotests/input/basic.xml b/autotests/input/basic.xml
+deleted file mode 100644
+index 20feae1..0000000
+diff --git a/autotests/input/build.gradle b/autotests/input/build.gradle
+deleted file mode 100644
+index 3ad9096..0000000
+diff --git a/autotests/input/clojure.clj b/autotests/input/clojure.clj
+deleted file mode 100644
+index b2f3768..0000000
+diff --git a/autotests/input/complex.xml b/autotests/input/complex.xml
+deleted file mode 100644
+index d738998..0000000
+diff --git a/autotests/input/craftenv.ps1 b/autotests/input/craftenv.ps1
+deleted file mode 100644
+index a58dfee..0000000
+diff --git a/autotests/input/csharp.cs b/autotests/input/csharp.cs
+deleted file mode 100644
+index 8a91459..0000000
+diff --git a/autotests/input/cube.obj b/autotests/input/cube.obj
+deleted file mode 100644
+index ef06c98..0000000
+diff --git a/autotests/input/cube.ply b/autotests/input/cube.ply
+deleted file mode 100644
+index 08d5f89..0000000
+diff --git a/autotests/input/cube.stl b/autotests/input/cube.stl
+deleted file mode 100644
+index ae74fd9..0000000
+diff --git a/autotests/input/example.rmd b/autotests/input/example.rmd
+deleted file mode 100644
+index ef9a33e..0000000
+diff --git a/autotests/input/firstNonSpace.c b/autotests/input/firstNonSpace.c
+deleted file mode 100644
+index 570ba90..0000000
+diff --git a/autotests/input/folding.cpp b/autotests/input/folding.cpp
+deleted file mode 100644
+index 9e26b3f..0000000
+diff --git a/autotests/input/git-rebase b/autotests/input/git-rebase
+deleted file mode 100644
+index 43041bb..0000000
+diff --git a/autotests/input/git-rebase.syntax b/autotests/input/git-rebase.syntax
+deleted file mode 100644
+index abf0034..0000000
+diff --git a/autotests/input/hello.exs b/autotests/input/hello.exs
+deleted file mode 100644
+index cca72a1..0000000
+diff --git a/autotests/input/highlight.ahdl b/autotests/input/highlight.ahdl
+deleted file mode 100644
+index e059aa8..0000000
+diff --git a/autotests/input/highlight.asm-avr b/autotests/input/highlight.asm-avr
+deleted file mode 100644
+index f1e0542..0000000
+diff --git a/autotests/input/highlight.asm-nasm b/autotests/input/highlight.asm-nasm
+deleted file mode 100644
+index a5da4d1..0000000
+diff --git a/autotests/input/highlight.asm-nasm.syntax b/autotests/input/highlight.asm-nasm.syntax
+deleted file mode 100644
+index 67140d2..0000000
+diff --git a/autotests/input/highlight.asp b/autotests/input/highlight.asp
+deleted file mode 100644
+index 07a8619..0000000
+diff --git a/autotests/input/highlight.awk b/autotests/input/highlight.awk
+deleted file mode 100644
+index a80c86a..0000000
+diff --git a/autotests/input/highlight.bib b/autotests/input/highlight.bib
+deleted file mode 100644
+index 0ae404c..0000000
+diff --git a/autotests/input/highlight.bt b/autotests/input/highlight.bt
+deleted file mode 100644
+index 51d2075..0000000
+diff --git a/autotests/input/highlight.cmake b/autotests/input/highlight.cmake
+deleted file mode 100644
+index b8a1842..0000000
+diff --git a/autotests/input/highlight.cpp b/autotests/input/highlight.cpp
+deleted file mode 100644
+index f293064..0000000
+diff --git a/autotests/input/highlight.css b/autotests/input/highlight.css
+deleted file mode 100644
+index 7a5ea67..0000000
+diff --git a/autotests/input/highlight.d b/autotests/input/highlight.d
+deleted file mode 100644
+index b3daaf6..0000000
+diff --git a/autotests/input/highlight.do b/autotests/input/highlight.do
+deleted file mode 100644
+index 0b90b16..0000000
+diff --git a/autotests/input/highlight.dox b/autotests/input/highlight.dox
+deleted file mode 100644
+index 39b404f..0000000
+diff --git a/autotests/input/highlight.erl b/autotests/input/highlight.erl
+deleted file mode 100644
+index 5b485cb..0000000
+diff --git a/autotests/input/highlight.exu b/autotests/input/highlight.exu
+deleted file mode 100644
+index 3651adf..0000000
+diff --git a/autotests/input/highlight.f90 b/autotests/input/highlight.f90
+deleted file mode 100644
+index e2008c2..0000000
+diff --git a/autotests/input/highlight.gdb b/autotests/input/highlight.gdb
+deleted file mode 100644
+index a4b6459..0000000
+diff --git a/autotests/input/highlight.gdbinit b/autotests/input/highlight.gdbinit
+deleted file mode 100644
+index d33f9ea..0000000
+diff --git a/autotests/input/highlight.glsl b/autotests/input/highlight.glsl
+deleted file mode 100644
+index 3495757..0000000
+diff --git a/autotests/input/highlight.hex b/autotests/input/highlight.hex
+deleted file mode 100644
+index 7c3f3ea..0000000
+diff --git a/autotests/input/highlight.hs b/autotests/input/highlight.hs
+deleted file mode 100644
+index 8c0b145..0000000
+diff --git a/autotests/input/highlight.java b/autotests/input/highlight.java
+deleted file mode 100644
+index c807d64..0000000
+diff --git a/autotests/input/highlight.js b/autotests/input/highlight.js
+deleted file mode 100644
+index d0e7533..0000000
+diff --git a/autotests/input/highlight.jsp b/autotests/input/highlight.jsp
+deleted file mode 100644
+index d912836..0000000
+diff --git a/autotests/input/highlight.less b/autotests/input/highlight.less
+deleted file mode 100644
+index e178263..0000000
+diff --git a/autotests/input/highlight.lex b/autotests/input/highlight.lex
+deleted file mode 100644
+index 33527bd..0000000
+diff --git a/autotests/input/highlight.lgt b/autotests/input/highlight.lgt
+deleted file mode 100644
+index d39b45c..0000000
+diff --git a/autotests/input/highlight.lhs b/autotests/input/highlight.lhs
+deleted file mode 100644
+index 9dc52e5..0000000
+diff --git a/autotests/input/highlight.lisp b/autotests/input/highlight.lisp
+deleted file mode 100644
+index e86c85f..0000000
+diff --git a/autotests/input/highlight.lua b/autotests/input/highlight.lua
+deleted file mode 100644
+index 85ac95d..0000000
+diff --git a/autotests/input/highlight.ly b/autotests/input/highlight.ly
+deleted file mode 100644
+index 29aa7a6..0000000
+diff --git a/autotests/input/highlight.m b/autotests/input/highlight.m
+deleted file mode 100644
+index f240138..0000000
+diff --git a/autotests/input/highlight.m.syntax b/autotests/input/highlight.m.syntax
+deleted file mode 100644
+index d22d99a..0000000
+diff --git a/autotests/input/highlight.mac b/autotests/input/highlight.mac
+deleted file mode 100644
+index cb9da2d..0000000
+diff --git a/autotests/input/highlight.mup b/autotests/input/highlight.mup
+deleted file mode 100644
+index ed5a03d..0000000
+diff --git a/autotests/input/highlight.pb b/autotests/input/highlight.pb
+deleted file mode 100644
+index 5560233..0000000
+diff --git a/autotests/input/highlight.php b/autotests/input/highlight.php
+deleted file mode 100644
+index bb50951..0000000
+diff --git a/autotests/input/highlight.pike b/autotests/input/highlight.pike
+deleted file mode 100644
+index 2f63144..0000000
+diff --git a/autotests/input/highlight.pl b/autotests/input/highlight.pl
+deleted file mode 100644
+index 7d15d24..0000000
+diff --git a/autotests/input/highlight.pony b/autotests/input/highlight.pony
+deleted file mode 100644
+index aefa3b7..0000000
+diff --git a/autotests/input/highlight.pov b/autotests/input/highlight.pov
+deleted file mode 100644
+index 0bb3077..0000000
+diff --git a/autotests/input/highlight.prg b/autotests/input/highlight.prg
+deleted file mode 100644
+index 713c605..0000000
+diff --git a/autotests/input/highlight.prg.syntax b/autotests/input/highlight.prg.syntax
+deleted file mode 100644
+index 3355ff8..0000000
+diff --git a/autotests/input/highlight.qml b/autotests/input/highlight.qml
+deleted file mode 100644
+index b860512..0000000
+diff --git a/autotests/input/highlight.rb b/autotests/input/highlight.rb
+deleted file mode 100644
+index 2e52e5f..0000000
+diff --git a/autotests/input/highlight.scad b/autotests/input/highlight.scad
+deleted file mode 100644
+index 3ca4ec3..0000000
+diff --git a/autotests/input/highlight.scheme b/autotests/input/highlight.scheme
+deleted file mode 100644
+index 08c7351..0000000
+diff --git a/autotests/input/highlight.scss b/autotests/input/highlight.scss
+deleted file mode 100644
+index 11a4028..0000000
+diff --git a/autotests/input/highlight.sh b/autotests/input/highlight.sh
+deleted file mode 100644
+index a354757..0000000
+diff --git a/autotests/input/highlight.sh.syntax b/autotests/input/highlight.sh.syntax
+deleted file mode 100644
+index 5b85af9..0000000
+diff --git a/autotests/input/highlight.spec b/autotests/input/highlight.spec
+deleted file mode 100644
+index bc3b95b..0000000
+diff --git a/autotests/input/highlight.stan b/autotests/input/highlight.stan
+deleted file mode 100644
+index a71c231..0000000
+diff --git a/autotests/input/highlight.t2t b/autotests/input/highlight.t2t
+deleted file mode 100644
+index 5b5f379..0000000
+diff --git a/autotests/input/highlight.tcl b/autotests/input/highlight.tcl
+deleted file mode 100644
+index d6b7276..0000000
+diff --git a/autotests/input/highlight.tex b/autotests/input/highlight.tex
+deleted file mode 100644
+index 34c0890..0000000
+diff --git a/autotests/input/highlight.tig b/autotests/input/highlight.tig
+deleted file mode 100644
+index 893cbfe..0000000
+diff --git a/autotests/input/highlight.wrl b/autotests/input/highlight.wrl
+deleted file mode 100644
+index 2fb4b41..0000000
+diff --git a/autotests/input/highlight.xml b/autotests/input/highlight.xml
+deleted file mode 100644
+index 007449c..0000000
+diff --git a/autotests/input/highlight.xsl b/autotests/input/highlight.xsl
+deleted file mode 100644
+index f6e0efb..0000000
+diff --git a/autotests/input/highlight.y b/autotests/input/highlight.y
+deleted file mode 100644
+index df42a54..0000000
+diff --git a/autotests/input/highlight.yang b/autotests/input/highlight.yang
+deleted file mode 100644
+index bd95152..0000000
+diff --git a/autotests/input/highlight_lpc.c b/autotests/input/highlight_lpc.c
+deleted file mode 100644
+index fe5c629..0000000
+diff --git a/autotests/input/highlight_lpc.c.syntax b/autotests/input/highlight_lpc.c.syntax
+deleted file mode 100644
+index 2016d4f..0000000
+diff --git a/autotests/input/highlight_ocaml.ml b/autotests/input/highlight_ocaml.ml
+deleted file mode 100644
+index dc1717a..0000000
+diff --git a/autotests/input/highlight_octave.m b/autotests/input/highlight_octave.m
+deleted file mode 100644
+index 1f96036..0000000
+diff --git a/autotests/input/highlight_octave.m.syntax b/autotests/input/highlight_octave.m.syntax
+deleted file mode 100644
+index 65d755f..0000000
+diff --git a/autotests/input/learnelixir.exs b/autotests/input/learnelixir.exs
+deleted file mode 100644
+index 1f51bd1..0000000
+diff --git a/autotests/input/light52_muldiv.vhdl b/autotests/input/light52_muldiv.vhdl
+deleted file mode 100644
+index 723f154..0000000
+diff --git a/autotests/input/light52_tb.vhdl b/autotests/input/light52_tb.vhdl
+deleted file mode 100644
+index c110c5a..0000000
+diff --git a/autotests/input/meson.build b/autotests/input/meson.build
+deleted file mode 100644
+index d6dd6e6..0000000
+diff --git a/autotests/input/modelines.py b/autotests/input/modelines.py
+deleted file mode 100644
+index cd624ea..0000000
+diff --git a/autotests/input/or1200_dc_fsm.v b/autotests/input/or1200_dc_fsm.v
+deleted file mode 100644
+index e3d80ec..0000000
+diff --git a/autotests/input/or1200_du.v b/autotests/input/or1200_du.v
+deleted file mode 100644
+index dbd3614..0000000
+diff --git a/autotests/input/preprocessor-bug363280.c b/autotests/input/preprocessor-bug363280.c
+deleted file mode 100644
+index 9908bf7..0000000
+diff --git a/autotests/input/preprocessor-bug363280.cpp b/autotests/input/preprocessor-bug363280.cpp
+deleted file mode 100644
+index 9908bf7..0000000
+diff --git a/autotests/input/review128925-1.css b/autotests/input/review128925-1.css
+deleted file mode 100644
+index b61b616..0000000
+diff --git a/autotests/input/review128925-1.scss b/autotests/input/review128925-1.scss
+deleted file mode 100644
+index 6aa1da6..0000000
+diff --git a/autotests/input/review128925-2.css b/autotests/input/review128925-2.css
+deleted file mode 100644
+index 05c20a8..0000000
+diff --git a/autotests/input/review128925-2.scss b/autotests/input/review128925-2.scss
+deleted file mode 100644
+index c71fe3b..0000000
+diff --git a/autotests/input/review128935.html b/autotests/input/review128935.html
+deleted file mode 100644
+index f373235..0000000
+diff --git a/autotests/input/syntax/testlang.xml b/autotests/input/syntax/testlang.xml
+deleted file mode 100644
+index 0a1f9ba..0000000
+diff --git a/autotests/input/test-iso.mod b/autotests/input/test-iso.mod
+deleted file mode 100644
+index c30b91f..0000000
+diff --git a/autotests/input/test-iso.mod.syntax b/autotests/input/test-iso.mod.syntax
+deleted file mode 100644
+index 6179cd9..0000000
+diff --git a/autotests/input/test-pim.mod b/autotests/input/test-pim.mod
+deleted file mode 100644
+index be72a09..0000000
+diff --git a/autotests/input/test-pim.mod.syntax b/autotests/input/test-pim.mod.syntax
+deleted file mode 100644
+index 2580222..0000000
+diff --git a/autotests/input/test-r10.mod b/autotests/input/test-r10.mod
+deleted file mode 100644
+index 5c8b97c..0000000
+diff --git a/autotests/input/test-r10.mod.syntax b/autotests/input/test-r10.mod.syntax
+deleted file mode 100644
+index 55f4a6c..0000000
+diff --git a/autotests/input/test.Rd b/autotests/input/test.Rd
+deleted file mode 100644
+index 392343e..0000000
+diff --git a/autotests/input/test.bash b/autotests/input/test.bash
+deleted file mode 100644
+index 6241e5a..0000000
+diff --git a/autotests/input/test.bb b/autotests/input/test.bb
+deleted file mode 100644
+index 98d9089..0000000
+diff --git a/autotests/input/test.c b/autotests/input/test.c
+deleted file mode 100644
+index b2462d7..0000000
+diff --git a/autotests/input/test.c.syntax b/autotests/input/test.c.syntax
+deleted file mode 100644
+index 3cc58df..0000000
+diff --git a/autotests/input/test.cil b/autotests/input/test.cil
+deleted file mode 100644
+index 6ff2ff2..0000000
+diff --git a/autotests/input/test.coffee b/autotests/input/test.coffee
+deleted file mode 100644
+index 56f8a69..0000000
+diff --git a/autotests/input/test.css b/autotests/input/test.css
+deleted file mode 100644
+index 763e2d6..0000000
+diff --git a/autotests/input/test.css.syntax b/autotests/input/test.css.syntax
+deleted file mode 100644
+index 30599f0..0000000
+diff --git a/autotests/input/test.desktop b/autotests/input/test.desktop
+deleted file mode 100644
+index f3edd78..0000000
+diff --git a/autotests/input/test.diff b/autotests/input/test.diff
+deleted file mode 100644
+index 7a6807c..0000000
+diff --git a/autotests/input/test.eml b/autotests/input/test.eml
+deleted file mode 100644
+index 1e43110..0000000
+diff --git a/autotests/input/test.fc b/autotests/input/test.fc
+deleted file mode 100644
+index 76935a1..0000000
+diff --git a/autotests/input/test.frag b/autotests/input/test.frag
+deleted file mode 100644
+index 67ccc99..0000000
+diff --git a/autotests/input/test.htm b/autotests/input/test.htm
+deleted file mode 100644
+index 24ed4aa..0000000
+diff --git a/autotests/input/test.htm.syntax b/autotests/input/test.htm.syntax
+deleted file mode 100644
+index f05185c..0000000
+diff --git a/autotests/input/test.ijs b/autotests/input/test.ijs
+deleted file mode 100644
+index 9acfe4b..0000000
+diff --git a/autotests/input/test.ini b/autotests/input/test.ini
+deleted file mode 100644
+index d67d83d..0000000
+diff --git a/autotests/input/test.js b/autotests/input/test.js
+deleted file mode 100644
+index 478bd6e..0000000
+diff --git a/autotests/input/test.json b/autotests/input/test.json
+deleted file mode 100644
+index 6c16ee6..0000000
+diff --git a/autotests/input/test.jsx b/autotests/input/test.jsx
+deleted file mode 100644
+index 52b35c5..0000000
+diff --git a/autotests/input/test.logcat b/autotests/input/test.logcat
+deleted file mode 100644
+index 80f0657..0000000
+diff --git a/autotests/input/test.markdown b/autotests/input/test.markdown
+deleted file mode 100644
+index 74bcb61..0000000
+diff --git a/autotests/input/test.mib b/autotests/input/test.mib
+deleted file mode 100644
+index aa273c2..0000000
+diff --git a/autotests/input/test.mm b/autotests/input/test.mm
+deleted file mode 100644
+index 7f2677a..0000000
+diff --git a/autotests/input/test.mm.syntax b/autotests/input/test.mm.syntax
+deleted file mode 100644
+index b3ddb33..0000000
+diff --git a/autotests/input/test.mod b/autotests/input/test.mod
+deleted file mode 100644
+index c30b91f..0000000
+diff --git a/autotests/input/test.mss b/autotests/input/test.mss
+deleted file mode 100644
+index 4f742c1..0000000
+diff --git a/autotests/input/test.py b/autotests/input/test.py
+deleted file mode 100644
+index ac2ad0d..0000000
+diff --git a/autotests/input/test.qdocconf b/autotests/input/test.qdocconf
+deleted file mode 100644
+index 0a382be..0000000
+diff --git a/autotests/input/test.qml b/autotests/input/test.qml
+deleted file mode 100644
+index d8f7cb5..0000000
+diff --git a/autotests/input/test.rexx b/autotests/input/test.rexx
+deleted file mode 100644
+index 3e25125..0000000
+diff --git a/autotests/input/test.rs b/autotests/input/test.rs
+deleted file mode 100644
+index ec0d188..0000000
+diff --git a/autotests/input/test.sieve b/autotests/input/test.sieve
+deleted file mode 100644
+index 596ac45..0000000
+diff --git a/autotests/input/test.sql b/autotests/input/test.sql
+deleted file mode 100644
+index b76fae2..0000000
+diff --git a/autotests/input/test.sql.syntax b/autotests/input/test.sql.syntax
+deleted file mode 100644
+index b433cc9..0000000
+diff --git a/autotests/input/test.sql_oracle b/autotests/input/test.sql_oracle
+deleted file mode 100644
+index 80ade14..0000000
+diff --git a/autotests/input/test.sql_oracle.syntax b/autotests/input/test.sql_oracle.syntax
+deleted file mode 100644
+index 679c648..0000000
+diff --git a/autotests/input/test.te b/autotests/input/test.te
+deleted file mode 100644
+index 4a5ec9d..0000000
+diff --git a/autotests/input/test.tex b/autotests/input/test.tex
+deleted file mode 100644
+index 8da60c9..0000000
+diff --git a/autotests/input/test.yaml b/autotests/input/test.yaml
+deleted file mode 100644
+index cebc411..0000000
+diff --git a/autotests/input/test.zsh b/autotests/input/test.zsh
+deleted file mode 100644
+index 9da5db2..0000000
+diff --git a/autotests/input/themes/customtheme.theme b/autotests/input/themes/customtheme.theme
+deleted file mode 100644
+index 9ef0eea..0000000
+diff --git a/autotests/input/usr.bin.apparmor-profile-test b/autotests/input/usr.bin.apparmor-profile-test
+deleted file mode 100644
+index d112068..0000000
+diff --git a/autotests/reference/Dockerfile.ref b/autotests/reference/Dockerfile.ref
+deleted file mode 100644
+index 4d075e5..0000000
+diff --git a/autotests/reference/Doxyfile.example.ref b/autotests/reference/Doxyfile.example.ref
+deleted file mode 100644
+index 05100a4..0000000
+diff --git a/autotests/reference/Kconfig.ref b/autotests/reference/Kconfig.ref
+deleted file mode 100644
+index 0871457..0000000
+diff --git a/autotests/reference/Makefile.ref b/autotests/reference/Makefile.ref
+deleted file mode 100644
+index aa6a7c8..0000000
+diff --git a/autotests/reference/adblock.txt.ref b/autotests/reference/adblock.txt.ref
+deleted file mode 100644
+index 0b70891..0000000
+diff --git a/autotests/reference/apache.conf.ref b/autotests/reference/apache.conf.ref
+deleted file mode 100644
+index 9b48e0b..0000000
+diff --git a/autotests/reference/basic.markdown.ref b/autotests/reference/basic.markdown.ref
+deleted file mode 100644
+index 8f32c5d..0000000
+diff --git a/autotests/reference/basic.xml.ref b/autotests/reference/basic.xml.ref
+deleted file mode 100644
+index 9e61a57..0000000
+diff --git a/autotests/reference/build.gradle.ref b/autotests/reference/build.gradle.ref
+deleted file mode 100644
+index fc3d280..0000000
+diff --git a/autotests/reference/clojure.clj.ref b/autotests/reference/clojure.clj.ref
+deleted file mode 100644
+index 0c9ae6d..0000000
+diff --git a/autotests/reference/complex.xml.ref b/autotests/reference/complex.xml.ref
+deleted file mode 100644
+index 4ffac2b..0000000
+diff --git a/autotests/reference/craftenv.ps1.ref b/autotests/reference/craftenv.ps1.ref
+deleted file mode 100644
+index 7d7f496..0000000
+diff --git a/autotests/reference/csharp.cs.ref b/autotests/reference/csharp.cs.ref
+deleted file mode 100644
+index bd5f806..0000000
+diff --git a/autotests/reference/cube.obj.ref b/autotests/reference/cube.obj.ref
+deleted file mode 100644
+index ff41fa3..0000000
+diff --git a/autotests/reference/cube.ply.ref b/autotests/reference/cube.ply.ref
+deleted file mode 100644
+index 2ba0fc5..0000000
+diff --git a/autotests/reference/cube.stl.ref b/autotests/reference/cube.stl.ref
+deleted file mode 100644
+index d3e273d..0000000
+diff --git a/autotests/reference/example.rmd.ref b/autotests/reference/example.rmd.ref
+deleted file mode 100644
+index 56eedaa..0000000
+diff --git a/autotests/reference/firstNonSpace.c.ref b/autotests/reference/firstNonSpace.c.ref
+deleted file mode 100644
+index 6c14dd6..0000000
+diff --git a/autotests/reference/folding.cpp.ref b/autotests/reference/folding.cpp.ref
+deleted file mode 100644
+index 5fb1ec8..0000000
+diff --git a/autotests/reference/git-rebase.ref b/autotests/reference/git-rebase.ref
+deleted file mode 100644
+index a0a99ab..0000000
+diff --git a/autotests/reference/hello.exs.ref b/autotests/reference/hello.exs.ref
+deleted file mode 100644
+index f81ebbf..0000000
+diff --git a/autotests/reference/highlight.ahdl.ref b/autotests/reference/highlight.ahdl.ref
+deleted file mode 100644
+index ee149c2..0000000
+diff --git a/autotests/reference/highlight.asm-avr.ref b/autotests/reference/highlight.asm-avr.ref
+deleted file mode 100644
+index af6b627..0000000
+diff --git a/autotests/reference/highlight.asm-nasm.ref b/autotests/reference/highlight.asm-nasm.ref
+deleted file mode 100644
+index d674717..0000000
+diff --git a/autotests/reference/highlight.asp.ref b/autotests/reference/highlight.asp.ref
+deleted file mode 100644
+index b64fd4e..0000000
+diff --git a/autotests/reference/highlight.awk.ref b/autotests/reference/highlight.awk.ref
+deleted file mode 100644
+index 0560d4b..0000000
+diff --git a/autotests/reference/highlight.bib.ref b/autotests/reference/highlight.bib.ref
+deleted file mode 100644
+index d3f79c4..0000000
+diff --git a/autotests/reference/highlight.bt.ref b/autotests/reference/highlight.bt.ref
+deleted file mode 100644
+index b4559d7..0000000
+diff --git a/autotests/reference/highlight.cmake.ref b/autotests/reference/highlight.cmake.ref
+deleted file mode 100644
+index 2f7136f..0000000
+diff --git a/autotests/reference/highlight.cpp.ref b/autotests/reference/highlight.cpp.ref
+deleted file mode 100644
+index 295b447..0000000
+diff --git a/autotests/reference/highlight.css.ref b/autotests/reference/highlight.css.ref
+deleted file mode 100644
+index a262282..0000000
+diff --git a/autotests/reference/highlight.d.ref b/autotests/reference/highlight.d.ref
+deleted file mode 100644
+index 68962b9..0000000
+diff --git a/autotests/reference/highlight.do.ref b/autotests/reference/highlight.do.ref
+deleted file mode 100644
+index afc5bac..0000000
+diff --git a/autotests/reference/highlight.dox.ref b/autotests/reference/highlight.dox.ref
+deleted file mode 100644
+index 3e8346a..0000000
+diff --git a/autotests/reference/highlight.erl.ref b/autotests/reference/highlight.erl.ref
+deleted file mode 100644
+index 3a38fb7..0000000
+diff --git a/autotests/reference/highlight.exu.ref b/autotests/reference/highlight.exu.ref
+deleted file mode 100644
+index 5ec9969..0000000
+diff --git a/autotests/reference/highlight.f90.ref b/autotests/reference/highlight.f90.ref
+deleted file mode 100644
+index 810a1d6..0000000
+diff --git a/autotests/reference/highlight.gdb.ref b/autotests/reference/highlight.gdb.ref
+deleted file mode 100644
+index 3b0fdc0..0000000
+diff --git a/autotests/reference/highlight.gdbinit.ref b/autotests/reference/highlight.gdbinit.ref
+deleted file mode 100644
+index ef8dc48..0000000
+diff --git a/autotests/reference/highlight.glsl.ref b/autotests/reference/highlight.glsl.ref
+deleted file mode 100644
+index d7d0ef3..0000000
+diff --git a/autotests/reference/highlight.hex.ref b/autotests/reference/highlight.hex.ref
+deleted file mode 100644
+index ae09fd7..0000000
+diff --git a/autotests/reference/highlight.hs.ref b/autotests/reference/highlight.hs.ref
+deleted file mode 100644
+index e59f9d3..0000000
+diff --git a/autotests/reference/highlight.java.ref b/autotests/reference/highlight.java.ref
+deleted file mode 100644
+index ce941bd..0000000
+diff --git a/autotests/reference/highlight.js.ref b/autotests/reference/highlight.js.ref
+deleted file mode 100644
+index 7ddd8c9..0000000
+diff --git a/autotests/reference/highlight.jsp.ref b/autotests/reference/highlight.jsp.ref
+deleted file mode 100644
+index de73f18..0000000
+diff --git a/autotests/reference/highlight.less.ref b/autotests/reference/highlight.less.ref
+deleted file mode 100644
+index b5ac4ae..0000000
+diff --git a/autotests/reference/highlight.lex.ref b/autotests/reference/highlight.lex.ref
+deleted file mode 100644
+index 85912dc..0000000
+diff --git a/autotests/reference/highlight.lgt.ref b/autotests/reference/highlight.lgt.ref
+deleted file mode 100644
+index 354d3ad..0000000
+diff --git a/autotests/reference/highlight.lhs.ref b/autotests/reference/highlight.lhs.ref
+deleted file mode 100644
+index 838c687..0000000
+diff --git a/autotests/reference/highlight.lisp.ref b/autotests/reference/highlight.lisp.ref
+deleted file mode 100644
+index fe8cbf0..0000000
+diff --git a/autotests/reference/highlight.lua.ref b/autotests/reference/highlight.lua.ref
+deleted file mode 100644
+index 26e640c..0000000
+diff --git a/autotests/reference/highlight.ly.ref b/autotests/reference/highlight.ly.ref
+deleted file mode 100644
+index f11654d..0000000
+diff --git a/autotests/reference/highlight.m.ref b/autotests/reference/highlight.m.ref
+deleted file mode 100644
+index e75ca5e..0000000
+diff --git a/autotests/reference/highlight.mac.ref b/autotests/reference/highlight.mac.ref
+deleted file mode 100644
+index 79f336a..0000000
+diff --git a/autotests/reference/highlight.mup.ref b/autotests/reference/highlight.mup.ref
+deleted file mode 100644
+index 7ec1480..0000000
+diff --git a/autotests/reference/highlight.pb.ref b/autotests/reference/highlight.pb.ref
+deleted file mode 100644
+index d6adb56..0000000
+diff --git a/autotests/reference/highlight.php.ref b/autotests/reference/highlight.php.ref
+deleted file mode 100644
+index b1d8139..0000000
+diff --git a/autotests/reference/highlight.pike.ref b/autotests/reference/highlight.pike.ref
+deleted file mode 100644
+index f40f3d9..0000000
+diff --git a/autotests/reference/highlight.pl.ref b/autotests/reference/highlight.pl.ref
+deleted file mode 100644
+index e9cedd1..0000000
+diff --git a/autotests/reference/highlight.pony.ref b/autotests/reference/highlight.pony.ref
+deleted file mode 100644
+index 525f712..0000000
+diff --git a/autotests/reference/highlight.pov.ref b/autotests/reference/highlight.pov.ref
+deleted file mode 100644
+index 4a21aaf..0000000
+diff --git a/autotests/reference/highlight.prg.ref b/autotests/reference/highlight.prg.ref
+deleted file mode 100644
+index 2888283..0000000
+diff --git a/autotests/reference/highlight.qml.ref b/autotests/reference/highlight.qml.ref
+deleted file mode 100644
+index 3df0de1..0000000
+diff --git a/autotests/reference/highlight.rb.ref b/autotests/reference/highlight.rb.ref
+deleted file mode 100644
+index 139825f..0000000
+diff --git a/autotests/reference/highlight.scad.ref b/autotests/reference/highlight.scad.ref
+deleted file mode 100644
+index 93d31eb..0000000
+diff --git a/autotests/reference/highlight.scheme.ref b/autotests/reference/highlight.scheme.ref
+deleted file mode 100644
+index d6887a3..0000000
+diff --git a/autotests/reference/highlight.scss.ref b/autotests/reference/highlight.scss.ref
+deleted file mode 100644
+index 081743f..0000000
+diff --git a/autotests/reference/highlight.sh.ref b/autotests/reference/highlight.sh.ref
+deleted file mode 100644
+index fbfba05..0000000
+diff --git a/autotests/reference/highlight.spec.ref b/autotests/reference/highlight.spec.ref
+deleted file mode 100644
+index 20b6c11..0000000
+diff --git a/autotests/reference/highlight.stan.ref b/autotests/reference/highlight.stan.ref
+deleted file mode 100644
+index 581f8a2..0000000
+diff --git a/autotests/reference/highlight.t2t.ref b/autotests/reference/highlight.t2t.ref
+deleted file mode 100644
+index 87bff65..0000000
+diff --git a/autotests/reference/highlight.tcl.ref b/autotests/reference/highlight.tcl.ref
+deleted file mode 100644
+index de12b4c..0000000
+diff --git a/autotests/reference/highlight.tex.ref b/autotests/reference/highlight.tex.ref
+deleted file mode 100644
+index bcd6926..0000000
+diff --git a/autotests/reference/highlight.tig.ref b/autotests/reference/highlight.tig.ref
+deleted file mode 100644
+index 056b891..0000000
+diff --git a/autotests/reference/highlight.wrl.ref b/autotests/reference/highlight.wrl.ref
+deleted file mode 100644
+index 0f2b724..0000000
+diff --git a/autotests/reference/highlight.xml.ref b/autotests/reference/highlight.xml.ref
+deleted file mode 100644
+index dde97a6..0000000
+diff --git a/autotests/reference/highlight.xsl.ref b/autotests/reference/highlight.xsl.ref
+deleted file mode 100644
+index 86c1736..0000000
+diff --git a/autotests/reference/highlight.y.ref b/autotests/reference/highlight.y.ref
+deleted file mode 100644
+index b3defa7..0000000
+diff --git a/autotests/reference/highlight.yang.ref b/autotests/reference/highlight.yang.ref
+deleted file mode 100644
+index d4708a6..0000000
+diff --git a/autotests/reference/highlight_lpc.c.ref b/autotests/reference/highlight_lpc.c.ref
+deleted file mode 100644
+index 474d5f0..0000000
+diff --git a/autotests/reference/highlight_ocaml.ml.ref b/autotests/reference/highlight_ocaml.ml.ref
+deleted file mode 100644
+index d036f0e..0000000
+diff --git a/autotests/reference/highlight_octave.m.ref b/autotests/reference/highlight_octave.m.ref
+deleted file mode 100644
+index 4b93a73..0000000
+diff --git a/autotests/reference/learnelixir.exs.ref b/autotests/reference/learnelixir.exs.ref
+deleted file mode 100644
+index d877463..0000000
+diff --git a/autotests/reference/light52_muldiv.vhdl.ref b/autotests/reference/light52_muldiv.vhdl.ref
+deleted file mode 100644
+index 11338ac..0000000
+diff --git a/autotests/reference/light52_tb.vhdl.ref b/autotests/reference/light52_tb.vhdl.ref
+deleted file mode 100644
+index b7a799b..0000000
+diff --git a/autotests/reference/meson.build.ref b/autotests/reference/meson.build.ref
+deleted file mode 100644
+index 75efe1a..0000000
+diff --git a/autotests/reference/modelines.py.ref b/autotests/reference/modelines.py.ref
+deleted file mode 100644
+index 59e5bf2..0000000
+diff --git a/autotests/reference/or1200_dc_fsm.v.ref b/autotests/reference/or1200_dc_fsm.v.ref
+deleted file mode 100644
+index 10a80e5..0000000
+diff --git a/autotests/reference/or1200_du.v.ref b/autotests/reference/or1200_du.v.ref
+deleted file mode 100644
+index a1e838c..0000000
+diff --git a/autotests/reference/preprocessor-bug363280.c.ref b/autotests/reference/preprocessor-bug363280.c.ref
+deleted file mode 100644
+index 4c23041..0000000
+diff --git a/autotests/reference/preprocessor-bug363280.cpp.ref b/autotests/reference/preprocessor-bug363280.cpp.ref
+deleted file mode 100644
+index 8025f16..0000000
+diff --git a/autotests/reference/review128925-1.css.ref b/autotests/reference/review128925-1.css.ref
+deleted file mode 100644
+index 136dd6f..0000000
+diff --git a/autotests/reference/review128925-1.scss.ref b/autotests/reference/review128925-1.scss.ref
+deleted file mode 100644
+index fee32c7..0000000
+diff --git a/autotests/reference/review128925-2.css.ref b/autotests/reference/review128925-2.css.ref
+deleted file mode 100644
+index 0bef602..0000000
+diff --git a/autotests/reference/review128925-2.scss.ref b/autotests/reference/review128925-2.scss.ref
+deleted file mode 100644
+index 082c1e4..0000000
+diff --git a/autotests/reference/review128935.html.ref b/autotests/reference/review128935.html.ref
+deleted file mode 100644
+index 0936f9c..0000000
+diff --git a/autotests/reference/test-iso.mod.ref b/autotests/reference/test-iso.mod.ref
+deleted file mode 100644
+index 027dfac..0000000
+diff --git a/autotests/reference/test-pim.mod.ref b/autotests/reference/test-pim.mod.ref
+deleted file mode 100644
+index 4fac4d1..0000000
+diff --git a/autotests/reference/test-r10.mod.ref b/autotests/reference/test-r10.mod.ref
+deleted file mode 100644
+index bc61067..0000000
+diff --git a/autotests/reference/test.Rd.ref b/autotests/reference/test.Rd.ref
+deleted file mode 100644
+index ae77db2..0000000
+diff --git a/autotests/reference/test.bash.ref b/autotests/reference/test.bash.ref
+deleted file mode 100644
+index adeaa9d..0000000
+diff --git a/autotests/reference/test.bb.ref b/autotests/reference/test.bb.ref
+deleted file mode 100644
+index f0ea3b8..0000000
+diff --git a/autotests/reference/test.c.ref b/autotests/reference/test.c.ref
+deleted file mode 100644
+index 61c3ca8..0000000
+diff --git a/autotests/reference/test.cil.ref b/autotests/reference/test.cil.ref
+deleted file mode 100644
+index cbc0125..0000000
+diff --git a/autotests/reference/test.coffee.ref b/autotests/reference/test.coffee.ref
+deleted file mode 100644
+index e499f72..0000000
+diff --git a/autotests/reference/test.css.ref b/autotests/reference/test.css.ref
+deleted file mode 100644
+index 26de9f8..0000000
+diff --git a/autotests/reference/test.desktop.ref b/autotests/reference/test.desktop.ref
+deleted file mode 100644
+index 12ca73f..0000000
+diff --git a/autotests/reference/test.diff.ref b/autotests/reference/test.diff.ref
+deleted file mode 100644
+index b3d7bd4..0000000
+diff --git a/autotests/reference/test.eml.ref b/autotests/reference/test.eml.ref
+deleted file mode 100644
+index 25de38c..0000000
+diff --git a/autotests/reference/test.fc.ref b/autotests/reference/test.fc.ref
+deleted file mode 100644
+index dee4455..0000000
+diff --git a/autotests/reference/test.frag.ref b/autotests/reference/test.frag.ref
+deleted file mode 100644
+index 1426b6e..0000000
+diff --git a/autotests/reference/test.htm.ref b/autotests/reference/test.htm.ref
+deleted file mode 100644
+index c3d98ff..0000000
+diff --git a/autotests/reference/test.ijs.ref b/autotests/reference/test.ijs.ref
+deleted file mode 100644
+index 30c9733..0000000
+diff --git a/autotests/reference/test.ini.ref b/autotests/reference/test.ini.ref
+deleted file mode 100644
+index f2d5e79..0000000
+diff --git a/autotests/reference/test.js.ref b/autotests/reference/test.js.ref
+deleted file mode 100644
+index ca23322..0000000
+diff --git a/autotests/reference/test.json.ref b/autotests/reference/test.json.ref
+deleted file mode 100644
+index b7f0e52..0000000
+diff --git a/autotests/reference/test.jsx.ref b/autotests/reference/test.jsx.ref
+deleted file mode 100644
+index e9eda2f..0000000
+diff --git a/autotests/reference/test.logcat.ref b/autotests/reference/test.logcat.ref
+deleted file mode 100644
+index e4c1c80..0000000
+diff --git a/autotests/reference/test.markdown.ref b/autotests/reference/test.markdown.ref
+deleted file mode 100644
+index aa5f06c..0000000
+diff --git a/autotests/reference/test.mib.ref b/autotests/reference/test.mib.ref
+deleted file mode 100644
+index a83156b..0000000
+diff --git a/autotests/reference/test.mm.ref b/autotests/reference/test.mm.ref
+deleted file mode 100644
+index 4412d36..0000000
+diff --git a/autotests/reference/test.mod.ref b/autotests/reference/test.mod.ref
+deleted file mode 100644
+index 027dfac..0000000
+diff --git a/autotests/reference/test.mss.ref b/autotests/reference/test.mss.ref
+deleted file mode 100644
+index f3f6ff7..0000000
+diff --git a/autotests/reference/test.py.ref b/autotests/reference/test.py.ref
+deleted file mode 100644
+index a226875..0000000
+diff --git a/autotests/reference/test.qdocconf.ref b/autotests/reference/test.qdocconf.ref
+deleted file mode 100644
+index a5e1727..0000000
+diff --git a/autotests/reference/test.qml.ref b/autotests/reference/test.qml.ref
+deleted file mode 100644
+index 6a84875..0000000
+diff --git a/autotests/reference/test.rexx.ref b/autotests/reference/test.rexx.ref
+deleted file mode 100644
+index 6e69ce4..0000000
+diff --git a/autotests/reference/test.rs.ref b/autotests/reference/test.rs.ref
+deleted file mode 100644
+index 9a27445..0000000
+diff --git a/autotests/reference/test.sieve.ref b/autotests/reference/test.sieve.ref
+deleted file mode 100644
+index a030180..0000000
+diff --git a/autotests/reference/test.sql.ref b/autotests/reference/test.sql.ref
+deleted file mode 100644
+index ba869cd..0000000
+diff --git a/autotests/reference/test.sql_oracle.ref b/autotests/reference/test.sql_oracle.ref
+deleted file mode 100644
+index d121a71..0000000
+diff --git a/autotests/reference/test.te.ref b/autotests/reference/test.te.ref
+deleted file mode 100644
+index 5b3998d..0000000
+diff --git a/autotests/reference/test.tex.ref b/autotests/reference/test.tex.ref
+deleted file mode 100644
+index 3f24c2a..0000000
+diff --git a/autotests/reference/test.yaml.ref b/autotests/reference/test.yaml.ref
+deleted file mode 100644
+index eeeabc0..0000000
+diff --git a/autotests/reference/test.zsh.ref b/autotests/reference/test.zsh.ref
+deleted file mode 100644
+index f8da406..0000000
+diff --git a/autotests/reference/usr.bin.apparmor-profile-test.ref b/autotests/reference/usr.bin.apparmor-profile-test.ref
+deleted file mode 100644
+index c55bd5c..0000000
+diff --git a/autotests/repository_benchmark.cpp b/autotests/repository_benchmark.cpp
+deleted file mode 100644
+index 80bba64..0000000
+diff --git a/autotests/syntaxrepository_test.cpp b/autotests/syntaxrepository_test.cpp
+deleted file mode 100644
+index 3dc654d..0000000
+diff --git a/autotests/test-config.h.in b/autotests/test-config.h.in
+deleted file mode 100644
+index 9e574d7..0000000
+diff --git a/autotests/testhighlighter.cpp b/autotests/testhighlighter.cpp
+deleted file mode 100644
+index fad0300..0000000
+diff --git a/autotests/theme_test.cpp b/autotests/theme_test.cpp
+deleted file mode 100644
+index 961cdb9..0000000
+diff --git a/autotests/update-reference-data.sh.in b/autotests/update-reference-data.sh.in
+deleted file mode 100755
+index 1b5e45e..0000000
+diff --git a/autotests/wildcardmatcher_test.cpp b/autotests/wildcardmatcher_test.cpp
+deleted file mode 100644
+index 8a2208a..0000000
+--
+2.20.1.windows.1
+
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0003-Add-qmake-Qbs-files-and-files-generated-by-CMake.patch b/src/libs/3rdparty/syntax-highlighting/patches/0003-Add-qmake-Qbs-files-and-files-generated-by-CMake.patch
new file mode 100644
index 0000000000..c35188fbec
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0003-Add-qmake-Qbs-files-and-files-generated-by-CMake.patch
@@ -0,0 +1,389 @@
+From c9f4bdaa0902c0fdb5ea750d11935e15777a090d Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:45:08 +0100
+Subject: [PATCH 3/6] Add qmake/Qbs files and files generated by CMake
+
+---
+ autogenerated/autogenerated.pri | 9 ++
+ autogenerated/ksyntaxhighlighting_version.h | 12 +++
+ autogenerated/src/lib/AbstractHighlighter | 1 +
+ autogenerated/src/lib/Definition | 1 +
+ autogenerated/src/lib/FoldingRegion | 1 +
+ autogenerated/src/lib/Format | 1 +
+ autogenerated/src/lib/Repository | 1 +
+ autogenerated/src/lib/State | 1 +
+ autogenerated/src/lib/SyntaxHighlighter | 1 +
+ autogenerated/src/lib/Theme | 1 +
+ .../src/lib/ksyntaxhighlighting_logging.cpp | 11 +++
+ .../src/lib/ksyntaxhighlighting_logging.h | 11 +++
+ data/data.pro | 11 +++
+ src/lib/ksyntaxhighlighting_export.h | 34 +++++++
+ syntax-highlighting.pro | 55 ++++++++++++
+ syntax-highlighting.qbs | 88 +++++++++++++++++++
+ syntax-highlighting_dependencies.pri | 3 +
+ 17 files changed, 242 insertions(+)
+ create mode 100644 autogenerated/autogenerated.pri
+ create mode 100644 autogenerated/ksyntaxhighlighting_version.h
+ create mode 100644 autogenerated/src/lib/AbstractHighlighter
+ create mode 100644 autogenerated/src/lib/Definition
+ create mode 100644 autogenerated/src/lib/FoldingRegion
+ create mode 100644 autogenerated/src/lib/Format
+ create mode 100644 autogenerated/src/lib/Repository
+ create mode 100644 autogenerated/src/lib/State
+ create mode 100644 autogenerated/src/lib/SyntaxHighlighter
+ create mode 100644 autogenerated/src/lib/Theme
+ create mode 100644 autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
+ create mode 100644 autogenerated/src/lib/ksyntaxhighlighting_logging.h
+ create mode 100644 data/data.pro
+ create mode 100644 src/lib/ksyntaxhighlighting_export.h
+ create mode 100644 syntax-highlighting.pro
+ create mode 100644 syntax-highlighting.qbs
+ create mode 100644 syntax-highlighting_dependencies.pri
+
+diff --git a/autogenerated/autogenerated.pri b/autogenerated/autogenerated.pri
+new file mode 100644
+index 0000000..aee620a
+--- /dev/null
++++ b/autogenerated/autogenerated.pri
+@@ -0,0 +1,9 @@
++INCLUDEPATH *= $$PWD/src/lib
++INCLUDEPATH *= $$PWD
++
++SOURCES += \
++ $$PWD/src/lib/ksyntaxhighlighting_logging.cpp
++
++HEADERS += \
++ $$PWD/ksyntaxhighlighting_version.h \
++ $$PWD/src/lib/ksyntaxhighlighting_logging.h
+diff --git a/autogenerated/ksyntaxhighlighting_version.h b/autogenerated/ksyntaxhighlighting_version.h
+new file mode 100644
+index 0000000..bd31a4d
+--- /dev/null
++++ b/autogenerated/ksyntaxhighlighting_version.h
+@@ -0,0 +1,12 @@
++// This file was generated by ecm_setup_version(): DO NOT EDIT!
++
++#ifndef SyntaxHighlighting_VERSION_H
++#define SyntaxHighlighting_VERSION_H
++
++#define SyntaxHighlighting_VERSION_STRING "5.52.0"
++#define SyntaxHighlighting_VERSION_MAJOR 5
++#define SyntaxHighlighting_VERSION_MINOR 52
++#define SyntaxHighlighting_VERSION_PATCH 0
++#define SyntaxHighlighting_VERSION ((5<<16)|(52<<8)|(0))
++
++#endif
+diff --git a/autogenerated/src/lib/AbstractHighlighter b/autogenerated/src/lib/AbstractHighlighter
+new file mode 100644
+index 0000000..b787873
+--- /dev/null
++++ b/autogenerated/src/lib/AbstractHighlighter
+@@ -0,0 +1 @@
++#include "abstracthighlighter.h"
+diff --git a/autogenerated/src/lib/Definition b/autogenerated/src/lib/Definition
+new file mode 100644
+index 0000000..2c3241f
+--- /dev/null
++++ b/autogenerated/src/lib/Definition
+@@ -0,0 +1 @@
++#include "definition.h"
+diff --git a/autogenerated/src/lib/FoldingRegion b/autogenerated/src/lib/FoldingRegion
+new file mode 100644
+index 0000000..005b829
+--- /dev/null
++++ b/autogenerated/src/lib/FoldingRegion
+@@ -0,0 +1 @@
++#include "foldingregion.h"
+diff --git a/autogenerated/src/lib/Format b/autogenerated/src/lib/Format
+new file mode 100644
+index 0000000..b0d6a10
+--- /dev/null
++++ b/autogenerated/src/lib/Format
+@@ -0,0 +1 @@
++#include "format.h"
+diff --git a/autogenerated/src/lib/Repository b/autogenerated/src/lib/Repository
+new file mode 100644
+index 0000000..189dbc2
+--- /dev/null
++++ b/autogenerated/src/lib/Repository
+@@ -0,0 +1 @@
++#include "repository.h"
+diff --git a/autogenerated/src/lib/State b/autogenerated/src/lib/State
+new file mode 100644
+index 0000000..e148d70
+--- /dev/null
++++ b/autogenerated/src/lib/State
+@@ -0,0 +1 @@
++#include "state.h"
+diff --git a/autogenerated/src/lib/SyntaxHighlighter b/autogenerated/src/lib/SyntaxHighlighter
+new file mode 100644
+index 0000000..b429824
+--- /dev/null
++++ b/autogenerated/src/lib/SyntaxHighlighter
+@@ -0,0 +1 @@
++#include "syntaxhighlighter.h"
+diff --git a/autogenerated/src/lib/Theme b/autogenerated/src/lib/Theme
+new file mode 100644
+index 0000000..34a3e98
+--- /dev/null
++++ b/autogenerated/src/lib/Theme
+@@ -0,0 +1 @@
++#include "theme.h"
+diff --git a/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp b/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
+new file mode 100644
+index 0000000..4082ac4
+--- /dev/null
++++ b/autogenerated/src/lib/ksyntaxhighlighting_logging.cpp
+@@ -0,0 +1,11 @@
++// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
++
++#include "ksyntaxhighlighting_logging.h"
++
++ namespace KSyntaxHighlighting {
++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
++Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting", QtInfoMsg)
++#else
++Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting")
++#endif
++}
+diff --git a/autogenerated/src/lib/ksyntaxhighlighting_logging.h b/autogenerated/src/lib/ksyntaxhighlighting_logging.h
+new file mode 100644
+index 0000000..c351b2c
+--- /dev/null
++++ b/autogenerated/src/lib/ksyntaxhighlighting_logging.h
+@@ -0,0 +1,11 @@
++// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
++
++#ifndef ECM_QLOGGINGCATEGORY_KSYNTAXHIGHLIGHTING_LOG_KSYNTAXHIGHLIGHTING_LOGGING_H
++#define ECM_QLOGGINGCATEGORY_KSYNTAXHIGHLIGHTING_LOG_KSYNTAXHIGHLIGHTING_LOGGING_H
++
++#include <QLoggingCategory>
++ namespace KSyntaxHighlighting {
++Q_DECLARE_LOGGING_CATEGORY(Log)
++}
++
++#endif
+diff --git a/data/data.pro b/data/data.pro
+new file mode 100644
+index 0000000..1028ea1
+--- /dev/null
++++ b/data/data.pro
+@@ -0,0 +1,11 @@
++TEMPLATE = aux
++
++include(../../../../../qtcreator.pri)
++
++STATIC_BASE = $$PWD
++STATIC_OUTPUT_BASE = $$IDE_DATA_PATH/generic-highlighter
++STATIC_INSTALL_BASE = $$INSTALL_DATA_PATH/generic-highlighter
++
++STATIC_FILES += $$files($$PWD/syntax/*, true)
++
++include(../../../../../qtcreatordata.pri)
+diff --git a/src/lib/ksyntaxhighlighting_export.h b/src/lib/ksyntaxhighlighting_export.h
+new file mode 100644
+index 0000000..a39adb5
+--- /dev/null
++++ b/src/lib/ksyntaxhighlighting_export.h
+@@ -0,0 +1,34 @@
++/****************************************************************************
++**
++** Copyright (C) 2018 The Qt Company Ltd.
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of Qt Creator.
++**
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and The Qt Company. For licensing terms
++** and conditions see https://www.qt.io/terms-conditions. For further
++** information use the contact form at https://www.qt.io/contact-us.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3 as published by the Free Software
++** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-3.0.html.
++**
++****************************************************************************/
++
++#pragma once
++
++#include <QtGlobal>
++
++#if defined(KSYNTAXHIGHLIGHTING_LIBRARY)
++# define KSYNTAXHIGHLIGHTING_EXPORT Q_DECL_EXPORT
++#else
++# define KSYNTAXHIGHLIGHTING_EXPORT Q_DECL_IMPORT
++#endif
+diff --git a/syntax-highlighting.pro b/syntax-highlighting.pro
+new file mode 100644
+index 0000000..38127e1
+--- /dev/null
++++ b/syntax-highlighting.pro
+@@ -0,0 +1,55 @@
++include(../../../qtcreatorlibrary.pri)
++include(autogenerated/autogenerated.pri)
++
++QT += network
++
++DEFINES += KSYNTAXHIGHLIGHTING_LIBRARY
++
++RESOURCES += \
++ data/themes/theme-data.qrc
++
++HEADERS += \
++ src/lib/abstracthighlighter.h \
++ src/lib/abstracthighlighter_p.h \
++ src/lib/context_p.h \
++ src/lib/contextswitch_p.h \
++ src/lib/definition.h \
++ src/lib/definition_p.h \
++ src/lib/definitiondownloader.h \
++ src/lib/definitionref_p.h \
++ src/lib/foldingregion.h \
++ src/lib/format.h \
++ src/lib/format_p.h \
++ src/lib/htmlhighlighter.h \
++ src/lib/keywordlist_p.h \
++ src/lib/ksyntaxhighlighting_export.h \
++ src/lib/matchresult_p.h \
++ src/lib/repository.h \
++ src/lib/repository_p.h \
++ src/lib/rule_p.h \
++ src/lib/state.h \
++ src/lib/state_p.h \
++ src/lib/syntaxhighlighter.h \
++ src/lib/textstyledata_p.h \
++ src/lib/theme.h \
++ src/lib/themedata_p.h \
++ src/lib/wildcardmatcher_p.h \
++ src/lib/xml_p.h \
++
++SOURCES += \
++ src/lib/abstracthighlighter.cpp \
++ src/lib/context.cpp \
++ src/lib/contextswitch.cpp \
++ src/lib/definition.cpp \
++ src/lib/definitiondownloader.cpp \
++ src/lib/foldingregion.cpp \
++ src/lib/format.cpp \
++ src/lib/htmlhighlighter.cpp \
++ src/lib/keywordlist.cpp \
++ src/lib/repository.cpp \
++ src/lib/rule.cpp \
++ src/lib/state.cpp \
++ src/lib/syntaxhighlighter.cpp \
++ src/lib/theme.cpp \
++ src/lib/themedata.cpp \
++ src/lib/wildcardmatcher.cpp \
+diff --git a/syntax-highlighting.qbs b/syntax-highlighting.qbs
+new file mode 100644
+index 0000000..248ebe0
+--- /dev/null
++++ b/syntax-highlighting.qbs
+@@ -0,0 +1,88 @@
++import qbs 1.0
++import qbs.File
++import qbs.FileInfo
++import qbs.Environment
++
++Project {
++ QtcDevHeaders {
++ productName: "syntax-highlighting (3rd party)"
++ baseDir: sourceDirectory + "/src/lib"
++ }
++ QtcDevHeaders {
++ productName: "syntax-highlighting autogenerated (3rd party)"
++ baseDir: sourceDirectory + "/autogenerated/src/lib"
++ Group {
++ prefix: baseDir + '/'
++ files: [
++ "AbstractHighlighter",
++ "Definition",
++ "FoldingRegion",
++ "Format",
++ "Repository",
++ "State",
++ "SyntaxHighlighter",
++ "Theme"
++ ]
++ qbs.install: true
++ qbs.installDir: qtc.ide_include_path + '/' + FileInfo.fileName(product.sourceDirectory)
++ qbs.installSourceBase: baseDir
++ }
++ }
++
++ QtcLibrary {
++ name: "KSyntaxHighlighting"
++
++ cpp.defines: base.concat("KSYNTAXHIGHLIGHTING_LIBRARY")
++ cpp.includePaths: [
++ product.sourceDirectory + "/src/lib/",
++ product.sourceDirectory + "/autogenerated/src/lib/",
++ product.sourceDirectory + "/autogenerated/"
++ ]
++
++ Depends { name: "Qt.gui" }
++ Depends { name: "Qt.network" }
++
++ Group {
++ name: "lib"
++ prefix: "src/lib/"
++ files: [
++ "*.h",
++ "*.cpp"
++ ]
++ }
++
++ Group {
++ name: "KSyntaxHighlighting data"
++ qbs.install: true
++ qbs.installDir: qtc.ide_data_path + "/generic-highlighter/"
++ qbs.installSourceBase: project.ide_source_tree + "/src/libs/3rdparty/syntax-highlighting/data/"
++ prefix: project.ide_source_tree + "/src/libs/3rdparty/syntax-highlighting/data/"
++ files: [
++ "syntax/**/*"
++ ]
++ }
++
++ Group {
++ name: "autogenerated lib"
++ prefix: "autogenerated/src/lib/"
++ files: [
++ "*.h",
++ "*.cpp"
++ ]
++ }
++
++ Group {
++ name: "theme data"
++ prefix: "data/themes/"
++ files: [ "theme-data.qrc" ]
++ }
++
++ Export {
++ Depends { name: "cpp" }
++ cpp.includePaths: [
++ product.sourceDirectory + "/src/lib/",
++ product.sourceDirectory + "/autogenerated/src/lib/",
++ ]
++ }
++ }
++}
+diff --git a/syntax-highlighting_dependencies.pri b/syntax-highlighting_dependencies.pri
+new file mode 100644
+index 0000000..f2fd3e6
+--- /dev/null
++++ b/syntax-highlighting_dependencies.pri
+@@ -0,0 +1,3 @@
++QTC_LIB_NAME = KSyntaxHighlighting
++INCLUDEPATH *= $$PWD/src/lib
++INCLUDEPATH *= $$PWD/autogenerated/src/lib
+--
+2.20.1.windows.1
+
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0004-Compile-with-namespaced-Qt.patch b/src/libs/3rdparty/syntax-highlighting/patches/0004-Compile-with-namespaced-Qt.patch
new file mode 100644
index 0000000000..1c37d3158e
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0004-Compile-with-namespaced-Qt.patch
@@ -0,0 +1,281 @@
+From 916af0204a45c91092e53241e6a867cadb9dedec Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:21:57 +0100
+Subject: [PATCH 4/6] Compile with namespaced Qt
+
+---
+ src/lib/abstracthighlighter.h | 4 ++++
+ src/lib/abstracthighlighter_p.h | 2 ++
+ src/lib/context_p.h | 2 ++
+ src/lib/definition.h | 4 ++++
+ src/lib/foldingregion.h | 2 ++
+ src/lib/format.h | 5 ++++-
+ src/lib/htmlhighlighter.h | 2 ++
+ src/lib/keywordlist_p.h | 2 ++
+ src/lib/repository.h | 2 ++
+ src/lib/repository_p.h | 2 ++
+ src/lib/rule_p.h | 2 ++
+ src/lib/state.h | 2 ++
+ src/lib/theme.h | 2 ++
+ src/lib/themedata_p.h | 2 ++
+ src/lib/wildcardmatcher.cpp | 2 +-
+ src/lib/wildcardmatcher_p.h | 4 ++++
+ 16 files changed, 39 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/abstracthighlighter.h b/src/lib/abstracthighlighter.h
+index 056f65b..2b88729 100644
+--- a/src/lib/abstracthighlighter.h
++++ b/src/lib/abstracthighlighter.h
+@@ -30,7 +30,9 @@
+
+ #include <memory>
+
++QT_BEGIN_NAMESPACE
+ class QString;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+@@ -186,6 +188,8 @@ private:
+ };
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_INTERFACE(KSyntaxHighlighting::AbstractHighlighter, "org.kde.SyntaxHighlighting.AbstractHighlighter")
++QT_END_NAMESPACE
+
+ #endif // KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_H
+diff --git a/src/lib/abstracthighlighter_p.h b/src/lib/abstracthighlighter_p.h
+index 1690eb0..bdfdf23 100644
+--- a/src/lib/abstracthighlighter_p.h
++++ b/src/lib/abstracthighlighter_p.h
+@@ -27,7 +27,9 @@
+ #include "definition.h"
+ #include "theme.h"
+
++QT_BEGIN_NAMESPACE
+ class QStringList;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/context_p.h b/src/lib/context_p.h
+index 3e3ab97..a034d0e 100644
+--- a/src/lib/context_p.h
++++ b/src/lib/context_p.h
+@@ -34,7 +34,9 @@
+
+ #include <vector>
+
++QT_BEGIN_NAMESPACE
+ class QXmlStreamReader;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/definition.h b/src/lib/definition.h
+index 25996dd..6f0dba9 100644
+--- a/src/lib/definition.h
++++ b/src/lib/definition.h
+@@ -31,10 +31,12 @@
+
+ #include <memory>
+
++QT_BEGIN_NAMESPACE
+ class QChar;
+ class QString;
+ class QStringList;
+ template <typename T> class QVector;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+@@ -391,6 +393,8 @@ private:
+
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Definition, Q_MOVABLE_TYPE);
++QT_END_NAMESPACE
+
+ #endif
+diff --git a/src/lib/foldingregion.h b/src/lib/foldingregion.h
+index baf65d1..074b947 100644
+--- a/src/lib/foldingregion.h
++++ b/src/lib/foldingregion.h
+@@ -101,6 +101,8 @@ private:
+
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::FoldingRegion, Q_PRIMITIVE_TYPE);
++QT_END_NAMESPACE
+
+ #endif
+diff --git a/src/lib/format.h b/src/lib/format.h
+index ba85f0d..24c58e7 100644
+--- a/src/lib/format.h
++++ b/src/lib/format.h
+@@ -30,10 +30,11 @@
+ #include <QExplicitlySharedDataPointer>
+ #include <QTypeInfo>
+
+-
++QT_BEGIN_NAMESPACE
+ class QColor;
+ class QString;
+ class QXmlStreamReader;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+@@ -144,6 +145,8 @@ private:
+ };
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Format, Q_MOVABLE_TYPE);
++QT_END_NAMESPACE
+
+ #endif // KSYNTAXHIGHLIGHTING_FORMAT_H
+diff --git a/src/lib/htmlhighlighter.h b/src/lib/htmlhighlighter.h
+index 22d33ad..b7eda02 100644
+--- a/src/lib/htmlhighlighter.h
++++ b/src/lib/htmlhighlighter.h
+@@ -32,8 +32,10 @@
+
+ #include <memory>
+
++QT_BEGIN_NAMESPACE
+ class QFile;
+ class QTextStream;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/keywordlist_p.h b/src/lib/keywordlist_p.h
+index fa70f11..8c41aab 100644
+--- a/src/lib/keywordlist_p.h
++++ b/src/lib/keywordlist_p.h
+@@ -30,7 +30,9 @@
+
+ #include <vector>
+
++QT_BEGIN_NAMESPACE
+ class QXmlStreamReader;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/repository.h b/src/lib/repository.h
+index 2c32d02..c35da5e 100644
+--- a/src/lib/repository.h
++++ b/src/lib/repository.h
+@@ -29,8 +29,10 @@
+ #include <qglobal.h>
+ #include <memory>
+
++QT_BEGIN_NAMESPACE
+ class QString;
+ template <typename T> class QVector;
++QT_END_NAMESPACE
+
+ /**
+ * @namespace KSyntaxHighlighting
+diff --git a/src/lib/repository_p.h b/src/lib/repository_p.h
+index da765a2..9db876b 100644
+--- a/src/lib/repository_p.h
++++ b/src/lib/repository_p.h
+@@ -27,7 +27,9 @@
+ #include <QHash>
+ #include <QVector>
+
++QT_BEGIN_NAMESPACE
+ class QString;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/rule_p.h b/src/lib/rule_p.h
+index eccf0df..538fded 100644
+--- a/src/lib/rule_p.h
++++ b/src/lib/rule_p.h
+@@ -38,7 +38,9 @@
+
+ #include <memory>
+
++QT_BEGIN_NAMESPACE
+ class QXmlStreamReader;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+diff --git a/src/lib/state.h b/src/lib/state.h
+index c6e5344..fce4bc7 100644
+--- a/src/lib/state.h
++++ b/src/lib/state.h
+@@ -79,6 +79,8 @@ private:
+
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::State, Q_MOVABLE_TYPE);
++QT_END_NAMESPACE
+
+ #endif // KSYNTAXHIGHLIGHTING_STATE_H
+diff --git a/src/lib/theme.h b/src/lib/theme.h
+index 5277429..adb8431 100644
+--- a/src/lib/theme.h
++++ b/src/lib/theme.h
+@@ -371,6 +371,8 @@ private:
+
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::Theme, Q_MOVABLE_TYPE);
++QT_END_NAMESPACE
+
+ #endif // KSYNTAXHIGHLIGHTING_THEME_H
+diff --git a/src/lib/themedata_p.h b/src/lib/themedata_p.h
+index 68cb873..3b5f463 100644
+--- a/src/lib/themedata_p.h
++++ b/src/lib/themedata_p.h
+@@ -163,6 +163,8 @@ private:
+
+ }
+
++QT_BEGIN_NAMESPACE
+ Q_DECLARE_TYPEINFO(KSyntaxHighlighting::TextStyleData, Q_MOVABLE_TYPE);
++QT_END_NAMESPACE
+
+ #endif // KSYNTAXHIGHLIGHTING_THEMEDATA_P_H
+diff --git a/src/lib/wildcardmatcher.cpp b/src/lib/wildcardmatcher.cpp
+index 963e78d..167295a 100644
+--- a/src/lib/wildcardmatcher.cpp
++++ b/src/lib/wildcardmatcher.cpp
+@@ -79,5 +79,5 @@ static bool exactMatch(const QString &candidate, const QString &wildcard, int ca
+ bool WildcardMatcher::exactMatch(const QString &candidate, const QString &wildcard,
+ bool caseSensitive)
+ {
+- return exactMatch(candidate, wildcard, candidate.length() - 1, wildcard.length() - 1, caseSensitive);
++ return ::exactMatch(candidate, wildcard, candidate.length() - 1, wildcard.length() - 1, caseSensitive);
+ }
+diff --git a/src/lib/wildcardmatcher_p.h b/src/lib/wildcardmatcher_p.h
+index 823dbd5..016b10f 100644
+--- a/src/lib/wildcardmatcher_p.h
++++ b/src/lib/wildcardmatcher_p.h
+@@ -24,7 +24,11 @@
+ #ifndef KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_P_H
+ #define KSYNTAXHIGHLIGHTING_WILDCARDMATCHER_P_H
+
++#include <QtGlobal>
++
++QT_BEGIN_NAMESPACE
+ class QString;
++QT_END_NAMESPACE
+
+ namespace KSyntaxHighlighting {
+
+--
+2.20.1.windows.1
+
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0005-Prevent-assertion-in-RegExpr-doLoad.patch b/src/libs/3rdparty/syntax-highlighting/patches/0005-Prevent-assertion-in-RegExpr-doLoad.patch
new file mode 100644
index 0000000000..7941c718df
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0005-Prevent-assertion-in-RegExpr-doLoad.patch
@@ -0,0 +1,29 @@
+From 3c05e92c71f6675fa2071036dafbc8d337bd2d01 Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:27:46 +0100
+Subject: [PATCH 5/6] Prevent assertion in RegExpr::doLoad
+
+---
+ src/lib/rule.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/rule.cpp b/src/lib/rule.cpp
+index a201375..c48753b 100644
+--- a/src/lib/rule.cpp
++++ b/src/lib/rule.cpp
+@@ -575,7 +575,11 @@ bool RegExpr::doLoad(QXmlStreamReader& reader)
+ }
+
+ // always using m_regexp.isValid() would be better, but parses the regexp and thus is way too expensive for release builds
+- Q_ASSERT(m_regexp.isValid());
++
++ if (Log().isDebugEnabled()) {
++ if (!m_regexp.isValid())
++ qCDebug(Log) << "Invalid regexp:" << m_regexp.pattern();
++ }
+ return !m_regexp.pattern().isEmpty();
+ }
+
+--
+2.20.1.windows.1
+
diff --git a/src/libs/3rdparty/syntax-highlighting/patches/0006-Syntax-Highlighter-return-all-definitions-for-a-file.patch b/src/libs/3rdparty/syntax-highlighting/patches/0006-Syntax-Highlighter-return-all-definitions-for-a-file.patch
new file mode 100644
index 0000000000..b9de66121c
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/patches/0006-Syntax-Highlighter-return-all-definitions-for-a-file.patch
@@ -0,0 +1,101 @@
+From 4b64058fe7d788ac79c16a08b280ce05d500e9fb Mon Sep 17 00:00:00 2001
+From: Alessandro Portale <alessandro.portale@qt.io>
+Date: Tue, 12 Feb 2019 19:32:54 +0100
+Subject: [PATCH 6/6] Syntax Highlighter: return all definitions for a file
+ name/mimetype
+
+Can be used to create user controls to switch between
+multiple definitions for a file or mime type.
+
+Change-Id: I5fd3744db1e819d0d6f8448a53adaf9d2c7c168d
+Reviewed-by: Christian Stenger <christian.stenger@qt.io>
+---
+ src/lib/repository.cpp | 17 +++++++++++++----
+ src/lib/repository.h | 12 ++++++++++++
+ 2 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/src/lib/repository.cpp b/src/lib/repository.cpp
+index 6b2fabd..922225a 100644
+--- a/src/lib/repository.cpp
++++ b/src/lib/repository.cpp
+@@ -78,7 +78,7 @@ Definition Repository::definitionForName(const QString& defName) const
+ return d->m_defs.value(defName);
+ }
+
+-static Definition bestCandidate(QVector<Definition>& candidates)
++static Definition bestCandidate(QVector<Definition> &&candidates)
+ {
+ if (candidates.isEmpty())
+ return Definition();
+@@ -91,6 +91,11 @@ static Definition bestCandidate(QVector<Definition>& candidates)
+ }
+
+ Definition Repository::definitionForFileName(const QString& fileName) const
++{
++ return bestCandidate(definitionsForFileName(fileName));
++}
++
++QVector<Definition> Repository::definitionsForFileName(const QString &fileName) const
+ {
+ QFileInfo fi(fileName);
+ const auto name = fi.fileName();
+@@ -106,10 +111,15 @@ Definition Repository::definitionForFileName(const QString& fileName) const
+ }
+ }
+
+- return bestCandidate(candidates);
++ return candidates;
+ }
+
+ Definition Repository::definitionForMimeType(const QString& mimeType) const
++{
++ return bestCandidate(definitionsForMimeType(mimeType));
++}
++
++QVector<Definition> Repository::definitionsForMimeType(const QString &mimeType) const
+ {
+ QVector<Definition> candidates;
+ for (auto it = d->m_defs.constBegin(); it != d->m_defs.constEnd(); ++it) {
+@@ -121,8 +131,7 @@ Definition Repository::definitionForMimeType(const QString& mimeType) const
+ }
+ }
+ }
+-
+- return bestCandidate(candidates);
++ return candidates;
+ }
+
+ QVector<Definition> Repository::definitions() const
+diff --git a/src/lib/repository.h b/src/lib/repository.h
+index c35da5e..e4e9bed 100644
+--- a/src/lib/repository.h
++++ b/src/lib/repository.h
+@@ -166,6 +166,13 @@ public:
+ */
+ Definition definitionForFileName(const QString &fileName) const;
+
++ /**
++ * Returns all Definition%s for the file named @p fileName.
++ * The match is performed based on the \e extensions and @e mimetype of
++ * the definition files.
++ */
++ QVector<Definition> definitionsForFileName(const QString &fileName) const;
++
+ /**
+ * Returns the best matching Definition to the type named @p mimeType
+ *
+@@ -176,6 +183,11 @@ public:
+ */
+ Definition definitionForMimeType(const QString &mimeType) const;
+
++ /**
++ * Returns all Definition%s to the type named @p mimeType
++ */
++ QVector<Definition> definitionsForMimeType(const QString &mimeType) const;
++
+ /**
+ * Returns all available Definition%s.
+ * Definition%ss are ordered by translated section and translated names,
+--
+2.20.1.windows.1
+
diff --git a/src/libs/clangsupport/commandlinebuilder.h b/src/libs/clangsupport/commandlinebuilder.h
index 03d042322d..aa384f1180 100644
--- a/src/libs/clangsupport/commandlinebuilder.h
+++ b/src/libs/clangsupport/commandlinebuilder.h
@@ -35,12 +35,15 @@
namespace ClangBackEnd {
+enum class InputFileType : unsigned char { Header, Source };
+
template<typename ProjectInfo, typename OutputContainer = Utils::SmallStringVector>
class CommandLineBuilder
{
public:
CommandLineBuilder(const ProjectInfo &projectInfo,
const Utils::SmallStringVector &toolChainArguments = {},
+ InputFileType sourceType = InputFileType::Header,
FilePathView sourcePath = {},
FilePathView outputPath = {},
FilePathView includePchPath = {})
@@ -49,9 +52,9 @@ public:
addCompiler(projectInfo.language);
addToolChainArguments(toolChainArguments);
- addLanguage(projectInfo);
+ addLanguage(projectInfo, sourceType);
addLanguageVersion(projectInfo);
- addNoStdIncAndNoStdLibInc();
+ addNoStdIncAndNoStdLibInc(projectInfo.language);
addCompilerMacros(projectInfo.compilerMacros);
addProjectIncludeSearchPaths(
sortedIncludeSearchPaths(projectInfo.projectIncludeSearchPaths));
@@ -76,26 +79,27 @@ public:
commandLine.emplace_back(argument);
}
- static const char *language(const ProjectInfo &projectInfo)
+ static const char *language(const ProjectInfo &projectInfo, InputFileType sourceType)
{
switch (projectInfo.language) {
case Utils::Language::C:
if (projectInfo.languageExtension && Utils::LanguageExtension::ObjectiveC)
- return "objective-c-header";
+ return sourceType == InputFileType::Header ? "objective-c-header" : "objective-c";
- return "c-header";
+ return sourceType == InputFileType::Header ? "c-header" : "c";
case Utils::Language::Cxx:
if (projectInfo.languageExtension && Utils::LanguageExtension::ObjectiveC)
- return "objective-c++-header";
+ return sourceType == InputFileType::Header ? "objective-c++-header"
+ : "objective-c++";
}
- return "c++-header";
+ return sourceType == InputFileType::Header ? "c++-header" : "c++";
}
- void addLanguage(const ProjectInfo &projectInfo)
+ void addLanguage(const ProjectInfo &projectInfo, InputFileType sourceType)
{
commandLine.emplace_back("-x");
- commandLine.emplace_back(language(projectInfo));
+ commandLine.emplace_back(language(projectInfo, sourceType));
}
const char *standardLanguageVersion(Utils::LanguageVersion languageVersion)
@@ -108,7 +112,7 @@ public:
case Utils::LanguageVersion::C11:
return "-std=c11";
case Utils::LanguageVersion::C18:
- return "-std=c18";
+ return "-std=c17";
case Utils::LanguageVersion::CXX98:
return "-std=c++98";
case Utils::LanguageVersion::CXX03:
@@ -136,7 +140,7 @@ public:
case Utils::LanguageVersion::C11:
return "-std=gnu11";
case Utils::LanguageVersion::C18:
- return "-std=gnu18";
+ return "-std=gnu17";
case Utils::LanguageVersion::CXX98:
return "-std=gnu++98";
case Utils::LanguageVersion::CXX03:
@@ -268,10 +272,11 @@ public:
}
}
- void addNoStdIncAndNoStdLibInc()
+ void addNoStdIncAndNoStdLibInc(Utils::Language language)
{
commandLine.emplace_back("-nostdinc");
- commandLine.emplace_back("-nostdinc++");
+ if (language == Utils::Language::Cxx)
+ commandLine.emplace_back("-nostdinc++");
}
public:
diff --git a/src/libs/clangsupport/progresscounter.h b/src/libs/clangsupport/progresscounter.h
index fbdc9dda45..449754f914 100644
--- a/src/libs/clangsupport/progresscounter.h
+++ b/src/libs/clangsupport/progresscounter.h
@@ -26,6 +26,7 @@
#pragma once
#include <functional>
+#include <mutex>
namespace ClangBackEnd {
@@ -33,6 +34,7 @@ class ProgressCounter
{
public:
using SetProgressCallback = std::function<void(int, int)>;
+ using Lock = std::lock_guard<std::mutex>;
ProgressCounter(SetProgressCallback &&progressCallback)
: m_progressCallback(std::move(progressCallback))
@@ -40,6 +42,8 @@ public:
void addTotal(int total)
{
+ Lock lock(m_mutex);
+
if (total) {
m_total += total;
@@ -49,6 +53,8 @@ public:
void removeTotal(int total)
{
+ Lock lock(m_mutex);
+
if (total) {
m_total -= total;
@@ -58,6 +64,8 @@ public:
void addProgress(int progress)
{
+ Lock lock(m_mutex);
+
if (progress) {
m_progress += progress;
@@ -65,27 +73,33 @@ public:
}
}
- void sendProgress()
+ int total() const
{
- m_progressCallback(m_progress, m_total);
+ Lock lock(m_mutex);
- if (m_progress >= m_total) {
- m_progress = 0;
- m_total = 0;
- }
+ return m_total;
}
- int total() const
+ int progress() const
{
+ Lock lock(m_mutex);
+
return m_total;
}
- int progress() const
+private:
+ void sendProgress()
{
- return m_total;
+ m_progressCallback(m_progress, m_total);
+
+ if (m_progress >= m_total) {
+ m_progress = 0;
+ m_total = 0;
+ }
}
private:
+ mutable std::mutex m_mutex;
std::function<void(int, int)> m_progressCallback;
int m_progress = 0;
int m_total = 0;
diff --git a/src/libs/languageserverprotocol/lsptypes.cpp b/src/libs/languageserverprotocol/lsptypes.cpp
index 41f5eb07bd..2b3e2628b3 100644
--- a/src/libs/languageserverprotocol/lsptypes.cpp
+++ b/src/libs/languageserverprotocol/lsptypes.cpp
@@ -27,14 +27,15 @@
#include "lsputils.h"
#include <utils/mimetypes/mimedatabase.h>
+#include <utils/textutils.h>
+#include <QFile>
#include <QHash>
-#include <QTextBlock>
-#include <QTextDocument>
#include <QJsonArray>
#include <QMap>
+#include <QTextBlock>
+#include <QTextDocument>
#include <QVector>
-#include <QFile>
namespace LanguageServerProtocol {
@@ -340,6 +341,24 @@ Range::Range(const Position &start, const Position &end)
setEnd(end);
}
+Range::Range(const QTextCursor &cursor)
+{
+ int line, character = 0;
+ Utils::Text::convertPosition(cursor.document(), cursor.selectionStart(), &line, &character);
+ if (line <= 0 || character <= 0)
+ return;
+ setStart(Position(line - 1, character - 1));
+ Utils::Text::convertPosition(cursor.document(), cursor.selectionEnd(), &line, &character);
+ if (line <= 0 || character <= 0)
+ return;
+ setEnd(Position(line - 1, character - 1));
+}
+
+bool Range::overlaps(const Range &range) const
+{
+ return contains(range.start()) || contains(range.end());
+}
+
bool DocumentFilter::applies(const Utils::FileName &fileName, const Utils::MimeType &mimeType) const
{
if (Utils::optional<QString> _scheme = scheme()) {
diff --git a/src/libs/languageserverprotocol/lsptypes.h b/src/libs/languageserverprotocol/lsptypes.h
index 5175255a13..9fe9a47a63 100644
--- a/src/libs/languageserverprotocol/lsptypes.h
+++ b/src/libs/languageserverprotocol/lsptypes.h
@@ -100,6 +100,7 @@ class LANGUAGESERVERPROTOCOL_EXPORT Range : public JsonObject
public:
Range() = default;
Range(const Position &start, const Position &end);
+ explicit Range(const QTextCursor &cursor);
using JsonObject::JsonObject;
// The range's start position.
@@ -111,6 +112,7 @@ public:
void setEnd(const Position &end) { insert(endKey, end); }
bool contains(const Position &pos) const { return start() <= pos && pos <= end(); }
+ bool overlaps(const Range &range) const;
bool isValid(QStringList *error) const override
{ return check<Position>(error, startKey) && check<Position>(error, endKey); }
diff --git a/src/libs/utils/jsontreeitem.cpp b/src/libs/utils/jsontreeitem.cpp
new file mode 100644
index 0000000000..a70f5631ec
--- /dev/null
+++ b/src/libs/utils/jsontreeitem.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#include "jsontreeitem.h"
+
+#include <QJsonArray>
+#include <QJsonObject>
+
+Utils::JsonTreeItem::JsonTreeItem(const QString &displayName, const QJsonValue &value)
+ : m_name(displayName)
+ , m_value(value)
+{ }
+
+static QString typeName(QJsonValue::Type type)
+{
+ switch (type) {
+ case QJsonValue::Null:
+ return Utils::JsonTreeItem::tr("Null");
+ case QJsonValue::Bool:
+ return Utils::JsonTreeItem::tr("Bool");
+ case QJsonValue::Double:
+ return Utils::JsonTreeItem::tr("Double");
+ case QJsonValue::String:
+ return Utils::JsonTreeItem::tr("String");
+ case QJsonValue::Array:
+ return Utils::JsonTreeItem::tr("Array");
+ case QJsonValue::Object:
+ return Utils::JsonTreeItem::tr("Object");
+ case QJsonValue::Undefined:
+ return Utils::JsonTreeItem::tr("Undefined");
+ }
+ return {};
+}
+
+QVariant Utils::JsonTreeItem::data(int column, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return {};
+ if (column == 0)
+ return m_name;
+ if (column == 2)
+ return typeName(m_value.type());
+ if (m_value.isObject())
+ return QString('[' + QString::number(m_value.toObject().size()) + ' ' + tr("Items") + ']');
+ if (m_value.isArray())
+ return QString('[' + QString::number(m_value.toArray().size()) + ' ' + tr("Items") + ']');
+ return m_value.toVariant();
+}
+
+bool Utils::JsonTreeItem::canFetchMore() const
+{
+ return canFetchObjectChildren() || canFetchArrayChildren();
+}
+
+void Utils::JsonTreeItem::fetchMore()
+{
+ if (canFetchObjectChildren()) {
+ const QJsonObject &object = m_value.toObject();
+ for (const QString &key : object.keys())
+ appendChild(new JsonTreeItem(key, object.value(key)));
+ } else if (canFetchArrayChildren()) {
+ int index = 0;
+ const QJsonArray &array = m_value.toArray();
+ for (const QJsonValue &val : array)
+ appendChild(new JsonTreeItem(QString::number(index++), val));
+ }
+}
+
+bool Utils::JsonTreeItem::canFetchObjectChildren() const
+{
+ return m_value.isObject() && m_value.toObject().size() > childCount();
+}
+
+bool Utils::JsonTreeItem::canFetchArrayChildren() const
+{
+ return m_value.isArray() && m_value.toArray().size() > childCount();
+}
diff --git a/src/libs/utils/jsontreeitem.h b/src/libs/utils/jsontreeitem.h
new file mode 100644
index 0000000000..57eea36536
--- /dev/null
+++ b/src/libs/utils/jsontreeitem.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include "treemodel.h"
+
+#include "utils_global.h"
+
+#include <QJsonValue>
+#include <QCoreApplication>
+
+namespace Utils {
+
+class QTCREATOR_UTILS_EXPORT JsonTreeItem : public TypedTreeItem<JsonTreeItem>
+{
+ Q_DECLARE_TR_FUNCTIONS(JsonTreeModelItem)
+public:
+ JsonTreeItem() = default;
+ JsonTreeItem(const QString &displayName, const QJsonValue &value);
+
+ QVariant data(int column, int role) const override;
+ bool canFetchMore() const override;
+ void fetchMore() override;
+
+private:
+ bool canFetchObjectChildren() const;
+ bool canFetchArrayChildren() const;
+
+ QString m_name;
+ QJsonValue m_value;
+};
+
+} // namespace Utils
diff --git a/src/libs/utils/tooltip/tooltip.cpp b/src/libs/utils/tooltip/tooltip.cpp
index de3c536c5f..b4735c25ee 100644
--- a/src/libs/utils/tooltip/tooltip.cpp
+++ b/src/libs/utils/tooltip/tooltip.cpp
@@ -263,6 +263,7 @@ void ToolTip::showInternal(const QPoint &pos, const QVariant &content,
m_tip = new WidgetTip(target);
break;
}
+ m_tip->setObjectName("qcToolTip");
m_tip->setContent(content);
m_tip->setContextHelp(contextHelp);
setUp(pos, w, rect);
diff --git a/src/libs/utils/utils-lib.pri b/src/libs/utils/utils-lib.pri
index 38053e928b..a3e06cc337 100644
--- a/src/libs/utils/utils-lib.pri
+++ b/src/libs/utils/utils-lib.pri
@@ -124,7 +124,9 @@ SOURCES += \
$$PWD/filecrumblabel.cpp \
$$PWD/fixedsizeclicklabel.cpp \
$$PWD/removefiledialog.cpp \
- $$PWD/differ.cpp
+ $$PWD/differ.cpp \
+ $$PWD/jsontreeitem.cpp
+
win32:SOURCES += $$PWD/consoleprocess_win.cpp
else:SOURCES += $$PWD/consoleprocess_unix.cpp
@@ -265,7 +267,8 @@ HEADERS += \
$$PWD/fixedsizeclicklabel.h \
$$PWD/removefiledialog.h \
$$PWD/differ.h \
- $$PWD/cpplanguage_details.h
+ $$PWD/cpplanguage_details.h \
+ $$PWD/jsontreeitem.h
FORMS += $$PWD/filewizardpage.ui \
$$PWD/newclasswidget.ui \
diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
index bb07e2a927..2798f3ab16 100644
--- a/src/libs/utils/utils.qbs
+++ b/src/libs/utils/utils.qbs
@@ -142,6 +142,8 @@ Project {
"itemviews.h",
"json.cpp",
"json.h",
+ "jsontreeitem.cpp",
+ "jsontreeitem.h",
"linecolumn.h",
"link.h",
"listutils.h",
diff --git a/src/plugins/clangcodemodel/clanghoverhandler.cpp b/src/plugins/clangcodemodel/clanghoverhandler.cpp
index 58f414d9f1..c8e87c2577 100644
--- a/src/plugins/clangcodemodel/clanghoverhandler.cpp
+++ b/src/plugins/clangcodemodel/clanghoverhandler.cpp
@@ -93,79 +93,6 @@ ClangHoverHandler::~ClangHoverHandler()
abort();
}
-static int skipChars(QTextCursor *tc,
- QTextCursor::MoveOperation op,
- int offset,
- std::function<bool(const QChar &)> skip)
-{
- const QTextDocument *doc = tc->document();
- QChar ch = doc->characterAt(tc->position() + offset);
- if (ch.isNull())
- return 0;
- int count = 0;
- while (skip(ch)) {
- if (tc->movePosition(op))
- ++count;
- else
- break;
- ch = doc->characterAt(tc->position() + offset);
- }
- return count;
-}
-
-static int skipCharsForward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
-{
- return skipChars(tc, QTextCursor::NextCharacter, 0, skip);
-}
-
-static int skipCharsBackward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
-{
- return skipChars(tc, QTextCursor::PreviousCharacter, -1, skip);
-}
-
-static QStringList fallbackWords(QTextDocument *document, int pos)
-{
- const auto isSpace = [](const QChar &c) { return c.isSpace(); };
- const auto isColon = [](const QChar &c) { return c == ':'; };
- const auto isValidIdentifierChar = [document](const QTextCursor &tc) {
- return CppTools::isValidIdentifierChar(document->characterAt(tc.position()));
- };
- // move to the end
- QTextCursor endCursor(document);
- endCursor.setPosition(pos);
- do {
- CppTools::moveCursorToEndOfIdentifier(&endCursor);
- // possibly skip ::
- QTextCursor temp(endCursor);
- skipCharsForward(&temp, isSpace);
- const int colons = skipCharsForward(&temp, isColon);
- skipCharsForward(&temp, isSpace);
- if (colons == 2 && isValidIdentifierChar(temp))
- endCursor = temp;
- } while (isValidIdentifierChar(endCursor));
-
- QStringList results;
- QTextCursor startCursor(endCursor);
- do {
- CppTools::moveCursorToStartOfIdentifier(&startCursor);
- if (startCursor.position() == endCursor.position())
- break;
- QTextCursor temp(endCursor);
- temp.setPosition(startCursor.position(), QTextCursor::KeepAnchor);
- results.append(temp.selectedText().remove(QRegularExpression("\\s")));
- // possibly skip ::
- temp = startCursor;
- skipCharsBackward(&temp, isSpace);
- const int colons = skipCharsBackward(&temp, isColon);
- skipCharsBackward(&temp, isSpace);
- if (colons == 2
- && CppTools::isValidIdentifierChar(document->characterAt(temp.position() - 1))) {
- startCursor = temp;
- }
- } while (!isValidIdentifierChar(startCursor));
- return results;
-}
-
void ClangHoverHandler::identifyMatch(TextEditorWidget *editorWidget,
int pos,
BaseHoverHandler::ReportPriority report)
@@ -187,7 +114,9 @@ void ClangHoverHandler::identifyMatch(TextEditorWidget *editorWidget,
qCDebug(hoverLog) << "Requesting tooltip info at" << pos;
m_reportPriority = report;
m_futureWatcher.reset(new QFutureWatcher<CppTools::ToolTipInfo>());
- const QStringList fallback = fallbackWords(editorWidget->document(), pos);
+ QTextCursor tc(editorWidget->document());
+ tc.setPosition(pos);
+ const QStringList fallback = CppTools::identifierWordsUnderCursor(tc);
QObject::connect(m_futureWatcher.data(),
&QFutureWatcherBase::finished,
[this, fallback]() {
diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp
index e8c6b5e902..1b316bea55 100644
--- a/src/plugins/clangformat/clangformatbaseindenter.cpp
+++ b/src/plugins/clangformat/clangformatbaseindenter.cpp
@@ -36,16 +36,27 @@
namespace ClangFormat {
-static void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style)
+static void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
+ ReplacementsToKeep replacementsToKeep)
{
+ if (replacementsToKeep == ReplacementsToKeep::All)
+ return;
+
+ style.MaxEmptyLinesToKeep = 2;
+ style.SortIncludes = false;
+ style.SortUsingDeclarations = false;
+
+ // This is a separate pass, don't do it unless it's the full formatting.
+ style.FixNamespaceComments = false;
+
+ if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
+ return;
+
style.DisableFormat = false;
style.ColumnLimit = 0;
#ifdef KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED
style.KeepLineBreaksForNonEmptyLines = true;
#endif
- style.MaxEmptyLinesToKeep = 2;
- style.SortIncludes = false;
- style.SortUsingDeclarations = false;
}
static llvm::StringRef clearExtraNewline(llvm::StringRef text)
@@ -59,7 +70,6 @@ static clang::tooling::Replacements filteredReplacements(
const clang::tooling::Replacements &replacements,
int offset,
int utf8LineLengthBeforeCursor,
- int extraOffsetFromStartOfFile,
int extraEmptySpaceOffset,
ReplacementsToKeep replacementsToKeep)
{
@@ -69,14 +79,13 @@ static clang::tooling::Replacements filteredReplacements(
const bool replacementDoesNotMatchRestriction
= (replacementsToKeep == ReplacementsToKeep::OnlyIndent
&& replacementOffset != offset - 1)
- || (replacementsToKeep == ReplacementsToKeep::OnlyBeforeIndent
- && replacementOffset >= offset + utf8LineLengthBeforeCursor - 1);
+ || (replacementsToKeep == ReplacementsToKeep::IndentAndBefore
+ && replacementOffset > offset + utf8LineLengthBeforeCursor - 1);
if (replacementDoesNotMatchRestriction)
continue;
if (replacementOffset >= offset - 1)
replacementOffset += extraEmptySpaceOffset;
- replacementOffset += extraOffsetFromStartOfFile;
llvm::StringRef text = replacementsToKeep == ReplacementsToKeep::OnlyIndent
? clearExtraNewline(replacement.getReplacementText())
@@ -128,18 +137,6 @@ static void trimFirstNonEmptyBlock(const QTextBlock &currentBlock)
cursor.endEditBlock();
}
-static void trimCurrentBlock(const QTextBlock &currentBlock)
-{
- if (currentBlock.text().trimmed().isEmpty()) {
- // Clear the block containing only spaces
- QTextCursor cursor(currentBlock);
- cursor.beginEditBlock();
- cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
- cursor.removeSelectedText();
- cursor.endEditBlock();
- }
-}
-
// Returns the total langth of previous lines with pure whitespace.
static int previousEmptyLinesLength(const QTextBlock &currentBlock)
{
@@ -167,7 +164,7 @@ static void modifyToIndentEmptyLines(
if (firstNonWhitespace < 0 || closingParenBlock) {
//This extra text works for the most cases.
- QByteArray dummyText("a;");
+ QByteArray dummyText("a;a;");
// Search for previous character
QTextBlock prevBlock = block.previous();
@@ -198,8 +195,6 @@ static void modifyToIndentEmptyLines(
}
}
-static const int kMaxLinesFromCurrentBlock = 200;
-
static Utils::LineColumn utf16LineColumn(const QTextBlock &block,
int blockOffsetUtf8,
const QByteArray &utf8Buffer,
@@ -388,24 +383,21 @@ TextEditor::Replacements ClangFormatBaseIndenter::format(
return format(cursor, cursorPositionInEditor);
}
-int ClangFormatBaseIndenter::indentBeforeCursor(const QTextBlock &block,
- const QChar &typedChar,
- int cursorPositionInEditor)
+void ClangFormatBaseIndenter::indentBeforeCursor(const QTextBlock &block,
+ const QChar &typedChar,
+ int cursorPositionInEditor)
{
const QByteArray buffer = m_doc->toPlainText().toUtf8();
const int utf8Offset = Utils::Text::utf8NthLineOffset(m_doc, buffer, block.blockNumber() + 1);
- QTC_ASSERT(utf8Offset >= 0, return cursorPositionInEditor;);
+ QTC_ASSERT(utf8Offset >= 0, return;);
const TextEditor::Replacements toReplace = replacements(buffer,
utf8Offset,
0,
block,
cursorPositionInEditor,
- ReplacementsToKeep::OnlyBeforeIndent,
+ ReplacementsToKeep::IndentAndBefore,
typedChar);
applyReplacements(block, toReplace);
- for (const TextEditor::Replacement &replacement : toReplace)
- cursorPositionInEditor += replacement.text.length() - replacement.length;
- return cursorPositionInEditor;
}
static bool doNotIndentInContext(QTextDocument *doc, int pos)
@@ -466,11 +458,10 @@ void ClangFormatBaseIndenter::indentBlock(const QTextBlock &block,
else
cursorPositionInEditor = currentBlock.position();
- cursorPositionInEditor = indentBeforeCursor(currentBlock, typedChar, cursorPositionInEditor);
- currentBlock = m_doc->findBlock(cursorPositionInEditor);
+ indentBeforeCursor(currentBlock, typedChar, cursorPositionInEditor);
+ return;
}
- trimCurrentBlock(currentBlock);
const QByteArray buffer = m_doc->toPlainText().toUtf8();
const int utf8Offset = Utils::Text::utf8NthLineOffset(m_doc, buffer, block.blockNumber() + 1);
QTC_ASSERT(utf8Offset >= 0, return;);
@@ -496,7 +487,6 @@ void ClangFormatBaseIndenter::indentBlock(const QTextBlock &block,
int ClangFormatBaseIndenter::indentFor(const QTextBlock &block, int cursorPositionInEditor)
{
trimFirstNonEmptyBlock(block);
- trimCurrentBlock(block);
const QByteArray buffer = m_doc->toPlainText().toUtf8();
const int utf8Offset = Utils::Text::utf8NthLineOffset(m_doc, buffer, block.blockNumber() + 1);
QTC_ASSERT(utf8Offset >= 0, return 0;);
@@ -571,8 +561,7 @@ static int formattingRangeStart(const QTextBlock &currentBlock,
{
QTextBlock prevBlock = currentBlock.previous();
while ((prevBlock.position() > 0 || prevBlock.length() > 0)
- && prevBlock.revision() != documentRevision
- && (currentBlock.blockNumber() - prevBlock.blockNumber() < kMaxLinesFromCurrentBlock)) {
+ && prevBlock.revision() != documentRevision) {
// Find the first block with not matching revision.
prevBlock = prevBlock.previous();
}
@@ -604,41 +593,27 @@ TextEditor::Replacements ClangFormatBaseIndenter::replacements(QByteArray buffer
= block.text().left(cursorPositionInEditor - block.position()).toUtf8().size();
}
- int extraOffsetFromStartOfFile = 0;
int extraEmptySpaceOffset = 0;
int rangeStart = 0;
if (replacementsToKeep != ReplacementsToKeep::All) {
- if (block.blockNumber() > kMaxLinesFromCurrentBlock) {
- extraOffsetFromStartOfFile
- = Utils::Text::utf8NthLineOffset(block.document(),
- buffer,
- block.blockNumber() - kMaxLinesFromCurrentBlock);
- }
- int endOffset = Utils::Text::utf8NthLineOffset(block.document(),
- buffer,
- block.blockNumber()
- + kMaxLinesFromCurrentBlock);
- if (endOffset == -1)
- endOffset = buffer.size();
-
-
- if (replacementsToKeep == ReplacementsToKeep::OnlyBeforeIndent)
+ if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
rangeStart = formattingRangeStart(block, buffer, lastSaveRevision());
- buffer = buffer.mid(extraOffsetFromStartOfFile, endOffset - extraOffsetFromStartOfFile);
- utf8Offset -= extraOffsetFromStartOfFile;
- rangeStart -= extraOffsetFromStartOfFile;
-
extraEmptySpaceOffset = previousEmptyLinesLength(block);
utf8Offset -= extraEmptySpaceOffset;
buffer.remove(utf8Offset, extraEmptySpaceOffset);
- if (replacementsToKeep == ReplacementsToKeep::OnlyIndent)
- adjustFormatStyleForLineBreak(style);
+ adjustFormatStyleForLineBreak(style, replacementsToKeep);
modifyToIndentEmptyLines(buffer, utf8Offset, utf8Length, block, secondTry);
+
+ if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore) {
+ buffer.insert(utf8Offset - 1, " //");
+ extraEmptySpaceOffset -= 3;
+ utf8Offset += 3;
+ }
}
- if (replacementsToKeep != ReplacementsToKeep::OnlyBeforeIndent || utf8Offset < rangeStart)
+ if (replacementsToKeep != ReplacementsToKeep::IndentAndBefore || utf8Offset < rangeStart)
rangeStart = utf8Offset;
unsigned int rangeLength = static_cast<unsigned int>(utf8Offset + utf8Length - rangeStart);
@@ -658,7 +633,6 @@ TextEditor::Replacements ClangFormatBaseIndenter::replacements(QByteArray buffer
filtered = filteredReplacements(clangReplacements,
utf8Offset,
utf8LineLengthBeforeCursor,
- extraOffsetFromStartOfFile,
extraEmptySpaceOffset,
replacementsToKeep);
}
diff --git a/src/plugins/clangformat/clangformatbaseindenter.h b/src/plugins/clangformat/clangformatbaseindenter.h
index 1a73d9bfbc..2017f8ba64 100644
--- a/src/plugins/clangformat/clangformatbaseindenter.h
+++ b/src/plugins/clangformat/clangformatbaseindenter.h
@@ -31,7 +31,7 @@
namespace ClangFormat {
-enum class ReplacementsToKeep { OnlyIndent, OnlyBeforeIndent, All };
+enum class ReplacementsToKeep { OnlyIndent, IndentAndBefore, All };
class ClangFormatBaseIndenter : public TextEditor::Indenter
{
@@ -79,9 +79,9 @@ private:
void indent(const QTextCursor &cursor, const QChar &typedChar, int cursorPositionInEditor);
void indentBlock(const QTextBlock &block, const QChar &typedChar, int cursorPositionInEditor);
int indentFor(const QTextBlock &block, int cursorPositionInEditor);
- int indentBeforeCursor(const QTextBlock &block,
- const QChar &typedChar,
- int cursorPositionInEditor);
+ void indentBeforeCursor(const QTextBlock &block,
+ const QChar &typedChar,
+ int cursorPositionInEditor);
TextEditor::Replacements replacements(QByteArray buffer,
int utf8Offset,
int utf8Length,
diff --git a/src/plugins/clangtools/clangselectablefilesdialog.ui b/src/plugins/clangtools/clangselectablefilesdialog.ui
index 316b9946fb..2fe10139a3 100644
--- a/src/plugins/clangtools/clangselectablefilesdialog.ui
+++ b/src/plugins/clangtools/clangselectablefilesdialog.ui
@@ -52,7 +52,7 @@
</layout>
</item>
<item>
- <widget class="ClangTools::ClangToolsBasicSettings" name="clangToolsBasicSettings" native="true"/>
+ <widget class="ClangTools::Internal::ClangToolsBasicSettings" name="clangToolsBasicSettings" native="true"/>
</item>
</layout>
</widget>
@@ -87,7 +87,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>ClangTools::ClangToolsBasicSettings</class>
+ <class>ClangTools::Internal::ClangToolsBasicSettings</class>
<extends>QWidget</extends>
<header>clangtools/clangtoolsbasicsettings.h</header>
</customwidget>
diff --git a/src/plugins/clangtools/clangtidyclazytool.cpp b/src/plugins/clangtools/clangtidyclazytool.cpp
index 9056b64367..0583a3aa0f 100644
--- a/src/plugins/clangtools/clangtidyclazytool.cpp
+++ b/src/plugins/clangtools/clangtidyclazytool.cpp
@@ -219,7 +219,7 @@ ClangTidyClazyTool::ClangTidyClazyTool()
m_diagnosticView->sortByColumn(Debugger::DetailedErrorView::DiagnosticColumn,
Qt::AscendingOrder);
m_diagnosticView->setObjectName(QLatin1String("ClangTidyClazyIssuesView"));
- m_diagnosticView->setWindowTitle(tr("Clang-Tidy and Clazy Issues"));
+ m_diagnosticView->setWindowTitle(tr("Clang-Tidy and Clazy Diagnostics"));
foreach (auto * const model,
QList<QAbstractItemModel *>({m_diagnosticModel, m_diagnosticFilterModel})) {
@@ -281,7 +281,7 @@ ClangTidyClazyTool::ClangTidyClazyTool()
// Filter line edit
m_filterLineEdit = new Utils::FancyLineEdit();
m_filterLineEdit->setFiltering(true);
- m_filterLineEdit->setPlaceholderText(tr("Filter Issues"));
+ m_filterLineEdit->setPlaceholderText(tr("Filter Diagnostics"));
m_filterLineEdit->setHistoryCompleter("CppTools.ClangTidyClazyIssueFilter", true);
connect(m_filterLineEdit, &Utils::FancyLineEdit::filterChanged, [this](const QString &filter) {
m_diagnosticFilterModel->setFilterRegExp(
@@ -309,7 +309,7 @@ ClangTidyClazyTool::ClangTidyClazyTool()
ActionContainer *menu = ActionManager::actionContainer(Debugger::Constants::M_DEBUG_ANALYZER);
const QString toolTip = tr("Clang-Tidy and Clazy use a customized Clang executable from the "
- "Clang project to search for errors and warnings.");
+ "Clang project to search for diagnostics.");
m_perspective.addWindow(m_diagnosticView, Perspective::SplitVertical, nullptr);
@@ -450,14 +450,14 @@ void ClangTidyClazyTool::handleStateUpdate()
QString message;
if (m_running) {
if (issuesFound)
- message = tr("Running - %n issues found", nullptr, issuesFound);
+ message = tr("Running - %n diagnostics", nullptr, issuesFound);
else
- message = tr("Running - No issues found", nullptr, issuesFound);
+ message = tr("Running - No diagnostics", nullptr, issuesFound);
} else {
if (issuesFound)
- message = tr("Finished - %n issues found", nullptr, issuesFound);
+ message = tr("Finished - %n diagnostics", nullptr, issuesFound);
else
- message = tr("Finished - No issues found", nullptr, issuesFound);
+ message = tr("Finished - No diagnostics", nullptr, issuesFound);
}
Debugger::showPermanentStatusMessage(message);
diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp
index b02868cb5d..52746080c1 100644
--- a/src/plugins/clangtools/clangtool.cpp
+++ b/src/plugins/clangtools/clangtool.cpp
@@ -46,6 +46,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/session.h>
+#include <utils/algorithm.h>
#include <utils/fancymainwindow.h>
#include <utils/utilsicons.h>
@@ -137,7 +138,10 @@ void ClangTool::initDiagnosticView()
QSet<Diagnostic> ClangTool::diagnostics() const
{
- return m_diagnosticModel->diagnostics();
+ return Utils::filtered(m_diagnosticModel->diagnostics(), [](const Diagnostic &diagnostic) {
+ using CppTools::ProjectFile;
+ return ProjectFile::isSource(ProjectFile::classify(diagnostic.location.filePath));
+ });
}
void ClangTool::onNewDiagnosticsAvailable(const QList<Diagnostic> &diagnostics)
diff --git a/src/plugins/clangtools/clangtoolruncontrol.cpp b/src/plugins/clangtools/clangtoolruncontrol.cpp
index c92a446484..2f994c3a8f 100644
--- a/src/plugins/clangtools/clangtoolruncontrol.cpp
+++ b/src/plugins/clangtools/clangtoolruncontrol.cpp
@@ -267,6 +267,8 @@ void ClangToolRunControl::init()
void ClangToolRunControl::start()
{
+ TaskHub::clearTasks(Debugger::Constants::ANALYZERTASK_ID);
+
if (ClangToolsSettings::instance()->savedBuildBeforeAnalysis()) {
QTC_ASSERT(m_projectBuilder, return;);
if (!m_projectBuilder->success()) {
@@ -441,7 +443,7 @@ void ClangToolRunControl::onRunnerFinishedWithFailure(const QString &errorMessag
m_success = false;
appendMessage(message, Utils::StdErrFormat);
appendMessage(errorDetails, Utils::StdErrFormat);
- TaskHub::addTask(Task::Warning, message, Debugger::Constants::ANALYZERTASK_ID);
+ TaskHub::addTask(Task::Error, message, Debugger::Constants::ANALYZERTASK_ID);
handleFinished();
}
diff --git a/src/plugins/clangtools/clangtoolsbasicsettings.cpp b/src/plugins/clangtools/clangtoolsbasicsettings.cpp
index 7fe56e9193..bf1d533700 100644
--- a/src/plugins/clangtools/clangtoolsbasicsettings.cpp
+++ b/src/plugins/clangtools/clangtoolsbasicsettings.cpp
@@ -29,6 +29,7 @@
#include "clangtoolsutils.h"
namespace ClangTools {
+namespace Internal {
ClangToolsBasicSettings::ClangToolsBasicSettings(QWidget *parent)
: QWidget(parent)
@@ -47,4 +48,5 @@ Ui::ClangToolsBasicSettings *ClangToolsBasicSettings::ui()
return m_ui;
}
+} // namespace Internal
} // namespace ClangTools
diff --git a/src/plugins/clangtools/clangtoolsbasicsettings.h b/src/plugins/clangtools/clangtoolsbasicsettings.h
index fb896e830d..b9ecb0285e 100644
--- a/src/plugins/clangtools/clangtoolsbasicsettings.h
+++ b/src/plugins/clangtools/clangtoolsbasicsettings.h
@@ -28,6 +28,7 @@
#include <QWidget>
namespace ClangTools {
+namespace Internal {
namespace Ui { class ClangToolsBasicSettings; }
@@ -46,4 +47,5 @@ private:
Ui::ClangToolsBasicSettings *m_ui;
};
+} // namespace Internal
} // namespace ClangTools
diff --git a/src/plugins/clangtools/clangtoolsbasicsettings.ui b/src/plugins/clangtools/clangtoolsbasicsettings.ui
index 4b6f14111e..ccdba126bd 100644
--- a/src/plugins/clangtools/clangtoolsbasicsettings.ui
+++ b/src/plugins/clangtools/clangtoolsbasicsettings.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>ClangTools::ClangToolsBasicSettings</class>
- <widget class="QWidget" name="ClangTools::ClangToolsBasicSettings">
+ <class>ClangTools::Internal::ClangToolsBasicSettings</class>
+ <widget class="QWidget" name="ClangTools::Internal::ClangToolsBasicSettings">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/plugins/clangtools/clangtoolsconfigwidget.ui b/src/plugins/clangtools/clangtoolsconfigwidget.ui
index ea8dafb92b..b2d5aa9875 100644
--- a/src/plugins/clangtools/clangtoolsconfigwidget.ui
+++ b/src/plugins/clangtools/clangtoolsconfigwidget.ui
@@ -21,7 +21,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="ClangTools::ClangToolsBasicSettings" name="clangToolsBasicSettings" native="true"/>
+ <widget class="ClangTools::Internal::ClangToolsBasicSettings" name="clangToolsBasicSettings" native="true"/>
</item>
<item>
<layout class="QHBoxLayout" name="processesLayout">
@@ -77,7 +77,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>ClangTools::ClangToolsBasicSettings</class>
+ <class>ClangTools::Internal::ClangToolsBasicSettings</class>
<extends>QWidget</extends>
<header>clangtools/clangtoolsbasicsettings.h</header>
</customwidget>
diff --git a/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp b/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
index 6e16cc6eec..4225970221 100644
--- a/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
+++ b/src/plugins/clangtools/clangtoolsdiagnosticmodel.cpp
@@ -84,7 +84,7 @@ ClangToolsDiagnosticModel::ClangToolsDiagnosticModel(QObject *parent)
: Utils::TreeModel<>(parent)
, m_filesWatcher(std::make_unique<QFileSystemWatcher>())
{
- setHeader({tr("Issue"), tr("Fixit Status")});
+ setHeader({tr("Diagnostic")});
connectFileWatcher();
}
@@ -192,7 +192,26 @@ void ClangToolsDiagnosticModel::addWatchedPath(const QString &path)
m_filesWatcher->addPath(path);
}
-static QString createDiagnosticToolTipString(const Diagnostic &diagnostic)
+static QString fixitStatus(FixitStatus status)
+{
+ switch (status) {
+ case FixitStatus::NotAvailable:
+ return ClangToolsDiagnosticModel::tr("No Fixits");
+ case FixitStatus::NotScheduled:
+ return ClangToolsDiagnosticModel::tr("Not Scheduled");
+ case FixitStatus::Invalidated:
+ return ClangToolsDiagnosticModel::tr("Invalidated");
+ case FixitStatus::Scheduled:
+ return ClangToolsDiagnosticModel::tr("Scheduled");
+ case FixitStatus::FailedToApply:
+ return ClangToolsDiagnosticModel::tr("Failed to Apply");
+ case FixitStatus::Applied:
+ return ClangToolsDiagnosticModel::tr("Applied");
+ }
+ return QString();
+}
+
+static QString createDiagnosticToolTipString(const Diagnostic &diagnostic, FixitStatus fixItStatus)
{
using StringPair = QPair<QString, QString>;
QList<StringPair> lines;
@@ -226,6 +245,10 @@ static QString createDiagnosticToolTipString(const Diagnostic &diagnostic)
QCoreApplication::translate("ClangTools::Diagnostic", "Location:"),
createFullLocationString(diagnostic.location));
+ lines << qMakePair(
+ QCoreApplication::translate("ClangTools::Diagnostic", "Fixit Status:"),
+ fixitStatus(fixItStatus));
+
QString html = QLatin1String("<html>"
"<head>"
"<style>dt { font-weight:bold; } dd { font-family: monospace; }</style>\n"
@@ -364,19 +387,8 @@ DiagnosticItem::~DiagnosticItem()
Qt::ItemFlags DiagnosticItem::flags(int column) const
{
const Qt::ItemFlags itemFlags = TreeItem::flags(column);
- if (column == DiagnosticView::FixItColumn) {
- switch (m_fixitStatus) {
- case FixitStatus::NotAvailable:
- case FixitStatus::Applied:
- case FixitStatus::FailedToApply:
- case FixitStatus::Invalidated:
- return itemFlags & ~Qt::ItemIsEnabled;
- case FixitStatus::Scheduled:
- case FixitStatus::NotScheduled:
- return itemFlags | Qt::ItemIsUserCheckable;
- }
- }
-
+ if (column == DiagnosticView::DiagnosticColumn)
+ return itemFlags | Qt::ItemIsUserCheckable;
return itemFlags;
}
@@ -395,49 +407,46 @@ static QVariant iconData(const QString &type)
QVariant DiagnosticItem::data(int column, int role) const
{
- if (column == DiagnosticView::FixItColumn) {
- if (role == Qt::CheckStateRole) {
+ if (column == DiagnosticView::DiagnosticColumn) {
+ switch (role) {
+ case Debugger::DetailedErrorView::LocationRole:
+ return QVariant::fromValue(m_diagnostic.location);
+ case Debugger::DetailedErrorView::FullTextRole:
+ return fullText(m_diagnostic);
+ case ClangToolsDiagnosticModel::DiagnosticRole:
+ return QVariant::fromValue(m_diagnostic);
+ case ClangToolsDiagnosticModel::TextRole:
+ return m_diagnostic.description;
+ case ClangToolsDiagnosticModel::CheckBoxEnabledRole:
switch (m_fixitStatus) {
case FixitStatus::NotAvailable:
- case FixitStatus::NotScheduled:
- case FixitStatus::Invalidated:
case FixitStatus::Applied:
case FixitStatus::FailedToApply:
- return Qt::Unchecked;
+ case FixitStatus::Invalidated:
+ return false;
case FixitStatus::Scheduled:
- return Qt::Checked;
+ case FixitStatus::NotScheduled:
+ return true;
}
- } else if (role == Qt::DisplayRole) {
+ break;
+ case Qt::CheckStateRole: {
switch (m_fixitStatus) {
case FixitStatus::NotAvailable:
- return ClangToolsDiagnosticModel::tr("No Fixits");
- case FixitStatus::NotScheduled:
- return ClangToolsDiagnosticModel::tr("Not Scheduled");
case FixitStatus::Invalidated:
- return ClangToolsDiagnosticModel::tr("Invalidated");
- case FixitStatus::Scheduled:
- return ClangToolsDiagnosticModel::tr("Scheduled");
- case FixitStatus::FailedToApply:
- return ClangToolsDiagnosticModel::tr("Failed to Apply");
case FixitStatus::Applied:
- return ClangToolsDiagnosticModel::tr("Applied");
+ case FixitStatus::FailedToApply:
+ case FixitStatus::NotScheduled:
+ return Qt::Unchecked;
+ case FixitStatus::Scheduled:
+ return Qt::Checked;
}
+ break;
}
- } else if (column == DiagnosticView::DiagnosticColumn) {
- switch (role) {
- case Debugger::DetailedErrorView::LocationRole:
- return QVariant::fromValue(m_diagnostic.location);
- case Debugger::DetailedErrorView::FullTextRole:
- return fullText(m_diagnostic);
- case ClangToolsDiagnosticModel::DiagnosticRole:
- return QVariant::fromValue(m_diagnostic);
- case ClangToolsDiagnosticModel::TextRole:
- return m_diagnostic.description;
case Qt::DisplayRole:
return QString("%1: %2").arg(lineColumnString(m_diagnostic.location),
m_diagnostic.description);
case Qt::ToolTipRole:
- return createDiagnosticToolTipString(m_diagnostic);
+ return createDiagnosticToolTipString(m_diagnostic, m_fixitStatus);
case Qt::DecorationRole:
return iconData(m_diagnostic.type);
default:
@@ -450,7 +459,7 @@ QVariant DiagnosticItem::data(int column, int role) const
bool DiagnosticItem::setData(int column, const QVariant &data, int role)
{
- if (column == DiagnosticView::FixItColumn && role == Qt::CheckStateRole) {
+ if (column == DiagnosticView::DiagnosticColumn && role == Qt::CheckStateRole) {
if (m_fixitStatus != FixitStatus::Scheduled && m_fixitStatus != FixitStatus::NotScheduled)
return false;
@@ -494,15 +503,6 @@ ExplainingStepItem::ExplainingStepItem(const ExplainingStep &step, int index)
, m_index(index)
{}
-// We expect something like "note: ..."
-static QVariant iconForExplainingStepMessage(const QString &message)
-{
- const int index = message.indexOf(':');
- if (index == -1)
- return QVariant();
- return iconData(message.mid(0, index));
-}
-
static QString rangeString(const QVector<Debugger::DiagnosticLocation> &ranges)
{
return QString("%1-%2").arg(lineColumnString(ranges[0]), lineColumnString(ranges[1]));
@@ -510,9 +510,6 @@ static QString rangeString(const QVector<Debugger::DiagnosticLocation> &ranges)
QVariant ExplainingStepItem::data(int column, int role) const
{
- if (column == DiagnosticView::FixItColumn)
- return QVariant();
-
if (column == DiagnosticView::DiagnosticColumn) {
// DiagnosticColumn
switch (role) {
@@ -555,7 +552,7 @@ QVariant ExplainingStepItem::data(int column, int role) const
case Qt::DecorationRole:
if (m_step.isFixIt)
return Utils::Icons::CODEMODEL_FIXIT.icon();
- return iconForExplainingStepMessage(m_step.message);
+ return Utils::Icons::INFO.icon();
default:
return QVariant();
}
diff --git a/src/plugins/clangtools/clangtoolsdiagnosticmodel.h b/src/plugins/clangtools/clangtoolsdiagnosticmodel.h
index 22d0699201..a8c4dcd011 100644
--- a/src/plugins/clangtools/clangtoolsdiagnosticmodel.h
+++ b/src/plugins/clangtools/clangtoolsdiagnosticmodel.h
@@ -112,7 +112,11 @@ public:
void addDiagnostics(const QList<Diagnostic> &diagnostics);
QSet<Diagnostic> diagnostics() const;
- enum ItemRole { DiagnosticRole = Debugger::DetailedErrorView::FullTextRole + 1, TextRole };
+ enum ItemRole {
+ DiagnosticRole = Debugger::DetailedErrorView::FullTextRole + 1,
+ TextRole,
+ CheckBoxEnabledRole
+ };
void clear();
void removeWatchedPath(const QString &path);
diff --git a/src/plugins/clangtools/clangtoolsdiagnosticview.cpp b/src/plugins/clangtools/clangtoolsdiagnosticview.cpp
index 07bc7f397f..33b002ced2 100644
--- a/src/plugins/clangtools/clangtoolsdiagnosticview.cpp
+++ b/src/plugins/clangtools/clangtoolsdiagnosticview.cpp
@@ -30,11 +30,13 @@
#include "clangtoolsutils.h"
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/manhattanstyle.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QAction>
+#include <QApplication>
#include <QDebug>
#include <QHeaderView>
#include <QPainter>
@@ -44,21 +46,22 @@ using namespace Debugger;
namespace ClangTools {
namespace Internal {
-class ClickableFixItHeader : public QHeaderView
+// A header view that puts a check box in front of a given column.
+class HeaderWithCheckBoxInColumn : public QHeaderView
{
Q_OBJECT
public:
- ClickableFixItHeader(Qt::Orientation orientation, QWidget *parent = nullptr)
+ HeaderWithCheckBoxInColumn(Qt::Orientation orientation,
+ int column = 0,
+ QWidget *parent = nullptr)
: QHeaderView(orientation, parent)
+ , m_column(column)
{
setDefaultAlignment(Qt::AlignLeft);
}
- void setState(QFlags<QStyle::StateFlag> newState)
- {
- state = newState;
- }
+ void setState(QFlags<QStyle::StateFlag> newState) { state = newState; }
protected:
void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const override
@@ -66,7 +69,7 @@ protected:
painter->save();
QHeaderView::paintSection(painter, rect, logicalIndex);
painter->restore();
- if (logicalIndex == DiagnosticView::FixItColumn) {
+ if (logicalIndex == m_column) {
QStyleOptionButton option;
const int side = sizeHint().height();
option.rect = QRect(rect.left() + 1, 1, side - 3, side - 3);
@@ -83,34 +86,111 @@ protected:
void mouseReleaseEvent(QMouseEvent *event) override
{
const int x = event->localPos().x();
- const int fixItColumnX = sectionPosition(DiagnosticView::FixItColumn);
- const bool isWithinFixitCheckBox = x > fixItColumnX
- && x < fixItColumnX + sizeHint().height() - 3;
- if (isWithinFixitCheckBox) {
+ const int columnX = sectionPosition(m_column);
+ const bool isWithinCheckBox = x > columnX && x < columnX + sizeHint().height() - 3;
+ if (isWithinCheckBox) {
state = (state != QStyle::State_On) ? QStyle::State_On : QStyle::State_Off;
viewport()->update();
- emit fixItColumnClicked(state == QStyle::State_On);
+ emit checkBoxClicked(state == QStyle::State_On);
return; // Avoid changing sort order
}
QHeaderView::mouseReleaseEvent(event);
}
signals:
- void fixItColumnClicked(bool checked);
+ void checkBoxClicked(bool checked);
private:
+ const int m_column = 0;
QFlags<QStyle::StateFlag> state = QStyle::State_Off;
};
+static QString getBaseStyleName()
+{
+ QStyle *style = QApplication::style();
+ if (auto proxyStyle = qobject_cast<QProxyStyle *>(style))
+ style = proxyStyle->baseStyle();
+ return style->objectName();
+}
+
+// Paints the check box indicator disabled if requested by client.
+class DiagnosticViewStyle : public ManhattanStyle
+{
+public:
+ DiagnosticViewStyle(const QString &baseStyleName = getBaseStyleName())
+ : ManhattanStyle(baseStyleName)
+ {}
+
+ void setPaintCheckBoxDisabled(bool paintDisabledCheckbox)
+ {
+ m_paintCheckBoxDisabled = paintDisabledCheckbox;
+ }
+
+ void drawPrimitive(PrimitiveElement element,
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget = nullptr) const final
+ {
+ if (element == QStyle::PE_IndicatorCheckBox && m_paintCheckBoxDisabled) {
+ if (const QStyleOptionButton *o = qstyleoption_cast<const QStyleOptionButton *>(
+ option)) {
+ QStyleOptionButton myOption = *o;
+ myOption.palette.setCurrentColorGroup(QPalette::Disabled);
+ ManhattanStyle::drawPrimitive(element, &myOption, painter, widget);
+ return;
+ }
+ }
+ ManhattanStyle::drawPrimitive(element, option, painter, widget);
+ }
+
+private:
+ bool m_paintCheckBoxDisabled = false;
+};
+
+// A delegate that allows to paint a disabled check box (indicator).
+// This is useful if the rest of the item should not be disabled.
+class DiagnosticViewDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ DiagnosticViewDelegate(DiagnosticViewStyle *style)
+ : m_style(style)
+ {}
+
+ void paint(QPainter *painter,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index) const final
+ {
+ const bool paintDisabled = !index.data(ClangToolsDiagnosticModel::CheckBoxEnabledRole)
+ .toBool();
+ if (paintDisabled)
+ m_style->setPaintCheckBoxDisabled(true);
+ QStyledItemDelegate::paint(painter, option, index);
+ if (paintDisabled)
+ m_style->setPaintCheckBoxDisabled(false);
+ }
+
+private:
+ DiagnosticViewStyle *m_style = nullptr;
+};
+
DiagnosticView::DiagnosticView(QWidget *parent)
: Debugger::DetailedErrorView(parent)
+ , m_style(new DiagnosticViewStyle)
+ , m_delegate(new DiagnosticViewDelegate(m_style.get()))
{
m_suppressAction = new QAction(tr("Suppress This Diagnostic"), this);
connect(m_suppressAction, &QAction::triggered,
this, &DiagnosticView::suppressCurrentDiagnostic);
installEventFilter(this);
+
+ setStyle(m_style.get());
+ setItemDelegate(m_delegate.get());
}
+DiagnosticView::~DiagnosticView() = default;
+
void DiagnosticView::suppressCurrentDiagnostic()
{
const QModelIndexList indexes = selectionModel()->selectedRows();
@@ -199,7 +279,6 @@ bool DiagnosticView::eventFilter(QObject *watched, QEvent *event)
switch (key) {
case Qt::Key_Return:
case Qt::Key_Enter:
- case Qt::Key_Space:
openEditorForCurrentIndex();
}
return true;
@@ -219,11 +298,11 @@ void DiagnosticView::setSelectedFixItsCount(int fixItsCount)
{
if (m_ignoreSetSelectedFixItsCount)
return;
- auto *clickableFixItHeader = static_cast<ClickableFixItHeader *>(header());
- clickableFixItHeader->setState(fixItsCount
- ? (QStyle::State_NoChange | QStyle::State_On | QStyle::State_Off)
- : QStyle::State_Off);
- clickableFixItHeader->viewport()->update();
+ auto checkBoxHeader = static_cast<HeaderWithCheckBoxInColumn *>(header());
+ checkBoxHeader->setState(fixItsCount
+ ? (QStyle::State_NoChange | QStyle::State_On | QStyle::State_Off)
+ : QStyle::State_Off);
+ checkBoxHeader->viewport()->update();
}
void DiagnosticView::openEditorForCurrentIndex()
@@ -237,28 +316,31 @@ void DiagnosticView::openEditorForCurrentIndex()
void DiagnosticView::setModel(QAbstractItemModel *theProxyModel)
{
const auto proxyModel = static_cast<QSortFilterProxyModel *>(theProxyModel);
- const auto sourceModel = static_cast<ClangToolsDiagnosticModel *>(proxyModel->sourceModel());
-
Debugger::DetailedErrorView::setModel(proxyModel);
- auto *clickableFixItHeader = new ClickableFixItHeader(Qt::Horizontal, this);
- connect(clickableFixItHeader, &ClickableFixItHeader::fixItColumnClicked, this, [=](bool checked) {
+
+ auto *header = new HeaderWithCheckBoxInColumn(Qt::Horizontal,
+ DiagnosticView::DiagnosticColumn,
+ this);
+ connect(header, &HeaderWithCheckBoxInColumn::checkBoxClicked, this, [=](bool checked) {
m_ignoreSetSelectedFixItsCount = true;
- sourceModel->rootItem()->forChildrenAtLevel(2, [&](::Utils::TreeItem *item) {
- auto diagnosticItem = static_cast<DiagnosticItem *>(item);
- diagnosticItem->setData(FixItColumn,
- checked ? Qt::Checked : Qt::Unchecked,
- Qt::CheckStateRole);
- });
+ for (int i = 0, count = proxyModel->rowCount(); i < count; ++i) {
+ const QModelIndex filePathItemIndex = proxyModel->index(i, 0);
+ for (int j = 0, count = proxyModel->rowCount(filePathItemIndex); j < count; ++j) {
+ const QModelIndex proxyIndex = proxyModel->index(j, 0, filePathItemIndex);
+ const QModelIndex diagnosticItemIndex = proxyModel->mapToSource(proxyIndex);
+ auto item = static_cast<DiagnosticItem *>(diagnosticItemIndex.internalPointer());
+ item->setData(DiagnosticView::DiagnosticColumn,
+ checked ? Qt::Checked : Qt::Unchecked,
+ Qt::CheckStateRole);
+ }
+ }
m_ignoreSetSelectedFixItsCount = false;
});
- setHeader(clickableFixItHeader);
- clickableFixItHeader->setStretchLastSection(false);
- clickableFixItHeader->setSectionResizeMode(0, QHeaderView::Stretch);
- clickableFixItHeader->setSectionResizeMode(1, QHeaderView::ResizeToContents);
-
- const int fixitColumnWidth = clickableFixItHeader->sectionSizeHint(DiagnosticView::FixItColumn);
- const int checkboxWidth = clickableFixItHeader->height();
- clickableFixItHeader->setMinimumSectionSize(fixitColumnWidth + 1.2 * checkboxWidth);
+ setHeader(header);
+ header->setSectionResizeMode(DiagnosticView::DiagnosticColumn, QHeaderView::Stretch);
+ const int columnWidth = header->sectionSizeHint(DiagnosticView::DiagnosticColumn);
+ const int checkboxWidth = header->height();
+ header->setMinimumSectionSize(columnWidth + 1.2 * checkboxWidth);
}
} // namespace Internal
diff --git a/src/plugins/clangtools/clangtoolsdiagnosticview.h b/src/plugins/clangtools/clangtoolsdiagnosticview.h
index 7cb287ab39..6bc6135101 100644
--- a/src/plugins/clangtools/clangtoolsdiagnosticview.h
+++ b/src/plugins/clangtools/clangtoolsdiagnosticview.h
@@ -27,19 +27,21 @@
#include <debugger/analyzer/detailederrorview.h>
+#include <memory>
+
namespace ClangTools {
namespace Internal {
+class DiagnosticViewStyle;
+class DiagnosticViewDelegate;
+
class DiagnosticView : public Debugger::DetailedErrorView
{
Q_OBJECT
public:
DiagnosticView(QWidget *parent = nullptr);
-
- enum ExtraColumn {
- FixItColumn = DiagnosticColumn + 1,
- };
+ ~DiagnosticView() override;
void setSelectedFixItsCount(int fixItsCount);
@@ -59,6 +61,8 @@ private:
void setModel(QAbstractItemModel *theProxyModel) override;
QAction *m_suppressAction;
+ std::unique_ptr<DiagnosticViewStyle> m_style;
+ std::unique_ptr<DiagnosticViewDelegate> m_delegate;
bool m_ignoreSetSelectedFixItsCount = false;
};
diff --git a/src/plugins/clangtools/clangtoolslogfilereader.cpp b/src/plugins/clangtools/clangtoolslogfilereader.cpp
index d2213d3304..e8a6fbcc96 100644
--- a/src/plugins/clangtools/clangtoolslogfilereader.cpp
+++ b/src/plugins/clangtools/clangtoolslogfilereader.cpp
@@ -94,7 +94,7 @@ static ExplainingStep buildChildDiagnostic(const CXDiagnostic cxDiagnostic)
const CXSourceLocation cxLocation = clang_getDiagnosticLocation(cxDiagnostic);
diagnosticStep.location = diagLocationFromSourceLocation(cxLocation);
- diagnosticStep.message = type + ": " + fromCXString(clang_getDiagnosticSpelling(cxDiagnostic));
+ diagnosticStep.message = fromCXString(clang_getDiagnosticSpelling(cxDiagnostic));
return diagnosticStep;
}
diff --git a/src/plugins/coreplugin/helpitem.cpp b/src/plugins/coreplugin/helpitem.cpp
index b8794481cf..d63bd883de 100644
--- a/src/plugins/coreplugin/helpitem.cpp
+++ b/src/plugins/coreplugin/helpitem.cpp
@@ -270,7 +270,7 @@ static const HelpItem::Links getBestLink(const HelpItem::Links &links)
const HelpItem::Links HelpItem::bestLinks() const
{
- if (m_isFuzzyMatch)
+ if (isFuzzyMatch())
return getBestLinks(links());
return getBestLink(links());
}
@@ -279,3 +279,10 @@ const QString HelpItem::keyword() const
{
return m_keyword;
}
+
+bool HelpItem::isFuzzyMatch() const
+{
+ // make sure m_isFuzzyMatch is correct
+ links();
+ return m_isFuzzyMatch;
+}
diff --git a/src/plugins/coreplugin/helpitem.h b/src/plugins/coreplugin/helpitem.h
index 4d9ab153fb..15ff585ca8 100644
--- a/src/plugins/coreplugin/helpitem.h
+++ b/src/plugins/coreplugin/helpitem.h
@@ -86,6 +86,8 @@ public:
const QString keyword() const;
private:
+ bool isFuzzyMatch() const;
+
QUrl m_helpUrl;
QStringList m_helpIds;
QString m_docMark;
diff --git a/src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png
index 3dc3b0a74e..53a42c20fe 100644
--- a/src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png
index 2adcdb5f49..d48df57e63 100644
--- a/src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png
index 3ec47c9175..449c740a11 100644
--- a/src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png
index 68667830c1..3a9cf292bc 100644
--- a/src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png
index 8173281abf..87ab1ba5cb 100644
--- a/src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png
index 9d218b36d8..43a6834a14 100644
--- a/src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png
index 45aa2008d1..acbb5a5134 100644
--- a/src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png b/src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png
index 778da34776..1a89d932f5 100644
--- a/src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png
+++ b/src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png
Binary files differ
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index 3f44a977c9..e5685dc5e0 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -41,6 +41,7 @@
#include <QDir>
#include <QRegularExpression>
+#include <QtGlobal>
namespace CppTools {
@@ -701,6 +702,10 @@ void CompilerOptionsBuilder::reset()
// QMakeProject: -pipe -Whello -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC
void CompilerOptionsBuilder::evaluateCompilerFlags()
{
+ static QStringList userBlackList = QString::fromLocal8Bit(
+ qgetenv("QTC_CLANG_CMD_OPTIONS_BLACKLIST"))
+ .split(';', QString::SkipEmptyParts);
+
bool containsDriverMode = false;
bool skipNext = false;
for (const QString &option : m_projectPart.compilerFlags) {
@@ -709,6 +714,9 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
continue;
}
+ if (userBlackList.contains(option))
+ continue;
+
// Ignore warning flags as these interfere with our user-configured diagnostics.
// Note that once "-w" is provided, no warnings will be emitted, even if "-Wall" follows.
if (m_useBuildSystemWarnings == UseBuildSystemWarnings::No
diff --git a/src/plugins/cpptools/cpphoverhandler.cpp b/src/plugins/cpptools/cpphoverhandler.cpp
index f65e701c03..07617a411f 100644
--- a/src/plugins/cpptools/cpphoverhandler.cpp
+++ b/src/plugins/cpptools/cpphoverhandler.cpp
@@ -26,6 +26,7 @@
#include "cpphoverhandler.h"
#include "cppelementevaluator.h"
+#include "cpptoolsreuse.h"
#include <coreplugin/helpmanager.h>
#include <texteditor/texteditor.h>
@@ -56,14 +57,16 @@ void CppHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, Rep
tip += evaluator.diagnosis();
setPriority(Priority_Diagnostic);
}
+ const QStringList fallback = identifierWordsUnderCursor(tc);
if (evaluator.identifiedCppElement()) {
const QSharedPointer<CppElement> &cppElement = evaluator.cppElement();
- QStringList candidates = cppElement->helpIdCandidates;
- candidates.removeDuplicates();
- const HelpItem helpItem(candidates, cppElement->helpMark, cppElement->helpCategory);
+ const QStringList candidates = cppElement->helpIdCandidates;
+ const HelpItem helpItem(candidates + fallback, cppElement->helpMark, cppElement->helpCategory);
setLastHelpItemIdentified(helpItem); // tool tip appended by decorateToolTip
if (!helpItem.isValid())
tip += cppElement->tooltip;
+ } else {
+ setLastHelpItemIdentified({fallback, {}, HelpItem::Unknown});
}
setToolTip(tip);
}
diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp
index c56bfb9160..9bcf806b7d 100644
--- a/src/plugins/cpptools/cpptoolsreuse.cpp
+++ b/src/plugins/cpptools/cpptoolsreuse.cpp
@@ -41,6 +41,7 @@
#include <utils/qtcassert.h>
#include <QDebug>
+#include <QRegularExpression>
#include <QSet>
#include <QStringRef>
#include <QTextCursor>
@@ -50,29 +51,91 @@ using namespace CPlusPlus;
namespace CppTools {
-static void moveCursorToStartOrEndOfIdentifier(QTextCursor *tc,
- QTextCursor::MoveOperation op,
- int posDiff = 0)
+static int skipChars(QTextCursor *tc,
+ QTextCursor::MoveOperation op,
+ int offset,
+ std::function<bool(const QChar &)> skip)
{
- QTextDocument *doc = tc->document();
+ const QTextDocument *doc = tc->document();
if (!doc)
- return;
-
- QChar ch = doc->characterAt(tc->position() - posDiff);
- while (isValidIdentifierChar(ch)) {
- tc->movePosition(op);
- ch = doc->characterAt(tc->position() - posDiff);
+ return 0;
+ QChar ch = doc->characterAt(tc->position() + offset);
+ if (ch.isNull())
+ return 0;
+ int count = 0;
+ while (skip(ch)) {
+ if (tc->movePosition(op))
+ ++count;
+ else
+ break;
+ ch = doc->characterAt(tc->position() + offset);
}
+ return count;
+}
+
+static int skipCharsForward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
+{
+ return skipChars(tc, QTextCursor::NextCharacter, 0, skip);
+}
+
+static int skipCharsBackward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
+{
+ return skipChars(tc, QTextCursor::PreviousCharacter, -1, skip);
+}
+
+QStringList identifierWordsUnderCursor(const QTextCursor &tc)
+{
+ const QTextDocument *document = tc.document();
+ if (!document)
+ return {};
+ const auto isSpace = [](const QChar &c) { return c.isSpace(); };
+ const auto isColon = [](const QChar &c) { return c == ':'; };
+ const auto isValidIdentifierCharAt = [document](const QTextCursor &tc) {
+ return isValidIdentifierChar(document->characterAt(tc.position()));
+ };
+ // move to the end
+ QTextCursor endCursor(tc);
+ do {
+ moveCursorToEndOfIdentifier(&endCursor);
+ // possibly skip ::
+ QTextCursor temp(endCursor);
+ skipCharsForward(&temp, isSpace);
+ const int colons = skipCharsForward(&temp, isColon);
+ skipCharsForward(&temp, isSpace);
+ if (colons == 2 && isValidIdentifierCharAt(temp))
+ endCursor = temp;
+ } while (isValidIdentifierCharAt(endCursor));
+
+ QStringList results;
+ QTextCursor startCursor(endCursor);
+ do {
+ moveCursorToStartOfIdentifier(&startCursor);
+ if (startCursor.position() == endCursor.position())
+ break;
+ QTextCursor temp(endCursor);
+ temp.setPosition(startCursor.position(), QTextCursor::KeepAnchor);
+ results.append(temp.selectedText().remove(QRegularExpression("\\s")));
+ // possibly skip ::
+ temp = startCursor;
+ skipCharsBackward(&temp, isSpace);
+ const int colons = skipCharsBackward(&temp, isColon);
+ skipCharsBackward(&temp, isSpace);
+ if (colons == 2
+ && isValidIdentifierChar(document->characterAt(temp.position() - 1))) {
+ startCursor = temp;
+ }
+ } while (!isValidIdentifierCharAt(startCursor));
+ return results;
}
void moveCursorToEndOfIdentifier(QTextCursor *tc)
{
- moveCursorToStartOrEndOfIdentifier(tc, QTextCursor::NextCharacter);
+ skipCharsForward(tc, isValidIdentifierChar);
}
void moveCursorToStartOfIdentifier(QTextCursor *tc)
{
- moveCursorToStartOrEndOfIdentifier(tc, QTextCursor::PreviousCharacter, 1);
+ skipCharsBackward(tc, isValidIdentifierChar);
}
static bool isOwnershipRAIIName(const QString &name)
diff --git a/src/plugins/cpptools/cpptoolsreuse.h b/src/plugins/cpptools/cpptoolsreuse.h
index d1a1956be3..92e1365d15 100644
--- a/src/plugins/cpptools/cpptoolsreuse.h
+++ b/src/plugins/cpptools/cpptoolsreuse.h
@@ -58,6 +58,7 @@ bool CPPTOOLS_EXPORT isValidFirstIdentifierChar(const QChar &ch);
bool CPPTOOLS_EXPORT isValidIdentifierChar(const QChar &ch);
bool CPPTOOLS_EXPORT isValidIdentifier(const QString &s);
+QStringList CPPTOOLS_EXPORT identifierWordsUnderCursor(const QTextCursor &tc);
QString CPPTOOLS_EXPORT identifierUnderCursor(QTextCursor *cursor);
bool CPPTOOLS_EXPORT isOwnershipRAIIType(CPlusPlus::Symbol *symbol,
diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp
index d401f452ac..dde08c6794 100644
--- a/src/plugins/languageclient/client.cpp
+++ b/src/plugins/languageclient/client.cpp
@@ -69,6 +69,7 @@ class TextMark : public TextEditor::TextMark
public:
TextMark(const Utils::FileName &fileName, const Diagnostic &diag)
: TextEditor::TextMark(fileName, diag.range().start().line() + 1, "lspmark")
+ , m_diagnostic(diag)
{
using namespace Utils;
setLineAnnotation(diag.message());
@@ -81,11 +82,17 @@ public:
setIcon(isError ? Icons::CODEMODEL_ERROR.icon()
: Icons::CODEMODEL_WARNING.icon());
}
+
+ const Diagnostic &diagnostic() const { return m_diagnostic; }
+
+private:
+ const Diagnostic m_diagnostic;
};
Client::Client(BaseClientInterface *clientInterface)
: m_id(Core::Id::fromString(QUuid::createUuid().toString()))
, m_completionProvider(this)
+ , m_quickFixProvider(this)
, m_clientInterface(clientInterface)
{
m_contentHandler.insert(JsonRpcMessageHandler::jsonRpcMimeType(),
@@ -101,8 +108,10 @@ Client::~Client()
using namespace TextEditor;
// FIXME: instead of replacing the completion provider in the text document store the
// completion provider as a prioritised list in the text document
- for (TextDocument *document : m_resetCompletionProvider)
+ for (TextDocument *document : m_resetAssistProvider) {
document->setCompletionAssistProvider(nullptr);
+ document->setQuickFixAssistProvider(nullptr);
+ }
for (Core::IEditor * editor : Core::DocumentModel::editorsForOpenedDocuments()) {
if (auto textEditor = qobject_cast<BaseTextEditor *>(editor)) {
TextEditorWidget *widget = textEditor->editorWidget();
@@ -192,10 +201,12 @@ void Client::openDocument(Core::IDocument *document)
documentContentsChanged(document);
});
if (textDocument) {
- m_resetCompletionProvider << textDocument;
+ textDocument->completionAssistProvider();
+ m_resetAssistProvider << textDocument;
textDocument->setCompletionAssistProvider(&m_completionProvider);
+ textDocument->setQuickFixAssistProvider(&m_quickFixProvider);
connect(textDocument, &QObject::destroyed, this, [this, textDocument]{
- m_resetCompletionProvider.remove(textDocument);
+ m_resetAssistProvider.remove(textDocument);
});
if (BaseTextEditor *editor = BaseTextEditor::textEditorForDocument(textDocument)) {
if (QPointer<TextEditorWidget> widget = editor->editorWidget()) {
@@ -543,25 +554,10 @@ void Client::cursorPositionChanged(TextEditor::TextEditorWidget *widget)
void Client::requestCodeActions(const DocumentUri &uri, const QList<Diagnostic> &diagnostics)
{
const Utils::FileName fileName = uri.toFileName();
- TextEditor::TextDocument *doc = textDocumentForFileName(fileName);
+ TextEditor::TextDocument *doc = TextEditor::TextDocument::textDocumentForFileName(fileName);
if (!doc)
return;
- const QString method(CodeActionRequest::methodName);
- if (Utils::optional<bool> registered = m_dynamicCapabilities.isRegistered(method)) {
- if (!registered.value())
- return;
- const TextDocumentRegistrationOptions option(
- m_dynamicCapabilities.option(method).toObject());
- if (option.isValid(nullptr) && !option.filterApplies(fileName))
- return;
- } else {
- Utils::variant<bool, CodeActionOptions> provider
- = m_serverCapabilities.codeActionProvider().value_or(false);
- if (!(Utils::holds_alternative<CodeActionOptions>(provider) || Utils::get<bool>(provider)))
- return;
- }
-
CodeActionParams codeActionParams;
CodeActionParams::CodeActionContext context;
context.setDiagnostics(diagnostics);
@@ -577,6 +573,32 @@ void Client::requestCodeActions(const DocumentUri &uri, const QList<Diagnostic>
if (self)
self->handleCodeActionResponse(response, uri);
});
+ requestCodeActions(request);
+}
+
+void Client::requestCodeActions(const CodeActionRequest &request)
+{
+ if (!request.isValid(nullptr))
+ return;
+
+ const Utils::FileName fileName
+ = request.params().value_or(CodeActionParams()).textDocument().uri().toFileName();
+
+ const QString method(CodeActionRequest::methodName);
+ if (Utils::optional<bool> registered = m_dynamicCapabilities.isRegistered(method)) {
+ if (!registered.value())
+ return;
+ const TextDocumentRegistrationOptions option(
+ m_dynamicCapabilities.option(method).toObject());
+ if (option.isValid(nullptr) && !option.filterApplies(fileName))
+ return;
+ } else {
+ Utils::variant<bool, CodeActionOptions> provider
+ = m_serverCapabilities.codeActionProvider().value_or(false);
+ if (!(Utils::holds_alternative<CodeActionOptions>(provider) || Utils::get<bool>(provider)))
+ return;
+ }
+
sendContent(request);
}
@@ -682,6 +704,17 @@ bool Client::needsRestart(const BaseSettings *settings) const
|| m_languagFilter.filePattern != settings->m_languageFilter.filePattern;
}
+QList<Diagnostic> Client::diagnosticsAt(const DocumentUri &uri, const Range &range) const
+{
+ QList<Diagnostic> diagnostics;
+ for (const TextMark *mark : m_diagnostics[uri]) {
+ const Diagnostic diagnostic = mark->diagnostic();
+ if (diagnostic.range().overlaps(range))
+ diagnostics << diagnostic;
+ }
+ return diagnostics;
+}
+
bool Client::start()
{
return m_clientInterface->start();
@@ -778,7 +811,8 @@ void Client::showMessageBox(const ShowMessageRequestParams &message, const Messa
void Client::showDiagnostics(const DocumentUri &uri)
{
- if (TextEditor::TextDocument *doc = textDocumentForFileName(uri.toFileName())) {
+ if (TextEditor::TextDocument *doc
+ = TextEditor::TextDocument::textDocumentForFileName(uri.toFileName())) {
for (TextMark *mark : m_diagnostics.value(uri))
doc->addMark(mark);
}
@@ -786,7 +820,8 @@ void Client::showDiagnostics(const DocumentUri &uri)
void Client::removeDiagnostics(const DocumentUri &uri)
{
- TextEditor::TextDocument *doc = textDocumentForFileName(uri.toFileName());
+ TextEditor::TextDocument *doc
+ = TextEditor::TextDocument::textDocumentForFileName(uri.toFileName());
for (TextMark *mark : m_diagnostics.take(uri)) {
if (doc)
diff --git a/src/plugins/languageclient/client.h b/src/plugins/languageclient/client.h
index 3d691f2bd2..2d92424f42 100644
--- a/src/plugins/languageclient/client.h
+++ b/src/plugins/languageclient/client.h
@@ -26,7 +26,8 @@
#pragma once
#include "dynamiccapabilities.h"
-#include "languageclientcodeassist.h"
+#include "languageclientcompletionassist.h"
+#include "languageclientquickfix.h"
#include "languageclientsettings.h"
#include <coreplugin/id.h>
@@ -104,6 +105,7 @@ public:
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
const QList<LanguageServerProtocol::Diagnostic> &diagnostics);
+ void requestCodeActions(const LanguageServerProtocol::CodeActionRequest &request);
void handleCodeActionResponse(const LanguageServerProtocol::CodeActionRequest::Response &response,
const LanguageServerProtocol::DocumentUri &uri);
void executeCommand(const LanguageServerProtocol::Command &command);
@@ -129,6 +131,10 @@ public:
bool needsRestart(const BaseSettings *) const;
+ QList<LanguageServerProtocol::Diagnostic> diagnosticsAt(
+ const LanguageServerProtocol::DocumentUri &uri,
+ const LanguageServerProtocol::Range &range) const;
+
bool start();
bool reset();
@@ -184,7 +190,8 @@ private:
LanguageServerProtocol::ServerCapabilities m_serverCapabilities;
DynamicCapabilities m_dynamicCapabilities;
LanguageClientCompletionAssistProvider m_completionProvider;
- QSet<TextEditor::TextDocument *> m_resetCompletionProvider;
+ LanguageClientQuickFixProvider m_quickFixProvider;
+ QSet<TextEditor::TextDocument *> m_resetAssistProvider;
QHash<LanguageServerProtocol::DocumentUri, LanguageServerProtocol::MessageId> m_highlightRequests;
int m_restartsLeft = 5;
QScopedPointer<BaseClientInterface> m_clientInterface;
diff --git a/src/plugins/languageclient/languageclient.pro b/src/plugins/languageclient/languageclient.pro
index 59c568a75b..dbae20e109 100644
--- a/src/plugins/languageclient/languageclient.pro
+++ b/src/plugins/languageclient/languageclient.pro
@@ -6,11 +6,12 @@ HEADERS += \
client.h \
dynamiccapabilities.h \
languageclient_global.h \
- languageclientcodeassist.h \
+ languageclientcompletionassist.h \
languageclientinterface.h \
languageclientmanager.h \
languageclientoutline.h \
languageclientplugin.h \
+ languageclientquickfix.h \
languageclientsettings.h \
languageclientutils.h
@@ -18,11 +19,12 @@ HEADERS += \
SOURCES += \
client.cpp \
dynamiccapabilities.cpp \
- languageclientcodeassist.cpp \
+ languageclientcompletionassist.cpp \
languageclientinterface.cpp \
languageclientmanager.cpp \
languageclientoutline.cpp \
languageclientplugin.cpp \
+ languageclientquickfix.cpp \
languageclientsettings.cpp \
languageclientutils.cpp
diff --git a/src/plugins/languageclient/languageclient.qbs b/src/plugins/languageclient/languageclient.qbs
index 0da6a58076..0c2752ef5e 100644
--- a/src/plugins/languageclient/languageclient.qbs
+++ b/src/plugins/languageclient/languageclient.qbs
@@ -20,16 +20,18 @@ QtcPlugin {
"dynamiccapabilities.h",
"languageclient.qrc",
"languageclient_global.h",
- "languageclientcodeassist.cpp",
- "languageclientcodeassist.h",
"languageclientinterface.cpp",
"languageclientinterface.h",
+ "languageclientcompletionassist.cpp",
+ "languageclientcompletionassist.h",
"languageclientmanager.cpp",
"languageclientmanager.h",
"languageclientoutline.cpp",
"languageclientoutline.h",
"languageclientplugin.cpp",
"languageclientplugin.h",
+ "languageclientquickfix.cpp",
+ "languageclientquickfix.h",
"languageclientsettings.cpp",
"languageclientsettings.h",
"languageclientutils.cpp",
diff --git a/src/plugins/languageclient/languageclientcodeassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp
index af0e9ce892..1d9a10f6e4 100644
--- a/src/plugins/languageclient/languageclientcodeassist.cpp
+++ b/src/plugins/languageclient/languageclientcompletionassist.cpp
@@ -23,7 +23,7 @@
**
****************************************************************************/
-#include "languageclientcodeassist.h"
+#include "languageclientcompletionassist.h"
#include "client.h"
#include "languageclientutils.h"
diff --git a/src/plugins/languageclient/languageclientcodeassist.h b/src/plugins/languageclient/languageclientcompletionassist.h
index 1410e67f82..f0ad95bc88 100644
--- a/src/plugins/languageclient/languageclientcodeassist.h
+++ b/src/plugins/languageclient/languageclientcompletionassist.h
@@ -48,7 +48,7 @@ public:
private:
QList<QString> m_triggerChars;
int m_activationCharSequenceLength = 0;
- Client *m_client;
+ Client *m_client = nullptr; // not owned
};
} // namespace LanguageClient
diff --git a/src/plugins/languageclient/languageclientquickfix.cpp b/src/plugins/languageclient/languageclientquickfix.cpp
new file mode 100644
index 0000000000..def01b17d8
--- /dev/null
+++ b/src/plugins/languageclient/languageclientquickfix.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#include "languageclientquickfix.h"
+
+#include "client.h"
+#include "languageclientutils.h"
+
+#include <texteditor/codeassist/assistinterface.h>
+#include <texteditor/codeassist/genericproposal.h>
+#include <texteditor/codeassist/iassistprocessor.h>
+#include <texteditor/quickfix.h>
+
+
+using namespace LanguageServerProtocol;
+using namespace TextEditor;
+
+namespace LanguageClient {
+
+class CodeActionQuickFixOperation : public QuickFixOperation
+{
+public:
+ CodeActionQuickFixOperation(const CodeAction &action, Client *client)
+ : m_action(action)
+ , m_client(client)
+ { setDescription(action.title()); }
+
+ void perform() override
+ {
+ if (Utils::optional<WorkspaceEdit> edit = m_action.edit()) {
+ applyWorkspaceEdit(*edit);
+ } else if (Utils::optional<Command> command = m_action.command()) {
+ if (m_client)
+ m_client->executeCommand(*command);
+ }
+ }
+
+private:
+ CodeAction m_action;
+ QPointer<Client> m_client;
+};
+
+class CommandQuickFixOperation : public QuickFixOperation
+{
+public:
+ CommandQuickFixOperation(const Command &command, Client *client)
+ : m_command(command)
+ , m_client(client)
+ { setDescription(command.title()); }
+ void perform() override
+ {
+ if (m_client)
+ m_client->executeCommand(m_command);
+ }
+
+private:
+ Command m_command;
+ QPointer<Client> m_client;
+};
+
+class LanguageClientQuickFixAssistProcessor : public IAssistProcessor
+{
+public:
+ explicit LanguageClientQuickFixAssistProcessor(Client *client) : m_client(client) {}
+ bool running() override { return m_running; }
+ IAssistProposal *perform(const AssistInterface *interface) override;
+
+private:
+ void handleCodeActionResponse(const CodeActionRequest::Response &response);
+
+ QSharedPointer<const AssistInterface> m_assistInterface;
+ Client *m_client = nullptr; // not owned
+ bool m_running = false;
+};
+
+IAssistProposal *LanguageClientQuickFixAssistProcessor::perform(const AssistInterface *interface)
+{
+ m_assistInterface = QSharedPointer<const AssistInterface>(interface);
+
+ CodeActionParams params;
+ params.setContext({});
+ QTextCursor cursor(interface->textDocument());
+ cursor.setPosition(interface->position());
+ if (cursor.atBlockEnd() || cursor.atBlockStart())
+ cursor.select(QTextCursor::LineUnderCursor);
+ else
+ cursor.select(QTextCursor::WordUnderCursor);
+ if (!cursor.hasSelection())
+ cursor.select(QTextCursor::LineUnderCursor);
+ Range range(cursor);
+ params.setRange(range);
+ auto uri = DocumentUri::fromFileName(Utils::FileName::fromString(interface->fileName()));
+ params.setTextDocument(uri);
+ CodeActionParams::CodeActionContext context;
+ context.setDiagnostics(m_client->diagnosticsAt(uri, range));
+ params.setContext(context);
+
+ CodeActionRequest request(params);
+ request.setResponseCallback([this](const CodeActionRequest::Response &response){
+ handleCodeActionResponse(response);
+ });
+
+ m_client->requestCodeActions(request);
+ m_running = true;
+ return nullptr;
+}
+
+void LanguageClientQuickFixAssistProcessor::handleCodeActionResponse(
+ const CodeActionRequest::Response &response)
+{
+ m_running = false;
+ if (const Utils::optional<CodeActionRequest::Response::Error> &error = response.error())
+ m_client->log(*error);
+ QuickFixOperations ops;
+ if (const Utils::optional<CodeActionResult> &_result = response.result()) {
+ const CodeActionResult &result = _result.value();
+ if (auto list = Utils::get_if<QList<Utils::variant<Command, CodeAction>>>(&result)) {
+ for (const Utils::variant<Command, CodeAction> &item : *list) {
+ if (auto action = Utils::get_if<CodeAction>(&item))
+ ops << new CodeActionQuickFixOperation(*action, m_client);
+ else if (auto command = Utils::get_if<Command>(&item))
+ ops << new CommandQuickFixOperation(*command, m_client);
+ }
+ }
+ }
+ setAsyncProposalAvailable(GenericProposal::createProposal(m_assistInterface.data(), ops));
+}
+
+LanguageClientQuickFixProvider::LanguageClientQuickFixProvider(Client *client) : m_client(client)
+{
+ QTC_CHECK(client);
+}
+
+IAssistProvider::RunType LanguageClientQuickFixProvider::runType() const
+{
+ return Asynchronous;
+}
+
+IAssistProcessor *LanguageClientQuickFixProvider::createProcessor() const
+{
+ return new LanguageClientQuickFixAssistProcessor(m_client);
+}
+
+} // namespace LanguageClient
diff --git a/src/plugins/languageclient/languageclientquickfix.h b/src/plugins/languageclient/languageclientquickfix.h
new file mode 100644
index 0000000000..d9b322769f
--- /dev/null
+++ b/src/plugins/languageclient/languageclientquickfix.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include <texteditor/codeassist/iassistprovider.h>
+
+namespace LanguageClient {
+
+class Client;
+
+class LanguageClientQuickFixProvider : public TextEditor::IAssistProvider
+{
+public:
+ explicit LanguageClientQuickFixProvider(Client *client);
+ IAssistProvider::RunType runType() const override;
+ TextEditor::IAssistProcessor *createProcessor() const override;
+
+private:
+ Client *m_client = nullptr; // not owned
+};
+
+} // namespace LanguageClient
diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp
index e101db412c..17ea39f80e 100644
--- a/src/plugins/languageclient/languageclientsettings.cpp
+++ b/src/plugins/languageclient/languageclientsettings.cpp
@@ -34,9 +34,8 @@
#include <utils/algorithm.h>
#include <utils/delegates.h>
#include <utils/fancylineedit.h>
-#include <utils/qtcprocess.h>
#include <utils/mimetypes/mimedatabase.h>
-#include <languageserverprotocol/lsptypes.h>
+#include <utils/jsontreeitem.h>
#include <QBoxLayout>
#include <QCheckBox>
@@ -150,7 +149,6 @@ LanguageClientSettingsPageWidget::LanguageClientSettingsPageWidget(LanguageClien
connect(addButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::addItem);
auto deleteButton = new QPushButton(LanguageClientSettingsPage::tr("&Delete"));
connect(deleteButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::deleteItem);
-
mainLayout->addLayout(layout);
setLayout(mainLayout);
layout->addWidget(m_view);
@@ -505,6 +503,24 @@ BaseClientInterface *StdIOSettings::createInterface() const
return new StdIOClientInterface(m_executable, m_arguments);
}
+static QWidget *createCapabilitiesView(
+ const LanguageServerProtocol::ServerCapabilities &capabilities)
+{
+ auto root = new Utils::JsonTreeItem("Capabilities", QJsonValue(capabilities));
+ if (root->canFetchMore())
+ root->fetchMore();
+
+ auto capabilitiesModel = new Utils::TreeModel<Utils::JsonTreeItem>(root);
+ capabilitiesModel->setHeader({BaseSettingsWidget::tr("Name"),
+ BaseSettingsWidget::tr("Value"),
+ BaseSettingsWidget::tr("Type")});
+ auto capabilitiesView = new QTreeView();
+ capabilitiesView->setModel(capabilitiesModel);
+ capabilitiesView->setAlternatingRowColors(true);
+ capabilitiesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+ return capabilitiesView;
+}
+
BaseSettingsWidget::BaseSettingsWidget(const BaseSettings *settings, QWidget *parent)
: QWidget(parent)
, m_name(new QLineEdit(settings->m_name, this))
@@ -528,6 +544,30 @@ BaseSettingsWidget::BaseSettingsWidget(const BaseSettings *settings, QWidget *pa
connect(addMimeTypeButton, &QPushButton::pressed,
this, &BaseSettingsWidget::showAddMimeTypeDialog);
+ auto createInfoLabel = []() {
+ return new QLabel(tr("Available after server was initialized"));
+ };
+
+ mainLayout->addWidget(new QLabel(tr("Capabilities:")), ++row, 0, Qt::AlignTop);
+ if (Client *client = settings->m_client.data()) {
+ if (client->state() == Client::Initialized)
+ mainLayout->addWidget(createCapabilitiesView(client->capabilities()));
+ else
+ mainLayout->addWidget(createInfoLabel(), row, 1);
+ connect(client, &Client::finished, mainLayout, [mainLayout, row, createInfoLabel]() {
+ delete mainLayout->itemAtPosition(row, 1)->widget();
+ mainLayout->addWidget(createInfoLabel(), row, 1);
+ });
+ connect(client, &Client::initialized, mainLayout,
+ [mainLayout, row](
+ const LanguageServerProtocol::ServerCapabilities &capabilities) {
+ delete mainLayout->itemAtPosition(row, 1)->widget();
+ mainLayout->addWidget(createCapabilitiesView(capabilities), row, 1);
+ });
+ } else {
+ mainLayout->addWidget(createInfoLabel());
+ }
+
setLayout(mainLayout);
}
diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp
index 5f3f8e0672..f81be2427c 100644
--- a/src/plugins/languageclient/languageclientutils.cpp
+++ b/src/plugins/languageclient/languageclientutils.cpp
@@ -40,6 +40,7 @@
using namespace LanguageServerProtocol;
using namespace Utils;
+using namespace TextEditor;
namespace LanguageClient {
@@ -72,7 +73,7 @@ bool applyTextDocumentEdit(const TextDocumentEdit &edit)
if (edits.isEmpty())
return true;
const DocumentUri &uri = edit.id().uri();
- if (TextEditor::TextDocument* doc = textDocumentForFileName(uri.toFileName())) {
+ if (TextDocument* doc = TextDocument::textDocumentForFileName(uri.toFileName())) {
LanguageClientValue<int> version = edit.id().version();
if (!version.isNull() && version.value(0) < doc->document()->revision())
return false;
@@ -84,14 +85,14 @@ bool applyTextEdits(const DocumentUri &uri, const QList<TextEdit> &edits)
{
if (edits.isEmpty())
return true;
- TextEditor::RefactoringChanges changes;
- TextEditor::RefactoringFilePtr file;
+ RefactoringChanges changes;
+ RefactoringFilePtr file;
file = changes.file(uri.toFileName().toString());
file->setChangeSet(editsToChangeSet(edits, file->document()));
return file->apply();
}
-void applyTextEdit(TextEditor::TextDocumentManipulatorInterface &manipulator, const TextEdit &edit)
+void applyTextEdit(TextDocumentManipulatorInterface &manipulator, const TextEdit &edit)
{
using namespace Utils::Text;
const Range range = edit.range();
@@ -118,12 +119,6 @@ bool applyWorkspaceEdit(const WorkspaceEdit &edit)
return result;
}
-TextEditor::TextDocument *textDocumentForFileName(const FileName &fileName)
-{
- return qobject_cast<TextEditor::TextDocument *>(
- Core::DocumentModel::documentForFilePath(fileName.toString()));
-}
-
QTextCursor endOfLineCursor(const QTextCursor &cursor)
{
QTextCursor ret = cursor;
@@ -135,8 +130,7 @@ void updateCodeActionRefactoringMarker(Client *client,
const CodeAction &action,
const DocumentUri &uri)
{
- using namespace TextEditor;
- TextDocument* doc = textDocumentForFileName(uri.toFileName());
+ TextDocument* doc = TextDocument::textDocumentForFileName(uri.toFileName());
if (!doc)
return;
BaseTextEditor *editor = BaseTextEditor::textEditorForDocument(doc);
diff --git a/src/plugins/languageclient/languageclientutils.h b/src/plugins/languageclient/languageclientutils.h
index 2891c2d303..f07b6e18bf 100644
--- a/src/plugins/languageclient/languageclientutils.h
+++ b/src/plugins/languageclient/languageclientutils.h
@@ -45,7 +45,6 @@ bool applyTextEdits(const LanguageServerProtocol::DocumentUri &uri,
const QList<LanguageServerProtocol::TextEdit> &edits);
void applyTextEdit(TextEditor::TextDocumentManipulatorInterface &manipulator,
const LanguageServerProtocol::TextEdit &edit);
-TextEditor::TextDocument *textDocumentForFileName(const Utils::FileName &fileName);
void updateCodeActionRefactoringMarker(Client *client,
const LanguageServerProtocol::CodeAction &action,
const LanguageServerProtocol::DocumentUri &uri);
diff --git a/src/plugins/perfprofiler/perfdatareader.cpp b/src/plugins/perfprofiler/perfdatareader.cpp
index 3fec773bad..c137e87b8c 100644
--- a/src/plugins/perfprofiler/perfdatareader.cpp
+++ b/src/plugins/perfprofiler/perfdatareader.cpp
@@ -77,7 +77,8 @@ PerfDataReader::PerfDataReader(QObject *parent) :
QMessageBox::warning(Core::ICore::mainWindow(),
tr("Perf data parser failed"),
tr("The perf data parser failed to process all the samples. "
- "Your trace is incomplete."));
+ "Your trace is incomplete. The exit code was %1.")
+ .arg(exitCode));
}
});
@@ -120,6 +121,7 @@ PerfDataReader::PerfDataReader(QObject *parent) :
qWarning() << "Cannot send data to perfparser";
break;
case QProcess::Timedout:
+ qWarning() << "QProcess::Timedout";
default:
break;
}
@@ -349,8 +351,10 @@ void PerfDataReader::writeChunk()
"Your trace is incomplete."));
}
}
- } else if (m_dataFinished) {
- m_input.closeWriteChannel();
+ } else if (m_dataFinished && m_input.isWritable()) {
+ // Delay closing of the write channel. Closing the channel from within a handler
+ // for bytesWritten() is dangerous on windows.
+ QTimer::singleShot(0, &m_input, &QProcess::closeWriteChannel);
}
}
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
index 8e384b2036..41cbe1763b 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
@@ -46,7 +46,6 @@
#include <QVariantMap>
#include <qbs.h>
-#include <qtprofilesetup.h>
const QChar sep = QLatin1Char('.');
@@ -166,45 +165,9 @@ void QbsManager::addProfile(const QString &name, const QVariantMap &data)
void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectExplorer::Kit *k)
{
- const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k);
- if (!qt)
- return;
-
- qbs::QtEnvironment qtEnv;
- const QList<ProjectExplorer::Abi> abi = qt->qtAbis();
- if (!abi.empty()) {
- qtEnv.architecture = ProjectExplorer::Abi::toString(abi.first().architecture());
- if (abi.first().wordWidth() == 64)
- qtEnv.architecture.append(QLatin1String("_64"));
- }
- qtEnv.binaryPath = qt->binPath().toString();
- qtEnv.documentationPath = qt->docsPath().toString();
- qtEnv.includePath = qt->headerPath().toString();
- qtEnv.libraryPath = qt->libraryPath().toString();
- qtEnv.pluginPath = qt->pluginPath().toString();
- qtEnv.mkspecBasePath = qt->mkspecsPath().toString();
- qtEnv.mkspecName = qt->mkspec().toString();
- qtEnv.mkspecPath = qt->mkspecPath().toString();
- qtEnv.qtNameSpace = qt->qtNamespace();
- qtEnv.qtLibInfix = qt->qtLibInfix();
- qtEnv.qtVersion = qt->qtVersionString();
- qtEnv.qtMajorVersion = qt->qtVersion().majorVersion;
- qtEnv.qtMinorVersion = qt->qtVersion().minorVersion;
- qtEnv.qtPatchVersion = qt->qtVersion().patchVersion;
- qtEnv.frameworkBuild = qt->isFrameworkBuild();
- qtEnv.configItems = qt->configValues();
- qtEnv.qtConfigItems = qt->qtConfigValues();
- foreach (const QString &buildVariant,
- QStringList() << QLatin1String("debug") << QLatin1String("release")) {
- if (qtEnv.qtConfigItems.contains(buildVariant))
- qtEnv.buildVariant << buildVariant;
- }
- qtEnv.qmlPath = qt->qmlPath().toString();
- qtEnv.qmlImportPath = qt->qmakeProperty("QT_INSTALL_IMPORTS");
- const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv);
- if (errorInfo.hasError()) {
- Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1")
- .arg(errorInfo.toString()), Core::MessageManager::ModeSwitch);
+ if (const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(k)) {
+ qbs::Profile(profileName, settings()).setValue("moduleProviders.Qt.qmakeFilePaths",
+ qt->qmakeCommand().toString());
}
}
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
index d5d0b1b79a..bef7cd2a05 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
@@ -5,11 +5,9 @@ isEmpty(QBS_INSTALL_DIR): QBS_INSTALL_DIR = $$(QBS_INSTALL_DIR)
isEmpty(QBS_INSTALL_DIR) {
QBS_SOURCE_DIR = $$PWD/../../shared/qbs
include($$QBS_SOURCE_DIR/src/lib/corelib/use_corelib.pri)
- include($$QBS_SOURCE_DIR/src/lib/qtprofilesetup/use_qtprofilesetup.pri)
osx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../Frameworks # OS X: fix rpath for qbscore soname
} else {
include($${QBS_INSTALL_DIR}/include/qbs/use_installed_corelib.pri)
- include($${QBS_INSTALL_DIR}/include/qbs/use_installed_qtprofilesetup.pri)
}
QBS_INSTALL_DIR_FWD_SLASHES = $$replace(QBS_INSTALL_DIR, \\\\, /)
DEFINES += QBS_INSTALL_DIR=\\\"$$QBS_INSTALL_DIR_FWD_SLASHES\\\"
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
index 6c7793db55..45e5d1f3a4 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
@@ -20,7 +20,7 @@ QtcPlugin {
if (qbs.enableDebugCode)
suffix = "d";
}
- libs.push("qbscore" + suffix, "qbsqtprofilesetup" + suffix);
+ libs.push("qbscore" + suffix);
return libs
}
@@ -33,10 +33,6 @@ QtcPlugin {
name: "qbscore"
condition: product.useInternalQbsProducts
}
- Depends {
- name: "qbsqtprofilesetup"
- condition: product.useInternalQbsProducts
- }
Depends { name: "QmlJS" }
Depends { name: "Utils" }
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp
index 67abdece26..8b790c3351 100644
--- a/src/plugins/qmljseditor/qmljsfindreferences.cpp
+++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp
@@ -322,10 +322,12 @@ protected:
bool visit(AST::UiPublicMember *node) override
{
- if (node->memberType->name == _name){
- const ObjectValue * tVal = _context->lookupType(_doc.data(), QStringList(_name));
- if (tVal == _typeValue)
- _usages.append(node->typeToken);
+ if (UiQualifiedId *memberType = node->memberType) {
+ if (memberType->name == _name) {
+ const ObjectValue * tVal = _context->lookupType(_doc.data(), QStringList(_name));
+ if (tVal == _typeValue)
+ _usages.append(node->typeToken);
+ }
}
if (AST::cast<Block *>(node->statement)) {
_builder.push(node);
diff --git a/src/plugins/remotelinux/linuxdeviceprocess.cpp b/src/plugins/remotelinux/linuxdeviceprocess.cpp
index 1dac2e4408..004ca63d2a 100644
--- a/src/plugins/remotelinux/linuxdeviceprocess.cpp
+++ b/src/plugins/remotelinux/linuxdeviceprocess.cpp
@@ -42,6 +42,9 @@ LinuxDeviceProcess::LinuxDeviceProcess(const QSharedPointer<const ProjectExplore
: ProjectExplorer::SshDeviceProcess(device, parent), m_processId(0)
{
connect(this, &DeviceProcess::finished, this, [this]() {
+ m_processId = -1;
+ });
+ connect(this, &DeviceProcess::started, this, [this]() {
m_processId = 0;
});
}
@@ -70,7 +73,7 @@ QByteArray LinuxDeviceProcess::readAllStandardOutput()
qint64 LinuxDeviceProcess::processId() const
{
- return m_processId;
+ return m_processId < 0 ? 0 : m_processId;
}
QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
diff --git a/src/plugins/texteditor/textdocument.cpp b/src/plugins/texteditor/textdocument.cpp
index 98096daee9..2bfb51439a 100644
--- a/src/plugins/texteditor/textdocument.cpp
+++ b/src/plugins/texteditor/textdocument.cpp
@@ -100,6 +100,7 @@ public:
QTextDocument m_document;
SyntaxHighlighter *m_highlighter = nullptr;
CompletionAssistProvider *m_completionAssistProvider = nullptr;
+ IAssistProvider *m_quickFixProvider = nullptr;
QScopedPointer<Indenter> m_indenter;
bool m_fileIsReadOnly = false;
@@ -298,6 +299,11 @@ TextDocument *TextDocument::currentTextDocument()
return qobject_cast<TextDocument *>(EditorManager::currentDocument());
}
+TextDocument *TextDocument::textDocumentForFileName(const Utils::FileName &fileName)
+{
+ return qobject_cast<TextDocument *>(DocumentModel::documentForFilePath(fileName.toString()));
+}
+
QString TextDocument::plainText() const
{
return document()->toPlainText();
@@ -388,9 +394,14 @@ CompletionAssistProvider *TextDocument::completionAssistProvider() const
return d->m_completionAssistProvider;
}
+void TextDocument::setQuickFixAssistProvider(IAssistProvider *provider) const
+{
+ d->m_quickFixProvider = provider;
+}
+
IAssistProvider *TextDocument::quickFixAssistProvider() const
{
- return nullptr;
+ return d->m_quickFixProvider;
}
void TextDocument::applyFontSettings()
diff --git a/src/plugins/texteditor/textdocument.h b/src/plugins/texteditor/textdocument.h
index b7c771e748..9ea1751b11 100644
--- a/src/plugins/texteditor/textdocument.h
+++ b/src/plugins/texteditor/textdocument.h
@@ -70,6 +70,7 @@ public:
static QMap<QString, QString> openedTextDocumentContents();
static QMap<QString, QTextCodec *> openedTextDocumentEncodings();
static TextDocument *currentTextDocument();
+ static TextDocument *textDocumentForFileName(const Utils::FileName &fileName);
virtual QString plainText() const;
virtual QString textAt(int pos, int length) const;
@@ -140,6 +141,7 @@ public:
void setCompletionAssistProvider(CompletionAssistProvider *provider);
virtual CompletionAssistProvider *completionAssistProvider() const;
+ void setQuickFixAssistProvider(IAssistProvider *provider) const;
virtual IAssistProvider *quickFixAssistProvider() const;
void setTabSettings(const TextEditor::TabSettings &tabSettings);
diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp
index 8995167564..22ddbbec03 100644
--- a/src/plugins/texteditor/textmark.cpp
+++ b/src/plugins/texteditor/textmark.cpp
@@ -361,11 +361,8 @@ TextMarkRegistry::TextMarkRegistry(QObject *parent)
void TextMarkRegistry::add(TextMark *mark)
{
instance()->m_marks[mark->fileName()].insert(mark);
- auto document = qobject_cast<TextDocument *>(
- DocumentModel::documentForFilePath(mark->fileName().toString()));
- if (!document)
- return;
- document->addMark(mark);
+ if (TextDocument *document = TextDocument::textDocumentForFileName(mark->fileName()))
+ document->addMark(mark);
}
bool TextMarkRegistry::remove(TextMark *mark)
diff --git a/src/plugins/welcome/introductionwidget.cpp b/src/plugins/welcome/introductionwidget.cpp
index d0c993b6e8..d10cb76be2 100644
--- a/src/plugins/welcome/introductionwidget.cpp
+++ b/src/plugins/welcome/introductionwidget.cpp
@@ -31,6 +31,7 @@
#include <utils/stylehelper.h>
#include <QEvent>
+#include <QGuiApplication>
#include <QKeyEvent>
#include <QLabel>
#include <QPainter>
@@ -349,8 +350,17 @@ void IntroductionWidget::keyPressEvent(QKeyEvent *ke)
{
if (ke->key() == Qt::Key_Escape)
finish();
- else if (ke->modifiers() == Qt::NoModifier)
- step();
+ else if ((ke->modifiers()
+ & (Qt::ControlModifier | Qt::AltModifier | Qt::ShiftModifier | Qt::MetaModifier))
+ == Qt::NoModifier) {
+ const Qt::Key backKey = QGuiApplication::isLeftToRight() ? Qt::Key_Left : Qt::Key_Right;
+ if (ke->key() == backKey) {
+ if (m_step > 0)
+ setStep(m_step - 1);
+ } else {
+ step();
+ }
+ }
}
void IntroductionWidget::mouseReleaseEvent(QMouseEvent *me)
diff --git a/src/shared/proparser/prowriter.cpp b/src/shared/proparser/prowriter.cpp
index cd598028ae..e602c3bf0b 100644
--- a/src/shared/proparser/prowriter.cpp
+++ b/src/shared/proparser/prowriter.cpp
@@ -27,6 +27,8 @@
#include "prowriter.h"
#include "proitems.h"
+#include <utils/algorithm.h>
+
#include <QDir>
#include <QPair>
#include <QRegularExpression>
@@ -36,7 +38,7 @@ using namespace QmakeProjectManager::Internal;
static uint getBlockLen(const ushort *&tokPtr)
{
uint len = *tokPtr++;
- len |= (uint)*tokPtr++ << 16;
+ len |= uint(*tokPtr++ << 16);
return len;
}
@@ -51,10 +53,10 @@ static bool getLiteral(const ushort *tokPtr, const ushort *tokEnd, QString &tmp)
break;
case TokHashLiteral:
tokPtr += 2;
- // fallthrough
+ Q_FALLTHROUGH();
case TokLiteral: {
- uint len = *tokPtr++;
- tmp.setRawData((const QChar *)tokPtr, len);
+ int len = *tokPtr++;
+ tmp.setRawData(reinterpret_cast<const QChar *>(tokPtr), len);
count++;
tokPtr += len;
break; }
@@ -87,7 +89,7 @@ static void skipBlock(const ushort *&tokPtr)
static void skipExpression(const ushort *&pTokPtr, int &lineNo)
{
const ushort *tokPtr = pTokPtr;
- forever {
+ for (;;) {
ushort tok = *tokPtr++;
switch (tok) {
case TokLine:
@@ -136,13 +138,13 @@ static const ushort *skipToken(ushort tok, const ushort *&tokPtr, int &lineNo)
case TokRemove:
case TokReplace:
tokPtr++;
- // fallthrough
+ Q_FALLTHROUGH();
case TokTestCall:
skipExpression(tokPtr, lineNo);
break;
case TokForLoop:
skipHashStr(tokPtr);
- // fallthrough
+ Q_FALLTHROUGH();
case TokBranch:
skipBlock(tokPtr);
skipBlock(tokPtr);
@@ -168,14 +170,14 @@ static const ushort *skipToken(ushort tok, const ushort *&tokPtr, int &lineNo)
}
Q_ASSERT_X(false, "skipToken", "unexpected item type");
}
- return 0;
+ return nullptr;
}
QString ProWriter::compileScope(const QString &scope)
{
if (scope.isEmpty())
return QString();
- QMakeParser parser(0, 0, 0);
+ QMakeParser parser(nullptr, nullptr, nullptr);
ProFile *includeFile = parser.parsedProBlock(QStringRef(&scope), 0, QLatin1String("no-file"), 1);
if (!includeFile)
return QString();
@@ -204,11 +206,11 @@ bool ProWriter::locateVarValues(const ushort *tokPtr, const ushort *tokPtrEnd,
const bool inScope = scope.isEmpty();
int lineNo = *scopeStart + 1;
QString tmp;
- const ushort *lastXpr = 0;
+ const ushort *lastXpr = nullptr;
bool fresh = true;
QString compiledScope = compileScope(scope);
- const ushort *cTokPtr = (const ushort *)compiledScope.constData();
+ const ushort *cTokPtr = reinterpret_cast<const ushort *>(compiledScope.constData());
while (ushort tok = *tokPtr++) {
if (inScope && (tok == TokAssign || tok == TokAppend || tok == TokAppendUnique)) {
@@ -323,7 +325,7 @@ void ProWriter::putVarValues(ProFile *profile, QStringList *lines, const QString
if (eqs >= 0) // If this is not true, we mess up the file a bit.
line.truncate(eqs + 1);
// put new values
- foreach (const QString &v, values) {
+ for (const QString &v : values) {
line += ((flags & MultiLine) ? QLatin1String(" \\\n") + effectiveContIndent(contInfo)
: QString::fromLatin1(" ")) + v;
}
@@ -388,9 +390,10 @@ void ProWriter::putVarValues(ProFile *profile, QStringList *lines, const QString
if (lNo != scopeStart + 1)
added += QLatin1Char('\n');
added += indent + var + QLatin1String((flags & AppendOperator) ? " +=" : " =");
- foreach (const QString &v, values)
+ for (const QString &v : values) {
added += ((flags & MultiLine) ? QLatin1String(" \\\n") + effectiveContIndent(contInfo)
: QString::fromLatin1(" ")) + v;
+ }
if (!scope.isEmpty() && scopeStart < 0)
added += QLatin1String("\n}");
lines->insert(lNo, added);
@@ -405,7 +408,7 @@ void ProWriter::addFiles(ProFile *profile, QStringList *lines, const QStringList
QDir baseDir = QFileInfo(profile->fileName()).absoluteDir();
if (profile->fileName().endsWith(QLatin1String(".pri")))
prefixPwd = QLatin1String("$$PWD/");
- foreach (const QString &v, values)
+ for (const QString &v : values)
valuesToWrite << (prefixPwd + baseDir.relativeFilePath(v));
putVarValues(profile, lines, valuesToWrite, var, AppendValues | MultiLine | AppendOperator,
@@ -417,7 +420,7 @@ static void findProVariables(const ushort *tokPtr, const QStringList &vars,
{
int lineNo = firstLine;
QString tmp;
- const ushort *lastXpr = 0;
+ const ushort *lastXpr = nullptr;
while (ushort tok = *tokPtr++) {
if (tok == TokBranch) {
uint blockLen = getBlockLen(tokPtr);
@@ -453,7 +456,7 @@ QList<int> ProWriter::removeVarValues(ProFile *profile, QStringList *lines,
// This code expects proVars to be sorted by the variables' appearance in the file.
int delta = 1;
- foreach (int ln, varLines) {
+ for (int ln : qAsConst(varLines)) {
bool first = true;
int lineNo = ln - delta;
typedef QPair<int, int> ContPos;
@@ -467,7 +470,7 @@ QList<int> ProWriter::removeVarValues(ProFile *profile, QStringList *lines,
if (idx >= 0)
lineLen = idx;
QChar *chars = line.data();
- forever {
+ for (;;) {
if (!lineLen) {
if (idx >= 0)
goto nextLine;
@@ -530,7 +533,7 @@ QList<int> ProWriter::removeVarValues(ProFile *profile, QStringList *lines,
// Entries existed, but were all removed
if (contCol < 0) {
// This is the last line, so clear continuations leading to it
- foreach (const ContPos &pos, contPos) {
+ for (const ContPos &pos : qAsConst(contPos)) {
QString &bline = (*lines)[pos.first];
bline.remove(pos.second, 1);
if (pos.second == bline.length())
@@ -564,12 +567,12 @@ QStringList ProWriter::removeFiles(ProFile *profile, QStringList *lines,
// This is a tad stupid - basically, it can remove only entries which
// the above code added.
QStringList valuesToFind;
- foreach (const QString &absoluteFilePath, values)
+ for (const QString &absoluteFilePath : values)
valuesToFind << proFileDir.relativeFilePath(absoluteFilePath);
- QStringList notYetChanged;
- foreach (int i, removeVarValues(profile, lines, valuesToFind, vars))
- notYetChanged.append(values.at(i));
+ const QStringList notYetChanged =
+ Utils::transform(removeVarValues(profile, lines, valuesToFind, vars),
+ [values](int i) { return values.at(i); });
if (!profile->fileName().endsWith(QLatin1String(".pri")))
return notYetChanged;
@@ -580,12 +583,12 @@ QStringList ProWriter::removeFiles(ProFile *profile, QStringList *lines,
valuesToFind.clear();
const QDir baseDir = QFileInfo(profile->fileName()).absoluteDir();
const QString prefixPwd = QLatin1String("$$PWD/");
- foreach (const QString &absoluteFilePath, notYetChanged)
+ for (const QString &absoluteFilePath : notYetChanged)
valuesToFind << (prefixPwd + baseDir.relativeFilePath(absoluteFilePath));
- QStringList notChanged;
- foreach (int i, removeVarValues(profile, lines, valuesToFind, vars))
- notChanged.append(notYetChanged.at(i));
+ const QStringList notChanged =
+ Utils::transform(removeVarValues(profile, lines, valuesToFind, vars),
+ [notYetChanged](int i) { return notYetChanged.at(i); });
return notChanged;
}
diff --git a/src/shared/qbs b/src/shared/qbs
-Subproject 9b7be5fca8dbe6be51c3a869ca1700b96ceada5
+Subproject 6fcbc1a996d1726d7df5e078663a095b235d5b0
diff --git a/src/shared/shared.pro b/src/shared/shared.pro
index e75970c0fb..e94abae804 100644
--- a/src/shared/shared.pro
+++ b/src/shared/shared.pro
@@ -2,17 +2,14 @@ TEMPLATE = subdirs
QBS_DIRS = \
qbscorelib \
- qbsqtprofilesetup \
qbsapps \
qbslibexec \
qbsplugins \
qbsstatic
qbscorelib.subdir = qbs/src/lib/corelib
-qbsqtprofilesetup.subdir = qbs/src/lib/qtprofilesetup
-qbsqtprofilesetup.depends = qbscorelib
qbsapps.subdir = qbs/src/app
-qbsapps.depends = qbsqtprofilesetup
+qbsapps.depends = qbscorelib
qbslibexec.subdir = qbs/src/libexec
qbslibexec.depends = qbscorelib
qbsplugins.subdir = qbs/src/plugins
diff --git a/src/tools/clangpchmanagerbackend/clangpchmanagerbackendmain.cpp b/src/tools/clangpchmanagerbackend/clangpchmanagerbackendmain.cpp
index c4e8e085ce..58d749ec3a 100644
--- a/src/tools/clangpchmanagerbackend/clangpchmanagerbackendmain.cpp
+++ b/src/tools/clangpchmanagerbackend/clangpchmanagerbackendmain.cpp
@@ -72,6 +72,48 @@ using ClangBackEnd::FilePathCache;
using ClangBackEnd::FilePathView;
using ClangBackEnd::TimeStamp;
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+template<typename CallableType>
+class CallableEvent : public QEvent
+{
+public:
+ using Callable = std::decay_t<CallableType>;
+ CallableEvent(Callable &&callable)
+ : QEvent(QEvent::None)
+ , callable(std::move(callable))
+ {}
+ CallableEvent(const Callable &callable)
+ : QEvent(QEvent::None)
+ , callable(callable)
+ {}
+
+ ~CallableEvent() { callable(); }
+
+public:
+ Callable callable;
+};
+
+template<typename Callable>
+void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance())
+{
+ if (QThread *thread = qobject_cast<QThread *>(object))
+ object = QAbstractEventDispatcher::instance(thread);
+
+ QCoreApplication::postEvent(object,
+ new CallableEvent<Callable>(std::forward<Callable>(callable)),
+ Qt::HighEventPriority);
+}
+#else
+template<typename Callable>
+void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance())
+{
+ if (QThread *thread = qobject_cast<QThread *>(object))
+ object = QAbstractEventDispatcher::instance(thread);
+
+ QMetaObject::invokeMethod(object, std::forward<Callable>(callable));
+}
+#endif
+
class PchManagerApplication final : public QCoreApplication
{
public:
@@ -182,8 +224,9 @@ struct Data // because we have a cycle dependency
clangPchManagerServer,
includeWatcher};
PrecompiledHeaderStorage<> preCompiledHeaderStorage{database};
- ClangBackEnd::ProgressCounter progressCounter{
- [&](int progress, int total) { clangPchManagerServer.setProgress(progress, total); }};
+ ClangBackEnd::ProgressCounter progressCounter{[&](int progress, int total) {
+ executeInLoop([&] { clangPchManagerServer.setProgress(progress, total); });
+ }};
ClangBackEnd::PchTaskQueue pchTaskQueue{systemTaskScheduler,
projectTaskScheduler,
progressCounter,
@@ -191,7 +234,9 @@ struct Data // because we have a cycle dependency
database};
ClangBackEnd::PchTasksMerger pchTaskMerger{pchTaskQueue};
ClangBackEnd::BuildDependenciesStorage<> buildDependencyStorage{database};
- ClangBackEnd::BuildDependencyCollector buildDependencyCollector{filePathCache, generatedFiles};
+ ClangBackEnd::BuildDependencyCollector buildDependencyCollector{filePathCache,
+ generatedFiles,
+ environment};
std::function<TimeStamp(FilePathView filePath)> getModifiedTime{
[&](ClangBackEnd::FilePathView path) -> TimeStamp {
return QFileInfo(QString(path)).lastModified().toSecsSinceEpoch();
diff --git a/src/tools/clangpchmanagerbackend/source/builddependencycollector.cpp b/src/tools/clangpchmanagerbackend/source/builddependencycollector.cpp
index 6647d02531..b3ebbc75ad 100644
--- a/src/tools/clangpchmanagerbackend/source/builddependencycollector.cpp
+++ b/src/tools/clangpchmanagerbackend/source/builddependencycollector.cpp
@@ -28,10 +28,12 @@
#include "collectbuilddependencytoolaction.h"
#include "commandlinebuilder.h"
+#include <environment.h>
+
#include <utils/smallstring.h>
#include <algorithm>
-
+#include <iostream>
namespace ClangBackEnd {
namespace {
@@ -47,10 +49,10 @@ FilePathIds operator+(const FilePathIds &first, const FilePathIds &second)
BuildDependency BuildDependencyCollector::create(const ProjectPartContainer &projectPart)
{
- CommandLineBuilder<ProjectPartContainer, Utils::SmallStringVector> builder{
- projectPart, projectPart.toolChainArguments};
+ CommandLineBuilder<ProjectPartContainer, Utils::SmallStringVector>
+ builder{projectPart, projectPart.toolChainArguments, InputFileType::Source};
- addFiles(projectPart.sourcePathIds, builder.commandLine);
+ addFiles(projectPart.sourcePathIds, std::move(builder.commandLine));
setExcludedFilePaths(
m_filePathCache.filePaths(projectPart.headerPathIds + projectPart.sourcePathIds));
@@ -66,6 +68,33 @@ BuildDependency BuildDependencyCollector::create(const ProjectPartContainer &pro
return buildDependency;
}
+namespace {
+
+std::size_t contentSize(const FilePaths &includes)
+{
+ auto countIncludeSize = [](std::size_t size, const auto &include) {
+ return size + include.size();
+ };
+
+ return std::accumulate(includes.begin(), includes.end(), std::size_t(0), countIncludeSize);
+}
+} // namespace
+
+Utils::SmallString BuildDependencyCollector::generateFakeFileContent(
+ const FilePathIds &includeIds) const
+{
+ Utils::SmallString fileContent;
+ const std::size_t lineTemplateSize = 12;
+ auto includes = m_filePathCache.filePaths(includeIds);
+
+ fileContent.reserve(includes.size() * lineTemplateSize + contentSize(includes));
+
+ for (Utils::SmallStringView include : includes)
+ fileContent += {"#include \"", include, "\"\n"};
+
+ return fileContent;
+}
+
void BuildDependencyCollector::collect()
{
clang::tooling::ClangTool tool = m_clangTool.createTool();
@@ -96,25 +125,26 @@ void BuildDependencyCollector::setExcludedFilePaths(ClangBackEnd::FilePaths &&ex
}
void BuildDependencyCollector::addFiles(const FilePathIds &filePathIds,
- const Utils::SmallStringVector &arguments)
+ Utils::SmallStringVector &&arguments)
{
- m_clangTool.addFiles(m_filePathCache.filePaths(filePathIds), arguments);
+ m_clangTool.addFile(FilePath{m_environment.pchBuildDirectory().toStdString(), "dummy.cpp"},
+ generateFakeFileContent(filePathIds),
+ std::move(arguments));
m_buildDependency.sourceFiles.insert(m_buildDependency.sourceFiles.end(),
filePathIds.begin(),
filePathIds.end());
}
-void BuildDependencyCollector::addFile(FilePathId filePathId,
- const Utils::SmallStringVector &arguments)
+void BuildDependencyCollector::addFile(FilePathId filePathId, Utils::SmallStringVector &&arguments)
{
- addFiles({filePathId}, arguments);
+ addFiles({filePathId}, std::move(arguments));
}
void BuildDependencyCollector::addFile(FilePath filePath,
const FilePathIds &sourceFileIds,
- const Utils::SmallStringVector &arguments)
+ Utils::SmallStringVector &&arguments)
{
- m_clangTool.addFiles({filePath}, arguments);
+ m_clangTool.addFiles({filePath}, std::move(arguments));
m_buildDependency.sourceFiles.insert(m_buildDependency.sourceFiles.end(),
sourceFileIds.begin(),
sourceFileIds.end());
diff --git a/src/tools/clangpchmanagerbackend/source/builddependencycollector.h b/src/tools/clangpchmanagerbackend/source/builddependencycollector.h
index b9446c9692..c5e41e9190 100644
--- a/src/tools/clangpchmanagerbackend/source/builddependencycollector.h
+++ b/src/tools/clangpchmanagerbackend/source/builddependencycollector.h
@@ -34,33 +34,35 @@
#include <filepathcachingfwd.h>
namespace ClangBackEnd {
+class Environment;
class BuildDependencyCollector : public BuildDependencyGeneratorInterface
{
public:
BuildDependencyCollector(const FilePathCachingInterface &filePathCache,
- const GeneratedFilesInterface &generatedFiles)
+ const GeneratedFilesInterface &generatedFiles,
+ const Environment &environment)
: m_filePathCache(filePathCache)
, m_generatedFiles(generatedFiles)
- {
- }
+ , m_environment(environment)
+ {}
BuildDependency create(const ProjectPartContainer &projectPart) override;
void collect();
void setExcludedFilePaths(ClangBackEnd::FilePaths &&excludedIncludes);
- void addFiles(const FilePathIds &filePathIds,
- const Utils::SmallStringVector &arguments);
- void addFile(FilePathId filePathId,
- const Utils::SmallStringVector &arguments);
+ void addFiles(const FilePathIds &filePathIds, Utils::SmallStringVector &&arguments);
+ void addFile(FilePathId filePathId, Utils::SmallStringVector &&arguments);
void addFile(FilePath filePath,
const FilePathIds &sourceFileIds,
- const Utils::SmallStringVector &arguments);
+ Utils::SmallStringVector &&arguments);
void addUnsavedFiles(const V2::FileContainers &unsavedFiles);
void clear();
+ Utils::SmallString generateFakeFileContent(const FilePathIds &includeIds) const;
+
const FileStatuses &fileStatuses() const
{
return m_buildDependency.fileStatuses;
@@ -96,6 +98,7 @@ private:
SourcesManager m_sourcesManager;
const FilePathCachingInterface &m_filePathCache;
const GeneratedFilesInterface &m_generatedFiles;
+ const Environment &m_environment;
};
} // namespace ClangBackEnd
diff --git a/src/tools/clangpchmanagerbackend/source/collectbuilddependencyaction.h b/src/tools/clangpchmanagerbackend/source/collectbuilddependencyaction.h
index 03d27f9b21..fa1a10e79c 100644
--- a/src/tools/clangpchmanagerbackend/source/collectbuilddependencyaction.h
+++ b/src/tools/clangpchmanagerbackend/source/collectbuilddependencyaction.h
@@ -54,27 +54,28 @@ public:
bool BeginSourceFileAction(clang::CompilerInstance &compilerInstance) override
{
- if (clang::PreprocessOnlyAction::BeginSourceFileAction(compilerInstance)) {
- auto &preprocessor = compilerInstance.getPreprocessor();
+ if (clang::PreprocessOnlyAction::BeginSourceFileAction(compilerInstance)) {
+ auto &preprocessor = compilerInstance.getPreprocessor();
- preprocessor.SetSuppressIncludeNotFoundError(true);
- preprocessor.SetMacroExpansionOnlyInDirectives();
+ preprocessor.SetSuppressIncludeNotFoundError(true);
+ preprocessor.SetMacroExpansionOnlyInDirectives();
- auto macroPreprocessorCallbacks = new CollectBuildDependencyPreprocessorCallbacks(
- m_buildDependency,
- m_filePathCache,
- m_excludedIncludeUID,
- m_alreadyIncludedFileUIDs,
- compilerInstance.getSourceManager(),
- m_sourcesManager,
- compilerInstance.getPreprocessorPtr());
+ auto macroPreprocessorCallbacks = new CollectBuildDependencyPreprocessorCallbacks(
+ m_buildDependency,
+ m_filePathCache,
+ m_excludedIncludeUID,
+ m_alreadyIncludedFileUIDs,
+ compilerInstance.getSourceManager(),
+ m_sourcesManager,
+ compilerInstance.getPreprocessorPtr());
- preprocessor.addPPCallbacks(std::unique_ptr<clang::PPCallbacks>(macroPreprocessorCallbacks));
+ preprocessor.addPPCallbacks(
+ std::unique_ptr<clang::PPCallbacks>(macroPreprocessorCallbacks));
- return true;
- }
+ return true;
+ }
- return false;
+ return false;
}
void EndSourceFileAction() override
diff --git a/src/tools/clangpchmanagerbackend/source/collectbuilddependencypreprocessorcallbacks.h b/src/tools/clangpchmanagerbackend/source/collectbuilddependencypreprocessorcallbacks.h
index 8253092751..980d065fdb 100644
--- a/src/tools/clangpchmanagerbackend/source/collectbuilddependencypreprocessorcallbacks.h
+++ b/src/tools/clangpchmanagerbackend/source/collectbuilddependencypreprocessorcallbacks.h
@@ -72,15 +72,27 @@ public:
void FileChanged(clang::SourceLocation sourceLocation,
clang::PPCallbacks::FileChangeReason reason,
clang::SrcMgr::CharacteristicKind,
- clang::FileID) override
+ clang::FileID previousFileId) override
{
- if (reason == clang::PPCallbacks::EnterFile)
- {
- const clang::FileEntry *fileEntry = m_sourceManager->getFileEntryForID(
- m_sourceManager->getFileID(sourceLocation));
- if (fileEntry) {
- addFileStatus(fileEntry);
- addSourceFile(fileEntry);
+ if (reason == clang::PPCallbacks::EnterFile) {
+ clang::FileID currentFileId = m_sourceManager->getFileID(sourceLocation);
+ if (m_mainFileId.isInvalid()) {
+ m_mainFileId = currentFileId;
+ } else {
+ const clang::FileEntry *fileEntry = m_sourceManager->getFileEntryForID(
+ currentFileId);
+ if (fileEntry) {
+ if (previousFileId == m_mainFileId) {
+ uint sourceFileUID = fileEntry->getUID();
+ auto notAlreadyIncluded = isNotAlreadyIncluded(sourceFileUID);
+ if (notAlreadyIncluded.first)
+ m_alreadyIncludedFileUIDs.insert(notAlreadyIncluded.second,
+ sourceFileUID);
+ } else {
+ addFileStatus(fileEntry);
+ addSourceFile(fileEntry);
+ }
+ }
}
}
}
@@ -96,7 +108,8 @@ public:
const clang::Module * /*imported*/,
clang::SrcMgr::CharacteristicKind fileType) override
{
- if (file) {
+ clang::FileID currentFileId = m_sourceManager->getFileID(hashLocation);
+ if (file && currentFileId != m_mainFileId) {
addSourceDependency(file, hashLocation);
auto fileUID = file->getUID();
auto sourceFileUID = m_sourceManager
@@ -343,6 +356,7 @@ private:
BuildDependency &m_buildDependency;
const std::vector<uint> &m_excludedIncludeUID;
std::vector<uint> &m_alreadyIncludedFileUIDs;
+ clang::FileID m_mainFileId;
};
} // namespace ClangBackEnd
diff --git a/src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h b/src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h
index 47a64eda92..50061a9e6c 100644
--- a/src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h
+++ b/src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h
@@ -27,15 +27,49 @@
#include <clang/Tooling/Tooling.h>
-#include "clang/Frontend/FrontendActions.h"
+#include <clang/Frontend/CompilerInstance.h>
+#include <clang/Frontend/FrontendActions.h>
+#include <clang/Lex/PreprocessorOptions.h>
namespace ClangBackEnd {
+
+class GeneratePCHAction final : public clang::GeneratePCHAction
+{
+public:
+ GeneratePCHAction(llvm::StringRef filePath, llvm::StringRef fileContent)
+ : m_filePath(filePath)
+ , m_fileContent(fileContent)
+ {}
+
+ bool BeginInvocation(clang::CompilerInstance &compilerInstance) override
+ {
+ compilerInstance.getPreprocessorOpts().DisablePCHValidation = true;
+ std::unique_ptr<llvm::MemoryBuffer> Input = llvm::MemoryBuffer::getMemBuffer(m_fileContent);
+ compilerInstance.getPreprocessorOpts().addRemappedFile(m_filePath, Input.release());
+
+ return clang::GeneratePCHAction::BeginSourceFileAction(compilerInstance);
+ }
+
+private:
+ llvm::StringRef m_filePath;
+ llvm::StringRef m_fileContent;
+};
+
class GeneratePCHActionFactory final : public clang::tooling::FrontendActionFactory
{
public:
+ GeneratePCHActionFactory(llvm::StringRef filePath, llvm::StringRef fileContent)
+ : m_filePath(filePath)
+ , m_fileContent(fileContent)
+ {}
+
clang::FrontendAction *create() override
{
- return new clang::GeneratePCHAction;
+ return new GeneratePCHAction{m_filePath, m_fileContent};
}
+
+private:
+ llvm::StringRef m_filePath;
+ llvm::StringRef m_fileContent;
};
} // namespace ClangBackEnd
diff --git a/src/tools/clangpchmanagerbackend/source/pchcreator.cpp b/src/tools/clangpchmanagerbackend/source/pchcreator.cpp
index 4333d5706a..f4a1005362 100644
--- a/src/tools/clangpchmanagerbackend/source/pchcreator.cpp
+++ b/src/tools/clangpchmanagerbackend/source/pchcreator.cpp
@@ -72,17 +72,20 @@ Utils::SmallString PchCreator::generatePchIncludeFileContent(const FilePathIds &
return fileContent;
}
-
-bool PchCreator::generatePch()
+bool PchCreator::generatePch(NativeFilePathView path, Utils::SmallStringView content)
{
clang::tooling::ClangTool tool = m_clangTool.createOutputTool();
- auto action = std::make_unique<GeneratePCHActionFactory>();
+ NativeFilePath headerFilePath{m_environment.pchBuildDirectory().toStdString(), "dummy.h"};
+
+ auto action = std::make_unique<GeneratePCHActionFactory>(llvm::StringRef{path.data(),
+ path.size()},
+ llvm::StringRef{content.data(),
+ content.size()});
return tool.run(action.get()) != 1;
}
-
FilePath PchCreator::generatePchFilePath() const
{
std::uniform_int_distribution<std::uint_fast64_t> distribution(
@@ -95,12 +98,12 @@ FilePath PchCreator::generatePchFilePath() const
}
Utils::SmallStringVector PchCreator::generateClangCompilerArguments(const PchTask &pchTask,
- FilePathView sourceFilePath,
FilePathView pchOutputPath)
{
CommandLineBuilder<PchTask> builder{pchTask,
pchTask.toolChainArguments,
- sourceFilePath,
+ InputFileType::Header,
+ {},
pchOutputPath,
pchTask.systemPchPath};
@@ -114,13 +117,10 @@ void PchCreator::generatePch(PchTask &&pchTask)
auto pchOutputPath = generatePchFilePath();
FilePath headerFilePath{m_environment.pchBuildDirectory().toStdString(), "dummy.h"};
- Utils::SmallStringVector commandLine = generateClangCompilerArguments(pchTask,
- headerFilePath,
- pchOutputPath);
-
- m_clangTool.addFile(std::move(headerFilePath), std::move(content), std::move(commandLine));
+ Utils::SmallStringVector commandLine = generateClangCompilerArguments(pchTask, pchOutputPath);
- bool success = generatePch();
+ m_clangTool.addFile(std::move(headerFilePath), content.clone(), std::move(commandLine));
+ bool success = generatePch(NativeFilePath{headerFilePath}, content);
m_projectPartPch.projectPartId = pchTask.projectPartId();
diff --git a/src/tools/clangpchmanagerbackend/source/pchcreator.h b/src/tools/clangpchmanagerbackend/source/pchcreator.h
index 37d0c7c8a1..b2c0c309e7 100644
--- a/src/tools/clangpchmanagerbackend/source/pchcreator.h
+++ b/src/tools/clangpchmanagerbackend/source/pchcreator.h
@@ -81,11 +81,10 @@ public:
const FilePathCaching &filePathCache();
Utils::SmallString generatePchIncludeFileContent(const FilePathIds &includeIds) const;
- bool generatePch();
+ bool generatePch(NativeFilePathView path, Utils::SmallStringView content);
FilePath generatePchFilePath() const;
static Utils::SmallStringVector generateClangCompilerArguments(const PchTask &pchTask,
- FilePathView includePchHeaderPath,
FilePathView pchPath);
const ClangTool &clangTool() const
diff --git a/src/tools/clangrefactoringbackend/clangrefactoringbackendmain.cpp b/src/tools/clangrefactoringbackend/clangrefactoringbackendmain.cpp
index 23a127c17f..876c047fb8 100644
--- a/src/tools/clangrefactoringbackend/clangrefactoringbackendmain.cpp
+++ b/src/tools/clangrefactoringbackend/clangrefactoringbackendmain.cpp
@@ -51,6 +51,48 @@ using ClangBackEnd::RefactoringDatabaseInitializer;
using ClangBackEnd::ConnectionServer;
using ClangBackEnd::SymbolIndexing;
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+template<typename CallableType>
+class CallableEvent : public QEvent
+{
+public:
+ using Callable = std::decay_t<CallableType>;
+ CallableEvent(Callable &&callable)
+ : QEvent(QEvent::None)
+ , callable(std::move(callable))
+ {}
+ CallableEvent(const Callable &callable)
+ : QEvent(QEvent::None)
+ , callable(callable)
+ {}
+
+ ~CallableEvent() { callable(); }
+
+public:
+ Callable callable;
+};
+
+template<typename Callable>
+void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance())
+{
+ if (QThread *thread = qobject_cast<QThread *>(object))
+ object = QAbstractEventDispatcher::instance(thread);
+
+ QCoreApplication::postEvent(object,
+ new CallableEvent<Callable>(std::forward<Callable>(callable)),
+ Qt::HighEventPriority);
+}
+#else
+template<typename Callable>
+void executeInLoop(Callable &&callable, QObject *object = QCoreApplication::instance())
+{
+ if (QThread *thread = qobject_cast<QThread *>(object))
+ object = QAbstractEventDispatcher::instance(thread);
+
+ QMetaObject::invokeMethod(object, std::forward<Callable>(callable));
+}
+#endif
+
QStringList processArguments(QCoreApplication &application)
{
QCommandLineParser parser;
@@ -95,7 +137,14 @@ struct Data // because we have a cycle dependency
FilePathCaching filePathCache{database};
GeneratedFiles generatedFiles;
RefactoringServer clangCodeModelServer{symbolIndexing, filePathCache, generatedFiles};
- SymbolIndexing symbolIndexing{database, filePathCache, generatedFiles, [&] (int progress, int total) { clangCodeModelServer.setProgress(progress, total); }};
+ SymbolIndexing symbolIndexing{database,
+ filePathCache,
+ generatedFiles,
+ [&](int progress, int total) {
+ executeInLoop([&] {
+ clangCodeModelServer.setProgress(progress, total);
+ });
+ }};
};
#ifdef Q_OS_WIN
diff --git a/src/tools/clangrefactoringbackend/source/clangtool.cpp b/src/tools/clangrefactoringbackend/source/clangtool.cpp
index 5ae87793db..1798504a69 100644
--- a/src/tools/clangrefactoringbackend/source/clangtool.cpp
+++ b/src/tools/clangrefactoringbackend/source/clangtool.cpp
@@ -52,6 +52,9 @@ void ClangTool::addFile(FilePath &&filePath,
{
NativeFilePath nativeFilePath{filePath};
+ if (commandLine.back() != nativeFilePath.path())
+ commandLine.emplace_back(nativeFilePath.path());
+
m_compilationDatabase.addFile(nativeFilePath, std::move(commandLine));
m_sourceFilePaths.push_back(Utils::SmallStringView{nativeFilePath});
@@ -60,15 +63,8 @@ void ClangTool::addFile(FilePath &&filePath,
void ClangTool::addFiles(const FilePaths &filePaths, const Utils::SmallStringVector &arguments)
{
- for (const FilePath &filePath : filePaths) {
- std::string filePathStr(filePath.path());
- auto commandLine = arguments;
- NativeFilePath nativeFilePath{filePath};
-
- commandLine.push_back(nativeFilePath.path());
-
- addFile(filePath.clone(), {}, std::move(commandLine));
- }
+ for (const FilePath &filePath : filePaths)
+ addFile(filePath.clone(), {}, arguments.clone());
}
void ClangTool::addUnsavedFiles(const V2::FileContainers &unsavedFiles)
@@ -104,13 +100,14 @@ clang::tooling::ClangTool ClangTool::createTool() const
clang::tooling::ClangTool tool(m_compilationDatabase, m_sourceFilePaths);
for (const auto &fileContent : m_fileContents) {
- if (!fileContent.content.empty())
- tool.mapVirtualFile(toStringRef(fileContent.filePath), fileContent.content);
+ if (fileContent.content.hasContent())
+ tool.mapVirtualFile(toStringRef(fileContent.filePath), toStringRef(fileContent.content));
}
- for (const auto &unsavedFileContent : m_unsavedFileContents)
- tool.mapVirtualFile(toStringRef(unsavedFileContent.filePath),
- toStringRef(unsavedFileContent.content));
+ for (const auto &unsavedFileContent : m_unsavedFileContents) {
+ tool.mapVirtualFile(toStringRef(unsavedFileContent.filePath),
+ toStringRef(unsavedFileContent.content));
+ }
tool.mapVirtualFile("/dummyFile", "#pragma once");
diff --git a/src/tools/clangrefactoringbackend/source/clangtool.h b/src/tools/clangrefactoringbackend/source/clangtool.h
index e3ff835799..2abad0f49b 100644
--- a/src/tools/clangrefactoringbackend/source/clangtool.h
+++ b/src/tools/clangrefactoringbackend/source/clangtool.h
@@ -50,7 +50,7 @@ struct FileContent
{}
NativeFilePath filePath;
- std::string content;
+ Utils::SmallString content;
};
struct UnsavedFileContent
diff --git a/src/tools/clangrefactoringbackend/source/collectmacrossourcefilecallbacks.cpp b/src/tools/clangrefactoringbackend/source/collectmacrossourcefilecallbacks.cpp
index d0d107e45e..d96fb05026 100644
--- a/src/tools/clangrefactoringbackend/source/collectmacrossourcefilecallbacks.cpp
+++ b/src/tools/clangrefactoringbackend/source/collectmacrossourcefilecallbacks.cpp
@@ -45,8 +45,6 @@ bool CollectMacrosSourceFileCallbacks::handleBeginSource(clang::CompilerInstance
compilerInstance.getPreprocessorPtr(),
m_sourcesManager);
- compilerInstance.getLangOpts().DelayedTemplateParsing = false;
- compilerInstance.getPreprocessorPtr()->SetSuppressIncludeNotFoundError(true);
compilerInstance.getPreprocessorPtr()->addPPCallbacks(std::move(callbacks));
return true;
diff --git a/src/tools/clangrefactoringbackend/source/collectsymbolsaction.h b/src/tools/clangrefactoringbackend/source/collectsymbolsaction.h
index d90a08ded9..2074a25a6e 100644
--- a/src/tools/clangrefactoringbackend/source/collectsymbolsaction.h
+++ b/src/tools/clangrefactoringbackend/source/collectsymbolsaction.h
@@ -34,6 +34,7 @@
#include <filepathcachingfwd.h>
+#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendAction.h>
#include <clang/Index/IndexingAction.h>
@@ -52,13 +53,13 @@ public:
std::unique_ptr<clang::ASTConsumer> newASTConsumer(clang::CompilerInstance &compilerInstance,
llvm::StringRef inFile);
private:
- class WrappedIndexAction : public clang::WrapperFrontendAction
+ class WrappedIndexAction final : public clang::WrapperFrontendAction
{
public:
- WrappedIndexAction(std::shared_ptr<clang::index::IndexDataConsumer> m_indexDataConsumer,
+ WrappedIndexAction(std::shared_ptr<clang::index::IndexDataConsumer> indexDataConsumer,
clang::index::IndexingOptions indexingOptions)
: clang::WrapperFrontendAction(
- clang::index::createIndexingAction(m_indexDataConsumer, indexingOptions, nullptr))
+ clang::index::createIndexingAction(indexDataConsumer, indexingOptions, nullptr))
{}
std::unique_ptr<clang::ASTConsumer>
diff --git a/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp b/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp
index 2c190c6a10..35cc0df219 100644
--- a/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp
+++ b/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp
@@ -124,33 +124,23 @@ bool IndexDataConsumer::skipSymbol(clang::FileID fileId, clang::index::SymbolRol
return isParsedDeclaration || isParsedReference;
}
-bool IndexDataConsumer::handleDeclOccurence(const clang::Decl *declaration,
- clang::index::SymbolRoleSet symbolRoles,
- llvm::ArrayRef<clang::index::SymbolRelation> symbolRelations,
-#if LLVM_VERSION_MAJOR >= 7
- clang::SourceLocation sourceLocation,
-#else
- clang::FileID fileId,
- unsigned offset,
-#endif
- IndexDataConsumer::ASTNodeInfo astNodeInfo)
+bool IndexDataConsumer::handleDeclOccurence(
+ const clang::Decl *declaration,
+ clang::index::SymbolRoleSet symbolRoles,
+ llvm::ArrayRef<clang::index::SymbolRelation> /*symbolRelations*/,
+ clang::SourceLocation sourceLocation,
+ IndexDataConsumer::ASTNodeInfo /*astNodeInfo*/)
{
const auto *namedDeclaration = clang::dyn_cast<clang::NamedDecl>(declaration);
if (namedDeclaration) {
if (!namedDeclaration->getIdentifier())
return true;
-#if LLVM_VERSION_MAJOR >= 7
if (skipSymbol(m_sourceManager->getFileID(sourceLocation), symbolRoles))
-#else
- if (skipSymbol(fileId, symbolRoles))
-#endif
+
return true;
SymbolIndex globalId = toSymbolIndex(declaration->getCanonicalDecl());
-#if LLVM_VERSION_MAJOR < 7
- clang::SourceLocation sourceLocation = m_sourceManager->getLocForStartOfFile(fileId).getLocWithOffset(offset);
-#endif
auto found = m_symbolEntries.find(globalId);
if (found == m_symbolEntries.end()) {
diff --git a/src/tools/clangrefactoringbackend/source/indexdataconsumer.h b/src/tools/clangrefactoringbackend/source/indexdataconsumer.h
index 8524455574..6db595391c 100644
--- a/src/tools/clangrefactoringbackend/source/indexdataconsumer.h
+++ b/src/tools/clangrefactoringbackend/source/indexdataconsumer.h
@@ -55,12 +55,7 @@ public:
bool handleDeclOccurence(const clang::Decl *declaration,
clang::index::SymbolRoleSet symbolRoles,
llvm::ArrayRef<clang::index::SymbolRelation> symbolRelations,
-#if LLVM_VERSION_MAJOR >= 7
clang::SourceLocation sourceLocation,
-#else
- clang::FileID fileId,
- unsigned offset,
-#endif
ASTNodeInfo astNodeInfo) override;
private:
diff --git a/src/tools/clangrefactoringbackend/source/symbolindexer.cpp b/src/tools/clangrefactoringbackend/source/symbolindexer.cpp
index 2ee454eadb..2b4e90cf5a 100644
--- a/src/tools/clangrefactoringbackend/source/symbolindexer.cpp
+++ b/src/tools/clangrefactoringbackend/source/symbolindexer.cpp
@@ -107,6 +107,7 @@ void SymbolIndexer::updateProjectPart(ProjectPartContainer &&projectPart)
using Builder = CommandLineBuilder<ProjectPartContainer, Utils::SmallStringVector>;
Builder commandLineBuilder{projectPart,
projectPart.toolChainArguments,
+ InputFileType::Source,
{},
{},
optionalProjectPartPch
@@ -116,27 +117,32 @@ void SymbolIndexer::updateProjectPart(ProjectPartContainer &&projectPart)
std::vector<SymbolIndexerTask> symbolIndexerTask;
symbolIndexerTask.reserve(projectPart.sourcePathIds.size());
for (FilePathId sourcePathId : projectPart.sourcePathIds) {
- auto indexing = [projectPartId, arguments = commandLineBuilder.commandLine, sourcePathId, this](
- SymbolsCollectorInterface &symbolsCollector) {
+ auto indexing = [projectPartId,
+ arguments = commandLineBuilder.commandLine,
+ sourcePathId,
+ this](SymbolsCollectorInterface &symbolsCollector) {
symbolsCollector.setFile(sourcePathId, arguments);
- symbolsCollector.collectSymbols();
+ bool success = symbolsCollector.collectSymbols();
- Sqlite::ImmediateTransaction transaction{m_transactionInterface};
+ if (success) {
+ Sqlite::ImmediateTransaction transaction{m_transactionInterface};
- m_symbolStorage.addSymbolsAndSourceLocations(symbolsCollector.symbols(),
- symbolsCollector.sourceLocations());
+ m_symbolStorage.addSymbolsAndSourceLocations(symbolsCollector.symbols(),
+ symbolsCollector.sourceLocations());
- m_symbolStorage.updateProjectPartSources(projectPartId, symbolsCollector.sourceFiles());
+ m_symbolStorage.updateProjectPartSources(projectPartId,
+ symbolsCollector.sourceFiles());
- m_buildDependencyStorage.insertOrUpdateUsedMacros(symbolsCollector.usedMacros());
+ m_buildDependencyStorage.insertOrUpdateUsedMacros(symbolsCollector.usedMacros());
- m_buildDependencyStorage.insertFileStatuses(symbolsCollector.fileStatuses());
+ m_buildDependencyStorage.insertFileStatuses(symbolsCollector.fileStatuses());
- m_buildDependencyStorage.insertOrUpdateSourceDependencies(
- symbolsCollector.sourceDependencies());
+ m_buildDependencyStorage.insertOrUpdateSourceDependencies(
+ symbolsCollector.sourceDependencies());
- transaction.commit();
+ transaction.commit();
+ }
};
symbolIndexerTask.emplace_back(sourcePathId, projectPartId, std::move(indexing));
@@ -181,30 +187,34 @@ void SymbolIndexer::updateChangedPath(FilePathId filePathId,
auto pchPath = optionalProjectPartPch ? optionalProjectPartPch.value().pchPath : FilePath{};
- CommandLineBuilder<ProjectPartArtefact, Utils::SmallStringVector> builder{
- artefact, artefact.toolChainArguments, {}, {}, pchPath};
+ CommandLineBuilder<ProjectPartArtefact, Utils::SmallStringVector>
+ builder{artefact, artefact.toolChainArguments, InputFileType::Source, {}, {}, pchPath};
- auto indexing = [projectPartId = artefact.projectPartId, arguments=builder.commandLine, filePathId, this](
- SymbolsCollectorInterface &symbolsCollector) {
+ auto indexing = [projectPartId = artefact.projectPartId,
+ arguments = builder.commandLine,
+ filePathId,
+ this](SymbolsCollectorInterface &symbolsCollector) {
symbolsCollector.setFile(filePathId, arguments);
- symbolsCollector.collectSymbols();
+ bool success = symbolsCollector.collectSymbols();
- Sqlite::ImmediateTransaction transaction{m_transactionInterface};
+ if (success) {
+ Sqlite::ImmediateTransaction transaction{m_transactionInterface};
- m_symbolStorage.addSymbolsAndSourceLocations(symbolsCollector.symbols(),
- symbolsCollector.sourceLocations());
+ m_symbolStorage.addSymbolsAndSourceLocations(symbolsCollector.symbols(),
+ symbolsCollector.sourceLocations());
- m_symbolStorage.updateProjectPartSources(projectPartId, symbolsCollector.sourceFiles());
+ m_symbolStorage.updateProjectPartSources(projectPartId, symbolsCollector.sourceFiles());
- m_buildDependencyStorage.insertOrUpdateUsedMacros(symbolsCollector.usedMacros());
+ m_buildDependencyStorage.insertOrUpdateUsedMacros(symbolsCollector.usedMacros());
- m_buildDependencyStorage.insertFileStatuses(symbolsCollector.fileStatuses());
+ m_buildDependencyStorage.insertFileStatuses(symbolsCollector.fileStatuses());
- m_buildDependencyStorage.insertOrUpdateSourceDependencies(
- symbolsCollector.sourceDependencies());
+ m_buildDependencyStorage.insertOrUpdateSourceDependencies(
+ symbolsCollector.sourceDependencies());
- transaction.commit();
+ transaction.commit();
+ }
};
symbolIndexerTask.emplace_back(filePathId, optionalArtefact->projectPartId, std::move(indexing));
diff --git a/src/tools/clangrefactoringbackend/source/symbolscollector.cpp b/src/tools/clangrefactoringbackend/source/symbolscollector.cpp
index afa01de2e9..1ceb4a14ce 100644
--- a/src/tools/clangrefactoringbackend/source/symbolscollector.cpp
+++ b/src/tools/clangrefactoringbackend/source/symbolscollector.cpp
@@ -25,6 +25,7 @@
#include "symbolscollector.h"
+#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendActions.h>
namespace ClangBackEnd {
@@ -96,14 +97,26 @@ newFrontendActionFactory(Factory *consumerFactory,
}
protected:
- bool BeginSourceFileAction(clang::CompilerInstance &CI) override {
- if (!clang::ASTFrontendAction::BeginSourceFileAction(CI))
+ bool BeginInvocation(clang::CompilerInstance &compilerInstance) override
+ {
+ compilerInstance.getLangOpts().DelayedTemplateParsing = false;
+
+ return clang::ASTFrontendAction::BeginInvocation(compilerInstance);
+ }
+
+ bool BeginSourceFileAction(clang::CompilerInstance &compilerInstance) override
+ {
+ compilerInstance.getPreprocessor().SetSuppressIncludeNotFoundError(true);
+
+ if (!clang::ASTFrontendAction::BeginSourceFileAction(compilerInstance))
return false;
if (m_sourceFileCallbacks)
- return m_sourceFileCallbacks->handleBeginSource(CI);
+ return m_sourceFileCallbacks->handleBeginSource(compilerInstance);
return true;
}
- void EndSourceFileAction() override {
+
+ void EndSourceFileAction() override
+ {
if (m_sourceFileCallbacks)
m_sourceFileCallbacks->handleEndSource();
clang::ASTFrontendAction::EndSourceFileAction();
@@ -121,12 +134,14 @@ newFrontendActionFactory(Factory *consumerFactory,
new FrontendActionFactoryAdapter(consumerFactory, sourceFileCallbacks));
}
-void SymbolsCollector::collectSymbols()
+bool SymbolsCollector::collectSymbols()
{
auto tool = m_clangTool.createTool();
- tool.run(ClangBackEnd::newFrontendActionFactory(&m_collectSymbolsAction,
- &m_collectMacrosSourceFileCallbacks).get());
+ auto actionFactory = ClangBackEnd::newFrontendActionFactory(&m_collectSymbolsAction,
+ &m_collectMacrosSourceFileCallbacks);
+
+ return tool.run(actionFactory.get()) != 1;
}
void SymbolsCollector::doInMainThreadAfterFinished()
diff --git a/src/tools/clangrefactoringbackend/source/symbolscollector.h b/src/tools/clangrefactoringbackend/source/symbolscollector.h
index beb610d190..b37647e969 100644
--- a/src/tools/clangrefactoringbackend/source/symbolscollector.h
+++ b/src/tools/clangrefactoringbackend/source/symbolscollector.h
@@ -52,7 +52,7 @@ public:
void clear() override;
- void collectSymbols() override;
+ bool collectSymbols() override;
void doInMainThreadAfterFinished() override;
diff --git a/src/tools/clangrefactoringbackend/source/symbolscollectorinterface.h b/src/tools/clangrefactoringbackend/source/symbolscollectorinterface.h
index 0b7e00509d..94b3142371 100644
--- a/src/tools/clangrefactoringbackend/source/symbolscollectorinterface.h
+++ b/src/tools/clangrefactoringbackend/source/symbolscollectorinterface.h
@@ -44,7 +44,7 @@ class SymbolsCollectorInterface : public ProcessorInterface
{
public:
virtual void setFile(FilePathId filePathId, const Utils::SmallStringVector &arguments) = 0;
- virtual void collectSymbols() = 0;
+ virtual bool collectSymbols() = 0;
virtual const SymbolEntries &symbols() const = 0;
virtual const SourceLocationEntries &sourceLocations() const = 0;
diff --git a/src/tools/perfparser b/src/tools/perfparser
-Subproject 5222205d9acca1107507bfdeebaab194157012e
+Subproject 25ddba75f0767ef1150c3896fde5c50bc65147c
diff --git a/tests/auto/profilewriter/profilewriter.qbs b/tests/auto/profilewriter/profilewriter.qbs
index ba420c4817..7091472f30 100644
--- a/tests/auto/profilewriter/profilewriter.qbs
+++ b/tests/auto/profilewriter/profilewriter.qbs
@@ -3,6 +3,7 @@ import qbs
QtcAutotest {
name: "ProFileWriter autotest"
Depends { name: "Qt.xml" }
+ Depends { name: "Utils"; cpp.link: false }
Group {
name: "Sources from ProParser"
id: proParserGroup
diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.ico b/tests/manual/qml/testfiles_quick2/images/qtcreator.ico
index 06209ee81e..4bf9505ee3 100644
--- a/tests/manual/qml/testfiles_quick2/images/qtcreator.ico
+++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.ico
Binary files differ
diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg b/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg
index 700af01ff1..46acfd37fd 100644
--- a/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg
+++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg
Binary files differ
diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.png b/tests/manual/qml/testfiles_quick2/images/qtcreator.png
index b1d96b9c43..3a9cf292bc 100644
--- a/tests/manual/qml/testfiles_quick2/images/qtcreator.png
+++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.png
Binary files differ
diff --git a/tests/system/shared/clang.py b/tests/system/shared/clang.py
index f012b12c54..810f652b0b 100644
--- a/tests/system/shared/clang.py
+++ b/tests/system/shared/clang.py
@@ -23,11 +23,15 @@
#
############################################################################
+firstStart = True
+
def startCreatorVerifyingClang(useClang):
+ global firstStart
try:
# start Qt Creator with / without enabled ClangCodeModel plugin (without modifying settings)
loadOrNoLoad = '-load' if useClang else '-noload'
- startQC([loadOrNoLoad, 'ClangCodeModel'])
+ startQC([loadOrNoLoad, 'ClangCodeModel'], cancelTour=firstStart)
+ firstStart = False
except RuntimeError:
t, v = sys.exc_info()[:2]
strv = str(v)
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index 25042f9541..a6cf0cea4c 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -147,7 +147,7 @@ def verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, e
for ty in additionalKeyPresses:
type(editor, ty)
rect = editor.cursorRect(editor.textCursor())
- expectedToolTip = "{type='QTipLabel' visible='1'}"
+ expectedToolTip = "{type='QLabel' objectName='qcToolTip' visible='1'}"
# wait for similar tooltips to disappear
checkIfObjectExists(expectedToolTip, False, 1000, True)
sendEvent("QMouseEvent", editor, QEvent.MouseMove, rect.x+rect.width/2, rect.y+rect.height/2, Qt.NoButton, 0)
@@ -361,7 +361,7 @@ def invokeFindUsage(editor, line, typeOperation, n=1):
for _ in range(n):
type(editor, typeOperation)
snooze(1)
- invokeContextMenuItem(editor, "Find Usages")
+ invokeContextMenuItem(editor, "Find References to Symbol Under Cursor")
return True
def addBranchWildcardToRoot(rootNode):
diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py
index 6d2b8e4ccc..bab90c9459 100644
--- a/tests/system/suite_APTW/tst_APTW03/test.py
+++ b/tests/system/suite_APTW/tst_APTW03/test.py
@@ -25,7 +25,13 @@
source("../../shared/qtcreator.py")
-def handleInsertVirtualFunctions(expected):
+def handleInsertVirtualFunctions(expected, toAdd):
+ def __checkVirtualFunction(treeView, classIndex, isCheckedF, child):
+ item = "%s.%s" % (str(classIndex.text), str(child.text))
+ test.log("Checking '%s'." % item)
+ clickItem(treeView, item.replace("_", "\\_"), 5, 5, 0, Qt.LeftButton)
+ test.verify(waitFor("isCheckedF(child)", 1000), "Function must be checked after clicking")
+
treeView = waitForObject("{container={title='Functions to insert:' type='QGroupBox' unnamed='1'"
" visible='1'} type='QTreeView' unnamed='1' visible='1'}")
@@ -42,10 +48,10 @@ def handleInsertVirtualFunctions(expected):
if test.verify(isChecked(child), "Verifying: '%s' is checked." % curr):
found.add(curr)
else:
- item = "%s.%s" % (str(classIndex.text), str(child.text))
- test.log("Checking '%s'." % item)
- clickItem(treeView, item.replace("_", "\\_"), 5, 5, 0, Qt.LeftButton)
- waitFor("isChecked(child)", 1000)
+ __checkVirtualFunction(treeView, classIndex, isChecked, child)
+ for curr in toAdd:
+ if str(child.text).startswith(curr):
+ __checkVirtualFunction(treeView, classIndex, isChecked, child)
test.verify(len(set(expected).difference(found)) == 0,
"Verifying whether all expected functions have been found.")
@@ -79,58 +85,59 @@ def main():
checkSimpleCppLib("SampleApp1", False)
checkSimpleCppLib("SampleApp2", True)
- projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin",
- Targets.desktopTargetClasses())
+ pluginTargets = Targets.desktopTargetClasses()
+ pluginTargets.remove(Targets.DESKTOP_4_8_7_DEFAULT)
+ if platform.system() in ('Microsoft', 'Windows'):
+ # No C++11 in GCC 4.9
+ pluginTargets.remove(Targets.DESKTOP_5_4_1_GCC)
+ projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", pluginTargets)
virtualFunctionsAdded = False
for kit, config in iterateBuildConfigs("Debug"):
- is487Kit = kit in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX)
verifyBuildConfig(kit, config, True, True)
- if virtualFunctionsAdded and platform.system() in ('Microsoft', 'Windows') and is487Kit:
- test.warning("Skipping building of Qt4.8 targets because of QTCREATORBUG-12251.")
- continue
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
waitForCompile(10000)
if not virtualFunctionsAdded:
checkLastBuild(True, False)
+ if not openDocument("%s.Sources.%s\.cpp" % (projectName, className.lower())):
+ test.fatal("Could not open %s.cpp - continuing." % className.lower())
+ continue
+ editor = getEditorForFileSuffix("%s.cpp" % className.lower())
+ initialContent = str(editor.plainText)
+ test.verify("QObject * %s::create(" % className in initialContent,
+ "Verifying whether pure virtual function has been added to the source file.")
if not openDocument("%s.Headers.%s\.h" % (projectName, className.lower())):
- test.fail("Could not open %s.h - continuing." % className.lower())
+ test.fatal("Could not open %s.h - continuing." % className.lower())
continue
editor = getEditorForFileSuffix("%s.h" % className.lower())
- str(editor.plainText)
+ initialContent = str(editor.plainText)
+ test.verify(re.search("QObject \*create.*;", initialContent, re.MULTILINE),
+ "Verifying whether create() declaration has been added to the header.")
placeCursorToLine(editor, "class %s.*" % className, True)
snooze(4) # avoid timing issue with the parser
invokeContextMenuItem(editor, "Refactor", "Insert Virtual Functions of Base Classes")
- handleInsertVirtualFunctions(["keys() const = 0 : QStringList",
- "create(const QString &, const QString &) = 0 : QObject *"])
- waitFor("'keys' in str(editor.plainText)", 2000)
+ handleInsertVirtualFunctions(["create(const QString &, const QString &) = 0 : QObject *"],
+ ["event(QEvent *) : bool"])
+ waitFor("'event' in str(editor.plainText)", 2000)
modifiedContent = str(editor.plainText)
- test.verify(re.search("QStringList keys.*;", modifiedContent, re.MULTILINE),
- "Verifying whether keys() declaration has been added to the header.")
- test.verify(re.search("QObject \*create.*;", modifiedContent, re.MULTILINE),
- "Verifying whether create() declaration has been added to the header.")
+ test.verify(re.search("bool event\(QEvent \*event\);", modifiedContent, re.MULTILINE),
+ "Verifying whether event() declaration has been added to the header.")
if not openDocument("%s.Sources.%s\.cpp" % (projectName, className.lower())):
- test.fail("Could not open %s.cpp - continuing." % className.lower())
+ test.fatal("Could not open %s.cpp - continuing." % className.lower())
continue
editor = getEditorForFileSuffix("%s.cpp" % className.lower())
modifiedContent = str(editor.plainText)
- test.verify("QStringList %s::keys(" % className in modifiedContent,
- "Verifying whether keys() definition has been added to the source file.")
- test.verify("QObject *%s::create(" % className in modifiedContent,
- "Verifying whether create() definition has been added to the source file.")
+ test.verify("bool %s::event(QEvent *event)" % className in modifiedContent,
+ "Verifying whether event() definition has been added to the source file.")
# add return to not run into build issues of missing return values
- addReturn(editor, "QStringList %s::keys.*" % className, "QStringList()")
- addReturn(editor, "QObject \*%s::create.*" % className, "0")
+ addReturn(editor, "bool %s::event.*" % className, "true")
+ addReturn(editor, "QObject \* %s::create.*" % className, "0")
+ placeCursorToLine(editor, 'static_assert\(false, .*', True)
+ invokeContextMenuItem(editor, "Toggle Comment Selection")
virtualFunctionsAdded = True
invokeMenuItem('File', 'Save All')
- if platform.system() in ('Microsoft', 'Windows') and is487Kit: # QTCREATORBUG-12251
- test.warning("Skipping building of Qt4.8 targets because of QTCREATORBUG-12251.")
- continue
invokeMenuItem('Build', 'Rebuild Project "%s"' % projectName)
waitForCompile(10000)
- if platform.system() == "Darwin" and is487Kit:
- test.log("Skipping compile check (gcc on OSX is only clang with gcc frontend nowadays)")
- continue
checkCompile()
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_QMLS/tst_QMLS03/test.py b/tests/system/suite_QMLS/tst_QMLS03/test.py
index 2583302c4b..62251a9aee 100644
--- a/tests/system/suite_QMLS/tst_QMLS03/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS03/test.py
@@ -92,7 +92,7 @@ def main():
return
for _ in range(5):
type(editorArea, "<Left>")
- invokeContextMenuItem(editorArea, "Find Usages")
+ invokeContextMenuItem(editorArea, "Find References to Symbol Under Cursor")
# check if usage was properly found
expectedResults = [ExpectedResult("color-animation.qml", 49, "Rectangle {"),
ExpectedResult("color-animation.qml", 109, "Rectangle {"),
@@ -111,7 +111,7 @@ def main():
return
for _ in range(87):
type(editorArea, "<Left>")
- invokeMenuItem("Tools", "QML/JS", "Find Usages")
+ invokeMenuItem("Tools", "QML/JS", "Find References to Symbol Under Cursor")
# check if usage was properly found
expectedResults = [ExpectedResult("color-animation.qml", 50, "anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }"),
ExpectedResult("color-animation.qml", 110, "anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }"),
diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py
index e0f334b1d5..03c250dd6d 100644
--- a/tests/system/suite_debugger/tst_qml_js_console/test.py
+++ b/tests/system/suite_debugger/tst_qml_js_console/test.py
@@ -140,10 +140,11 @@ def main():
# start debugging
clickButton(fancyDebugButton)
waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
- rootIndex = getQModelIndexStr("text='Rectangle'",
+ rootIndex = getQModelIndexStr("text='QQmlEngine'",
":Locals and Expressions_Debugger::Internal::WatchTreeView")
- # make sure the items inside the root item are visible
- doubleClick(waitForObject(rootIndex))
+ # make sure the items inside the QQmlEngine's root are visible
+ mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
+ doubleClick(waitForObject(mainRect))
if not object.exists(":DebugModeWidget_Debugger::Internal::ConsoleView"):
invokeMenuItem("Window", "Output Panes", "Debugger Console")
progressBarWait()
@@ -154,19 +155,19 @@ def main():
("width=66", "66", "width"), ("anchors.centerIn", "<unnamed object>"),
("opacity", "1"), ("opacity = .1875", u"0.\u200b1875", "opacity")]
# check red inner Rectangle
- runChecks("text='Rectangle' occurrence='2'", rootIndex, checks)
+ runChecks("text='Rectangle' occurrence='2'", mainRect, checks)
checks = [("color", u"#\u200bff0000"), ("width", "100"), ("height", "100"),
("radius = Math.min(width, height) / 2", "50", "radius"),
("parent.objectName= 'mainRect'", "mainRect")]
# check green inner Rectangle
- runChecks("text='Rectangle'", rootIndex, checks)
+ runChecks("text='Rectangle'", mainRect, checks)
checks = [("color", u"#\u200b000000"), ("font.pointSize=14", "14", "font.pointSize"),
("font.bold", "false"), ("font.weight=Font.Bold", "75", "font.bold", "true"),
("rotation", "0"), ("rotation = 180", "180", "rotation")]
# check Text element
- runChecks("text='Text'", rootIndex, checks)
+ runChecks("text='Text'", mainRect, checks)
# extended check must be done separately
originalVal = useDebuggerConsole("x", None)
if originalVal:
diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py
index 696722f326..0430c306c9 100644
--- a/tests/system/suite_debugger/tst_qml_locals/test.py
+++ b/tests/system/suite_debugger/tst_qml_locals/test.py
@@ -71,6 +71,10 @@ def main():
earlyExit("Could not find expected Inspector tree inside Locals and Expressions.")
return
# reduce items to outer Rectangle object
+ items = items.getChild("QQmlEngine")
+ if items == None:
+ earlyExit("Could not find expected QQmlEngine tree inside Locals and Expressions.")
+ return
items = items.getChild("Rectangle")
if items == None:
earlyExit("Could not find expected Rectangle tree inside Locals and Expressions.")
@@ -91,12 +95,13 @@ def main():
invokeMenuItem("File", "Exit")
def __unfoldTree__():
- rootIndex = getQModelIndexStr("text='Rectangle'",
+ rootIndex = getQModelIndexStr("text='QQmlEngine'",
':Locals and Expressions_Debugger::Internal::WatchTreeView')
- unfoldQModelIndexIncludingProperties(rootIndex)
+ mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
+ unfoldQModelIndexIncludingProperties(mainRect)
subItems = ["text='Rectangle'", "text='Rectangle' occurrence='2'", "text='Text'"]
for item in subItems:
- unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, rootIndex))
+ unfoldQModelIndexIncludingProperties(getQModelIndexStr(item, mainRect))
def unfoldQModelIndexIncludingProperties(indexStr):
tv = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView')
diff --git a/tests/system/suite_editors/tst_generic_highlighter/test.py b/tests/system/suite_editors/tst_generic_highlighter/test.py
index d3ca5d20b3..e6f4a7e117 100644
--- a/tests/system/suite_editors/tst_generic_highlighter/test.py
+++ b/tests/system/suite_editors/tst_generic_highlighter/test.py
@@ -25,6 +25,15 @@
source("../../shared/qtcreator.py")
+def __highlighterDefinitionsDirectory__():
+ if platform.system() in ('Microsoft', 'Windows'):
+ basePath = os.path.expandvars("%LOCALAPPDATA%")
+ elif platform.system() == 'Linux':
+ basePath = os.path.expanduser("~/.local/share")
+ else: # macOS
+ basePath = os.path.expanduser("~/Library/Application Support")
+ return os.path.join(basePath, "org.kde.syntax-highlighting", "syntax")
+
def createFile(folder, filename):
__createProjectOrFileSelectType__(" General", "Empty File", isProject = False)
replaceEditorContent(waitForObject("{name='nameLineEdit' visible='1' "
@@ -103,56 +112,34 @@ def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None):
clickButton(":Options.Cancel_QPushButton")
return result
-def uncheckGenericHighlighterFallback():
+def addHighlighterDefinition(*languages):
+ syntaxDirectory = __highlighterDefinitionsDirectory__()
+ toBeChecked = (os.path.join(syntaxDirectory, x + ".xml") for x in languages)
+ test.log("Updating highlighter definitions...")
invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "Text Editor")
clickItem(":Options_QListView", "Text Editor", 14, 15, 0, Qt.LeftButton)
waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' "
"text='Generic Highlighter'}")
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Generic Highlighter")
- ensureChecked("{name='useFallbackLocation' text='Use fallback location' type='QCheckBox' "
- "visible='1'}", False)
- clickButton(":Options.OK_QPushButton")
-def addHighlighterDefinition(language):
- global tmpSettingsDir
- test.log("Adding highlighter definitions for '%s'." % language)
- invokeMenuItem("Tools", "Options...")
- waitForObjectItem(":Options_QListView", "Text Editor")
- clickItem(":Options_QListView", "Text Editor", 14, 15, 0, Qt.LeftButton)
- waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' "
- "text='Generic Highlighter'}")
- clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Generic Highlighter")
- clickButton("{text='Download Definitions...' type='QPushButton' unnamed='1' visible='1'}")
- table = waitForObject("{name='definitionsTable' type='QTableWidget' visible='1'}")
- model = table.model()
- for row in range(model.rowCount()):
- if str(model.data(model.index(row, 0)).toString()) == language:
- clickItem(table, "%d/0" % row, 5, 5, 0, Qt.LeftButton)
- clickButton("{name='downloadButton' text='Download Selected Definitions' "
- "type='QPushButton' visible='1'}")
- # downloading happens asynchronously but may take a little time
- progressBarWait(10000)
- languageFile = os.path.join(tmpSettingsDir, "QtProject", "qtcreator",
- "generic-highlighter", "%s.xml"
- % language.lower().replace(" ", "-"))
- test.verify(waitFor("os.path.exists(languageFile)", 10000),
- "Verifying whether highlight definition file for '%s' has been downloaded "
- "and placed to settings." % language)
- clickButton("{text='Download Definitions...' type='QPushButton' unnamed='1' "
- "visible='1'}")
- table = waitForObject("{name='definitionsTable' type='QTableWidget' visible='1'}")
- model = table.model()
- test.verify(str(model.data(model.index(row, 1))) != "",
- "Verifying a definition has been downloaded.")
- clickButton("{text='Close' type='QPushButton' unnamed='1' visible='1'}")
- clickButton(":Options.OK_QPushButton")
- return True
- test.fail("Could not find the specified language (%s) to download a highlighter definition"
- % language)
- clickButton("{text='Close' type='QPushButton' unnamed='1' visible='1'}")
- clickButton(":Options.OK_QPushButton")
- return False
+ clickButton("{text='Update Definitions' type='QPushButton' name='updateDefinitions' visible='1'}")
+ updateStatus = "{name='updateStatus' type='QLabel' visible='1'}"
+ waitFor("object.exists(updateStatus)", 5000)
+ if waitFor('str(findObject(updateStatus).text) == "Update finished"', 5000):
+ test.verify(os.path.exists(syntaxDirectory),
+ "Directory for syntax highlighter files exists.")
+ xmlFiles = glob.glob(os.path.join(syntaxDirectory, "*.xml"))
+ test.verify(len(xmlFiles) > 0, "Verified presence of syntax highlighter files. "
+ "(Found %d)" % len(xmlFiles))
+ # should we check output (General Messages) as well?
+ test.passes("Updated definitions")
+ clickButton(":Options.OK_QPushButton")
+ return map(os.path.exists, toBeChecked)
+ else:
+ test.fail("Could not update highlighter definitions")
+ clickButton(":Options.Cancel_QPushButton")
+ return map(os.path.exists, toBeChecked)
def hasSuffix(fileName, suffixPatterns):
for suffix in suffixPatterns:
@@ -170,11 +157,12 @@ def displayHintForHighlighterDefinition(fileName, patterns, lPatterns, added, ad
return False
def main():
- miss = "A highlight definition was not found for this file. Would you like to try to find one?"
+ miss = ("A highlight definition was not found for this file. Would you like to update "
+ "highlight definition files?")
startQC()
if not startedWithoutPluginError():
return
- uncheckGenericHighlighterFallback()
+
patterns = getOrModifyFilePatternsFor("text/x-haskell", "x-haskell")
lPatterns = getOrModifyFilePatternsFor("text/x-literate-haskell", "literate-haskell")
@@ -204,8 +192,7 @@ def main():
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Close All")
- addedHighlighterDefinition = addHighlighterDefinition("Haskell")
- addedLiterateHighlighterDefinition = addHighlighterDefinition("Literate Haskell")
+ addedHaskell, addedLiterateHaskell = addHighlighterDefinition("haskell", "literate-haskell")
patterns = getOrModifyFilePatternsFor('text/x-haskell', 'x-haskell', ['.hs'])
lPatterns = getOrModifyFilePatternsFor('text/x-literate-haskell', 'literate-haskell', ['.lhs'])
@@ -217,8 +204,7 @@ def main():
invokeMenuItem("File", "Recent Files", "(&\\d \| )?%s" % recentFile)
editor = getEditorForFileSuffix(current)
display = displayHintForHighlighterDefinition(current, patterns, lPatterns,
- addedHighlighterDefinition,
- addedLiterateHighlighterDefinition)
+ addedHaskell, addedLiterateHaskell)
try:
waitForObject("{text='%s' type='QLabel' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}" % miss, 2000)
@@ -237,3 +223,10 @@ def main():
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
+
+def init():
+ syntaxDirectory = __highlighterDefinitionsDirectory__()
+ if not os.path.exists(syntaxDirectory):
+ return
+ test.log("Removing existing highlighter definitions folder")
+ deleteDirIfExists(syntaxDirectory)
diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py
index 53ddc0884d..c66c8b8bba 100644
--- a/tests/system/suite_editors/tst_qml_editor/test.py
+++ b/tests/system/suite_editors/tst_qml_editor/test.py
@@ -97,7 +97,7 @@ def __invokeFindUsage__(filename, line, additionalKeyPresses, expectedCount):
return
for ty in additionalKeyPresses:
type(editor, ty)
- invokeContextMenuItem(editor, "Find Usages")
+ invokeContextMenuItem(editor, "Find References to Symbol Under Cursor")
waitForSearchResults()
validateSearchResult(expectedCount)
@@ -124,10 +124,10 @@ def testHovering():
additionalKeyPresses = [home, "<Right>"]
expectedTypes = ["TextTip", "TextTip"]
expectedValues = [
- {'text':'<table><tr><td valign=middle>FocusScope\n<p>Explicitly '
- 'creates a focus scope </p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
- {'text':'<table><tr><td valign=middle>Rectangle\n<p>Paints a filled rectangle with an '
- 'optional border </p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}
+ {'text':'<table><tr><td valign=middle><p>FocusScope</p><hr/><p>\n<p>Explicitly '
+ 'creates a focus scope </p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
+ {'text':'<table><tr><td valign=middle><p>Rectangle</p><hr/><p>\n<p>Paints a filled rectangle with an '
+ 'optional border </p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}
]
alternativeValues = [{"text":"FocusScope"}, {"text":"Rectangle"}]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
@@ -137,23 +137,26 @@ def testHovering():
lines = ['focus:\s*true', 'color:\s*"black"', 'states:\s*State\s*\{', 'transitions:\s*Transition\s*\{']
expectedTypes = ["TextTip", "TextTip", "TextTip", "TextTip"]
expectedValues = [
- {'text':'<table><tr><td valign=middle>boolean<p>This property indicates whether the item has focus '
+ {'text':'<table><tr><td valign=middle><p>boolean</p><hr/><p><p>This property indicates whether the item has focus '
'within the enclosing focus scope. If true, this item will gain active focus when the enclosing '
'focus scope gains active focus. In the following example, <tt>input</tt> will be given active focus '
- 'when <tt>scope</tt> gains active focus.</p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"'
+ 'when <tt>scope</tt> gains active focus.</p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"'
'></td></tr></table>'},
- {'text':'<table><tr><td valign=middle>string<p>This property holds the color used to fill the rectangle.'
- '</p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
- {'text':'<table><tr><td valign=middle>State<p>This property holds the list of possible states for this item. '
+ {'text':'<table><tr><td valign=middle><p>string</p><hr/><p><p>This property holds the color used to fill the rectangle.'
+ '</p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
+ {'text':'<table><tr><td valign=middle><p>State</p><hr/><p><p>This property holds the list of possible states for this item. '
'To change the state of this item, set the state property to one of these states, or set the state property '
'to an empty string to revert the item to its default state.'
- '</p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
- {'text':'<table><tr><td valign=middle>Transition<p>This property holds the list of transitions for this item. '
+ '</p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'},
+ {'text':'<table><tr><td valign=middle><p>Transition</p><hr/><p><p>This property holds the list of transitions for this item. '
'These define the transitions to be applied to the item whenever it changes its state.'
- '</p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}
+ '</p></p></td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}
]
- alternativeValues = [{"text":"Rectangle" if JIRA.isBugStillOpen(20020) else "boolean"},
- {"text":"string"}, {"text":"State"}, {"text":"Transition"}]
+ alternativeValues = [{"text":"boolean"}, {"text":"string"}, {"text":"State"}, {"text":"Transition"}]
+ if JIRA.isBugStillOpen(20020):
+ expectedValues[0] = {'text':'<table><tr><td valign=middle>Rectangle</td><td>&nbsp;&nbsp;'
+ '<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}
+ alternativeValues[0] = {"text":"Rectangle"}
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
test.log("Testing hovering expressions")
openDocument(focusDocumentPath % "focus\\.qml")
@@ -169,7 +172,7 @@ def testHovering():
lines=['Rectangle\s*\{.*color:\s*"#D1DBBD"', 'NumberAnimation\s*\{\s*.*Easing.OutQuint\s*\}']
additionalKeyPresses = ["<Left>", "<Left>", "<Left>", "<Left>"]
expectedTypes = ["ColorTip", "TextTip"]
- expectedValues = ["#D1DBBD", {"text":"number"}]
+ expectedValues = ["#D1DBBD", {"text":'<table><tr><td valign=middle>number</td><td>&nbsp;&nbsp;<img src=":/utils/tooltip/images/f1.png"></td></tr></table>'}]
alternativeValues = ["#D6DBBD", None]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py
index c27e8722f3..2c71b21c83 100644
--- a/tests/system/suite_general/tst_create_proj_wizard/test.py
+++ b/tests/system/suite_general/tst_create_proj_wizard/test.py
@@ -61,8 +61,8 @@ def main():
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
template = template.replace(".", "\\.")
# skip non-configurable
- if not template in ["Qt Quick UI Prototype", "Qt Canvas 3D Application",
- "Auto Test Project"]: # FIXME
+ if not template in ["Qt Quick UI Prototype", "Auto Test Project", # FIXME
+ "Qt for Python - Empty", "Qt for Python - Window"]:
availableProjectTypes.append({category:template})
safeClickButton("Cancel")
for current in availableProjectTypes:
diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py
index cd9fed32e1..d5617642f4 100644
--- a/tests/system/suite_tools/tst_git_local/test.py
+++ b/tests/system/suite_tools/tst_git_local/test.py
@@ -146,7 +146,7 @@ def verifyClickCommit():
"Verifying whether diff editor contains pointless_header.h file.")
test.verify(pointlessHeader not in diffOriginal,
"Verifying whether original does not contain pointless_header.h file.")
- test.verify("HEADERS += \\\n mainwindow.h \\\n pointless_header.h\n" in diffChanged,
+ test.verify("HEADERS += \\\n mainwindow.h \\\n pointless_header.h\n" in diffChanged,
"Verifying whether diff editor has pointless_header.h listed in pro file.")
test.verify("HEADERS += \\\n mainwindow.h\n\n" in diffOriginal
and "pointless_header.h" not in diffOriginal,
diff --git a/tests/unit/unittest/builddependencycollector-test.cpp b/tests/unit/unittest/builddependencycollector-test.cpp
index 3c9ea84d32..aa46fc77bb 100644
--- a/tests/unit/unittest/builddependencycollector-test.cpp
+++ b/tests/unit/unittest/builddependencycollector-test.cpp
@@ -25,6 +25,8 @@
#include "googletest.h"
+#include "testenvironment.h"
+
#include <refactoringdatabaseinitializer.h>
#include <filepathcaching.h>
#include <generatedfiles.h>
@@ -67,22 +69,15 @@ protected:
{
setFilePathCache(&filePathCache);
- collector.addFile(id(TESTDATA_DIR "/builddependencycollector/project/main.cpp"),
- {"cc",
- "-I",
- TESTDATA_DIR "/builddependencycollector/external",
- "-I",
- TESTDATA_DIR "/builddependencycollector/project",
- "-isystem",
- TESTDATA_DIR "/builddependencycollector/system"});
- collector.addFile(id(TESTDATA_DIR "/builddependencycollector/project/main2.cpp"),
- {"cc",
- "-I",
- TESTDATA_DIR "/builddependencycollector/external",
- "-I",
- TESTDATA_DIR "/builddependencycollector/project",
- "-isystem",
- TESTDATA_DIR "/builddependencycollector/system"});
+ collector.addFiles({id(TESTDATA_DIR "/builddependencycollector/project/main.cpp"),
+ id(TESTDATA_DIR "/builddependencycollector/project/main2.cpp")},
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
collector.addUnsavedFiles(
{{{TESTDATA_DIR, "BuildDependencyCollector/project/generated_file.h"},
@@ -160,16 +155,18 @@ protected:
protected:
Sqlite::Database database{":memory:", Sqlite::JournalMode::Memory};
+ TestEnvironment environment;
ClangBackEnd::RefactoringDatabaseInitializer<Sqlite::Database> databaseInitializer{database};
ClangBackEnd::FilePathCaching filePathCache{database};
ClangBackEnd::GeneratedFiles generatedFiles;
- ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles};
- ClangBackEnd::BuildDependencyCollector emptyCollector{filePathCache, generatedFiles};
- ClangBackEnd::FilePaths excludePaths = {TESTDATA_DIR "/builddependencycollector/project/main.cpp",
- TESTDATA_DIR "/builddependencycollector/project/main2.cpp",
- TESTDATA_DIR "/builddependencycollector/project/header1.h",
- TESTDATA_DIR "/builddependencycollector/project/header2.h",
- TESTDATA_DIR "/builddependencycollector/project/generated_file.h"};
+ ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles, environment};
+ ClangBackEnd::BuildDependencyCollector emptyCollector{filePathCache, generatedFiles, environment};
+ ClangBackEnd::FilePaths excludePaths = {
+ TESTDATA_DIR "/builddependencycollector/project/main.cpp",
+ TESTDATA_DIR "/builddependencycollector/project/main2.cpp",
+ TESTDATA_DIR "/builddependencycollector/project/header1.h",
+ TESTDATA_DIR "/builddependencycollector/project/header2.h",
+ TESTDATA_DIR "/builddependencycollector/project/generated_file.h"};
};
TEST_F(BuildDependencyCollector, IncludesExternalHeader)
@@ -305,48 +302,83 @@ TEST_F(BuildDependencyCollector, TopIncludesIgnoreMissingFile)
TEST_F(BuildDependencyCollector, SourceFiles)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
ASSERT_THAT(emptyCollector.sourceFiles(),
- UnorderedElementsAre(id(TESTDATA_DIR "/symbolscollector_main.cpp"),
- id(TESTDATA_DIR "/symbolscollector_header1.h"),
- id(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ id(TESTDATA_DIR "/symbolscollector/header1.h"),
+ id(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(BuildDependencyCollector, MainFileInSourceFiles)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
ASSERT_THAT(emptyCollector.sourceFiles(),
- ElementsAre(id(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(id(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(BuildDependencyCollector, ResetMainFileInSourceFiles)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
ASSERT_THAT(emptyCollector.sourceFiles(),
- ElementsAre(id(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(id(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(BuildDependencyCollector, DontDuplicateSourceFiles)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
emptyCollector.collect();
ASSERT_THAT(emptyCollector.sourceFiles(),
- UnorderedElementsAre(id(TESTDATA_DIR "/symbolscollector_main.cpp"),
- id(TESTDATA_DIR "/symbolscollector_header1.h"),
- id(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ id(TESTDATA_DIR "/symbolscollector/header1.h"),
+ id(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(BuildDependencyCollector, ClearSourceFiles)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.clear();
@@ -355,7 +387,14 @@ TEST_F(BuildDependencyCollector, ClearSourceFiles)
TEST_F(BuildDependencyCollector, ClearFileStatus)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
emptyCollector.clear();
@@ -365,7 +404,14 @@ TEST_F(BuildDependencyCollector, ClearFileStatus)
TEST_F(BuildDependencyCollector, ClearUsedMacros)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_defines.h"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/defines.h"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
emptyCollector.clear();
@@ -375,7 +421,7 @@ TEST_F(BuildDependencyCollector, ClearUsedMacros)
TEST_F(BuildDependencyCollector, ClearSourceDependencies)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main2.cpp"), {"cc", "-I" TESTDATA_DIR});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main2.cpp"), {"cc", "-I" TESTDATA_DIR});
emptyCollector.collect();
emptyCollector.clear();
@@ -385,7 +431,14 @@ TEST_F(BuildDependencyCollector, ClearSourceDependencies)
TEST_F(BuildDependencyCollector, DontCollectSourceFilesAfterFilesAreCleared)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.clear();
emptyCollector.collect();
@@ -395,7 +448,14 @@ TEST_F(BuildDependencyCollector, DontCollectSourceFilesAfterFilesAreCleared)
TEST_F(BuildDependencyCollector, DontCollectFileStatusAfterFilesAreCleared)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.clear();
emptyCollector.collect();
@@ -405,7 +465,14 @@ TEST_F(BuildDependencyCollector, DontCollectFileStatusAfterFilesAreCleared)
TEST_F(BuildDependencyCollector, DontCollectUsedMacrosAfterFilesAreCleared)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.clear();
emptyCollector.collect();
@@ -416,7 +483,14 @@ TEST_F(BuildDependencyCollector, DontCollectUsedMacrosAfterFilesAreCleared)
TEST_F(BuildDependencyCollector, DontCollectSourceDependenciesAfterFilesAreCleared)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.clear();
emptyCollector.collect();
@@ -426,7 +500,7 @@ TEST_F(BuildDependencyCollector, DontCollectSourceDependenciesAfterFilesAreClear
TEST_F(BuildDependencyCollector, CollectUsedMacrosWithExternalDefine)
{
- auto fileId = id(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = id(TESTDATA_DIR "/symbolscollector/defines.h");
emptyCollector.addFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
emptyCollector.collect();
@@ -441,8 +515,15 @@ TEST_F(BuildDependencyCollector, CollectUsedMacrosWithExternalDefine)
TEST_F(BuildDependencyCollector, CollectUsedMacrosWithoutExternalDefine)
{
- auto fileId = id(TESTDATA_DIR "/symbolscollector_defines.h");
- emptyCollector.addFile(fileId, {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ auto fileId = id(TESTDATA_DIR "/symbolscollector/defines.h");
+ emptyCollector.addFile(fileId,
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
@@ -456,8 +537,15 @@ TEST_F(BuildDependencyCollector, CollectUsedMacrosWithoutExternalDefine)
TEST_F(BuildDependencyCollector, DontCollectHeaderGuards)
{
- auto fileId = id(TESTDATA_DIR "/symbolscollector_defines.h");
- emptyCollector.addFile(fileId, {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ auto fileId = id(TESTDATA_DIR "/symbolscollector/defines.h");
+ emptyCollector.addFile(fileId,
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
@@ -467,8 +555,15 @@ TEST_F(BuildDependencyCollector, DontCollectHeaderGuards)
TEST_F(BuildDependencyCollector, DISABLED_DontCollectDynamicLibraryExports)
{
- auto fileId = id(TESTDATA_DIR "/symbolscollector_defines.h");
- emptyCollector.addFile(fileId, {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ auto fileId = id(TESTDATA_DIR "/symbolscollector/defines.h");
+ emptyCollector.addFile(fileId,
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
@@ -478,23 +573,29 @@ TEST_F(BuildDependencyCollector, DISABLED_DontCollectDynamicLibraryExports)
TEST_F(BuildDependencyCollector, CollectFileStatuses)
{
- emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc", "-I", TESTDATA_DIR "/builddependencycollector/external", "-I", TESTDATA_DIR "/builddependencycollector/project", "-isystem", TESTDATA_DIR "/builddependencycollector/system"});
+ emptyCollector.addFile(id(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ {"cc",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/external",
+ "-I",
+ TESTDATA_DIR "/builddependencycollector/project",
+ "-isystem",
+ TESTDATA_DIR "/builddependencycollector/system"});
emptyCollector.collect();
ASSERT_THAT(emptyCollector.fileStatuses(),
- ElementsAre(
- fileStatus(TESTDATA_DIR "/symbolscollector_main.cpp"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header1.h"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header2.h")));
+ ElementsAre(fileStatus(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header1.h"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(BuildDependencyCollector, CollectSourceDependencies)
{
- auto mainFileId = id(TESTDATA_DIR "/symbolscollector_main2.cpp");
- auto header1FileId = id(TESTDATA_DIR "/symbolscollector_header1.h");
- auto header2FileId = id(TESTDATA_DIR "/symbolscollector_header2.h");
- auto header3FileId = id(TESTDATA_DIR "/symbolscollector_header3.h");
+ auto mainFileId = id(TESTDATA_DIR "/symbolscollector/main2.cpp");
+ auto header1FileId = id(TESTDATA_DIR "/symbolscollector/header1.h");
+ auto header2FileId = id(TESTDATA_DIR "/symbolscollector/header2.h");
+ auto header3FileId = id(TESTDATA_DIR "/symbolscollector/header3.h");
emptyCollector.addFile(mainFileId, {"cc", "-I" TESTDATA_DIR});
emptyCollector.collect();
@@ -548,10 +649,26 @@ TEST_F(BuildDependencyCollector, GeneratedFile)
SourceType::UserInclude)));
}
+TEST_F(BuildDependencyCollector, CreateFakeFileContent)
+{
+ auto content = collector.generateFakeFileContent(
+ {id(TESTDATA_DIR "/builddependencycollector/project/header2.h"),
+ id(TESTDATA_DIR "/builddependencycollector/external/external1.h"),
+ id(TESTDATA_DIR "/builddependencycollector/external/external2.h")});
+
+ ASSERT_THAT(std::string(content),
+ AllOf(HasSubstr("#include \"" TESTDATA_DIR
+ "/builddependencycollector/project/header2.h\"\n"),
+ HasSubstr("#include \"" TESTDATA_DIR
+ "/builddependencycollector/external/external1.h\"\n"),
+ HasSubstr("#include \"" TESTDATA_DIR
+ "/builddependencycollector/external/external2.h\"\n")));
+}
+
TEST_F(BuildDependencyCollector, Create)
{
using ClangBackEnd::IncludeSearchPathType;
- ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles};
+ ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles, environment};
generatedFiles.update(
{{TESTDATA_DIR "/builddependencycollector/project/generated_file.h", "#pragma once"}});
ClangBackEnd::ProjectPartContainer projectPart{
@@ -702,7 +819,7 @@ TEST_F(BuildDependencyCollector, Create)
TEST_F(BuildDependencyCollector, Clear)
{
using ClangBackEnd::IncludeSearchPathType;
- ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles};
+ ClangBackEnd::BuildDependencyCollector collector{filePathCache, generatedFiles, environment};
ClangBackEnd::ProjectPartContainer projectPart{
"project1",
{},
diff --git a/tests/unit/unittest/clangquery-test.cpp b/tests/unit/unittest/clangquery-test.cpp
index 35842e0143..77a049210b 100644
--- a/tests/unit/unittest/clangquery-test.cpp
+++ b/tests/unit/unittest/clangquery-test.cpp
@@ -96,7 +96,7 @@ TEST_F(ClangQuerySlowTest, SourceRangeInUnsavedFileDeclarationRange)
::ClangQuery query(filePathCache);
query.addFile({TESTDATA_DIR "/query_simplefunction.cpp"},
"#include \"unsaved.h\"",
- {"cc", toNativePath(TESTDATA_DIR "/query_simplefunction.cpp").path(), "-std=c++14"});
+ {"cc", "-std=c++14"});
query.setQuery("functionDecl()");
ClangBackEnd::V2::FileContainer unsavedFile{{TESTDATA_DIR, "unsaved.h"}, "void unsaved();", {}};
query.addUnsavedFiles({unsavedFile});
@@ -110,9 +110,7 @@ TEST_F(ClangQuerySlowTest, SourceRangeInUnsavedFileDeclarationRange)
TEST_F(ClangQuerySlowTest, FileIsNotExistingButTheUnsavedDataIsParsed)
{
::ClangQuery query(filePathCache);
- query.addFile({TESTDATA_DIR "/foo.cpp"},
- "void f() {}",
- {"cc", toNativePath(TESTDATA_DIR "/foo.cpp").path(), "-std=c++14"});
+ query.addFile({TESTDATA_DIR "/foo.cpp"}, "void f() {}", {"cc", "-std=c++14"});
query.setQuery("functionDecl()");
query.findLocations();
@@ -124,9 +122,7 @@ TEST_F(ClangQuerySlowTest, FileIsNotExistingButTheUnsavedDataIsParsed)
TEST_F(ClangQuerySlowTest, DISABLED_SourceRangeInUnsavedFileDeclarationRangeOverride) // seems not to work in Clang
{
::ClangQuery query(filePathCache);
- query.addFile({TESTDATA_DIR "/query_simplefunction.cpp"},
- "void f() {}",
- {"cc", toNativePath(TESTDATA_DIR "/query_simplefunction.cpp").path(), "-std=c++14"});
+ query.addFile({TESTDATA_DIR "/query_simplefunction.cpp"}, "void f() {}", {"cc", "-std=c++14"});
query.setQuery("functionDecl()");
ClangBackEnd::V2::FileContainer unsavedFile{{TESTDATA_DIR "/query_simplefunction.cpp"},
"void unsaved();",
@@ -226,12 +222,10 @@ void ClangQuery::SetUp()
simpleFunctionQuery.addFile({TESTDATA_DIR "/query_simplefunction.cpp"},
"",
{"cc",
- toNativePath(TESTDATA_DIR "/query_simplefunction.cpp").path(),
"-std=c++14"});
simpleClassQuery.addFile({TESTDATA_DIR "/query_simpleclass.cpp"},
"",
{"cc",
- toNativePath(TESTDATA_DIR "/query_simpleclass.cpp").path(),
"-std=c++14"});
}
} // namespace
diff --git a/tests/unit/unittest/clangquerygatherer-test.cpp b/tests/unit/unittest/clangquerygatherer-test.cpp
index b0ea9cb3e0..3b5f9239fe 100644
--- a/tests/unit/unittest/clangquerygatherer-test.cpp
+++ b/tests/unit/unittest/clangquerygatherer-test.cpp
@@ -88,19 +88,16 @@ protected:
FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"},
sourceContent.clone(),
{"cc",
- toNativePath(TESTDATA_DIR "/query_simplefunction.cpp").path(),
"-I",
TESTDATA_DIR}};
FileContainer source2{{TESTDATA_DIR, "query_simplefunction2.cpp"},
{},
{"cc",
- toNativePath(TESTDATA_DIR "/query_simplefunction2.cpp").path(),
"-I",
TESTDATA_DIR}};
FileContainer source3{{TESTDATA_DIR, "query_simplefunction3.cpp"},
{},
{"cc",
- toNativePath(TESTDATA_DIR "/query_simplefunction3.cpp").path(),
"-I",
TESTDATA_DIR}};
Utils::SmallString unsavedContent{"void f();"};
diff --git a/tests/unit/unittest/commandlinebuilder-test.cpp b/tests/unit/unittest/commandlinebuilder-test.cpp
index 9de48fe0d5..c6bdd33d3f 100644
--- a/tests/unit/unittest/commandlinebuilder-test.cpp
+++ b/tests/unit/unittest/commandlinebuilder-test.cpp
@@ -37,6 +37,7 @@ template<typename ProjectInfo>
using Builder = ClangBackEnd::CommandLineBuilder<ProjectInfo>;
using ClangBackEnd::IncludeSearchPathType;
+using ClangBackEnd::InputFileType;
template <typename ProjectInfo>
class CommandLineBuilder : public testing::Test
@@ -124,30 +125,45 @@ TYPED_TEST_SUITE(CommandLineBuilder, ProjectInfos);
TYPED_TEST(CommandLineBuilder, AddToolChainArguments)
{
- Builder<TypeParam> builder{this->emptyProjectInfo, {"-m64", "-PIC"}, {}};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {"-m64", "-PIC"}, InputFileType::Header, {}};
ASSERT_THAT(builder.commandLine, AllOf(Contains("-m64"), Contains("-PIC")));
}
-TYPED_TEST(CommandLineBuilder, CTask)
+TYPED_TEST(CommandLineBuilder, CHeader)
{
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
- ASSERT_THAT(
- builder.commandLine,
- ElementsAre("clang", "-x", "c-header", "-std=c11", "-nostdinc", "-nostdinc++", toNativePath("/source/file.c").path()));
+ ASSERT_THAT(builder.commandLine,
+ ElementsAre("clang",
+ "-x",
+ "c-header",
+ "-std=c11",
+ "-nostdinc",
+ toNativePath("/source/file.c").path()));
}
-TYPED_TEST(CommandLineBuilder, ObjectiveCTask)
+TYPED_TEST(CommandLineBuilder, CSource)
+{
+ this->emptyProjectInfo.language = Utils::Language::C;
+ this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
+
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Source, "/source/file.c"};
+
+ ASSERT_THAT(builder.commandLine,
+ ElementsAre("clang", "-x", "c", "-std=c11", "-nostdinc", "/source/file.c"));
+}
+
+TYPED_TEST(CommandLineBuilder, ObjectiveCHeader)
{
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::ObjectiveC;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang",
@@ -155,16 +171,32 @@ TYPED_TEST(CommandLineBuilder, ObjectiveCTask)
"objective-c-header",
"-std=c11",
"-nostdinc",
- "-nostdinc++",
toNativePath("/source/file.c").path()));
}
-TYPED_TEST(CommandLineBuilder, CppTask)
+TYPED_TEST(CommandLineBuilder, ObjectiveCSource)
+{
+ this->emptyProjectInfo.language = Utils::Language::C;
+ this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::ObjectiveC;
+ this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
+
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Source, "/source/file.c"};
+
+ ASSERT_THAT(builder.commandLine,
+ ElementsAre("clang",
+ "-x",
+ "objective-c",
+ "-std=c11",
+ "-nostdinc",
+ "/source/file.c"));
+}
+
+TYPED_TEST(CommandLineBuilder, CppHeader)
{
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -176,13 +208,25 @@ TYPED_TEST(CommandLineBuilder, CppTask)
toNativePath("/source/file.cpp").path()));
}
-TYPED_TEST(CommandLineBuilder, ObjectiveCppTask)
+TYPED_TEST(CommandLineBuilder, CppSource)
+{
+ this->emptyProjectInfo.language = Utils::Language::Cxx;
+ this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
+
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Source, "/source/file.cpp"};
+
+ ASSERT_THAT(
+ builder.commandLine,
+ ElementsAre("clang++", "-x", "c++", "-std=c++98", "-nostdinc", "-nostdinc++", "/source/file.cpp"));
+}
+
+TYPED_TEST(CommandLineBuilder, ObjectiveCppHeader)
{
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::ObjectiveC;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -194,12 +238,30 @@ TYPED_TEST(CommandLineBuilder, ObjectiveCppTask)
toNativePath("/source/file.cpp").path()));
}
+TYPED_TEST(CommandLineBuilder, ObjectiveCppSource)
+{
+ this->emptyProjectInfo.language = Utils::Language::Cxx;
+ this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::ObjectiveC;
+ this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
+
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Source, "/source/file.cpp"};
+
+ ASSERT_THAT(builder.commandLine,
+ ElementsAre("clang++",
+ "-x",
+ "objective-c++",
+ "-std=c++98",
+ "-nostdinc",
+ "-nostdinc++",
+ "/source/file.cpp"));
+}
+
TYPED_TEST(CommandLineBuilder, Cpp98)
{
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++98"));
}
@@ -209,7 +271,7 @@ TYPED_TEST(CommandLineBuilder, Cpp03)
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX03;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++03"));
}
@@ -219,7 +281,7 @@ TYPED_TEST(CommandLineBuilder, Cpp11)
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX11;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++11"));
}
@@ -229,7 +291,7 @@ TYPED_TEST(CommandLineBuilder, Cpp14)
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX14;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++14"));
}
@@ -239,7 +301,7 @@ TYPED_TEST(CommandLineBuilder, Cpp17)
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX17;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++17"));
}
@@ -249,7 +311,7 @@ TYPED_TEST(CommandLineBuilder, Cpp20)
this->emptyProjectInfo.language = Utils::Language::Cxx;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX2a;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=c++2a"));
}
@@ -260,7 +322,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp98)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX98;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++98"));
}
@@ -271,7 +333,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp03)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX03;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++03"));
}
@@ -282,7 +344,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp11)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX11;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++11"));
}
@@ -293,7 +355,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp14)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX14;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++14"));
}
@@ -304,7 +366,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp17)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX17;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++17"));
}
@@ -315,7 +377,7 @@ TYPED_TEST(CommandLineBuilder, GnuCpp20)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::CXX2a;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu++2a"));
}
@@ -325,7 +387,7 @@ TYPED_TEST(CommandLineBuilder, C89)
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C89;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=c89"));
}
@@ -335,7 +397,7 @@ TYPED_TEST(CommandLineBuilder, C99)
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C99;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=c99"));
}
@@ -345,7 +407,7 @@ TYPED_TEST(CommandLineBuilder, C11)
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=c11"));
}
@@ -355,9 +417,9 @@ TYPED_TEST(CommandLineBuilder, C18)
this->emptyProjectInfo.language = Utils::Language::C;
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C18;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
- ASSERT_THAT(builder.commandLine, Contains("-std=c18"));
+ ASSERT_THAT(builder.commandLine, Contains("-std=c17"));
}
TYPED_TEST(CommandLineBuilder, GnuC89)
@@ -366,7 +428,7 @@ TYPED_TEST(CommandLineBuilder, GnuC89)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C89;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu89"));
}
@@ -377,7 +439,7 @@ TYPED_TEST(CommandLineBuilder, GnuC99)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C99;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu99"));
}
@@ -388,7 +450,7 @@ TYPED_TEST(CommandLineBuilder, GnuC11)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C11;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
ASSERT_THAT(builder.commandLine, Contains("-std=gnu11"));
}
@@ -399,9 +461,9 @@ TYPED_TEST(CommandLineBuilder, GnuC18)
this->emptyProjectInfo.languageVersion = Utils::LanguageVersion::C18;
this->emptyProjectInfo.languageExtension = Utils::LanguageExtension::Gnu;
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.c"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.c"};
- ASSERT_THAT(builder.commandLine, Contains("-std=gnu18"));
+ ASSERT_THAT(builder.commandLine, Contains("-std=gnu17"));
}
TYPED_TEST(CommandLineBuilder, IncludesOrder)
@@ -414,7 +476,7 @@ TYPED_TEST(CommandLineBuilder, IncludesOrder)
{"/system/foo", 3, IncludeSearchPathType::Framework},
{"/builtin/bar", 2, IncludeSearchPathType::BuiltIn},
{"/builtin/foo", 1, IncludeSearchPathType::BuiltIn}};
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -448,7 +510,7 @@ TYPED_TEST(CommandLineBuilder, EmptySourceFile)
TYPED_TEST(CommandLineBuilder, SourceFile)
{
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp"};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -463,7 +525,7 @@ TYPED_TEST(CommandLineBuilder, SourceFile)
TYPED_TEST(CommandLineBuilder, EmptyOutputFile)
{
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp", ""};
+ Builder<TypeParam> builder{this->emptyProjectInfo, {}, InputFileType::Header, "/source/file.cpp", ""};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -477,7 +539,11 @@ TYPED_TEST(CommandLineBuilder, EmptyOutputFile)
TYPED_TEST(CommandLineBuilder, OutputFile)
{
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp", "/output/file.o"};
+ Builder<TypeParam> builder{this->emptyProjectInfo,
+ {},
+ InputFileType::Header,
+ "/source/file.cpp",
+ "/output/file.o"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -493,7 +559,12 @@ TYPED_TEST(CommandLineBuilder, OutputFile)
TYPED_TEST(CommandLineBuilder, IncludePchPath)
{
- Builder<TypeParam> builder{this->emptyProjectInfo, {}, "/source/file.cpp", "/output/file.o", "/pch/file.pch"};
+ Builder<TypeParam> builder{this->emptyProjectInfo,
+ {},
+ InputFileType::Header,
+ "/source/file.cpp",
+ "/output/file.o",
+ "/pch/file.pch"};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
@@ -527,4 +598,5 @@ TYPED_TEST(CommandLineBuilder, CompilerMacros)
"-DER=2",
"-DYI=1"));
}
+
} // namespace
diff --git a/tests/unit/unittest/data/symbolscollector_defines.h b/tests/unit/unittest/data/symbolscollector/defines.h
index 6cb2ee91ef..6cb2ee91ef 100644
--- a/tests/unit/unittest/data/symbolscollector_defines.h
+++ b/tests/unit/unittest/data/symbolscollector/defines.h
diff --git a/tests/unit/unittest/data/symbolscollector/error.cpp b/tests/unit/unittest/data/symbolscollector/error.cpp
new file mode 100644
index 0000000000..5df7507e2d
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/error.cpp
@@ -0,0 +1 @@
+ERROR
diff --git a/tests/unit/unittest/data/symbolscollector/header1.h b/tests/unit/unittest/data/symbolscollector/header1.h
new file mode 100644
index 0000000000..3d1ea4b7e0
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/header1.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "header2.h"
diff --git a/tests/unit/unittest/data/symbolscollector_header2.h b/tests/unit/unittest/data/symbolscollector/header2.h
index 6f70f09bee..6f70f09bee 100644
--- a/tests/unit/unittest/data/symbolscollector_header2.h
+++ b/tests/unit/unittest/data/symbolscollector/header2.h
diff --git a/tests/unit/unittest/data/symbolscollector/header3.h b/tests/unit/unittest/data/symbolscollector/header3.h
new file mode 100644
index 0000000000..3d1ea4b7e0
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/header3.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "header2.h"
diff --git a/tests/unit/unittest/data/include/symbolscollector_unmodified_header.h b/tests/unit/unittest/data/symbolscollector/include/unmodified_header.h
index c4bf4e6d99..c4bf4e6d99 100644
--- a/tests/unit/unittest/data/include/symbolscollector_unmodified_header.h
+++ b/tests/unit/unittest/data/symbolscollector/include/unmodified_header.h
diff --git a/tests/unit/unittest/data/include/symbolscollector_unmodified_header2.h b/tests/unit/unittest/data/symbolscollector/include/unmodified_header2.h
index 7905e97419..7905e97419 100644
--- a/tests/unit/unittest/data/include/symbolscollector_unmodified_header2.h
+++ b/tests/unit/unittest/data/symbolscollector/include/unmodified_header2.h
diff --git a/tests/unit/unittest/data/symbolscollector/main.cpp b/tests/unit/unittest/data/symbolscollector/main.cpp
new file mode 100644
index 0000000000..d85f515e18
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/main.cpp
@@ -0,0 +1,4 @@
+#include "header1.h"
+
+void function();
+
diff --git a/tests/unit/unittest/data/symbolscollector/main2.cpp b/tests/unit/unittest/data/symbolscollector/main2.cpp
new file mode 100644
index 0000000000..c6971f0299
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/main2.cpp
@@ -0,0 +1,5 @@
+#include "header1.h"
+#include "header3.h"
+
+void function();
+
diff --git a/tests/unit/unittest/data/symbolscollector_simple.cpp b/tests/unit/unittest/data/symbolscollector/simple.cpp
index 494af8c8b4..494af8c8b4 100644
--- a/tests/unit/unittest/data/symbolscollector_simple.cpp
+++ b/tests/unit/unittest/data/symbolscollector/simple.cpp
diff --git a/tests/unit/unittest/data/symbolscollector_symbolkind.cpp b/tests/unit/unittest/data/symbolscollector/symbolkind.cpp
index e8f9bae530..e8f9bae530 100644
--- a/tests/unit/unittest/data/symbolscollector_symbolkind.cpp
+++ b/tests/unit/unittest/data/symbolscollector/symbolkind.cpp
diff --git a/tests/unit/unittest/data/symbolscollector_unmodified.cpp b/tests/unit/unittest/data/symbolscollector/unmodified.cpp
index b7fe032e55..3f9791bfbd 100644
--- a/tests/unit/unittest/data/symbolscollector_unmodified.cpp
+++ b/tests/unit/unittest/data/symbolscollector/unmodified.cpp
@@ -1,4 +1,4 @@
-#include <symbolscollector_unmodified_header.h>
+#include <unmodified_header.h>
#define MAINFILE_DEFINE
diff --git a/tests/unit/unittest/data/symbolscollector_unmodified2.cpp b/tests/unit/unittest/data/symbolscollector/unmodified2.cpp
index 6127587bd3..3f8256ced8 100644
--- a/tests/unit/unittest/data/symbolscollector_unmodified2.cpp
+++ b/tests/unit/unittest/data/symbolscollector/unmodified2.cpp
@@ -1,4 +1,4 @@
-#include <symbolscollector_unmodified_header.h>
+#include <unmodified_header.h>
#define MAINFILE_DEFINE
diff --git a/tests/unit/unittest/data/symbolscollector/unmodified3.cpp b/tests/unit/unittest/data/symbolscollector/unmodified3.cpp
new file mode 100644
index 0000000000..3a5d8f9df9
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/unmodified3.cpp
@@ -0,0 +1,9 @@
+#include <unmodified_header.h>
+#include <unmodified_header2.h>
+
+#define MAINFILE_DEFINE
+
+void MainFileFunction()
+{
+ HeaderFunctionReferenceInMainFile();
+}
diff --git a/tests/unit/unittest/data/symbolscollector/unsaved.cpp b/tests/unit/unittest/data/symbolscollector/unsaved.cpp
new file mode 100644
index 0000000000..0d0dc9fd51
--- /dev/null
+++ b/tests/unit/unittest/data/symbolscollector/unsaved.cpp
@@ -0,0 +1 @@
+#include "generated_file.h"
diff --git a/tests/unit/unittest/data/symbolscollector_header1.h b/tests/unit/unittest/data/symbolscollector_header1.h
deleted file mode 100644
index bacb59d24a..0000000000
--- a/tests/unit/unittest/data/symbolscollector_header1.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#include "symbolscollector_header2.h"
diff --git a/tests/unit/unittest/data/symbolscollector_header3.h b/tests/unit/unittest/data/symbolscollector_header3.h
deleted file mode 100644
index bacb59d24a..0000000000
--- a/tests/unit/unittest/data/symbolscollector_header3.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#include "symbolscollector_header2.h"
diff --git a/tests/unit/unittest/data/symbolscollector_main.cpp b/tests/unit/unittest/data/symbolscollector_main.cpp
deleted file mode 100644
index 3a17b0a64a..0000000000
--- a/tests/unit/unittest/data/symbolscollector_main.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "symbolscollector_header1.h"
-
-void function();
-
diff --git a/tests/unit/unittest/data/symbolscollector_main2.cpp b/tests/unit/unittest/data/symbolscollector_main2.cpp
deleted file mode 100644
index 71ea20e2b6..0000000000
--- a/tests/unit/unittest/data/symbolscollector_main2.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "symbolscollector_header1.h"
-#include "symbolscollector_header3.h"
-
-void function();
-
diff --git a/tests/unit/unittest/data/symbolscollector_unmodified3.cpp b/tests/unit/unittest/data/symbolscollector_unmodified3.cpp
deleted file mode 100644
index dbaabe7352..0000000000
--- a/tests/unit/unittest/data/symbolscollector_unmodified3.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <symbolscollector_unmodified_header.h>
-#include <symbolscollector_unmodified_header2.h>
-
-#define MAINFILE_DEFINE
-
-void MainFileFunction()
-{
- HeaderFunctionReferenceInMainFile();
-}
diff --git a/tests/unit/unittest/data/symbolscollector_unsaved.cpp b/tests/unit/unittest/data/symbolscollector_unsaved.cpp
deleted file mode 100644
index a57a4e69f7..0000000000
--- a/tests/unit/unittest/data/symbolscollector_unsaved.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "symbolscollector_generated_file.h"
diff --git a/tests/unit/unittest/gtest-creator-printing.h b/tests/unit/unittest/gtest-creator-printing.h
index d0f0013f60..cb63fd56bb 100644
--- a/tests/unit/unittest/gtest-creator-printing.h
+++ b/tests/unit/unittest/gtest-creator-printing.h
@@ -192,10 +192,10 @@ class PchTaskSet;
class BuildDependency;
class SourceEntry;
class FilePathCaching;
-class SlotUsage;
+struct SlotUsage;
class IncludeSearchPath;
enum class IncludeSearchPathType : unsigned char;
-class ArgumentsEntry;
+struct ArgumentsEntry;
class ProjectPartContainer;
std::ostream &operator<<(std::ostream &out, const SourceLocationEntry &entry);
diff --git a/tests/unit/unittest/mocksymbolscollector.h b/tests/unit/unittest/mocksymbolscollector.h
index b41a4bcd4a..34cd71b17d 100644
--- a/tests/unit/unittest/mocksymbolscollector.h
+++ b/tests/unit/unittest/mocksymbolscollector.h
@@ -47,8 +47,7 @@ public:
ON_CALL(*this, setUnsavedFiles(_)).WillByDefault(Invoke(this, &MockSymbolsCollector::setHasUnsavedFiles));
}
- MOCK_METHOD0(collectSymbols,
- void());
+ MOCK_METHOD0(collectSymbols, bool());
MOCK_METHOD2(setFile,
void(ClangBackEnd::FilePathId filePathId,
diff --git a/tests/unit/unittest/pchcreator-test.cpp b/tests/unit/unittest/pchcreator-test.cpp
index 8a1e1ffa8e..d44e72ee6f 100644
--- a/tests/unit/unittest/pchcreator-test.cpp
+++ b/tests/unit/unittest/pchcreator-test.cpp
@@ -133,9 +133,7 @@ TEST_F(PchCreator, CreateProjectPartPchFileContent)
TEST_F(PchCreator, CreateProjectPartClangCompilerArguments)
{
- auto arguments = creator.generateClangCompilerArguments(std::move(pchTask1),
- "project.h",
- "project.pch");
+ auto arguments = creator.generateClangCompilerArguments(std::move(pchTask1), "project.pch");
ASSERT_THAT(arguments,
ElementsAre("clang++",
@@ -151,17 +149,14 @@ TEST_F(PchCreator, CreateProjectPartClangCompilerArguments)
"-isystem",
toNativePath(TESTDATA_DIR "/builddependencycollector/system").path(),
"-o",
- "project.pch",
- "project.h"));
+ "project.pch"));
}
TEST_F(PchCreator, CreateProjectPartClangCompilerArgumentsWithSystemPch)
{
pchTask1.systemPchPath = "system.pch";
- auto arguments = creator.generateClangCompilerArguments(std::move(pchTask1),
- "project.h",
- "project.pch");
+ auto arguments = creator.generateClangCompilerArguments(std::move(pchTask1), "project.pch");
ASSERT_THAT(arguments,
ElementsAre("clang++",
@@ -181,8 +176,7 @@ TEST_F(PchCreator, CreateProjectPartClangCompilerArgumentsWithSystemPch)
"-Xclang",
"system.pch",
"-o",
- "project.pch",
- "project.h"));
+ "project.pch"));
}
TEST_F(PchCreatorVerySlowTest, ProjectPartPchsSendToPchManagerClient)
diff --git a/tests/unit/unittest/refactoringclientserverinprocess-test.cpp b/tests/unit/unittest/refactoringclientserverinprocess-test.cpp
index 659dcf735f..c6e4d59c3a 100644
--- a/tests/unit/unittest/refactoringclientserverinprocess-test.cpp
+++ b/tests/unit/unittest/refactoringclientserverinprocess-test.cpp
@@ -103,12 +103,8 @@ TEST_F(RefactoringClientServerInProcess, SendSourceLocationsForRenamingMessage)
TEST_F(RefactoringClientServerInProcess, SendRequestSourceLocationsForRenamingMessage)
{
- RequestSourceLocationsForRenamingMessage message{{TESTDATA_DIR, "renamevariable.cpp"},
- 1,
- 5,
- "int v;\n\nint x = v + 3;\n",
- {"cc", "renamevariable.cpp"},
- 1};
+ RequestSourceLocationsForRenamingMessage message{
+ {TESTDATA_DIR, "renamevariable.cpp"}, 1, 5, "int v;\n\nint x = v + 3;\n", {"cc"}, 1};
EXPECT_CALL(mockRefactoringServer, requestSourceLocationsForRenamingMessage(message));
@@ -153,15 +149,10 @@ TEST_F(RefactoringClientServerInProcess, SendProgressMessage)
TEST_F(RefactoringClientServerInProcess, RequestSourceRangesAndDiagnosticsForQueryMessage)
{
- RequestSourceRangesForQueryMessage message{"functionDecl()",
- {{{TESTDATA_DIR, "query_simplefunction.cpp"},
- "void f();",
- {"cc", "query_simplefunction.cpp"},
- 1}},
- {{{TESTDATA_DIR, "query_simplefunction.h"},
- "void f();",
- {},
- 1}}};
+ RequestSourceRangesForQueryMessage message{
+ "functionDecl()",
+ {{{TESTDATA_DIR, "query_simplefunction.cpp"}, "void f();", {"cc"}, 1}},
+ {{{TESTDATA_DIR, "query_simplefunction.h"}, "void f();", {}, 1}}};
EXPECT_CALL(mockRefactoringServer, requestSourceRangesForQueryMessage(message));
@@ -171,15 +162,15 @@ TEST_F(RefactoringClientServerInProcess, RequestSourceRangesAndDiagnosticsForQue
TEST_F(RefactoringClientServerInProcess, RequestSourceRangesForQueryMessage)
{
- RequestSourceRangesForQueryMessage message{"functionDecl()",
- {{{TESTDATA_DIR, "query_simplefunction.cpp"},
- "void f();",
- {"cc", "query_simplefunction.cpp"},
- 1}},
- {{{TESTDATA_DIR, "query_simplefunction.h"},
- "void f();",
- {},
- 1}}};
+ RequestSourceRangesForQueryMessage message{
+ "functionDecl()",
+ {{{TESTDATA_DIR, "query_simplefunction.cpp"},
+ "void f();",
+ {
+ "cc",
+ },
+ 1}},
+ {{{TESTDATA_DIR, "query_simplefunction.h"}, "void f();", {}, 1}}};
EXPECT_CALL(mockRefactoringServer, requestSourceRangesForQueryMessage(message));
diff --git a/tests/unit/unittest/refactoringserver-test.cpp b/tests/unit/unittest/refactoringserver-test.cpp
index 56f5e6950d..7ac60c45d1 100644
--- a/tests/unit/unittest/refactoringserver-test.cpp
+++ b/tests/unit/unittest/refactoringserver-test.cpp
@@ -100,9 +100,7 @@ protected:
ClangBackEnd::GeneratedFiles generatedFiles;
ClangBackEnd::RefactoringServer refactoringServer{mockSymbolIndexing, filePathCache, generatedFiles};
Utils::SmallString sourceContent{"void f()\n {}"};
- FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"},
- sourceContent.clone(),
- {"cc", toNativePath(TESTDATA_DIR "/query_simplefunction.cpp").path()}};
+ FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"}, sourceContent.clone(), {"cc"}};
QTemporaryFile temporaryFile{Utils::TemporaryDirectory::masterDirectoryPath()
+ "/clangQuery-XXXXXX.cpp"};
int processingSlotCount = 2;
@@ -113,12 +111,8 @@ using RefactoringServerVerySlowTest = RefactoringServer;
TEST_F(RefactoringServerSlowTest, RequestSourceLocationsForRenamingMessage)
{
- RequestSourceLocationsForRenamingMessage message{{TESTDATA_DIR, "renamevariable.cpp"},
- 1,
- 5,
- "int v;\n\nint x = v + 3;\n",
- {"cc", "renamevariable.cpp"},
- 1};
+ RequestSourceLocationsForRenamingMessage message{
+ {TESTDATA_DIR, "renamevariable.cpp"}, 1, 5, "int v;\n\nint x = v + 3;\n", {"cc"}, 1};
EXPECT_CALL(mockRefactoringClient,
sourceLocationsForRenamingMessage(
@@ -152,13 +146,9 @@ TEST_F(RefactoringServerSlowTest, RequestSingleSourceRangesAndDiagnosticsWithUns
Utils::SmallString unsavedContent{"void f();"};
FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"},
"#include \"query_simplefunction.h\"",
- {"cc", "query_simplefunction.cpp"}};
- FileContainer unsaved{{TESTDATA_DIR, "query_simplefunction.h"},
- unsavedContent.clone(),
- {}};
- RequestSourceRangesForQueryMessage message{"functionDecl()",
- {source.clone()},
- {unsaved.clone()}};
+ {"cc"}};
+ FileContainer unsaved{{TESTDATA_DIR, "query_simplefunction.h"}, unsavedContent.clone(), {}};
+ RequestSourceRangesForQueryMessage message{"functionDecl()", {source.clone()}, {unsaved.clone()}};
EXPECT_CALL(mockRefactoringClient,
sourceRangesForQueryMessage(
@@ -267,11 +257,10 @@ TEST_F(RefactoringServer, PollTimerNotIsActiveAfterCanceling)
TEST_F(RefactoringServerSlowTest, ForValidRequestSourceRangesAndDiagnosticsGetSourceRange)
{
- RequestSourceRangesAndDiagnosticsForQueryMessage message(
- "functionDecl()",
- {FilePath(temporaryFile.fileName()),
- "void f() {}",
- {"cc", toNativePath(temporaryFile.fileName()).path()}});
+ RequestSourceRangesAndDiagnosticsForQueryMessage message("functionDecl()",
+ {FilePath(temporaryFile.fileName()),
+ "void f() {}",
+ {"cc"}});
EXPECT_CALL(mockRefactoringClient,
sourceRangesAndDiagnosticsForQueryMessage(
@@ -287,11 +276,10 @@ TEST_F(RefactoringServerSlowTest, ForValidRequestSourceRangesAndDiagnosticsGetSo
TEST_F(RefactoringServerSlowTest, ForInvalidRequestSourceRangesAndDiagnosticsGetDiagnostics)
{
- RequestSourceRangesAndDiagnosticsForQueryMessage message(
- "func()",
- {FilePath(temporaryFile.fileName()),
- "void f() {}",
- {"cc", toNativePath(temporaryFile.fileName()).path()}});
+ RequestSourceRangesAndDiagnosticsForQueryMessage message("func()",
+ {FilePath(temporaryFile.fileName()),
+ "void f() {}",
+ {"cc"}});
EXPECT_CALL(mockRefactoringClient,
sourceRangesAndDiagnosticsForQueryMessage(
diff --git a/tests/unit/unittest/sourcerangeextractor-test.cpp b/tests/unit/unittest/sourcerangeextractor-test.cpp
index 171db9b956..552cde08ac 100644
--- a/tests/unit/unittest/sourcerangeextractor-test.cpp
+++ b/tests/unit/unittest/sourcerangeextractor-test.cpp
@@ -57,9 +57,7 @@ protected:
void TearDown() override;
protected:
- TestClangTool clangTool{{TESTDATA_DIR "/sourcerangeextractor_location.cpp"},
- "",
- {"cc", "sourcerangeextractor_location.cpp"}};
+ TestClangTool clangTool{{TESTDATA_DIR "/sourcerangeextractor_location.cpp"}, "", {"cc"}};
ClangBackEnd::SourceRangesContainer sourceRangesContainer;
const clang::SourceManager &sourceManager{clangTool.sourceManager()};
Sqlite::Database database{":memory:", Sqlite::JournalMode::Memory};
diff --git a/tests/unit/unittest/symbolfinder-test.cpp b/tests/unit/unittest/symbolfinder-test.cpp
index 1dad3184d6..8f29fe02da 100644
--- a/tests/unit/unittest/symbolfinder-test.cpp
+++ b/tests/unit/unittest/symbolfinder-test.cpp
@@ -75,9 +75,7 @@ TEST_F(SymbolFinder, FileContentFilePath)
TEST_F(SymbolFinderSlowTest, FindName)
{
Finder finder(1, 5, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "int variable;",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "int variable;", {"cc"});
finder.findSymbol();
@@ -87,9 +85,7 @@ TEST_F(SymbolFinderSlowTest, FindName)
TEST_F(SymbolFinderSlowTest, FindNameInUnsavedFile)
{
Finder finder(1, 5, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "int newVariable;",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "int newVariable;", {"cc"});
finder.findSymbol();
@@ -99,9 +95,7 @@ TEST_F(SymbolFinderSlowTest, FindNameInUnsavedFile)
TEST_F(SymbolFinderSlowTest, FindUsrs)
{
Finder finder(1, 5, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "int variable;",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "int variable;", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -111,9 +105,7 @@ TEST_F(SymbolFinderSlowTest, FindUsrs)
TEST_F(SymbolFinderSlowTest, VariableDeclarationSourceLocations)
{
Finder finder(1, 5, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -125,9 +117,7 @@ TEST_F(SymbolFinderSlowTest, VariableDeclarationSourceLocations)
TEST_F(SymbolFinderSlowTest, VariableUsageSourceLocations)
{
Finder finder(3, 9, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -139,9 +129,7 @@ TEST_F(SymbolFinderSlowTest, VariableUsageSourceLocations)
TEST_F(SymbolFinderSlowTest, TemplateMemberVariableDeclarationSourceLocations)
{
Finder finder(8, 18, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -154,9 +142,7 @@ TEST_F(SymbolFinderSlowTest, TemplateMemberVariableDeclarationSourceLocations)
TEST_F(SymbolFinderSlowTest, TemplateMemberVariableUsageSourceLocations)
{
Finder finder(15, 14, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -169,9 +155,7 @@ TEST_F(SymbolFinderSlowTest, TemplateMemberVariableUsageSourceLocations)
TEST_F(SymbolFinderSlowTest, TemplateMemberVariableUsageInLambdaSourceLocations)
{
Finder finder(18, 19, filePathCaching);
- finder.addFile({TESTDATA_DIR "/renamevariable.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/renamevariable.cpp").path(), "-std=c++14"});
+ finder.addFile({TESTDATA_DIR "/renamevariable.cpp"}, "", {"cc", "-std=c++14"});
finder.findSymbol();
@@ -184,9 +168,7 @@ TEST_F(SymbolFinderSlowTest, TemplateMemberVariableUsageInLambdaSourceLocations)
TEST_F(SymbolFinderSlowTest, CursorOverMacroDefintionSymbolName)
{
Finder finder(1, 9, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -196,9 +178,7 @@ TEST_F(SymbolFinderSlowTest, CursorOverMacroDefintionSymbolName)
TEST_F(SymbolFinderSlowTest, CursorOverMacroExpansionSymbolName)
{
Finder finder(10, 10, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -208,9 +188,7 @@ TEST_F(SymbolFinderSlowTest, CursorOverMacroExpansionSymbolName)
TEST_F(SymbolFinderSlowTest, FindMacroDefinition)
{
Finder finder(1, 9, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -221,9 +199,7 @@ TEST_F(SymbolFinderSlowTest, FindMacroDefinition)
TEST_F(SymbolFinderSlowTest, FindMacroExpansion)
{
Finder finder(1, 9, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -234,9 +210,7 @@ TEST_F(SymbolFinderSlowTest, FindMacroExpansion)
TEST_F(SymbolFinderSlowTest, DoNotFindUndedefinedMacroExpansion)
{
Finder finder(1, 9, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -247,9 +221,7 @@ TEST_F(SymbolFinderSlowTest, DoNotFindUndedefinedMacroExpansion)
TEST_F(SymbolFinderSlowTest, FindMacroDefinitionFromMacroExpansion)
{
Finder finder(10, 10, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -261,9 +233,7 @@ TEST_F(SymbolFinderSlowTest, FindMacroDefinitionFromMacroExpansion)
TEST_F(SymbolFinderSlowTest, FindMacroExpansionBeforeMacroExpansionWithCursor)
{
Finder finder(12, 10, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
@@ -274,9 +244,7 @@ TEST_F(SymbolFinderSlowTest, FindMacroExpansionBeforeMacroExpansionWithCursor)
TEST_F(SymbolFinderSlowTest, FindMacroExpansionAfterMacroExpansionWithCursor)
{
Finder finder(10, 10, filePathCaching);
- finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"},
- "",
- {"cc", toNativePath(TESTDATA_DIR "/symbolfinder_macro.cpp").path()});
+ finder.addFile({TESTDATA_DIR "/symbolfinder_macro.cpp"}, "", {"cc"});
finder.findSymbol();
diff --git a/tests/unit/unittest/symbolindexer-test.cpp b/tests/unit/unittest/symbolindexer-test.cpp
index ce0fadfdf8..0e4e2072cd 100644
--- a/tests/unit/unittest/symbolindexer-test.cpp
+++ b/tests/unit/unittest/symbolindexer-test.cpp
@@ -114,6 +114,7 @@ protected:
ON_CALL(mockCollector, sourceDependencies()).WillByDefault(ReturnRef(sourceDependencies));
ON_CALL(mockSymbolStorage, fetchProjectPartArtefact(A<FilePathId>())).WillByDefault(Return(artefact));
ON_CALL(mockBuildDependenciesStorage, fetchLowestLastModifiedTime(A<FilePathId>())).WillByDefault(Return(-1));
+ ON_CALL(mockCollector, collectSymbols()).WillByDefault(Return(true));
mockCollector.setIsUsed(false);
@@ -267,7 +268,7 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsAddFilesInCollector)
ElementsAre("clang++",
"-Wno-pragma-once-outside-header",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -297,7 +298,7 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsAddFilesWithPrecompiledHeaderInColl
ElementsAre("clang++",
"-Wno-pragma-once-outside-header",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -330,7 +331,7 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsAddFilesWithoutPrecompiledHeaderInC
ElementsAre("clang++",
"-Wno-pragma-once-outside-header",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -510,7 +511,7 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsInOrderWithoutProjectPartArtifact)
ElementsAre("clang++",
"-Wno-pragma-once-outside-header",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -562,7 +563,7 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsInOrderWithProjectPartArtifact)
ElementsAre("clang++",
"-Wno-pragma-once-outside-header",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -590,6 +591,61 @@ TEST_F(SymbolIndexer, UpdateProjectPartsCallsInOrderWithProjectPartArtifact)
indexer.updateProjectParts({projectPart1});
}
+TEST_F(SymbolIndexer, UpdateProjectPartsCallsInOrderButGetsAnErrorForCollectingSymbols)
+{
+ InSequence s;
+
+ EXPECT_CALL(mockSqliteTransactionBackend, immediateBegin());
+ EXPECT_CALL(mockSymbolStorage,
+ fetchProjectPartArtefact(TypedEq<Utils::SmallStringView>(projectPart1.projectPartId)))
+ .WillOnce(Return(nullArtefact));
+ EXPECT_CALL(mockSymbolStorage,
+ insertOrUpdateProjectPart(Eq(projectPart1.projectPartId),
+ Eq(projectPart1.toolChainArguments),
+ Eq(projectPart1.compilerMacros),
+ Eq(projectPart1.systemIncludeSearchPaths),
+ Eq(projectPart1.projectIncludeSearchPaths),
+ Eq(Utils::Language::Cxx),
+ Eq(Utils::LanguageVersion::CXX14),
+ Eq(Utils::LanguageExtension::None)))
+ .WillOnce(Return(12));
+ EXPECT_CALL(mockSymbolStorage, fetchPrecompiledHeader(Eq(12)));
+ EXPECT_CALL(mockBuildDependenciesStorage, fetchLowestLastModifiedTime(Eq(main1PathId))).Times(0);
+ EXPECT_CALL(mockSqliteTransactionBackend, commit());
+ EXPECT_CALL(mockCollector,
+ setFile(main1PathId,
+ ElementsAre("clang++",
+ "-Wno-pragma-once-outside-header",
+ "-x",
+ "c++",
+ "-std=c++14",
+ "-nostdinc",
+ "-nostdinc++",
+ "-DBAR=1",
+ "-DFOO=1",
+ "-I",
+ "/project/includes",
+ "-I",
+ "/other/project/includes",
+ "-isystem",
+ TESTDATA_DIR,
+ "-isystem",
+ "/other/includes",
+ "-isystem",
+ "/includes")));
+ EXPECT_CALL(mockCollector, collectSymbols()).WillOnce(Return(false));
+ EXPECT_CALL(mockSqliteTransactionBackend, immediateBegin()).Times(0);
+ EXPECT_CALL(mockSymbolStorage, addSymbolsAndSourceLocations(symbolEntries, sourceLocations)).Times(0);
+ EXPECT_CALL(mockSymbolStorage, updateProjectPartSources(TypedEq<int>(12), Eq(sourceFileIds))).Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertOrUpdateUsedMacros(Eq(usedMacros))).Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertFileStatuses(Eq(fileStatus))).Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertOrUpdateSourceDependencies(Eq(sourceDependencies)))
+ .Times(0);
+ EXPECT_CALL(mockSqliteTransactionBackend, commit()).Times(0);
+
+ indexer.updateProjectParts({projectPart1});
+}
+
TEST_F(SymbolIndexer, CallSetNotifier)
{
EXPECT_CALL(mockPathWatcher, setNotifier(_));
@@ -618,7 +674,7 @@ TEST_F(SymbolIndexer, UpdateChangedPathCallsInOrder)
ElementsAre("clang++",
"-DFOO",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -667,6 +723,50 @@ TEST_F(SymbolIndexer, HandleEmptyOptionalArtifactInUpdateChangedPath)
indexer.pathsChanged({sourceFileIds[0]});
}
+TEST_F(SymbolIndexer, UpdateChangedPathCallsInOrderButGetsAnErrorForCollectingSymbols)
+{
+ InSequence s;
+
+ EXPECT_CALL(mockSqliteTransactionBackend, deferredBegin());
+ EXPECT_CALL(mockSymbolStorage, fetchProjectPartArtefact(TypedEq<FilePathId>(sourceFileIds[0])))
+ .WillOnce(Return(artefact));
+ EXPECT_CALL(mockSymbolStorage, fetchPrecompiledHeader(Eq(artefact.projectPartId)));
+ EXPECT_CALL(mockSqliteTransactionBackend, commit());
+ EXPECT_CALL(mockCollector,
+ setFile(Eq(sourceFileIds[0]),
+ ElementsAre("clang++",
+ "-DFOO",
+ "-x",
+ "c++",
+ "-std=c++14",
+ "-nostdinc",
+ "-nostdinc++",
+ "-DBAR=1",
+ "-DFOO=1",
+ "-I",
+ "/project/includes",
+ "-I",
+ "/other/project/includes",
+ "-isystem",
+ TESTDATA_DIR,
+ "-isystem",
+ "/other/includes",
+ "-isystem",
+ "/includes")));
+ EXPECT_CALL(mockCollector, collectSymbols()).WillOnce(Return(false));
+ EXPECT_CALL(mockSqliteTransactionBackend, immediateBegin()).Times(0);
+ EXPECT_CALL(mockSymbolStorage, addSymbolsAndSourceLocations(symbolEntries, sourceLocations)).Times(0);
+ EXPECT_CALL(mockSymbolStorage, updateProjectPartSources(artefact.projectPartId, Eq(sourceFileIds)))
+ .Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertOrUpdateUsedMacros(Eq(usedMacros))).Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertFileStatuses(Eq(fileStatus))).Times(0);
+ EXPECT_CALL(mockBuildDependenciesStorage, insertOrUpdateSourceDependencies(Eq(sourceDependencies)))
+ .Times(0);
+ EXPECT_CALL(mockSqliteTransactionBackend, commit()).Times(0);
+
+ indexer.pathsChanged({sourceFileIds[0]});
+}
+
TEST_F(SymbolIndexer, UpdateChangedPathIsUsingPrecompiledHeader)
{
ON_CALL(mockSymbolStorage, fetchProjectPartArtefact(TypedEq<FilePathId>(sourceFileIds[0])))
@@ -680,7 +780,7 @@ TEST_F(SymbolIndexer, UpdateChangedPathIsUsingPrecompiledHeader)
ElementsAre("clang++",
"-DFOO",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
@@ -715,7 +815,7 @@ TEST_F(SymbolIndexer, UpdateChangedPathIsNotUsingPrecompiledHeaderIfItNotExists)
ElementsAre("clang++",
"-DFOO",
"-x",
- "c++-header",
+ "c++",
"-std=c++14",
"-nostdinc",
"-nostdinc++",
diff --git a/tests/unit/unittest/symbolscollector-test.cpp b/tests/unit/unittest/symbolscollector-test.cpp
index 9ddb7c461b..2d7025373f 100644
--- a/tests/unit/unittest/symbolscollector-test.cpp
+++ b/tests/unit/unittest/symbolscollector-test.cpp
@@ -178,7 +178,7 @@ protected:
TEST_F(SymbolsCollector, CollectSymbolName)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -188,7 +188,7 @@ TEST_F(SymbolsCollector, CollectSymbolName)
TEST_F(SymbolsCollector, SymbolMatchesLocation)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -200,7 +200,7 @@ TEST_F(SymbolsCollector, SymbolMatchesLocation)
TEST_F(SymbolsCollector, OtherSymboldMatchesLocation)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -212,20 +212,19 @@ TEST_F(SymbolsCollector, OtherSymboldMatchesLocation)
TEST_F(SymbolsCollector, CollectFilePath)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
ASSERT_THAT(collector.sourceLocations(),
- Contains(
- AllOf(Field(&SourceLocationEntry::filePathId,
- filePathId(TESTDATA_DIR"/symbolscollector_simple.cpp")),
- Field(&SourceLocationEntry::kind, SourceLocationKind::Declaration))));
+ Contains(AllOf(Field(&SourceLocationEntry::filePathId,
+ filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp")),
+ Field(&SourceLocationEntry::kind, SourceLocationKind::Declaration))));
}
TEST_F(SymbolsCollector, CollectLineColumn)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -237,7 +236,7 @@ TEST_F(SymbolsCollector, CollectLineColumn)
TEST_F(SymbolsCollector, CollectReference)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -249,7 +248,7 @@ TEST_F(SymbolsCollector, CollectReference)
TEST_F(SymbolsCollector, ReferencedSymboldMatchesLocation)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_simple.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/simple.cpp"), {"cc"});
collector.collectSymbols();
@@ -261,10 +260,9 @@ TEST_F(SymbolsCollector, ReferencedSymboldMatchesLocation)
TEST_F(SymbolsCollector, DISABLED_ON_WINDOWS(CollectInUnsavedFile))
{
- FileContainers unsaved{{{TESTDATA_DIR, "symbolscollector_generated_file.h"},
- "void function();",
- {}}};
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unsaved.cpp"), {"cc"});
+ FileContainers unsaved{
+ {{TESTDATA_DIR, "symbolscollector/generated_file.h"}, "void function();", {}}};
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unsaved.cpp"), {"cc"});
collector.setUnsavedFiles(std::move(unsaved));
collector.collectSymbols();
@@ -275,48 +273,48 @@ TEST_F(SymbolsCollector, DISABLED_ON_WINDOWS(CollectInUnsavedFile))
TEST_F(SymbolsCollector, SourceFiles)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collectSymbols();
ASSERT_THAT(collector.sourceFiles(),
- UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"),
- filePathId(TESTDATA_DIR "/symbolscollector_header1.h"),
- filePathId(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header1.h"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(SymbolsCollector, MainFileInSourceFiles)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
ASSERT_THAT(collector.sourceFiles(),
- ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(SymbolsCollector, ResetMainFileInSourceFiles)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
ASSERT_THAT(collector.sourceFiles(),
- ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(SymbolsCollector, DontDuplicateSourceFiles)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collectSymbols();
collector.collectSymbols();
ASSERT_THAT(collector.sourceFiles(),
- UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"),
- filePathId(TESTDATA_DIR "/symbolscollector_header1.h"),
- filePathId(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header1.h"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(SymbolsCollector, ClearSourceFiles)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
@@ -325,7 +323,7 @@ TEST_F(SymbolsCollector, ClearSourceFiles)
TEST_F(SymbolsCollector, ClearSymbols)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collectSymbols();
collector.clear();
@@ -335,7 +333,7 @@ TEST_F(SymbolsCollector, ClearSymbols)
TEST_F(SymbolsCollector, ClearSourceLocations)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collectSymbols();
collector.clear();
@@ -345,7 +343,7 @@ TEST_F(SymbolsCollector, ClearSourceLocations)
TEST_F(SymbolsCollector, ClearFileStatus)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collectSymbols();
collector.clear();
@@ -355,7 +353,7 @@ TEST_F(SymbolsCollector, ClearFileStatus)
TEST_F(SymbolsCollector, ClearUsedMacros)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_defines.h"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/defines.h"), {"cc"});
collector.collectSymbols();
collector.clear();
@@ -365,7 +363,8 @@ TEST_F(SymbolsCollector, ClearUsedMacros)
TEST_F(SymbolsCollector, ClearSourceDependencies)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main2.cpp"), {"cc", "-I" TESTDATA_DIR});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main2.cpp"),
+ {"cc", "-I" TESTDATA_DIR});
collector.collectSymbols();
collector.clear();
@@ -375,7 +374,7 @@ TEST_F(SymbolsCollector, ClearSourceDependencies)
TEST_F(SymbolsCollector, DontCollectSymbolsAfterFilesAreCleared)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collectSymbols();
@@ -385,7 +384,7 @@ TEST_F(SymbolsCollector, DontCollectSymbolsAfterFilesAreCleared)
TEST_F(SymbolsCollector, DontCollectSourceFilesAfterFilesAreCleared)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collectSymbols();
@@ -395,7 +394,7 @@ TEST_F(SymbolsCollector, DontCollectSourceFilesAfterFilesAreCleared)
TEST_F(SymbolsCollector, DontCollectFileStatusAfterFilesAreCleared)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collectSymbols();
@@ -405,7 +404,7 @@ TEST_F(SymbolsCollector, DontCollectFileStatusAfterFilesAreCleared)
TEST_F(SymbolsCollector, DontCollectUsedMacrosAfterFilesAreCleared)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collectSymbols();
@@ -415,7 +414,7 @@ TEST_F(SymbolsCollector, DontCollectUsedMacrosAfterFilesAreCleared)
TEST_F(SymbolsCollector, DontCollectSourceDependenciesAfterFilesAreCleared)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collectSymbols();
@@ -425,7 +424,7 @@ TEST_F(SymbolsCollector, DontCollectSourceDependenciesAfterFilesAreCleared)
TEST_F(SymbolsCollector, CollectUsedMacrosWithExternalDefine)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -442,7 +441,7 @@ TEST_F(SymbolsCollector, CollectUsedMacrosWithExternalDefine)
TEST_F(SymbolsCollector, CollectUsedMacrosWithoutExternalDefine)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
@@ -459,7 +458,7 @@ TEST_F(SymbolsCollector, CollectUsedMacrosWithoutExternalDefine)
TEST_F(SymbolsCollector, DontCollectHeaderGuards)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
@@ -470,7 +469,7 @@ TEST_F(SymbolsCollector, DontCollectHeaderGuards)
TEST_F(SymbolsCollector, DISABLED_DontCollectDynamicLibraryExports)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
@@ -481,7 +480,7 @@ TEST_F(SymbolsCollector, DISABLED_DontCollectDynamicLibraryExports)
TEST_F(SymbolsCollector, CollectMacroDefinitionSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -492,7 +491,7 @@ TEST_F(SymbolsCollector, CollectMacroDefinitionSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageInIfNotDefSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -503,7 +502,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageInIfNotDefSourceLocation)
TEST_F(SymbolsCollector, CollectSecondMacroUsageInIfNotDefSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -514,7 +513,7 @@ TEST_F(SymbolsCollector, CollectSecondMacroUsageInIfNotDefSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageCompilerArgumentSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -525,7 +524,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageCompilerArgumentSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageInIfDefSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -536,7 +535,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageInIfDefSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageInDefinedSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -547,7 +546,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageInDefinedSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageExpansionSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -558,7 +557,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageExpansionSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageUndefSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -569,7 +568,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageUndefSourceLocation)
TEST_F(SymbolsCollector, CollectMacroUsageBuiltInSourceLocation)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -580,7 +579,7 @@ TEST_F(SymbolsCollector, CollectMacroUsageBuiltInSourceLocation)
TEST_F(SymbolsCollector, CollectMacroDefinitionSymbols)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
@@ -591,7 +590,7 @@ TEST_F(SymbolsCollector, CollectMacroDefinitionSymbols)
TEST_F(SymbolsCollector, CollectMacroBuiltInSymbols)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
@@ -602,7 +601,7 @@ TEST_F(SymbolsCollector, CollectMacroBuiltInSymbols)
TEST_F(SymbolsCollector, CollectMacroCompilerArgumentSymbols)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.setFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collectSymbols();
@@ -613,24 +612,23 @@ TEST_F(SymbolsCollector, CollectMacroCompilerArgumentSymbols)
TEST_F(SymbolsCollector, CollectFileStatuses)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_main.cpp");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/main.cpp");
collector.setFile(fileId, {"cc"});
collector.collectSymbols();
ASSERT_THAT(collector.fileStatuses(),
- ElementsAre(
- fileStatus(TESTDATA_DIR "/symbolscollector_main.cpp"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header1.h"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header2.h")));
+ ElementsAre(fileStatus(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header1.h"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(SymbolsCollector, CollectSourceDependencies)
{
- auto mainFileId = filePathId(TESTDATA_DIR "/symbolscollector_main2.cpp");
- auto header1FileId = filePathId(TESTDATA_DIR "/symbolscollector_header1.h");
- auto header2FileId = filePathId(TESTDATA_DIR "/symbolscollector_header2.h");
- auto header3FileId = filePathId(TESTDATA_DIR "/symbolscollector_header3.h");
+ auto mainFileId = filePathId(TESTDATA_DIR "/symbolscollector/main2.cpp");
+ auto header1FileId = filePathId(TESTDATA_DIR "/symbolscollector/header1.h");
+ auto header2FileId = filePathId(TESTDATA_DIR "/symbolscollector/header2.h");
+ auto header3FileId = filePathId(TESTDATA_DIR "/symbolscollector/header3.h");
collector.setFile(mainFileId, {"cc", "-I" TESTDATA_DIR});
collector.collectSymbols();
@@ -644,7 +642,7 @@ TEST_F(SymbolsCollector, CollectSourceDependencies)
TEST_F(SymbolsCollector, IsClassSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -658,7 +656,7 @@ TEST_F(SymbolsCollector, IsClassSymbol)
TEST_F(SymbolsCollector, IsStructSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -672,7 +670,7 @@ TEST_F(SymbolsCollector, IsStructSymbol)
TEST_F(SymbolsCollector, IsEnumerationSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -690,7 +688,7 @@ TEST_F(SymbolsCollector, IsEnumerationSymbol)
TEST_F(SymbolsCollector, IsUnionSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -704,7 +702,7 @@ TEST_F(SymbolsCollector, IsUnionSymbol)
TEST_F(SymbolsCollector, DISABLED_ON_NON_WINDOWS(IsMsvcInterfaceSymbol))
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -718,7 +716,7 @@ TEST_F(SymbolsCollector, DISABLED_ON_NON_WINDOWS(IsMsvcInterfaceSymbol))
TEST_F(SymbolsCollector, IsFunctionSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -731,7 +729,7 @@ TEST_F(SymbolsCollector, IsFunctionSymbol)
TEST_F(SymbolsCollector, IsVariableSymbol)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_symbolkind.cpp"), {"cc"});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/symbolkind.cpp"), {"cc"});
collector.collectSymbols();
@@ -744,7 +742,8 @@ TEST_F(SymbolsCollector, IsVariableSymbol)
TEST_F(SymbolsCollector, IndexUnmodifiedHeaderFilesAtFirstRun)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified.cpp"), {"cc", "-I", {TESTDATA_DIR, "/include"}});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified.cpp"),
+ {"cc", "-I", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
@@ -761,10 +760,12 @@ TEST_F(SymbolsCollector, IndexUnmodifiedHeaderFilesAtFirstRun)
TEST_F(SymbolsCollector, DontIndexUnmodifiedHeaderFilesAtSecondRun)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified.cpp"), {"cc", "-I", {TESTDATA_DIR, "/include"}});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified.cpp"),
+ {"cc", "-I", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
collector.clear();
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified2.cpp"), {"cc", "-I", {TESTDATA_DIR, "/include"}});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified2.cpp"),
+ {"cc", "-I", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
@@ -780,11 +781,13 @@ TEST_F(SymbolsCollector, DontIndexUnmodifiedHeaderFilesAtSecondRun)
TEST_F(SymbolsCollector, DontIndexUnmodifiedHeaderFilesAtTouchHeader)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified3.cpp"), {"cc", "-I", {TESTDATA_DIR, "/include"}});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified3.cpp"),
+ {"cc", "-I", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
collector.clear();
- touchFile(TESTDATA_DIR "/include/symbolscollector_unmodified_header2.h");
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified3.cpp"), {"cc", "-I", {TESTDATA_DIR, "/include"}});
+ touchFile(TESTDATA_DIR "/symbolscollector/include/unmodified_header2.h");
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified3.cpp"),
+ {"cc", "-I", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
@@ -800,7 +803,8 @@ TEST_F(SymbolsCollector, DontIndexUnmodifiedHeaderFilesAtTouchHeader)
TEST_F(SymbolsCollector, DontIndexSystemIncudes)
{
- collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector_unmodified.cpp"), {"cc", "-isystem", {TESTDATA_DIR, "/include"}});
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/unmodified.cpp"),
+ {"cc", "-isystem", {TESTDATA_DIR, "/symbolscollector/include"}});
collector.collectSymbols();
@@ -815,4 +819,22 @@ TEST_F(SymbolsCollector, DontIndexSystemIncudes)
Not(Contains(HasSymbolName("HEADER_DEFINE"))),
Not(Contains(HasSymbolName("FunctionLocalVariable")))));
}
+
+TEST_F(SymbolsCollector, CollectReturnsFalseIfThereIsError)
+{
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/error.cpp"), {"cc"});
+
+ bool success = collector.collectSymbols();
+
+ ASSERT_FALSE(success);
+}
+
+TEST_F(SymbolsCollector, CollectReturnsFalseIfThereIsNoError)
+{
+ collector.setFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
+
+ bool success = collector.collectSymbols();
+
+ ASSERT_TRUE(success);
}
+} // namespace
diff --git a/tests/unit/unittest/usedmacrocollector-test.cpp b/tests/unit/unittest/usedmacrocollector-test.cpp
index 40f8e8e744..61f7fcd99b 100644
--- a/tests/unit/unittest/usedmacrocollector-test.cpp
+++ b/tests/unit/unittest/usedmacrocollector-test.cpp
@@ -79,48 +79,48 @@ protected:
TEST_F(UsedMacroAndSourcesCollector, SourceFiles)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collect();
ASSERT_THAT(collector.sourceFiles(),
- UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"),
- filePathId(TESTDATA_DIR "/symbolscollector_header1.h"),
- filePathId(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header1.h"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(UsedMacroAndSourcesCollector, MainFileInSourceFiles)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
ASSERT_THAT(collector.sourceFiles(),
- ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(UsedMacroAndSourcesCollector, ResetMainFileInSourceFiles)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
ASSERT_THAT(collector.sourceFiles(),
- ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp")));
+ ElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp")));
}
TEST_F(UsedMacroAndSourcesCollector, DontDuplicateSourceFiles)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collect();
collector.collect();
ASSERT_THAT(collector.sourceFiles(),
- UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"),
- filePathId(TESTDATA_DIR "/symbolscollector_header1.h"),
- filePathId(TESTDATA_DIR "/symbolscollector_header2.h")));
+ UnorderedElementsAre(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header1.h"),
+ filePathId(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(UsedMacroAndSourcesCollector, ClearSourceFiles)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
@@ -129,7 +129,7 @@ TEST_F(UsedMacroAndSourcesCollector, ClearSourceFiles)
TEST_F(UsedMacroAndSourcesCollector, ClearFileStatus)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collect();
collector.clear();
@@ -139,7 +139,7 @@ TEST_F(UsedMacroAndSourcesCollector, ClearFileStatus)
TEST_F(UsedMacroAndSourcesCollector, ClearUsedMacros)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_defines.h"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/defines.h"), {"cc"});
collector.collect();
collector.clear();
@@ -149,7 +149,7 @@ TEST_F(UsedMacroAndSourcesCollector, ClearUsedMacros)
TEST_F(UsedMacroAndSourcesCollector, ClearSourceDependencies)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main2.cpp"), {"cc", "-I" TESTDATA_DIR});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main2.cpp"), {"cc", "-I" TESTDATA_DIR});
collector.collect();
collector.clear();
@@ -159,7 +159,7 @@ TEST_F(UsedMacroAndSourcesCollector, ClearSourceDependencies)
TEST_F(UsedMacroAndSourcesCollector, DontCollectSourceFilesAfterFilesAreCleared)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collect();
@@ -169,7 +169,7 @@ TEST_F(UsedMacroAndSourcesCollector, DontCollectSourceFilesAfterFilesAreCleared)
TEST_F(UsedMacroAndSourcesCollector, DontCollectFileStatusAfterFilesAreCleared)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collect();
@@ -179,7 +179,7 @@ TEST_F(UsedMacroAndSourcesCollector, DontCollectFileStatusAfterFilesAreCleared)
TEST_F(UsedMacroAndSourcesCollector, DontCollectUsedMacrosAfterFilesAreCleared)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collect();
@@ -190,7 +190,7 @@ TEST_F(UsedMacroAndSourcesCollector, DontCollectUsedMacrosAfterFilesAreCleared)
TEST_F(UsedMacroAndSourcesCollector, DontCollectSourceDependenciesAfterFilesAreCleared)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.clear();
collector.collect();
@@ -200,7 +200,7 @@ TEST_F(UsedMacroAndSourcesCollector, DontCollectSourceDependenciesAfterFilesAreC
TEST_F(UsedMacroAndSourcesCollector, CollectUsedMacrosWithExternalDefine)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.addFile(fileId, {"cc", "-DCOMPILER_ARGUMENT"});
collector.collect();
@@ -217,7 +217,7 @@ TEST_F(UsedMacroAndSourcesCollector, CollectUsedMacrosWithExternalDefine)
TEST_F(UsedMacroAndSourcesCollector, CollectUsedMacrosWithoutExternalDefine)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.addFile(fileId, {"cc"});
collector.collect();
@@ -234,7 +234,7 @@ TEST_F(UsedMacroAndSourcesCollector, CollectUsedMacrosWithoutExternalDefine)
TEST_F(UsedMacroAndSourcesCollector, DontCollectHeaderGuards)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.addFile(fileId, {"cc"});
collector.collect();
@@ -245,7 +245,7 @@ TEST_F(UsedMacroAndSourcesCollector, DontCollectHeaderGuards)
TEST_F(UsedMacroAndSourcesCollector, DISABLED_DontCollectDynamicLibraryExports)
{
- auto fileId = filePathId(TESTDATA_DIR "/symbolscollector_defines.h");
+ auto fileId = filePathId(TESTDATA_DIR "/symbolscollector/defines.h");
collector.addFile(fileId, {"cc"});
collector.collect();
@@ -256,23 +256,23 @@ TEST_F(UsedMacroAndSourcesCollector, DISABLED_DontCollectDynamicLibraryExports)
TEST_F(UsedMacroAndSourcesCollector, CollectFileStatuses)
{
- collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector_main.cpp"), {"cc"});
+ collector.addFile(filePathId(TESTDATA_DIR "/symbolscollector/main.cpp"), {"cc"});
collector.collect();
ASSERT_THAT(collector.fileStatuses(),
ElementsAre(
- fileStatus(TESTDATA_DIR "/symbolscollector_main.cpp"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header1.h"),
- fileStatus(TESTDATA_DIR "/symbolscollector_header2.h")));
+ fileStatus(TESTDATA_DIR "/symbolscollector/main.cpp"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header1.h"),
+ fileStatus(TESTDATA_DIR "/symbolscollector/header2.h")));
}
TEST_F(UsedMacroAndSourcesCollector, CollectSourceDependencies)
{
- auto mainFileId = filePathId(TESTDATA_DIR "/symbolscollector_main2.cpp");
- auto header1FileId = filePathId(TESTDATA_DIR "/symbolscollector_header1.h");
- auto header2FileId = filePathId(TESTDATA_DIR "/symbolscollector_header2.h");
- auto header3FileId = filePathId(TESTDATA_DIR "/symbolscollector_header3.h");
+ auto mainFileId = filePathId(TESTDATA_DIR "/symbolscollector/main2.cpp");
+ auto header1FileId = filePathId(TESTDATA_DIR "/symbolscollector/header1.h");
+ auto header2FileId = filePathId(TESTDATA_DIR "/symbolscollector/header2.h");
+ auto header3FileId = filePathId(TESTDATA_DIR "/symbolscollector/header3.h");
collector.addFile(mainFileId, {"cc", "-I" TESTDATA_DIR});
collector.collect();