First Commit
This commit is contained in:
73
3rdparty/kddockwidgets/.clang-format
vendored
Normal file
73
3rdparty/kddockwidgets/.clang-format
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
BasedOnStyle: WebKit
|
||||
Language: Cpp
|
||||
Standard: Cpp11
|
||||
|
||||
IndentWidth: 4
|
||||
SpacesBeforeTrailingComments: 1
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
SortIncludes: false
|
||||
ContinuationIndentWidth: 4
|
||||
MaxEmptyLinesToKeep: 3
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
|
||||
ForEachMacros:
|
||||
- forever # avoids { wrapped to next line
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
|
||||
AccessModifierOffset: -4
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: false # requires clang-format 11
|
||||
AlignAfterOpenBracket: true
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackParameters: true
|
||||
ColumnLimit: 0
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerBinding: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
IndentCaseLabels: false
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 60
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerBindsToType: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
SpaceAfterControlStatementKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: true
|
||||
SpacesInParentheses: false
|
||||
StatementAttributeLikeMacros: [emit,KDDW_CO_AWAIT]
|
||||
...
|
||||
68
3rdparty/kddockwidgets/.clang-tidy
vendored
Normal file
68
3rdparty/kddockwidgets/.clang-tidy
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
Checks: '*, -google-*, -objc-*, -llvmlibc-*, -zircon-*,
|
||||
-altera-*,
|
||||
-hicpp-braces-around-statements,
|
||||
-hicpp-named-parameter,
|
||||
-hicpp-use-auto,
|
||||
-hicpp-avoid-c-arrays,modernize-avoid-c-arrays,
|
||||
-hicpp-no-array-decay,
|
||||
-hicpp-signed-bitwise,
|
||||
-hicpp-use-equals-default,
|
||||
-hicpp-use-emplace,
|
||||
-hicpp-special-member-functions,
|
||||
-readability-braces-around-statements,
|
||||
-readability-identifier-length,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-named-parameter,
|
||||
-readability-qualified-auto,
|
||||
-readability-magic-numbers,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-use-anyofallof,
|
||||
-readability-misleading-indentation,
|
||||
-readability-make-member-function-const,
|
||||
-readability-avoid-nested-conditional-operator,
|
||||
-readability-simplify-boolean-expr,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-auto,
|
||||
-modernize-use-nodiscard,
|
||||
-modernize-return-braced-init-list,
|
||||
-modernize-macro-to-enum,
|
||||
-modernize-use-using,
|
||||
-modernize-use-emplace,
|
||||
-modernize-use-equals-default,
|
||||
-modernize-avoid-c-arrays,
|
||||
-llvm-namespace-comment,
|
||||
-llvm-qualified-auto,
|
||||
-llvm-include-order,
|
||||
-llvm-else-after-return,
|
||||
-fuchsia-*,
|
||||
-readability-inconsistent-declaration-parameter-name,
|
||||
-readability-else-after-return,
|
||||
-misc-const-correctness,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-misc-no-recursion,
|
||||
-misc-use-anonymous-namespace,
|
||||
-misc-include-cleaner,
|
||||
-cppcoreguidelines-pro-type-const-cast,
|
||||
-cppcoreguidelines-macro-usage,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||
-cppcoreguidelines-avoid-c-arrays,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-type-static-cast-downcast,
|
||||
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-cppcoreguidelines-narrowing-conversions,
|
||||
-performance-unnecessary-value-param,
|
||||
-clang-analyzer-cplusplus.NewDelete,
|
||||
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||
-clang-analyzer-optin.cplusplus.VirtualCall,
|
||||
-cert-err58-cpp,
|
||||
-bugprone-suspicious-include,
|
||||
-bugprone-branch-clone,
|
||||
-boost-use-ranges,
|
||||
-portability-template-virtual-member-function,
|
||||
-performance-enum-size,
|
||||
-bugprone-narrowing-conversions,
|
||||
'
|
||||
3
3rdparty/kddockwidgets/.clangd
vendored
Normal file
3
3rdparty/kddockwidgets/.clangd
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
CompileFlags:
|
||||
Add: -Wno-unknown-warning-option
|
||||
Remove: -fcoroutines
|
||||
1
3rdparty/kddockwidgets/.clazy
vendored
Normal file
1
3rdparty/kddockwidgets/.clazy
vendored
Normal file
@@ -0,0 +1 @@
|
||||
CHECKS level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-qobject-macro
|
||||
240
3rdparty/kddockwidgets/.cmake-format.py
vendored
Normal file
240
3rdparty/kddockwidgets/.cmake-format.py
vendored
Normal file
@@ -0,0 +1,240 @@
|
||||
# ----------------------------------
|
||||
# Options affecting listfile parsing
|
||||
# ----------------------------------
|
||||
with section("parse"):
|
||||
|
||||
# Specify structure for custom cmake functions
|
||||
additional_commands = {'foo': {'flags': ['BAR', 'BAZ'],
|
||||
'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}
|
||||
|
||||
# Override configurations per-command where available
|
||||
override_spec = {}
|
||||
|
||||
# Specify variable tags.
|
||||
vartags = []
|
||||
|
||||
# Specify property tags.
|
||||
proptags = []
|
||||
|
||||
# -----------------------------
|
||||
# Options affecting formatting.
|
||||
# -----------------------------
|
||||
with section("format"):
|
||||
|
||||
# Disable formatting entirely, making cmake-format a no-op
|
||||
disable = False
|
||||
|
||||
# How wide to allow formatted cmake files
|
||||
line_width = 120
|
||||
|
||||
# How many spaces to tab for indent
|
||||
tab_size = 4
|
||||
|
||||
# If true, lines are indented using tab characters (utf-8 0x09) instead of
|
||||
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
|
||||
# require a fractional tab character, the behavior of the fractional
|
||||
# indentation is governed by <fractional_tab_policy>
|
||||
use_tabchars = False
|
||||
|
||||
# If <use_tabchars> is True, then the value of this variable indicates how
|
||||
# fractional indentions are handled during whitespace replacement. If set to
|
||||
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
|
||||
# to `round-up` fractional indentation is replaced with a single tab character
|
||||
# (utf-8 0x09) effectively shifting the column to the next tabstop
|
||||
fractional_tab_policy = 'use-space'
|
||||
|
||||
# If an argument group contains more than this many sub-groups (parg or kwarg
|
||||
# groups) then force it to a vertical layout.
|
||||
max_subgroups_hwrap = 2
|
||||
|
||||
# If a positional argument group contains more than this many arguments, then
|
||||
# force it to a vertical layout.
|
||||
max_pargs_hwrap = 6
|
||||
|
||||
# If a cmdline positional group consumes more than this many lines without
|
||||
# nesting, then invalidate the layout (and nest)
|
||||
max_rows_cmdline = 2
|
||||
|
||||
# If true, separate flow control names from their parentheses with a space
|
||||
separate_ctrl_name_with_space = False
|
||||
|
||||
# If true, separate function names from parentheses with a space
|
||||
separate_fn_name_with_space = False
|
||||
|
||||
# If a statement is wrapped to more than one line, than dangle the closing
|
||||
# parenthesis on its own line.
|
||||
dangle_parens = True
|
||||
|
||||
# If the trailing parenthesis must be 'dangled' on its on line, then align it
|
||||
# to this reference: `prefix`: the start of the statement, `prefix-indent`:
|
||||
# the start of the statement, plus one indentation level, `child`: align to
|
||||
# the column of the arguments
|
||||
dangle_align = 'prefix'
|
||||
|
||||
# If the statement spelling length (including space and parenthesis) is
|
||||
# smaller than this amount, then force reject nested layouts.
|
||||
min_prefix_chars = 4
|
||||
|
||||
# If the statement spelling length (including space and parenthesis) is larger
|
||||
# than the tab width by more than this amount, then force reject un-nested
|
||||
# layouts.
|
||||
max_prefix_chars = 10
|
||||
|
||||
# If a candidate layout is wrapped horizontally but it exceeds this many
|
||||
# lines, then reject the layout.
|
||||
max_lines_hwrap = 2
|
||||
|
||||
# What style line endings to use in the output.
|
||||
line_ending = 'unix'
|
||||
|
||||
# Format command names consistently as 'lower' or 'upper' case
|
||||
command_case = 'lower'
|
||||
|
||||
# Format keywords consistently as 'lower' or 'upper' case
|
||||
keyword_case = 'upper'
|
||||
|
||||
# A list of command names which should always be wrapped
|
||||
always_wrap = []
|
||||
|
||||
# If true, the argument lists which are known to be sortable will be sorted
|
||||
# lexicographicall
|
||||
enable_sort = True
|
||||
|
||||
# If true, the parsers may infer whether or not an argument list is sortable
|
||||
# (without annotation).
|
||||
autosort = False
|
||||
|
||||
# By default, if cmake-format cannot successfully fit everything into the
|
||||
# desired linewidth it will apply the last, most agressive attempt that it
|
||||
# made. If this flag is True, however, cmake-format will print error, exit
|
||||
# with non-zero status code, and write-out nothing
|
||||
require_valid_layout = False
|
||||
|
||||
# A dictionary mapping layout nodes to a list of wrap decisions. See the
|
||||
# documentation for more information.
|
||||
layout_passes = {}
|
||||
|
||||
# ------------------------------------------------
|
||||
# Options affecting comment reflow and formatting.
|
||||
# ------------------------------------------------
|
||||
with section("markup"):
|
||||
|
||||
# What character to use for bulleted lists
|
||||
bullet_char = '*'
|
||||
|
||||
# What character to use as punctuation after numerals in an enumerated list
|
||||
enum_char = '.'
|
||||
|
||||
# If comment markup is enabled, don't reflow the first comment block in each
|
||||
# listfile. Use this to preserve formatting of your copyright/license
|
||||
# statements.
|
||||
first_comment_is_literal = False
|
||||
|
||||
# If comment markup is enabled, don't reflow any comment block which matches
|
||||
# this (regex) pattern. Default is `None` (disabled).
|
||||
literal_comment_pattern = None
|
||||
|
||||
# Regular expression to match preformat fences in comments default=
|
||||
# ``r'^\s*([`~]{3}[`~]*)(.*)$'``
|
||||
fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'
|
||||
|
||||
# Regular expression to match rulers in comments default=
|
||||
# ``r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'``
|
||||
ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'
|
||||
|
||||
# If a comment line matches starts with this pattern then it is explicitly a
|
||||
# trailing comment for the preceeding argument. Default is '#<'
|
||||
explicit_trailing_pattern = '#<'
|
||||
|
||||
# If a comment line starts with at least this many consecutive hash
|
||||
# characters, then don't lstrip() them off. This allows for lazy hash rulers
|
||||
# where the first hash char is not separated by space
|
||||
hashruler_min_length = 10
|
||||
|
||||
# If true, then insert a space between the first hash char and remaining hash
|
||||
# chars in a hash ruler, and normalize its length to fill the column
|
||||
canonicalize_hashrulers = True
|
||||
|
||||
# enable comment markup parsing and reflow
|
||||
enable_markup = False
|
||||
|
||||
# ----------------------------
|
||||
# Options affecting the linter
|
||||
# ----------------------------
|
||||
with section("lint"):
|
||||
|
||||
# a list of lint codes to disable
|
||||
disabled_codes = []
|
||||
|
||||
# regular expression pattern describing valid function names
|
||||
function_pattern = '[0-9A-Za-z_]+'
|
||||
|
||||
# regular expression pattern describing valid macro names
|
||||
macro_pattern = '[0-9a-z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with global
|
||||
# (cache) scope
|
||||
global_var_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with global
|
||||
# scope (but internal semantic)
|
||||
internal_var_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for variables with local
|
||||
# scope
|
||||
local_var_pattern = '[_A-Za-z][A-Za-z0-9_]+'
|
||||
|
||||
# regular expression pattern describing valid names for privatedirectory
|
||||
# variables
|
||||
private_var_pattern = '[0-9a-z_]+'
|
||||
|
||||
# regular expression pattern describing valid names for public directory
|
||||
# variables
|
||||
public_var_pattern = '.*'
|
||||
|
||||
# regular expression pattern describing valid names for function/macro
|
||||
# arguments and loop variables.
|
||||
argument_var_pattern = '[a-z_][a-z0-9_]+'
|
||||
|
||||
# regular expression pattern describing valid names for keywords used in
|
||||
# functions or macros
|
||||
keyword_pattern = '[A-Z][0-9A-Z_]+'
|
||||
|
||||
# In the heuristic for C0201, how many conditionals to match within a loop in
|
||||
# before considering the loop a parser.
|
||||
max_conditionals_custom_parser = 2
|
||||
|
||||
# Require at least this many newlines between statements
|
||||
min_statement_spacing = 1
|
||||
|
||||
# Require no more than this many newlines between statements
|
||||
max_statement_spacing = 2
|
||||
max_returns = 6
|
||||
max_branches = 15
|
||||
max_arguments = 10
|
||||
max_localvars = 15
|
||||
max_statements = 50
|
||||
|
||||
# -------------------------------
|
||||
# Options affecting file encoding
|
||||
# -------------------------------
|
||||
with section("encode"):
|
||||
|
||||
# If true, emit the unicode byte-order mark (BOM) at the start of the file
|
||||
emit_byteorder_mark = False
|
||||
|
||||
# Specify the encoding of the input file. Defaults to utf-8
|
||||
input_encoding = 'utf-8'
|
||||
|
||||
# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
|
||||
# only claims to support utf-8 so be careful when using anything else
|
||||
output_encoding = 'utf-8'
|
||||
|
||||
# -------------------------------------
|
||||
# Miscellaneous configurations options.
|
||||
# -------------------------------------
|
||||
with section("misc"):
|
||||
|
||||
# A dictionary containing any per-command configuration overrides. Currently
|
||||
# only `command_case` is supported.
|
||||
per_command = {}
|
||||
6
3rdparty/kddockwidgets/.codespellrc
vendored
Normal file
6
3rdparty/kddockwidgets/.codespellrc
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[codespell]
|
||||
skip = ./build-*,.git,./src/3rdparty,*.svg,rc_assets.py,./src/flutter/generated*
|
||||
interactive = 3
|
||||
ignore-words-list = overlayed
|
||||
#ignore camelCase, regardless. also mixed case words with correct spelling
|
||||
ignore-regex = \b([a-z]+[A-Z0-9][a-z0-9]*|nam|NAM|LOD|lod|NumberT|NNeeded|AccessorT|LIGHTYEAR|.*_L1)\b
|
||||
38
3rdparty/kddockwidgets/.devcontainer/Dockerfile
vendored
Normal file
38
3rdparty/kddockwidgets/.devcontainer/Dockerfile
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# A minimal Dockerfile that's able to build and run KDDW tests.
|
||||
# Tests are run with offscreen QPA
|
||||
# This Dockerfile is just provided for demonstration purposes and not really used by CI.
|
||||
|
||||
# Instructions:
|
||||
# docker build -t kddw-tests .
|
||||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ -v ~/Qt/5.15.2/gcc_64/:/Qt5/ -v ~/Qt/6.6.0/gcc_64/:/Qt6/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit nofile=1024:4096 -u 1000:1000 kddw-tests
|
||||
# cd /kddockwidgets/
|
||||
# cmake --preset=dev
|
||||
# cd build-dev && ninja
|
||||
# QT_QUICK_BACKEND=software ctest -j12
|
||||
|
||||
FROM ubuntu:24.04
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
ENV LC_CTYPE=C.UTF-8
|
||||
ENV PATH=$PATH:/Qt5/bin/:/Qt6/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt5/lib/:/Qt6/lib/
|
||||
ENV QT_QUICK_BACKEND=software
|
||||
ENV LSAN_OPTIONS=detect_leaks=0
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt update -qq && apt install build-essential software-properties-common lld git cmake ninja-build \
|
||||
mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig \
|
||||
libxkbcommon-dev mesa-utils libgl1-mesa-dev libglu1-mesa-dev \
|
||||
vim clang-tidy-14 valgrind pip libxslt-dev llvm libspdlog-dev clazy clang -y
|
||||
42
3rdparty/kddockwidgets/.devcontainer/Dockerfile_python
vendored
Normal file
42
3rdparty/kddockwidgets/.devcontainer/Dockerfile_python
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# A minimal Dockerfile that's able to build KDDW Python support
|
||||
|
||||
# Instructions:
|
||||
# docker build -t kddw-python .
|
||||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ -v ~/Qt/5.15.2/gcc_64/:/Qt5/ -v ~/Qt/6.6.0/gcc_64/:/Qt6/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit nofile=1024:4096 -u 1000:1000 kddw-python
|
||||
# cd /kddockwidgets/
|
||||
|
||||
FROM ubuntu:22.04
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
ENV LC_CTYPE=C.UTF-8
|
||||
ENV PATH=$PATH:/Qt5/bin/:/Qt6/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt5/lib/:/Qt6/lib/
|
||||
ENV QT_QUICK_BACKEND=software
|
||||
ENV LSAN_OPTIONS=detect_leaks=0
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt update -qq && apt install build-essential software-properties-common lld git cmake ninja-build \
|
||||
mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig \
|
||||
libxkbcommon-dev mesa-utils libgl1-mesa-dev libglu1-mesa-dev \
|
||||
vim clang-tidy-14 valgrind pip libxslt-dev llvm libspdlog-dev clazy clang -y
|
||||
|
||||
RUN pip install shiboken6-generator==6.6.0 shiboken6==6.6.0 pyside6==6.6.0
|
||||
|
||||
RUN pip install --index-url=https://download.qt.io/official_releases/QtForPython \
|
||||
--trusted-host download.qt.io shiboken2-generator==5.15.2.1 shiboken2==5.15.2.1 pyside2==5.15.2.1
|
||||
|
||||
RUN mkdir /home/user && \
|
||||
groupadd -g 1000 defaultgroup && \
|
||||
useradd -u 1000 -g defaultgroup user -m && chown -R user /home/user
|
||||
35
3rdparty/kddockwidgets/.devcontainer/devcontainer.json
vendored
Normal file
35
3rdparty/kddockwidgets/.devcontainer/devcontainer.json
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "kddw-tests",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"runArgs": [
|
||||
"--cap-add=SYS_PTRACE",
|
||||
"--security-opt",
|
||||
"seccomp=unconfined",
|
||||
"--ulimit",
|
||||
"nofile=1024:4096"
|
||||
],
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/,target=/kddockwidgets/,type=bind",
|
||||
"workspaceFolder": "/kddockwidgets",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"vadimcn.vscode-lldb",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"mhutchie.git-graph",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"ms-vscode.cmake-tools"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"workbench.colorTheme": "Visual Studio Light"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
"source=${localEnv:HOME}/Qt/5.15.2/gcc_64/,target=/Qt5/,type=bind",
|
||||
"source=${localEnv:HOME}/Qt/6.6.0/gcc_64/,target=/Qt6/,type=bind"
|
||||
],
|
||||
"remoteUser": "user"
|
||||
}
|
||||
3
3rdparty/kddockwidgets/.editorconfig
vendored
Normal file
3
3rdparty/kddockwidgets/.editorconfig
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[*.sh]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
22
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile
vendored
Normal file
22
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# Dockerfile for qt6-asan GitHub Action
|
||||
|
||||
FROM iamsergio/kddw-qt6-asan
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV PATH=$PATH:/Qt6/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt6/lib/
|
||||
ENV QT_QUICK_BACKEND=software
|
||||
ENV LSAN_OPTIONS=detect_leaks=0
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
73
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile_qtasan
vendored
Normal file
73
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile_qtasan
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# Dockerfile for qt6-asan GitHub Action
|
||||
|
||||
# Instructions for manual inspection:
|
||||
# docker build -t kddw-qt6-asan .
|
||||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ kddw-qt6-asan
|
||||
# cd /kddockwidgets/
|
||||
# cmake --preset=dev-asan6
|
||||
# cd build-dev-asan6 && ninja
|
||||
# ctest -j12
|
||||
|
||||
# To prepare an image for GitHub actions we import and export to remove layers
|
||||
# so the image occupies less space:
|
||||
# docker build -t kddw-qt6-asan .
|
||||
# docker run -it kddw-qt6-asan # and exit
|
||||
# docker ps # to check sha
|
||||
# docker export -o mycontainer.tar <container_sha>
|
||||
# docker import mycontainer.tar
|
||||
# docker images # to check sha
|
||||
# docker tag <image_sha> iamsergio/kddw-qt6-asan
|
||||
# docker push iamsergio/kddw-qt6-asan
|
||||
|
||||
FROM ubuntu:24.04
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
ENV LC_CTYPE=C.UTF-8
|
||||
ENV PATH=$PATH:/Qt6/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt6/lib/
|
||||
ENV QT_QUICK_BACKEND=software
|
||||
ENV LSAN_OPTIONS=detect_leaks=0
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt update
|
||||
RUN apt install build-essential software-properties-common lld git cmake ninja-build \
|
||||
mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig \
|
||||
libxkbcommon-dev mesa-utils libgl1-mesa-dev libglu1-mesa-dev \
|
||||
libxslt-dev libspdlog-dev -y
|
||||
|
||||
RUN mkdir /sources/
|
||||
|
||||
RUN git clone https://code.qt.io/qt/qt5.git /sources/qt6
|
||||
RUN cd /sources/qt6 && git switch 6.6 && perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative
|
||||
|
||||
# Build qtbase first, so we can delete its build dir to save space, as GitHub has storage limits
|
||||
RUN mkdir /build/ && cd /build/ && /sources/qt6/qtbase/configure -prefix /Qt6/ -debug -sanitize address -- -DQT_BUILD_EXAMPLES=OFF
|
||||
RUN cmake --build /build/ --parallel
|
||||
RUN cmake --install /build/
|
||||
RUN rm -rf /build/
|
||||
|
||||
# qtshadertools
|
||||
RUN mkdir /build/ && cd /build/ && qt-cmake -G Ninja /sources/qt6/qtshadertools/
|
||||
RUN cmake --build /build/ --parallel
|
||||
RUN cmake --install /build/
|
||||
RUN rm -rf /build/
|
||||
|
||||
# qtdeclarative
|
||||
RUN mkdir /build/ && cd /build/ && qt-cmake -G Ninja /sources/qt6/qtdeclarative/
|
||||
RUN cmake --build /build/ --parallel
|
||||
RUN cmake --install /build/
|
||||
RUN rm -rf /build/
|
||||
|
||||
RUN rm -rf /sources/
|
||||
4
3rdparty/kddockwidgets/.github/actions/qt6-asan/README.md
vendored
Normal file
4
3rdparty/kddockwidgets/.github/actions/qt6-asan/README.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# qt6-asan
|
||||
|
||||
An action that builds and runs KDDW's tests against an ASAN build of Qt itself.
|
||||
The Dockerfile clones and builds Qt6 with ASAN.
|
||||
9
3rdparty/kddockwidgets/.github/actions/qt6-asan/action.yml
vendored
Normal file
9
3rdparty/kddockwidgets/.github/actions/qt6-asan/action.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: 'build-against-qt6-asan'
|
||||
description: 'Builds and runs KDDW tests against a Qt6 built with ASAN/UBSAN'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
8
3rdparty/kddockwidgets/.github/actions/qt6-asan/entrypoint.sh
vendored
Executable file
8
3rdparty/kddockwidgets/.github/actions/qt6-asan/entrypoint.sh
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
cd /github/workspace/ || exit 1
|
||||
env
|
||||
cmake --preset=ci-dev-asan-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qt6/ && ninja && ctest -j4 --output-on-failure
|
||||
22
3rdparty/kddockwidgets/.github/actions/qt6-lsan/Dockerfile
vendored
Normal file
22
3rdparty/kddockwidgets/.github/actions/qt6-lsan/Dockerfile
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# Dockerfile for qt6-asan GitHub Action
|
||||
|
||||
FROM iamsergio/kddw-qt6-asan
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV PATH=$PATH:/Qt6/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt6/lib/
|
||||
ENV QT_QUICK_BACKEND=software
|
||||
ENV LSAN_OPTIONS=detect_leaks=1
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
4
3rdparty/kddockwidgets/.github/actions/qt6-lsan/README.md
vendored
Normal file
4
3rdparty/kddockwidgets/.github/actions/qt6-lsan/README.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# qt6-asan
|
||||
|
||||
An action that builds and runs KDDW's tests against an LSAN build
|
||||
The Dockerfile clones and builds Qt6 with ASAN.
|
||||
9
3rdparty/kddockwidgets/.github/actions/qt6-lsan/action.yml
vendored
Normal file
9
3rdparty/kddockwidgets/.github/actions/qt6-lsan/action.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: 'build-against-qt6-lsan'
|
||||
description: 'Builds and runs KDDW tests against a Qt6 built with LSAN'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
9
3rdparty/kddockwidgets/.github/actions/qt6-lsan/entrypoint.sh
vendored
Executable file
9
3rdparty/kddockwidgets/.github/actions/qt6-lsan/entrypoint.sh
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
cd /github/workspace/ || exit 1
|
||||
env
|
||||
cmake --preset=ci-dev-asan-qtwidgets-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qtwidgets-qt6/ && ninja && ctest -j4 --output-on-failure && cd .. &&
|
||||
cmake --preset=ci-dev-asan-qtquick-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qtquick-qt6/ && ninja && ctest -j4 --output-on-failure
|
||||
59
3rdparty/kddockwidgets/.github/workflows/asan5.yml
vendored
Normal file
59
3rdparty/kddockwidgets/.github/workflows/asan5.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Nightly ASAN Qt5
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
preset:
|
||||
- name: ci-dev-asan-qt5
|
||||
qt_version: "5.15"
|
||||
|
||||
steps:
|
||||
- name: Install Qt ${{ matrix.preset.qt_version }}
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{ matrix.preset.qt_version }}
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install lld libspdlog-dev ninja-build -y
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure project
|
||||
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
|
||||
|
||||
- name: Build Project ${{ matrix.preset.build_preset_arg }}
|
||||
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
|
||||
|
||||
- name: Fix ASAN on ubuntu 22.04
|
||||
run: |
|
||||
sudo sysctl vm.mmap_rnd_bits=28
|
||||
sudo sysctl vm.mmap_rnd_compat_bits=8
|
||||
|
||||
- name: Run tests on Linux (offscreen)
|
||||
run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
|
||||
env:
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
QT_QUICK_BACKEND: software
|
||||
LSAN_OPTIONS: detect_leaks=0
|
||||
|
||||
- name: Read tests log when it fails
|
||||
uses: andstor/file-reader-action@v1
|
||||
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }}
|
||||
with:
|
||||
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log"
|
||||
124
3rdparty/kddockwidgets/.github/workflows/build.yml
vendored
Normal file
124
3rdparty/kddockwidgets/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
# These are built by another workflow
|
||||
- src/flutter/**
|
||||
- tests/flutter/**
|
||||
- examples/flutter/**
|
||||
- tests/reference-images/**
|
||||
- .github/workflows/create_release.yml
|
||||
- .github/workflows/examples.yml
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-13
|
||||
|
||||
preset:
|
||||
- name: ci-dev-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-release-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-qtwidgets-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-qtquick-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-dev-qt6
|
||||
qt_version: "6.3.*"
|
||||
- name: ci-release-qt6
|
||||
qt_version: "6.3.*"
|
||||
- name: ci-qtwidgets-qt6
|
||||
qt_version: "6.3.*"
|
||||
- name: ci-qtquick-qt6
|
||||
qt_version: "6.3.*"
|
||||
- name: ci-dev-static-qt6
|
||||
qt_version: "6.3.*"
|
||||
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
preset:
|
||||
name: ci-python-qt6
|
||||
qt_version: "6.6.0"
|
||||
detect_leaks: 0
|
||||
apt_pgks:
|
||||
- llvm
|
||||
pip_pgks:
|
||||
- shiboken6-generator==6.6.0 pyside6==6.6.0
|
||||
|
||||
steps:
|
||||
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{ matrix.preset.qt_version }}
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies on Ubuntu (${{ join(matrix.preset.apt_pgks, ' ') }})
|
||||
if: ${{ runner.os == 'Linux' && matrix.preset.apt_pgks }}
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
echo ${{ join(matrix.preset.apt_pgks, ' ') }} | xargs sudo apt install -y
|
||||
|
||||
# Not using apt_pgks, since spdlog is needed for all configurations:
|
||||
- name: Install spdlog on Ubuntu
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
sudo apt install libspdlog-dev -y
|
||||
|
||||
- name: Install Python dependencies (${{ join(matrix.preset.pip_pgks, ' ') }})
|
||||
if: ${{ matrix.preset.pip_pgks }}
|
||||
run: echo ${{ join(matrix.preset.pip_pgks, ' ') }} | xargs pip install
|
||||
|
||||
- name: Install ninja-build tool (must be after Qt due PATH changes)
|
||||
uses: turtlesec-no/get-ninja@main
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Make sure MSVC is found when Ninja generator is in use
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure project
|
||||
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }} -DCMAKE_INSTALL_PREFIX=install
|
||||
|
||||
- name: Build Project ${{ matrix.preset.build_preset_arg }}
|
||||
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
|
||||
|
||||
- name: Install
|
||||
run: cmake --build ./build-${{ matrix.preset.name }} --target install
|
||||
|
||||
- name: Run tests on Linux
|
||||
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }}
|
||||
run: ctest --test-dir ./build-${{ matrix.preset.name }} --verbose
|
||||
env:
|
||||
QT_QUICK_BACKEND: software
|
||||
LSAN_OPTIONS: detect_leaks=${{ matrix.preset.detect_leaks }}
|
||||
|
||||
- name: Run tests on Window/macOS
|
||||
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os != 'Linux' }}
|
||||
run: ctest --test-dir ./build-${{ matrix.preset.name }} --verbose
|
||||
|
||||
- name: Read tests log when it fails
|
||||
uses: andstor/file-reader-action@v1
|
||||
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }}
|
||||
with:
|
||||
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log"
|
||||
48
3rdparty/kddockwidgets/.github/workflows/create_release.yml
vendored
Normal file
48
3rdparty/kddockwidgets/.github/workflows/create_release.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Create release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
sha1:
|
||||
type: string
|
||||
required: true
|
||||
description: "sha1 to be tagged"
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: "Desired numeric version (without any prefix/suffix)"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
create_release:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout CI tools
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: KDABLabs/ci-release-tools
|
||||
path: ci-release-tools
|
||||
ref: main
|
||||
|
||||
- name: Setup git author name
|
||||
run: |
|
||||
git config --global user.email "github_actions@kdab"
|
||||
git config --global user.name "KDAB GitHub Actions"
|
||||
|
||||
- name: Create release
|
||||
run: |
|
||||
python3 ci-release-tools/src/create_release.py --repo KDDockWidgets --version ${{ github.event.inputs.version }} --sha1 ${{ github.event.inputs.sha1 }} --repo-path .
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
83
3rdparty/kddockwidgets/.github/workflows/examples.yml
vendored
Normal file
83
3rdparty/kddockwidgets/.github/workflows/examples.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Examples and installed headers
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
paths-ignore:
|
||||
- .github/workflows/create_release.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- windows-2022
|
||||
- macos-13
|
||||
preset:
|
||||
- release
|
||||
- ci-release-static-qt5
|
||||
steps:
|
||||
- name: Install Qt 5.15 with options and default aqtversion
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 5.15
|
||||
cache: true
|
||||
|
||||
- name: Make sure MSVC is found when Ninja generator is in use
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Install lld linker
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install lld -y
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install ninja
|
||||
uses: turtlesec-no/get-ninja@main
|
||||
|
||||
- name: Configure
|
||||
run: cmake --preset=${{ matrix.preset }} -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed/ -DKDDockWidgets_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build-${{ matrix.preset }} --parallel
|
||||
|
||||
- name: Install
|
||||
run: cmake --install build-${{ matrix.preset }}
|
||||
|
||||
- name: Build examples
|
||||
run: |
|
||||
cd examples
|
||||
cmake -G Ninja -S dockwidgets/ -B dockwidgets/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S mdi/ -B mdi/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S minimal/ -B minimal/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S mdi_with_docking/ -B mdi_with_docking/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S qtquick/dockwidgets/ -B qtquick/dockwidgets/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S qtquick/customseparator/ -B qtquick/customseparator/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S qtquick/customtabbar/ -B qtquick/customtabbar/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S qtquick/customtitlebar/ -B qtquick/customtitlebar/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake -G Ninja -S qtquick/mdi/ -B qtquick/mdi/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
|
||||
cmake --build dockwidgets/b
|
||||
cmake --build mdi/b
|
||||
cmake --build minimal/b
|
||||
cmake --build mdi_with_docking/b
|
||||
cmake --build qtquick/dockwidgets/b
|
||||
cmake --build qtquick/customseparator/b
|
||||
cmake --build qtquick/customtabbar/b
|
||||
cmake --build qtquick/mdi/b
|
||||
49
3rdparty/kddockwidgets/.github/workflows/external-3rdparty-build.yml
vendored
Normal file
49
3rdparty/kddockwidgets/.github/workflows/external-3rdparty-build.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Build against external nlohmann and KDBindings
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- name: Install Qt 6.7.2
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 6.7.2
|
||||
cache: true
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
brew install nlohmann-json
|
||||
brew tap KDAB/tap
|
||||
brew install KDBindings
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# deleting 3rdparty is an easy way to make sure external worked
|
||||
- name: Delete internal 3rdparty
|
||||
run: |
|
||||
rm -rf src/3rdparty/nlohmann/
|
||||
rm -rf src/3rdparty/kdbindings/
|
||||
|
||||
- name: Configure
|
||||
run: cmake -S . --preset dev6 -DKDDockWidgets_WERROR=OFF
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ./build-dev6
|
||||
|
||||
- name: Run tests on macOS
|
||||
run: ctest --test-dir ./build-dev6 --verbose
|
||||
106
3rdparty/kddockwidgets/.github/workflows/flutter-dev.yml
vendored
Normal file
106
3rdparty/kddockwidgets/.github/workflows/flutter-dev.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Builds the flutter frontend and runs tests
|
||||
|
||||
name: Flutter-dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
paths-ignore:
|
||||
- .github/workflows/create_release.yml
|
||||
- .github/workflows/examples.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
preset:
|
||||
- name: dev-flutter
|
||||
isAOT: false
|
||||
args: []
|
||||
# - name: dev-flutter-asan
|
||||
# isAOT: false
|
||||
# args: ["--asan"]
|
||||
# - name: dev-flutter-aot
|
||||
# isAOT: true
|
||||
# args: ["--aot"]
|
||||
# - name: dev-flutter-aot-asan
|
||||
# isAOT: true
|
||||
# args: ["--aot", "--asan"]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
token: ${{ secrets.PAT_KDDW_REFERENCE_SCREENSHOTS }}
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install libgtk-3-dev libglib2.0-dev ninja-build libspdlog-dev lld xvfb -y
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.x"
|
||||
channel: "stable"
|
||||
|
||||
- name: Configure project ${{ matrix.preset.name }}
|
||||
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
|
||||
|
||||
- name: Build Project ${{ matrix.preset.name }}
|
||||
run: cmake --build ./build-${{ matrix.preset.name }}
|
||||
|
||||
- name: Build the example
|
||||
run: |
|
||||
cd examples/flutter
|
||||
flutter build linux
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd ${{ github.workspace }}/src/flutter/dart
|
||||
flutter pub get
|
||||
flutter test
|
||||
env:
|
||||
KDDW_BINDINGS_LIB: ${{ github.workspace }}/build-dev-flutter/lib/libkddockwidgets.so
|
||||
|
||||
- name: Setup git author name
|
||||
run: |
|
||||
git config --global user.email "kddw@actions"
|
||||
git config --global user.name "KDDW Actions"
|
||||
|
||||
# the reference is always latest main, as submodule sha1 might be lagging
|
||||
# as it's updated nightly
|
||||
- name: checkout latest main of ref images
|
||||
run: |
|
||||
cd tests/reference-images
|
||||
git checkout main
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
cd tests/flutter/
|
||||
flutter pub get
|
||||
xvfb-run flutter test -d linux integration_test/ui_test.dart
|
||||
env:
|
||||
KDDW_BINDINGS_LIB: ${{ github.workspace }}/build-dev-flutter/lib/libkddockwidgets.so
|
||||
|
||||
- name: Compare against reference images
|
||||
shell: bash
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
./tests/reference-images/compare_images.sh
|
||||
env:
|
||||
PAT: ${{ secrets.PAT_KDDW_REFERENCE_SCREENSHOTS }}
|
||||
GITHUB_EVENT_PATH: ${{ github.event_path }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
51
3rdparty/kddockwidgets/.github/workflows/flutter-pub-update.yml
vendored
Normal file
51
3rdparty/kddockwidgets/.github/workflows/flutter-pub-update.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# On demand flutter action to trigger flutter pub upgrade
|
||||
|
||||
name: (Scheduled) Runs flutter pub upgrade
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *" # monthly
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "main" # always main branch
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install wget curl file unzip zip xz-utils -y
|
||||
|
||||
- name: Install Flutter SDK
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.x"
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup git author name
|
||||
uses: fregante/setup-git-user@v2
|
||||
|
||||
- name: pub upgrade on examples
|
||||
run: |
|
||||
cd examples/flutter
|
||||
flutter pub upgrade --major-versions
|
||||
|
||||
- name: pub upgrade on src/flutter/dart
|
||||
run: |
|
||||
cd src/flutter/dart
|
||||
flutter pub upgrade --major-versions
|
||||
|
||||
- name: Create PR
|
||||
run: sh src/flutter/create_pub_upgrade_pr.sh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
42
3rdparty/kddockwidgets/.github/workflows/flutter-ref-images-bump.yml
vendored
Normal file
42
3rdparty/kddockwidgets/.github/workflows/flutter-ref-images-bump.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
#
|
||||
#
|
||||
name: Nighly bump tests/reference-images submodule
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup git author name
|
||||
run: |
|
||||
git config --global user.email "kddw@actions"
|
||||
git config --global user.name "KDDW Actions"
|
||||
|
||||
- name: bump submodule
|
||||
run: |
|
||||
cd tests/reference-images/
|
||||
git checkout main
|
||||
cd ../..
|
||||
git add tests/reference-images/
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
BRANCH_NAME=update/ref-images/`git rev-parse HEAD`
|
||||
git checkout -B $BRANCH_NAME
|
||||
git commit -m "Bump tests/reference-images/"
|
||||
git push origin $BRANCH_NAME
|
||||
gh pr create --base main --title "Bump tests/reference-images/" --body "Automatically created via GH actions."
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
74
3rdparty/kddockwidgets/.github/workflows/flutter-rel.yml
vendored
Normal file
74
3rdparty/kddockwidgets/.github/workflows/flutter-rel.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Builds the flutter frontend
|
||||
|
||||
name: Flutter-rel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
paths-ignore:
|
||||
- .github/workflows/create_release.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-13
|
||||
|
||||
preset:
|
||||
- name: release-flutter
|
||||
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
flutter_os: "linux"
|
||||
- os: windows-latest
|
||||
flutter_os: "windows"
|
||||
- os: macos-13
|
||||
flutter_os: "macos"
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install libgtk-3-dev libglib2.0-dev -y
|
||||
|
||||
- name: Install ninja
|
||||
uses: turtlesec-no/get-ninja@main
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.x"
|
||||
channel: "stable"
|
||||
|
||||
- name: MSVC into PATH
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure project
|
||||
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
|
||||
|
||||
- name: Build Project ${{ matrix.preset.build_preset_arg }}
|
||||
run: cmake --build ./build-${{ matrix.preset.name }}
|
||||
|
||||
- name: Build the example
|
||||
run: |
|
||||
cd examples/flutter
|
||||
flutter build ${{ matrix.os.flutter_os }}
|
||||
44
3rdparty/kddockwidgets/.github/workflows/layouting.yml
vendored
Normal file
44
3rdparty/kddockwidgets/.github/workflows/layouting.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Layouting library
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
paths-ignore:
|
||||
- .github/workflows/create_release.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- windows-2022
|
||||
- macos-13
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install ninja
|
||||
uses: turtlesec-no/get-ninja@main
|
||||
|
||||
- name: Make sure MSVC is found when Ninja generator is in use
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure
|
||||
run: cmake --preset=dev-none
|
||||
|
||||
- name: Build from top-level
|
||||
run: cmake --build build-dev-none --parallel
|
||||
61
3rdparty/kddockwidgets/.github/workflows/mdbook.yml
vendored
Normal file
61
3rdparty/kddockwidgets/.github/workflows/mdbook.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Deploy mdBook site to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths-ignore:
|
||||
- .github/workflows/create_release.yml
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MDBOOK_VERSION: 0.4.21
|
||||
steps:
|
||||
- name: Set up Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install mdBook
|
||||
run: |
|
||||
cargo install --version ${MDBOOK_VERSION} mdbook
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Build with mdBook
|
||||
run: mdbook build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
path: ./book
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
104
3rdparty/kddockwidgets/.github/workflows/nightly.yml
vendored
Normal file
104
3rdparty/kddockwidgets/.github/workflows/nightly.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Nightly Misc
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- windows-2022
|
||||
- windows-2019
|
||||
- macos-13
|
||||
|
||||
preset:
|
||||
- name: ci-release-static-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-dev-static-qt5
|
||||
qt_version: "5.15"
|
||||
- name: ci-python-qt6
|
||||
qt_version: "6.6.0"
|
||||
- name: ci-release-static-qt6
|
||||
qt_version: "6.3.*"
|
||||
- name: ci-dev-static-qt6
|
||||
qt_version: "6.3.*"
|
||||
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
preset:
|
||||
name: ci-clang-tidy-qt6
|
||||
qt_version: "6.3.*"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
preset:
|
||||
name: clazy
|
||||
build_preset_arg: '--preset=clazy'
|
||||
qt_version: "5.15"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
preset:
|
||||
name: ci-dev-valgrind-qt5
|
||||
qt_version: "5.15"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
preset:
|
||||
name: ci-dev-valgrind-qt6
|
||||
qt_version: "6.5.*"
|
||||
|
||||
steps:
|
||||
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{ matrix.preset.qt_version }}
|
||||
cache: true
|
||||
|
||||
- name: Install ninja-build tool (must be after Qt due PATH changes)
|
||||
uses: turtlesec-no/get-ninja@main
|
||||
|
||||
- name: Install dependencies on Ubuntu
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install libspdlog-dev lld valgrind clazy llvm -y
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
#with:
|
||||
#ref: '2.0' # schedule.cron do not allow branch setting
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
cache: 'pip'
|
||||
cache-dependency-path: '.github/workflows/pip-requirements.txt'
|
||||
python-version: '3.9'
|
||||
|
||||
- run: pip3.9 install -r .github/workflows/pip-requirements.txt
|
||||
|
||||
- name: Make sure MSVC is found when Ninja generator is in use
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure project
|
||||
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
|
||||
|
||||
# python on windows-2022 has a msvc problem
|
||||
- name: Build Project ${{ matrix.preset.build_preset_arg }}
|
||||
if: ${{ matrix.os != 'windows-2022' || matrix.preset.name != 'ci-python-qt6' }}
|
||||
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
|
||||
|
||||
- name: Run tests on Linux (offscreen)
|
||||
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }}
|
||||
run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
|
||||
env:
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
QT_QUICK_BACKEND: software
|
||||
2
3rdparty/kddockwidgets/.github/workflows/pip-requirements.txt
vendored
Normal file
2
3rdparty/kddockwidgets/.github/workflows/pip-requirements.txt
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
shiboken6-generator == 6.6.0
|
||||
pyside6 == 6.6.0
|
||||
20
3rdparty/kddockwidgets/.github/workflows/pre-commit.yml
vendored
Normal file
20
3rdparty/kddockwidgets/.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
26
3rdparty/kddockwidgets/.github/workflows/qt6-asan.yml
vendored
Normal file
26
3rdparty/kddockwidgets/.github/workflows/qt6-asan.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Nightly Qt6 ASAN build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/qt6-asan
|
||||
23
3rdparty/kddockwidgets/.github/workflows/qt6-lsan.yml
vendored
Normal file
23
3rdparty/kddockwidgets/.github/workflows/qt6-lsan.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Nightly Qt6 LSAN build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/qt6-lsan
|
||||
80
3rdparty/kddockwidgets/.github/workflows/update-3rdparty.yml
vendored
Normal file
80
3rdparty/kddockwidgets/.github/workflows/update-3rdparty.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Nightly 3rdparty update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Install dependencies on Ubuntu
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install rsync -y
|
||||
|
||||
- name: Checkout KDDW
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout KDBindings
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: KDAB/KDBindings
|
||||
path: KDBindings
|
||||
ref: main
|
||||
|
||||
- name: Checkout ci-release-tools
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: KDABLabs/ci-release-tools
|
||||
path: ci-release-tools
|
||||
ref: main
|
||||
|
||||
- name: setup author
|
||||
run: |
|
||||
git config --global user.email "@"
|
||||
git config --global user.name "update-3rdparty (via Github Actions)"
|
||||
|
||||
- name: sync KDBindings
|
||||
run: |
|
||||
rsync -av --delete --exclude sha1.txt ./KDBindings/src/kdbindings/ src/3rdparty/kdbindings/
|
||||
rm src/3rdparty/kdbindings/CMakeLists.txt
|
||||
|
||||
if git diff --quiet src/3rdparty/kdbindings ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
(cd KDBindings/ && git rev-parse HEAD) > src/3rdparty/kdbindings/sha1.txt
|
||||
NEW_BRANCH_NAME=work/bump_kdbindings_`cat src/3rdparty/kdbindings/sha1.txt`
|
||||
cat src/3rdparty/kdbindings/sha1.txt
|
||||
git checkout -B ${NEW_BRANCH_NAME}
|
||||
git add src/3rdparty/kdbindings/
|
||||
git commit -m "Bump 3rdparty/kdbindings"
|
||||
git push origin ${NEW_BRANCH_NAME}
|
||||
gh pr create --title "Bump 3rdparty/kdbindings" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/kdbindings"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: sync nlohmann
|
||||
run: |
|
||||
LATEST_NLOHMANN=`./ci-release-tools/src/gh_utils.py --get-latest-release=nlohmann/json`
|
||||
NEW_BRANCH_NAME=work/bump_nlohmann_${LATEST_NLOHMANN}
|
||||
wget https://github.com/nlohmann/json/releases/download/${LATEST_NLOHMANN}/json.hpp -O src/3rdparty/nlohmann/nlohmann/json.hpp
|
||||
echo $LATEST_NLOHMANN > src/3rdparty/nlohmann/nlohmann/sha1.txt
|
||||
git add src/3rdparty/nlohmann/nlohmann/
|
||||
|
||||
! git diff --staged --quiet || exit 0
|
||||
|
||||
git checkout -B ${NEW_BRANCH_NAME}
|
||||
git add src/3rdparty/nlohmann/
|
||||
git commit -m "Bump 3rdparty/nlohmann"
|
||||
git push origin ${NEW_BRANCH_NAME}
|
||||
gh pr create --title "Bump 3rdparty/nlohmann" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/nlohmann"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
51
3rdparty/kddockwidgets/.github/workflows/valgrind-leakcheck.yml
vendored
Normal file
51
3rdparty/kddockwidgets/.github/workflows/valgrind-leakcheck.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
name: Valgrind qtwidgets_leak_test
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
# These are built by another workflow
|
||||
- src/flutter/**
|
||||
- tests/flutter/**
|
||||
- examples/flutter/**
|
||||
- tests/reference-images/**
|
||||
- .github/workflows/create_release.yml
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 2.2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- name: Install Qt 6.6.0
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: 6.6.0
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install lld ninja-build libspdlog-dev valgrind -y
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure
|
||||
run: cmake --preset=dev6 -DKDDockWidgets_EXAMPLES=OFF
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build-dev6 --parallel
|
||||
|
||||
- name: Run valgrind
|
||||
run: valgrind --leak-check=full --show-leak-kinds=all --gen-suppressions=all --error-exitcode=1 --exit-on-first-error=yes --suppressions=./valgrind.sup ./build-dev6/bin/qtwidgets_leak_test -platform offscreen
|
||||
116
3rdparty/kddockwidgets/.gitignore
vendored
Normal file
116
3rdparty/kddockwidgets/.gitignore
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
/examples/flutter/windows/flutter/ephemeral/
|
||||
/tests/flutter_tests_embedder/flutter_tests_embedder.iml
|
||||
/tests/flutter_tests_embedder/linux/flutter/ephemeral/
|
||||
/tests/flutter_tests_embedder/.metadata
|
||||
/default/
|
||||
docks.qbs.user
|
||||
/release/
|
||||
Makefile
|
||||
*_autogen*
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
/examples/example
|
||||
tst_docks
|
||||
CMakeLists.txt.user*
|
||||
/build
|
||||
/examples/dockwidgets/build/
|
||||
moc_*
|
||||
*.moc
|
||||
*automoc.cpp
|
||||
/bin/
|
||||
*.exp
|
||||
*.lib
|
||||
install_manifest.txt
|
||||
*.exe
|
||||
*.ilk
|
||||
*pdb
|
||||
qrc_*cpp
|
||||
docks_example
|
||||
examples/docks_example.exe.manifest
|
||||
*.ninja
|
||||
resources.qrc.depends
|
||||
.ninja*
|
||||
*backup~
|
||||
*backup.md5~
|
||||
.qmake.stash
|
||||
cmake_install.cmake
|
||||
latex
|
||||
html
|
||||
custom_titlebar
|
||||
libkddockwidgets.so*
|
||||
*.depends
|
||||
kddockwidgets_basic_quick
|
||||
/src/KDDockWidgetsConfig.cmake
|
||||
/src/KDDockWidgetsConfigVersion.cmake
|
||||
build-*
|
||||
/build*
|
||||
/examples/dockwidgets/kddockwidgets_example
|
||||
.cmake
|
||||
CTestTestfile.cmake
|
||||
mylayout.json
|
||||
*.cbp
|
||||
*.pyc
|
||||
/python/examples/rc_assets.py
|
||||
/python/examples-qt6/rc_assets.py
|
||||
*.pri
|
||||
/docks-w
|
||||
kddockwidgets_minimal_example
|
||||
/docs/api/Doxyfile
|
||||
/docs/api/qch/kddockwidgets-api.qch
|
||||
/doxygen.log
|
||||
/kddockwidgets.tag
|
||||
/CMakeDoxyfile.in
|
||||
/CMakeDoxygenDefaults.cmake
|
||||
/Testing
|
||||
/layout_tst*
|
||||
/x64
|
||||
/src/kddockwidgets_version.h
|
||||
*.vcxproj*
|
||||
*.sln
|
||||
*.dir
|
||||
.vscode
|
||||
/.cache
|
||||
/compile_commands.json
|
||||
/site
|
||||
.DS_Store
|
||||
.packages
|
||||
pubspec.lock
|
||||
.dart_tool
|
||||
mjb_rejected_*
|
||||
mjb_rejected_classes.log
|
||||
/examples/flutter/linux/flutter/ephemeral/
|
||||
/examples/flutter/build/
|
||||
.qt
|
||||
/examples/qtquick/customtabbar/qtquick_customtabbar
|
||||
/examples/qtquick/customtitlebar/qtquick_customtitlebar
|
||||
/examples/qtquick/dockwidgets/qtquick_dockwidgets
|
||||
/examples/dockwidgets/qtwidgets_dockwidgets
|
||||
/examples/mdi/qtwidgets_mdi
|
||||
/examples/mdi_with_docking/qtwidgets_mdi_with_docking
|
||||
/examples/minimal/qtwidgets_minimal
|
||||
/.vs
|
||||
/tests/flutter_tests_embedder/build/
|
||||
examples/flutter/savedLayout.json
|
||||
/examples/flutter/layout_tst_*
|
||||
.idea
|
||||
kddockwidgets_example.iml
|
||||
/tests/flutter_tests_embedder/layout_*
|
||||
/src/flutter/dart/build/flutter_assets/
|
||||
/src/flutter/dart/layout_*
|
||||
/CMakeUserPresets.json
|
||||
/src/core/layouting/build/
|
||||
|
||||
# Flutter auto generated files
|
||||
generated_plugin_registrant.cc
|
||||
generated_plugin_registrant.h
|
||||
generated_plugins.cmake
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.metadata
|
||||
/tests/flutter/build/
|
||||
/tests/flutter/macos/Podfile
|
||||
/tests/flutter/macos/Podfile.lock
|
||||
|
||||
/docs/book/book/
|
||||
/book/
|
||||
/src/flutter/dart/build/
|
||||
5
3rdparty/kddockwidgets/.gitmodules
vendored
Normal file
5
3rdparty/kddockwidgets/.gitmodules
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
[submodule "tests/reference-images"]
|
||||
path = tests/reference-images
|
||||
url = https://github.com/KDAB/kddockwidgets-reference-test-screenshots.git
|
||||
update = none
|
||||
ignore = all
|
||||
29
3rdparty/kddockwidgets/.krazy
vendored
Normal file
29
3rdparty/kddockwidgets/.krazy
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
CHECKSETS qt5,c++
|
||||
|
||||
#KDAB-specific checks
|
||||
EXTRA kdabcopyright-reuse,kdabcontactus,fosslicense-reuse
|
||||
|
||||
#additional checks
|
||||
#EXTRA defines,null
|
||||
|
||||
#exclude checks now being done by clazy or clang-tools
|
||||
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,dpointer,inline,postfixop,cpp
|
||||
#exclude spelling as codespell is much, much better tool
|
||||
EXCLUDE spelling
|
||||
#exclude more checks
|
||||
EXCLUDE style
|
||||
|
||||
SKIP /fwd_headers/
|
||||
SKIP /flutter/generated/
|
||||
SKIP Doxyfile.cmake
|
||||
SKIP .markdownlint.json
|
||||
SKIP book/searchindex.json
|
||||
|
||||
SKIP /src/3rdparty/|/examples/qtquick/CMakeFiles/
|
||||
#skip CMake files
|
||||
SKIP /KDDockWidgetsConfig.cmake.in
|
||||
#skip more files
|
||||
SKIP CMakePresets.json
|
||||
SKIP \.cmake-format\.py
|
||||
#skip the borrowed code in the cmake subdir
|
||||
SKIP /cmake/ECM/|/cmake/KDAB/
|
||||
16
3rdparty/kddockwidgets/.markdownlint.json
vendored
Normal file
16
3rdparty/kddockwidgets/.markdownlint.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"default": true,
|
||||
"MD007": {
|
||||
"indent": 2,
|
||||
"start_indented": false
|
||||
},
|
||||
"MD013": {
|
||||
"line_length": 100,
|
||||
"tables": false,
|
||||
"code_blocks": false
|
||||
},
|
||||
"MD029": {
|
||||
"style": "ordered"
|
||||
},
|
||||
"MD033": false
|
||||
}
|
||||
2
3rdparty/kddockwidgets/.pep8
vendored
Normal file
2
3rdparty/kddockwidgets/.pep8
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
[pycodestyle]
|
||||
max_line_length = 120
|
||||
66
3rdparty/kddockwidgets/.pre-commit-config.yaml
vendored
Normal file
66
3rdparty/kddockwidgets/.pre-commit-config.yaml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
ci:
|
||||
skip: [pylint]
|
||||
autoupdate_schedule: monthly
|
||||
|
||||
exclude: ^(cmake/ECM|cmake/KDAB/|src/3rdparty/|code.dev.code-workspace)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
- id: check-xml
|
||||
- id: check-yaml
|
||||
args: [--allow-multiple-documents]
|
||||
- id: check-json
|
||||
- id: check-symlinks
|
||||
- id: destroyed-symlinks
|
||||
- id: check-executables-have-shebangs
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v19.1.4
|
||||
hooks:
|
||||
- id: clang-format
|
||||
exclude: (.json)
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: v3.3.2
|
||||
hooks:
|
||||
- id: pylint
|
||||
exclude: ^(.cmake-format.py|conan/conanfile.py)
|
||||
additional_dependencies: ["PySide6"]
|
||||
- repo: https://github.com/hhatto/autopep8
|
||||
rev: v2.3.1
|
||||
hooks:
|
||||
- id: autopep8
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||
rev: v0.6.13
|
||||
hooks:
|
||||
- id: cmake-lint
|
||||
exclude: (.py.cmake|Doxyfile.cmake|examples/flutter/|tests/flutter/)
|
||||
- id: cmake-format
|
||||
exclude: (.py.cmake|Doxyfile.cmake|examples/flutter/|tests/flutter/)
|
||||
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
||||
rev: v0.15.0
|
||||
hooks:
|
||||
- id: markdownlint-cli2
|
||||
files: \.(md|mdown|markdown)$
|
||||
exclude: (docs/book/)
|
||||
- repo: https://github.com/fsfe/reuse-tool
|
||||
rev: v5.0.2
|
||||
hooks:
|
||||
- id: reuse
|
||||
- repo: https://github.com/scop/pre-commit-shfmt
|
||||
rev: v3.10.0-2
|
||||
hooks:
|
||||
- id: shfmt
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.10.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
596
3rdparty/kddockwidgets/.pylintrc
vendored
Normal file
596
3rdparty/kddockwidgets/.pylintrc
vendored
Normal file
@@ -0,0 +1,596 @@
|
||||
[MASTER]
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=10.0
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=rc_assets.py
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use.
|
||||
jobs=1
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python module names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
|
||||
confidence=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=print-statement,
|
||||
parameter-unpacking,
|
||||
unpacking-in-except,
|
||||
old-raise-syntax,
|
||||
backtick,
|
||||
long-suffix,
|
||||
old-ne-operator,
|
||||
old-octal-literal,
|
||||
import-star-module-level,
|
||||
non-ascii-bytes-literal,
|
||||
raw-checker-failed,
|
||||
bad-inline-option,
|
||||
locally-disabled,
|
||||
file-ignored,
|
||||
suppressed-message,
|
||||
useless-suppression,
|
||||
deprecated-pragma,
|
||||
use-symbolic-message-instead,
|
||||
apply-builtin,
|
||||
basestring-builtin,
|
||||
buffer-builtin,
|
||||
cmp-builtin,
|
||||
coerce-builtin,
|
||||
execfile-builtin,
|
||||
file-builtin,
|
||||
long-builtin,
|
||||
raw_input-builtin,
|
||||
reduce-builtin,
|
||||
standarderror-builtin,
|
||||
unicode-builtin,
|
||||
xrange-builtin,
|
||||
coerce-method,
|
||||
delslice-method,
|
||||
getslice-method,
|
||||
setslice-method,
|
||||
no-absolute-import,
|
||||
old-division,
|
||||
dict-iter-method,
|
||||
dict-view-method,
|
||||
next-method-called,
|
||||
metaclass-assignment,
|
||||
indexing-exception,
|
||||
raising-string,
|
||||
reload-builtin,
|
||||
oct-method,
|
||||
hex-method,
|
||||
nonzero-method,
|
||||
cmp-method,
|
||||
input-builtin,
|
||||
round-builtin,
|
||||
intern-builtin,
|
||||
unichr-builtin,
|
||||
map-builtin-not-iterating,
|
||||
zip-builtin-not-iterating,
|
||||
range-builtin-not-iterating,
|
||||
filter-builtin-not-iterating,
|
||||
using-cmp-argument,
|
||||
eq-without-hash,
|
||||
div-method,
|
||||
idiv-method,
|
||||
rdiv-method,
|
||||
exception-message-attribute,
|
||||
invalid-str-codec,
|
||||
sys-max-int,
|
||||
bad-python3-import,
|
||||
deprecated-string-function,
|
||||
deprecated-str-translate-call,
|
||||
deprecated-itertools-function,
|
||||
deprecated-types-field,
|
||||
next-method-defined,
|
||||
dict-items-not-iterating,
|
||||
dict-keys-not-iterating,
|
||||
dict-values-not-iterating,
|
||||
deprecated-operator-function,
|
||||
deprecated-urllib-function,
|
||||
xreadlines-attribute,
|
||||
deprecated-sys-function,
|
||||
exception-escape,
|
||||
comprehension-escape,
|
||||
consider-using-f-string,
|
||||
unknown-option-value,
|
||||
useless-option-value,
|
||||
R0801,I1101,E0401
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
enable=c-extension-no-member=
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a score less than or equal to 10. You
|
||||
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
|
||||
# which contain the number of messages in each category, as well as 'statement'
|
||||
# which is the total number of statements analyzed. This score is used by the
|
||||
# global evaluation report (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
#msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
output-format=text
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=no
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=6
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be refused
|
||||
bad-names-rgxs=
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
Run,
|
||||
_
|
||||
|
||||
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||
# they will always be accepted
|
||||
good-names-rgxs=^[a-z]?$
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=no
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=any
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=any
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=camelCase
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style.
|
||||
#variable-rgx="[a-z0-9_]{1,30}$"
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=120
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# The type of string formatting that logging methods do. `old` means using %
|
||||
# formatting, `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
# Regular expression of note tags to take in consideration.
|
||||
#notes-rgx=
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=yes
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: en_AG (hunspell), en_AU
|
||||
# (hunspell), en_BS (hunspell), en_BW (hunspell), en_BZ (hunspell), en_CA
|
||||
# (hunspell), en_DK (hunspell), en_GB (hunspell), en_GH (hunspell), en_HK
|
||||
# (hunspell), en_IE (hunspell), en_IN (hunspell), en_JM (hunspell), en_MW
|
||||
# (hunspell), en_NA (hunspell), en_NG (hunspell), en_NZ (hunspell), en_PH
|
||||
# (hunspell), en_SG (hunspell), en_TT (hunspell), en_US (hunspell), en_ZA
|
||||
# (hunspell), en_ZM (hunspell), en_ZW (hunspell).
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains the private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to the private dictionary (see the
|
||||
# --spelling-private-dict-file option) instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||
# character used as a quote delimiter is used inconsistently within a module.
|
||||
check-quote-consistency=no
|
||||
|
||||
# This flag controls whether the implicit-str-concat should generate a warning
|
||||
# on implicit string concatenation in sequences defined over several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis). It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
# List of decorators that change the signature of a decorated function.
|
||||
signature-mutators=
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp,
|
||||
__post_init__
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=10
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||
max-bool-expr=6
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=15
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=20
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# List of modules that can be imported at any level, not just the top level
|
||||
# one.
|
||||
allow-any-import-level=
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=optparse,tkinter.tix
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled).
|
||||
import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
# Couples of modules and preferred modules, separated by a comma.
|
||||
preferred-modules=
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "BaseException, Exception".
|
||||
overgeneral-exceptions=
|
||||
2
3rdparty/kddockwidgets/.shellcheckrc
vendored
Normal file
2
3rdparty/kddockwidgets/.shellcheckrc
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#disable=SC2006
|
||||
disable=SC2233
|
||||
58
3rdparty/kddockwidgets/3RDPARTY.md
vendored
Normal file
58
3rdparty/kddockwidgets/3RDPARTY.md
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# 3rdparty
|
||||
|
||||
Here we list which 3rdparty software used and possibly shipped by KDDW and their respective licenses.
|
||||
|
||||
## Runtime dependencies
|
||||
|
||||
### nlohmann JSON
|
||||
|
||||
JSON c++ library.<br>
|
||||
[code](src/3rdparty/nlohmann/nlohmann/json.hpp)<br>
|
||||
[MIT licensed](LICENSES/MIT.txt)
|
||||
|
||||
### KDBindings
|
||||
|
||||
Non-Qt signal/slot implementation.
|
||||
|
||||
[code](src/3rdparty/kdbindings/)<br>
|
||||
[MIT licensed](LICENSES/MIT.txt)
|
||||
|
||||
### KDStlContainerAdaptor
|
||||
|
||||
Only used for a Flutter build.
|
||||
Replacement for QVector.
|
||||
|
||||
[code](src/3rdparty/kdtoolbox/KDStlContainerAdaptor.h)<br>
|
||||
[MIT licensed](LICENSES/MIT.txt)
|
||||
|
||||
## Build-time / CI tests 3rdparty
|
||||
|
||||
These dependencies are only used during build or other CI purposes like running tests.
|
||||
|
||||
### ECM
|
||||
|
||||
CMake build helpers.
|
||||
|
||||
[code](cmake/ECM/modules/)<br>
|
||||
[BSD licensed](LICENSES/BSD-3-Clause.txt)
|
||||
|
||||
### doxygen-awesome.css
|
||||
|
||||
Template to generate documentation.
|
||||
|
||||
[code](docs/api/doxygen-awesome.css)<br>
|
||||
[MIT licensed](LICENSES/MIT.txt)
|
||||
|
||||
### QCoro
|
||||
|
||||
co-routine Qt implementation, only used by Flutter unit-tests.
|
||||
|
||||
[code](src/3rdparty/qcoro/)<br>
|
||||
[MIT licensed](LICENSES/MIT.txt)
|
||||
|
||||
### Flutter embedder and generated files
|
||||
|
||||
Only used for a flutter build and only during tests.
|
||||
|
||||
[code](tests/flutter_tests_embedder) and [code](examples/flutter)<br>
|
||||
[BSD licensed](LICENSES/BSD-3-Clause.txt)
|
||||
589
3rdparty/kddockwidgets/CMakeLists.txt
vendored
Normal file
589
3rdparty/kddockwidgets/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,589 @@
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sergio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# Pass the following variables to cmake to control the build:
|
||||
#
|
||||
# -DKDDockWidgets_QT6=[true|false] Build against Qt6 rather than Qt5
|
||||
# Default=false (Qt5 will be used even if Qt6 is available)
|
||||
#
|
||||
# -DKDDockWidgets_STATIC=[true|false] Build static versions of the libraries
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_TESTS=[true|false] Build the test harness. Currently ignored
|
||||
# (except for Python bindings) unless KDDockWidgets_DEVELOPER_MODE=True.
|
||||
# Default=false
|
||||
#
|
||||
# -DKDDockWidgets_EXAMPLES=[true|false] Build the examples. Default=true
|
||||
#
|
||||
# -DKDDockWidgets_DOCS=[true|false] Build the API documentation. Enables the
|
||||
# 'docs' build target. Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS=[true|false] Build/Generate python bindings.
|
||||
# Always false for Debug builds (If your shiboken or pyside is installed in a
|
||||
# non-standard locations try passing the SHIBOKEN_CUSTOM_PREFIX and
|
||||
# PYSIDE_CUSTOM_PREFIX variables.) Default=false
|
||||
#
|
||||
# -DKDDockWidgets_PYTHON_BINDINGS_INSTALL_PREFIX=[path] Set an alternative
|
||||
# install path for Python bindings Default=CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
# -DKDDockWidgets_FRONTENDS='qtwidgets;qtquick' Semicolon separated list of
|
||||
# frontends to enable. If not specified, Qt frontends will be enabled based on
|
||||
# availability of libraries on your system.
|
||||
|
||||
# # # DO NOT USE IF YOU ARE AN END-USER. FOR THE DEVELOPERS ONLY!! # Special
|
||||
# CMake Options for Developers
|
||||
#
|
||||
# -DKDDockWidgets_DEVELOPER_MODE=[true|false] Configure the build for a
|
||||
# developer setup. Enables some features that are not geared towards end-users.
|
||||
# Forces the test harness to be built. Default=false
|
||||
#
|
||||
# -DKDDockWidgets_WERROR=[true|false] Compile with the -Werror gcc/clang option
|
||||
# (always true for developer-mode) Default=false
|
||||
#
|
||||
# -DKDDockWidgets_LINTER=[true|false] Build the layout linter. Ignored unless
|
||||
# KDDockWidgets_DEVELOPER_MODE=True Default=true
|
||||
#
|
||||
# -DKDDockWidgets_CODE_COVERAGE=[true|false] Enable coverage reporting. Ignored
|
||||
# unless KDDockWidgets_DEVELOPER_MODE=True Default=false
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
# Allow using a non-KDAB install location.
|
||||
set(KDAB_INSTALL
|
||||
True
|
||||
CACHE INTERNAL "Install to default KDAB Location"
|
||||
)
|
||||
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
if(DEFINED CMAKE_INSTALL_PREFIX)
|
||||
if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
|
||||
set(KDAB_INSTALL
|
||||
False
|
||||
CACHE INTERNAL "Install to non-KDAB Location"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
project(
|
||||
KDDockWidgets
|
||||
DESCRIPTION "An advanced docking system for Qt"
|
||||
HOMEPAGE_URL "https://github.com/KDAB/KDDockWidgets"
|
||||
LANGUAGES CXX C
|
||||
)
|
||||
|
||||
set(KDDockWidgets_VERSION_MAJOR 2)
|
||||
set(KDDockWidgets_VERSION_MINOR 2)
|
||||
set(KDDockWidgets_VERSION_PATCH 3)
|
||||
set(KDDockWidgets_VERSION ${KDDockWidgets_VERSION_MAJOR}.${KDDockWidgets_VERSION_MINOR}.${KDDockWidgets_VERSION_PATCH})
|
||||
set(PROJECT_VERSION ${KDDockWidgets_VERSION}) # PROJECT_VERSION is needed by some ECM modules
|
||||
set(KDDockWidgets_SOVERSION "2.2")
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
set(KDDockWidgets_FRONTENDS
|
||||
""
|
||||
CACHE STRING "Semicolon separated list of frontends to enable (blank for autodetect)"
|
||||
)
|
||||
|
||||
set(KDDockWidgets_LIBRARY_POSTFIX
|
||||
""
|
||||
CACHE STRING "Appends the specified string to the library name. Not applicable to VS generator."
|
||||
)
|
||||
|
||||
option(KDDockWidgets_QT6 "Build against Qt 6" OFF)
|
||||
option(KDDockWidgets_DEVELOPER_MODE "Developer Mode" OFF)
|
||||
option(KDDockWidgets_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||
option(KDDockWidgets_STATIC "Build statically" OFF)
|
||||
option(KDDockWidgets_TESTS "Build the tests" OFF)
|
||||
option(KDDockWidgets_WAYLAND_TESTS "Build the wayland tests" OFF)
|
||||
option(KDDockWidgets_EXAMPLES "Build the examples" ON)
|
||||
option(KDDockWidgets_DOCS "Build the API documentation" OFF)
|
||||
option(KDDockWidgets_WERROR "Use -Werror (will be true for developer-mode unconditionally)"
|
||||
${KDDockWidgets_DEVELOPER_MODE}
|
||||
)
|
||||
option(KDDockWidgets_X11EXTRAS
|
||||
"Link against QtX11Extras to detect if the compositor supports transparency. Not applicable on non-Linux or Qt6."
|
||||
ON
|
||||
)
|
||||
option(KDDockWidgets_XLib "On Linux, link against XLib, for a more robust window z-order detection." OFF)
|
||||
option(KDDockWidgets_CODE_COVERAGE "Enable coverage reporting" OFF)
|
||||
option(KDDockWidgets_FLUTTER_TESTS_AOT "Flutter tests will be built in AOT mode" OFF)
|
||||
option(KDDockWidgets_NO_SPDLOG "Don't use spdlog, even if it is found." OFF)
|
||||
option(KDDockWidgets_USE_LLD "Use lld for linking" OFF)
|
||||
option(KDDockWidgets_USE_VALGRIND "Runs the tests under valgrind" OFF)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/ECM/modules")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/KDAB/modules")
|
||||
|
||||
# Set a default build type if none was specified
|
||||
set(default_build_type "Release")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR KDDockWidgets_DEVELOPER_MODE)
|
||||
set(default_build_type "Debug")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to ${default_build_type} as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"${default_build_type}"
|
||||
CACHE STRING "Choose the type of build." FORCE
|
||||
)
|
||||
|
||||
# Set the possible values of build type for cmake-gui
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_XLib)
|
||||
add_definitions(-DKDDockWidgets_XLIB)
|
||||
endif()
|
||||
|
||||
if(MSVC AND MSVC_TOOLSET_VERSION LESS 142)
|
||||
message(FATAL_ERROR "VS 2019 is the minimum required toolset")
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_QT6)
|
||||
set(QT_VERSION_MAJOR 6)
|
||||
set(QT_MIN_VERSION "6.2.0")
|
||||
else()
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
set(QT_MIN_VERSION "5.15")
|
||||
endif()
|
||||
|
||||
# BEGIN frontend enabling
|
||||
|
||||
set(KDDW_FRONTEND_QTWIDGETS OFF)
|
||||
set(KDDW_FRONTEND_QTQUICK OFF)
|
||||
set(KDDW_FRONTEND_FLUTTER OFF)
|
||||
|
||||
if(KDDockWidgets_FRONTENDS)
|
||||
set(KDDockWidgets_ALL_FRONTENDS "qtwidgets;qtquick;flutter;none")
|
||||
|
||||
foreach(frontend ${KDDockWidgets_FRONTENDS})
|
||||
if(NOT ${frontend} IN_LIST KDDockWidgets_ALL_FRONTENDS)
|
||||
message(FATAL_ERROR "Unknown frontend ${frontend}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_FRONTENDS)
|
||||
if("qtwidgets" IN_LIST KDDockWidgets_FRONTENDS)
|
||||
find_package(Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Widgets)
|
||||
set(KDDW_FRONTEND_QTWIDGETS ON)
|
||||
endif()
|
||||
|
||||
if("qtquick" IN_LIST KDDockWidgets_FRONTENDS)
|
||||
find_package(Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS Quick QuickControls2)
|
||||
set(KDDW_FRONTEND_QTQUICK ON)
|
||||
endif()
|
||||
|
||||
if("flutter" IN_LIST KDDockWidgets_FRONTENDS)
|
||||
set(KDDW_FRONTEND_FLUTTER ON)
|
||||
|
||||
endif()
|
||||
|
||||
if("none" IN_LIST KDDockWidgets_FRONTENDS)
|
||||
set(KDDW_FRONTEND_NONE ON)
|
||||
endif()
|
||||
else()
|
||||
set(ENABLED_FRONTENDS "")
|
||||
message("No frontends specified explicitly.")
|
||||
|
||||
# qtwidgets
|
||||
find_package(Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} NO_MODULE COMPONENTS Widgets Quick QuickControls2)
|
||||
|
||||
if(Qt${QT_VERSION_MAJOR}Widgets_FOUND)
|
||||
list(APPEND ENABLED_FRONTENDS "qtwidgets")
|
||||
set(KDDW_FRONTEND_QTWIDGETS ON)
|
||||
endif()
|
||||
|
||||
# qtquick
|
||||
if(Qt${QT_VERSION_MAJOR}Quick_FOUND AND Qt${QT_VERSION_MAJOR}QuickControls2_FOUND)
|
||||
list(APPEND ENABLED_FRONTENDS "qtquick")
|
||||
set(KDDW_FRONTEND_QTQUICK ON)
|
||||
endif()
|
||||
|
||||
if(NOT ENABLED_FRONTENDS)
|
||||
message(FATAL_ERROR "Failed to enable any frontends. Please install the required libraries and try again.")
|
||||
endif()
|
||||
|
||||
message("Following frontends have been enabled:")
|
||||
|
||||
foreach(frontend ${ENABLED_FRONTENDS})
|
||||
message("* ${frontend}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_QTWIDGETS OR KDDW_FRONTEND_QTQUICK)
|
||||
if(WIN32 AND (Qt6Core_VERSION VERSION_EQUAL "6.5.3" OR Qt6Core_VERSION VERSION_EQUAL "6.6.1"))
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Qt 6.5.3 and 6.6.1 are not supported on Windows, as they suffer from a Qt regression: QTBUG-117704. "
|
||||
"Please either downgrade or upgrade to 6.6.2 or superior"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(KDDW_FRONTEND_QT ON)
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_FLUTTER)
|
||||
if(KDDW_FRONTEND_QT)
|
||||
message(FATAL_ERROR "The flutter frontend is not compatible with the Qt frontends. Chose a single one.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_NONE AND (KDDW_FRONTEND_QT OR KDDW_FRONTEND_FLUTTER))
|
||||
message(FATAL_ERROR "Frontend value \"none\" needs to be specified alone")
|
||||
endif()
|
||||
|
||||
# END frontend enabling
|
||||
|
||||
if(KDDockWidgets_WAYLAND_TESTS)
|
||||
if(NOT KDDockWidgets_DEVELOPER_MODE)
|
||||
message(FATAL_ERROR "Wayland tests require developer mode")
|
||||
endif()
|
||||
|
||||
if(NOT KDDW_FRONTEND_QTWIDGETS)
|
||||
message(FATAL_ERROR "Wayland tests require QtWidgets")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_LIBRARY_QTID "")
|
||||
|
||||
if(KDDW_FRONTEND_QT)
|
||||
include(KDQtInstallPaths) # to set QT_INSTALL_FOO variables
|
||||
if(KDDockWidgets_QT6)
|
||||
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
|
||||
endif()
|
||||
endif()
|
||||
set(KDDockWidgets_LIBRARY_QTID "${${PROJECT_NAME}_LIBRARY_QTID}")
|
||||
|
||||
add_definitions(-DQT_NO_KEYWORDS)
|
||||
|
||||
option(KDockWidgets_PRETTY_QTWIDGETS_HEADERS
|
||||
"Install DockWidget.h and MainWindow.h as synonyms to the *.h counterparts." ${KDDW_FRONTEND_QTWIDGETS}
|
||||
)
|
||||
|
||||
set(KDDockWidgets_DEPS "")
|
||||
if(KDDW_FRONTEND_QTWIDGETS)
|
||||
set(KDDockWidgets_DEPS "widgets")
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_QTQUICK)
|
||||
set(KDDockWidgets_DEPS "${KDDockWidgets_DEPS} quick quickcontrols2")
|
||||
endif()
|
||||
|
||||
if(NOT WIN32
|
||||
AND NOT APPLE
|
||||
AND NOT EMSCRIPTEN
|
||||
AND NOT KDDockWidgets_QT6
|
||||
AND KDDockWidgets_X11EXTRAS
|
||||
)
|
||||
set(KDDockWidgets_DEPS "${KDDockWidgets_DEPS} x11extras")
|
||||
endif()
|
||||
|
||||
if(NOT KDDockWidgets_NO_SPDLOG)
|
||||
if(KDDockWidgets_DEVELOPER_MODE AND LINUX)
|
||||
# Make sure we have at least one CI configuration running tests with spdlog enabled.
|
||||
# Our tests are log error free. Any error printed should result in a fatal failure.
|
||||
# For that we want spdlog enabled.
|
||||
find_package(spdlog 1.8.0 REQUIRED)
|
||||
find_package(fmt REQUIRED)
|
||||
else()
|
||||
# For regular user builds we don't care if people use it or not.
|
||||
find_package(spdlog 1.8.0 QUIET)
|
||||
find_package(fmt QUIET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# fmt 11 not supported yet, will get to it when it hits archlinux
|
||||
if(spdlog_FOUND AND fmt_FOUND)
|
||||
set(KDDockWidgets_HAS_SPDLOG TRUE)
|
||||
else()
|
||||
set(KDDockWidgets_HAS_SPDLOG FALSE)
|
||||
endif()
|
||||
|
||||
# Always build the test harness in developer-mode
|
||||
if(KDDockWidgets_DEVELOPER_MODE)
|
||||
set(KDDockWidgets_TESTS ON)
|
||||
include(ECMEnableSanitizers)
|
||||
|
||||
# Enable assert() in developer mode, regardless of debug vs release
|
||||
add_definitions(-UNDEBUG)
|
||||
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(IS_CLANG_BUILD TRUE)
|
||||
else()
|
||||
set(IS_CLANG_BUILD FALSE)
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_QT)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_QT)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Default to hidden visibility for symbols
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
# Sets compiler flags for the specified target, taking platform into consideration.
|
||||
macro(set_compiler_flags targetName)
|
||||
if(KDDockWidgets_DEVELOPER_MODE)
|
||||
target_compile_definitions(
|
||||
${targetName}
|
||||
PUBLIC DOCKS_DEVELOPER_MODE DOCKS_TESTING_METHODS
|
||||
PRIVATE QT_FORCE_ASSERTS
|
||||
)
|
||||
|
||||
if(NOT MSVC AND NOT APPLE)
|
||||
target_compile_options(${targetName} PRIVATE -Wall -Wextra -Woverloaded-virtual)
|
||||
if(KDDockWidgets_USE_LLD)
|
||||
target_link_options(${targetName} PRIVATE -fuse-ld=lld)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
target_compile_options(${targetName} PRIVATE -Wweak-vtables -Wextra-semi)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${targetName} PRIVATE /W4)
|
||||
endif()
|
||||
else()
|
||||
if(KDDW_FRONTEND_FLUTTER)
|
||||
# Our Dart bindings are auto-generated and they include methods guarded with DOCKS_TESTING_METHODS
|
||||
# Since we won't generate 2 sets of bindings, we need to enable the macro in release as well
|
||||
# It won't have much side-effects besides making the bindings compile.
|
||||
target_compile_definitions(${targetName} PUBLIC DOCKS_TESTING_METHODS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Enable -Werror
|
||||
if(KDDockWidgets_WERROR AND (NOT MSVC OR IS_CLANG_BUILD)) # clang-cl accepts these too
|
||||
target_compile_options(${targetName} PRIVATE -Werror -Wundef -Wno-error=deprecated-declarations)
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_HAS_SPDLOG)
|
||||
target_compile_definitions(${targetName} PRIVATE KDDW_HAS_SPDLOG)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE)
|
||||
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE)
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)
|
||||
)
|
||||
# Linker warnings should be treated as errors
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
|
||||
|
||||
string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" compileflags)
|
||||
|
||||
if("${CMAKE_CXX_FLAGS} ${${compileflags}}" MATCHES "-fsanitize")
|
||||
set(sanitizers_enabled TRUE)
|
||||
else()
|
||||
set(sanitizers_enabled FALSE)
|
||||
endif()
|
||||
|
||||
if(APPLE OR LINUX)
|
||||
# cannot enable this for clang + sanitizers
|
||||
if(NOT sanitizers_enabled OR NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Do not allow undefined symbols, even in non-symbolic shared libraries
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_STATIC)
|
||||
set(KDDockWidgets_LIBRARY_MODE "STATIC")
|
||||
else()
|
||||
set(KDDockWidgets_LIBRARY_MODE "SHARED")
|
||||
endif()
|
||||
|
||||
if(KDAB_INSTALL)
|
||||
if(UNIX)
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
"/usr/local/KDAB/KDDockWidgets-${KDDockWidgets_VERSION}"
|
||||
CACHE INTERNAL "Install to default KDAB Location"
|
||||
)
|
||||
elseif(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
"C:\\KDAB\\KDDockWidgets-${KDDockWidgets_VERSION}"
|
||||
CACHE INTERNAL "Install to default KDAB Location"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# setup default install locations
|
||||
include(KDInstallLocation)
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(KDDockWidgets_IS_ROOT_PROJECT TRUE)
|
||||
|
||||
message(STATUS "Building KDDockWidgets ${KDDockWidgets_VERSION} in ${CMAKE_BUILD_TYPE} mode. "
|
||||
"Installing to ${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||
|
||||
install(FILES LICENSE.txt README.md DESTINATION ${INSTALL_DOC_DIR})
|
||||
install(DIRECTORY LICENSES DESTINATION ${INSTALL_DOC_DIR})
|
||||
|
||||
# Generate .pri file for qmake users
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES AND KDDW_FRONTEND_QT)
|
||||
if(QT_VERSION_MAJOR EQUAL 5 OR (QT_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_GREATER "6.2"))
|
||||
include(ECMGeneratePriFile)
|
||||
set(PROJECT_VERSION_STRING ${KDDockWidgets_VERSION})
|
||||
ecm_generate_pri_file(
|
||||
BASE_NAME
|
||||
KDDockWidgets
|
||||
LIB_NAME
|
||||
kddockwidgets${${PROJECT_NAME}_LIBRARY_QTID}
|
||||
DEPS
|
||||
${KDDockWidgets_DEPS}
|
||||
FILENAME_VAR
|
||||
pri_filename
|
||||
INCLUDE_INSTALL_DIR
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# Always disable tests, examples, docs when used as a submodule
|
||||
set(KDDockWidgets_IS_ROOT_PROJECT FALSE)
|
||||
set(KDDockWidgets_TESTS FALSE)
|
||||
set(KDDockWidgets_EXAMPLES FALSE)
|
||||
set(KDDockWidgets_DOCS FALSE)
|
||||
endif()
|
||||
|
||||
# workaround for CMAKE_CURRENT_FUNCTION_LIST_DIR below CMake 3.17
|
||||
set(KKDockWidgets_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
find_package(KDBindings QUIET)
|
||||
include(src/kdbindings.cmake)
|
||||
|
||||
if(KDDockWidgets_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(KDDockWidgets_PYTHON_BINDINGS)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR KDDockWidgets_STATIC)
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.")
|
||||
endif()
|
||||
|
||||
if(CMAKE_UNITY_BUILD)
|
||||
message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. Try again with CMAKE_UNITY_BUILD=OFF")
|
||||
endif()
|
||||
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_EXAMPLES)
|
||||
if(KDDW_FRONTEND_QTQUICK)
|
||||
add_subdirectory(examples/qtquick)
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_QTWIDGETS)
|
||||
add_subdirectory(examples/dockwidgets)
|
||||
add_subdirectory(examples/minimal)
|
||||
add_subdirectory(examples/mdi)
|
||||
add_subdirectory(examples/mdi_with_docking)
|
||||
set_compiler_flags(qtwidgets_dockwidgets)
|
||||
set_compiler_flags(qtwidgets_minimal)
|
||||
set_compiler_flags(qtwidgets_mdi_with_docking)
|
||||
|
||||
# Standalone layouting example
|
||||
add_subdirectory(src/core/layouting/examples/qtwidgets/)
|
||||
endif()
|
||||
|
||||
if(KDDW_FRONTEND_FLUTTER)
|
||||
add_custom_target(
|
||||
kddw-flutter-example ALL
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example
|
||||
COMMENT "Building flutter example"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set(FLUTTER_PLATFORM "windows")
|
||||
elseif(APPLE)
|
||||
set(FLUTTER_PLATFORM "macos")
|
||||
else()
|
||||
set(FLUTTER_PLATFORM "linux")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_SOURCE_DIR}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example
|
||||
COMMAND flutter build ${FLUTTER_PLATFORM} --debug
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/flutter
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/examples/flutter/lib/main.dart
|
||||
${CMAKE_SOURCE_DIR}/examples/flutter/lib/MyWidget.dart
|
||||
${CMAKE_SOURCE_DIR}/examples/flutter/lib/MyMenuBar.dart
|
||||
COMMENT "Building flutter example"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_SLINT_LAYOUTING_EXAMPLE)
|
||||
add_subdirectory(src/core/layouting/examples/slint/)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_TESTS)
|
||||
if(KDDockWidgets_DEVELOPER_MODE)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_DOCS)
|
||||
add_subdirectory(docs) # needs to go last, in case there are build source files
|
||||
endif()
|
||||
|
||||
if(KDDockWidgets_IS_ROOT_PROJECT)
|
||||
# Add uninstall target (not for submodules since parent projects typically have uninstall too)
|
||||
include(ECMUninstallTarget)
|
||||
endif()
|
||||
|
||||
# Deployment
|
||||
if(WIN32)
|
||||
add_custom_target(
|
||||
createZipDemo
|
||||
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}\\deploy\\create-demo-win-zip.bat
|
||||
${CMAKE_PROJECT_NAME}-Demo-${${PROJECT_NAME}_VERSION}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Target to generate the Zip demo installer for Windows"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(
|
||||
build-book
|
||||
COMMAND mdbook build --dest-dir ${CMAKE_CURRENT_BINARY_DIR}/book
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Building KDDW book"
|
||||
)
|
||||
|
||||
if(KDDockWidgets_IS_ROOT_PROJECT)
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
endif()
|
||||
585
3rdparty/kddockwidgets/CMakePresets.json
vendored
Normal file
585
3rdparty/kddockwidgets/CMakePresets.json
vendored
Normal file
@@ -0,0 +1,585 @@
|
||||
{
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"generator": "Ninja",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
},
|
||||
"warnings": {
|
||||
"uninitialized": true
|
||||
},
|
||||
"errors": {
|
||||
"dev": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-base",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick",
|
||||
"KDDockWidgets_USE_LLD": "ON"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "asan-base",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"ECM_ENABLE_SANITIZERS": "'address;undefined'"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "static-base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_STATIC": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev",
|
||||
"displayName": "dev",
|
||||
"binaryDir": "${sourceDir}/build-dev",
|
||||
"inherits": ["dev-base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-asan",
|
||||
"displayName": "dev-asan",
|
||||
"description": "An ASAN/UBSAN build",
|
||||
"binaryDir": "${sourceDir}/build-dev-asan",
|
||||
"inherits": ["dev-base", "asan-base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-valgrind",
|
||||
"displayName": "dev-valgrind",
|
||||
"description": "A dev preset which runs tests under valgrind",
|
||||
"binaryDir": "${sourceDir}/build-dev-valgrind",
|
||||
"inherits": ["dev"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_USE_VALGRIND": "ON",
|
||||
"KDDockWidgets_NO_SPDLOG": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-valgrind6",
|
||||
"displayName": "dev-valgrind6",
|
||||
"description": "A dev preset which runs tests under valgrind",
|
||||
"binaryDir": "${sourceDir}/build-dev-valgrind6",
|
||||
"inherits": ["dev6"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_USE_VALGRIND": "ON",
|
||||
"KDDockWidgets_NO_SPDLOG": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "flutter-base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_FRONTENDS": "flutter"
|
||||
},
|
||||
"inherits": ["base"],
|
||||
"warnings": {
|
||||
"uninitialized": false
|
||||
},
|
||||
"errors": {
|
||||
"dev": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-lcov",
|
||||
"displayName": "dev-lcov",
|
||||
"binaryDir": "${sourceDir}/build-dev-lcov",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"KDDockWidgets_CODE_COVERAGE": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-none",
|
||||
"description": "Builds KDDW with no frontend. For using only the layouting engine.",
|
||||
"binaryDir": "${sourceDir}/build-dev-none",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_WERROR": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "none"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-slint-layouting",
|
||||
"description": "Non-Qt KDDW build with only the layouting engine and a slint layouting example. No docking.",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-dev-slint-layouting",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_WERROR": "ON",
|
||||
"KDDockWidgets_SLINT_LAYOUTING_EXAMPLE": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "none",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-flutter",
|
||||
"description": "Builds the KDDW layouting for usage with flutter",
|
||||
"binaryDir": "${sourceDir}/build-dev-flutter",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_WERROR": "ON",
|
||||
"KDDockWidgets_USE_LLD": "ON",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON"
|
||||
},
|
||||
"inherits": "flutter-base"
|
||||
},
|
||||
{
|
||||
"name": "release-flutter",
|
||||
"description": "Builds the KDDW layouting for usage with flutter",
|
||||
"binaryDir": "${sourceDir}/build-release-flutter",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
},
|
||||
"inherits": ["flutter-base"]
|
||||
},
|
||||
{
|
||||
"name": "clazy",
|
||||
"displayName": "clazy",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-clazy",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_WERROR": "ON",
|
||||
"KDDockWidgets_EXAMPLES": "OFF",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"environment": {
|
||||
"CXX": "clazy",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clazy-no-werror",
|
||||
"inherits": ["clazy"],
|
||||
"displayName": "clazy-no-werror",
|
||||
"binaryDir": "${sourceDir}/build-clazy-no-werror",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_WERROR": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"displayName": "release",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-release",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_UNITY_BUILD": "OFF",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release-no-x11extras",
|
||||
"displayName": "release-no-x11extras",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-release-no-x11extras",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_UNITY_BUILD": "OFF",
|
||||
"KDDockWidgets_X11EXTRAS": "OFF",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "python-base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_PYTHON_BINDINGS": "ON",
|
||||
"CMAKE_UNITY_BUILD": "OFF",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "python",
|
||||
"displayName": "Qt5 python bindings",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-python",
|
||||
"inherits": ["python-base"]
|
||||
},
|
||||
{
|
||||
"name": "python6",
|
||||
"displayName": "Qt6 python bindings",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-python6",
|
||||
"inherits": ["python-base"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-python-qt6",
|
||||
"displayName": "CI Qt6 python bindings",
|
||||
"inherits": ["python6"],
|
||||
"cacheVariables": {
|
||||
"Python3_FIND_VIRTUALENV": "ONLY"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "homebrew-python6",
|
||||
"displayName": "Qt6 python bindings on macOS via homebrew",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-homebrew-python6",
|
||||
"inherits": ["python6"],
|
||||
"cacheVariables": {
|
||||
"Python3_EXECUTABLE": "/opt/homebrew/bin/python3.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release6",
|
||||
"displayName": "release6",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-release6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_UNITY_BUILD": "OFF",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev6",
|
||||
"displayName": "dev6",
|
||||
"binaryDir": "${sourceDir}/build-dev6",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
|
||||
},
|
||||
"inherits": ["dev-base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-asan6",
|
||||
"displayName": "dev-asan6",
|
||||
"binaryDir": "${sourceDir}/build-dev-asan6",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}"
|
||||
},
|
||||
"inherits": ["dev-base", "asan-base"]
|
||||
},
|
||||
{
|
||||
"name": "dev-clangcl",
|
||||
"displayName": "dev-clangcl",
|
||||
"binaryDir": "${sourceDir}/build-dev-clangcl",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"inherits": ["base"],
|
||||
"environment": {
|
||||
"CC": "clang-cl",
|
||||
"CXX": "clang-cl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-clangcl6",
|
||||
"displayName": "dev-clangcl6",
|
||||
"binaryDir": "${sourceDir}/build-dev-clangcl6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT6_DIR}",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"inherits": ["base"],
|
||||
"environment": {
|
||||
"CC": "clang-cl",
|
||||
"CXX": "clang-cl"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-time-trace",
|
||||
"displayName": "dev-time-trace",
|
||||
"binaryDir": "${sourceDir}/build-dev-time-trace",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"inherits": ["base"],
|
||||
"environment": {
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev6-time-trace",
|
||||
"displayName": "dev6-time-trace",
|
||||
"binaryDir": "${sourceDir}/build-dev6-time-trace",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"CMAKE_C_FLAGS_INIT": "-ftime-trace",
|
||||
"CMAKE_CXX_FLAGS_INIT": "-ftime-trace",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
},
|
||||
"inherits": ["base"],
|
||||
"environment": {
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dev-no-spdlog",
|
||||
"binaryDir": "${sourceDir}/build-dev-no-spdlog",
|
||||
"inherits": ["dev"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_NO_SPDLOG": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "wasm-release",
|
||||
"generator": "Ninja",
|
||||
"description": "WASM release build",
|
||||
"binaryDir": "${sourceDir}/build-wasm-release",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_STATIC": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-clang-tidy-qt6",
|
||||
"binaryDir": "${sourceDir}/build-clang-tidy-qt6",
|
||||
"inherits": ["release"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--warnings-as-errors=*",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_EXAMPLES": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clang-tidy-no-werror-qt6",
|
||||
"binaryDir": "${sourceDir}/build-clang-tidy-no-werror-qt6",
|
||||
"inherits": ["ci-clang-tidy-qt6"],
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_CLANG_TIDY": "clang-tidy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qt5",
|
||||
"displayName": "ci-dev-qt5",
|
||||
"description": "Qt5 dev-mode build",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-release-qt5",
|
||||
"displayName": "ci-release-qt5",
|
||||
"description": "Qt5 non dev-mode build",
|
||||
"binaryDir": "${sourceDir}/build-ci-release-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtwidgets-qt5",
|
||||
"displayName": "ci-qtwidgets-qt5",
|
||||
"description": "Qt5 build which excludes QtQuick",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtquick-qt5",
|
||||
"displayName": "ci-qtquick-qt5",
|
||||
"description": "Qt5 build which excludes QtWidgets",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtquick-qt5",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_FRONTENDS": "qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-qt6",
|
||||
"displayName": "ci-dev-qt6",
|
||||
"description": "Qt6 dev-mode",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-release-qt6",
|
||||
"description": "Qt6 non dev-mode",
|
||||
"displayName": "ci-release-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-release-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets;qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtwidgets-qt6",
|
||||
"description": "Qt6 build which excludes QtQuick",
|
||||
"displayName": "ci-qtwidgets-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtwidgets-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-qtquick-qt6",
|
||||
"description": "Qt6 build which excludes QtWidgets",
|
||||
"displayName": "ci-qtquick-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-qtquick-qt6",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"KDDockWidgets_QT6": "ON",
|
||||
"KDDockWidgets_FRONTENDS": "qtquick"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-valgrind-qt5",
|
||||
"displayName": "ci-dev-valgrind-qt5",
|
||||
"description": "A dev preset which runs tests under valgrind. QtWidgets only, since QtQuick is very slow in CI.",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-valgrind-qt5",
|
||||
"inherits": ["dev-valgrind"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-valgrind-qt6",
|
||||
"displayName": "ci-dev-valgrind-qt6",
|
||||
"description": "A dev preset which runs tests under valgrind. QtWidgets only, since QtQuick is very slow in CI.",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-valgrind-qt6",
|
||||
"inherits": ["dev-valgrind6"],
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-asan-qt5",
|
||||
"displayName": "ci-dev-asan-qt5",
|
||||
"description": "An ASAN/UBSAN build",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-asan-qt5",
|
||||
"inherits": ["dev-asan"]
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-asan-qt6",
|
||||
"displayName": "ci-dev-asan-qt6",
|
||||
"description": "An ASAN/UBSAN build",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-asan-qt6",
|
||||
"inherits": ["dev-asan6"]
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-asan-qtwidgets-qt6",
|
||||
"displayName": "ci-dev-asan-qtwidgets-qt6",
|
||||
"description": "LSAN build for Qt6/qtwidgets",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-asan-qtwidgets-qt6",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets",
|
||||
"KDDockWidgets_NO_SPDLOG": "ON"
|
||||
},
|
||||
"inherits": ["dev-asan6"]
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-asan-qtquick-qt6",
|
||||
"displayName": "ci-dev-asan-qtquick-qt6",
|
||||
"description": "LSAN build for Qt6/qtquick",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-asan-qtquick-qt6",
|
||||
"cacheVariables": {
|
||||
"KDDockWidgets_FRONTENDS": "qtquick",
|
||||
"KDDockWidgets_NO_SPDLOG": "ON"
|
||||
},
|
||||
"inherits": ["dev-asan6"]
|
||||
},
|
||||
{
|
||||
"name": "ci-release-static-qt5",
|
||||
"binaryDir": "${sourceDir}/build-ci-release-static-qt5",
|
||||
"inherits": ["static-base", "ci-release-qt5"]
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-static-qt5",
|
||||
"binaryDir": "${sourceDir}/build-dev-ci-static-qt5",
|
||||
"inherits": ["static-base", "ci-dev-qt5"]
|
||||
},
|
||||
{
|
||||
"name": "ci-release-static-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-release-static-qt6",
|
||||
"inherits": ["static-base", "ci-release-qt6"]
|
||||
},
|
||||
{
|
||||
"name": "ci-dev-static-qt6",
|
||||
"binaryDir": "${sourceDir}/build-ci-dev-static-qt6",
|
||||
"inherits": ["static-base", "ci-dev-qt6"]
|
||||
},
|
||||
{
|
||||
"name": "debug-qtwidgets6",
|
||||
"description": "Preset to debug qtwidgets onlk",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-debug-qtwidgets6",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"KDDockWidgets_DEVELOPER_MODE": "OFF",
|
||||
"KDDockWidgets_FRONTENDS": "qtwidgets",
|
||||
"KDDockWidgets_QT6": "ON"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "clazy",
|
||||
"configurePreset": "clazy",
|
||||
"environment": {
|
||||
"CLAZY_CHECKS": "level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo,no-skipped-base-method",
|
||||
"CCACHE_DISABLE": "ON"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
27
3rdparty/kddockwidgets/CMakeUserPresets-example.json
vendored
Normal file
27
3rdparty/kddockwidgets/CMakeUserPresets-example.json
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "dev6-custom-qt",
|
||||
"binaryDir": "${sourceDir}/build-dev6-custom-qt",
|
||||
"description": "Preset which hardcodes Qt location instead of relying on PATH",
|
||||
"cacheVariables": {
|
||||
"CMAKE_PREFIX_PATH": "/data/installation/qt/qt6-dev/"
|
||||
},
|
||||
"inherits": [
|
||||
"dev6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dev-asan6-custom-qt",
|
||||
"binaryDir": "${sourceDir}/build-dev-asan6-custom-qt",
|
||||
"description": "Preset which hardcodes Qt location instead of relying on PATH",
|
||||
"cacheVariables": {
|
||||
"CMAKE_PREFIX_PATH": "/data/installation/qt/qt6-dev/"
|
||||
},
|
||||
"inherits": [
|
||||
"dev-asan6"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
11
3rdparty/kddockwidgets/CONTRIBUTORS.txt
vendored
Normal file
11
3rdparty/kddockwidgets/CONTRIBUTORS.txt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
People who have signed the CLA:
|
||||
|
||||
Christian Riggenbach <criggenbach@magahugu.ch>
|
||||
Daniel Price <danielp@nvidia.com>
|
||||
Elnur Ismailzada <eismailzada@gmail.com>
|
||||
Frank Dana <ferdnyc@gmail.com>
|
||||
Jacob Young <amazingjacob@gmail.com>
|
||||
Matthew Waltz <matthewwaltzis@gmail.com>
|
||||
Olaf Mandel <o.mandel@menlosystems.com> on behalf of Menlo Systems GmbH
|
||||
Roman Pudashkin <r.pudashkin@gmail.com>
|
||||
Sebastian Koslowski <s.koslowski@procitec.de>
|
||||
239
3rdparty/kddockwidgets/Changelog
vendored
Normal file
239
3rdparty/kddockwidgets/Changelog
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
* v2.2.3
|
||||
- Fix potential crash found by ASAN
|
||||
|
||||
* v2.2.2
|
||||
- Fix submodule url. Changed from SSH to HTTPS. This is only important for
|
||||
people cloning from a git tag. v2.2.1 tarball is identical otherwise.
|
||||
|
||||
* v2.2.1
|
||||
- Fix linking against static KDDW (#557)
|
||||
|
||||
* v2.2.0
|
||||
- qtquick: Add support for MainWindowOption_HasCentralWidget
|
||||
- qtquick: Add QtQuick::FloatingWindow::setQuickWindowCreationCallback
|
||||
- Add Config::setDockWidgetTabIndexOverrideFunc() (#165)
|
||||
- Allow to redock back to a floating window (#280)
|
||||
- Add KDDockWidgets::controllersToViews (#526)
|
||||
- Add Config::setTabsAtBottom()
|
||||
- Fix case where persistent central widget would detach when dragged
|
||||
- Fix windows having transparency when drop indicators inhibited
|
||||
- Fix case where persistent central widget would detach when dragged
|
||||
- Allow to build against external KDBindings
|
||||
- Fix restore layout of nested main windows (#508)
|
||||
- Fix restore maximized window corner case (#553)
|
||||
|
||||
* v2.1.0 (08 May 2024)
|
||||
- Added standalone layouting example using Slint
|
||||
- Fixed DPI of icons in TitleBar.qml Looks better when using 150% and 200% scalling now.
|
||||
- QtQuick: Fixed redock not working when mixing MDI with docking
|
||||
- QtQuick: Allow to mix MDI with docking, as already done with QtWidgets
|
||||
- QtQuick: Fixed MDI widgets not raising when clicked on
|
||||
- QtQuick: Added API to set affinities via QML (#465)
|
||||
- MDI: Don't show resize handles if widget is fixed size
|
||||
- MDI: Fixed mouse cursor not being restored when dock widgets were overlapping
|
||||
- MDI: Added Config::setMDIFlags() and MDIFlag_NoClickToRaise
|
||||
- QtWidgets: Introduced MainWindowOption_QDockWidgets and MainWindowOption_ManualInit
|
||||
- QtWidgets: Honours overriding DockWidget::closeEvent() to prevent closing
|
||||
- QtWidgets: Fixed crash when unpinning a window
|
||||
- Fix crash when doing sequential open() and close() calls (#326)
|
||||
- Fix double-clicking the guest widget would make window float
|
||||
- 3rdparty: Update to nlohmann json v3.11.3, from v3.10.5. Only relevant if you're not using
|
||||
system nlohmann.
|
||||
- Fixed dock widget float button when using main window nesting
|
||||
- Fixed auto-hide overlay not updating its position when main window was resized
|
||||
- Fixed double-click on titlebar not floating it if auto-hide flag was enabled
|
||||
- Added Config::setLayoutSpacing(int)
|
||||
- LayoutSaverOption::Skip now honours docked dock widgets
|
||||
- Fixed DockWidget::addDockWidgetToContainingWindow() when using nested main windows (#386)
|
||||
|
||||
* v2.0.0 (05 December 2023)
|
||||
- Architecture rewrite to support more frontends besides QtWidgets and QtQuick.
|
||||
2.0 isn't very interesting for users, but will allow developers to make KDDW
|
||||
support other GUI frameworks more easily. Also QtQuick is now better integrated,
|
||||
without being shoehorned with ifdefs into the QtWidgets implementation.
|
||||
- Split into a view/controller architecture
|
||||
- Non-gui logic moved to controllers
|
||||
- Each controller has a gui counter part, implemented for each supported frontend
|
||||
- Uses nlohmann JSON library (MIT) instead of QJsonDocument, for saving/restoring layouts
|
||||
- Added Config::setStartDragDistance()
|
||||
- Removed Config::setTabbingAllowedFunc() which was already deprecated in favor of Config::setDropIndicatorAllowedFunc()
|
||||
- Slint and Flutter WIP. Waiting for these frameworks to support multi-window before finishing.
|
||||
- Blacklisted Qt 6.6.1 and 6.5.3 on Windows due to QTBUG-117704
|
||||
|
||||
* v1.7.1 (unreleased)
|
||||
- Fixed pin button appearing by mistake when using Flag_TitleBarNoFloatButton (#359)
|
||||
- Added Config::Flag_AutoHideAsTabGroups, which allows all tabs to go to/from sidebar at once.
|
||||
- Fixed resize gap of auto-hide overlay resize on its left border
|
||||
- Blacklisted Qt 6.6.1 and 6.5.3 on Windows due to QTBUG-117704
|
||||
|
||||
* v1.7.0 (03 May 2023)
|
||||
- Introduce DockWidget::setFloatingWindowFlags(flags). Allows for different
|
||||
FloatingWindows to have different window flags. For example, some having
|
||||
Qt::Tool while others having Qt::Window (#314).
|
||||
- Fixed fixed-sized windows being able to be resized on Windows (#345)
|
||||
- Allow restoring layouts without touching floating dock widgets
|
||||
- Fix setDropIndicatorsInhibited(false) not showing drop indicators (#334, #337)
|
||||
- Fix relayouting when dock widget is deleted directly (#336)
|
||||
- Minor performance improvement: Cache TitleBar icons
|
||||
- Save side bar overlay geometry when frame is resized
|
||||
- Fixed case of corrupt layout when using setDockWidgetFactoryFunc()
|
||||
- Fix layout scaling factor when main window is native
|
||||
- Fix moving floating windows to negative positions (#321)
|
||||
- Fixed using normal geometry of platform window if fractional scaling is enabled
|
||||
- Allow to specify Qt::Tool or Qt::Window per floating window
|
||||
|
||||
* v1.6.0 (14 September 2022)
|
||||
- Minimum Qt6 version is now 6.2.0
|
||||
- Minimum CMake version is now 3.12.0
|
||||
- Fixed restoring of normal geometry when closing a maximized window (#259)
|
||||
- Experimental support for docking into dock widgets which are in a MDI area.
|
||||
- Fixed potential crash involving infinite loop between QWidget::create() and QWidget::createWinId()
|
||||
- Moved DropIndicatorOverlayInterface::DropLocation enum to KDDockWidgets namespace scope
|
||||
- Added Config::setDropIndicatorAllowedFunc() and corresponding example
|
||||
(kddockwidgets_example --hide-certain-docking-indicators)
|
||||
- Fixed case where unfloating wouldn't restore to the main window (#44 and #96)
|
||||
- Fixed MainWindow not propagating close events to docked widgets
|
||||
- X11: Improved detecting which window is under the cursor, by using native X11 API
|
||||
- X11: Fixed dragging a maximized floating window. Its size is now restored to normal size when the drag starts.
|
||||
- Added DockWidgetBase::currentTabIndex()
|
||||
- Added InitialVisibilityOption::PreserveCurrentTab
|
||||
- Added MainWindow::internalLayout() for advanced customization
|
||||
|
||||
* v1.5.0 (24 November 2021)
|
||||
- Install the Python bindings to "site-packages"
|
||||
- The Python bindings for Qt6 use the "PyKDDockWidgetsQt6" namespace
|
||||
- Co-installable with Qt6
|
||||
- Adds support for non-detachable central widget, MainWindowOption_HasCentralWidget. (#225)
|
||||
- Fix corrupt layout when restoring old JSON
|
||||
- Fix "Unpin" button not showing up in overlayed widgets
|
||||
- Minimum Qt version is now 5.15
|
||||
|
||||
* v1.4.0 (16 July 2021)
|
||||
- No longer supports Qt versions less than 5.12
|
||||
- Experimental MDI support. By using MainWindowMDI you can now have "docked" dock widgets
|
||||
which are free to be arbitrarily positioned and even overlapped inside the main window.
|
||||
- TitleBar's height is now controlled by sizeHint() instead of hardcoded.
|
||||
If you haven't overridden TitleBar or just inheriting from TitleBarWidget then there's nothing to do,
|
||||
as TitleBarWidget already reimplements sizeHint. If you're inheriting directly from TitleBar then make
|
||||
sure to provide a sizeHint.
|
||||
- Added MainWindow::closeDockWidgets()
|
||||
- Fixed crash in MainWindow::layoutEqually()
|
||||
- QtQuick: Added more declarative API
|
||||
- FloatingWindow now honours the dockwidget's max-size, if there's a single
|
||||
dock widget docked. Tabbed cases are more difficult since QStackedLayout doesn't
|
||||
propagate size constraints.
|
||||
- Added MainWindowBase::groupCountChanged()
|
||||
- Introduced Config::setDropIndicatorsInhibited(), which allows you to disable support
|
||||
for drop indicators while dragging.
|
||||
- Fixed embedding the main window into a non-kddw main window (#204, #168)
|
||||
- Fixed crash with an MFC application
|
||||
- Allows to disable translucency via the KDDW_NO_TRANSLUCENCY env var, useful
|
||||
in case running on weird Window Managers.
|
||||
- Added Flag_ShowButtonsOnTabBarIfTitleBarHidden, which can be used when using Flag_HideTitleBarWhenTabsVisible.
|
||||
The close and float buttons will be shown directly in the tab-bar.
|
||||
- Fixes persistent central frame being invisible after closing all tabs (#220)
|
||||
- Added python bindings for the InitialOption struct (#198)
|
||||
- Generate and install camelcase forwarding headers (public, exported classes)
|
||||
- Build in Release mode by default (in non-developer situations)
|
||||
|
||||
* v1.3.1 (7 June 2021)
|
||||
- Improve restoring layout when RestoreOption_RelativeToMainWindow is used (#171)
|
||||
- Improved dragging windows across screens in mixed hdpi setups
|
||||
- Fixed Flag_NativeTitleBar not hiding the client title bars when restoring (#170)
|
||||
- Double clicking a native title bar of a Qt::Tool window will now redock the window (#173)
|
||||
- Size of FloatingWindow now accounts for the fact that it's using Flag_NativeTitleBar and
|
||||
resizes its content accordingly (#174)
|
||||
- Fixed popups on overlayed dock widgets not working
|
||||
- Don't restore maximized state when using RestoreOption_RelativeToMainWindow (#184)
|
||||
|
||||
* v1.3.0 (8 February 2021)
|
||||
- Experimental QtQuick support (#49)
|
||||
- Added static DockWidgetBase::byName() (#126)
|
||||
- The enum KDDockWidgets::AddingOption has been deprecated, use
|
||||
KDDockWidgets::InitialVisibilityOption instead
|
||||
- You can now pass a preferred initial size to MainWindow::addDockWidget() (#95)
|
||||
- Added DockWidgetBase::Option_DeleteOnClose
|
||||
- Added Config::Flag_CloseOnlyCurrentTab
|
||||
- PySide6 support
|
||||
- Layout restorer now restores maximzied/minimized state too (#81)
|
||||
- Fixed dock indicators sometimes not appearing on Windows (#103)
|
||||
- Fixed Flag_NativeTitleBar not working
|
||||
- Fixed drag offset when dragging too fast with mouse
|
||||
- Fixed bug where last tab index position wouldn't be remembered in case user
|
||||
had manually reordered tabs (#154)
|
||||
- Fixed crash when hosting a QQuickWidget (#150)
|
||||
- Fixed CMake Visual Studio generator not working
|
||||
- Sidebar overlays now maintain their size when toggled (#155)
|
||||
- Added DockWidget::setFloatingGeometry() (#144)
|
||||
|
||||
* v1.2.1 (6 February 2021)
|
||||
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
||||
- Fixed title bar close button enabled state not being restored with Layout saver (#137)
|
||||
- Installs a version header (kddockwidgets_version.h) that defines a version string and other useful versioning macros (#138)
|
||||
- DockWidgetBase::eventFilter() is protected instead of private (regression vs v1.1) (#148)
|
||||
It's recommended that you rebuild your application when updating KDDW, as MSVC encodes private/protected in the name mangling.
|
||||
- Fixed WASM build on Windows (#163)
|
||||
- Fixed sidebar overlay not getting hidden when clicking on the main window docking area (#157)
|
||||
|
||||
* v1.2.0 (17 December 2020)
|
||||
- Wayland support
|
||||
- Added Flag_KeepAboveIfNotUtilityWindow, so you can have keep above even if
|
||||
floating window is shown in the task-bar.
|
||||
- Added DockWidget::windowActiveAboutToChange() signal
|
||||
- Added support for Qt6 (PySide6 support is lacking)
|
||||
- Added WASM support
|
||||
|
||||
* v1.1.1 (11 December 2020)
|
||||
- Windows: Fixed a crash when clicking on the close button for floating windows in some situations (#110)
|
||||
- Don't show dock/undock icon when dockwidget is not dockable (#99)
|
||||
|
||||
* v1.1.0 (26 October 2020)
|
||||
- New drop indicator style type: Segmented Indicators
|
||||
- Windows: Drop Shadow for floating windows
|
||||
- Added AutoHide / SideBar support
|
||||
- Added FocusScope support
|
||||
- Added DockWidget::isFocused() and DockWidgetBase::isFocusedChanged()
|
||||
- Added Config::Flag_AlwaysTitleBarWhenFloating, which complements Flag_HideTitleBarWhenTabsVisible
|
||||
- Added Config::Flag_DontUseUtilityWindowsForFloating
|
||||
- Added Config::Flag_TitleBarHasMinimizeButton
|
||||
- Added Config::Flag_TitleBarNoFloatButton
|
||||
- Added Config::Flag_AutoHideSupport
|
||||
- Added Config::setTabbingAllowedFunc(TabbingAllowedFunc func)
|
||||
- HDPI improvements, new high-res icons
|
||||
- Bugfixes:
|
||||
- Windows: Fixed windows not having proper minimum size.
|
||||
- Windows: Fixed moving windows across screens with different DPI (#72)
|
||||
- Don't center floating windows if the user set a custom position (#75)
|
||||
- Fixed floating window's title not being correct (#74)
|
||||
- Fixed focus scope not reacting when clicking on current tab (#71)
|
||||
- Fixed floating window borders not being rendered correctly on HDPI due to rounding errors.
|
||||
- cmake/Python - don't require pkg-config, only use if available (#68)
|
||||
|
||||
* v1.0.0 (2 September 2020)
|
||||
- PySide2 bindings
|
||||
- Rewrote the layouting engine, resulting in a huge stability gain and makes it easy to add new features
|
||||
- Honour min/max sizes and some QSizePolicy heuristics
|
||||
- Lazy resize (resize only when dropping the separator)
|
||||
- Native Windows dragging (supporting Aero-snap)
|
||||
- Allow to hide TitleBar and just show tabs. Allow dragging via the tab bar.
|
||||
- Reordering tabs with mouse
|
||||
- Partial layout save/restore (affecting only a subset)
|
||||
- Double-click on title bar to maximize
|
||||
- Maximize button on the title bar
|
||||
- HDPI: Relative layouting restore
|
||||
- Allow to make a dock widget non-closable and non-dockable
|
||||
- Show close button on tabs
|
||||
- Multiple Main Window support
|
||||
- Allowing to dock on different parents
|
||||
- Support for affinities, making some dock widgets only dockable on certain main windows
|
||||
- 200 unit-tests
|
||||
- Fuzzer which found plenty of crashes in the old layouting engine
|
||||
- ASAN fixes
|
||||
- Double click on separator to distribute equally
|
||||
- Hovering over an indicator returns the true size that the dropped widget will get
|
||||
- Static build support
|
||||
- Namespaced Qt support
|
||||
- Dozens of crash fixes, bugs and much more...
|
||||
|
||||
* v0.1 (4 November 2019)
|
||||
- Initial Release and blog
|
||||
1029
3rdparty/kddockwidgets/LICENSE.GPL.txt
vendored
Normal file
1029
3rdparty/kddockwidgets/LICENSE.GPL.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
3rdparty/kddockwidgets/LICENSE.txt
vendored
Normal file
7
3rdparty/kddockwidgets/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
KDDockWidgets © Klarälvdalens Datakonsult AB (KDAB) and is licensed according
|
||||
to the terms of the:
|
||||
GNU General Public License version 2.0 (see LICENSES/GPL-2.0-only.txt)
|
||||
or the
|
||||
GNU General Public License version 3.0 (see LICENSES/GPL-3.0-only.txt).
|
||||
|
||||
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
||||
28
3rdparty/kddockwidgets/LICENSES/BSD-3-Clause.txt
vendored
Normal file
28
3rdparty/kddockwidgets/LICENSES/BSD-3-Clause.txt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
Copyright (c) <year> <owner>. All rights reserved.
|
||||
|
||||
This license applies to the CMake ECM modules only.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
319
3rdparty/kddockwidgets/LICENSES/GPL-2.0-only.txt
vendored
Normal file
319
3rdparty/kddockwidgets/LICENSES/GPL-2.0-only.txt
vendored
Normal file
@@ -0,0 +1,319 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software
|
||||
is covered by the GNU Lesser General Public License instead.) You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for this service if you
|
||||
wish), that you receive source code or can get it if you want it, that you
|
||||
can change the software or use pieces of it in new free programs; and that
|
||||
you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to
|
||||
deny you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of
|
||||
the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must give the recipients all the rights that you have. You
|
||||
must make sure that they, too, receive or can get the source code. And you
|
||||
must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If
|
||||
the software is modified by someone else and passed on, we want its recipients
|
||||
to know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will individually
|
||||
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||
this, we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms
|
||||
of this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or translated
|
||||
into another language. (Hereinafter, translation is included without limitation
|
||||
in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered
|
||||
by this License; they are outside its scope. The act of running the Program
|
||||
is not restricted, and the output from the Program is covered only if its
|
||||
contents constitute a work based on the Program (independent of having been
|
||||
made by running the Program). Whether that is true depends on what the Program
|
||||
does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code
|
||||
as you receive it, in any medium, provided that you conspicuously and appropriately
|
||||
publish on each copy an appropriate copyright notice and disclaimer of warranty;
|
||||
keep intact all the notices that refer to this License and to the absence
|
||||
of any warranty; and give any other recipients of the Program a copy of this
|
||||
License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you
|
||||
may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it,
|
||||
thus forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all
|
||||
of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that
|
||||
you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of this
|
||||
License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the most
|
||||
ordinary way, to print or display an announcement including an appropriate
|
||||
copyright notice and a notice that there is no warranty (or else, saying that
|
||||
you provide a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this License.
|
||||
(Exception: if the Program itself is interactive but does not normally print
|
||||
such an announcement, your work based on the Program is not required to print
|
||||
an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License,
|
||||
and its terms, do not apply to those sections when you distribute them as
|
||||
separate works. But when you distribute the same sections as part of a whole
|
||||
which is a work based on the Program, the distribution of the whole must be
|
||||
on the terms of this License, whose permissions for other licensees extend
|
||||
to the entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise
|
||||
the right to control the distribution of derivative or collective works based
|
||||
on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with
|
||||
the Program (or with a work based on the Program) on a volume of a storage
|
||||
or distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section
|
||||
2) in object code or executable form under the terms of Sections 1 and 2 above
|
||||
provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code,
|
||||
which must be distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give
|
||||
any third party, for a charge no more than your cost of physically performing
|
||||
source distribution, a complete machine-readable copy of the corresponding
|
||||
source code, to be distributed under the terms of Sections 1 and 2 above on
|
||||
a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute
|
||||
corresponding source code. (This alternative is allowed only for noncommercial
|
||||
distribution and only if you received the program in object code or executable
|
||||
form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code distributed
|
||||
need not include anything that is normally distributed (in either source or
|
||||
binary form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component itself
|
||||
accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to
|
||||
copy from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place counts as distribution of the source code,
|
||||
even though third parties are not compelled to copy the source along with
|
||||
the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except
|
||||
as expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses terminated
|
||||
so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed
|
||||
it. However, nothing else grants you permission to modify or distribute the
|
||||
Program or its derivative works. These actions are prohibited by law if you
|
||||
do not accept this License. Therefore, by modifying or distributing the Program
|
||||
(or any work based on the Program), you indicate your acceptance of this License
|
||||
to do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor
|
||||
to copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of
|
||||
the rights granted herein. You are not responsible for enforcing compliance
|
||||
by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement
|
||||
or for any other reason (not limited to patent issues), conditions are imposed
|
||||
on you (whether by court order, agreement or otherwise) that contradict the
|
||||
conditions of this License, they do not excuse you from the conditions of
|
||||
this License. If you cannot distribute so as to satisfy simultaneously your
|
||||
obligations under this License and any other pertinent obligations, then as
|
||||
a consequence you may not distribute the Program at all. For example, if a
|
||||
patent license would not permit royalty-free redistribution of the Program
|
||||
by all those who receive copies directly or indirectly through you, then the
|
||||
only way you could satisfy both it and this License would be to refrain entirely
|
||||
from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents
|
||||
or other property right claims or to contest validity of any such claims;
|
||||
this section has the sole purpose of protecting the integrity of the free
|
||||
software distribution system, which is implemented by public license practices.
|
||||
Many people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose
|
||||
that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original copyright
|
||||
holder who places the Program under this License may add an explicit geographical
|
||||
distribution limitation excluding those countries, so that distribution is
|
||||
permitted only in or among countries not thus excluded. In such case, this
|
||||
License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of
|
||||
the General Public License from time to time. Such new versions will be similar
|
||||
in spirit to the present version, but may differ in detail to address new
|
||||
problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies
|
||||
a version number of this License which applies to it and "any later version",
|
||||
you have the option of following the terms and conditions either of that version
|
||||
or of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of this License, you may choose
|
||||
any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing and reuse
|
||||
of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
|
||||
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
|
||||
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
|
||||
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
|
||||
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
|
||||
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and an idea of what it does.>
|
||||
|
||||
Copyright (C)< yyyy> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when
|
||||
it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,
|
||||
and you are welcome to redistribute it under certain conditions; type `show
|
||||
c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than `show w' and `show c'; they could even be mouse-clicks
|
||||
or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
|
||||
(which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon >, 1 April 1989 Ty Coon, President of Vice This General
|
||||
Public License does not permit incorporating your program into proprietary
|
||||
programs. If your program is a subroutine library, you may consider it more
|
||||
useful to permit linking proprietary applications with the library. If this
|
||||
is what you want to do, use the GNU Lesser General Public License instead
|
||||
of this License.
|
||||
625
3rdparty/kddockwidgets/LICENSES/GPL-3.0-only.txt
vendored
Normal file
625
3rdparty/kddockwidgets/LICENSES/GPL-3.0-only.txt
vendored
Normal file
@@ -0,0 +1,625 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and
|
||||
other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take
|
||||
away your freedom to share and change the works. By contrast, the GNU General
|
||||
Public License is intended to guarantee your freedom to share and change all
|
||||
versions of a program--to make sure it remains free software for all its users.
|
||||
We, the Free Software Foundation, use the GNU General Public License for most
|
||||
of our software; it applies also to any other work released this way by its
|
||||
authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for them if you wish), that
|
||||
you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs, and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights
|
||||
or asking you to surrender the rights. Therefore, you have certain responsibilities
|
||||
if you distribute copies of the software, or if you modify it: responsibilities
|
||||
to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must pass on to the recipients the same freedoms that you received.
|
||||
You must make sure that they, too, receive or can get the source code. And
|
||||
you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert
|
||||
copyright on the software, and (2) offer you this License giving you legal
|
||||
permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that
|
||||
there is no warranty for this free software. For both users' and authors'
|
||||
sake, the GPL requires that modified versions be marked as changed, so that
|
||||
their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified
|
||||
versions of the software inside them, although the manufacturer can do so.
|
||||
This is fundamentally incompatible with the aim of protecting users' freedom
|
||||
to change the software. The systematic pattern of such abuse occurs in the
|
||||
area of products for individuals to use, which is precisely where it is most
|
||||
unacceptable. Therefore, we have designed this version of the GPL to prohibit
|
||||
the practice for those products. If such problems arise substantially in other
|
||||
domains, we stand ready to extend this provision to those domains in future
|
||||
versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States
|
||||
should not allow patents to restrict development and use of software on general-purpose
|
||||
computers, but in those that do, we wish to avoid the special danger that
|
||||
patents applied to a free program could make it effectively proprietary. To
|
||||
prevent this, the GPL assures that patents cannot be used to render the program
|
||||
non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of works,
|
||||
such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this License.
|
||||
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
|
||||
or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work in
|
||||
a fashion requiring copyright permission, other than the making of an exact
|
||||
copy. The resulting work is called a "modified version" of the earlier work
|
||||
or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based on the
|
||||
Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without permission,
|
||||
would make you directly or secondarily liable for infringement under applicable
|
||||
copyright law, except executing it on a computer or modifying a private copy.
|
||||
Propagation includes copying, distribution (with or without modification),
|
||||
making available to the public, and in some countries other activities as
|
||||
well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other parties
|
||||
to make or receive copies. Mere interaction with a user through a computer
|
||||
network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to the
|
||||
extent that it includes a convenient and prominently visible feature that
|
||||
(1) displays an appropriate copyright notice, and (2) tells the user that
|
||||
there is no warranty for the work (except to the extent that warranties are
|
||||
provided), that licensees may convey the work under this License, and how
|
||||
to view a copy of this License. If the interface presents a list of user commands
|
||||
or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for making
|
||||
modifications to it. "Object code" means any non-source form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official standard
|
||||
defined by a recognized standards body, or, in the case of interfaces specified
|
||||
for a particular programming language, one that is widely used among developers
|
||||
working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other than
|
||||
the work as a whole, that (a) is included in the normal form of packaging
|
||||
a Major Component, but which is not part of that Major Component, and (b)
|
||||
serves only to enable use of the work with that Major Component, or to implement
|
||||
a Standard Interface for which an implementation is available to the public
|
||||
in source code form. A "Major Component", in this context, means a major essential
|
||||
component (kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to produce
|
||||
the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all the source
|
||||
code needed to generate, install, and (for an executable work) run the object
|
||||
code and to modify the work, including scripts to control those activities.
|
||||
However, it does not include the work's System Libraries, or general-purpose
|
||||
tools or generally available free programs which are used unmodified in performing
|
||||
those activities but which are not part of the work. For example, Corresponding
|
||||
Source includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically linked
|
||||
subprograms that the work is specifically designed to require, such as by
|
||||
intimate data communication or control flow between those subprograms and
|
||||
other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate
|
||||
automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of copyright
|
||||
on the Program, and are irrevocable provided the stated conditions are met.
|
||||
This License explicitly affirms your unlimited permission to run the unmodified
|
||||
Program. The output from running a covered work is covered by this License
|
||||
only if the output, given its content, constitutes a covered work. This License
|
||||
acknowledges your rights of fair use or other equivalent, as provided by copyright
|
||||
law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without
|
||||
conditions so long as your license otherwise remains in force. You may convey
|
||||
covered works to others for the sole purpose of having them make modifications
|
||||
exclusively for you, or provide you with facilities for running those works,
|
||||
provided that you comply with the terms of this License in conveying all material
|
||||
for which you do not control copyright. Those thus making or running the covered
|
||||
works for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of your copyrighted
|
||||
material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions
|
||||
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological measure
|
||||
under any applicable law fulfilling obligations under article 11 of the WIPO
|
||||
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
|
||||
or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention
|
||||
of technological measures to the extent such circumvention is effected by
|
||||
exercising rights under this License with respect to the covered work, and
|
||||
you disclaim any intention to limit operation or modification of the work
|
||||
as a means of enforcing, against the work's users, your or third parties'
|
||||
legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you receive
|
||||
it, in any medium, provided that you conspicuously and appropriately publish
|
||||
on each copy an appropriate copyright notice; keep intact all notices stating
|
||||
that this License and any non-permissive terms added in accord with section
|
||||
7 apply to the code; keep intact all notices of the absence of any warranty;
|
||||
and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you
|
||||
may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to produce
|
||||
it from the Program, in the form of source code under the terms of section
|
||||
4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and
|
||||
giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under
|
||||
this License and any conditions added under section 7. This requirement modifies
|
||||
the requirement in section 4 to "keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone
|
||||
who comes into possession of a copy. This License will therefore apply, along
|
||||
with any applicable section 7 additional terms, to the whole of the work,
|
||||
and all its parts, regardless of how they are packaged. This License gives
|
||||
no permission to license the work in any other way, but it does not invalidate
|
||||
such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate
|
||||
Legal Notices; however, if the Program has interactive interfaces that do
|
||||
not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works,
|
||||
which are not by their nature extensions of the covered work, and which are
|
||||
not combined with it such as to form a larger program, in or on a volume of
|
||||
a storage or distribution medium, is called an "aggregate" if the compilation
|
||||
and its resulting copyright are not used to limit the access or legal rights
|
||||
of the compilation's users beyond what the individual works permit. Inclusion
|
||||
of a covered work in an aggregate does not cause this License to apply to
|
||||
the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of sections
|
||||
4 and 5, provided that you also convey the machine-readable Corresponding
|
||||
Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including
|
||||
a physical distribution medium), accompanied by the Corresponding Source fixed
|
||||
on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including
|
||||
a physical distribution medium), accompanied by a written offer, valid for
|
||||
at least three years and valid for as long as you offer spare parts or customer
|
||||
support for that product model, to give anyone who possesses the object code
|
||||
either (1) a copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical medium customarily
|
||||
used for software interchange, for a price no more than your reasonable cost
|
||||
of physically performing this conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written
|
||||
offer to provide the Corresponding Source. This alternative is allowed only
|
||||
occasionally and noncommercially, and only if you received the object code
|
||||
with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis
|
||||
or for a charge), and offer equivalent access to the Corresponding Source
|
||||
in the same way through the same place at no further charge. You need not
|
||||
require recipients to copy the Corresponding Source along with the object
|
||||
code. If the place to copy the object code is a network server, the Corresponding
|
||||
Source may be on a different server (operated by you or a third party) that
|
||||
supports equivalent copying facilities, provided you maintain clear directions
|
||||
next to the object code saying where to find the Corresponding Source. Regardless
|
||||
of what server hosts the Corresponding Source, you remain obligated to ensure
|
||||
that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform
|
||||
other peers where the object code and Corresponding Source of the work are
|
||||
being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from
|
||||
the Corresponding Source as a System Library, need not be included in conveying
|
||||
the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any tangible
|
||||
personal property which is normally used for personal, family, or household
|
||||
purposes, or (2) anything designed or sold for incorporation into a dwelling.
|
||||
In determining whether a product is a consumer product, doubtful cases shall
|
||||
be resolved in favor of coverage. For a particular product received by a particular
|
||||
user, "normally used" refers to a typical or common use of that class of product,
|
||||
regardless of the status of the particular user or of the way in which the
|
||||
particular user actually uses, or expects or is expected to use, the product.
|
||||
A product is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent the
|
||||
only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods, procedures,
|
||||
authorization keys, or other information required to install and execute modified
|
||||
versions of a covered work in that User Product from a modified version of
|
||||
its Corresponding Source. The information must suffice to ensure that the
|
||||
continued functioning of the modified object code is in no case prevented
|
||||
or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically
|
||||
for use in, a User Product, and the conveying occurs as part of a transaction
|
||||
in which the right of possession and use of the User Product is transferred
|
||||
to the recipient in perpetuity or for a fixed term (regardless of how the
|
||||
transaction is characterized), the Corresponding Source conveyed under this
|
||||
section must be accompanied by the Installation Information. But this requirement
|
||||
does not apply if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has been installed
|
||||
in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement
|
||||
to continue to provide support service, warranty, or updates for a work that
|
||||
has been modified or installed by the recipient, or for the User Product in
|
||||
which it has been modified or installed. Access to a network may be denied
|
||||
when the modification itself materially and adversely affects the operation
|
||||
of the network or violates the rules and protocols for communication across
|
||||
the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord
|
||||
with this section must be in a format that is publicly documented (and with
|
||||
an implementation available to the public in source code form), and must require
|
||||
no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this License
|
||||
by making exceptions from one or more of its conditions. Additional permissions
|
||||
that are applicable to the entire Program shall be treated as though they
|
||||
were included in this License, to the extent that they are valid under applicable
|
||||
law. If additional permissions apply only to part of the Program, that part
|
||||
may be used separately under those permissions, but the entire Program remains
|
||||
governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any
|
||||
additional permissions from that copy, or from any part of it. (Additional
|
||||
permissions may be written to require their own removal in certain cases when
|
||||
you modify the work.) You may place additional permissions on material, added
|
||||
by you to a covered work, for which you have or can give appropriate copyright
|
||||
permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add
|
||||
to a covered work, you may (if authorized by the copyright holders of that
|
||||
material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of
|
||||
sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author
|
||||
attributions in that material or in the Appropriate Legal Notices displayed
|
||||
by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring
|
||||
that modified versions of such material be marked in reasonable ways as different
|
||||
from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors
|
||||
of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names,
|
||||
trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by
|
||||
anyone who conveys the material (or modified versions of it) with contractual
|
||||
assumptions of liability to the recipient, for any liability that these contractual
|
||||
assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further restrictions"
|
||||
within the meaning of section 10. If the Program as you received it, or any
|
||||
part of it, contains a notice stating that it is governed by this License
|
||||
along with a term that is a further restriction, you may remove that term.
|
||||
If a license document contains a further restriction but permits relicensing
|
||||
or conveying under this License, you may add to a covered work material governed
|
||||
by the terms of that license document, provided that the further restriction
|
||||
does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place,
|
||||
in the relevant source files, a statement of the additional terms that apply
|
||||
to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form
|
||||
of a separately written license, or stated as exceptions; the above requirements
|
||||
apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly provided
|
||||
under this License. Any attempt otherwise to propagate or modify it is void,
|
||||
and will automatically terminate your rights under this License (including
|
||||
any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from
|
||||
a particular copyright holder is reinstated (a) provisionally, unless and
|
||||
until the copyright holder explicitly and finally terminates your license,
|
||||
and (b) permanently, if the copyright holder fails to notify you of the violation
|
||||
by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently
|
||||
if the copyright holder notifies you of the violation by some reasonable means,
|
||||
this is the first time you have received notice of violation of this License
|
||||
(for any work) from that copyright holder, and you cure the violation prior
|
||||
to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses
|
||||
of parties who have received copies or rights from you under this License.
|
||||
If your rights have been terminated and not permanently reinstated, you do
|
||||
not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run a copy
|
||||
of the Program. Ancillary propagation of a covered work occurring solely as
|
||||
a consequence of using peer-to-peer transmission to receive a copy likewise
|
||||
does not require acceptance. However, nothing other than this License grants
|
||||
you permission to propagate or modify any covered work. These actions infringe
|
||||
copyright if you do not accept this License. Therefore, by modifying or propagating
|
||||
a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically receives
|
||||
a license from the original licensors, to run, modify and propagate that work,
|
||||
subject to this License. You are not responsible for enforcing compliance
|
||||
by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an organization,
|
||||
or substantially all assets of one, or subdividing an organization, or merging
|
||||
organizations. If propagation of a covered work results from an entity transaction,
|
||||
each party to that transaction who receives a copy of the work also receives
|
||||
whatever licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the Corresponding
|
||||
Source of the work from the predecessor in interest, if the predecessor has
|
||||
it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights
|
||||
granted or affirmed under this License. For example, you may not impose a
|
||||
license fee, royalty, or other charge for exercise of rights granted under
|
||||
this License, and you may not initiate litigation (including a cross-claim
|
||||
or counterclaim in a lawsuit) alleging that any patent claim is infringed
|
||||
by making, using, selling, offering for sale, or importing the Program or
|
||||
any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this License
|
||||
of the Program or a work on which the Program is based. The work thus licensed
|
||||
is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned or controlled
|
||||
by the contributor, whether already acquired or hereafter acquired, that would
|
||||
be infringed by some manner, permitted by this License, of making, using,
|
||||
or selling its contributor version, but do not include claims that would be
|
||||
infringed only as a consequence of further modification of the contributor
|
||||
version. For purposes of this definition, "control" includes the right to
|
||||
grant patent sublicenses in a manner consistent with the requirements of this
|
||||
License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
|
||||
license under the contributor's essential patent claims, to make, use, sell,
|
||||
offer for sale, import and otherwise run, modify and propagate the contents
|
||||
of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express agreement
|
||||
or commitment, however denominated, not to enforce a patent (such as an express
|
||||
permission to practice a patent or covenant not to sue for patent infringement).
|
||||
To "grant" such a patent license to a party means to make such an agreement
|
||||
or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the
|
||||
Corresponding Source of the work is not available for anyone to copy, free
|
||||
of charge and under the terms of this License, through a publicly available
|
||||
network server or other readily accessible means, then you must either (1)
|
||||
cause the Corresponding Source to be so available, or (2) arrange to deprive
|
||||
yourself of the benefit of the patent license for this particular work, or
|
||||
(3) arrange, in a manner consistent with the requirements of this License,
|
||||
to extend the patent license to downstream recipients. "Knowingly relying"
|
||||
means you have actual knowledge that, but for the patent license, your conveying
|
||||
the covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that country
|
||||
that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement,
|
||||
you convey, or propagate by procuring conveyance of, a covered work, and grant
|
||||
a patent license to some of the parties receiving the covered work authorizing
|
||||
them to use, propagate, modify or convey a specific copy of the covered work,
|
||||
then the patent license you grant is automatically extended to all recipients
|
||||
of the covered work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the scope
|
||||
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
|
||||
of one or more of the rights that are specifically granted under this License.
|
||||
You may not convey a covered work if you are a party to an arrangement with
|
||||
a third party that is in the business of distributing software, under which
|
||||
you make payment to the third party based on the extent of your activity of
|
||||
conveying the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by you
|
||||
(or copies made from those copies), or (b) primarily for and in connection
|
||||
with specific products or compilations that contain the covered work, unless
|
||||
you entered into that arrangement, or that patent license was granted, prior
|
||||
to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied
|
||||
license or other defenses to infringement that may otherwise be available
|
||||
to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise)
|
||||
that contradict the conditions of this License, they do not excuse you from
|
||||
the conditions of this License. If you cannot convey a covered work so as
|
||||
to satisfy simultaneously your obligations under this License and any other
|
||||
pertinent obligations, then as a consequence you may not convey it at all.
|
||||
For example, if you agree to terms that obligate you to collect a royalty
|
||||
for further conveying from those to whom you convey the Program, the only
|
||||
way you could satisfy both those terms and this License would be to refrain
|
||||
entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have permission to
|
||||
link or combine any covered work with a work licensed under version 3 of the
|
||||
GNU Affero General Public License into a single combined work, and to convey
|
||||
the resulting work. The terms of this License will continue to apply to the
|
||||
part which is the covered work, but the special requirements of the GNU Affero
|
||||
General Public License, section 13, concerning interaction through a network
|
||||
will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the
|
||||
GNU General Public License from time to time. Such new versions will be similar
|
||||
in spirit to the present version, but may differ in detail to address new
|
||||
problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies
|
||||
that a certain numbered version of the GNU General Public License "or any
|
||||
later version" applies to it, you have the option of following the terms and
|
||||
conditions either of that numbered version or of any later version published
|
||||
by the Free Software Foundation. If the Program does not specify a version
|
||||
number of the GNU General Public License, you may choose any version ever
|
||||
published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of
|
||||
the GNU General Public License can be used, that proxy's public statement
|
||||
of acceptance of a version permanently authorizes you to choose that version
|
||||
for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However,
|
||||
no additional obligations are imposed on any author or copyright holder as
|
||||
a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
|
||||
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
|
||||
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM
|
||||
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
|
||||
USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
|
||||
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot
|
||||
be given local legal effect according to their terms, reviewing courts shall
|
||||
apply local law that most closely approximates an absolute waiver of all civil
|
||||
liability in connection with the Program, unless a warranty or assumption
|
||||
of liability accompanies a copy of the Program in return for a fee. END OF
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively state the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like
|
||||
this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
|
||||
This is free software, and you are welcome to redistribute it under certain
|
||||
conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands might
|
||||
be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
||||
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General Public
|
||||
License instead of this License. But first, please read <https://www.gnu.org/
|
||||
licenses /why-not-lgpl.html>.
|
||||
22
3rdparty/kddockwidgets/LICENSES/LicenseRef-FlutterBSD.txt
vendored
Normal file
22
3rdparty/kddockwidgets/LICENSES/LicenseRef-FlutterBSD.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/ Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following
|
||||
// disclaimer in the documentation and/or other materials provided
|
||||
// with the distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
9
3rdparty/kddockwidgets/LICENSES/MIT.txt
vendored
Normal file
9
3rdparty/kddockwidgets/LICENSES/MIT.txt
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
42
3rdparty/kddockwidgets/README-QtQuick.md
vendored
Normal file
42
3rdparty/kddockwidgets/README-QtQuick.md
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# KDDockWidgets and QtQuick
|
||||
|
||||
## Supported Qt versions and toolchains
|
||||
|
||||
KDDockWidgets for QtQuick requires a C++17 capable compiler and Qt >= 6.2.1.
|
||||
|
||||
Qt 5.15.2 will probably also work, but it's not built and tested by KDAB CI, we
|
||||
advise users to move to Qt6 as soon as possible.
|
||||
|
||||
## Build instructions
|
||||
|
||||
Doing a default build will build a KDDW library that's suitable for both QtWidgets and QtQuick development.<br>
|
||||
This is in contrast with 1.x version, where a separate build for QtQuick was required.
|
||||
|
||||
You can however be explicit and exclude the QtWidgets support:
|
||||
|
||||
`cd build && cmake -DKDDockWidgets_FRONTENDS=qtquick ..`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- QtGraphicalEffects is not supported, as it's buggy when moving between different QWindows.
|
||||
See for example QTBUG-94943, KDDockWidgets issue #213. Also search the Qt bug tracker
|
||||
for "QQuickItem: Cannot use same item on different windows at the same time"
|
||||
|
||||
- Very rarely, in some Nvidia/X11 setups, floating/docking has noticeable lag (like 1 second)
|
||||
This could be solved by going to Nvidia's settings and making sure all monitors have
|
||||
the same refresh rate and disabling "Allow Flipping". It's not known why this solves it. Might also
|
||||
be a bug in Qt.
|
||||
|
||||
- `"EGLFS: OpenGL windows cannot be mixed with others"` QtQuick on EGLFS does not support having more
|
||||
than 1 window. This is a known QtQuick limitation. The QtWidgets stack worksaround this by compositing
|
||||
all windows into a single native window.
|
||||
|
||||
- `module "QtQuick.Controls" is not installed`
|
||||
|
||||
Set the `QML_IMPORT_PATH` env var pointing to your Qt qml plugin dir or check the
|
||||
Qt documentation on how to deploy QtQuick applications.
|
||||
|
||||
```bash
|
||||
# Replace with your actual path
|
||||
export QML_IMPORT_PATH=/home/user/Qt/5.15.2/gcc_64/qml
|
||||
```
|
||||
51
3rdparty/kddockwidgets/README-porting.md
vendored
Normal file
51
3rdparty/kddockwidgets/README-porting.md
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# Porting from v1 to v2
|
||||
|
||||
To make the framework toolkit agnostic to support `QtQuick` and even non-Qt toolkits
|
||||
such as `Flutter` some API changes were required.
|
||||
<br>
|
||||
Each component was split into 2, one part lives in `core/` and is gui agnostic,
|
||||
while the other part lives in a frontend specific folder, such as `qtwidgets/` (or `qtquick/`).
|
||||
|
||||
For example, TitleBar was split into `KDDockWidgets::Core::TitleBar` and
|
||||
`KDDockWidgets::QtWidgets::TitleBar`. The former we call it a `Controller`,
|
||||
while the latter is the `View`. In the QtWidgets case, a view is a `QWidget`,
|
||||
while in QtQuick it's a QQuickItem.
|
||||
|
||||
The main public API didn't change much, but if you're using private API heavily
|
||||
to achieve advanced customizations then take note of these renamings:
|
||||
|
||||
(Assume `::QtQuick::` namespace instead of `::QtWidgets::` if you're on QtQuick).
|
||||
|
||||
- `Frame` was renamed to `Group` as it represents a tab group
|
||||
- `TabWidget` was renamed to `Stack`
|
||||
- `KDDockWidgets::DefaultWidgetFactory` was renamed to `KDDockWidgets::QtWidgets::ViewFactory`
|
||||
- The `*Widget` and `*Quick` classes dropped the suffix and are namespaced instead:
|
||||
- `KDDockWidgets::TitleBarWidget` -> `KDDockWidgets::QtWidgets::TitleBar`
|
||||
- `KDDockWidgets::TitleBarQuick` -> `KDDockWidgets::QtQuick::TitleBar`
|
||||
- Same for DropArea, FloatingWindow, TabBar, Group, Stack, MainWindow, DockWidget
|
||||
- You can include the views for example with `#include <kddockwidgets/qtwidgets/views/TitleBar.h>`.
|
||||
This is only required if you're customizing the default visuals.
|
||||
- `KDDockWidgets::DefaultWidgetFactory::s_dropIndicatorType` is now `KDDockWidgets::Core::ViewFactory::s_dropIndicatorType`
|
||||
|
||||
If some API is missing in the View, try looking in the controller, so, for example,
|
||||
look in `KDDockWidgets::Core::TitleBar` instead of `KDDockWidgets::QtWidgets::TitleBar`.
|
||||
|
||||
## Headers
|
||||
|
||||
Views are in `kddockwidgets/FRONTEND/views/`. Replace FRONTEND with `qtwidgets` or `qtquick`.
|
||||
|
||||
So for example, if you had:
|
||||
|
||||
```c++
|
||||
#include <kddockwidgets/private/widgets/TitleBarWidget_p.h>
|
||||
#include <kddockwidgets/private/TabWidget_p.h>
|
||||
#include <kddockwidgets/private/widgets/TabBarWidget_p.h>
|
||||
```
|
||||
|
||||
You should now have:
|
||||
|
||||
```c++
|
||||
#include <kddockwidgets/qtwidgets/views/TitleBar.h>
|
||||
#include <kddockwidgets/qtwidgets/Stack.h>
|
||||
#include <kddockwidgets/qtwidgets/views/TabBar.h>
|
||||
```
|
||||
3
3rdparty/kddockwidgets/README-troubleshooting
vendored
Normal file
3
3rdparty/kddockwidgets/README-troubleshooting
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# PySide: `ImportError: DLL load failed while importing KDDockWidgets`
|
||||
|
||||
If you're getting this error with Python see issue #114 and the proposed solution there.
|
||||
90
3rdparty/kddockwidgets/README.md
vendored
Normal file
90
3rdparty/kddockwidgets/README.md
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
# KDDockWidgets
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Our [manual](https://kdab.github.io/KDDockWidgets)
|
||||
is the docs entry point for everything related to `KDDockWidgets`.
|
||||
This README only provides minimal information.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
`KDDockWidgets` is a Qt dock widget library written by KDAB, suitable for replacing
|
||||
`QDockWidget` and implementing advanced functionalities missing in Qt.
|
||||
|
||||
Although `KDDockWidgets` is ready to be used out of the box, it can also be seen
|
||||
as a framework to allow building very tailored custom docking systems. It tries
|
||||
to expose every internal widget and every knob for the app developer to tune.
|
||||
|
||||
## Features
|
||||
|
||||
- Provide advanced docking that QDockWidget doesn't support
|
||||
- Native window resize on Windows (allowing for Aero-snap even with custom title bar decorations)
|
||||
- Arrow drop indicators for great drop precision
|
||||
- Allow for totally different, user provided, drop indicator types
|
||||
- Nesting dock widgets in a floating window and docking that group back to main window
|
||||
- Docking to any main window, not only to the parent main window
|
||||
- Docking to center of main window, or simply removing the concept of "central widget"
|
||||
- Main window supporting detachable tabs in center widget
|
||||
- Detaching arbitrary tabs from a tab bar into a dock area
|
||||
- Supporting more than 1 main window
|
||||
- Support for affinities, making some dock widgets only dockable on certain main windows
|
||||
- Allow to hide TitleBar and just show tabs. Allows dragging via the tab bar.
|
||||
- Exposing inner helper widgets so the user can customize them or provide his own
|
||||
- Customize tab widgets
|
||||
- Customize title bars
|
||||
- Customize window frames
|
||||
- Custom widget separators
|
||||
- Cross-platform (macOS, Linux, Windows, WebAssembly, Wayland, X11/XCB, EGLFS are working)
|
||||
See README-Wayland.md and README-WASM.md for platform specific information.
|
||||
- Layouting engine honouring min/max size constraints and some size policies
|
||||
- PySide2 bindings
|
||||
- Clean codebase
|
||||
- Not mixing GUI with state with logic with animations
|
||||
- Great test coverage, even the GUI and DnD operations are tested. 200 tests currently.
|
||||
- Fuzzer for doing random testing and finding bugs
|
||||
- Lazy separator resize
|
||||
- Reordering tabs with mouse
|
||||
- Partial layout save/restore, affecting only a chosen sub-set
|
||||
- Double click on title bar to maximize
|
||||
- Double click on separator to distribute equally
|
||||
- Show close button on tabs
|
||||
- Allow to make a dock widget non-closable and/or non-dockable
|
||||
- Optional minimize and maximize button on the title bar
|
||||
- FloatingWindows can be utility windows or full native
|
||||
|
||||
## Screen capture
|
||||
|
||||

|
||||
|
||||
## Licensing
|
||||
|
||||
KDDockWidgets is © Klarälvdalens Datakonsult AB (KDAB) and is licensed according
|
||||
to the terms of the [GPL 2.0](LICENSES/GPL-2.0-only.txt) or [GPL 3.0](LICENSES/GPL-3.0-only.txt).
|
||||
|
||||
Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
|
||||
|
||||
## About KDAB
|
||||
|
||||
KDDockWidgets is supported and maintained by Klarälvdalens Datakonsult AB (KDAB).
|
||||
|
||||
The KDAB Group is the global No.1 software consultancy for Qt, C++ and
|
||||
OpenGL applications across desktop, embedded and mobile platforms.
|
||||
|
||||
The KDAB Group provides consulting and mentoring for developing Qt applications
|
||||
from scratch and in porting from all popular and legacy frameworks to Qt.
|
||||
We continue to help develop parts of Qt and are one of the major contributors
|
||||
to the Qt Project. We can give advanced or standard trainings anywhere
|
||||
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
||||
|
||||
Please visit <https://www.kdab.com> to meet the people who write code like this.
|
||||
|
||||
Stay up-to-date with KDAB product announcements:
|
||||
|
||||
- [KDAB Newsletter](https://news.kdab.com)
|
||||
- [KDAB Blogs](https://www.kdab.com/category/blogs)
|
||||
- [KDAB on Twitter](https://twitter.com/KDABQt)
|
||||
165
3rdparty/kddockwidgets/REUSE.toml
vendored
Normal file
165
3rdparty/kddockwidgets/REUSE.toml
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
version = 1
|
||||
SPDX-PackageName = "KDDockWidgets"
|
||||
SPDX-PackageSupplier = "<info@kdab.com>"
|
||||
SPDX-PackageDownloadLocation = "https://www.github.com/KDAB/KDDockWidgets"
|
||||
|
||||
#misc source code
|
||||
[[annotations]]
|
||||
path = ["**.qrc", "**.json", "**.xml", "**.ui"]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>"
|
||||
SPDX-License-Identifier = "GPL-2.0-only OR GPL-3.0-only"
|
||||
|
||||
#misc documentation
|
||||
[[annotations]]
|
||||
path = [
|
||||
"CONTRIBUTORS.txt",
|
||||
"Changelog",
|
||||
"README.md",
|
||||
"README-porting.md",
|
||||
"README-QtQuick.md",
|
||||
"README-Flutter.md",
|
||||
"README-WASM.md",
|
||||
"README-Wayland.md",
|
||||
"README-troubleshooting",
|
||||
"3RDPARTY.md",
|
||||
"conan/README.txt",
|
||||
"python/examples/README.txt",
|
||||
"python/examples-qt6/README.txt",
|
||||
"docs_devel/**.md",
|
||||
"docs/KDDockWidgets-CopyrightAssignmentForm.pdf",
|
||||
"**.html",
|
||||
"src/3rdparty/qcoro/README",
|
||||
"examples/qtquick/customseparator/README.md",
|
||||
"docs/book/**",
|
||||
"docs/developer/**.md",
|
||||
"book.toml",
|
||||
".github/actions/qt6-asan/README.md",
|
||||
".github/actions/qt6-lsan/README.md",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>"
|
||||
SPDX-License-Identifier = "GPL-2.0-only OR GPL-3.0-only"
|
||||
|
||||
#misc config files
|
||||
[[annotations]]
|
||||
path = [
|
||||
".pre-commit-config.yaml",
|
||||
".codespellrc",
|
||||
".krazy",
|
||||
".cmake-format.py",
|
||||
".clang-format",
|
||||
".clangd",
|
||||
".clazy",
|
||||
".clang-tidy",
|
||||
".gitignore",
|
||||
".gitmodules",
|
||||
".markdownlint.json",
|
||||
".pep8",
|
||||
".pylintrc",
|
||||
".editorconfig",
|
||||
".shellcheckrc",
|
||||
"mkdocs.yml",
|
||||
".github/workflows/mdbook.yml",
|
||||
"code.code-workspace",
|
||||
"code.code-workspace.template",
|
||||
"docs/api/Doxyfile.cmake",
|
||||
"distro/**",
|
||||
"**.yaml",
|
||||
".github/workflows/pip-requirements.txt",
|
||||
"valgrind.sup",
|
||||
"REUSE.toml",
|
||||
"src/3rdparty/kdbindings/sha1.txt",
|
||||
"src/3rdparty/nlohmann/nlohmann/sha1.txt",
|
||||
"examples/vcpkg/.gitignore",
|
||||
"version.txt"
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>"
|
||||
SPDX-License-Identifier = "BSD-3-Clause"
|
||||
|
||||
#artwork
|
||||
[[annotations]]
|
||||
path = [
|
||||
"screencap.gif",
|
||||
"images/**",
|
||||
"src/img/**",
|
||||
"docs/api/**.png",
|
||||
"examples/dockwidgets/assets/**.png",
|
||||
"src/img/classic_indicators/**.png",
|
||||
"examples/flutter/assets/**.png",
|
||||
"src/flutter/dart/assets/classic_indicators/**.png",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>"
|
||||
SPDX-License-Identifier = "GPL-2.0-only OR GPL-3.0-only"
|
||||
|
||||
#3rdparty ECM (a few are missing reuse headers)
|
||||
[[annotations]]
|
||||
path = [
|
||||
"cmake/ECM/modules/ECMVersionHeader.h.in",
|
||||
"cmake/ECM/modules/ecm_uninstall.cmake.in",
|
||||
"cmake/ECM/modules/BSD-3-Clause.txt",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "The KDE Project"
|
||||
SPDX-License-Identifier = "BSD-3-Clause"
|
||||
|
||||
#3rdparty C++
|
||||
[[annotations]]
|
||||
path = "src/3rdparty/kdbindings/genindex_array.h"
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "2021 Jeremy Burns"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
# doxygen awesome
|
||||
[[annotations]]
|
||||
path = "docs/api/doxygen-awesome.css"
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "2021 - 2023 jothepro"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
# Flutter
|
||||
[[annotations]]
|
||||
path = [
|
||||
"examples/flutter/assets/**",
|
||||
"examples/flutter/macos/Runner/Configs/AppInfo.xcconfig",
|
||||
"examples/flutter/.metadata",
|
||||
"examples/flutter/macos/Runner/Assets.xcassets/**",
|
||||
"examples/flutter/macos/Runner.xcodeproj/**",
|
||||
"examples/flutter/macos/Flutter/**",
|
||||
"examples/flutter/macos/Runner.xcworkspace/**",
|
||||
"examples/flutter/macos/.gitignore",
|
||||
"examples/flutter/macos/Runner/Configs/**.xcconfig",
|
||||
"examples/flutter/macos/Runner/Base.lproj/MainMenu.xib",
|
||||
"examples/flutter/macos/Runner/DebugProfile.entitlements",
|
||||
"examples/flutter/macos/Runner/Info.plist",
|
||||
"examples/flutter/macos/Runner/Release.entitlements",
|
||||
"examples/flutter/windows/runner/resources/app_icon.ico",
|
||||
"examples/flutter/windows/runner/runner.exe.manifest",
|
||||
"tests/flutter/assets/**",
|
||||
"tests/flutter/macos/Runner/Configs/AppInfo.xcconfig",
|
||||
"tests/flutter/.metadata",
|
||||
"tests/flutter/macos/Runner/Assets.xcassets/**",
|
||||
"tests/flutter/macos/Runner.xcodeproj/**",
|
||||
"tests/flutter/macos/Flutter/**",
|
||||
"tests/flutter/macos/Runner.xcworkspace/**",
|
||||
"tests/flutter/macos/.gitignore",
|
||||
"tests/flutter/macos/Runner/Configs/**.xcconfig",
|
||||
"tests/flutter/macos/Runner/Base.lproj/MainMenu.xib",
|
||||
"tests/flutter/macos/Runner/DebugProfile.entitlements",
|
||||
"tests/flutter/macos/Runner/Info.plist",
|
||||
"tests/flutter/macos/Runner/Release.entitlements",
|
||||
"tests/flutter/windows/runner/resources/app_icon.ico",
|
||||
"tests/flutter/windows/runner/runner.exe.manifest",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Copyright 2013-2014 The Flutter Authors"
|
||||
SPDX-License-Identifier = "LicenseRef-FlutterBSD"
|
||||
|
||||
# Slint
|
||||
[[annotations]]
|
||||
path = "src/core/layouting/examples/slint/slint-logo-full-dark-large.png"
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Copyright SixtyFPS GmbH <info@slint.dev>"
|
||||
SPDX-License-Identifier = "GPL-3.0-only"
|
||||
6
3rdparty/kddockwidgets/book.toml
vendored
Normal file
6
3rdparty/kddockwidgets/book.toml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[book]
|
||||
authors = ["Sergio Martins"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "docs/book/src/"
|
||||
title = "KDDockWidgets"
|
||||
28
3rdparty/kddockwidgets/cmake/ECM/modules/BSD-3-Clause.txt
vendored
Normal file
28
3rdparty/kddockwidgets/cmake/ECM/modules/BSD-3-Clause.txt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
Copyright (c) <year> <owner>. All rights reserved.
|
||||
|
||||
This license applies to the CMake ECM modules only.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
167
3rdparty/kddockwidgets/cmake/ECM/modules/ECMEnableSanitizers.cmake
vendored
Normal file
167
3rdparty/kddockwidgets/cmake/ECM/modules/ECMEnableSanitizers.cmake
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
# SPDX-FileCopyrightText: 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMEnableSanitizers
|
||||
-------------------
|
||||
|
||||
Enable compiler sanitizer flags.
|
||||
|
||||
The following sanitizers are supported:
|
||||
|
||||
- Address Sanitizer
|
||||
- Memory Sanitizer
|
||||
- Thread Sanitizer
|
||||
- Leak Sanitizer
|
||||
- Undefined Behaviour Sanitizer
|
||||
|
||||
All of them are implemented in Clang, depending on your version, and
|
||||
there is an work in progress in GCC, where some of them are currently
|
||||
implemented.
|
||||
|
||||
This module will check your current compiler version to see if it
|
||||
supports the sanitizers that you want to enable
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Simply add::
|
||||
|
||||
include(ECMEnableSanitizers)
|
||||
|
||||
to your ``CMakeLists.txt``. Note that this module is included in
|
||||
:kde-module:`KDECompilerSettings`, so projects using that module do not need to also
|
||||
include this one.
|
||||
|
||||
The sanitizers are not enabled by default. Instead, you must set
|
||||
``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the
|
||||
command line) to a semicolon-separated list of sanitizers you wish to enable.
|
||||
The options are:
|
||||
|
||||
- address
|
||||
- memory
|
||||
- thread
|
||||
- leak
|
||||
- undefined
|
||||
- fuzzer
|
||||
|
||||
The sanitizers "address", "memory" and "thread" are mutually exclusive. You
|
||||
cannot enable two of them in the same build.
|
||||
|
||||
"leak" requires the "address" sanitizer.
|
||||
|
||||
.. note::
|
||||
|
||||
To reduce the overhead induced by the instrumentation of the sanitizers, it
|
||||
is advised to enable compiler optimizations (``-O1`` or higher).
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
This is an example of usage::
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' ..
|
||||
|
||||
.. note::
|
||||
|
||||
Most of the sanitizers will require Clang. To enable it, use::
|
||||
|
||||
-DCMAKE_CXX_COMPILER=clang++
|
||||
|
||||
Since 1.3.0.
|
||||
#]=======================================================================]
|
||||
|
||||
# MACRO check_compiler_version
|
||||
#-----------------------------
|
||||
macro (check_compiler_version gcc_required_version clang_required_version msvc_required_version)
|
||||
if (
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "GNU"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_required_version}
|
||||
)
|
||||
OR
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "Clang"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version}
|
||||
)
|
||||
OR
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "MSVC"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${msvc_required_version}
|
||||
)
|
||||
)
|
||||
# error !
|
||||
message(STATUS "You ask to enable the sanitizer ${CUR_SANITIZER},
|
||||
but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION}
|
||||
does not support it !
|
||||
You should use at least GCC ${gcc_required_version}, Clang ${clang_required_version}
|
||||
or MSVC ${msvc_required_version}
|
||||
(99.99 means not implemented yet)")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# MACRO check_compiler_support
|
||||
#------------------------------
|
||||
macro (enable_sanitizer_flags sanitize_option)
|
||||
if (${sanitize_option} MATCHES "address")
|
||||
check_compiler_version("4.8" "3.1" "19.28")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address")
|
||||
else()
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(XSAN_LINKER_FLAGS "asan")
|
||||
endif()
|
||||
elseif (${sanitize_option} MATCHES "thread")
|
||||
check_compiler_version("4.8" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
||||
set(XSAN_LINKER_FLAGS "tsan")
|
||||
elseif (${sanitize_option} MATCHES "memory")
|
||||
check_compiler_version("99.99" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
||||
elseif (${sanitize_option} MATCHES "leak")
|
||||
check_compiler_version("4.9" "3.4" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
||||
set(XSAN_LINKER_FLAGS "lsan")
|
||||
elseif (${sanitize_option} MATCHES "undefined")
|
||||
check_compiler_version("4.9" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
elseif (${sanitize_option} MATCHES "fuzzer")
|
||||
check_compiler_version("99.99" "6.0" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
if (ECM_ENABLE_SANITIZERS)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
# for each element of the ECM_ENABLE_SANITIZERS list
|
||||
foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} )
|
||||
# lowercase filter
|
||||
string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER)
|
||||
# check option and enable appropriate flags
|
||||
enable_sanitizer_flags ( ${CUR_SANITIZER} )
|
||||
# TODO: GCC will not link pthread library if enabled ASan
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||
endif()
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
link_libraries(${XSAN_LINKER_FLAGS})
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
|
||||
endif ()
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
|
||||
but compiler (${CMAKE_CXX_COMPILER_ID}) does not have sanitizer support")
|
||||
endif()
|
||||
endif()
|
||||
222
3rdparty/kddockwidgets/cmake/ECM/modules/ECMGenerateHeaders.cmake
vendored
Normal file
222
3rdparty/kddockwidgets/cmake/ECM/modules/ECMGenerateHeaders.cmake
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
# SPDX-FileCopyrightText: 2013 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
|
||||
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kdemail.net>
|
||||
# SPDX-FileCopyrightText: 2015 Patrick Spendrin <patrick.spendrin@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMGenerateHeaders
|
||||
------------------
|
||||
|
||||
Generate C/C++ CamelCase forwarding headers.
|
||||
|
||||
::
|
||||
|
||||
ecm_generate_headers(<camelcase_forwarding_headers_var>
|
||||
HEADER_NAMES <CamelCaseName> [<CamelCaseName> [...]]
|
||||
[ORIGINAL <CAMELCASE|LOWERCASE>]
|
||||
[HEADER_EXTENSION <header_extension>]
|
||||
[OUTPUT_DIR <output_dir>]
|
||||
[PREFIX <prefix>]
|
||||
[REQUIRED_HEADERS <variable>]
|
||||
[COMMON_HEADER <HeaderName>]
|
||||
[RELATIVE <relative_path>])
|
||||
|
||||
For each CamelCase header name passed to ``HEADER_NAMES``, a file of that name
|
||||
will be generated that will include a version with ``.h`` or, if set,
|
||||
``.<header_extension>`` appended.
|
||||
For example, the generated header ``ClassA`` will include ``classa.h`` (or
|
||||
``ClassA.h``, see ``ORIGINAL``).
|
||||
If a CamelCaseName consists of multiple comma-separated files, e.g.
|
||||
``ClassA,ClassB,ClassC``, then multiple camelcase header files will be
|
||||
generated which are redirects to the first header file.
|
||||
The file locations of these generated headers will be stored in
|
||||
<camelcase_forwarding_headers_var>.
|
||||
|
||||
``ORIGINAL`` specifies how the name of the original header is written: lowercased
|
||||
or also camelcased. The default is "LOWERCASE". Since 1.8.0.
|
||||
|
||||
``HEADER_EXTENSION`` specifies what file name extension is used for the header
|
||||
files. The default is "h". Since 5.48.0.
|
||||
|
||||
``PREFIX`` places the generated headers in subdirectories. This should be a
|
||||
CamelCase name like ``KParts``, which will cause the CamelCase forwarding
|
||||
headers to be placed in the ``KParts`` directory (e.g. ``KParts/Part``). It
|
||||
will also, for the convenience of code in the source distribution, generate
|
||||
forwarding headers based on the original names (e.g. ``kparts/part.h``). This
|
||||
allows includes like ``"#include <kparts/part.h>"`` to be used before
|
||||
installation, as long as the include_directories are set appropriately.
|
||||
|
||||
``OUTPUT_DIR`` specifies where the files will be generated; this should be within
|
||||
the build directory. By default, ``${CMAKE_CURRENT_BINARY_DIR}`` will be used.
|
||||
This option can be used to avoid file conflicts.
|
||||
|
||||
``REQUIRED_HEADERS`` specifies an output variable name where all the required
|
||||
headers will be appended so that they can be installed together with the
|
||||
generated ones. This is mostly intended as a convenience so that adding a new
|
||||
header to a project only requires specifying the CamelCase variant in the
|
||||
CMakeLists.txt file; the original variant will then be added to this
|
||||
variable.
|
||||
|
||||
``COMMON_HEADER`` generates an additional convenience header which includes all
|
||||
other header files.
|
||||
|
||||
The ``RELATIVE`` argument indicates where the original headers can be found
|
||||
relative to ``CMAKE_CURRENT_SOURCE_DIR``. It does not affect the generated
|
||||
CamelCase forwarding files, but ``ecm_generate_headers()`` uses it when checking
|
||||
that the original header exists, and to generate originally named forwarding
|
||||
headers when ``PREFIX`` is set.
|
||||
|
||||
To allow other parts of the source distribution (eg: tests) to use the
|
||||
generated headers before installation, it may be desirable to set the
|
||||
``INCLUDE_DIRECTORIES`` property for the library target to output_dir. For
|
||||
example, if ``OUTPUT_DIR`` is ``CMAKE_CURRENT_BINARY_DIR`` (the default), you could do
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
target_include_directories(MyLib PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
|
||||
|
||||
Example usage (without ``PREFIX``):
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
ecm_generate_headers(
|
||||
MyLib_FORWARDING_HEADERS
|
||||
HEADERS
|
||||
MLFoo
|
||||
MLBar
|
||||
# etc
|
||||
REQUIRED_HEADERS MyLib_HEADERS
|
||||
COMMON_HEADER MLGeneral
|
||||
)
|
||||
install(FILES ${MyLib_FORWARDING_HEADERS} ${MyLib_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
|
||||
COMPONENT Devel)
|
||||
|
||||
Example usage (with ``PREFIX``):
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
ecm_generate_headers(
|
||||
MyLib_FORWARDING_HEADERS
|
||||
HEADERS
|
||||
Foo
|
||||
# several classes are contained in bar.h, so generate
|
||||
# additional files
|
||||
Bar,BarList
|
||||
# etc
|
||||
PREFIX MyLib
|
||||
REQUIRED_HEADERS MyLib_HEADERS
|
||||
)
|
||||
install(FILES ${MyLib_FORWARDING_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/MyLib
|
||||
COMPONENT Devel)
|
||||
install(FILES ${MyLib_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/mylib
|
||||
COMPONENT Devel)
|
||||
|
||||
Since pre-1.0.0.
|
||||
#]=======================================================================]
|
||||
|
||||
function(ECM_GENERATE_HEADERS camelcase_forwarding_headers_var)
|
||||
set(options)
|
||||
set(oneValueArgs ORIGINAL HEADER_EXTENSION OUTPUT_DIR PREFIX REQUIRED_HEADERS COMMON_HEADER RELATIVE)
|
||||
set(multiValueArgs HEADER_NAMES)
|
||||
cmake_parse_arguments(EGH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if (EGH_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unexpected arguments to ECM_GENERATE_HEADERS: ${EGH_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(NOT EGH_HEADER_NAMES)
|
||||
message(FATAL_ERROR "Missing header_names argument to ECM_GENERATE_HEADERS")
|
||||
endif()
|
||||
|
||||
if(NOT EGH_ORIGINAL)
|
||||
# default
|
||||
set(EGH_ORIGINAL "LOWERCASE")
|
||||
endif()
|
||||
if(NOT EGH_ORIGINAL STREQUAL "LOWERCASE" AND NOT EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||
message(FATAL_ERROR "Unexpected value for original argument to ECM_GENERATE_HEADERS: ${EGH_ORIGINAL}")
|
||||
endif()
|
||||
|
||||
if(NOT EGH_HEADER_EXTENSION)
|
||||
set(EGH_HEADER_EXTENSION "h")
|
||||
endif()
|
||||
|
||||
if(NOT EGH_OUTPUT_DIR)
|
||||
set(EGH_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
# Make sure EGH_RELATIVE is /-terminated when it's not empty
|
||||
if (EGH_RELATIVE AND NOT "${EGH_RELATIVE}" MATCHES "^.*/$")
|
||||
set(EGH_RELATIVE "${EGH_RELATIVE}/")
|
||||
endif()
|
||||
|
||||
set(originalprefix)
|
||||
if (EGH_PREFIX)
|
||||
if (NOT "${EGH_PREFIX}" MATCHES "^.*/$")
|
||||
set(EGH_PREFIX "${EGH_PREFIX}/")
|
||||
endif()
|
||||
if (EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||
set(originalprefix "${EGH_PREFIX}")
|
||||
else()
|
||||
string(TOLOWER "${EGH_PREFIX}" originalprefix)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
foreach(_classnameentry ${EGH_HEADER_NAMES})
|
||||
string(REPLACE "," ";" _classnames ${_classnameentry})
|
||||
list(GET _classnames 0 _baseclass)
|
||||
|
||||
if (EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||
set(originalbasename "${_baseclass}")
|
||||
else()
|
||||
string(TOLOWER "${_baseclass}" originalbasename)
|
||||
endif()
|
||||
|
||||
set(_actualheader "${CMAKE_CURRENT_SOURCE_DIR}/${EGH_RELATIVE}${originalbasename}.${EGH_HEADER_EXTENSION}")
|
||||
get_source_file_property(_generated "${_actualheader}" GENERATED)
|
||||
if (NOT _generated AND NOT EXISTS ${_actualheader})
|
||||
message(FATAL_ERROR "Could not find \"${_actualheader}\"")
|
||||
endif()
|
||||
|
||||
foreach(_CLASSNAME ${_classnames})
|
||||
set(FANCY_HEADER_FILE "${EGH_OUTPUT_DIR}/${EGH_PREFIX}${_CLASSNAME}")
|
||||
if (NOT EXISTS ${FANCY_HEADER_FILE})
|
||||
file(WRITE ${FANCY_HEADER_FILE} "#include \"${originalprefix}${originalbasename}.${EGH_HEADER_EXTENSION}\"\n")
|
||||
endif()
|
||||
list(APPEND ${camelcase_forwarding_headers_var} "${FANCY_HEADER_FILE}")
|
||||
if (EGH_PREFIX)
|
||||
# Local forwarding header, for namespaced headers, e.g. kparts/part.h
|
||||
if(EGH_ORIGINAL STREQUAL "CAMELCASE")
|
||||
set(originalclassname "${_CLASSNAME}")
|
||||
else()
|
||||
string(TOLOWER "${_CLASSNAME}" originalclassname)
|
||||
endif()
|
||||
set(REGULAR_HEADER_NAME ${EGH_OUTPUT_DIR}/${originalprefix}${originalclassname}.${EGH_HEADER_EXTENSION})
|
||||
if (NOT EXISTS ${REGULAR_HEADER_NAME})
|
||||
file(WRITE ${REGULAR_HEADER_NAME} "#include \"${_actualheader}\"\n")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(APPEND _REQUIRED_HEADERS "${_actualheader}")
|
||||
endforeach()
|
||||
|
||||
if(EGH_COMMON_HEADER)
|
||||
#combine required headers into 1 big convenience header
|
||||
set(COMMON_HEADER ${EGH_OUTPUT_DIR}/${EGH_PREFIX}${EGH_COMMON_HEADER})
|
||||
file(WRITE ${COMMON_HEADER} "// convenience header\n")
|
||||
foreach(_header ${_REQUIRED_HEADERS})
|
||||
get_filename_component(_base ${_header} NAME)
|
||||
file(APPEND ${COMMON_HEADER} "#include \"${_base}\"\n")
|
||||
endforeach()
|
||||
list(APPEND ${camelcase_forwarding_headers_var} "${COMMON_HEADER}")
|
||||
endif()
|
||||
|
||||
set(${camelcase_forwarding_headers_var} ${${camelcase_forwarding_headers_var}} PARENT_SCOPE)
|
||||
if (EGH_REQUIRED_HEADERS)
|
||||
set(${EGH_REQUIRED_HEADERS} ${${EGH_REQUIRED_HEADERS}} ${_REQUIRED_HEADERS} PARENT_SCOPE)
|
||||
endif ()
|
||||
endfunction()
|
||||
256
3rdparty/kddockwidgets/cmake/ECM/modules/ECMGeneratePriFile.cmake
vendored
Normal file
256
3rdparty/kddockwidgets/cmake/ECM/modules/ECMGeneratePriFile.cmake
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
# SPDX-FileCopyrightText: 2014 David Faure <faure@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMGeneratePriFile
|
||||
------------------
|
||||
|
||||
Generate a ``.pri`` file for the benefit of qmake-based projects.
|
||||
|
||||
As well as the function below, this module creates the cache variable
|
||||
``ECM_MKSPECS_INSTALL_DIR`` and sets the default value to ``mkspecs/modules``.
|
||||
This assumes Qt and the current project are both installed to the same
|
||||
non-system prefix. Packagers who use ``-DCMAKE_INSTALL_PREFIX=/usr`` will
|
||||
certainly want to set ``ECM_MKSPECS_INSTALL_DIR`` to something like
|
||||
``share/qt5/mkspecs/modules``.
|
||||
|
||||
The main thing is that this should be the ``modules`` subdirectory of either
|
||||
the default qmake ``mkspecs`` directory or of a directory that will be in the
|
||||
``$QMAKEPATH`` environment variable when qmake is run.
|
||||
|
||||
::
|
||||
|
||||
ecm_generate_pri_file(BASE_NAME <baseName>
|
||||
LIB_NAME <libName>
|
||||
[VERSION <version>] # since 5.83
|
||||
[DEPS "<dep> [<dep> [...]]"]
|
||||
[FILENAME_VAR <filename_variable>]
|
||||
[INCLUDE_INSTALL_DIRS <dir> [<dir> [...]]] # since 5.92
|
||||
[INCLUDE_INSTALL_DIR <dir>] # deprecated since 5.92
|
||||
[LIB_INSTALL_DIR <dir>])
|
||||
|
||||
If your CMake project produces a Qt-based library, you may expect there to be
|
||||
applications that wish to use it that use a qmake-based build system, rather
|
||||
than a CMake-based one. Creating a ``.pri`` file will make use of your
|
||||
library convenient for them, in much the same way that CMake config files make
|
||||
things convenient for CMake-based applications. ``ecm_generate_pri_file()``
|
||||
generates just such a file.
|
||||
|
||||
``VERSION`` specifies the version of the library the ``.pri`` file describes. If
|
||||
not set, the value is taken from the context variable ``PROJECT_VERSION``.
|
||||
This variable is usually set by the ``project(... VERSION ...)`` command or,
|
||||
if CMake policy CMP0048 is not ``NEW``, by :module:`ECMSetupVersion`.
|
||||
For backward-compatibility with older ECM versions the
|
||||
``PROJECT_VERSION_STRING`` variable as set by :module:`ECMSetupVersion`
|
||||
will be preferred over ``PROJECT_VERSION`` if set, unless the minimum
|
||||
required version of ECM is 5.83 and newer. Since 5.83.
|
||||
|
||||
``BASE_NAME`` specifies the name qmake project (.pro) files should use to refer to
|
||||
the library (eg: KArchive). ``LIB_NAME`` is the name of the actual library to
|
||||
link to (ie: the first argument to add_library()). ``DEPS`` is a space-separated
|
||||
list of the base names of other libraries (for Qt libraries, use the same
|
||||
names you use with the ``QT`` variable in a qmake project file, such as "core"
|
||||
for QtCore). ``FILENAME_VAR`` specifies the name of a variable to store the path
|
||||
to the generated file in.
|
||||
|
||||
``INCLUDE_INSTALL_DIRS`` are the paths (relative to ``CMAKE_INSTALL_PREFIX``) that
|
||||
include files will be installed to. It defaults to
|
||||
``${INCLUDE_INSTALL_DIR}/<baseName>`` if the ``INCLUDE_INSTALL_DIR`` variable
|
||||
is set. If that variable is not set, the ``CMAKE_INSTALL_INCLUDEDIR`` variable
|
||||
is used instead, and if neither are set ``include`` is used. ``LIB_INSTALL_DIR``
|
||||
operates similarly for the installation location for libraries; it defaults to
|
||||
``${LIB_INSTALL_DIR}``, ``${CMAKE_INSTALL_LIBDIR}`` or ``lib``, in that order.
|
||||
|
||||
``INCLUDE_INSTALL_DIR`` is the old variant of ``INCLUDE_INSTALL_DIRS``, taking only one
|
||||
directory.
|
||||
|
||||
Example usage:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
ecm_generate_pri_file(
|
||||
BASE_NAME KArchive
|
||||
LIB_NAME KF5KArchive
|
||||
DEPS "core"
|
||||
FILENAME_VAR pri_filename
|
||||
VERSION 4.2.0
|
||||
)
|
||||
install(FILES ${pri_filename} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
|
||||
|
||||
A qmake-based project that wished to use this would then do::
|
||||
|
||||
QT += KArchive
|
||||
|
||||
in their ``.pro`` file.
|
||||
|
||||
Since pre-1.0.0.
|
||||
#]=======================================================================]
|
||||
|
||||
# Replicate the logic from KDEInstallDirs.cmake as we can't depend on it
|
||||
# Ask qmake if we're using the same prefix as Qt
|
||||
set(_should_query_qt OFF)
|
||||
if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS)
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX TRY)
|
||||
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||
set(_should_query_qt ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KDE_INSTALL_USE_QT_SYS_PATHS OR _should_query_qt)
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX)
|
||||
ecm_query_qt(qt_host_data_dir QT_HOST_DATA)
|
||||
if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
|
||||
file(RELATIVE_PATH qt_host_data_dir ${qt_install_prefix_dir} ${qt_host_data_dir})
|
||||
endif()
|
||||
if(qt_host_data_dir STREQUAL "")
|
||||
set(mkspecs_install_dir mkspecs/modules)
|
||||
else()
|
||||
set(mkspecs_install_dir ${qt_host_data_dir}/mkspecs/modules)
|
||||
endif()
|
||||
set(ECM_MKSPECS_INSTALL_DIR ${mkspecs_install_dir} CACHE PATH "The directory where mkspecs will be installed to.")
|
||||
else()
|
||||
set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
|
||||
endif()
|
||||
|
||||
function(ECM_GENERATE_PRI_FILE)
|
||||
set(options )
|
||||
set(oneValueArgs BASE_NAME LIB_NAME DEPS FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR VERSION)
|
||||
set(multiValueArgs INCLUDE_INSTALL_DIRS)
|
||||
|
||||
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(EGPF_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to ECM_GENERATE_PRI_FILE(): \"${EGPF_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
if(ECM_GLOBAL_FIND_VERSION VERSION_LESS 5.83.0)
|
||||
set(_support_backward_compat_version_string_var TRUE)
|
||||
else()
|
||||
set(_support_backward_compat_version_string_var FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT EGPF_BASE_NAME)
|
||||
message(FATAL_ERROR "Required argument BASE_NAME missing in ECM_GENERATE_PRI_FILE() call")
|
||||
endif()
|
||||
if(NOT EGPF_LIB_NAME)
|
||||
message(FATAL_ERROR "Required argument LIB_NAME missing in ECM_GENERATE_PRI_FILE() call")
|
||||
endif()
|
||||
if(NOT EGPF_VERSION)
|
||||
if(_support_backward_compat_version_string_var)
|
||||
if(NOT PROJECT_VERSION_STRING AND NOT PROJECT_VERSION)
|
||||
message(FATAL_ERROR "Required variable PROJECT_VERSION_STRING or PROJECT_VERSION not set before ECM_GENERATE_PRI_FILE() call. Missing call of ecm_setup_version() or project(VERSION)?")
|
||||
endif()
|
||||
else()
|
||||
if(NOT PROJECT_VERSION)
|
||||
message(FATAL_ERROR "Required variable PROJECT_VERSION not set before ECM_GENERATE_PRI_FILE() call. Missing call of ecm_setup_version() or project(VERSION)?")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(EGPF_INCLUDE_INSTALL_DIR)
|
||||
if(EGPF_INCLUDE_INSTALL_DIRS)
|
||||
message(FATAL_ERROR "Only one argument of INCLUDE_INSTALL_DIR & INCLUDE_INSTALL_DIRS can be used in ECM_GENERATE_PRI_FILE() call")
|
||||
endif()
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS ${EGPF_INCLUDE_INSTALL_DIR})
|
||||
endif()
|
||||
if(NOT EGPF_INCLUDE_INSTALL_DIRS)
|
||||
if(INCLUDE_INSTALL_DIR)
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "${INCLUDE_INSTALL_DIR}/${EGPF_BASE_NAME}")
|
||||
elseif(CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "${CMAKE_INSTALL_INCLUDEDIR}/${EGPF_BASE_NAME}")
|
||||
else()
|
||||
set(EGPF_INCLUDE_INSTALL_DIRS "include/${EGPF_BASE_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT EGPF_LIB_INSTALL_DIR)
|
||||
if(LIB_INSTALL_DIR)
|
||||
set(EGPF_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}")
|
||||
elseif(CMAKE_INSTALL_LIBDIR)
|
||||
set(EGPF_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
|
||||
else()
|
||||
set(EGPF_LIB_INSTALL_DIR "lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EGPF_VERSION)
|
||||
set(PRI_VERSION "${EGPF_VERSION}")
|
||||
else()
|
||||
if(_support_backward_compat_version_string_var AND PROJECT_VERSION_STRING)
|
||||
set(PRI_VERSION "${PROJECT_VERSION_STRING}")
|
||||
if(NOT PROJECT_VERSION_STRING STREQUAL PROJECT_VERSION)
|
||||
message(DEPRECATION "ECM_GENERATE_PRI_FILE() will no longer support PROJECT_VERSION_STRING when the required minimum version of ECM is 5.83 or newer. Set VERSION parameter or use PROJECT_VERSION instead.")
|
||||
endif()
|
||||
else()
|
||||
set(PRI_VERSION "${PROJECT_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PRI_VERSION_MAJOR "${PRI_VERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" PRI_VERSION_MINOR "${PRI_VERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PRI_VERSION_PATCH "${PRI_VERSION}")
|
||||
|
||||
# Prepare the right number of "../.." to go from ECM_MKSPECS_INSTALL_DIR to the install prefix
|
||||
# This allows to make the generated pri files relocatable (no absolute paths)
|
||||
if (IS_ABSOLUTE ${ECM_MKSPECS_INSTALL_DIR})
|
||||
set(BASEPATH ${CMAKE_INSTALL_PREFIX})
|
||||
else()
|
||||
string(REGEX REPLACE "[^/]+" ".." PRI_ROOT_RELATIVE_TO_MKSPECS ${ECM_MKSPECS_INSTALL_DIR})
|
||||
set(BASEPATH "$$PWD/${PRI_ROOT_RELATIVE_TO_MKSPECS}")
|
||||
endif()
|
||||
|
||||
set(PRI_TARGET_BASENAME ${EGPF_BASE_NAME})
|
||||
set(PRI_TARGET_LIBNAME ${EGPF_LIB_NAME})
|
||||
set(PRI_TARGET_QTDEPS ${EGPF_DEPS})
|
||||
set(PRI_TARGET_INCLUDES)
|
||||
foreach(_dir ${EGPF_INCLUDE_INSTALL_DIRS})
|
||||
# separate list entries with space
|
||||
if(IS_ABSOLUTE "${_dir}")
|
||||
string(APPEND PRI_TARGET_INCLUDES " ${_dir}")
|
||||
else()
|
||||
string(APPEND PRI_TARGET_INCLUDES " ${BASEPATH}/${_dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(IS_ABSOLUTE "${EGPF_LIB_INSTALL_DIR}")
|
||||
set(PRI_TARGET_LIBS "${EGPF_LIB_INSTALL_DIR}")
|
||||
else()
|
||||
set(PRI_TARGET_LIBS "${BASEPATH}/${EGPF_LIB_INSTALL_DIR}")
|
||||
endif()
|
||||
set(PRI_TARGET_DEFINES "")
|
||||
|
||||
set(PRI_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/qt_${PRI_TARGET_BASENAME}.pri)
|
||||
if (EGPF_FILENAME_VAR)
|
||||
set(${EGPF_FILENAME_VAR} ${PRI_FILENAME} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
set(PRI_TARGET_MODULE_CONFIG "")
|
||||
# backward compat: it was not obvious LIB_NAME needs to be a target name,
|
||||
# and some projects where the target name was not the actual library output name
|
||||
# passed the output name for LIB_NAME, so .name & .module prperties are correctly set.
|
||||
# TODO: improve API dox, allow control over module name if target name != output name
|
||||
if(TARGET ${EGPF_LIB_NAME})
|
||||
get_target_property(target_type ${EGPF_LIB_NAME} TYPE)
|
||||
if (target_type STREQUAL "STATIC_LIBRARY")
|
||||
set(PRI_TARGET_MODULE_CONFIG "staticlib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GENERATE
|
||||
OUTPUT ${PRI_FILENAME}
|
||||
CONTENT
|
||||
"QT.${PRI_TARGET_BASENAME}.VERSION = ${PRI_VERSION}
|
||||
QT.${PRI_TARGET_BASENAME}.MAJOR_VERSION = ${PRI_VERSION_MAJOR}
|
||||
QT.${PRI_TARGET_BASENAME}.MINOR_VERSION = ${PRI_VERSION_MINOR}
|
||||
QT.${PRI_TARGET_BASENAME}.PATCH_VERSION = ${PRI_VERSION_PATCH}
|
||||
QT.${PRI_TARGET_BASENAME}.name = ${PRI_TARGET_LIBNAME}
|
||||
QT.${PRI_TARGET_BASENAME}.module = ${PRI_TARGET_LIBNAME}
|
||||
QT.${PRI_TARGET_BASENAME}.defines = ${PRI_TARGET_DEFINES}
|
||||
QT.${PRI_TARGET_BASENAME}.includes = ${PRI_TARGET_INCLUDES}
|
||||
QT.${PRI_TARGET_BASENAME}.private_includes =
|
||||
QT.${PRI_TARGET_BASENAME}.libs = ${PRI_TARGET_LIBS}
|
||||
QT.${PRI_TARGET_BASENAME}.depends = ${PRI_TARGET_QTDEPS}
|
||||
QT.${PRI_TARGET_BASENAME}.module_config = ${PRI_TARGET_MODULE_CONFIG}
|
||||
"
|
||||
)
|
||||
endfunction()
|
||||
98
3rdparty/kddockwidgets/cmake/ECM/modules/ECMQueryQt.cmake
vendored
Normal file
98
3rdparty/kddockwidgets/cmake/ECM/modules/ECMQueryQt.cmake
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
# SPDX-FileCopyrightText: 2014 Rohan Garg <rohan16garg@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kde.org>
|
||||
# SPDX-FileCopyrightText: 2014-2016 Aleix Pol <aleixpol@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Friedrich W. H. Kossebau <kossebau@kde.org>
|
||||
# SPDX-FileCopyrightText: 2022 Ahmad Samir <a.samir78@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#[=======================================================================[.rst:
|
||||
ECMQueryQt
|
||||
---------------
|
||||
This module can be used to query the installation paths used by Qt.
|
||||
|
||||
For Qt5 this uses ``qmake``, and for Qt6 this used ``qtpaths`` (the latter has built-in
|
||||
support to query the paths of a target platform when cross-compiling).
|
||||
|
||||
This module defines the following function:
|
||||
::
|
||||
|
||||
ecm_query_qt(<result_variable> <qt_variable> [TRY])
|
||||
|
||||
Passing ``TRY`` will result in the method not making the build fail if the executable
|
||||
used for querying has not been found, but instead simply print a warning message and
|
||||
return an empty string.
|
||||
|
||||
Example usage:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
include(ECMQueryQt)
|
||||
ecm_query_qt(bin_dir QT_INSTALL_BINS)
|
||||
|
||||
If the call succeeds ``${bin_dir}`` will be set to ``<prefix>/path/to/bin/dir`` (e.g.
|
||||
``/usr/lib64/qt/bin/``).
|
||||
|
||||
Since: 5.93
|
||||
#]=======================================================================]
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/QtVersionOption.cmake)
|
||||
include(CheckLanguage)
|
||||
check_language(CXX)
|
||||
if (CMAKE_CXX_COMPILER)
|
||||
# Enable the CXX language to let CMake look for config files in library dirs.
|
||||
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/23266
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
|
||||
if (QT_MAJOR_VERSION STREQUAL "5")
|
||||
# QUIET to accommodate the TRY option
|
||||
find_package(Qt${QT_MAJOR_VERSION}Core QUIET)
|
||||
set(_exec_name_text "Qt5 qmake")
|
||||
if(TARGET Qt5::qmake)
|
||||
get_target_property(_qmake_executable_default Qt5::qmake LOCATION)
|
||||
|
||||
set(QUERY_EXECUTABLE ${_qmake_executable_default})
|
||||
set(_cli_option "-query")
|
||||
endif()
|
||||
elseif(QT_MAJOR_VERSION STREQUAL "6")
|
||||
# QUIET to accommodate the TRY option
|
||||
find_package(Qt6 COMPONENTS CoreTools QUIET CONFIG)
|
||||
set(_exec_name_text "Qt6 qtpaths")
|
||||
if (TARGET Qt6::qtpaths)
|
||||
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
|
||||
|
||||
set(QUERY_EXECUTABLE ${_qtpaths_executable})
|
||||
set(_cli_option "--query")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(ecm_query_qt result_variable qt_variable)
|
||||
set(options TRY)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs)
|
||||
|
||||
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(NOT QUERY_EXECUTABLE)
|
||||
if(ARGS_TRY)
|
||||
set(${result_variable} "" PARENT_SCOPE)
|
||||
message(STATUS "No ${_exec_name_text} executable found. Can't check ${qt_variable}")
|
||||
return()
|
||||
else()
|
||||
message(FATAL_ERROR "No ${_exec_name_text} executable found. Can't check ${qt_variable} as required")
|
||||
endif()
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${QUERY_EXECUTABLE} ${_cli_option} "${qt_variable}"
|
||||
RESULT_VARIABLE return_code
|
||||
OUTPUT_VARIABLE output
|
||||
)
|
||||
if(return_code EQUAL 0)
|
||||
string(STRIP "${output}" output)
|
||||
file(TO_CMAKE_PATH "${output}" output_path)
|
||||
set(${result_variable} "${output_path}" PARENT_SCOPE)
|
||||
else()
|
||||
message(WARNING "Failed call: ${QUERY_EXECUTABLE} ${_cli_option} ${qt_variable}")
|
||||
message(FATAL_ERROR "${_exec_name_text} call failed: ${return_code}")
|
||||
endif()
|
||||
endfunction()
|
||||
213
3rdparty/kddockwidgets/cmake/ECM/modules/ECMSetupVersion.cmake
vendored
Normal file
213
3rdparty/kddockwidgets/cmake/ECM/modules/ECMSetupVersion.cmake
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
# SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kde.org>
|
||||
# SPDX-FileCopyrightText: 2012 Alexander Neundorf <neundorf@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMSetupVersion
|
||||
---------------
|
||||
|
||||
Handle library version information.
|
||||
|
||||
::
|
||||
|
||||
ecm_setup_version(<version>
|
||||
VARIABLE_PREFIX <prefix>
|
||||
[SOVERSION <soversion>]
|
||||
[VERSION_HEADER <filename>]
|
||||
[PACKAGE_VERSION_FILE <filename> [COMPATIBILITY <compat>]] )
|
||||
|
||||
This parses a version string and sets up a standard set of version variables.
|
||||
It can optionally also create a C version header file and a CMake package
|
||||
version file to install along with the library.
|
||||
|
||||
If the ``<version>`` argument is of the form ``<major>.<minor>.<patch>``
|
||||
(or ``<major>.<minor>.<patch>.<tweak>``), The following CMake variables are
|
||||
set::
|
||||
|
||||
<prefix>_VERSION_MAJOR - <major>
|
||||
<prefix>_VERSION_MINOR - <minor>
|
||||
<prefix>_VERSION_PATCH - <patch>
|
||||
<prefix>_VERSION - <version>
|
||||
<prefix>_SOVERSION - <soversion>, or <major> if SOVERSION was not given
|
||||
|
||||
For backward-compatibility also this variable is set (only if the minimum required
|
||||
version of ECM is < 5.83)::
|
||||
|
||||
<prefix>_VERSION_STRING - <version> (use <prefix>_VERSION instead)
|
||||
|
||||
If CMake policy CMP0048 is not ``NEW``, the following CMake variables will also
|
||||
be set::
|
||||
|
||||
PROJECT_VERSION_MAJOR - <major>
|
||||
PROJECT_VERSION_MINOR - <minor>
|
||||
PROJECT_VERSION_PATCH - <patch>
|
||||
PROJECT_VERSION - <version>
|
||||
|
||||
For backward-compatibility, if CMake policy CMP0048 is not ``NEW``, also this variable is set
|
||||
(only if the minimum required version of ECM is < 5.83)::
|
||||
|
||||
PROJECT_VERSION_STRING - <version> (use PROJECT_VERSION instead)
|
||||
|
||||
If the ``VERSION_HEADER`` option is used, a simple C header is generated with the
|
||||
given filename. If filename is a relative path, it is interpreted as relative
|
||||
to ``CMAKE_CURRENT_BINARY_DIR``. The generated header contains the following
|
||||
macros::
|
||||
|
||||
<prefix>_VERSION_MAJOR - <major> as an integer
|
||||
<prefix>_VERSION_MINOR - <minor> as an integer
|
||||
<prefix>_VERSION_PATCH - <patch> as an integer
|
||||
<prefix>_VERSION_STRING - <version> as a C string
|
||||
<prefix>_VERSION - the version as an integer
|
||||
|
||||
``<prefix>_VERSION`` has ``<patch>`` in the bottom 8 bits, ``<minor>`` in the
|
||||
next 8 bits and ``<major>`` in the remaining bits. Note that ``<patch>`` and
|
||||
``<minor>`` must be less than 256.
|
||||
|
||||
If the ``PACKAGE_VERSION_FILE`` option is used, a simple CMake package version
|
||||
file is created using the ``write_basic_package_version_file()`` macro provided by
|
||||
CMake. It should be installed in the same location as the Config.cmake file of
|
||||
the library so that it can be found by ``find_package()``. If the filename is a
|
||||
relative path, it is interpreted as relative to ``CMAKE_CURRENT_BINARY_DIR``. The
|
||||
optional ``COMPATIBILITY`` option is forwarded to
|
||||
``write_basic_package_version_file()``, and defaults to ``AnyNewerVersion``.
|
||||
|
||||
If CMake policy CMP0048 is ``NEW``, an alternative form of the command is
|
||||
available::
|
||||
|
||||
ecm_setup_version(PROJECT
|
||||
[VARIABLE_PREFIX <prefix>]
|
||||
[SOVERSION <soversion>]
|
||||
[VERSION_HEADER <filename>]
|
||||
[PACKAGE_VERSION_FILE <filename>] )
|
||||
|
||||
This will use the version information set by the ``project()`` command.
|
||||
``VARIABLE_PREFIX`` defaults to the project name. Note that ``PROJECT`` must be the
|
||||
first argument. In all other respects, it behaves like the other form of the
|
||||
command.
|
||||
|
||||
Since pre-1.0.0.
|
||||
|
||||
``COMPATIBILITY`` option available since 1.6.0.
|
||||
#]=======================================================================]
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
# save the location of the header template while CMAKE_CURRENT_LIST_DIR
|
||||
# has the value we want
|
||||
set(_ECM_SETUP_VERSION_HEADER_TEMPLATE "${CMAKE_CURRENT_LIST_DIR}/ECMVersionHeader.h.in")
|
||||
|
||||
function(ecm_setup_version _version)
|
||||
set(options )
|
||||
set(oneValueArgs VARIABLE_PREFIX SOVERSION VERSION_HEADER PACKAGE_VERSION_FILE COMPATIBILITY)
|
||||
set(multiValueArgs )
|
||||
|
||||
cmake_parse_arguments(ESV "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(ESV_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to ECM_SETUP_VERSION(): \"${ESV_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
set(project_manages_version FALSE)
|
||||
set(use_project_version FALSE)
|
||||
cmake_policy(GET CMP0048 project_version_policy)
|
||||
if(project_version_policy STREQUAL "NEW")
|
||||
set(project_manages_version TRUE)
|
||||
if(_version STREQUAL "PROJECT")
|
||||
set(use_project_version TRUE)
|
||||
endif()
|
||||
elseif(_version STREQUAL "PROJECT")
|
||||
message(FATAL_ERROR "ecm_setup_version given PROJECT argument, but CMP0048 is not NEW")
|
||||
endif()
|
||||
|
||||
set(should_set_prefixed_vars TRUE)
|
||||
if(NOT ESV_VARIABLE_PREFIX)
|
||||
if(use_project_version)
|
||||
set(ESV_VARIABLE_PREFIX "${PROJECT_NAME}")
|
||||
set(should_set_prefixed_vars FALSE)
|
||||
else()
|
||||
message(FATAL_ERROR "Required argument PREFIX missing in ECM_SETUP_VERSION() call")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(use_project_version)
|
||||
set(_version "${PROJECT_VERSION}")
|
||||
# drop leading 0 from values to avoid bogus octal values in c/C++ e.g. with 08 or 09
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _major "${PROJECT_VERSION_MAJOR}")
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _minor "${PROJECT_VERSION_MINOR}")
|
||||
string(REGEX REPLACE "0*([0-9]+)" "\\1" _patch "${PROJECT_VERSION_PATCH}")
|
||||
else()
|
||||
string(REGEX REPLACE "^0*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" _major "${_version}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.0*([0-9]+)\\.[0-9]+.*" "\\1" _minor "${_version}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.0*([0-9]+).*" "\\1" _patch "${_version}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ESV_SOVERSION) # use DEFINED, so "0" as valid SO version is not evaluated to FALSE
|
||||
set(ESV_SOVERSION ${_major})
|
||||
endif()
|
||||
|
||||
if(ECM_GLOBAL_FIND_VERSION VERSION_LESS 5.83.0)
|
||||
set(_set_backward_compat_version_string_vars TRUE)
|
||||
else()
|
||||
set(_set_backward_compat_version_string_vars FALSE)
|
||||
endif()
|
||||
|
||||
if(should_set_prefixed_vars)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION "${_version}")
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_MAJOR ${_major})
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_MINOR ${_minor})
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_PATCH ${_patch})
|
||||
endif()
|
||||
|
||||
set(${ESV_VARIABLE_PREFIX}_SOVERSION ${ESV_SOVERSION})
|
||||
|
||||
if(NOT project_manages_version)
|
||||
set(PROJECT_VERSION "${_version}")
|
||||
set(PROJECT_VERSION_MAJOR "${_major}")
|
||||
set(PROJECT_VERSION_MINOR "${_minor}")
|
||||
set(PROJECT_VERSION_PATCH "${_patch}")
|
||||
endif()
|
||||
|
||||
if(_set_backward_compat_version_string_vars)
|
||||
set(PROJECT_VERSION_STRING "${PROJECT_VERSION}")
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION}")
|
||||
endif()
|
||||
|
||||
if(ESV_VERSION_HEADER)
|
||||
set(HEADER_PREFIX "${ESV_VARIABLE_PREFIX}")
|
||||
set(HEADER_VERSION "${_version}")
|
||||
set(HEADER_VERSION_MAJOR "${_major}")
|
||||
set(HEADER_VERSION_MINOR "${_minor}")
|
||||
set(HEADER_VERSION_PATCH "${_patch}")
|
||||
configure_file("${_ECM_SETUP_VERSION_HEADER_TEMPLATE}" "${ESV_VERSION_HEADER}")
|
||||
endif()
|
||||
|
||||
if(ESV_PACKAGE_VERSION_FILE)
|
||||
if(NOT ESV_COMPATIBILITY)
|
||||
set(ESV_COMPATIBILITY AnyNewerVersion)
|
||||
endif()
|
||||
write_basic_package_version_file("${ESV_PACKAGE_VERSION_FILE}" VERSION ${_version} COMPATIBILITY ${ESV_COMPATIBILITY})
|
||||
endif()
|
||||
|
||||
if(should_set_prefixed_vars)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_MAJOR "${${ESV_VARIABLE_PREFIX}_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_MINOR "${${ESV_VARIABLE_PREFIX}_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_PATCH "${${ESV_VARIABLE_PREFIX}_VERSION_PATCH}" PARENT_SCOPE)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION "${${ESV_VARIABLE_PREFIX}_VERSION}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
# always set the soversion
|
||||
set(${ESV_VARIABLE_PREFIX}_SOVERSION "${${ESV_VARIABLE_PREFIX}_SOVERSION}" PARENT_SCOPE)
|
||||
|
||||
if(NOT project_manages_version)
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION}" PARENT_SCOPE)
|
||||
set(PROJECT_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" PARENT_SCOPE)
|
||||
set(PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}" PARENT_SCOPE)
|
||||
set(PROJECT_VERSION_PATCH "${PROJECT_VERSION_PATCH}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(_set_backward_compat_version_string_vars)
|
||||
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_STRING}" PARENT_SCOPE)
|
||||
set(${ESV_VARIABLE_PREFIX}_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
50
3rdparty/kddockwidgets/cmake/ECM/modules/ECMUninstallTarget.cmake
vendored
Normal file
50
3rdparty/kddockwidgets/cmake/ECM/modules/ECMUninstallTarget.cmake
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# SPDX-FileCopyrightText: 2015 Alex Merry <alex.merry@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMUninstallTarget
|
||||
------------------
|
||||
|
||||
Add an ``uninstall`` target.
|
||||
|
||||
By including this module, an ``uninstall`` target will be added to your CMake
|
||||
project. This will remove all files installed (or updated) by a previous
|
||||
invocation of the ``install`` target. It will not remove files created or
|
||||
modified by an ``install(SCRIPT)`` or ``install(CODE)`` command; you should
|
||||
create a custom uninstallation target for these and use ``add_dependency`` to
|
||||
make the ``uninstall`` target depend on it:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
include(ECMUninstallTarget)
|
||||
install(SCRIPT install-foo.cmake)
|
||||
add_custom_target(uninstall_foo COMMAND ${CMAKE_COMMAND} -P uninstall-foo.cmake)
|
||||
add_dependency(uninstall uninstall_foo)
|
||||
|
||||
The target will fail if the ``install`` target has not yet been run (so it is
|
||||
not possible to run CMake on the project and then immediately run the
|
||||
``uninstall`` target).
|
||||
|
||||
.. warning::
|
||||
|
||||
CMake deliberately does not provide an ``uninstall`` target by default on
|
||||
the basis that such a target has the potential to remove important files
|
||||
from a user's computer. Use with caution.
|
||||
|
||||
Since 1.7.0.
|
||||
#]=======================================================================]
|
||||
|
||||
if (NOT TARGET uninstall)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ecm_uninstall.cmake.in"
|
||||
"${CMAKE_BINARY_DIR}/ecm_uninstall.cmake"
|
||||
IMMEDIATE
|
||||
@ONLY
|
||||
)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/ecm_uninstall.cmake"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endif()
|
||||
17
3rdparty/kddockwidgets/cmake/ECM/modules/ECMVersionHeader.h.in
vendored
Normal file
17
3rdparty/kddockwidgets/cmake/ECM/modules/ECMVersionHeader.h.in
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// This file was generated by ecm_setup_version(): DO NOT EDIT!
|
||||
|
||||
#ifndef @HEADER_PREFIX@_VERSION_H
|
||||
#define @HEADER_PREFIX@_VERSION_H
|
||||
|
||||
#define @HEADER_PREFIX@_VERSION_STRING "@HEADER_VERSION@"
|
||||
#define @HEADER_PREFIX@_VERSION_MAJOR @HEADER_VERSION_MAJOR@
|
||||
#define @HEADER_PREFIX@_VERSION_MINOR @HEADER_VERSION_MINOR@
|
||||
#define @HEADER_PREFIX@_VERSION_PATCH @HEADER_VERSION_PATCH@
|
||||
#define @HEADER_PREFIX@_VERSION @HEADER_PREFIX@_VERSION_CHECK(@HEADER_PREFIX@_VERSION_MAJOR, @HEADER_PREFIX@_VERSION_MINOR, @HEADER_PREFIX@_VERSION_PATCH)
|
||||
|
||||
/*
|
||||
for example: @HEADER_PREFIX@_VERSION >= @HEADER_PREFIX@_VERSION_CHECK(1, 2, 2))
|
||||
*/
|
||||
#define @HEADER_PREFIX@_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
|
||||
|
||||
#endif
|
||||
43
3rdparty/kddockwidgets/cmake/ECM/modules/QtVersionOption.cmake
vendored
Normal file
43
3rdparty/kddockwidgets/cmake/ECM/modules/QtVersionOption.cmake
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
QtVersionOption
|
||||
---------------
|
||||
|
||||
Adds a build option to select the major Qt version if necessary,
|
||||
that is, if the major Qt version has not yet been determined otherwise
|
||||
(e.g. by a corresponding ``find_package()`` call).
|
||||
This module is typically included by other modules requiring knowledge
|
||||
about the major Qt version.
|
||||
|
||||
If the ECM version passed to find_package was at least 5.240.0 Qt6 is picked by default.
|
||||
Otherwise Qt5 is picked.
|
||||
|
||||
``QT_MAJOR_VERSION`` is defined to either be "5" or "6".
|
||||
|
||||
Since 5.82.0.
|
||||
#]=======================================================================]
|
||||
|
||||
if (DEFINED QT_MAJOR_VERSION)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (TARGET Qt5::Core)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
elseif (TARGET Qt6::Core)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
else()
|
||||
if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.240)
|
||||
option(BUILD_WITH_QT6 "Build against Qt 6" ON)
|
||||
else()
|
||||
option(BUILD_WITH_QT6 "Build against Qt 6" OFF)
|
||||
endif()
|
||||
|
||||
if (BUILD_WITH_QT6)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
else()
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
endif()
|
||||
endif()
|
||||
21
3rdparty/kddockwidgets/cmake/ECM/modules/ecm_uninstall.cmake.in
vendored
Normal file
21
3rdparty/kddockwidgets/cmake/ECM/modules/ecm_uninstall.cmake.in
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
exec_program(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif()
|
||||
endforeach()
|
||||
163
3rdparty/kddockwidgets/cmake/KDAB/modules/FindPySide2.cmake
vendored
Normal file
163
3rdparty/kddockwidgets/cmake/KDAB/modules/FindPySide2.cmake
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# PYSIDE_BASEDIR - Top of the PySide2 installation
|
||||
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide2
|
||||
# PYSIDE_LIBRARY - Files to link against to use PySide2
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide2
|
||||
#
|
||||
# You can install PySide2 from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io pyside2
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PYSIDE2_PRIV QUIET pyside2)
|
||||
endif()
|
||||
|
||||
set(PYSIDE2_FOUND FALSE)
|
||||
|
||||
if(PYSIDE2_PRIV_FOUND)
|
||||
set(PYSIDE2_FOUND TRUE)
|
||||
message(STATUS "Using PySide2 found in the system!")
|
||||
pkg_get_variable(SHIBOKEN_BINARY pyside2 generator_location)
|
||||
pkg_get_variable(PYSIDE2_BASEDIR pyside2 typesystemdir)
|
||||
pkg_get_variable(PYSIDE_INCLUDE_DIR pyside2 includedir)
|
||||
set(PYSIDE_TYPESYSTEMS ${PYSIDE2_BASEDIR})
|
||||
set(PYSIDE2_SO_VERSION ${PYSIDE2_PRIV_VERSION})
|
||||
set(PYSIDE_LIBRARY ${PYSIDE2_PRIV_LINK_LIBRARIES})
|
||||
list(GET PYSIDE_LIBRARY 0 PYSIDE_LIBRARY)
|
||||
else()
|
||||
# extract python library basename
|
||||
list(GET Python3_LIBRARIES 0 PYTHON_LIBRARY_FILENAME)
|
||||
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os, sys
|
||||
try:
|
||||
import PySide2.QtCore as QtCore
|
||||
print(os.path.dirname(QtCore.__file__))
|
||||
except Exception as error:
|
||||
print(error, file=sys.stderr)
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE2_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT PYSIDE2_BASEDIR)
|
||||
message(FATAL_ERROR "The PySide2 module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
|
||||
set(PYSIDE_BASEDIR
|
||||
${PYSIDE2_BASEDIR}
|
||||
CACHE PATH "Top level install of PySide2" FORCE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import PySide2.QtCore as QtCore
|
||||
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE2_SUFFIX
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import PySide2.QtCore as QtCore
|
||||
print(';'.join(map(str, QtCore.__version_info__)))
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE2_SO_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
list(GET PYSIDE2_SO_VERSION 0 PYSIDE2_SO_MACRO_VERSION)
|
||||
list(GET PYSIDE2_SO_VERSION 1 PYSIDE2_SO_MICRO_VERSION)
|
||||
list(GET PYSIDE2_SO_VERSION 2 PYSIDE2_SO_MINOR_VERSION)
|
||||
string(REPLACE ";" "." PYSIDE2_SO_VERSION "${PYSIDE2_SO_VERSION}")
|
||||
|
||||
if(NOT APPLE)
|
||||
set(PYSIDE2_SUFFIX "${PYSIDE2_SUFFIX}.${PYSIDE2_SO_MACRO_VERSION}.${PYSIDE2_SO_MICRO_VERSION}")
|
||||
else()
|
||||
string(REPLACE ".so" "" PYSIDE2_SUFFIX ${PYSIDE2_SUFFIX})
|
||||
set(PYSIDE2_SUFFIX "${PYSIDE2_SUFFIX}.${PYSIDE2_SO_MACRO_VERSION}.${PYSIDE2_SO_MICRO_VERSION}.dylib")
|
||||
endif()
|
||||
|
||||
set(PYSIDE2_FOUND TRUE)
|
||||
message(STATUS "PySide2 base dir: ${PYSIDE2_BASEDIR}")
|
||||
message(STATUS "PySide2 suffix: ${PYSIDE2_SUFFIX}")
|
||||
|
||||
#PySide
|
||||
#===============================================================================
|
||||
if(PYSIDE_CUSTOM_PREFIX STREQUAL "")
|
||||
set(PYSIDE_CUSTOM_PREFIX ${PYSIDE2_BASEDIR})
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
PYSIDE_INCLUDE_DIR pyside.h
|
||||
PATHS ${PYSIDE2_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include/PySide2
|
||||
NO_DEFAULT_PATH NO_CACHE NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
# Platform specific library names
|
||||
if(MSVC)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "pyside2.abi3.lib")
|
||||
elseif(CYGWIN)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "")
|
||||
elseif(WIN32)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
|
||||
else()
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside2.${PYSIDE2_SUFFIX}")
|
||||
endif()
|
||||
|
||||
find_file(
|
||||
PYSIDE_LIBRARY ${PYSIDE_LIBRARY_BASENAMES}
|
||||
PATHS ${PYSIDE2_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_path(
|
||||
PYSIDE_TYPESYSTEMS typesystem_core.xml
|
||||
PATHS ${PYSIDE2_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide2/typesystems
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PYSIDE2_FOUND)
|
||||
message(STATUS "PySide include dir: ${PYSIDE_INCLUDE_DIR}")
|
||||
message(STATUS "PySide library: ${PYSIDE_LIBRARY}")
|
||||
message(STATUS "PySide typesystems: ${PYSIDE_TYPESYSTEMS}")
|
||||
message(STATUS "PySide2 version: ${PYSIDE2_SO_VERSION}")
|
||||
|
||||
# Create PySide2 target
|
||||
add_library(PySide2::pyside2 SHARED IMPORTED GLOBAL)
|
||||
if(MSVC)
|
||||
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
|
||||
endif()
|
||||
set_property(TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
|
||||
set_property(
|
||||
TARGET PySide2::pyside2
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
${PYSIDE_INCLUDE_DIR}
|
||||
${PYSIDE_INCLUDE_DIR}/QtCore/
|
||||
${PYSIDE_INCLUDE_DIR}/QtGui/
|
||||
${PYSIDE_INCLUDE_DIR}/QtWidgets/
|
||||
${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
PySide2
|
||||
REQUIRED_VARS PYSIDE2_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
|
||||
VERSION_VAR PYSIDE2_SO_VERSION
|
||||
)
|
||||
147
3rdparty/kddockwidgets/cmake/KDAB/modules/FindPySide6.cmake
vendored
Normal file
147
3rdparty/kddockwidgets/cmake/KDAB/modules/FindPySide6.cmake
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# PYSIDE_BASEDIR - Top of the PySide6 installation
|
||||
# PYSIDE_INCLUDE_DIR - Directories to include to use PySide6
|
||||
# PYSIDE_LIBRARY - Files to link against to use PySide6
|
||||
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide6
|
||||
#
|
||||
# You can install PySide6 from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io pyside6
|
||||
|
||||
set(PYSIDE6_FOUND FALSE)
|
||||
|
||||
# extract python library basename
|
||||
list(GET Python3_LIBRARIES 0 PYTHON_LIBRARY_FILENAME)
|
||||
get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARY_FILENAME} NAME)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os, sys
|
||||
try:
|
||||
import PySide6.QtCore as QtCore
|
||||
print(os.path.dirname(QtCore.__file__))
|
||||
except Exception as error:
|
||||
print(error, file=sys.stderr)
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE6_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT PYSIDE6_BASEDIR)
|
||||
message(FATAL_ERROR "The PySide6 module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PYSIDE6_BASEDIR)
|
||||
set(PYSIDE_BASEDIR
|
||||
${PYSIDE6_BASEDIR}
|
||||
CACHE PATH "Top level install of PySide6" FORCE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import PySide6.QtCore as QtCore
|
||||
print(os.path.basename(QtCore.__file__).split('.', 1)[1])
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE6_SUFFIX
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import PySide6.QtCore as QtCore
|
||||
print(';'.join(map(str, QtCore.__version_info__)))
|
||||
"
|
||||
OUTPUT_VARIABLE PYSIDE6_SO_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
list(GET PYSIDE6_SO_VERSION 0 PYSIDE6_SO_MACRO_VERSION)
|
||||
list(GET PYSIDE6_SO_VERSION 1 PYSIDE6_SO_MICRO_VERSION)
|
||||
list(GET PYSIDE6_SO_VERSION 2 PYSIDE6_SO_MINOR_VERSION)
|
||||
string(REPLACE ";" "." PYSIDE6_SO_VERSION "${PYSIDE6_SO_VERSION}")
|
||||
|
||||
if(NOT APPLE)
|
||||
set(PYSIDE6_SUFFIX "${PYSIDE6_SUFFIX}.${PYSIDE6_SO_MACRO_VERSION}.${PYSIDE6_SO_MICRO_VERSION}")
|
||||
else()
|
||||
string(REPLACE ".so" "" PYSIDE6_SUFFIX ${PYSIDE6_SUFFIX})
|
||||
set(PYSIDE6_SUFFIX "${PYSIDE6_SUFFIX}.${PYSIDE6_SO_MACRO_VERSION}.${PYSIDE6_SO_MICRO_VERSION}.dylib")
|
||||
endif()
|
||||
|
||||
set(PYSIDE6_FOUND TRUE)
|
||||
message(STATUS "PySide6 base dir: ${PYSIDE6_BASEDIR}")
|
||||
message(STATUS "PySide6 suffix: ${PYSIDE6_SUFFIX}")
|
||||
endif()
|
||||
|
||||
if(PYSIDE6_FOUND)
|
||||
#PySide
|
||||
#===============================================================================
|
||||
find_path(
|
||||
PYSIDE_INCLUDE_DIR pyside.h
|
||||
PATH_SUFFIXES PySide6
|
||||
PATHS ${PYSIDE6_BASEDIR}/include ${PYSIDE_CUSTOM_PREFIX}/include
|
||||
)
|
||||
|
||||
# Platform specific library names
|
||||
if(MSVC)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "pyside6.abi3.lib")
|
||||
elseif(CYGWIN)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "")
|
||||
elseif(WIN32)
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
else()
|
||||
set(PYSIDE_LIBRARY_BASENAMES "libpyside6.${PYSIDE6_SUFFIX}")
|
||||
endif()
|
||||
|
||||
find_library(
|
||||
PYSIDE_LIBRARY
|
||||
NAMES ${PYSIDE_LIBRARY_BASENAMES}
|
||||
PATHS ${PYSIDE6_BASEDIR} ${PYSIDE_CUSTOM_PREFIX}/lib
|
||||
)
|
||||
|
||||
find_path(
|
||||
PYSIDE_TYPESYSTEMS typesystem_core.xml
|
||||
PATHS ${PYSIDE6_BASEDIR}/typesystems ${PYSIDE_CUSTOM_PREFIX}/share/PySide6/typesystems
|
||||
/usr/share/PySide6/typesystems
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PYSIDE6_FOUND)
|
||||
message(STATUS "PySide include dir: ${PYSIDE_INCLUDE_DIR}")
|
||||
message(STATUS "PySide library: ${PYSIDE_LIBRARY}")
|
||||
message(STATUS "PySide typesystems: ${PYSIDE_TYPESYSTEMS}")
|
||||
message(STATUS "PySide6 version: ${PYSIDE6_SO_VERSION}")
|
||||
|
||||
# Create PySide6 target
|
||||
add_library(PySide6::pyside6 SHARED IMPORTED GLOBAL)
|
||||
if(MSVC)
|
||||
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_IMPLIB ${PYSIDE_LIBRARY})
|
||||
endif()
|
||||
set_property(TARGET PySide6::pyside6 PROPERTY IMPORTED_LOCATION ${PYSIDE_LIBRARY})
|
||||
set_property(
|
||||
TARGET PySide6::pyside6
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
${PYSIDE_INCLUDE_DIR}
|
||||
${PYSIDE_INCLUDE_DIR}/QtCore/
|
||||
${PYSIDE_INCLUDE_DIR}/QtGui/
|
||||
${PYSIDE_INCLUDE_DIR}/QtWidgets/
|
||||
${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
PySide6
|
||||
REQUIRED_VARS PYSIDE6_BASEDIR PYSIDE_INCLUDE_DIR PYSIDE_LIBRARY PYSIDE_TYPESYSTEMS
|
||||
VERSION_VAR PYSIDE6_SO_VERSION
|
||||
)
|
||||
201
3rdparty/kddockwidgets/cmake/KDAB/modules/FindShiboken2.cmake
vendored
Normal file
201
3rdparty/kddockwidgets/cmake/KDAB/modules/FindShiboken2.cmake
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||
# SHIBOKEN_BINARY - Executable name
|
||||
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
||||
|
||||
# You can install Shiboken from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython \
|
||||
# --trusted-host download.qt.io shiboken2-generator
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SHIBOKEN2_PRIV QUIET shiboken2)
|
||||
endif()
|
||||
|
||||
set(SHIBOKEN_FOUND FALSE)
|
||||
|
||||
if(SHIBOKEN2_PRIV_FOUND)
|
||||
set(SHIBOKEN_FOUND TRUE)
|
||||
message(STATUS "Using shiboken found in the system!")
|
||||
pkg_get_variable(SHIBOKEN_BINARY shiboken2 generator_location)
|
||||
pkg_get_variable(SHIBOKEN_BASEDIR shiboken2 libdir)
|
||||
pkg_get_variable(SHIBOKEN_INCLUDE_DIR shiboken2 includedir)
|
||||
set(SHIBOKEN_VERSION ${SHIBOKEN2_PRIV_VERSION})
|
||||
set(SHIBOKEN_LIBRARY ${SHIBOKEN2_PRIV_LINK_LIBRARIES})
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
try:
|
||||
import shiboken2_generator
|
||||
print(shiboken2_generator.__path__[0])
|
||||
except:
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_GENERATOR_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
||||
message(FATAL_ERROR "The shiboken2_generator module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
try:
|
||||
import shiboken2
|
||||
print(shiboken2.__path__[0])
|
||||
except:
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT SHIBOKEN_BASEDIR)
|
||||
message(FATAL_ERROR "The shiboken2 module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import shiboken2
|
||||
print(';'.join(filter(None, map(str, shiboken2.__version_info__))))
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
list(GET SHIBOKEN_VERSION 0 SHIBOKEN_MACRO_VERSION)
|
||||
list(GET SHIBOKEN_VERSION 1 SHIBOKEN_MICRO_VERSION)
|
||||
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION)
|
||||
string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}")
|
||||
|
||||
if(SHIBOKEN_CUSTOM_PREFIX STREQUAL "")
|
||||
set(SHIBOKEN_CUSTOM_PREFIX ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||
endif()
|
||||
|
||||
message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}")
|
||||
message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
|
||||
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
|
||||
|
||||
if(SHIBOKEN_BASEDIR)
|
||||
find_path(
|
||||
SHIBOKEN_INCLUDE_DIR shiboken.h
|
||||
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
|
||||
NO_DEFAULT_PATH NO_CACHE NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
if(MSVC)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken2.abi3.lib")
|
||||
elseif(CYGWIN)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "")
|
||||
elseif(WIN32)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken2.${PYSIDE2_SUFFIX}")
|
||||
elseif(APPLE)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||
libshiboken2.abi3.dylib libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
|
||||
libshiboken2.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
|
||||
libshiboken2.abi3.${SHIBOKEN_VERSION}.dylib
|
||||
)
|
||||
else()
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||
libshiboken2.abi3.so libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}
|
||||
libshiboken2.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
|
||||
libshiboken2.abi3.so.${SHIBOKEN_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
return()
|
||||
endif()
|
||||
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||
find_file(
|
||||
SHIBOKEN_LIBRARY ${SHIBOKEN_LIBRARY_BASENAMES}
|
||||
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_program(
|
||||
SHIBOKEN_BINARY shiboken2
|
||||
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
if(SHIBOKEN_INCLUDE_DIR
|
||||
AND SHIBOKEN_LIBRARY
|
||||
AND SHIBOKEN_BINARY
|
||||
)
|
||||
set(SHIBOKEN_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(SHIBOKEN_FOUND)
|
||||
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# On Windows we must link to python3.dll that is a small library that links against python3x.dll
|
||||
# that allow us to choose any python3x.dll at runtime
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
for lib in '${Python3_LIBRARIES}'.split(';'):
|
||||
if '/' in lib:
|
||||
prefix, py = lib.rsplit('/', 1)
|
||||
if py.startswith('python3'):
|
||||
print(prefix + '/python3.lib')
|
||||
break
|
||||
"
|
||||
OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
# On Linux and MacOs our modules should not link with any python library
|
||||
# that must be handled by the main process
|
||||
set(PYTHON_LIMITED_LIBRARIES "")
|
||||
endif()
|
||||
endif()
|
||||
if(SHIBOKEN_FOUND)
|
||||
message(STATUS "Shiboken include dir: ${SHIBOKEN_INCLUDE_DIR}")
|
||||
message(STATUS "Shiboken library: ${SHIBOKEN_LIBRARY}")
|
||||
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
||||
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
||||
|
||||
# Create shiboke2 target
|
||||
add_library(Shiboken2::libshiboken SHARED IMPORTED GLOBAL)
|
||||
if(MSVC)
|
||||
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
|
||||
endif()
|
||||
set_property(TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
|
||||
set_property(
|
||||
TARGET Shiboken2::libshiboken
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
set_property(
|
||||
TARGET Shiboken2::libshiboken
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
|
||||
)
|
||||
|
||||
# Generator target
|
||||
add_executable(Shiboken2::shiboken IMPORTED GLOBAL)
|
||||
set_property(TARGET Shiboken2::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
Shiboken2
|
||||
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
||||
VERSION_VAR SHIBOKEN_VERSION
|
||||
)
|
||||
181
3rdparty/kddockwidgets/cmake/KDAB/modules/FindShiboken6.cmake
vendored
Normal file
181
3rdparty/kddockwidgets/cmake/KDAB/modules/FindShiboken6.cmake
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN
|
||||
# SHIBOKEN_LIBRARY - Files to link against to use SHIBOKEN
|
||||
# SHIBOKEN_BINARY - Executable name
|
||||
# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode.
|
||||
|
||||
# You can install Shiboken from Qt repository with
|
||||
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython \
|
||||
# --trusted-host download.qt.io shiboken6-generator
|
||||
|
||||
set(SHIBOKEN_FOUND FALSE)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
try:
|
||||
import shiboken6_generator
|
||||
print(shiboken6_generator.__path__[0])
|
||||
except:
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_GENERATOR_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT SHIBOKEN_GENERATOR_BASEDIR)
|
||||
message(FATAL_ERROR "The shiboken6_generator module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
try:
|
||||
import shiboken6
|
||||
print(shiboken6.__path__[0])
|
||||
except:
|
||||
exit()
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_BASEDIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT SHIBOKEN_BASEDIR)
|
||||
message(FATAL_ERROR "The shiboken6 module could not be imported. Make sure you have it installed "
|
||||
"by checking the output of \"pip${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} list\""
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
import os
|
||||
import shiboken6
|
||||
print(';'.join(filter(None, map(str, shiboken6.__version_info__))))
|
||||
"
|
||||
OUTPUT_VARIABLE SHIBOKEN_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
list(GET SHIBOKEN_VERSION 0 SHIBOKEN_MACRO_VERSION)
|
||||
list(GET SHIBOKEN_VERSION 1 SHIBOKEN_MICRO_VERSION)
|
||||
list(GET SHIBOKEN_VERSION 2 SHIBOKEN_MINOR_VERSION)
|
||||
string(REPLACE ";" "." SHIBOKEN_VERSION "${SHIBOKEN_VERSION}")
|
||||
|
||||
message(STATUS "ShibokenGenerator base dir: ${SHIBOKEN_GENERATOR_BASEDIR}")
|
||||
message(STATUS "Shiboken base dir: ${SHIBOKEN_BASEDIR}")
|
||||
message(STATUS "Shiboken custom path: ${SHIBOKEN_CUSTOM_PREFIX}")
|
||||
|
||||
if(SHIBOKEN_BASEDIR)
|
||||
# Alternatively we could do find_package(Shiboken6Tools)?
|
||||
find_path(
|
||||
SHIBOKEN_INCLUDE_DIR shiboken.h
|
||||
PATH_SUFFIXES shiboken6
|
||||
PATHS ${SHIBOKEN_CUSTOM_PREFIX} ${SHIBOKEN_GENERATOR_BASEDIR}/include
|
||||
)
|
||||
if(MSVC)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "shiboken6.abi3.lib")
|
||||
elseif(CYGWIN)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "")
|
||||
elseif(WIN32)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES "libshiboken6.${PYSIDE2_SUFFIX}")
|
||||
elseif(APPLE)
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||
libshiboken6.abi3.dylib libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.dylib
|
||||
libshiboken6.abi3.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}.dylib
|
||||
libshiboken6.abi3.${SHIBOKEN_VERSION}.dylib
|
||||
)
|
||||
else()
|
||||
set(SHIBOKEN_LIBRARY_BASENAMES
|
||||
libshiboken6.abi3.so libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}
|
||||
libshiboken6.abi3.so.${SHIBOKEN_MACRO_VERSION}.${SHIBOKEN_MICRO_VERSION}
|
||||
libshiboken6.abi3.so.${SHIBOKEN_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT SHIBOKEN_INCLUDE_DIR)
|
||||
message(STATUS "No include dir found for Shiboken")
|
||||
return()
|
||||
endif()
|
||||
set(SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_CUSTOM_PREFIX})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_BASEDIR})
|
||||
list(APPEND SHIBOKEN_SEARCH_PATHS ${SHIBOKEN_GENERATOR_BASEDIR})
|
||||
find_library(
|
||||
SHIBOKEN_LIBRARY
|
||||
NAMES ${SHIBOKEN_LIBRARY_BASENAMES}
|
||||
PATHS ${SHIBOKEN_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
find_program(SHIBOKEN_BINARY shiboken6 PATHS ${SHIBOKEN_SEARCH_PATHS})
|
||||
endif()
|
||||
if(SHIBOKEN_INCLUDE_DIR
|
||||
AND SHIBOKEN_LIBRARY
|
||||
AND SHIBOKEN_BINARY
|
||||
)
|
||||
set(SHIBOKEN_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(SHIBOKEN_FOUND)
|
||||
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# On Windows we must link to python3.dll that is a small library that links against python3x.dll
|
||||
# that allow us to choose any python3x.dll at runtime
|
||||
execute_process(
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} -c "if True:
|
||||
for lib in '${Python3_LIBRARIES}'.split(';'):
|
||||
if '/' in lib:
|
||||
prefix, py = lib.rsplit('/', 1)
|
||||
if py.startswith('python3'):
|
||||
print(prefix + '/python3.lib')
|
||||
break
|
||||
"
|
||||
OUTPUT_VARIABLE PYTHON_LIMITED_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else()
|
||||
# On Linux and MacOs our modules should not link with any python library
|
||||
# that must be handled by the main process
|
||||
set(PYTHON_LIMITED_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
if(SHIBOKEN_FOUND)
|
||||
message(STATUS "Shiboken include dir: ${SHIBOKEN_INCLUDE_DIR}")
|
||||
message(STATUS "Shiboken library: ${SHIBOKEN_LIBRARY}")
|
||||
message(STATUS "Shiboken binary: ${SHIBOKEN_BINARY}")
|
||||
message(STATUS "Shiboken version: ${SHIBOKEN_VERSION}")
|
||||
|
||||
# Create shiboken2 target
|
||||
add_library(Shiboken6::libshiboken SHARED IMPORTED GLOBAL)
|
||||
if(MSVC)
|
||||
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_IMPLIB ${SHIBOKEN_LIBRARY})
|
||||
endif()
|
||||
set_property(TARGET Shiboken6::libshiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_LIBRARY})
|
||||
set_property(
|
||||
TARGET Shiboken6::libshiboken
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SHIBOKEN_INCLUDE_DIR} ${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
set_property(
|
||||
TARGET Shiboken6::libshiboken
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIMITED_LIBRARIES}
|
||||
)
|
||||
|
||||
# Generator target
|
||||
add_executable(Shiboken6::shiboken IMPORTED GLOBAL)
|
||||
set_property(TARGET Shiboken6::shiboken PROPERTY IMPORTED_LOCATION ${SHIBOKEN_BINARY})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
Shiboken6
|
||||
REQUIRED_VARS SHIBOKEN_BASEDIR SHIBOKEN_INCLUDE_DIR SHIBOKEN_LIBRARY SHIBOKEN_BINARY
|
||||
VERSION_VAR SHIBOKEN_VERSION
|
||||
)
|
||||
36
3rdparty/kddockwidgets/cmake/KDAB/modules/KDFixupShiboken2.py
vendored
Executable file
36
3rdparty/kddockwidgets/cmake/KDAB/modules/KDFixupShiboken2.py
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
"""
|
||||
Script to fix bugs in code generated by shiboken-generator vr2
|
||||
"""
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
def removeExtraNamespaceForDefaultEnumValue(filename):
|
||||
"""
|
||||
Remove namespace from default flag value
|
||||
this is a shiboken2 bug fixed on shiboken6
|
||||
"""
|
||||
regex = re.compile(r"\s=\s[^\s]+::{}")
|
||||
newContent = ""
|
||||
with open(filename, encoding='utf-8') as f:
|
||||
for line in f:
|
||||
newContent += re.sub(regex, ' = {}', line)
|
||||
|
||||
with open(filename, "w", encoding='utf-8') as f:
|
||||
f.write(newContent)
|
||||
|
||||
|
||||
# Usage: <script> <list-of-files>
|
||||
# It will fix the file inplace
|
||||
if __name__ == '__main__':
|
||||
for fileToFix in sys.argv[1:]:
|
||||
print("Fixup: {}".format(fileToFix))
|
||||
removeExtraNamespaceForDefaultEnumValue(fileToFix)
|
||||
41
3rdparty/kddockwidgets/cmake/KDAB/modules/KDInstallLocation.cmake
vendored
Normal file
41
3rdparty/kddockwidgets/cmake/KDAB/modules/KDInstallLocation.cmake
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# Some default installation locations. These should be global, with any project
|
||||
# specific locations added to the end. These paths are all relative to the
|
||||
# install prefix.
|
||||
#
|
||||
# These paths attempt to adhere to the FHS, and are similar to those provided
|
||||
# by autotools and used in many Linux distributions.
|
||||
|
||||
# Use GNU install directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT INSTALL_RUNTIME_DIR)
|
||||
set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_LIBRARY_DIR)
|
||||
set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_ARCHIVE_DIR)
|
||||
set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_INCLUDE_DIR)
|
||||
set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
if(NOT INSTALL_DATADIR)
|
||||
set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR})
|
||||
endif()
|
||||
if(NOT INSTALL_DOC_DIR)
|
||||
set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${${PROJECT_NAME}_LIBRARY_QTID})
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
if(APPLE)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
else()
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}")
|
||||
endif()
|
||||
173
3rdparty/kddockwidgets/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake
vendored
Normal file
173
3rdparty/kddockwidgets/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# Save path to this cmake file (so it can be used later in the macros)
|
||||
set(THIS_CMAKE_LIST_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
|
||||
# cmake-lint: disable=C0103
|
||||
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
CACHE FILEPATH "Custom path to install python bindings."
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||
|
||||
if(WIN32)
|
||||
set(PATH_SEP "\;")
|
||||
else()
|
||||
set(PATH_SEP ":")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
#remove noisy compiler warnings (as the generated code is not necessarily super-warning-free)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-all -Wno-extra")
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
|
||||
if(QtCore_is_framework)
|
||||
# Get the path to the framework dir.
|
||||
list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
|
||||
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
|
||||
|
||||
# QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
|
||||
# to the actual include directory, which has include files for non-framework parts of Qt.
|
||||
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Flags that we will pass to shiboken-generator
|
||||
# --generator-set=shiboken: tells the generator that we want to use shiboken to generate code,
|
||||
# a doc generator is also available
|
||||
# --enable-parent-ctor-heuristic: Enable heuristics to detect parent relationship on constructors,
|
||||
# this try to guess parent ownership based on the arguments of the constructors
|
||||
# --enable-pyside-extensionsL: This will generate code for Qt based classes, adding extra attributes,
|
||||
# like signal, slot;
|
||||
# --enable-return-value-heuristic: Similar as --enable-parent-ctor-heuristic this use some logic to guess
|
||||
# parent child relationship based on the returned argument
|
||||
# --use-isnull-as-nb_nonzero: If a class have an isNull() const method, it will be used to compute
|
||||
# the value of boolean casts.
|
||||
# Example, QImage::isNull() will be used when on python side you do `if (myQImage)`
|
||||
set(GENERATOR_EXTRA_FLAGS
|
||||
--generator-set=shiboken
|
||||
--enable-parent-ctor-heuristic
|
||||
--enable-pyside-extensions
|
||||
--enable-return-value-heuristic
|
||||
--use-isnull-as-nb_nonzero
|
||||
-std=c++${CMAKE_CXX_STANDARD}
|
||||
)
|
||||
|
||||
# 2017-04-24 The protected hack can unfortunately not be disabled, because
|
||||
# Clang does produce linker errors when we disable the hack.
|
||||
# But the ugly workaround in Python is replaced by a shiboken change.
|
||||
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
||||
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
|
||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||
endif()
|
||||
|
||||
# Replace all semicolons in a string with this platform's path separator
|
||||
macro(make_path varname)
|
||||
# accepts any number of path variables
|
||||
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
||||
endmacro()
|
||||
|
||||
# Creates a PySide module target based on the arguments
|
||||
# This will:
|
||||
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
||||
# 2 - Create a Cmake library target called "Py${libraryName}" the output name of this target
|
||||
# will be changed to match PySide template
|
||||
# Args:
|
||||
# libraryName - The name of the output module
|
||||
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||
# outputSource - The files that will be generated by shiboken
|
||||
# targetIncludeDirs - This will be passed to target_include_directories
|
||||
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||
# globalInclude - A header-file that contains all classes that will be generated
|
||||
# typesystemXML - The target binding typesystem (that should be the full path)
|
||||
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||
# trigger if one of these files changes
|
||||
# moduleOutputDir - Where the library file should be stored
|
||||
macro(
|
||||
create_python_bindings
|
||||
libraryName
|
||||
typesystemPaths
|
||||
includePaths
|
||||
outputSource
|
||||
targetIncludeDirs
|
||||
targetLinkLibraries
|
||||
globalInclude
|
||||
typesystemXML
|
||||
dependsArg
|
||||
moduleOutputDir
|
||||
)
|
||||
|
||||
# Transform the path separators into something shiboken understands.
|
||||
make_path(shiboken_include_dirs ${includePaths})
|
||||
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||
get_property(
|
||||
raw_python_dir_include_dirs
|
||||
DIRECTORY
|
||||
PROPERTY INCLUDE_DIRECTORIES
|
||||
)
|
||||
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
||||
set(shiboken_include_dirs "${shiboken_include_dirs}${PATH_SEP}${python_dir_include_dirs}")
|
||||
|
||||
set(shiboken_framework_include_dirs_option "")
|
||||
if(CMAKE_HOST_APPLE)
|
||||
set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
|
||||
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||
endif()
|
||||
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||
add_custom_command(
|
||||
OUTPUT ${outputSource}
|
||||
COMMAND
|
||||
$<TARGET_PROPERTY:Shiboken2::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
|
||||
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
|
||||
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
|
||||
COMMAND ${Python3_EXECUTABLE} ${THIS_CMAKE_LIST_DIR}/KDFixupShiboken2.py ${outputSource}
|
||||
DEPENDS ${typesystemXML} ${dependsArg}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running generator for ${libraryName} binding..."
|
||||
)
|
||||
|
||||
set(TARGET_NAME "Py${libraryName}")
|
||||
set(MODULE_NAME "${libraryName}")
|
||||
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||
|
||||
set_target_properties(
|
||||
${TARGET_NAME}
|
||||
PROPERTIES PREFIX ""
|
||||
OUTPUT_NAME ${MODULE_NAME}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||
)
|
||||
if(APPLE)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||
elseif(NOT WIN32) #ie. linux
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide2::pyside2 Shiboken2::libshiboken)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
|
||||
if(APPLE)
|
||||
set_property(
|
||||
TARGET ${TARGET_NAME}
|
||||
APPEND
|
||||
PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
|
||||
)
|
||||
endif()
|
||||
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
||||
endmacro()
|
||||
170
3rdparty/kddockwidgets/cmake/KDAB/modules/KDPySide6ModuleBuild.cmake
vendored
Normal file
170
3rdparty/kddockwidgets/cmake/KDAB/modules/KDPySide6ModuleBuild.cmake
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX)
|
||||
# cmake-lint: disable=C0103
|
||||
set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX
|
||||
${CMAKE_INSTALL_PREFIX}
|
||||
CACHE FILEPATH "Custom path to install python bindings."
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}")
|
||||
|
||||
if(WIN32)
|
||||
set(PATH_SEP "\;")
|
||||
else()
|
||||
set(PATH_SEP ":")
|
||||
endif()
|
||||
#Qt6 requires C++17
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
#remove noisy compiler warnings (as the generated code is not necessarily super-warning-free)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-all -Wno-extra")
|
||||
endif()
|
||||
|
||||
# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
|
||||
get_target_property(QtCore_is_framework Qt6::Core FRAMEWORK)
|
||||
if(QtCore_is_framework)
|
||||
# Get the path to the framework dir.
|
||||
list(GET Qt6Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
|
||||
get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
|
||||
|
||||
# QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
|
||||
# to the actual include directory, which has include files for non-framework parts of Qt.
|
||||
get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
# Flags that we will pass to shiboken-generator
|
||||
# --generator-set=shiboken: tells the generator that we want to use shiboken to generate code,
|
||||
# a doc generator is also available
|
||||
# --enable-parent-ctor-heuristic: Enable heuristics to detect parent relationship on constructors,
|
||||
# this try to guess parent ownership based on the arguments of the constructors
|
||||
# --enable-pyside-extensionsL: This will generate code for Qt based classes, adding extra attributes,
|
||||
# like signal, slot;
|
||||
# --enable-return-value-heuristic: Similar as --enable-parent-ctor-heuristic this use some logic to guess
|
||||
# parent child relationship based on the returned argument
|
||||
# --use-isnull-as-nb_nonzero: If a class have an isNull() const method, it will be used to compute
|
||||
# the value of boolean casts.
|
||||
# Example, QImage::isNull() will be used when on python side you do `if (myQImage)`
|
||||
set(GENERATOR_EXTRA_FLAGS
|
||||
--generator-set=shiboken
|
||||
--enable-parent-ctor-heuristic
|
||||
--enable-pyside-extensions
|
||||
--enable-return-value-heuristic
|
||||
--use-isnull-as-nb_nonzero
|
||||
-std=c++${CMAKE_CXX_STANDARD}
|
||||
)
|
||||
|
||||
# 2017-04-24 The protected hack can unfortunately not be disabled, because
|
||||
# Clang does produce linker errors when we disable the hack.
|
||||
# But the ugly workaround in Python is replaced by a shiboken change.
|
||||
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
||||
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
|
||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||
endif()
|
||||
|
||||
# Replace all semicolons in a string with this platform's path separator
|
||||
macro(make_path varname)
|
||||
# accepts any number of path variables
|
||||
string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
|
||||
endmacro()
|
||||
|
||||
# Creates a PySide module target based on the arguments
|
||||
# This will:
|
||||
# 1 - Create a Cmake custom-target that call shiboken-generator passign the correct arguments
|
||||
# 2 - Create a Cmake library target called "Py${libraryName}" the output name of this target
|
||||
# will be changed to match PySide template
|
||||
# Args:
|
||||
# libraryName - The name of the output module
|
||||
# typesystemPaths - A list of paths where shiboken should look for typesystem files
|
||||
# includePaths - Include paths necessary to parse your class. *This is not the same as build*
|
||||
# outputSource - The files that will be generated by shiboken
|
||||
# targetIncludeDirs - This will be passed to target_include_directories
|
||||
# targetLinkLibraries - This will be passed to targetLinkLibraries
|
||||
# globalInclude - A header-file that contains all classes that will be generated
|
||||
# typesystemXML - The target binding typesystem (that should be the full path)
|
||||
# dependsArg - This var will be passed to add_custom_command(DEPENDS) so a new generation will be
|
||||
# trigger if one of these files changes
|
||||
# moduleOutputDir - Where the library file should be stored
|
||||
macro(
|
||||
create_python_bindings
|
||||
libraryName
|
||||
typesystemPaths
|
||||
includePaths
|
||||
outputSource
|
||||
targetIncludeDirs
|
||||
targetLinkLibraries
|
||||
globalInclude
|
||||
typesystemXML
|
||||
dependsArg
|
||||
moduleOutputDir
|
||||
)
|
||||
|
||||
# Transform the path separators into something shiboken understands.
|
||||
make_path(shiboken_include_dirs ${includePaths})
|
||||
make_path(shiboken_typesystem_dirs ${typesystemPaths})
|
||||
get_property(
|
||||
raw_python_dir_include_dirs
|
||||
DIRECTORY
|
||||
PROPERTY INCLUDE_DIRECTORIES
|
||||
)
|
||||
make_path(python_dir_include_dirs ${raw_python_dir_include_dirs})
|
||||
|
||||
set(shiboken_framework_include_dirs_option "")
|
||||
if(CMAKE_HOST_APPLE)
|
||||
# We need to pass "-iframework /path/to/Qt/<version>/macos/lib/" to shiboken
|
||||
set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}/..")
|
||||
make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
|
||||
set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
|
||||
endif()
|
||||
set_property(SOURCE ${outputSource} PROPERTY SKIP_AUTOGEN ON)
|
||||
add_custom_command(
|
||||
OUTPUT ${outputSource}
|
||||
COMMAND
|
||||
$<TARGET_PROPERTY:Shiboken6::shiboken,LOCATION> ${GENERATOR_EXTRA_FLAGS} ${globalInclude}
|
||||
--include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs}
|
||||
${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML}
|
||||
DEPENDS ${typesystemXML} ${dependsArg}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running generator for ${libraryName} binding..."
|
||||
)
|
||||
|
||||
set(TARGET_NAME "Py${libraryName}")
|
||||
set(MODULE_NAME "${libraryName}")
|
||||
add_library(${TARGET_NAME} MODULE ${outputSource})
|
||||
|
||||
set_target_properties(
|
||||
${TARGET_NAME}
|
||||
PROPERTIES PREFIX ""
|
||||
OUTPUT_NAME ${MODULE_NAME}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${moduleOutputDir}
|
||||
)
|
||||
if(APPLE)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
|
||||
elseif(NOT WIN32) #ie. linux
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${targetIncludeDirs})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${targetLinkLibraries} PySide6::pyside6 Shiboken6::libshiboken)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE Py_LIMITED_API=0x03050000)
|
||||
if(APPLE)
|
||||
set_property(
|
||||
TARGET ${TARGET_NAME}
|
||||
APPEND
|
||||
PROPERTY LINK_FLAGS "-undefined dynamic_lookup"
|
||||
)
|
||||
endif()
|
||||
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX})
|
||||
endmacro()
|
||||
58
3rdparty/kddockwidgets/cmake/KDAB/modules/KDQtInstallPaths.cmake
vendored
Normal file
58
3rdparty/kddockwidgets/cmake/KDAB/modules/KDQtInstallPaths.cmake
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Allen Winter <allen.winter@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# Assumes you've already found Qt and QT_VERSION_MAJOR is set
|
||||
#
|
||||
# Create variables for all the various install paths for the Qt version in use
|
||||
# Make sure to have found Qt before using this.
|
||||
# sets variables like QT_INSTALL_PREFIX, QT_INSTALL_DATA, QT_INSTALL_DOCS, etc.
|
||||
# run qmake -query to see a full list
|
||||
|
||||
if(NOT DEFINED QT_VERSION_MAJOR)
|
||||
message(FATAL_ERROR "Please set QT_VERSION_MAJOR first (ie. set(QT_VERSION_MAJOR 5))")
|
||||
endif()
|
||||
|
||||
# use qtpaths if qmake not found
|
||||
if(TARGET Qt${QT_VERSION_MAJOR}::qmake)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qmake LOCATION)
|
||||
elseif(TARGET Qt${QT_VERSION_MAJOR}::qtpaths)
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qtpaths LOCATION)
|
||||
else()
|
||||
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${QT_QMAKE_EXECUTABLE} -query
|
||||
RESULT_VARIABLE return_code
|
||||
OUTPUT_VARIABLE ALL_VARS
|
||||
)
|
||||
if(NOT return_code EQUAL 0)
|
||||
message(WARNING "Failed call: ${QT_QMAKE_EXECUTABLE} -query")
|
||||
message(FATAL_ERROR "QMake call failed: ${return_code}")
|
||||
endif()
|
||||
|
||||
string(REPLACE "\n" ";" VARS_LIST ${ALL_VARS})
|
||||
foreach(qval ${VARS_LIST})
|
||||
if(qval MATCHES "QT_INSTALL_")
|
||||
string(REPLACE ":" ";" QVAL_LIST ${qval})
|
||||
list(LENGTH QVAL_LIST listlen)
|
||||
list(GET QVAL_LIST 0 var)
|
||||
if(WIN32 AND ${listlen} GREATER 2)
|
||||
list(GET QVAL_LIST 2 path)
|
||||
list(GET QVAL_LIST 1 drive)
|
||||
set(path "${drive}:${path}")
|
||||
else()
|
||||
list(GET QVAL_LIST 1 path)
|
||||
endif()
|
||||
if(NOT ${var}) #if set already on the command line for example
|
||||
set(${var}
|
||||
${path}
|
||||
CACHE PATH "Qt install path for ${var}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
165
3rdparty/kddockwidgets/code.code-workspace
vendored
Normal file
165
3rdparty/kddockwidgets/code.code-workspace
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "kddockwidgets",
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"extensions": {
|
||||
"recommendations": [
|
||||
"vadimcn.vscode-lldb",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"Dart-Code.dart-code",
|
||||
"Dart-Code.flutter",
|
||||
"mhutchie.git-graph",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"bbenoist.QML",
|
||||
"ms-vscode.cmake-tools"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"editor.formatOnSave": true,
|
||||
"C_Cpp.autocompleteAddParentheses": true,
|
||||
"clangd.arguments": [
|
||||
"-header-insertion=never",
|
||||
"--clang-tidy=false"
|
||||
],
|
||||
"todo-tree.tree.scanMode": "workspace only",
|
||||
"todo-tree.tree.disableCompactFolders": false,
|
||||
"todo-tree.tree.showBadges": true,
|
||||
"todo-tree.general.tags": [
|
||||
"TODO"
|
||||
],
|
||||
"testMate.cpp.test.executables": "{build-dev}/**/*{tst}*",
|
||||
"todo-tree.filtering.excludeGlobs": [
|
||||
"**/ECM",
|
||||
"**/3rdparty"
|
||||
],
|
||||
"cmake.copyCompileCommands": "${workspaceFolder:kddockwidgets}/compile_commands.json",
|
||||
"cmake.automaticReconfigure": false,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.associations": {
|
||||
"*.code-workspace.template": "json"
|
||||
}
|
||||
},
|
||||
"launch": {
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Current Target (LLDB)",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"env": {
|
||||
"KDDW_TEST_FRONTEND": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Example via Wayland",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "kwin_wayland",
|
||||
"args": [
|
||||
"--width",
|
||||
"1600",
|
||||
"--height",
|
||||
"1600",
|
||||
"${command:cmake.launchTargetPath} -platform wayland"
|
||||
],
|
||||
"cwd": "${command:cmake.buildDirectory}"
|
||||
},
|
||||
{
|
||||
"name": "Current Target (VS)",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"sourceFileMap": {
|
||||
"C:/work/build/qt5_workdir/w/s": "${QTDIR}/../Src",
|
||||
"Q:/qt5_workdir/w/s": "${QTDIR}/../Src",
|
||||
"C:/Users/qt/work/install": "${QTDIR}/../Src",
|
||||
"C:/Users/qt/work/qt": "${QTDIR}/../Src"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Flutter attach",
|
||||
"request": "attach",
|
||||
"type": "dart",
|
||||
"packages": "tests/flutter_tests_embedder/.dart_tool/package_config.json",
|
||||
"vmServiceUri": "${command:dart.promptForVmService}"
|
||||
},
|
||||
{
|
||||
"name": "Flutter test (dart)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}/tests/flutter_tests_embedder/",
|
||||
"deviceId": "kddw_test_gltf_embedder",
|
||||
"args": [
|
||||
"-v"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (dart)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}/examples/flutter",
|
||||
"deviceId": "linux"
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (native)",
|
||||
"request": "launch",
|
||||
"type": "lldb",
|
||||
"program": "${workspaceFolder:kddockwidgets}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}"
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (native,wait)",
|
||||
"request": "launch",
|
||||
"type": "lldb",
|
||||
"program": "${workspaceFolder:kddockwidgets}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}",
|
||||
"args": [
|
||||
"--wait"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tasks": {
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"problemMatcher": [],
|
||||
"label": "Run current target under valgrind",
|
||||
"command": "/usr/bin/valgrind",
|
||||
"type": "shell",
|
||||
"args": [
|
||||
"${command:cmake.launchTargetPath}"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${command:cmake.buildDirectory}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Run Qt Assistant",
|
||||
"type": "shell",
|
||||
"command": "assistant",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Qt Designer",
|
||||
"type": "shell",
|
||||
"command": "designer",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
205
3rdparty/kddockwidgets/code.code-workspace.template
vendored
Normal file
205
3rdparty/kddockwidgets/code.code-workspace.template
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "kddockwidgets",
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"extensions": {
|
||||
"recommendations": [
|
||||
"vadimcn.vscode-lldb",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"Dart-Code.dart-code",
|
||||
"Dart-Code.flutter",
|
||||
"mhutchie.git-graph",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"bbenoist.QML",
|
||||
"ms-vscode.cmake-tools"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"editor.formatOnSave": true,
|
||||
"C_Cpp.autocompleteAddParentheses": true,
|
||||
"clangd.arguments": [
|
||||
"-header-insertion=never",
|
||||
"--clang-tidy=false"
|
||||
],
|
||||
"todo-tree.tree.scanMode": "workspace only",
|
||||
"todo-tree.tree.disableCompactFolders": false,
|
||||
"todo-tree.tree.showBadges": true,
|
||||
"todo-tree.general.tags": [
|
||||
"TODO"
|
||||
],
|
||||
"testMate.cpp.test.executables": "{build-dev}/**/*{tst}*",
|
||||
"todo-tree.filtering.excludeGlobs": [
|
||||
"**/ECM",
|
||||
"**/3rdparty"
|
||||
],
|
||||
"cmake.copyCompileCommands": "${workspaceFolder:kddockwidgets}/compile_commands.json",
|
||||
"cmake.automaticReconfigure": false,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.associations": {
|
||||
"*.code-workspace.template": "json"
|
||||
}
|
||||
},
|
||||
"launch": {
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Current Target (LLDB Linux)",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"env": {
|
||||
"KDDW_TEST_FRONTEND": "1"
|
||||
},
|
||||
"gen.os": "linux",
|
||||
"@@{linux_lldb_printers}": ""
|
||||
},
|
||||
{
|
||||
"name": "Current Target (LLDB macOS)",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"env": {
|
||||
"KDDW_TEST_FRONTEND": "1"
|
||||
},
|
||||
"gen.os": "macos",
|
||||
"sourceMap": {
|
||||
"/Users/qt/work/qt": "${QT_INSTALL}/../Src"
|
||||
},
|
||||
"initCommands": [
|
||||
"command script import \"${QT_SDK_INSTALL}/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Example via Wayland",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "kwin_wayland",
|
||||
"args": [
|
||||
"--width",
|
||||
"1600",
|
||||
"--height",
|
||||
"1600",
|
||||
"${command:cmake.launchTargetPath} -platform wayland"
|
||||
],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"gen.os": "linux",
|
||||
"@@{linux_lldb_printers}": ""
|
||||
},
|
||||
{
|
||||
"name": "Current Target (VS)",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [],
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"gen.os": "windows",
|
||||
"visualizerFile": "${workspaceFolder}/qt6.natvis",
|
||||
"sourceFileMap": {
|
||||
"C:/work/build/qt5_workdir/w/s": "${QT_INSTALL}/../Src",
|
||||
"Q:/qt5_workdir/w/s": "${QT_INSTALL}/../Src",
|
||||
"C:/Users/qt/work/install": "${QT_INSTALL}/../Src",
|
||||
"C:/Users/qt/work/qt": "${QT_INSTALL}/../Src"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Flutter attach",
|
||||
"request": "attach",
|
||||
"type": "dart",
|
||||
"packages": "tests/flutter_tests_embedder/.dart_tool/package_config.json",
|
||||
"vmServiceUri": "${command:dart.promptForVmService}",
|
||||
"gen.os": "linux"
|
||||
},
|
||||
{
|
||||
"name": "Flutter test (dart)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}/tests/flutter_tests_embedder/",
|
||||
"deviceId": "kddw_test_gltf_embedder",
|
||||
"args": [
|
||||
"-v"
|
||||
],
|
||||
"gen.os": "linux"
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (dart)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}/examples/flutter",
|
||||
"deviceId": "linux",
|
||||
"gen.os": "linux"
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (native)",
|
||||
"request": "launch",
|
||||
"type": "lldb",
|
||||
"program": "${workspaceFolder:kddockwidgets}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}",
|
||||
"gen.os": "linux"
|
||||
},
|
||||
{
|
||||
"name": "Flutter example (native,wait)",
|
||||
"request": "launch",
|
||||
"type": "lldb",
|
||||
"program": "${workspaceFolder:kddockwidgets}/examples/flutter/build/linux/x64/debug/bundle/kddockwidgets_flutter_example",
|
||||
"cwd": "${workspaceFolder:kddockwidgets}",
|
||||
"args": [
|
||||
"--wait"
|
||||
],
|
||||
"gen.os": "linux"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tasks": {
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"gen.os": "linux",
|
||||
"label": "Run current target under valgrind",
|
||||
"command": "/usr/bin/valgrind",
|
||||
"type": "shell",
|
||||
"args": [
|
||||
"${command:cmake.launchTargetPath}"
|
||||
],
|
||||
"presentation": {
|
||||
"reveal": "always"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${command:cmake.buildDirectory}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Qt Assistant",
|
||||
"type": "shell",
|
||||
"command": "assistant",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Qt Designer",
|
||||
"type": "shell",
|
||||
"command": "designer",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"gen.globals": {
|
||||
"linux_lldb_printers": {
|
||||
"sourceMap": {
|
||||
"/home/qt/work/qt": "${QT_INSTALL}/../Src"
|
||||
},
|
||||
"initCommands": [
|
||||
"command script import ${QT_SDK_INSTALL}/Tools/QtCreator/share/qtcreator/debugger/lldbbridge.py"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
21
3rdparty/kddockwidgets/conan/README.txt
vendored
Normal file
21
3rdparty/kddockwidgets/conan/README.txt
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
In the following example we assume you have the kddockwidgets source available in
|
||||
/path/to/kddockwidgets-source. replace '/path/to/kddockwidgets-source' to fit your needs.
|
||||
|
||||
$ conan create -s build_type=Release -o kddockwidgets:build_examples=True -o kddockwidgets:build_tests=True /path/to/kddockwidgets-source/conan kdab/stable
|
||||
|
||||
Configuration options:
|
||||
* build_static
|
||||
Builds static versions of the libraries. Default=False
|
||||
|
||||
* build_tests
|
||||
Build the test harness. Default=False
|
||||
|
||||
* build_examples
|
||||
Build the examples. Default=True
|
||||
|
||||
* build_python_bindings
|
||||
Build/Generate python bindings (always false for Debug or static builds). Default=False
|
||||
|
||||
* build_for_qt6
|
||||
Build against Qt6 rather than Qt5. Default=false (Qt5 will be used even if Qt6 is available)
|
||||
(Make sure the Qt6 bin directory is found in your execute PATH)
|
||||
70
3rdparty/kddockwidgets/conan/conanfile.py
vendored
Normal file
70
3rdparty/kddockwidgets/conan/conanfile.py
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
from conans import ConanFile, CMake, tools
|
||||
|
||||
|
||||
class KDDockWidgetsConan(ConanFile):
|
||||
name = "kddockwidgets"
|
||||
version = "2.1.0"
|
||||
default_user = "kdab"
|
||||
default_channel = "stable"
|
||||
license = ("https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-2.0-only.txt",
|
||||
"https://raw.githubusercontent.com/KDAB/KDDockWidgets/master/LICENSES/GPL-3.0-only.txt")
|
||||
author = "Klaralvdalens Datakonsult AB (KDAB) info@kdab.com"
|
||||
url = "https://github.com/KDAB/KDDockWidgets"
|
||||
description = "Advanced Dock Widget Framework for Qt"
|
||||
generators = "cmake"
|
||||
topics = ("qt", "dockwidget", "kdab")
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"qt_version": "ANY",
|
||||
"build_static": [True, False],
|
||||
"build_examples": [True, False],
|
||||
"build_tests": [True, False],
|
||||
"build_python_bindings": [True, False],
|
||||
"build_for_qt6": [True, False],
|
||||
}
|
||||
|
||||
default_options = {
|
||||
"qt_version": "qt/[>5.12.0]@kdab/stable",
|
||||
"build_static": False,
|
||||
"build_examples": True,
|
||||
"build_tests": False,
|
||||
"build_python_bindings": False,
|
||||
"build_for_qt6": False,
|
||||
}
|
||||
|
||||
def requirements(self):
|
||||
# Check https://docs.conan.io/en/latest/reference/conanfile/attributes.html#version-ranges for more info about versioning
|
||||
self.requires(str(self.options.qt_version))
|
||||
|
||||
def source(self):
|
||||
git = tools.Git(folder="")
|
||||
git.clone(self.url)
|
||||
|
||||
def build(self, build_type="Release"):
|
||||
self.cmake = CMake(self, generator='Ninja', build_type=build_type)
|
||||
self.cmake.definitions["KDDockWidgets_STATIC"] = self.options.build_static
|
||||
self.cmake.definitions["KDDockWidgets_EXAMPLES"] = self.options.build_examples
|
||||
self.cmake.definitions["KDDockWidgets_TESTS"] = self.options.build_tests
|
||||
self.cmake.definitions["KDDockWidgets_PYTHON_BINDINGS"] = self.options.build_python_bindings
|
||||
self.cmake.definitions["KDDockWidgets_QT6"] = self.options.build_for_qt6
|
||||
self.cmake.configure()
|
||||
self.cmake.build()
|
||||
|
||||
def package(self):
|
||||
self.cmake.install()
|
||||
|
||||
def package_info(self):
|
||||
self.env_info.CMAKE_PREFIX_PATH.append(self.package_folder)
|
||||
|
||||
def package_id(self):
|
||||
# Check only the major and minor version!
|
||||
self.info.requires["qt"].minor_mode()
|
||||
47
3rdparty/kddockwidgets/deploy/create-demo-win-zip.bat
vendored
Normal file
47
3rdparty/kddockwidgets/deploy/create-demo-win-zip.bat
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
@echo off
|
||||
rem
|
||||
rem This file is part of KDDockWidgets.
|
||||
rem
|
||||
rem SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
rem
|
||||
rem SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
rem
|
||||
rem Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
rem
|
||||
|
||||
rem assumes the builddir is the workdir
|
||||
rem assumes Qt is in PATH
|
||||
rem %1 is the name of the deployment
|
||||
|
||||
if [%1] == [] (
|
||||
echo "Usage: %~nx0 <deploymentName>"
|
||||
goto theEnd
|
||||
)
|
||||
|
||||
rem Prepare the deployDir
|
||||
set "deploy=%1"
|
||||
if exist %deploy% (
|
||||
rmdir /Q /S %deploy%
|
||||
)
|
||||
mkdir %deploy%
|
||||
|
||||
rem Deploy programs
|
||||
for %%s in (bin\*.dll bin\*_example.exe) do (
|
||||
copy %%s %deploy% >nul
|
||||
)
|
||||
|
||||
rem Deploy Qt
|
||||
windeployqt --compiler-runtime %deploy%
|
||||
|
||||
rem Zip it
|
||||
set zipFile=%cd%\%deploy%.7z
|
||||
if exist %zipFile% (
|
||||
del /F /Q %zipFile%
|
||||
)
|
||||
7z a %zipFile% %deploy%
|
||||
|
||||
rem Must echo this line exactly for the CI
|
||||
echo Created zip file "%zipFile%" successfully
|
||||
|
||||
:theEnd
|
||||
exit /b %ERRORLEVEL%
|
||||
241
3rdparty/kddockwidgets/deploy/release-kddockwidgets.sh
vendored
Executable file
241
3rdparty/kddockwidgets/deploy/release-kddockwidgets.sh
vendored
Executable file
@@ -0,0 +1,241 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
#Exit if any undefined variable is used.
|
||||
set -u
|
||||
#Exit this script if it any subprocess exits non-zero.
|
||||
set -e
|
||||
#If any process in a pipeline fails, the return value is a failure.
|
||||
set -o pipefail
|
||||
|
||||
PROJECT=kddockwidgets
|
||||
FORMAL_PROJECT=KDDockWidgets #also used for the CMake options
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
TOP=$(dirname "$SCRIPT_DIR")
|
||||
|
||||
#function HELP
|
||||
# print a help message and exit
|
||||
HELP() {
|
||||
echo
|
||||
echo "Usage: $(basename "$0") [-f] X.Y.Z"
|
||||
echo
|
||||
echo "Create the tars/zips and sign for project release X.Y.Z"
|
||||
echo " Options:"
|
||||
echo " -f Force everything to run, even if the tag for X.Y.Z has already been pushed."
|
||||
echo
|
||||
exit 0
|
||||
}
|
||||
|
||||
#git clone if needed, then update
|
||||
GIT_UPDATE() {
|
||||
mkdir -p "$1"
|
||||
pushd "$1"
|
||||
git init
|
||||
set +e
|
||||
git remote add origin "$3"
|
||||
set -e
|
||||
git fetch
|
||||
git checkout master
|
||||
git submodule update --init --recursive
|
||||
popd
|
||||
}
|
||||
|
||||
#compare 2 version strings
|
||||
verlte() {
|
||||
printf '%s\n' "$1" "$2" | sort -C -V
|
||||
}
|
||||
|
||||
#function SYNCECM: $1 is "KDAB" or "ECM"; $2 is the fullpath to the official version
|
||||
SYNCECM() {
|
||||
set +e
|
||||
echo -n "Comparing $1 cmake modules to upstream: "
|
||||
savepwd=$(pwd)
|
||||
if (test ! -d "$TOP/cmake/$1/modules"); then
|
||||
echo "FAIL"
|
||||
echo " This project does not have the $1 CMake modules collected under cmake/$1/modules. Please deal with this first"
|
||||
exit 1
|
||||
fi
|
||||
cd "$TOP/cmake/$1/modules"
|
||||
whiteList="(ECMEnableSanitizers.cmake)"
|
||||
for m in *.cmake; do
|
||||
if [ -n "$whiteList" ]; then
|
||||
if [[ $m =~ $whiteList ]]; then
|
||||
echo "SKIPPING $m"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
if (test -f "$2/modules/$m"); then
|
||||
module="modules"
|
||||
diff "$m" "$2/modules/$m" 2>&1
|
||||
savestat=$?
|
||||
else
|
||||
if (test -f "$2/find-modules/$m"); then
|
||||
module="find-modules"
|
||||
diff "$m" "$2/find-modules/$m" 2>&1
|
||||
savestat=$?
|
||||
else
|
||||
echo "What is $m doing here?"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if (test $savestat -ne 0); then
|
||||
echo "FAIL. Differences encountered in upstream $m"
|
||||
echo " Upstream: $2/$module/$m"
|
||||
echo " $PROJECT: cmake/$1/modules/$m"
|
||||
echo "Please sync the $PROJECT version before continuing (review changes first!)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "OK"
|
||||
cd "$savepwd"
|
||||
set -e
|
||||
}
|
||||
|
||||
options=$(getopt -o "hf" --long "help,force" -- "$@")
|
||||
eval set -- "$options"
|
||||
force=0
|
||||
while true; do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
HELP
|
||||
;;
|
||||
-f | --force)
|
||||
force=1
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Internal error!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if (test $# -ne 1); then
|
||||
HELP
|
||||
fi
|
||||
|
||||
#compute X(major), Y(minor), Z(patchlevel)
|
||||
if [[ ! $1 =~ ^[0-9]*\.[0-9]*\.[0-9]*$ ]]; then
|
||||
echo "\"$1\" is not a valid version string of the form X.Y.Z"
|
||||
exit 1
|
||||
fi
|
||||
X=$(echo "$1" | cut -d. -f1)
|
||||
Y=$(echo "$1" | cut -d. -f2)
|
||||
Z=$(echo "$1" | cut -d. -f3)
|
||||
|
||||
#set the branch and tag
|
||||
branch=$X.$Y
|
||||
tag=v$branch.$Z
|
||||
release=$X.$Y.$Z
|
||||
|
||||
cd "$TOP" || exit 1
|
||||
tbranch=$(sed -e 's,.*/,,' "$TOP/.git/HEAD")
|
||||
if (test "$tbranch" != "$branch"); then
|
||||
echo "please git checkout $branch first"
|
||||
exit
|
||||
fi
|
||||
|
||||
#Sanity Checking
|
||||
|
||||
# Update doxyfile
|
||||
if ! command -v doxygen &>/dev/null; then
|
||||
echo "doxygen is not installed or not in your PATH. please fix."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#CI uses 1.12.0 at this time
|
||||
minDoxyVersion="1.12.0"
|
||||
export PATH=/usr/local/opt/doxygen-$minDoxyVersion/bin:$PATH
|
||||
doxyVersion=$(doxygen -version | awk '{print $1}')
|
||||
if ! verlte "$minDoxyVersion" "$doxyVersion"; then
|
||||
echo "please install doxygen version $minDoxyVersion or higher"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n "Ensuring Doxyfile.cmake is up-to-date: "
|
||||
doxygen -u docs/api/Doxyfile.cmake >/dev/null 2>&1
|
||||
set +e
|
||||
diff docs/api/Doxyfile.cmake docs/api/Doxyfile.cmake.bak >/dev/null 2>&1
|
||||
if (test $? -ne 0); then
|
||||
echo "Doxyfile.cmake has been updated by 'doxygen -u'. Please deal with this first"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
rm -f docs/api/Doxyfile.cmake.bak
|
||||
fi
|
||||
set -e
|
||||
|
||||
### KDAB cmake modules are synced
|
||||
kdabECM="$HOME/projects/kdecm"
|
||||
GIT_UPDATE "$kdabECM" "master" "ssh://codereview.kdab.com:29418/kdab/extra-cmake-modules"
|
||||
SYNCECM "KDAB" "$kdabECM"
|
||||
### KDE cmake modules are synced
|
||||
kdeECM="$HOME/projects/extra-cmake-modules"
|
||||
GIT_UPDATE "$kdeECM" "master" "git@invent.kde.org:frameworks/extra-cmake-modules"
|
||||
SYNCECM "ECM" "$kdeECM"
|
||||
|
||||
### pre-commit checking
|
||||
echo "Pre-commit checking: "
|
||||
pre-commit run --all-files
|
||||
if (test $? -ne 0); then
|
||||
echo "There are pre-commit issues. Please deal with this first"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
if (test "$(git tag -l | grep -c "$tag$")" -ne 1); then
|
||||
echo "please create the git tag $tag first:"
|
||||
echo "git tag -m \"$FORMAL_PROJECT $release\" $tag"
|
||||
exit
|
||||
fi
|
||||
|
||||
if (test $force -eq 0 -a "$(git ls-remote --tags origin | grep -c "refs/tags/$tag$")" -gt 0); then
|
||||
echo "The tag for $tag has already been pushed."
|
||||
echo "Change the release number you provided on the command line."
|
||||
echo 'Or, if you simply want to re-create the tar and zips use the "-f" option.'
|
||||
exit
|
||||
fi
|
||||
|
||||
# create the API documentation
|
||||
rm -rf build-docs "$PROJECT-$release-doc.zip"
|
||||
mkdir build-docs
|
||||
cd build-docs || exit 1
|
||||
cmake -G Ninja --warn-uninitialized -Werror=dev -D"$FORMAL_PROJECT"_DOCS=True ..
|
||||
cmake --build . --target=docs
|
||||
cd docs/api/html || exit 1
|
||||
7z a "$TOP/$PROJECT-$release-doc.zip" .
|
||||
cd "$TOP" || exit 1
|
||||
rm -rf build-docs
|
||||
|
||||
git archive --format=tar --prefix="$PROJECT-$release/" "$tag" | gzip >"$PROJECT-$release.tar.gz"
|
||||
git archive --format=zip --prefix="$PROJECT-$release/" "$tag" >"$PROJECT-$release.zip"
|
||||
|
||||
# sign the tarballs
|
||||
gpg --yes --local-user "KDAB Products" --armor --detach-sign "$PROJECT-$release.tar.gz"
|
||||
gpg --yes --local-user "KDAB Products" --armor --detach-sign "$PROJECT-$release.zip"
|
||||
|
||||
# final cleaning
|
||||
#anything to clean?
|
||||
|
||||
# sanity
|
||||
files="\
|
||||
$PROJECT-$release.tar.gz \
|
||||
$PROJECT-$release.tar.gz.asc \
|
||||
$PROJECT-$release.zip \
|
||||
$PROJECT-$release.zip.asc \
|
||||
$PROJECT-$release-doc.zip \
|
||||
"
|
||||
for f in $files; do
|
||||
ls -l "$f"
|
||||
done
|
||||
42
3rdparty/kddockwidgets/docker/pyside2/Dockerfile
vendored
Normal file
42
3rdparty/kddockwidgets/docker/pyside2/Dockerfile
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
|
||||
# The purpose of this Dockerfile is just for quickly getting a running python build for testing.
|
||||
|
||||
# Instructions:
|
||||
|
||||
# $ docker build -t kddw-pyside2 .
|
||||
# $ docker run -it -v ~/Qt/5.15.2/gcc_64/:/Qt/ -v /tmp/.X11-unix:/tmp/.X11-unix kddw-pyside2
|
||||
# git checkout 2.0
|
||||
# cmake --preset=python -G Ninja . && cd build-python/ && ninja
|
||||
|
||||
# Test with:
|
||||
# cd ../python/examples && rcc -g python -o rc_assets.py ../../examples/dockwidgets/resources_example.qrc
|
||||
# python3 main.py
|
||||
|
||||
FROM ubuntu:22.04
|
||||
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
|
||||
|
||||
ENV TZ=Europe/Berlin
|
||||
ENV LC_CTYPE=C.UTF-8
|
||||
ENV DISPLAY=:0
|
||||
ENV PATH=$PATH:/Qt/bin/
|
||||
ENV LD_LIBRARY_PATH=/Qt/lib/
|
||||
ENV PYTHONPATH=/KDDockWidgets/build-python/python/
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt update
|
||||
RUN apt install build-essential software-properties-common git ninja-build libssl-dev mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig libxkbcommon-x11-0 libdbus-1-3 cmake pip libxslt1-dev llvm-dev clang libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-xinerama0 libxcb-shape0 libxcb-render-util0 -y
|
||||
RUN pip3 install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io shiboken2 pyside2 shiboken2_generator
|
||||
|
||||
WORKDIR /
|
||||
RUN git clone https://github.com/KDAB/KDDockWidgets.git
|
||||
WORKDIR /KDDockWidgets/
|
||||
23
3rdparty/kddockwidgets/docs/CMakeLists.txt
vendored
Normal file
23
3rdparty/kddockwidgets/docs/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Allen Winter <allen.winter@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# Doxygen
|
||||
find_package(Doxygen)
|
||||
set_package_properties(
|
||||
Doxygen PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
DESCRIPTION "API Documentation system"
|
||||
URL "https://www.doxygen.org"
|
||||
PURPOSE "Needed to build the API documentation."
|
||||
)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
add_subdirectory(api)
|
||||
endif()
|
||||
BIN
3rdparty/kddockwidgets/docs/KDDockWidgets-CopyrightAssignmentForm.pdf
vendored
Normal file
BIN
3rdparty/kddockwidgets/docs/KDDockWidgets-CopyrightAssignmentForm.pdf
vendored
Normal file
Binary file not shown.
82
3rdparty/kddockwidgets/docs/api/CMakeLists.txt
vendored
Normal file
82
3rdparty/kddockwidgets/docs/api/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
# This file is part of KDDockWidgets.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
# Author: Allen Winter <allen.winter@kdab.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
#
|
||||
# Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
#
|
||||
|
||||
# dot should come with Doxygen find_package(Doxygen)
|
||||
if(DOXYGEN_DOT_EXECUTABLE)
|
||||
set(HAVE_DOT "YES")
|
||||
else()
|
||||
set(HAVE_DOT "NO")
|
||||
message(STATUS "Unable to provide inheritance diagrams for the API documentation. "
|
||||
"To fix, install the graphviz project from https://www.graphviz.org"
|
||||
)
|
||||
endif()
|
||||
|
||||
# qhelpgenerator
|
||||
find_program(QHELPGEN_EXECUTABLE qhelpgenerator HINTS ${QT_INSTALL_BINS})
|
||||
if(QHELPGEN_EXECUTABLE)
|
||||
set(HAVE_QHELPGEN "YES")
|
||||
else()
|
||||
set(HAVE_QHELPGEN "NO")
|
||||
message(STATUS "Unable to generate the API documentation in qch format. "
|
||||
"To fix, install the qthelpgenerator program which comes with Qt."
|
||||
)
|
||||
endif()
|
||||
|
||||
find_file(QDOC_QTCORE_TAG qtcore.tags HINTS ${QT_INSTALL_DOCS}/qtcore ${QT_INSTALL_DATA}/doc/qtcore)
|
||||
set(QDOC_TAG_DIR "<QDOC_TAG_DIR_not_found>")
|
||||
if(QDOC_QTCORE_TAG)
|
||||
get_filename_component(QDOC_TAG_DIR ${QDOC_QTCORE_TAG} DIRECTORY)
|
||||
get_filename_component(QDOC_TAG_DIR ${QDOC_TAG_DIR} DIRECTORY)
|
||||
endif()
|
||||
|
||||
file(GLOB _dox_deps *.dox *.html)
|
||||
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# apidox generation using doxygen
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
# handle a bug in doxygen where image files referred to in markdown are not
|
||||
# copied the output
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../screencap.gif
|
||||
${DOXYGEN_OUTPUT_DIR}/html
|
||||
# copy some files by-hand that are referred to by the markdown README
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-2.0-only.txt
|
||||
${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/GPL-3.0-only.txt
|
||||
${DOXYGEN_OUTPUT_DIR}/html/LICENSES
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOXYGEN_OUTPUT_DIR}/html/docs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/docs/KDDockWidgets-CopyrightAssignmentForm.pdf
|
||||
${DOXYGEN_OUTPUT_DIR}/html/docs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/examples ${DOXYGEN_OUTPUT_DIR}/html/examples
|
||||
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${CMAKE_SOURCE_DIR}/README.md
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generate the .qch file"
|
||||
)
|
||||
add_custom_target(
|
||||
kddockwidgets-api.qch ALL
|
||||
DEPENDS ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
|
||||
COMMENT "Target to generate the .qch file"
|
||||
)
|
||||
add_custom_target(
|
||||
docs
|
||||
DEPENDS kddockwidgets-api.qch
|
||||
COMMENT "Target to generate the documentation"
|
||||
)
|
||||
|
||||
set(QCH_INSTALL_DIR
|
||||
${INSTALL_DOC_DIR}
|
||||
CACHE STRING "Install location of Qt Assistant help files."
|
||||
)
|
||||
install(FILES ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch DESTINATION ${QCH_INSTALL_DIR})
|
||||
install(FILES ${DOXYGEN_OUTPUT_DIR}/kddockwidgets.tags DESTINATION ${INSTALL_DOC_DIR})
|
||||
2864
3rdparty/kddockwidgets/docs/api/Doxyfile.cmake
vendored
Normal file
2864
3rdparty/kddockwidgets/docs/api/Doxyfile.cmake
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2675
3rdparty/kddockwidgets/docs/api/doxygen-awesome.css
vendored
Normal file
2675
3rdparty/kddockwidgets/docs/api/doxygen-awesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
3rdparty/kddockwidgets/docs/api/footer.html
vendored
Normal file
20
3rdparty/kddockwidgets/docs/api/footer.html
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<hr>
|
||||
<div style="float: left;">
|
||||
<img src="kdab-logo-16x16.png">
|
||||
<font style="font-weight: bold;">© Klarälvdalens Datakonsult AB (KDAB)</font>
|
||||
<br>
|
||||
"The Qt, C++ and OpenGL Experts"<br>
|
||||
<a href="https://www.kdab.com/">https://www.kdab.com/</a>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right;">
|
||||
<img src="kdab-kddockwidgets-logo-16x16.png" />
|
||||
<font style="font-weight: bold;">KDDockWidgets</font>
|
||||
<br>
|
||||
Advanced Dock Widget Framework for Qt<br>
|
||||
<a href="https://www.kdab.com/development-resources/qt-tools/kddockwidgets/">https://www.kdab.com/development-resources/qt-tools/kddockwidgets/</a><br>
|
||||
$generatedby doxygen $doxygenversion<br>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
3rdparty/kddockwidgets/docs/api/kdab-kddockwidgets-logo-16x16.png
vendored
Normal file
BIN
3rdparty/kddockwidgets/docs/api/kdab-kddockwidgets-logo-16x16.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
3rdparty/kddockwidgets/docs/api/kdab-logo-16x16.png
vendored
Normal file
BIN
3rdparty/kddockwidgets/docs/api/kdab-logo-16x16.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
49
3rdparty/kddockwidgets/docs/book/src/SUMMARY.md
vendored
Normal file
49
3rdparty/kddockwidgets/docs/book/src/SUMMARY.md
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](introduction.md)
|
||||
|
||||
- [Installation and Usage](installation_and_usage.md)
|
||||
- [Examples]()
|
||||
- [QtWidgets]()
|
||||
- [minimal](examples_qtwidgets_minimal.md)
|
||||
- [full example](examples_qtwidgets_full.md)
|
||||
- [mdi](examples_qtwidgets_mdi.md)
|
||||
- [mdi with docking](examples_qtwidgets_mdi_with_docking.md)
|
||||
- [QtQuick]()
|
||||
- [full example](examples_qtquick_full.md)
|
||||
- [customtabbar](examples_qtquick_customtabbar.md)
|
||||
- [customtitlebar](examples_qtquick_customtitlebar.md)
|
||||
- [customseparator](examples_qtquick_customseparator.md)
|
||||
- [mdi](examples_qtquick_mdi.md)
|
||||
- [Python Bindings](python.md)
|
||||
|
||||
---
|
||||
- [Supported KDDW frontends]()
|
||||
- [QtWidgets](qtwidgets.md)
|
||||
- [QtQuick/QML](qtquick.md)
|
||||
- [Flutter](flutter.md)
|
||||
- [Supported Qt backends]()
|
||||
- [Windows](qpa-windows.md)
|
||||
- [macOS](qpa-cocoa.md)
|
||||
- [X11/XCB](qpa-xcb.md)
|
||||
- [Wayland](qpa-wayland.md)
|
||||
- [EGLFS](qpa-eglfs.md)
|
||||
- [WebAssembly](qpa-wasm.md)
|
||||
- [Offscreen](qpa-offscreen.md)
|
||||
|
||||
---
|
||||
- [Advanced Usage]()
|
||||
- [Custom Behaviour](custom_behaviour.md)
|
||||
- [Custom Styling](custom_styling.md)
|
||||
- [Min/Max sizing](min_max_sizing.md)
|
||||
- [Public and Private API](private_api.md)
|
||||
- [Drag and Drop](dnd.md)
|
||||
---
|
||||
- [For Developers]()
|
||||
- [Architecture and Concepts](architecture_and_concepts.md)
|
||||
- [Misc Implementation Details](misc_impl_details.md)
|
||||
---
|
||||
- [Roadmap](roadmap.md)
|
||||
- [Get Involved](involved.md)
|
||||
- [Licensing](licensing.md)
|
||||
- [About KDAB](about.md)
|
||||
20
3rdparty/kddockwidgets/docs/book/src/about.md
vendored
Normal file
20
3rdparty/kddockwidgets/docs/book/src/about.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# About KDAB
|
||||
|
||||
KDDockWidgets is supported and maintained by Klarälvdalens Datakonsult AB (KDAB).
|
||||
|
||||
The KDAB Group is the global No.1 software consultancy for Qt, C++ and
|
||||
OpenGL applications across desktop, embedded and mobile platforms.
|
||||
|
||||
The KDAB Group provides consulting and mentoring for developing Qt applications
|
||||
from scratch and in porting from all popular and legacy frameworks to Qt.
|
||||
We continue to help develop parts of Qt and are one of the major contributors
|
||||
to the Qt Project. We can give advanced or standard trainings anywhere
|
||||
around the globe on Qt as well as C++, OpenGL, 3D and more.
|
||||
|
||||
Please visit <https://www.kdab.com> to meet the people who write code like this.
|
||||
|
||||
Stay up-to-date with KDAB product announcements:
|
||||
|
||||
- [KDAB Newsletter](https://news.kdab.com)
|
||||
- [KDAB Blogs](https://www.kdab.com/category/blogs)
|
||||
- [KDAB on Twitter](https://twitter.com/KDABQt)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user