From 15ca3268adf5a9f897a2c87450e7445218efa03f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 16 Feb 2023 08:43:14 +0100 Subject: [PATCH 01/67] SquishTests: Provide Qt6.2 for testing Long overdue. Adapt Qt Quick related stuff as this nowadays is requiring Qt6.2 as a minimum. Change-Id: Id1e727813034044edb4584c6d5f73a56310293d2 Reviewed-by: Reviewed-by: David Schulz Reviewed-by: Christian Stenger --- tests/system/README | 13 ++++-- .../mac/QtProject/qtcreator/profiles.xml | 25 +++++++++++- .../mac/QtProject/qtcreator/qtversion.xml | 10 +++++ .../unix/QtProject/qtcreator/profiles.xml | 26 +++++++++++- .../unix/QtProject/qtcreator/qtversion.xml | 10 +++++ .../windows/QtProject/qtcreator/profiles.xml | 26 +++++++++++- .../windows/QtProject/qtcreator/qtversion.xml | 10 +++++ .../QtProject/qtcreator/toolchains.xml | 40 ++++++++++++++++++- tests/system/shared/classes.py | 8 ++-- tests/system/shared/project.py | 20 +++++----- tests/system/shared/qtcreator.py | 12 ++++++ .../tst_qtquick_creation/test.py | 2 +- .../tst_qtquick_creation3/test.py | 9 +++-- .../tst_qtquick_creation4/test.py | 6 +-- 14 files changed, 187 insertions(+), 30 deletions(-) diff --git a/tests/system/README b/tests/system/README index e7775af3a84..4edd21f0569 100644 --- a/tests/system/README +++ b/tests/system/README @@ -5,12 +5,14 @@ Squish tests inside this folder have several prerequisites to get them running. First - and most important - you have to own a valid Squish license. At least Squish 6.0 is required. Second - some of the test suites/test cases expect Qt versions to be installed in their default -locations. On Linux/macOS this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1. It's easiest to -use installations of the official opensource Qt packages. Just install the Qt version for the -respective toolchain with the components (if available): +locations. On Linux/macOS this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1 and for Qt6 using +an online installer located in SYSTEST_QTOI_BASEPATH which defaults to ~/Qt on UNIX and C:\Qt on +Windows - alternatively set it to the base path of the Qt installation used by the online installer. +It's easiest to use installations of the official opensource Qt packages. Just install the +Qt version for the respective toolchain with the components (if available): - (Desktop) , e.g. Desktop gcc 64-bit - Qt Quick Controls (if available) -- Qt Script +- Qt Script (Qt5 only) The exact versions and toolchains are: @@ -18,15 +20,18 @@ Linux: Qt 5.4.1 (gcc) Qt 5.10.1 (gcc) Qt 5.14.1 (gcc) +Qt 6.2.4 (gcc) macOS: Qt 5.10.1 (clang) Qt 5.14.1 (clang) +Qt 6.2.4 (clang) Windows: Qt 5.4.1 (gcc) Qt 5.10.1 (MSVC2015, 32 bit) Qt 5.14.1 (MSVC2017, 64 bit) +Qt 6.2.4 (MSVC2019, 64bit) Third - you'll have to provide some additional repositories. These additional repositories are located inside ~/squish-data or C:\Users\\squish-data (depending on the OS you're on). diff --git a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml index 51024f82880..bd515b01afc 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml @@ -56,9 +56,32 @@ + + Profile.2 + + false + + + {2f514661-b9f7-4f83-8822-a9a9d0699600} + Desktop Device + Desktop + + {f14e51fc-65f3-4da4-ab53-806eadf92515} + {a5562196-366f-434e-9b8b-8e4eff5a06db} + + 12 + + + {1c41964c-eaff-4330-bc07-e841accda65d} + + Desktop 6.2.4 + false + + + Profile.Count - 2 + 3 Profile.Default diff --git a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml index 340cbe918ea..22b7cb8930a 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml @@ -22,6 +22,16 @@ false + + QtVersion.2 + + 12 + Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER) + SQUISH_QTOI_BASEPATH/6.2.4/macos/bin/qmake + Qt4ProjectManager.QtVersion.Desktop + false + + Version 1 diff --git a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml index 54076fa5e1b..f696a5c0195 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml @@ -78,9 +78,33 @@ + + Profile.3 + + false + + + {70e26273-2c0b-4534-bbc0-eb6ca670821a} + Desktop Device + Desktop + + {7bfd4fd4-e64a-417f-b10f-20602e1719d1} + {c3f59b87-6997-4bd8-8067-ee04dc536371} + + 18 + + + + {4b0fab0c-ac58-4b02-93fb-47020d74dfdb} + + Desktop 6.2.4 + false + + + Profile.Count - 3 + 4 Profile.Default diff --git a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml index 829b5c07edb..2b20e63a7a7 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml @@ -32,6 +32,16 @@ false + + QtVersion.3 + + 18 + Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER) + SQUISH_QTOI_BASEPATH/6.2.4/SQUISH_DEFAULT_COMPILER/bin/qmake + Qt4ProjectManager.QtVersion.Desktop + false + + Version 1 diff --git a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml index 3bd4752b3dc..12a3998034c 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml @@ -86,8 +86,32 @@ + + Profile.3 + + false + + + {1b25f20a-d584-4fb7-85b3-74dd15b82f6f} + Desktop Device + Desktop + + {4580fc7c-8102-4144-a808-749b1a29f739} + {c6590889-1d34-4d12-af47-51ec76305e88} + + 27 + + + + {cec120c5-6455-497b-8059-8e079cbdd5fd} + + Desktop 6.2.4 + false + + + Profile.Count - 3 + 4 Profile.Default diff --git a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml index 499c44893f7..25822985c24 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml @@ -32,6 +32,16 @@ false + + QtVersion.3 + + 27 + Qt %{Qt:Version} (msvc2019_64) + SQUISH_QTOI_BASEPATH/6.2.4/msvc2019_64/bin/qmake.exe + Qt4ProjectManager.QtVersion.Desktop + false + + Version 1 diff --git a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml index a5d80d7dcbf..2b74b28f266 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml @@ -98,9 +98,47 @@ Cxx + + ToolChain.6 + + x86-windows-msvc2019-pe-64bit + C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat + amd64 + + + PATH + 0 + SQUISH_MSVC2019_PATH + + + MSVC2019 (amd64) + ProjectExplorer.ToolChain.Msvc:{4580fc7c-8102-4144-a808-749b1a29f739} + 1 + C + + + + ToolChain.7 + + x86-windows-msvc2019-pe-64bit + C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat + amd64 + + + PATH + 0 + SQUISH_MSVC2019_PATH + + + MSVC2019 (amd64) + ProjectExplorer.ToolChain.Msvc:{c6590889-1d34-4d12-af47-51ec76305e88} + 2 + Cxx + + ToolChain.Count - 6 + 8 Version diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index 3017bf44847..37a3b812fa1 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -8,16 +8,18 @@ except ImportError: # for easier re-usage (because Python hasn't an enum type) class Targets: - ALL_TARGETS = tuple(range(3)) + ALL_TARGETS = tuple(range(4)) (DESKTOP_5_4_1_GCC, DESKTOP_5_10_1_DEFAULT, - DESKTOP_5_14_1_DEFAULT) = ALL_TARGETS + DESKTOP_5_14_1_DEFAULT, + DESKTOP_6_2_4) = ALL_TARGETS __TARGET_NAME_DICT__ = dict(zip(ALL_TARGETS, ["Desktop 5.4.1 GCC", "Desktop 5.10.1 default", - "Desktop 5.14.1 default"])) + "Desktop 5.14.1 default", + "Desktop 6.2.4"])) @staticmethod def availableTargetClasses(ignoreValidity=False): diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index b0ee23450dc..2e12ac9c627 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -128,7 +128,7 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion): comboBox = waitForObject("{name='MinimumSupportedQtVersion' type='QComboBox' " "visible='1' window=':New_ProjectExplorer::JsonWizard'}") try: - selectFromCombo(comboBox, "Qt %s" % minimumQtVersion) + selectFromCombo(comboBox, minimumQtVersion) except: t,v = sys.exc_info()[:2] test.fatal("Exception while trying to select Qt version", "%s (%s)" % (str(t), str(v))) @@ -280,7 +280,6 @@ def createNewQtQuickApplication(workingDir, projectName=None, __handleBuildSystem__(buildSystem) requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion) __modifyAvailableTargets__(available, requiredQt) - __createProjectHandleTranslationSelection__() checkedTargets = __chooseTargets__(targets, available) snooze(1) if len(checkedTargets): @@ -292,13 +291,13 @@ def createNewQtQuickApplication(workingDir, projectName=None, return checkedTargets, projectName -def createNewQtQuickUI(workingDir, qtVersion = "5.12"): +def createNewQtQuickUI(workingDir, qtVersion = "6.2"): available = __createProjectOrFileSelectType__(" Other Project", 'Qt Quick UI Prototype') if workingDir == None: workingDir = tempDir() projectName = __createProjectSetNameAndPath__(workingDir) - requiredQt = __createProjectHandleQtQuickSelection__(qtVersion) - __modifyAvailableTargets__(available, requiredQt) + clickButton(waitForObject(":Next_QPushButton")) + __modifyAvailableTargets__(available, qtVersion) snooze(1) checkedTargets = __chooseTargets__(available, available) if len(checkedTargets): @@ -310,11 +309,12 @@ def createNewQtQuickUI(workingDir, qtVersion = "5.12"): return checkedTargets, projectName -def createNewQmlExtension(workingDir, targets=[Targets.DESKTOP_5_14_1_DEFAULT]): +def createNewQmlExtension(workingDir, targets=[Targets.DESKTOP_6_2_4]): available = __createProjectOrFileSelectType__(" Library", "Qt Quick 2 Extension Plugin") if workingDir == None: workingDir = tempDir() __createProjectSetNameAndPath__(workingDir) + __handleBuildSystem__("CMake") nameLineEd = waitForObject("{name='ObjectName' type='Utils::FancyLineEdit' visible='1'}") replaceEditorContent(nameLineEd, "TestItem") uriLineEd = waitForObject("{name='Uri' type='Utils::FancyLineEdit' visible='1'}") @@ -503,13 +503,15 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False, ignoreVali version = res.group("version") else: version = None - if templateName.startswith("Qt Quick Application - "): - result = set([Targets.DESKTOP_5_14_1_DEFAULT]) + if "Qt Quick" in templateName: + result = set([Targets.DESKTOP_6_2_4]) elif 'Supported Platforms' in text: supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split("\n") result = set() if 'Desktop' in supports: - result = result.union(set([Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT])) + result = result.union(set([Targets.DESKTOP_5_10_1_DEFAULT, + Targets.DESKTOP_5_14_1_DEFAULT, + Targets.DESKTOP_6_2_4])) if platform.system() != 'Darwin': result.add(Targets.DESKTOP_5_4_1_GCC) elif 'Platform independent' in text: diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 7721dbc5a16..27860e91d52 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -43,6 +43,7 @@ def __closeInfoBarEntry__(leftButtonText): "window=':Qt Creator_Core::Internal::MainWindow'") doNotShowAgain = toolButton % "Do Not Show Again" leftWidget = "leftWidget={%s}" % (toolButton % leftButtonText) + test.log("closing %s" % leftButtonText) clickButton(waitForObject("{%s %s}" % (doNotShowAgain, leftWidget))) # additionalParameters must be a list or tuple of strings or None @@ -184,6 +185,16 @@ def substituteTildeWithinQtVersion(settingsDir): test.log("Substituted all tildes with '%s' inside qtversion.xml..." % home) +def substituteOnlineInstallerPath(settingsDir): + qtversions = os.path.join(settingsDir, "QtProject", 'qtcreator', 'qtversion.xml') + dflt = "C:/Qt" if platform.system() in ('Microsoft', 'Windows') else os.path.expanduser("~/Qt") + replacement = str(os.getenv("SYSTEST_QTOI_BASEPATH", dflt)).replace('\\', '/') + while replacement.endswith('/'): + replacement = replacement[:-1] + __substitute__(qtversions, "SQUISH_QTOI_BASEPATH", replacement) + test.log("Substituted online installer base path (%s) inside qtversions.xml." % replacement) + + def substituteDefaultCompiler(settingsDir): compiler = None if platform.system() == 'Darwin': @@ -337,6 +348,7 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]): elif platform.system() in ('Windows', 'Microsoft'): substituteCdb(tmpSettingsDir) substituteMsvcPaths(tmpSettingsDir) + substituteOnlineInstallerPath(tmpSettingsDir) substituteUnchosenTargetABIs(tmpSettingsDir) SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir] diff --git a/tests/system/suite_qtquick/tst_qtquick_creation/test.py b/tests/system/suite_qtquick/tst_qtquick_creation/test.py index ca054ea0b4f..2ca7164c66e 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation/test.py @@ -8,7 +8,7 @@ def main(): if not startedWithoutPluginError(): return - available = [("5.14", "Qt Quick Application", Targets.DESKTOP_5_14_1_DEFAULT), + available = [("6.2", "Qt Quick Application", Targets.DESKTOP_6_2_4), ] for qtVersion, appTemplate, targ in available: diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index c4e629f448b..838cf6c4b53 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -14,7 +14,7 @@ def main(): startQC() if not startedWithoutPluginError(): return - available = ["5.14"] + available = ["6.2"] for qtVersion in available: # using a temporary directory won't mess up a potentially existing @@ -23,9 +23,10 @@ def main(): checkedKitNames = Targets.getTargetsAsStrings(checkedKits) test.verify(_exactlyOne_(map(lambda name: qtVersion in name, checkedKitNames)), "The requested kit should have been checked") - if qtVersion == "5.14": - test.verify(not any(map(lambda name: "5.10" in name, checkedKitNames)), - "The 5.10 kit should not have been checked when 5.14 is required") + if qtVersion == "6.2": + check = lambda name : ("5.10" in name or "5.14" in name) + test.verify(not any(map(check, checkedKitNames)), + "The 5.x kits should not have been checked when 6.2 is required") clickButton(waitForObject(":*Qt Creator.Run_Core::Internal::FancyToolButton")) if not waitForProcessRunning(): test.fatal("Couldn't start application - leaving test") diff --git a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py index cf63c3b83a3..68bbf1a9659 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py @@ -4,14 +4,10 @@ source("../../shared/qtcreator.py") def main(): - # FIXME - test.warning("Qt Quick 2 Extension Plugin needs Qt6.2+ nowadays.") - return - startQC() if not startedWithoutPluginError(): return - for target in [Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT]: + for target in [Targets.DESKTOP_6_2_4]: # using a temporary directory won't mess up a potentially existing createNewQmlExtension(tempDir(), [target]) # wait for parsing to complete From 7a26b76ce3e61a717b2f11f08c9d5ee0ba244c03 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 16 Feb 2023 11:12:26 +0100 Subject: [PATCH 02/67] SquishTests: Tweak preparation of toolchains Prepare toolchains for usage. Basically parameterize function to be used with more than one version and make use of it. Change-Id: I30ee198302de54d933fa7c436e701273d497cc07 Reviewed-by: David Schulz --- tests/system/shared/qtcreator.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 27860e91d52..9fd54aec0e5 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -237,20 +237,23 @@ def substituteCdb(settingsDir): test.log("Injected architecture '%s' and bitness '%s' in cdb path..." % (architecture, bitness)) -def substituteMsvcPaths(settingsDir): +def substituteMsvcPaths(settingsDir, version): + if not version in ['2017', '2019']: + test.fatal('Unexpected MSVC version - "%s" not implemented yet.' % version) + return + for msvcFlavor in ["Community", "BuildTools"]: try: - msvc2017Path = os.path.join("C:\\Program Files (x86)", "Microsoft Visual Studio", - "2017", msvcFlavor, "VC", "Tools", "MSVC") - msvc2017Path = os.path.join(msvc2017Path, os.listdir(msvc2017Path)[0], "bin", - "HostX64", "x64") + msvcPath = os.path.join("C:\\Program Files (x86)", "Microsoft Visual Studio", + version, msvcFlavor, "VC", "Tools", "MSVC") + msvcPath = os.path.join(msvcPath, os.listdir(msvcPath)[0], "bin", "HostX64", "x64") __substitute__(os.path.join(settingsDir, "QtProject", 'qtcreator', 'toolchains.xml'), - "SQUISH_MSVC2017_PATH", msvc2017Path) + "SQUISH_MSVC%s_PATH" % version, msvcPath) return except: continue - test.warning("PATH variable for MSVC2017 could not be set, some tests will fail.", - "Please make sure that MSVC2017 is installed correctly.") + test.warning("PATH variable for MSVC%s could not be set, some tests will fail." % version, + "Please make sure that MSVC%s is installed correctly." % version) def __guessABI__(supportedABIs, use64Bit): @@ -347,7 +350,8 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]): substituteDefaultCompiler(tmpSettingsDir) elif platform.system() in ('Windows', 'Microsoft'): substituteCdb(tmpSettingsDir) - substituteMsvcPaths(tmpSettingsDir) + substituteMsvcPaths(tmpSettingsDir, '2017') + substituteMsvcPaths(tmpSettingsDir, '2019') substituteOnlineInstallerPath(tmpSettingsDir) substituteUnchosenTargetABIs(tmpSettingsDir) SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir] From bc38ad8c594c4a2162fec3e1e9f64c01cf5995f1 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 16 Feb 2023 14:15:40 +0100 Subject: [PATCH 03/67] SquishTests: Adapt to changed project template Change-Id: I9aa98f194a7ab4fa1390b106e398b12546a7addd Reviewed-by: David Schulz --- tests/system/suite_QMLS/shared/qmls.py | 2 +- tests/system/suite_QMLS/tst_QMLS04/test.py | 2 +- tests/system/suite_debugger/tst_simple_debug/test.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/system/suite_QMLS/shared/qmls.py b/tests/system/suite_QMLS/shared/qmls.py index 1174b35532a..9466f603244 100644 --- a/tests/system/suite_QMLS/shared/qmls.py +++ b/tests/system/suite_QMLS/shared/qmls.py @@ -10,7 +10,7 @@ def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None): # create qt quick application createNewQtQuickApplication(projectDir, projectName) # open qml file - qmlFile = "%s.%s.qml\.qrc./.main\\.qml" % (projectName, projectName) + qmlFile = "%s.app%s.Main\\.qml" % (projectName, projectName) if not openDocument(qmlFile): test.fatal("Could not open %s" % qmlFile) invokeMenuItem("File", "Exit") diff --git a/tests/system/suite_QMLS/tst_QMLS04/test.py b/tests/system/suite_QMLS/tst_QMLS04/test.py index 6b6c2d0f754..2b64a54bf1e 100644 --- a/tests/system/suite_QMLS/tst_QMLS04/test.py +++ b/tests/system/suite_QMLS/tst_QMLS04/test.py @@ -37,7 +37,7 @@ def main(): test.passes("Refactoring was properly applied in source file") else: test.fail("Refactoring of Text to MyComponent failed in source file. Content of editor:\n%s" % codeText) - myCompTE = "SampleApp.SampleApp.qml\\.qrc./.MyComponent\\.qml" + myCompTE = "SampleApp.appSampleApp.MyComponent\\.qml" # there should be new QML file generated with name "MyComponent.qml" try: # openDocument() doesn't wait for expected elements, so it might be faster than the updates diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 66bf64e68ba..aa1bbf9a273 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -22,8 +22,8 @@ def main(): 'onTriggered: console.log("Break here")']) invokeMenuItem("File", "Save All") filesAndLines = [ - { "%s.%s.Source Files.main\\.cpp" % (projectName, projectName) : "QQmlApplicationEngine engine;" }, - { "%s.%s.qml\.qrc./.main\\.qml" % (projectName, projectName) : 'onTriggered.*' } + { "%s.app%s.Source Files.main\\.cpp" % (projectName, projectName) : "QQmlApplicationEngine engine;" }, + { "%s.app%s.Main\\.qml" % (projectName, projectName) : 'onTriggered.*' } ] test.log("Setting breakpoints") expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines) From 4b9054c4637a391fab2eb4225e911c514c310add Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 10 Feb 2023 16:26:52 +0100 Subject: [PATCH 04/67] Pdb: Fix debugger start for python debugging Do not stop at the first statement of the script when performing "normal" debug, stop at the first break point instead. Preserve the original behavior when debugging by triggering "Start and Break on Main". Task-number: QTCREATORBUG-28732 Change-Id: I3022071f28c086a2d0787ca5873e611f77e28369 Reviewed-by: hjk Reviewed-by: --- src/libs/utils/fancymainwindow.cpp | 2 +- src/plugins/debugger/pdb/pdbengine.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/fancymainwindow.cpp b/src/libs/utils/fancymainwindow.cpp index 1d7f3e03fa1..a19fc6c3c76 100644 --- a/src/libs/utils/fancymainwindow.cpp +++ b/src/libs/utils/fancymainwindow.cpp @@ -378,7 +378,7 @@ QDockWidget *FancyMainWindow::addDockForWidget(QWidget *widget, bool immutable) dockWidget->setProperty(dockWidgetActiveState, visible); }); - connect(dockWidget->toggleViewAction(), &QAction::triggered, this, [dockWidget] { + connect(dockWidget->toggleViewAction(), &QAction::triggered, dockWidget, [dockWidget] { if (dockWidget->isVisible()) dockWidget->raise(); }, Qt::QueuedConnection); diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 1a7487f444f..fd749a2d0ce 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -128,7 +128,10 @@ void PdbEngine::handlePdbStarted() showStatusMessage(Tr::tr("Running requested..."), 5000); BreakpointManager::claimBreakpointsForEngine(this); notifyEngineRunAndInferiorStopOk(); - updateAll(); + if (runParameters().breakOnMain) + updateAll(); + else + continueInferior(); } void PdbEngine::interruptInferior() From 5d19894f5be575d93a2271284dbe74a9dcbf4f41 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 9 Feb 2023 18:07:41 +0100 Subject: [PATCH 05/67] LocatorFilterEntry: Add linkForEditor Make it of std::optional type. Use it for: 1. Removing duplicates 2. Showing link inside editor Before, QVariant internalData was used in above cases. Rationale: 1. Removing duplicates between results from different ILocatorFilter makes only sense if accept() overload for these filter types are the same (i.e. the implementation is repeated). Otherwise, we are loosing some functionality when some result is removed. Taking into account that original intention was to eliminate duplicates for filters where we do BaseFileFilter::openEditorAt() inside accept(), we store linkForEditor in 3 cases (instead of storing internalData): - BaseFileFilter - FileSystemFilter (only existing file case) - OpenDocumentsFilter We don't save a linkForEditor where we stored QString inside internalData in the following cases: - JavaScriptFilter - FileSystemFilter (non existing file case) Before, in above cases, we could have filtered out some results unintentionally. This patch should fix it. Now, we remove duplicates only for enties that have value for linkForEditor. 2. Use directly linkForEditor, if exists, for opening editor. This patch aims to decrease the number of different responsibilities of internalData by 1. Make 3rd arg of LocatorFilterEntry c'tor default. Change-Id: I144c58661d7456bb5991f8077dc103272dfab194 Reviewed-by: Qt CI Bot Reviewed-by: David Schulz --- .../coreplugin/locator/basefilefilter.cpp | 27 ++++-------- .../coreplugin/locator/basefilefilter.h | 2 +- .../coreplugin/locator/executefilter.cpp | 4 +- .../coreplugin/locator/filesystemfilter.cpp | 21 ++++------ .../coreplugin/locator/ilocatorfilter.h | 6 ++- .../coreplugin/locator/javascriptfilter.cpp | 2 +- .../coreplugin/locator/locatorsearchutils.cpp | 41 +++++++++---------- .../coreplugin/locator/locatorsearchutils.h | 4 +- .../locator/opendocumentsfilter.cpp | 7 ++-- .../coreplugin/locator/urllocatorfilter.cpp | 2 +- src/plugins/help/helpindexfilter.cpp | 2 +- src/plugins/macros/macrolocatorfilter.cpp | 2 +- .../projectexplorer/projectexplorer.cpp | 6 +-- 13 files changed, 57 insertions(+), 69 deletions(-) diff --git a/src/plugins/coreplugin/locator/basefilefilter.cpp b/src/plugins/coreplugin/locator/basefilefilter.cpp index 260b31d2af2..9ce27cc0528 100644 --- a/src/plugins/coreplugin/locator/basefilefilter.cpp +++ b/src/plugins/coreplugin/locator/basefilefilter.cpp @@ -117,8 +117,7 @@ QList BaseFileFilter::matchesFor(QFutureInterface entries[int(MatchLevel::Count)]; // If search string contains spaces, treat them as wildcard '*' and search in full path const QString entry = QDir::fromNativeSeparators(origEntry).replace(' ', '*'); - QString postfix; - Link link = Link::fromString(entry, true, &postfix); + const Link link = Link::fromString(entry, true); const QRegularExpression regexp = createRegExp(link.targetFilePath.toString()); if (!regexp.isValid()) { @@ -156,10 +155,10 @@ QList BaseFileFilter::matchesFor(QFutureInterface BaseFileFilter::matchesFor(QFutureInterface()); @@ -205,21 +204,13 @@ void BaseFileFilter::accept(const LocatorFilterEntry &selection, openEditorAt(selection); } -void BaseFileFilter::openEditorAt(const LocatorFilterEntry& selection) +void BaseFileFilter::openEditorAt(const LocatorFilterEntry &entry) { - const FilePath locatorText = FilePath::fromVariant(selection.internalData); - const int postfixLength = locatorText.fileName().length() - selection.filePath.fileName().length(); - if (postfixLength > 0) { - const QString postfix = selection.internalData.toString().right(postfixLength); - int postfixPos = -1; - const LineColumn lineColumn = LineColumn::extractFromFileName(postfix, postfixPos); - if (postfixPos >= 0) { - const Link link(selection.filePath, lineColumn.line, lineColumn.column); - EditorManager::openEditorAt(link, {}, Core::EditorManager::AllowExternalEditor); - return; - } + if (entry.linkForEditor) { + EditorManager::openEditorAt(*entry.linkForEditor, {}, EditorManager::AllowExternalEditor); + return; } - EditorManager::openEditor(selection.filePath, {}, Core::EditorManager::AllowExternalEditor); + EditorManager::openEditor(entry.filePath, {}, EditorManager::AllowExternalEditor); } /*! diff --git a/src/plugins/coreplugin/locator/basefilefilter.h b/src/plugins/coreplugin/locator/basefilefilter.h index f1b97a60315..710cd21edf4 100644 --- a/src/plugins/coreplugin/locator/basefilefilter.h +++ b/src/plugins/coreplugin/locator/basefilefilter.h @@ -48,7 +48,7 @@ public: const QString &entry) override; void accept(const LocatorFilterEntry &selection, QString *newText, int *selectionStart, int *selectionLength) const override; - static void openEditorAt(const LocatorFilterEntry &selection); + static void openEditorAt(const LocatorFilterEntry &entry); protected: void setFileIterator(Iterator *iterator); diff --git a/src/plugins/coreplugin/locator/executefilter.cpp b/src/plugins/coreplugin/locator/executefilter.cpp index 2983b85d650..6be23fff3f5 100644 --- a/src/plugins/coreplugin/locator/executefilter.cpp +++ b/src/plugins/coreplugin/locator/executefilter.cpp @@ -44,7 +44,7 @@ QList ExecuteFilter::matchesFor(QFutureInterface value; if (!entry.isEmpty()) // avoid empty entry - value.append(LocatorFilterEntry(this, entry, QVariant())); + value.append(LocatorFilterEntry(this, entry)); QList others; const Qt::CaseSensitivity entryCaseSensitivity = caseSensitivity(entry); for (const QString &cmd : std::as_const(m_commandHistory)) { @@ -52,7 +52,7 @@ QList ExecuteFilter::matchesFor(QFutureInterface= 0) { filterEntry.highlightInfo = {index, int(entry.length())}; diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp index 9e085dec79c..17c54c748dc 100644 --- a/src/plugins/coreplugin/locator/filesystemfilter.cpp +++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp @@ -109,7 +109,7 @@ QList FileSystemFilter::matchesFor(QFutureInterface FileSystemFilter::matchesFor(QFutureInterface FileSystemFilter::matchesFor(QFutureInterface FileSystemFilter::matchesFor(QFutureInterface #include +#include #include #include @@ -67,7 +68,7 @@ struct LocatorFilterEntry LocatorFilterEntry(ILocatorFilter *fromFilter, const QString &name, - const QVariant &data, + const QVariant &data = {}, std::optional icon = std::nullopt) : filter(fromFilter) , displayName(name) @@ -93,7 +94,8 @@ struct LocatorFilterEntry Utils::FilePath filePath; /* highlighting support */ HighlightInfo highlightInfo; - + // Should be used only when accept() calls BaseFileFilter::openEditorAt() + std::optional linkForEditor; static bool compareLexigraphically(const Core::LocatorFilterEntry &lhs, const Core::LocatorFilterEntry &rhs) { diff --git a/src/plugins/coreplugin/locator/javascriptfilter.cpp b/src/plugins/coreplugin/locator/javascriptfilter.cpp index 175f0f44bc2..b97b054051f 100644 --- a/src/plugins/coreplugin/locator/javascriptfilter.cpp +++ b/src/plugins/coreplugin/locator/javascriptfilter.cpp @@ -60,7 +60,7 @@ QList JavaScriptFilter::matchesFor( entries.append({this, message, QVariant::fromValue(EngineAction::Abort)}); } else { const QString expression = entry + " = " + result; - entries.append({this, expression, QVariant()}); + entries.append({this, expression}); entries.append({this, Tr::tr("Copy to clipboard: %1").arg(result), result}); entries.append({this, Tr::tr("Copy to clipboard: %1").arg(expression), expression}); } diff --git a/src/plugins/coreplugin/locator/locatorsearchutils.cpp b/src/plugins/coreplugin/locator/locatorsearchutils.cpp index d508629aa4d..77e460ad4f3 100644 --- a/src/plugins/coreplugin/locator/locatorsearchutils.cpp +++ b/src/plugins/coreplugin/locator/locatorsearchutils.cpp @@ -3,34 +3,33 @@ #include "locatorsearchutils.h" -#include -#include -#include +#include + +#include void Core::Internal::runSearch(QFutureInterface &future, const QList &filters, const QString &searchText) { - QSet alreadyAdded; + std::unordered_set addedCache; const bool checkDuplicates = (filters.size() > 1); + const auto duplicatesRemoved = [&](const QList &entries) { + if (!checkDuplicates) + return entries; + QList results; + results.reserve(entries.size()); + for (const LocatorFilterEntry &entry : entries) { + const auto &link = entry.linkForEditor; + if (!link || addedCache.emplace(link->targetFilePath).second) + results.append(entry); + } + return results; + }; + for (ILocatorFilter *filter : filters) { if (future.isCanceled()) break; - - const QList filterResults = filter->matchesFor(future, searchText); - QVector uniqueFilterResults; - uniqueFilterResults.reserve(filterResults.size()); - for (const LocatorFilterEntry &entry : filterResults) { - if (checkDuplicates) { - const QString stringData = entry.internalData.toString(); - if (!stringData.isEmpty()) { - if (alreadyAdded.contains(stringData)) - continue; - alreadyAdded.insert(stringData); - } - } - uniqueFilterResults.append(entry); - } - if (!uniqueFilterResults.isEmpty()) - future.reportResults(uniqueFilterResults); + const auto results = duplicatesRemoved(filter->matchesFor(future, searchText)); + if (!results.isEmpty()) + future.reportResults(results); } } diff --git a/src/plugins/coreplugin/locator/locatorsearchutils.h b/src/plugins/coreplugin/locator/locatorsearchutils.h index f1551eb9f2f..d863b580a67 100644 --- a/src/plugins/coreplugin/locator/locatorsearchutils.h +++ b/src/plugins/coreplugin/locator/locatorsearchutils.h @@ -9,8 +9,8 @@ namespace Core { namespace Internal { void CORE_EXPORT runSearch(QFutureInterface &future, - const QList &filters, - const QString &searchText); + const QList &filters, + const QString &searchText); } // namespace Internal } // namespace Core diff --git a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp index 882f692329b..4037aad8e84 100644 --- a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp +++ b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp @@ -39,8 +39,7 @@ QList OpenDocumentsFilter::matchesFor(QFutureInterface goodEntries; QList betterEntries; - QString postfix; - Link link = Link::fromString(entry, true, &postfix); + const Link link = Link::fromString(entry, true); const QRegularExpression regexp = createRegExp(link.targetFilePath.toString()); if (!regexp.isValid()) @@ -56,10 +55,12 @@ QList OpenDocumentsFilter::matchesFor(QFutureInterface UrlLocatorFilter::matchesFor( if (future.isCanceled()) break; const QString name = url.arg(entry); - Core::LocatorFilterEntry filterEntry(this, name, QVariant()); + Core::LocatorFilterEntry filterEntry(this, name); filterEntry.highlightInfo = {int(name.lastIndexOf(entry)), int(entry.length())}; entries.append(filterEntry); } diff --git a/src/plugins/help/helpindexfilter.cpp b/src/plugins/help/helpindexfilter.cpp index d544fe32547..fe1c34a48e0 100644 --- a/src/plugins/help/helpindexfilter.cpp +++ b/src/plugins/help/helpindexfilter.cpp @@ -86,7 +86,7 @@ QList HelpIndexFilter::matchesFor(QFutureInterface entries; for (const QString &keyword : std::as_const(m_lastIndicesCache)) { const int index = keyword.indexOf(entry, 0, cs); - LocatorFilterEntry filterEntry(this, keyword, QVariant(), m_icon); + LocatorFilterEntry filterEntry(this, keyword, {}, m_icon); filterEntry.highlightInfo = {index, int(entry.length())}; entries.append(filterEntry); } diff --git a/src/plugins/macros/macrolocatorfilter.cpp b/src/plugins/macros/macrolocatorfilter.cpp index 43d5bb3cf9a..43a9a489459 100644 --- a/src/plugins/macros/macrolocatorfilter.cpp +++ b/src/plugins/macros/macrolocatorfilter.cpp @@ -50,7 +50,7 @@ QList MacroLocatorFilter::matchesFor(QFutureInterface< } if (index >= 0) { - Core::LocatorFilterEntry filterEntry(this, displayName, QVariant(), m_icon); + Core::LocatorFilterEntry filterEntry(this, displayName, {}, m_icon); filterEntry.extraInfo = description; filterEntry.highlightInfo = Core::LocatorFilterEntry::HighlightInfo(index, entry.length(), hDataType); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 622b18b31eb..91ca150008e 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -4362,10 +4362,8 @@ void RunConfigurationLocatorFilter::prepareSearch(const QString &entry) if (!target) return; for (auto rc : target->runConfigurations()) { - if (rc->displayName().contains(entry, Qt::CaseInsensitive)) { - Core::LocatorFilterEntry filterEntry(this, rc->displayName(), {}); - m_result.append(filterEntry); - } + if (rc->displayName().contains(entry, Qt::CaseInsensitive)) + m_result.append(LocatorFilterEntry(this, rc->displayName())); } } From 2d53e90a2bdb185bc9e8f6ab37c8c22af86fe971 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 9 Feb 2023 19:42:02 +0100 Subject: [PATCH 06/67] Utils::Link: Remove 3rd arg from fromString() Not used anymore. Change-Id: Iba758c0b5a6bb72c4b65511ab7e0e25e88cbf4f7 Reviewed-by: Reviewed-by: Eike Ziller Reviewed-by: Qt CI Bot --- src/libs/utils/link.cpp | 4 +- src/libs/utils/link.h | 4 +- tests/auto/utils/fileutils/tst_fileutils.cpp | 59 +++++++------------- 3 files changed, 21 insertions(+), 46 deletions(-) diff --git a/src/libs/utils/link.cpp b/src/libs/utils/link.cpp index 528295c19f4..e4c7032eeb7 100644 --- a/src/libs/utils/link.cpp +++ b/src/libs/utils/link.cpp @@ -17,7 +17,7 @@ namespace Utils { \c {filepath.txt+19+12}, and \c {filepath.txt(19)}. */ -Link Link::fromString(const QString &filePathWithNumbers, bool canContainLineNumber, QString *postfix) +Link Link::fromString(const QString &filePathWithNumbers, bool canContainLineNumber) { Link link; if (!canContainLineNumber) { @@ -25,8 +25,6 @@ Link Link::fromString(const QString &filePathWithNumbers, bool canContainLineNum } else { int postfixPos = -1; const LineColumn lineColumn = LineColumn::extractFromFileName(filePathWithNumbers, postfixPos); - if (postfix && postfixPos >= 0) - *postfix = filePathWithNumbers.mid(postfixPos); link.targetFilePath = FilePath::fromUserInput(filePathWithNumbers.left(postfixPos)); link.targetLine = lineColumn.line; link.targetColumn = lineColumn.column; diff --git a/src/libs/utils/link.h b/src/libs/utils/link.h index 500863f7ef4..6f01b484348 100644 --- a/src/libs/utils/link.h +++ b/src/libs/utils/link.h @@ -23,9 +23,7 @@ public: , targetColumn(column) {} - static Link fromString(const QString &filePathWithNumbers, - bool canContainLineNumber = false, - QString *postfix = nullptr); + static Link fromString(const QString &filePathWithNumbers, bool canContainLineNumber = false); bool hasValidTarget() const { return !targetFilePath.isEmpty(); } diff --git a/tests/auto/utils/fileutils/tst_fileutils.cpp b/tests/auto/utils/fileutils/tst_fileutils.cpp index 15604602776..033cf680bea 100644 --- a/tests/auto/utils/fileutils/tst_fileutils.cpp +++ b/tests/auto/utils/fileutils/tst_fileutils.cpp @@ -805,13 +805,10 @@ void tst_fileutils::linkFromString() { QFETCH(QString, testFile); QFETCH(Utils::FilePath, filePath); - QFETCH(QString, postfix); QFETCH(int, line); QFETCH(int, column); - QString extractedPostfix; - Link link = Link::fromString(testFile, true, &extractedPostfix); + const Link link = Link::fromString(testFile, true); QCOMPARE(link.targetFilePath, filePath); - QCOMPARE(extractedPostfix, postfix); QCOMPARE(link.targetLine, line); QCOMPARE(link.targetColumn, column); } @@ -820,58 +817,41 @@ void tst_fileutils::linkFromString_data() { QTest::addColumn("testFile"); QTest::addColumn("filePath"); - QTest::addColumn("postfix"); QTest::addColumn("line"); QTest::addColumn("column"); - QTest::newRow("no-line-no-column") - << QString("someFile.txt") << FilePath("someFile.txt") - << QString() << -1 << -1; + QTest::newRow("no-line-no-column") << QString("someFile.txt") + << FilePath("someFile.txt") << -1 << -1; QTest::newRow(": at end") << QString::fromLatin1("someFile.txt:") - << FilePath("someFile.txt") - << QString::fromLatin1(":") << 0 << -1; + << FilePath("someFile.txt") << 0 << -1; QTest::newRow("+ at end") << QString::fromLatin1("someFile.txt+") - << FilePath("someFile.txt") - << QString::fromLatin1("+") << 0 << -1; + << FilePath("someFile.txt") << 0 << -1; QTest::newRow(": for column") << QString::fromLatin1("someFile.txt:10:") - << FilePath("someFile.txt") - << QString::fromLatin1(":10:") << 10 << -1; + << FilePath("someFile.txt") << 10 << -1; QTest::newRow("+ for column") << QString::fromLatin1("someFile.txt:10+") - << FilePath("someFile.txt") - << QString::fromLatin1(":10+") << 10 << -1; - QTest::newRow(": and + at end") - << QString::fromLatin1("someFile.txt:+") << FilePath("someFile.txt") - << QString::fromLatin1(":+") << 0 << -1; + << FilePath("someFile.txt") << 10 << -1; + QTest::newRow(": and + at end") << QString::fromLatin1("someFile.txt:+") + << FilePath("someFile.txt") << 0 << -1; QTest::newRow("empty line") << QString::fromLatin1("someFile.txt:+10") - << FilePath("someFile.txt") - << QString::fromLatin1(":+10") << 0 << 9; + << FilePath("someFile.txt") << 0 << 9; QTest::newRow(":line-no-column") << QString::fromLatin1("/some/path/file.txt:42") - << FilePath("/some/path/file.txt") - << QString::fromLatin1(":42") << 42 << -1; + << FilePath("/some/path/file.txt") << 42 << -1; QTest::newRow("+line-no-column") << QString::fromLatin1("/some/path/file.txt+42") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("+42") << 42 << -1; + << FilePath("/some/path/file.txt") << 42 << -1; QTest::newRow(":line-:column") << QString::fromLatin1("/some/path/file.txt:42:3") - << FilePath("/some/path/file.txt") - << QString::fromLatin1(":42:3") << 42 << 2; + << FilePath("/some/path/file.txt") << 42 << 2; QTest::newRow(":line-+column") << QString::fromLatin1("/some/path/file.txt:42+33") - << FilePath("/some/path/file.txt") - << QString::fromLatin1(":42+33") << 42 << 32; + << FilePath("/some/path/file.txt") << 42 << 32; QTest::newRow("+line-:column") << QString::fromLatin1("/some/path/file.txt+142:30") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("+142:30") << 142 << 29; + << FilePath("/some/path/file.txt") << 142 << 29; QTest::newRow("+line-+column") << QString::fromLatin1("/some/path/file.txt+142+33") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("+142+33") << 142 << 32; + << FilePath("/some/path/file.txt") << 142 << 32; QTest::newRow("( at end") << QString::fromLatin1("/some/path/file.txt(") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("(") << -1 << -1; + << FilePath("/some/path/file.txt") << -1 << -1; QTest::newRow("(42 at end") << QString::fromLatin1("/some/path/file.txt(42") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("(42") << 42 << -1; + << FilePath("/some/path/file.txt") << 42 << -1; QTest::newRow("(42) at end") << QString::fromLatin1("/some/path/file.txt(42)") - << FilePath("/some/path/file.txt") - << QString::fromLatin1("(42)") << 42 << -1; + << FilePath("/some/path/file.txt") << 42 << -1; } void tst_fileutils::pathAppended() @@ -882,7 +862,6 @@ void tst_fileutils::pathAppended() const FilePath fleft = FilePath::fromString(left); const FilePath fexpected = FilePath::fromString(expected); - const FilePath result = fleft.pathAppended(right); QCOMPARE(result, fexpected); From 1e1cc8cd44ce7fa71deb3f5e5db3b7cf34dbed29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20Kr=C3=B8vel?= Date: Thu, 9 Feb 2023 15:29:57 +0100 Subject: [PATCH 07/67] McuSupport: Expand path macros when resetting paths Path macros were expanded when applying new paths in the McuSupport options widget, but not when pushing the reset button. This resulted in paths like {Env:PROGRAMFILES}/SEGGER/JLink, which are displayed as an error in the UI. The reset-button is now connected via a signal in McuPackage to the options widget, since the macro expander is not accessible to the package object directly. Task-number: QTCREATORBUG-28500 Change-Id: I962c6eb83142be87e02debbf34f0602683fe6966 Reviewed-by: Reviewed-by: Yasser Grimes Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcuabstractpackage.h | 1 + src/plugins/mcusupport/mcupackage.cpp | 4 +--- src/plugins/mcusupport/mcusupportoptionspage.cpp | 9 +++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plugins/mcusupport/mcuabstractpackage.h b/src/plugins/mcusupport/mcuabstractpackage.h index 33e9e62bd32..c319c32f03c 100644 --- a/src/plugins/mcusupport/mcuabstractpackage.h +++ b/src/plugins/mcusupport/mcuabstractpackage.h @@ -55,6 +55,7 @@ public: signals: void changed(); void statusChanged(); + void reset(); }; // class McuAbstractPackage } // namespace McuSupport::Internal diff --git a/src/plugins/mcusupport/mcupackage.cpp b/src/plugins/mcusupport/mcupackage.cpp index 6feaf728a62..ccf3a2d3acd 100644 --- a/src/plugins/mcusupport/mcupackage.cpp +++ b/src/plugins/mcusupport/mcupackage.cpp @@ -256,9 +256,7 @@ QWidget *McuPackage::widget() m_fileChooser->setExpectedKind(m_valueType); m_fileChooser->lineEdit()->setButtonIcon(FancyLineEdit::Right, Icons::RESET.icon()); m_fileChooser->lineEdit()->setButtonVisible(FancyLineEdit::Right, true); - connect(m_fileChooser->lineEdit(), &FancyLineEdit::rightButtonClicked, this, [&] { - m_fileChooser->setFilePath(m_defaultPath); - }); + connect(m_fileChooser->lineEdit(), &FancyLineEdit::rightButtonClicked, this, &McuPackage::reset); auto layout = new QGridLayout(widget); layout->setContentsMargins(0, 0, 0, 0); diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index c24785c0db8..d75568a8f66 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -277,6 +277,15 @@ void McuSupportOptionsWidget::showMcuTargetPackages() for (const auto &package : packages) { QWidget *packageWidget = package->widget(); + QWeakPointer packagePtr(package); + connect(package.get(), &McuPackage::reset, this, [this, packagePtr] (){ + McuPackagePtr package = packagePtr.lock(); + if (package) { + MacroExpanderPtr macroExpander + = m_options.sdkRepository.getMacroExpander(*currentMcuTarget()); + package->setPath(macroExpander->expand(package->defaultPath())); + } + }); m_packagesLayout->addRow(package->label(), packageWidget); packageWidget->show(); } From 6357f4d6b2dc39c378642f4c3eb4e323c5e44e80 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 16 Feb 2023 17:01:38 +0100 Subject: [PATCH 08/67] Translations: Add some missing context prefixes to qsTranslate calls Change-Id: I3358bc464d02e72fe56523262b8fce27480a31af Reviewed-by: hjk --- .../PerfProfilerFlameGraphView.qml | 24 +++++++++---------- .../qml/QmlProfilerFlameGraphView.qml | 18 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/plugins/perfprofiler/PerfProfilerFlameGraphView.qml b/src/plugins/perfprofiler/PerfProfilerFlameGraphView.qml index 3134f0dff8d..69ed7b54618 100644 --- a/src/plugins/perfprofiler/PerfProfilerFlameGraphView.qml +++ b/src/plugins/perfprofiler/PerfProfilerFlameGraphView.qml @@ -24,24 +24,24 @@ FlameGraphView { ] trRoleNames: [ - PerfProfilerFlameGraphModel.SamplesRole, qsTranslate("PerfProfiler", "Samples"), - PerfProfilerFlameGraphModel.FunctionRole, qsTranslate("PerfProfiler", "Function"), - PerfProfilerFlameGraphModel.SourceFileRole, qsTranslate("PerfProfiler", "Source"), - PerfProfilerFlameGraphModel.ElfFileRole, qsTranslate("PerfProfiler", "Binary"), - PerfProfilerFlameGraphModel.ResourceAllocationsRole, qsTranslate("PerfProfiler", "Allocations"), - PerfProfilerFlameGraphModel.ObservedResourceAllocationsRole, qsTranslate("PerfProfiler", " observed"), - PerfProfilerFlameGraphModel.LostResourceRequestsRole, qsTranslate("PerfProfiler", " guessed"), - PerfProfilerFlameGraphModel.ResourceReleasesRole, qsTranslate("PerfProfiler", "Releases"), - PerfProfilerFlameGraphModel.ObservedResourceReleasesRole, qsTranslate("PerfProfiler", " observed"), - PerfProfilerFlameGraphModel.GuessedResourceReleasesRole, qsTranslate("PerfProfiler", " guessed"), - PerfProfilerFlameGraphModel.ResourcePeakRole, qsTranslate("PerfProfiler", "Peak Usage") + PerfProfilerFlameGraphModel.SamplesRole, qsTranslate("QtC::PerfProfiler", "Samples"), + PerfProfilerFlameGraphModel.FunctionRole, qsTranslate("QtC::PerfProfiler", "Function"), + PerfProfilerFlameGraphModel.SourceFileRole, qsTranslate("QtC::PerfProfiler", "Source"), + PerfProfilerFlameGraphModel.ElfFileRole, qsTranslate("QtC::PerfProfiler", "Binary"), + PerfProfilerFlameGraphModel.ResourceAllocationsRole, qsTranslate("QtC::PerfProfiler", "Allocations"), + PerfProfilerFlameGraphModel.ObservedResourceAllocationsRole, qsTranslate("QtC::PerfProfiler", " observed"), + PerfProfilerFlameGraphModel.LostResourceRequestsRole, qsTranslate("QtC::PerfProfiler", " guessed"), + PerfProfilerFlameGraphModel.ResourceReleasesRole, qsTranslate("QtC::PerfProfiler", "Releases"), + PerfProfilerFlameGraphModel.ObservedResourceReleasesRole, qsTranslate("QtC::PerfProfiler", " observed"), + PerfProfilerFlameGraphModel.GuessedResourceReleasesRole, qsTranslate("QtC::PerfProfiler", " guessed"), + PerfProfilerFlameGraphModel.ResourcePeakRole, qsTranslate("QtC::PerfProfiler", "Peak Usage") ].reduce(toMap, {}) details: function(flameGraph) { var model = []; if (!flameGraph.dataValid) { model.push(trRoleNames[PerfProfilerFlameGraphModel.FunctionRole]); - model.push(qsTranslate("PerfProfiler", "Various")); + model.push(qsTranslate("QtC::PerfProfiler", "Various")); } else { function addDetail(role, format) { root.addDetail(role, format, model, flameGraph); } diff --git a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml index c5a92cf025a..5e8cfffbc2d 100644 --- a/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml +++ b/src/plugins/qmlprofiler/qml/QmlProfilerFlameGraphView.qml @@ -24,20 +24,20 @@ FlameGraphView { ] trRoleNames: [ - QmlProfilerFlameGraphModel.DurationRole, qsTranslate("QmlProfiler", "Total Time"), - QmlProfilerFlameGraphModel.CallCountRole, qsTranslate("QmlProfiler", "Calls"), - QmlProfilerFlameGraphModel.DetailsRole, qsTranslate("QmlProfiler", "Details"), - QmlProfilerFlameGraphModel.TimePerCallRole, qsTranslate("QmlProfiler", "Mean Time"), - QmlProfilerFlameGraphModel.LocationRole, qsTranslate("QmlProfiler", "Location"), - QmlProfilerFlameGraphModel.AllocationsRole, qsTranslate("QmlProfiler", "Allocations"), - QmlProfilerFlameGraphModel.MemoryRole, qsTranslate("QmlProfiler", "Memory") + QmlProfilerFlameGraphModel.DurationRole, qsTranslate("QtC::QmlProfiler", "Total Time"), + QmlProfilerFlameGraphModel.CallCountRole, qsTranslate("QtC::QmlProfiler", "Calls"), + QmlProfilerFlameGraphModel.DetailsRole, qsTranslate("QtC::QmlProfiler", "Details"), + QmlProfilerFlameGraphModel.TimePerCallRole, qsTranslate("QtC::QmlProfiler", "Mean Time"), + QmlProfilerFlameGraphModel.LocationRole, qsTranslate("QtC::QmlProfiler", "Location"), + QmlProfilerFlameGraphModel.AllocationsRole, qsTranslate("QtC::QmlProfiler", "Allocations"), + QmlProfilerFlameGraphModel.MemoryRole, qsTranslate("QtC::QmlProfiler", "Memory") ].reduce(toMap, {}) details: function(flameGraph) { var model = []; if (!flameGraph.dataValid) { model.push(trRoleNames[QmlProfilerFlameGraphModel.DetailsRole]); - model.push(qsTranslate("QmlProfiler", "Various Events")); + model.push(qsTranslate("QtC::QmlProfiler", "Various Events")); } else { function addDetail(role, format) { root.addDetail(role, format, model, flameGraph); } @@ -54,7 +54,7 @@ FlameGraphView { summary: function(attached) { if (!attached.dataValid) - return qsTranslate("QmlProfiler", "others"); + return qsTranslate("QtC::QmlProfiler", "others"); return attached.data(QmlProfilerFlameGraphModel.DetailsRole) + " (" + attached.data(QmlProfilerFlameGraphModel.TypeRole) + ", " From 30c768badb5337530c810113ab89cbb44edf714a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 17 Feb 2023 07:20:27 +0100 Subject: [PATCH 09/67] Editor: update ksyntaxhighlighting engine to v5.103.0 Task-number: QTCREATORBUG-22558 Change-Id: Ifbb0fe4b02c07d3d6afb35d84644fe8e3542e8d2 Reviewed-by: Eike Ziller Reviewed-by: Qt CI Bot --- .../syntax-highlighting/CMakeLists.txt | 2 +- .../ksyntaxhighlighting_version.h | 6 +- .../src/lib/ksyntaxhighlighting_export.h | 8 +- .../syntax-highlighting/data/CMakeLists.txt | 32 +- .../data/generators/cmake.xml.tpl | 99 +- .../data/generators/cmake.yaml | 222 +- .../data/generators/generate-cmake-syntax.py | 102 +- .../syntax-highlighting/data/syntax/alert.xml | 5 +- .../syntax-highlighting/data/syntax/bash.xml | 409 +- .../syntax-highlighting/data/syntax/cmake.xml | 4342 +++++++---------- .../syntax-highlighting/data/syntax/css.xml | 278 +- .../syntax-highlighting/data/syntax/html.xml | 2 +- .../syntax-highlighting/data/syntax/ini.xml | 18 +- .../syntax-highlighting/data/syntax/java.xml | 4 +- .../syntax-highlighting/data/syntax/json.xml | 28 +- .../data/syntax/markdown.xml | 47 +- .../syntax-highlighting/data/syntax/perl.xml | 28 +- .../data/syntax/powershell.xml | 42 +- .../data/syntax/python.xml | 37 +- .../syntax-highlighting/data/syntax/ruby.xml | 4 +- .../syntax-highlighting/data/syntax/xml.xml | 9 +- .../syntax-highlighting/data/syntax/yacc.xml | 10 +- .../data/themes/atom-one-dark.theme | 20 +- .../data/themes/atom-one-light.theme | 20 +- .../src/cli/kate-syntax-highlighter.cpp | 8 +- .../src/indexer/CMakeLists.txt | 2 +- .../src/indexer/katehighlightingindexer.cpp | 136 +- .../src/lib/CMakeLists.txt | 15 +- .../src/lib/abstracthighlighter.cpp | 32 +- .../src/lib/ansihighlighter.cpp | 727 +-- .../src/lib/ansihighlighter.h | 1 + .../syntax-highlighting/src/lib/context.cpp | 2 +- .../src/lib/contextswitch.cpp | 4 +- .../src/lib/definition.cpp | 43 +- .../src/lib/definition_p.h | 3 +- .../src/lib/definitiondownloader.cpp | 4 +- .../src/lib/definitionref_p.h | 13 + .../syntax-highlighting/src/lib/format.cpp | 68 +- .../syntax-highlighting/src/lib/format_p.h | 8 +- .../src/lib/highlightingdata.cpp | 5 +- .../src/lib/htmlhighlighter.cpp | 3 +- .../src/lib/keywordlist.cpp | 2 +- .../src/lib/repository.cpp | 67 +- .../syntax-highlighting/src/lib/repository.h | 3 +- .../src/lib/repository_p.h | 2 +- .../syntax-highlighting/src/lib/rule.cpp | 128 +- .../syntax-highlighting/src/lib/rule_p.h | 21 +- .../syntax-highlighting/src/lib/state.cpp | 2 +- .../syntax-highlighting/src/lib/state_p.h | 4 +- .../src/lib/textstyledata_p.h | 2 +- .../syntax-highlighting/src/lib/theme.cpp | 51 +- .../syntax-highlighting/src/lib/themedata.cpp | 44 +- .../syntax-highlighting/src/lib/themedata_p.h | 9 +- .../src/lib/wildcardmatcher_p.h | 34 - .../src/quick/CMakeLists.txt | 6 +- .../src/quick/kquicksyntaxhighlighter.cpp | 4 +- .../src/quick/kquicksyntaxhighlighter.h | 4 +- .../quick/kquicksyntaxhighlightingplugin.cpp | 7 +- .../syntax-highlighting/src/quick/qmldir | 2 - .../src/quick/qmldir.license | 2 - .../src/quick/repositorywrapper.cpp | 6 +- 61 files changed, 3585 insertions(+), 3663 deletions(-) delete mode 100644 src/libs/3rdparty/syntax-highlighting/src/lib/wildcardmatcher_p.h delete mode 100644 src/libs/3rdparty/syntax-highlighting/src/quick/qmldir delete mode 100644 src/libs/3rdparty/syntax-highlighting/src/quick/qmldir.license diff --git a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt index 8130a0eb7c4..66c1d919512 100644 --- a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt +++ b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt @@ -39,7 +39,7 @@ add_qtc_library(KSyntaxHighlighting src/lib/textstyledata_p.h src/lib/theme.cpp src/lib/theme.h src/lib/themedata.cpp src/lib/themedata_p.h - src/lib/wildcardmatcher.cpp src/lib/wildcardmatcher_p.h + src/lib/wildcardmatcher.cpp src/lib/worddelimiters.cpp src/lib/worddelimiters_p.h src/lib/xml_p.h ) diff --git a/src/libs/3rdparty/syntax-highlighting/autogenerated/ksyntaxhighlighting_version.h b/src/libs/3rdparty/syntax-highlighting/autogenerated/ksyntaxhighlighting_version.h index 9d25202a4bb..007fe4acae3 100644 --- a/src/libs/3rdparty/syntax-highlighting/autogenerated/ksyntaxhighlighting_version.h +++ b/src/libs/3rdparty/syntax-highlighting/autogenerated/ksyntaxhighlighting_version.h @@ -3,10 +3,10 @@ #ifndef SyntaxHighlighting_VERSION_H #define SyntaxHighlighting_VERSION_H -#define SyntaxHighlighting_VERSION_STRING "5.95.0" +#define SyntaxHighlighting_VERSION_STRING "5.103.0" #define SyntaxHighlighting_VERSION_MAJOR 5 -#define SyntaxHighlighting_VERSION_MINOR 95 +#define SyntaxHighlighting_VERSION_MINOR 103 #define SyntaxHighlighting_VERSION_PATCH 0 -#define SyntaxHighlighting_VERSION ((5<<16)|(95<<8)|(0)) +#define SyntaxHighlighting_VERSION ((5<<16)|(103<<8)|(0)) #endif diff --git a/src/libs/3rdparty/syntax-highlighting/autogenerated/src/lib/ksyntaxhighlighting_export.h b/src/libs/3rdparty/syntax-highlighting/autogenerated/src/lib/ksyntaxhighlighting_export.h index 6591b59e810..e376e94505e 100644 --- a/src/libs/3rdparty/syntax-highlighting/autogenerated/src/lib/ksyntaxhighlighting_export.h +++ b/src/libs/3rdparty/syntax-highlighting/autogenerated/src/lib/ksyntaxhighlighting_export.h @@ -88,7 +88,7 @@ #define KSYNTAXHIGHLIGHTING_BUILD_DEPRECATED_SINCE(major, minor) 1 #ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED -# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55f00 +# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x56700 #endif #ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED_WARNINGS # define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0 @@ -98,7 +98,7 @@ # ifdef KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT # define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT # else -# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55f00 +# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x56700 # endif #endif @@ -178,7 +178,7 @@ #define KSYNTAXHIGHLIGHTING_BUILD_DEPRECATED_SINCE(major, minor) 1 #ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED -# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x55f00 +# define KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT 0x56700 #endif #ifdef KSYNTAXHIGHLIGHTING_NO_DEPRECATED_WARNINGS # define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0 @@ -188,7 +188,7 @@ # ifdef KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT # define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE KSYNTAXHIGHLIGHTING_DISABLE_DEPRECATED_BEFORE_AND_AT # else -# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x55f00 +# define KSYNTAXHIGHLIGHTING_DEPRECATED_WARNINGS_SINCE 0x56700 # endif #endif diff --git a/src/libs/3rdparty/syntax-highlighting/data/CMakeLists.txt b/src/libs/3rdparty/syntax-highlighting/data/CMakeLists.txt index 6e86a05e9e3..26a110d31b1 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/CMakeLists.txt +++ b/src/libs/3rdparty/syntax-highlighting/data/CMakeLists.txt @@ -44,24 +44,25 @@ add_library(SyntaxHighlightingData OBJECT) # theme data resource target_sources(SyntaxHighlightingData PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/themes/theme-data.qrc) -# do we want syntax files bundled in the library? -if (QRC_SYNTAX) - # generate the resource file - set(qrc_file ${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc) - set(qrc_body "") - foreach(def ${defs}) - get_filename_component(def_name ${def} NAME) - string(APPEND qrc_body "${def}\n") - endforeach() - set(SYNTAX_DATA_QRC_FILES_STRING ${qrc_body}) - configure_file(syntax-data.qrc.in ${qrc_file} @ONLY) +# generate the resource file +set(qrc_file ${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc) +set(qrc_body "") +foreach(def ${defs}) + get_filename_component(def_name ${def} NAME) + string(APPEND qrc_body "${def}\n") +endforeach() +set(SYNTAX_DATA_QRC_FILES_STRING ${qrc_body}) +configure_file(syntax-data.qrc.in ${qrc_file} @ONLY) - # generate the index file - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" +# generate the index file +add_custom_target(katesyntax DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax") +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" COMMAND katehighlightingindexer "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" "${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd" "${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc" DEPENDS katehighlightingindexer ${defs} ${CMAKE_CURRENT_SOURCE_DIR}/schema/language.xsd ${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc - ) +) +# do we want syntax files bundled in the library? +if (QRC_SYNTAX) # generate the qrc file manually, to make dependencies on generated files work... add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/qrc_syntax-data.cpp" COMMAND Qt${QT_MAJOR_VERSION}::rcc --name syntax_data -o "${CMAKE_CURRENT_BINARY_DIR}/qrc_syntax-data.cpp" "${CMAKE_CURRENT_BINARY_DIR}/syntax-data.qrc" @@ -71,8 +72,9 @@ if (QRC_SYNTAX) target_sources(SyntaxHighlightingData PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/qrc_syntax-data.cpp) else() + add_dependencies(SyntaxHighlightingData katesyntax) # install the syntax files as normal files into the prefix - install (FILES ${defs} DESTINATION ${KDE_INSTALL_DATADIR}/org.kde.syntax-highlighting/syntax) + install (FILES "${CMAKE_CURRENT_BINARY_DIR}/index.katesyntax" ${defs} DESTINATION ${KDE_INSTALL_DATADIR}/org.kde.syntax-highlighting/syntax-bundled) endif() # set PIC to allow use in static and shared libs diff --git a/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.xml.tpl b/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.xml.tpl index 45057a8a054..5f57c8eeacc 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.xml.tpl +++ b/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.xml.tpl @@ -113,12 +113,31 @@ + + + TRUE + ON + YES + Y + 0 + + + + + FALSE + OFF + NO + IGNORE + N + 0 + + - beginRegion="" endRegion="" /> + beginRegion="" endRegion="" /> @@ -126,7 +145,7 @@ - + @@ -136,16 +155,16 @@ + - - - - + + + _ctx_op" String="_nargs" lookAhead="true" /> - - - - - + + + + @@ -204,18 +222,20 @@ + - - + + - - + + + @@ -277,39 +297,45 @@ + - + - - + - - - - - + + + + + + + + + + + @@ -328,23 +354,13 @@ + - - - - - - - - - - - - - - + + + @@ -354,8 +370,10 @@ + + @@ -364,9 +382,10 @@ - + + @@ -382,6 +401,8 @@ + + @@ -408,6 +429,7 @@ + @@ -416,6 +438,7 @@ + diff --git a/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.yaml b/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.yaml index e02b950765b..624299346f9 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.yaml +++ b/src/libs/3rdparty/syntax-highlighting/data/generators/cmake.yaml @@ -1,4 +1,4 @@ -version: 38 +version: 44 global-properties: - ALLOW_DUPLICATE_CUSTOM_TARGETS @@ -74,6 +74,7 @@ directory-properties: - RULE_LAUNCH_LINK - SOURCE_DIR - SUBDIRECTORIES + - SYSTEM # Since 3.25 - TESTS # Since 3.12 - TEST_INCLUDE_FILE - TEST_INCLUDE_FILES # Since 3.10 @@ -135,7 +136,7 @@ target-properties: - C_EXTENSIONS - C_STANDARD - C_STANDARD_REQUIRED - - COMMON_LANGUAGE_RUNTIME # Sine 3.12 + - COMMON_LANGUAGE_RUNTIME # Since 3.12 - COMPATIBLE_INTERFACE_BOOL - COMPATIBLE_INTERFACE_NUMBER_MAX - COMPATIBLE_INTERFACE_NUMBER_MIN @@ -148,6 +149,7 @@ target-properties: - COMPILE_PDB_NAME_ - COMPILE_PDB_OUTPUT_DIRECTORY - COMPILE_PDB_OUTPUT_DIRECTORY_ + - COMPILE_WARNING_AS_ERROR # Since 3.24 - _OUTPUT_NAME - _POSTFIX - CROSSCOMPILING_EMULATOR @@ -178,6 +180,7 @@ target-properties: - EXCLUDE_FROM_DEFAULT_BUILD - EXPORT_COMPILE_COMMANDS # Since 3.20 - EXPORT_NAME + - EXPORT_NO_SYSTEM # Since 3.25 - EXPORT_PROPERTIES # Since 3.12 - FOLDER - Fortran_FORMAT @@ -236,10 +239,13 @@ target-properties: - INTERFACE_COMPILE_FEATURES - INTERFACE_COMPILE_OPTIONS - INTERFACE_HEADER_SETS # Since 3.23 + - INTERFACE_HEADER_SETS_TO_VERIFY # Since 3.24 - INTERFACE_INCLUDE_DIRECTORIES - INTERFACE_LINK_DEPENDS # Since 3.13 - INTERFACE_LINK_DIRECTORIES # Since 3.13 - INTERFACE_LINK_LIBRARIES + - INTERFACE_LINK_LIBRARIES_DIRECT # Since 3.24 + - INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE # Since 3.24 - INTERFACE_LINK_OPTIONS # Since 3.13 - INTERFACE_PRECOMPILE_HEADERS # Since 3.16 - INTERFACE_POSITION_INDEPENDENT_CODE @@ -259,7 +265,7 @@ target-properties: - _CPPCHECK # Since 3.10 - _CPPLINT - _INCLUDE_WHAT_YOU_USE - - _LINKER_LAUNCHER # Sine 3.21 + - _LINKER_LAUNCHER # Since 3.21 - _VISIBILITY_PRESET - LIBRARY_OUTPUT_DIRECTORY_ - LIBRARY_OUTPUT_DIRECTORY @@ -291,6 +297,7 @@ target-properties: - MACOSX_RPATH - MANUALLY_ADDED_DEPENDENCIES - MAP_IMPORTED_CONFIG_ + - MSVC_DEBUG_INFORMATION_FORMAT # Since 3.25 - MSVC_RUNTIME_LIBRARY # Since 3.15 - NAME - NO_SONAME @@ -340,6 +347,7 @@ target-properties: - Swift_DEPENDENCIES_FILE # Since 3.15 - Swift_MODULE_DIRECTORY # Since 3.15 - Swift_MODULE_NAME # Since 3.15 + - SYSTEM # Since 3.25 - TYPE - UNITY_BUILD # Since 3.16 - UNITY_BUILD_BATCH_SIZE # Since 3.16 @@ -347,6 +355,7 @@ target-properties: - UNITY_BUILD_CODE_BEFORE_INCLUDE # Since 3.16 - UNITY_BUILD_MODE # Since 3.18 - UNITY_BUILD_UNIQUE_ID # Since 3.20 + - VERIFY_INTERFACE_HEADER_SETS # Since 3.24 - VERSION - VISIBILITY_INLINES_HIDDEN - VS_CONFIGURATION_TYPE @@ -359,6 +368,7 @@ target-properties: - VS_DOTNET_REFERENCEPROP__TAG_ # Since 3.10 - VS_DOTNET_REFERENCES - VS_DOTNET_REFERENCES_COPY_LOCAL + - VS_DOTNET_STARTUP_OBJECT # Since 3.24 - VS_DOTNET_TARGET_FRAMEWORK_VERSION - VS_DOTNET_DOCUMENTATION_FILE # Since 3.17 - VS_DPI_AWARE # Since 3.16 @@ -371,6 +381,7 @@ target-properties: - VS_JUST_MY_CODE_DEBUGGING # Since 3.15 - VS_KEYWORD - VS_MOBILE_EXTENSIONS_VERSION + - VS_NO_COMPILE_BATCHING - VS_NO_SOLUTION_DEPLOY # Since 3.15 - VS_PACKAGE_REFERENCES # Since 3.15 - VS_PLATFORM_TOOLSET # Since 3.18 @@ -387,6 +398,7 @@ target-properties: - VS_WINRT_COMPONENT - VS_WINRT_EXTENSIONS - VS_WINRT_REFERENCES + - WATCOM_RUNTIME_LIBRARY # Since 3.24 - WIN32_EXECUTABLE - WINDOWS_EXPORT_ALL_SYMBOLS - XCODE_ATTRIBUTE_ @@ -403,13 +415,17 @@ target-properties: - XCODE_SCHEME_ARGUMENTS # Since 3.13 - XCODE_SCHEME_DEBUG_AS_ROOT # Since 3.15 - XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING # Since 3.16 - - XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23 - XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER # Since 3.13 - - XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE # Since 3.13 - XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS # Since 3.13 + - XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE # Since 3.13 + - XCODE_SCHEME_ENABLE_GPU_API_VALIDATION # Since 3.25 + - XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23 + - XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION # Since 3.25 - XCODE_SCHEME_EXECUTABLE # Since 3.13 - XCODE_SCHEME_ENVIRONMENT # Since 3.13 - XCODE_SCHEME_GUARD_MALLOC # Since 3.13 + - XCODE_SCHEME_LAUNCH_CONFIGURATION # Since 3.25 + - XCODE_SCHEME_LAUNCH_MODE # Since 3.25 - XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP # Since 3.13 - XCODE_SCHEME_MALLOC_GUARD_EDGES # Since 3.13 - XCODE_SCHEME_MALLOC_SCRIBBLE # Since 3.13 @@ -420,6 +436,7 @@ target-properties: - XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP # Since 3.13 - XCODE_SCHEME_WORKING_DIRECTORY # Since 3.1? - XCODE_SCHEME_ZOMBIE_OBJECTS # Since 3.13 + - XCODE_XCCONFIG # Since 3.24 - XCTEST test-properties: @@ -535,6 +552,13 @@ generator-expressions: - VERSION_EQUAL - VERSION_LESS_EQUAL - VERSION_GREATER_EQUAL + # * Path Comparisons + - PATH_EQUAL # Since 3.24 + # * Path Queries + # * Path Decomposition + # * Path Transformations + # TODO Need a bit deeper genex parsing to get sub-commands of `PATH` + - PATH # Since 3.24 # * Variable Queries - TARGET_EXISTS # Since 3.12 - CONFIG @@ -555,6 +579,8 @@ generator-expressions: - LINK_LANGUAGE # Since 3.18 - DEVICE_LINK # Since 3.18 - HOST_LINK # Since 3.18 + - LINK_LIBRARY # Since 3.24 + - LINK_GROUP # Since 3.24 # String-Valued Generator Expressions # * Escaped Characters - ANGLE-R @@ -593,6 +619,7 @@ generator-expressions: - TARGET_PDB_FILE_BASE_NAME # Since 3.15 - TARGET_PDB_FILE_NAME - TARGET_PDB_FILE_DIR + - TARGET_BUNDLE_DIR_NAME # Since 3.24 - TARGET_BUNDLE_DIR - TARGET_BUNDLE_CONTENT_DIR - TARGET_PROPERTY @@ -645,6 +672,7 @@ variables: - CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES - CMAKE_FIND_DEBUG_MODE # Since 3.17 - CMAKE_FIND_PACKAGE_NAME + - CMAKE_FIND_PACKAGE_REDIRECTS_DIR # Since 3.24 - CMAKE_FIND_PACKAGE_SORT_DIRECTION - CMAKE_FIND_PACKAGE_SORT_ORDER - CMAKE_GENERATOR @@ -746,6 +774,7 @@ variables: - CMAKE_CODEBLOCKS_COMPILER_ID # Since 3.11 - CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES # Since 3.10 - CMAKE_CODELITE_USE_TARGETS + - CMAKE_COLOR_DIAGNOSTICS # Since 3.24 - CMAKE_COLOR_MAKEFILE - CMAKE_CONFIGURATION_TYPES - CMAKE_DEBUG_TARGET_PROPERTIES @@ -772,6 +801,7 @@ variables: - CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY - CMAKE_FIND_PACKAGE_PREFER_CONFIG # Since 3.15 - CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS # Since 3.14 + - CMAKE_FIND_PACKAGE_TARGETS_GLOBAL # Since 3.24 - CMAKE_FIND_PACKAGE_WARN_NO_MODULE - CMAKE_FIND_ROOT_PATH - CMAKE_FIND_ROOT_PATH_MODE_INCLUDE @@ -781,6 +811,7 @@ variables: - CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH # Since 3.16 - CMAKE_FIND_USE_CMAKE_PATH # Since 3.16 - CMAKE_FIND_USE_CMAKE_SYSTEM_PATH # Since 3.16 + - CMAKE_FIND_USE_INSTALL_PREFIX # Since 3.24 - CMAKE_FIND_USE_PACKAGE_ROOT_PATH # Since 3.16 - CMAKE_FIND_USE_PACKAGE_REGISTRY # Since 3.16 - CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH # Since 3.16 @@ -809,6 +840,8 @@ variables: - CMAKE_PROJECT_INCLUDE # Since 3.15 - CMAKE_PROJECT_INCLUDE_BEFORE # Since 3.15 - CMAKE_PROJECT__INCLUDE + - CMAKE_PROJECT__INCLUDE_BEFORE # Since 3.17 + - CMAKE_PROJECT_TOP_LEVEL_INCLUDES # Since 3.24 - CMAKE_REQUIRE_FIND_PACKAGE_ # Since 3.22 - CMAKE_SKIP_INSTALL_ALL_DEPENDENCY - CMAKE_STAGING_PREFIX @@ -836,12 +869,16 @@ variables: - CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN # Since 3.13 - CMAKE_XCODE_SCHEME_WORKING_DIRECTORY # Since 3.17 - CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING # Since 3.16 - - CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23 - CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER # Since 3.13 - CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE # Since 3.13 - CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS # Since 3.13 + - CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION # Since 3.25 + - CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE # Since 3.23 + - CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION # Since 3.25 - CMAKE_XCODE_SCHEME_ENVIRONMENT # Since 3.17 - CMAKE_XCODE_SCHEME_GUARD_MALLOC # Since 3.13 + - CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION # Since 3.25 + - CMAKE_XCODE_SCHEME_LAUNCH_MODE # Since 3.25 - CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP # Since 3.13 - CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES # Since 3.13 - CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE # Since 3.13 @@ -851,14 +888,18 @@ variables: - CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER # Since 3.13 - CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP # Since 3.13 - CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS # Since 3.13 + - CMAKE_XCODE_XCCONFIG # Since 3.24 # Variables that Describe the System - ANDROID - APPLE - BORLAND + - BSD # Since 3.25 - CMAKE_ANDROID_NDK_VERSION # Since 3.20 - CMAKE_CL_64 - CMAKE_COMPILER_2005 - CMAKE_HOST_APPLE + - CMAKE_HOST_BSD # Since 3.25 + - CMAKE_HOST_LINUX # Since 3.25 - CMAKE_HOST_SOLARIS - CMAKE_HOST_SYSTEM - CMAKE_HOST_SYSTEM_NAME @@ -876,7 +917,9 @@ variables: - CYGWIN # NOTE `ENV` not a variable in fact! # - ENV - - GHS-MULTI + - GHSMULTI + - IOS # Since 3.14 + - LINUX # Since 3.25 - MINGW - MSVC - MSVC10 @@ -946,6 +989,7 @@ variables: - CMAKE_BUILD_WITH_INSTALL_RPATH - CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY - CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_ + - CMAKE_COMPILE_WARNING_AS_ERROR # Since 3.24 - CMAKE__POSTFIX - CMAKE_CROSS_CONFIGS # Since 3.17 - CMAKE_CTEST_ARGUMENTS # Since 3.17 @@ -986,9 +1030,13 @@ variables: - CMAKE__CPPCHECK # Since 3.10 - CMAKE__CPPLINT - CMAKE__INCLUDE_WHAT_YOU_USE - - CMAKE__LINKER_LAUNCHER # Sine 3.21 - - CMAKE__LINK_LIBRARY_FILE_FLAG # Sine 3.16 - - CMAKE__LINK_LIBRARY_FLAG # Sine 3.16 + - CMAKE__LINK_LIBRARY_USING_ # Since 3.24 + - CMAKE__LINK_LIBRARY_USING__SUPPORTED # Since 3.24 + - CMAKE__LINKER_LAUNCHER # Since 3.21 + - CMAKE__LINK_GROUP_USING_ # Since 3.24 + - CMAKE__LINK_GROUP_USING__SUPPORTED # Since 3.24 + - CMAKE__LINK_LIBRARY_FILE_FLAG # Since 3.16 + - CMAKE__LINK_LIBRARY_FLAG # Since 3.16 - CMAKE__LINK_WHAT_YOU_USE_FLAG # Since 3.22 - CMAKE__VISIBILITY_PRESET - CMAKE_LIBRARY_OUTPUT_DIRECTORY @@ -999,6 +1047,8 @@ variables: - CMAKE_LINK_INTERFACE_LIBRARIES - CMAKE_LINK_LIBRARY_FILE_FLAG - CMAKE_LINK_LIBRARY_FLAG + - CMAKE_LINK_LIBRARY_USING_ # Since 3.24 + - CMAKE_LINK_LIBRARY_USING__SUPPORTED # Since 3.24 - CMAKE_LINK_WHAT_YOU_USE - CMAKE_LINK_WHAT_YOU_USE_CHECK # Since 3.22 - CMAKE_MACOSX_BUNDLE @@ -1008,8 +1058,9 @@ variables: - CMAKE_MODULE_LINKER_FLAGS_ - CMAKE_MODULE_LINKER_FLAGS__INIT - CMAKE_MODULE_LINKER_FLAGS_INIT - - CMAKE_MSVCIDE_RUN_PATH # Since 3.15 + - CMAKE_MSVC_DEBUG_INFORMATION_FORMAT # Since 3.25 - CMAKE_MSVC_RUNTIME_LIBRARY # Since 3.15 + - CMAKE_MSVCIDE_RUN_PATH # Since 3.15 - CMAKE_NINJA_OUTPUT_PATH_PREFIX - CMAKE_NO_BUILTIN_CHRPATH - CMAKE_NO_SYSTEM_FROM_IMPORTED @@ -1034,12 +1085,15 @@ variables: - CMAKE_STATIC_LINKER_FLAGS_ - CMAKE_STATIC_LINKER_FLAGS__INIT - CMAKE_STATIC_LINKER_FLAGS_INIT + - CMAKE_TASKING_TOOLSET # Since 3.25 - CMAKE_TRY_COMPILE_CONFIGURATION + - CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES # Since 3.24 - CMAKE_TRY_COMPILE_PLATFORM_VARIABLES - CMAKE_TRY_COMPILE_TARGET_TYPE - CMAKE_UNITY_BUILD # Since 3.16 - CMAKE_UNITY_BUILD_BATCH_SIZE # Since 3.16 - CMAKE_USE_RELATIVE_PATHS + - CMAKE_VERIFY_INTERFACE_HEADER_SETS # Since 3.24 - CMAKE_VISIBILITY_INLINES_HIDDEN - CMAKE_VS_GLOBALS # Since 3.13 - CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD @@ -1052,6 +1106,8 @@ variables: - CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES # Since 3.12 - CMAKE_VS_SDK_REFERENCE_DIRECTORIES # Since 3.12 - CMAKE_VS_SDK_SOURCE_DIRECTORIES # Since 3.12 + - CMAKE_VS_WINRT_BY_DEFAULT # Since 3.13 + - CMAKE_WATCOM_RUNTIME_LIBRARY # Since 3.24 - CMAKE_WIN32_EXECUTABLE - CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS - CMAKE_XCODE_ATTRIBUTE_ @@ -1106,6 +1162,8 @@ variables: - CMAKE__EXTENSIONS - CMAKE__EXTENSIONS_DEFAULT # Since 3.22 - CMAKE__FLAGS + - CMAKE__FLAGS_ + - CMAKE__FLAGS__INIT - CMAKE__FLAGS_DEBUG - CMAKE__FLAGS_DEBUG_INIT - CMAKE__FLAGS_INIT @@ -1173,6 +1231,7 @@ variables: - CTEST_CUSTOM_PRE_MEMCHECK - CTEST_CUSTOM_PRE_TEST - CTEST_CUSTOM_TEST_IGNORE + - CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION # Since 3.24 - CTEST_CUSTOM_WARNING_EXCEPTION - CTEST_CUSTOM_WARNING_MATCH - CTEST_CVS_CHECKOUT @@ -1377,6 +1436,7 @@ variables: # - CPackArchive - CPACK_ARCHIVE_FILE_NAME - CPACK_ARCHIVE__FILE_NAME + - CPACK_ARCHIVE_FILE_EXTENSION # Since 3.25 - CPACK_ARCHIVE_COMPONENT_INSTALL - CPACK_ARCHIVE_THREADS # Since 3.18 # - CPackBundle @@ -1465,6 +1525,7 @@ variables: - CPACK_DMG_DS_STORE_SETUP_SCRIPT - CPACK_DMG_BACKGROUND_IMAGE - CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK + - CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE # Since 3.23 - CPACK_DMG_SLA_DIR - CPACK_DMG_SLA_LANGUAGES - CPACK_DMG__FILE_NAME # Since 3.17 @@ -1561,6 +1622,8 @@ variables: - CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION # Since 3.20 - CPACK_NSIS_EXECUTABLE # Since 3.21 - CPACK_NSIS_IGNORE_LICENSE_PAGE # Since 3.22 + - CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS # Since 3.25 + - CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS # Since 3.25 # - CPackNuGet (since 3.12) - CPACK_NUGET_COMPONENT_INSTALL - CPACK_NUGET_PACKAGE_NAME @@ -1603,6 +1666,7 @@ variables: - CPACK_NUGET__PACKAGE_DEPENDENCIES__VERSION - CPACK_NUGET_PACKAGE_DEBUG # - CPackPackageMaker is deprecated and gonna be removed in next versions of CPack + # NOTE CPackPackageMaker has been removed in 3.24 # - CPackProductBuild - CPACK_COMMAND_PRODUCTBUILD - CPACK_PRODUCTBUILD_IDENTIFIER # Since 3.23 @@ -1765,6 +1829,9 @@ variables: - CPACK_PACKAGE_INSTALL_REGISTRY_KEY - CPACK_CREATE_DESKTOP_LINKS - CPACK_BINARY_ + - CPACK_READELF_EXECUTABLE # Since 3.25 + - CPACK_OBJCOPY_EXECUTABLE # Since 3.25 + - CPACK_OBJDUMP_EXECUTABLE # Since 3.25 - CPACK_PRE_BUILD_SCRIPTS # Since 3.19 - CPACK_POST_BUILD_SCRIPTS # Since 3.19 - CPACK_PACKAGE_FILES # Since 3.19 @@ -1794,6 +1861,7 @@ variables: - CPACK_WIX_ROOT - CPACK_WIX_CUSTOM_XMLNS # Since 3.19 - CPACK_WIX_SKIP_WIX_UI_EXTENSION # Since 3.23 + - CPACK_WIX_ARCHITECTURE # Since 3.24 # - CTest # - Dart - BUILD_TESTING @@ -1820,6 +1888,7 @@ variables: - FETCHCONTENT_QUIET - FETCHCONTENT_FULLY_DISCONNECTED - FETCHCONTENT_UPDATES_DISCONNECTED + - FETCHCONTENT_TRY_FIND_PACKAGE_MODE # Since 3.24 - FETCHCONTENT_SOURCE_DIR_ - FETCHCONTENT_UPDATES_DISCONNECTED_ # - FindXXX module "standard" variables @@ -2233,6 +2302,12 @@ variables: - PKG_CONFIG_VERSION_STRING - PKG_CONFIG_USE_CMAKE_PREFIX_PATH - _MODULE_NAME # Since 3.16 + - _LINK_LIBRARIES + - _STATIC_LINK_LIBRARIES # Since 3.24 + - _LDFLAGS + - _LDFLAGS_OTHER + - _CFLAGS + - _CFLAGS_OTHER # - FindPNG - PNG_DEFINITIONS - PNG_LIBRARY @@ -2404,6 +2479,7 @@ variables: - XercesC_LIBRARY # - FindXMLRPC # - FindZLIB + - ZLIB_USE_STATIC_LIBS # Since 3.24 # - FortranCInterface # The following vars gonna match by regex # - FortranCInterface_GLOBAL_FOUND @@ -2507,6 +2583,7 @@ deprecated-or-internal-variables: # Various undocumented variables (yet) - CMAKE_SUPPRESS_DEVELOPER_WARNINGS # CMake <= 3.10 - CMAKE_SUPPRESS_DEVELOPER_ERRORS # CMake <= 3.10 + - CMAKE_FILES_DIRECTORY # The following variables used by CPack and some CMake modules, # but not documented (yet): # used by some modules like Deb and NSIS @@ -2525,10 +2602,16 @@ deprecated-or-internal-variables: # https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html # NOTE Added to syntax file version 14 at 3.15.0 version of CMake environment-variables: + # Environment Variables that Change Behavior + - CMAKE_PREFIX_PATH + - SSL_CERT_DIR # Since 3.25 + - SSL_CERT_FILE # Since 3.25 # Environment Variables that Control the Build + - ADSP_ROOT # Since 3.24 - CMAKE_APPLE_SILICON_PROCESSOR # Since 3.19.2 - CMAKE_BUILD_PARALLEL_LEVEL - CMAKE_BUILD_TYPE # Since 3.22 + - CMAKE_COLOR_DIAGNOSTICS # Since 3.24 - CMAKE_CONFIGURATION_TYPES # Since 3.22 - CMAKE_CONFIG_TYPE - CMAKE_EXPORT_COMPILE_COMMANDS # Since 3.17 @@ -2538,6 +2621,7 @@ environment-variables: - CMAKE_GENERATOR_TOOLSET - CMAKE_INSTALL_MODE # Since 3.22 - CMAKE__COMPILER_LAUNCHER # Since 3.17 + - CMAKE__LINKER_LAUNCHER # Since 3.21 - CMAKE_MSVCIDE_RUN_PATH - CMAKE_NO_VERBOSE - CMAKE_OSX_ARCHITECTURES @@ -2561,6 +2645,12 @@ environment-variables: - CXXFLAGS - FC - FFLAGS + - HIPCXX # Since 3.21 + - HIPFLAGS # Since 3.21 + - ISPC # Since 3.19 + - ISPCFLAGS # Since 3.19 + - OBJC # Since 3.16.7 + - OBJCXX # Since 3.16.7 - RC - RCFLAGS - SWIFTC @@ -2572,23 +2662,46 @@ environment-variables: - CTEST_PROGRESS_OUTPUT - CTEST_USE_LAUNCHERS_DEFAULT - DASHBOARD_TEST_FROM_CTEST + - CCMAKE_COLORS # Here are the `find_package` specific variables described at the # https://cmake.org/cmake/help/latest/command/find_package.html - _DIR - - CMAKE_PREFIX_PATH - CMAKE_FRAMEWORK_PATH - CMAKE_APPBUNDLE_PATH - PATH # Environment Variables recognized by some standard modules - QTIFWDIR + - CUDA_PATH # FindCUDAToolkit scripting-commands: + - + name: block # Since 3.25 + named-args: [ + SCOPE_FOR + , PROPAGATE + ] + special-args: [ + POLICIES + , VARIABLES + ] + start-region: block - name: break nulary?: true - name: cmake_host_system_information - named-args: [RESULT, QUERY] + named-args: [ + RESULT + , QUERY + # Since 3.24 + , WINDOWS_REGISTRY + , VALUE_NAMES + , SUBKEYS + , VALUE + , VIEW + , SEPARATOR + , ERROR_VARIABLE + ] special-args: [ NUMBER_OF_LOGICAL_CORES , NUMBER_OF_PHYSICAL_CORES @@ -2618,9 +2731,17 @@ scripting-commands: , OS_RELEASE , OS_VERSION , OS_PLATFORM - # Since 3.22 + # Since 3.22 , DISTRIB_INFO , DISTRIB_ + # Since 3.24 + , '64' + , '32' + , '64_32' + , '32_64' + , HOST + , TARGET + , BOTH ] - name: cmake_language @@ -2636,7 +2757,14 @@ scripting-commands: , GET_CALL_IDS , GET_CALL , CANCEL_CALL + # Since 3.24 + , SET_DEPENDENCY_PROVIDER + , SUPPORTED_METHODS + # Since 3.25 + , GET_MESSAGE_LOG_LEVEL ] + # Since 3.24 + special-args: [FIND_PACKAGE, FETCHCONTENT_MAKEAVAILABLE_SERIAL] - name: cmake_minimum_required named-args: [VERSION, FATAL_ERROR] @@ -2670,6 +2798,9 @@ scripting-commands: , IS_RELATIVE , IS_PREFIX , NORMALIZE + , COMPARE # Since 3.?? + , EQUAL # Since 3.?? + , NOT_EQUAL # Since 3.?? # Modification , SET , APPEND @@ -2744,12 +2875,17 @@ scripting-commands: , VERSION_GREATER_EQUAL , IN_LIST , DEFINED + , PATH_EQUAL # Since 3.24 ] has-target-name-after-kw: TARGET nested-parentheses?: true - name: else nulary?: true + - + name: endblock + nulary?: true + end-region: block - name: endforeach nulary?: true @@ -2860,6 +2996,8 @@ scripting-commands: , HTTPHEADER , EXPECTED_HASH , EXPECTED_MD5 + , RANGE_START # Since 3.24 + , RANGE_END # Since 3.24 , TLS_VERIFY , TLS_CAINFO , TIMESTAMP @@ -2999,7 +3137,12 @@ scripting-commands: , CMAKE_FIND_ROOT_PATH_BOTH , ONLY_CMAKE_FIND_ROOT_PATH , NO_CMAKE_FIND_ROOT_PATH + , NO_CMAKE_INSTALL_PREFIX # Since 3.24 + , REGISTRY_VIEW # Since 3.24 + , VALIDATOR # Since 3.25 ] + # Since 3.24 + special-args: ®_view_special ['64', '32', '64_32', '32_64', HOST, TARGET, BOTH] - name: find_library named-args: &find_library [ @@ -3020,7 +3163,11 @@ scripting-commands: , CMAKE_FIND_ROOT_PATH_BOTH , ONLY_CMAKE_FIND_ROOT_PATH , NO_CMAKE_FIND_ROOT_PATH + , NO_CMAKE_INSTALL_PREFIX # Since 3.24 + , REGISTRY_VIEW # Since 3.24 + , VALIDATOR # Since 3.25 ] + special-args: *reg_view_special # Since 3.24 - name: find_package named-args: [ @@ -3049,13 +3196,20 @@ scripting-commands: , CMAKE_FIND_ROOT_PATH_BOTH , ONLY_CMAKE_FIND_ROOT_PATH , NO_CMAKE_FIND_ROOT_PATH + , NO_CMAKE_INSTALL_PREFIX # Since 3.24 + , BYPASS_PROVIDER # Since 3.24 + , REGISTRY_VIEW # Since 3.24 + , GLOBAL # Since 3.24 ] + special-args: *reg_view_special # Since 3.24 - name: find_path named-args: *find_file + special-args: *reg_view_special # Since 3.24 - name: find_program named-args: *find_library + special-args: *reg_view_special # Since 3.24 - name: foreach named-args: [ @@ -3231,7 +3385,7 @@ scripting-commands: name: option - name: return - nulary?: true + named-args: [PROPAGATE] # Since 3.25 - name: separate_arguments named-args: [ @@ -3415,7 +3569,10 @@ project-commands: name: add_link_options - name: add_subdirectory - named-args: [EXCLUDE_FROM_ALL] + named-args: [ + EXCLUDE_FROM_ALL + , SYSTEM # Since 3.25 + ] - name: add_test named-args: [NAME, COMMAND, COMMAND_EXPAND_LISTS, CONFIGURATIONS, WORKING_DIRECTORY] @@ -3656,6 +3813,7 @@ project-commands: , cxx_std_17 , cxx_std_20 # Since 3.12 , cxx_std_23 # Since 3.20 + , cxx_std_26 # Since 3.25 , cxx_aggregate_default_initializers , cxx_alias_templates , cxx_alignas @@ -3781,8 +3939,7 @@ project-commands: - name: try_compile named-args: [ - RESULT_VAR - , CMAKE_FLAGS + CMAKE_FLAGS , OUTPUT_VARIABLE , SOURCES , COMPILE_DEFINITIONS @@ -3793,6 +3950,15 @@ project-commands: , _STANDARD , _STANDARD_REQUIRED , _EXTENSIONS + # Since 3.25 + , PROJECT + , SOURCE_DIR + , BINARY_DIR + , TARGET + , NO_CACHE + , SOURCE_FROM_CONTENT + , SOURCE_FROM_VAR + , SOURCE_FROM_FILE ] - name: try_run @@ -3804,10 +3970,23 @@ project-commands: , LINK_LIBRARIES , LINK_OPTIONS # Since 3.14 , COMPILE_OUTPUT_VARIABLE + , COPY_FILE + , COPY_FILE_ERROR + , _STANDARD + , _STANDARD_REQUIRED + , _EXTENSIONS , RUN_OUTPUT_VARIABLE , OUTPUT_VARIABLE , WORKING_DIRECTORY # Since 3.20 , ARGS + # Since 3.25 + , SOURCES + , SOURCE_FROM_CONTENT + , SOURCE_FROM_VAR + , SOURCE_FROM_FILE + , NO_CACHE + , RUN_OUTPUT_STDOUT_VARIABLE + , RUN_OUTPUT_STDERR_VARIABLE ] ctest-commands: @@ -4545,6 +4724,7 @@ standard-module-commands: - URL_HASH - URL_MD5 - DOWNLOAD_NAME + - DOWNLOAD_EXTRACT_TIMESTAMP # Since 3.24 - DOWNLOAD_NO_EXTRACT - DOWNLOAD_NO_PROGRESS - TIMEOUT @@ -4721,6 +4901,7 @@ standard-module-commands: - UPDATE_DISCONNECTED - PATCH_COMMAND - SOURCE_SUBDIR + - SYSTEM - name: FetchContent_Populate named-args: @@ -5047,8 +5228,10 @@ standard-module-commands: - OUTPUT_NAME - DOCUMENTATION - LINK_TO + - R2017b + - R2018a - EXCLUDE_FROM_ALL - special-args: [R2017b, R2018a] + - NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES # Since 3.24 # FindPkgConfig - name: pkg_check_modules @@ -5059,6 +5242,7 @@ standard-module-commands: - NO_CMAKE_ENVIRONMENT_PATH - IMPORTED_TARGET - GLOBAL + - STATIC_TARGET # Since 3.24 - name: pkg_search_module named-args: *pkgcm diff --git a/src/libs/3rdparty/syntax-highlighting/data/generators/generate-cmake-syntax.py b/src/libs/3rdparty/syntax-highlighting/data/generators/generate-cmake-syntax.py index dfe77e4627e..f500061f47e 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/generators/generate-cmake-syntax.py +++ b/src/libs/3rdparty/syntax-highlighting/data/generators/generate-cmake-syntax.py @@ -7,7 +7,7 @@ # # To install prerequisites: # -# $ pip install --user click jinja2 yaml +# $ pip install --user click jinja2 pyyaml # # To use: # @@ -15,11 +15,10 @@ # import click import jinja2 -import pathlib import re import yaml -import pprint +from lxml import etree _TEMPLATED_NAME = re.compile('<[^>]+>') @@ -34,6 +33,19 @@ _PROPERTY_KEYS = [ ] _KW_RE_LIST = ['kw', 're'] _VAR_KIND_LIST = ['variables', 'deprecated-or-internal-variables', 'environment-variables'] +_CONTROL_FLOW_LIST = set(( + 'break' + , 'continue' + , 'elseif' + , 'else' + , 'endforeach' + , 'endif' + , 'endwhile' + , 'foreach' + , 'if' + , 'return' + , 'while' +)) def try_transform_placeholder_string_to_regex(name): @@ -107,7 +119,7 @@ def transform_command(cmd): assert new_cmd == cmd can_be_nulary = False - cmd['nested_parentheses'] = cmd['nested-parentheses?'] if 'nested-parentheses?' in cmd else False + cmd['nested_parentheses'] = cmd.get('nested-parentheses?', False) if 'first-arg-is-target?' in cmd: cmd['first_arg_is_target'] = cmd['first-arg-is-target?'] @@ -138,9 +150,89 @@ def transform_command(cmd): if 'end-region' in cmd: cmd['end_region'] = cmd['end-region'] + cmd['attribute'] = 'Control Flow' if cmd['name'] in _CONTROL_FLOW_LIST else 'Command' + return cmd +def remove_duplicate_list_nodes(contexts, highlighting): + remap = {} + + items_by_kws = {} + # extract duplicate keyword list + for items in highlighting: + if items.tag != 'list': + break + k = '<'.join(item.text for item in items) + name = items.attrib['name'] + rename = items_by_kws.get(k) + if rename: + remap[name] = rename + highlighting.remove(items) + else: + items_by_kws[k] = name + + # update keyword list name referenced by each rule + for context in contexts: + for rule in context: + if rule.tag == 'keyword': + name = rule.attrib['String'] + rule.attrib['String'] = remap.get(name, name) + + +def remove_duplicate_context_nodes(contexts): + # 3 levels: ctx, ctx_op and ctx_op_nested + for _ in range(3): + remap = {} + duplicated = {} + + # remove duplicate nodes + for context in contexts: + name = context.attrib['name'] + context.attrib['name'] = 'dummy' + ref = duplicated.setdefault(etree.tostring(context), []) + if ref: + contexts.remove(context) + else: + context.attrib['name'] = name + ref.append(name) + remap[name] = ref[0] + + # update context name referenced by each rule + for context in contexts: + for rule in context: + ref = remap.get(rule.attrib.get('context')) + if ref: + rule.attrib['context'] = ref + + +def remove_duplicate_nodes(xml_string): + parser = etree.XMLParser(resolve_entities=False, collect_ids=False) + root = etree.fromstring(xml_string.encode(), parser=parser) + highlighting = root[0] + + contexts = highlighting.find('contexts') + + remove_duplicate_list_nodes(contexts, highlighting) + remove_duplicate_context_nodes(contexts) + + # reformat comments + xml = etree.tostring(root) + xml = re.sub(b'(?=[^\n ])(?=[^ \n])', b'-->\n', xml) + + # extract DOCTYPE removed by etree.fromstring and reformat + doctype = xml_string[:xml_string.find(' + xml = xml[xml.find(b' -