From 76568d82328b1b2acfb3db7cb21679cce3d9b665 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Wed, 23 Nov 2022 12:25:40 +0100 Subject: ClangFormat: Create new generateclangformatchecks file - new generateclangformatcheckslayout file generates two clangformatchecks files .cpp and .h, which contain UI Layout based on utils/layoutbuilder Change-Id: I4a83e542f089618d0cbd552dc99485b9428b4106 Reviewed-by: Reviewed-by: Jarek Kobus --- scripts/generateClangFormatChecksLayout.py | 231 +++++++++++++++++++++++++++++ scripts/generateClangFormatChecksUI.py | 190 ------------------------ 2 files changed, 231 insertions(+), 190 deletions(-) create mode 100755 scripts/generateClangFormatChecksLayout.py delete mode 100755 scripts/generateClangFormatChecksUI.py (limited to 'scripts') diff --git a/scripts/generateClangFormatChecksLayout.py b/scripts/generateClangFormatChecksLayout.py new file mode 100755 index 00000000000..b431485ca0e --- /dev/null +++ b/scripts/generateClangFormatChecksLayout.py @@ -0,0 +1,231 @@ +#!/usr/bin/env python3.10 +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 + +import argparse +import os +# for installing use pip3 install robotpy-cppheaderparse +import CppHeaderParser + +def parse_arguments(): + parser = argparse.ArgumentParser(description='Clazy checks header file \ + generator') + parser.add_argument('--clang-format-header-file', help='path to \ + Format.h usually /usr/lib/llvm-x/include/clang/Format/Format.h', + default=None, dest='options_header', required=True) + return parser.parse_args() + + +def full_header_content(header_code): + return '''// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 + +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! + +#pragma once + +#include + +QT_BEGIN_NAMESPACE +class QCheckBox; +class QComboBox; +class QLabel; +class QLineEdit; +class QPlainTextEdit; +class QPushButton; +class QWidget; +QT_END_NAMESPACE + +namespace ClangFormat { + +class ClangFormatChecks : public QWidget +{ + Q_OBJECT +public: + ClangFormatChecks(QWidget *parent = nullptr); + +private: +''' + header_code + ''' +}; + +} //ClangFormat +''' + + +def full_source_content(source_code, layout_code): + return '''// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 + +// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! + +#include "clangformatchecks.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +using namespace Utils; + +using namespace ClangFormat; + +ClangFormatChecks::ClangFormatChecks(QWidget *parent) + : QWidget(parent) +{ +''' + source_code + ''' + using namespace Layouting; + + Form { +''' + layout_code + ''' }.attachTo(this, Layouting::WithoutMargins); +} +''' + +# Combobox UI +def combobox_header(name): + header = " QComboBox *m_" + name + " = nullptr;\n" + return header + +def combobox_source(name, values, offset): + source = "" + source += " m_" + name + " = new QComboBox(this);\n" + + list = "" + for value in values: + list += "\"" + value + "\"," + + source += " m_" + name + "->addItems({" + list + "});\n" + source += " m_" + name + "->setObjectName(\"" + name + "\");\n\n" + return source + +def combobox_source_bool(name, offset): + return combobox_source(name, ["Default", "true", "false"], offset) + +def combobox_layout(name, offset): + layout = " new QLabel(\"" + offset + name + "\"), m_" + name + ", br,\n" + return layout + +# String UI +def string_header(name): + header = " QLineEdit *m_" + name + " = nullptr;\n" + header += " QPushButton *m_set" + name + " = nullptr;\n" + return header + +def string_source(name, offset): + source = "" + source += " m_" + name + " = new QLineEdit(this);\n" + source += " m_" + name + "->setObjectName(\"" + name + "\");\n" + source += " m_set" + name + " = new QPushButton(\"Set\", this);\n\n" + source += " m_set" + name + "->setObjectName(\"set" + name + "\");\n" +# source += "m_" + name + "->setObjectName(\"" + offset + name + "\");\n\n" + return source + +def string_layout(name, offset): + layout = " new QLabel(\"" + offset + name + "\"), Row {m_" + name + ", m_set" + name + "}, br,\n" + return layout + +# Vector UI +def vector_header(name): + header = " QPlainTextEdit *m_" + name + " = nullptr;\n" + header += " QPushButton *m_set" + name + " = nullptr;\n" + return header + +def vector_source(name, offset): + source = "" + source += " m_" + name + " = new QPlainTextEdit(this);\n" + source += " m_" + name + "->setObjectName(\"" + name + "\");\n" + source += " m_" + name + "->setFixedHeight(100);\n" + source += " m_set" + name + " = new QPushButton(\"Set\", this);\n\n" + source += " m_set" + name + "->setObjectName(\"set" + name + "\");\n" +# source += "m_" + name + "->setObjectName(\"" + offset + name + "\");\n\n" + return source + +def vector_layout(name, offset): + layout = " new QLabel(\"" + offset + name + "\"), Row {m_" + name + ", m_set" + name + "}, br,\n" + return layout + +# Struct Layout +def struct_layout(name, offset): + layout = " new QLabel(\"" + offset + name + "\"), br,\n" + return layout + + +def in_list(list, type): + for element in list: + if element["name"] == type: + return element; + return + +def create_private_variables(variables, enums, structs, offset = ""): + header = "" + source = "" + layout = "" + + # create BasedOnStyle combobox ussually not presented in FormatStyle struct + if offset == "": + header += combobox_header("BasedOnStyle") + source += combobox_source("BasedOnStyle", ["LLVM", "Google", "Chromium", "Mozilla", "WebKit", "Microsoft", "GNU"], offset) + layout += combobox_layout("BasedOnStyle", offset) + + for variable in variables: + if "doxygen" in variable.keys(): + if ("**deprecated**" in variable['doxygen']): + continue; + + type = variable["type"] + name = variable["name"] + enum = in_list(enums, type) + struct = in_list(structs, type) + if enum: + header += combobox_header(name) + source += combobox_source(name, [value["name"].split("_")[1] for value in enum["values"]], offset) + layout += combobox_layout(name, offset) + elif struct: + layout += struct_layout(name, offset) + header_tmp, source_tmp, layout_tmp = create_private_variables(struct["properties"]["public"], enums, structs, " ") + header += header_tmp + source += source_tmp + layout += layout_tmp + elif "std::string" == type or "unsigned" == type or "int" == type: + header += string_header(name) + source += string_source(name, offset) + layout += string_layout(name, offset) + elif "std::vector" == type: + header += vector_header(name) + source += vector_source(name, offset) + layout += vector_layout(name, offset) + elif "bool" == type: + header += combobox_header(name) + source += combobox_source_bool(name, offset) + layout += combobox_layout(name, offset); + return header, source, layout + + +def main(): + arguments = parse_arguments() + header = CppHeaderParser.CppHeader(arguments.options_header) + + enums = header.classes["FormatStyle"]["enums"]["public"] + structs = header.classes["FormatStyle"]["nested_classes"] + variables = header.classes["FormatStyle"]["properties"]["public"] + + current_path = os.path.dirname(os.path.abspath(__file__)) + source_path = os.path.abspath(os.path.join(current_path, '..', 'src', + 'plugins', 'clangformat', 'clangformatchecks.cpp')) + header_path = os.path.abspath(os.path.join(current_path, '..', 'src', + 'plugins', 'clangformat', 'clangformatchecks.h')) + + header, source, layout = create_private_variables(variables, enums, structs) + with open(source_path, 'w') as f: + f.write(full_source_content(source, layout)) + + with open(header_path, 'w') as f: + f.write(full_header_content(header)) + + +if __name__ == "__main__": + main() diff --git a/scripts/generateClangFormatChecksUI.py b/scripts/generateClangFormatChecksUI.py deleted file mode 100755 index a0a9f37e1ac..00000000000 --- a/scripts/generateClangFormatChecksUI.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env python3.10 -# Copyright (C) 2019 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 - -import argparse -import os -# for installing use pip3 install robotpy-cppheaderparse -import CppHeaderParser - -def parse_arguments(): - parser = argparse.ArgumentParser(description='Clazy checks header file \ - generator') - parser.add_argument('--clang-format-header-file', help='path to \ - Format.h usually /usr/lib/llvm-x/include/clang/Format/Format.h', - default=None, dest='options_header', required=True) - return parser.parse_args() - -def full_ui_content(checks): - return ''' - - ClangFormat::ClangFormatChecksWidget - - - - 580 - 16777215 - - - -''' + checks + ''' - - - - -''' - -def lable_ui(name, index, offset = ""): - return ''' - - - ''' + offset + name + ''' - - - -''' - -def combobox_ui(name, values, index): - combobox = ''' - - - Qt::StrongFocus - -''' - for value in values: - combobox += ''' - - ''' + value + ''' - - -''' - # for - combobox += ''' - -''' - return combobox - -def string_ui(name, index): - return ''' - - - - - - - - - - 40 - 16777215 - - - - Set - - - - - -''' - -def vector_ui(name, index): - return ''' - - - - - - - - - 16777215 - 50 - - - - - - - - - 40 - 16777215 - - - - Set - - - - - -''' - -def combobox_ui_bool(name, index): - return combobox_ui(name, ["Default", "true", "false"], index) - -def in_list(list, type): - for element in list: - if element["name"] == type: - return element; - return - -create_checks_index = 0 -def create_checks(variables, enums, structs, offset = ""): - checks = "" - global create_checks_index - # create BasedOnStyle combobox ussually not presented in FormatStyle struct - if 0 == create_checks_index: - create_checks_index += 1 - checks = lable_ui("BasedOnStyle", create_checks_index) - checks += combobox_ui("BasedOnStyle", ["LLVM", "Google", "Chromium", "Mozilla", "WebKit", "Microsoft", "GNU"], create_checks_index) - - for variable in variables: - if "doxygen" in variable.keys(): - if ("**deprecated**" in variable['doxygen']): - continue; - - create_checks_index += 1 - type = variable["type"] - name = variable["name"] - enum = in_list(enums, type) - struct = in_list(structs, type) - if enum: - checks += lable_ui(name, create_checks_index, offset) - checks += combobox_ui(name, [value["name"].split("_")[1] for value in enum["values"]], create_checks_index) - elif struct: - checks += lable_ui(name, create_checks_index, offset) - check = create_checks(struct["properties"]["public"], enums, structs, " ") - checks += check - elif "std::string" == type or "unsigned" == type or "int" == type: - checks += lable_ui(name, create_checks_index, offset) - checks += string_ui(name, create_checks_index) - elif "std::vector" == type: - checks += lable_ui(name, create_checks_index, offset) - checks += vector_ui(name, create_checks_index) - elif "bool" == type: - checks += lable_ui(name, create_checks_index, offset) - checks += combobox_ui_bool(name, create_checks_index) - return checks - - -def main(): - arguments = parse_arguments() - header = CppHeaderParser.CppHeader(arguments.options_header) - - enums = header.classes["FormatStyle"]["enums"]["public"] - structs = header.classes["FormatStyle"]["nested_classes"] - variables = header.classes["FormatStyle"]["properties"]["public"] - - checks = create_checks(variables, enums, structs) - - current_path = os.path.dirname(os.path.abspath(__file__)) - ui_path = os.path.abspath(os.path.join(current_path, '..', 'src', - 'plugins', 'clangformat', 'clangformatchecks.ui')) - with open(ui_path, 'w') as f: - f.write(full_ui_content(checks)) - - -if __name__ == "__main__": - main() -- cgit v1.2.3 From e58c60ec9da2faab5a542bd680694c57c6247a5a Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Wed, 7 Dec 2022 09:46:28 +0100 Subject: ClangFormat: Remove without margins layouting from script Change-Id: Iddf69e73ca5df48541e83030b2a09e7833f9fa64 Reviewed-by: Jarek Kobus --- scripts/generateClangFormatChecksLayout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/generateClangFormatChecksLayout.py b/scripts/generateClangFormatChecksLayout.py index b431485ca0e..53bb85d99c4 100755 --- a/scripts/generateClangFormatChecksLayout.py +++ b/scripts/generateClangFormatChecksLayout.py @@ -81,7 +81,7 @@ ClangFormatChecks::ClangFormatChecks(QWidget *parent) using namespace Layouting; Form { -''' + layout_code + ''' }.attachTo(this, Layouting::WithoutMargins); +''' + layout_code + ''' }.attachTo(this); } ''' -- cgit v1.2.3 From 2ffa843d404f47693325b7da0f887722f1f114dd Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Thu, 15 Dec 2022 12:54:18 +0100 Subject: ClangFormat: Make clang format checks widget resizable - Change Form to Grid that looks consistent for different OS Change-Id: Ibb5fc3564d8c25457c4bf520acf78b25c542b5ae Reviewed-by: Marcus Tillmanns Reviewed-by: Christian Kandeler --- scripts/generateClangFormatChecksLayout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/generateClangFormatChecksLayout.py b/scripts/generateClangFormatChecksLayout.py index 53bb85d99c4..f29743d5665 100755 --- a/scripts/generateClangFormatChecksLayout.py +++ b/scripts/generateClangFormatChecksLayout.py @@ -8,7 +8,7 @@ import os import CppHeaderParser def parse_arguments(): - parser = argparse.ArgumentParser(description='Clazy checks header file \ + parser = argparse.ArgumentParser(description='Clang-Format checks header file \ generator') parser.add_argument('--clang-format-header-file', help='path to \ Format.h usually /usr/lib/llvm-x/include/clang/Format/Format.h', @@ -80,7 +80,7 @@ ClangFormatChecks::ClangFormatChecks(QWidget *parent) ''' + source_code + ''' using namespace Layouting; - Form { + Grid { ''' + layout_code + ''' }.attachTo(this); } ''' -- cgit v1.2.3 From 56baf8c058792187b574cf988fcf4b313f527156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 21 Dec 2022 10:12:09 +0100 Subject: Remove GPL-3.0+ from license identifiers Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller --- scripts/generateClangFormatChecksLayout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/generateClangFormatChecksLayout.py b/scripts/generateClangFormatChecksLayout.py index f29743d5665..e604e4d0f72 100755 --- a/scripts/generateClangFormatChecksLayout.py +++ b/scripts/generateClangFormatChecksLayout.py @@ -18,7 +18,7 @@ def parse_arguments(): def full_header_content(header_code): return '''// Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! @@ -54,7 +54,7 @@ private: def full_source_content(source_code, layout_code): return '''// Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! -- cgit v1.2.3 From 4e9c1d126c6f09b8813bc2ebc6cc195ef8d2c01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 4 Jan 2023 08:52:22 +0100 Subject: Replace GPL-3.0 with GPL-3.0-only GPL-3.0 is deprecated by SPDX. Change done by find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \; Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939 Reviewed-by: Lucie Gerard Reviewed-by: Reviewed-by: Eike Ziller --- scripts/build.py | 2 +- scripts/build_plugin.py | 2 +- scripts/checkInstalledFiles.py | 2 +- scripts/clangCompleteAt.sh | 2 +- scripts/clazyweb2tasks.pl | 2 +- scripts/common.py | 2 +- scripts/dependencyinfo.py | 2 +- scripts/deployqtHelper_mac.sh | 2 +- scripts/fixCopyright.sh | 2 +- scripts/fix_makefile_header_dependencies.sh | 2 +- scripts/flake2tasks.py | 2 +- scripts/gcc2tasks.pl | 2 +- scripts/generateClangFormatChecksLayout.py | 2 +- scripts/hasCopyright.pl | 2 +- scripts/krazy2tasks.pl | 2 +- scripts/makedmg.py | 2 +- scripts/msanalyzer2tasks.pl | 2 +- scripts/msvc2tasks.pl | 2 +- scripts/mytasks.pl | 2 +- scripts/perltest2tasks.pl | 2 +- scripts/purify2tasks.pl | 2 +- scripts/qdoc2tasks.pl | 2 +- scripts/scrubts.py | 2 +- scripts/shiboken2tasks.py | 2 +- scripts/sphinx2tasks.pl | 2 +- scripts/test2tasks.pl | 2 +- scripts/uichanges.py | 2 +- scripts/updateCopyright.pl | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) (limited to 'scripts') diff --git a/scripts/build.py b/scripts/build.py index ee83021fb95..ae1b450f918 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (C) 2020 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # import the print function which is used in python 3.x from __future__ import print_function diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index df06908c9d3..38d247d4d50 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (C) 2020 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # import the print function which is used in python 3.x from __future__ import print_function diff --git a/scripts/checkInstalledFiles.py b/scripts/checkInstalledFiles.py index 31d9da1bebb..72ec730f6fc 100755 --- a/scripts/checkInstalledFiles.py +++ b/scripts/checkInstalledFiles.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import os import sys diff --git a/scripts/clangCompleteAt.sh b/scripts/clangCompleteAt.sh index db80207ff29..ba7054ee974 100755 --- a/scripts/clangCompleteAt.sh +++ b/scripts/clangCompleteAt.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # --- helpers ----------------------------------------------------------------- diff --git a/scripts/clazyweb2tasks.pl b/scripts/clazyweb2tasks.pl index 469ce075c8c..88679626b0b 100755 --- a/scripts/clazyweb2tasks.pl +++ b/scripts/clazyweb2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2017 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/common.py b/scripts/common.py index fd57ccd2d1e..d295b5763b4 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -1,5 +1,5 @@ # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import os import locale diff --git a/scripts/dependencyinfo.py b/scripts/dependencyinfo.py index d6c32dce2c9..ea7d698c29b 100755 --- a/scripts/dependencyinfo.py +++ b/scripts/dependencyinfo.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2 # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import glob import json diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index efcde54bdfe..6ef3fcdb8d1 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 [ $# -lt 5 ] && echo "Usage: $(basename $0) " && exit 2 [ $(uname -s) != "Darwin" ] && echo "Run this script on Mac OS X" && exit 2; diff --git a/scripts/fixCopyright.sh b/scripts/fixCopyright.sh index f06d13240ff..c5026b0c61c 100755 --- a/scripts/fixCopyright.sh +++ b/scripts/fixCopyright.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # Prepend a copyright header to all files given on the command line. # Sample usage: diff --git a/scripts/fix_makefile_header_dependencies.sh b/scripts/fix_makefile_header_dependencies.sh index 23d81e005f4..28f5b164c24 100755 --- a/scripts/fix_makefile_header_dependencies.sh +++ b/scripts/fix_makefile_header_dependencies.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 WORKER=./fill_deps.sh DEPFILE=deps diff --git a/scripts/flake2tasks.py b/scripts/flake2tasks.py index 7fcad2ec3b3..f84ea8c71e1 100755 --- a/scripts/flake2tasks.py +++ b/scripts/flake2tasks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # Copyright (C) 2019 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 ''' flake2tasks.py - Convert flake8 warnings into Qt Creator task files. diff --git a/scripts/gcc2tasks.pl b/scripts/gcc2tasks.pl index 5e59b6fb3a3..4cb3d90c8c5 100755 --- a/scripts/gcc2tasks.pl +++ b/scripts/gcc2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/generateClangFormatChecksLayout.py b/scripts/generateClangFormatChecksLayout.py index e604e4d0f72..03f8c7830d7 100755 --- a/scripts/generateClangFormatChecksLayout.py +++ b/scripts/generateClangFormatChecksLayout.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3.10 # Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import argparse import os diff --git a/scripts/hasCopyright.pl b/scripts/hasCopyright.pl index 42efd34248e..b6968a2782d 100755 --- a/scripts/hasCopyright.pl +++ b/scripts/hasCopyright.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # Report possible problems with copy right headers # diff --git a/scripts/krazy2tasks.pl b/scripts/krazy2tasks.pl index 5f7d3ece192..54264ab3764 100755 --- a/scripts/krazy2tasks.pl +++ b/scripts/krazy2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 use strict; diff --git a/scripts/makedmg.py b/scripts/makedmg.py index 040e3ff9919..e90846176fd 100755 --- a/scripts/makedmg.py +++ b/scripts/makedmg.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (C) 2018 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import argparse import os diff --git a/scripts/msanalyzer2tasks.pl b/scripts/msanalyzer2tasks.pl index 03b72340059..8cf174f2ba4 100755 --- a/scripts/msanalyzer2tasks.pl +++ b/scripts/msanalyzer2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/msvc2tasks.pl b/scripts/msvc2tasks.pl index 4b6abdfcd4c..b45acddb617 100755 --- a/scripts/msvc2tasks.pl +++ b/scripts/msvc2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/mytasks.pl b/scripts/mytasks.pl index 18baa515e07..1380a642384 100755 --- a/scripts/mytasks.pl +++ b/scripts/mytasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 use strict; diff --git a/scripts/perltest2tasks.pl b/scripts/perltest2tasks.pl index 9eb3ffb67e8..db2641e3407 100755 --- a/scripts/perltest2tasks.pl +++ b/scripts/perltest2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2017 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/purify2tasks.pl b/scripts/purify2tasks.pl index 423201edf10..284985345e9 100755 --- a/scripts/purify2tasks.pl +++ b/scripts/purify2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/qdoc2tasks.pl b/scripts/qdoc2tasks.pl index 382448ed227..986246b2cad 100755 --- a/scripts/qdoc2tasks.pl +++ b/scripts/qdoc2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/scrubts.py b/scripts/scrubts.py index 9a863970b67..e0f24dff2f8 100644 --- a/scripts/scrubts.py +++ b/scripts/scrubts.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # See argparse description in main # diff --git a/scripts/shiboken2tasks.py b/scripts/shiboken2tasks.py index d906e0d8ba4..d353c9c02f7 100755 --- a/scripts/shiboken2tasks.py +++ b/scripts/shiboken2tasks.py @@ -1,5 +1,5 @@ # Copyright (C) 2020 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 ''' shiboken2tasks.py - Convert shiboken warnings into Qt Creator task files. diff --git a/scripts/sphinx2tasks.pl b/scripts/sphinx2tasks.pl index 91fce0e4f5a..f479d52ce01 100755 --- a/scripts/sphinx2tasks.pl +++ b/scripts/sphinx2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # Copyright (C) 2018 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/test2tasks.pl b/scripts/test2tasks.pl index d4c05b17efc..cd8b7e77693 100755 --- a/scripts/test2tasks.pl +++ b/scripts/test2tasks.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 =head1 NAME diff --git a/scripts/uichanges.py b/scripts/uichanges.py index 2dbbdf8e9b9..f204a28f4e7 100755 --- a/scripts/uichanges.py +++ b/scripts/uichanges.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 """ A simple program that parses untranslated.ts files diff --git a/scripts/updateCopyright.pl b/scripts/updateCopyright.pl index 3b384012b73..ed854302c1f 100755 --- a/scripts/updateCopyright.pl +++ b/scripts/updateCopyright.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # Copyright (C) 2016 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0 +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 use strict; -- cgit v1.2.3 From a069ed838e7226817dd8064a6c92272666cf252b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 14 Feb 2023 08:56:24 +0100 Subject: Let Debian packages install to /opt/qt-creator instead of /opt directly. Seems to be more conventional Change-Id: I6d3b0b973684b6f72c096eeb4f2b572012f30351 Reviewed-by: Reviewed-by: Cristian Adam Reviewed-by: hjk --- scripts/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build.py b/scripts/build.py index ee83021fb95..29b459f4120 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -189,7 +189,7 @@ def build_qtcreator(args, paths): if args.with_cpack: cmake_args += ['-DCPACK_PACKAGE_FILE_NAME=qtcreator' + args.zip_infix] if common.is_linux_platform(): - cmake_args += ['-DCPACK_INSTALL_PREFIX=/opt'] + cmake_args += ['-DCPACK_INSTALL_PREFIX=/opt/qt-creator'] cmake_args += args.config_args -- cgit v1.2.3