Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kddockwidgets for openSUSE:Factory checked in at 2025-11-05 16:19:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kddockwidgets (Old) and /work/SRC/openSUSE:Factory/.kddockwidgets.new.1980 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kddockwidgets" Wed Nov 5 16:19:03 2025 rev:10 rq:1315538 version:2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kddockwidgets/kddockwidgets.changes 2025-10-01 18:56:48.234020195 +0200 +++ /work/SRC/openSUSE:Factory/.kddockwidgets.new.1980/kddockwidgets.changes 2025-11-05 16:22:58.241847800 +0100 @@ -1,0 +2,9 @@ +Tue Nov 4 18:26:50 UTC 2025 - Christophe Marin <[email protected]> + +- Update to 2.4.0 + * qtquick: Expose DockWidgetOptions to QML + * qtquick: Expose 'DockWidget::lastCloseReason' to QML + * qtquick: Add DockWidgetInstantiator::deleteDockWidgetLater + * qtwidgets: Support tabs in south location + +------------------------------------------------------------------- Old: ---- kddockwidgets-2.3.0.tar.gz New: ---- kddockwidgets-2.4.0.tar.gz kddockwidgets-2.4.0.tar.gz.asc kddockwidgets.keyring ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kddockwidgets.spec ++++++ --- /var/tmp/diff_new_pack.5T7yv5/_old 2025-11-05 16:22:58.833872711 +0100 +++ /var/tmp/diff_new_pack.5T7yv5/_new 2025-11-05 16:22:58.837872880 +0100 @@ -27,15 +27,14 @@ %define soversion 3 %define rname kddockwidgets Name: kddockwidgets%{?pkg_suffix} -Version: 2.3.0 +Version: 2.4.0 Release: 0 Summary: Qt dock widget library, suitable for replacing QDockWidget License: GPL-2.0-only OR GPL-3.0-only URL: https://www.kdab.com/development-resources/qt-tools/kddockwidgets Source: https://github.com/KDAB/KDDockWidgets/releases/download/v%{version}/%{rname}-%{version}.tar.gz -# kddockwidgets 2.3.0 doesn't have its signature file -# Source1: https://github.com/KDAB/KDDockWidgets/releases/download/v%%{version}/%%{rname}-%%{version}.tar.gz.asc -# Source2: kddockwidgets.keyring +Source1: https://github.com/KDAB/KDDockWidgets/releases/download/v%{version}/%{rname}-%{version}.tar.gz.asc +Source2: kddockwidgets.keyring BuildRequires: cmake(nlohmann_json) %if 0%{?qt5} BuildRequires: libQt5Gui-private-headers-devel ++++++ kddockwidgets-2.3.0.tar.gz -> kddockwidgets-2.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/asan5.yml new/KDDockWidgets-2.4.0/.github/workflows/asan5.yml --- old/KDDockWidgets-2.3.0/.github/workflows/asan5.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/asan5.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/asan6.yml new/KDDockWidgets-2.4.0/.github/workflows/asan6.yml --- old/KDDockWidgets-2.3.0/.github/workflows/asan6.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/asan6.yml 2025-10-31 15:05:53.000000000 +0100 @@ -11,11 +11,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/build-mingw.yml new/KDDockWidgets-2.4.0/.github/workflows/build-mingw.yml --- old/KDDockWidgets-2.3.0/.github/workflows/build-mingw.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/build-mingw.yml 2025-10-31 15:05:53.000000000 +0100 @@ -10,11 +10,11 @@ push: branches: - main - - "2.2" + - "2.4" pull_request: branches: - main - - "2.2" + - "2.4" workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/build-qt5.yml new/KDDockWidgets-2.4.0/.github/workflows/build-qt5.yml --- old/KDDockWidgets-2.3.0/.github/workflows/build-qt5.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/build-qt5.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.2 + - 2.4 pull_request: branches: - main - - 2.2 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/build-qt6.yml new/KDDockWidgets-2.4.0/.github/workflows/build-qt6.yml --- old/KDDockWidgets-2.3.0/.github/workflows/build-qt6.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/build-qt6.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.2 + - 2.4 pull_request: branches: - main - - 2.2 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/examples.yml new/KDDockWidgets-2.4.0/.github/workflows/examples.yml --- old/KDDockWidgets-2.3.0/.github/workflows/examples.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/examples.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/external-3rdparty-build.yml new/KDDockWidgets-2.4.0/.github/workflows/external-3rdparty-build.yml --- old/KDDockWidgets-2.3.0/.github/workflows/external-3rdparty-build.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/external-3rdparty-build.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/flutter-dev.yml new/KDDockWidgets-2.4.0/.github/workflows/flutter-dev.yml --- old/KDDockWidgets-2.3.0/.github/workflows/flutter-dev.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/flutter-dev.yml 2025-10-31 15:05:53.000000000 +0100 @@ -10,11 +10,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/flutter-rel.yml new/KDDockWidgets-2.4.0/.github/workflows/flutter-rel.yml --- old/KDDockWidgets-2.3.0/.github/workflows/flutter-rel.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/flutter-rel.yml 2025-10-31 15:05:53.000000000 +0100 @@ -10,11 +10,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/layouting.yml new/KDDockWidgets-2.4.0/.github/workflows/layouting.yml --- old/KDDockWidgets-2.3.0/.github/workflows/layouting.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/layouting.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/pre-commit.yml new/KDDockWidgets-2.4.0/.github/workflows/pre-commit.yml --- old/KDDockWidgets-2.3.0/.github/workflows/pre-commit.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/pre-commit.yml 2025-10-31 15:05:53.000000000 +0100 @@ -9,7 +9,7 @@ push: branches: - main - - 2.3 + - 2.4 jobs: pre-commit: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/python_clazy_tidy_valgrind.yml new/KDDockWidgets-2.4.0/.github/workflows/python_clazy_tidy_valgrind.yml --- old/KDDockWidgets-2.3.0/.github/workflows/python_clazy_tidy_valgrind.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/python_clazy_tidy_valgrind.yml 2025-10-31 15:05:53.000000000 +0100 @@ -9,11 +9,11 @@ push: branches: - main - - "2.2" + - "2.4" pull_request: branches: - main - - 2.3 + - "2.4" jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/qt6-asan.yml new/KDDockWidgets-2.4.0/.github/workflows/qt6-asan.yml --- old/KDDockWidgets-2.3.0/.github/workflows/qt6-asan.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/qt6-asan.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/qt6-lsan.yml new/KDDockWidgets-2.4.0/.github/workflows/qt6-lsan.yml --- old/KDDockWidgets-2.3.0/.github/workflows/qt6-lsan.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/qt6-lsan.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 workflow_dispatch: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.github/workflows/valgrind-leakcheck.yml new/KDDockWidgets-2.4.0/.github/workflows/valgrind-leakcheck.yml --- old/KDDockWidgets-2.3.0/.github/workflows/valgrind-leakcheck.yml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.github/workflows/valgrind-leakcheck.yml 2025-10-31 15:05:53.000000000 +0100 @@ -8,11 +8,11 @@ push: branches: - main - - 2.3 + - 2.4 pull_request: branches: - main - - 2.3 + - 2.4 jobs: build: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/.pre-commit-config.yaml new/KDDockWidgets-2.4.0/.pre-commit-config.yaml --- old/KDDockWidgets-2.3.0/.pre-commit-config.yaml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/.pre-commit-config.yaml 2025-10-31 15:05:53.000000000 +0100 @@ -7,7 +7,7 @@ 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 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -21,12 +21,12 @@ - id: destroyed-symlinks - id: check-executables-have-shebangs - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.8 + rev: v21.1.2 hooks: - id: clang-format exclude: (.json) - repo: https://github.com/PyCQA/pylint - rev: v3.3.7 + rev: v3.3.9 hooks: - id: pylint exclude: ^(.cmake-format.py|conan/conanfile.py) @@ -48,7 +48,7 @@ - id: cmake-format exclude: (.py.cmake|Doxyfile.cmake|examples/flutter/|tests/flutter/) - repo: https://github.com/fsfe/reuse-tool - rev: v5.0.2 + rev: v6.0.0 hooks: - id: reuse - repo: https://github.com/scop/pre-commit-shfmt @@ -56,7 +56,7 @@ hooks: - id: shfmt - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck - repo: https://github.com/compilerla/conventional-pre-commit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/CMakePresets.json new/KDDockWidgets-2.4.0/CMakePresets.json --- old/KDDockWidgets-2.3.0/CMakePresets.json 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/CMakePresets.json 2025-10-31 15:05:53.000000000 +0100 @@ -51,6 +51,9 @@ "name": "dev", "displayName": "dev", "binaryDir": "${sourceDir}/build-dev", + "cacheVariables": { + "KDDockWidgets_QT6": "OFF" + }, "inherits": [ "dev-base" ] @@ -60,6 +63,9 @@ "displayName": "dev-asan", "description": "An ASAN/UBSAN build", "binaryDir": "${sourceDir}/build-dev-asan", + "cacheVariables": { + "KDDockWidgets_QT6": "OFF" + }, "inherits": [ "dev-base", "asan-base" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/Changelog new/KDDockWidgets-2.4.0/Changelog --- old/KDDockWidgets-2.3.0/Changelog 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/Changelog 2025-10-31 15:05:53.000000000 +0100 @@ -1,3 +1,9 @@ +* v2.4.0 + - qtquick: Expose DockWidgetOptions to QML + - qtquick: Expose 'DockWidget::lastCloseReason' to QML + - qtquick: Add DockWidgetInstantiator::deleteDockWidgetLater + - qtwidgets: Support tabs in south location + * v2.3.0 - For packagers: - KDDockWidgets now looks for Qt6 by default, rather than Qt5. If your Qt5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/code.code-workspace new/KDDockWidgets-2.4.0/code.code-workspace --- old/KDDockWidgets-2.3.0/code.code-workspace 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/code.code-workspace 2025-10-31 15:05:53.000000000 +0100 @@ -9,10 +9,7 @@ "recommendations": [ "vadimcn.vscode-lldb", "llvm-vs-code-extensions.vscode-clangd", - "Dart-Code.dart-code", - "Dart-Code.flutter", "mhutchie.git-graph", - "Gruntfuggly.todo-tree", "theqtcompany.qt-qml", "ms-vscode.cmake-tools" ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/examples/qtquick/pure_qml/delete_on_close.qml new/KDDockWidgets-2.4.0/examples/qtquick/pure_qml/delete_on_close.qml --- old/KDDockWidgets-2.3.0/examples/qtquick/pure_qml/delete_on_close.qml 1970-01-01 01:00:00.000000000 +0100 +++ new/KDDockWidgets-2.4.0/examples/qtquick/pure_qml/delete_on_close.qml 2025-10-31 15:05:53.000000000 +0100 @@ -0,0 +1,67 @@ +/* + This file is part of KDDockWidgets. + + SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> + Author: Sergio Martins <[email protected]> + + SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only + + Contact KDAB at <[email protected]> for commercial licensing options. +*/ + +import QtQuick 2.6 +import QtQuick.Controls 2.12 +import com.kdab.dockwidgets 2.0 as KDDW + +// Example showing how to delete dock widgets when they're closed + +// We present two ways to do so: +// 1 - Pass DockWidgetOption_DeleteOnClose options to DockWidgets +// 2 - Listen to the 'closed' signal and call deleteDockWidget() manually + +ApplicationWindow { + visible: true + width: 1000 + height: 800 + + KDDW.DockingArea { + id: root + anchors.fill: parent + + uniqueName: "MainLayout-1" + + KDDW.DockWidget { + id: dock1 + uniqueName: "dock1" + options: KDDW.KDDockWidgets.DockWidgetOption_DeleteOnClose + + Rectangle { + id: guest4 + color: "#2E8BC0" + anchors.fill: parent + } + } + + KDDW.DockWidget { + id: dock2 + uniqueName: "dock2" + + Rectangle { + color: "#2E8BC0" + anchors.fill: parent + } + + onClosed: { + if (dock2.lastCloseReason === KDDW.KDDockWidgets.CloseReason.TitleBarCloseButton) { + dock2.deleteDockWidgetLater(); + console.log("dock2 deleted on close"); + } + } + } + + Component.onCompleted: { + addDockWidget(dock1, KDDW.KDDockWidgets.Location_OnBottom); + addDockWidget(dock2, KDDW.KDDockWidgets.Location_OnBottom); + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/Config.h new/KDDockWidgets-2.4.0/src/Config.h --- old/KDDockWidgets-2.3.0/src/Config.h 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/Config.h 2025-10-31 15:05:53.000000000 +0100 @@ -113,11 +113,11 @@ ///< too, otherwise they wouldn't appear in ///< the task bar. Flag_TitleBarNoFloatButton = 0x4000, ///< The TitleBar won't show the float button + Flag_TitleBarShowAutoHide = 0x8000, ///< Supports minimizing dock widgets to the side-bar Flag_AutoHideSupport = - 0x8000 | Flag_TitleBarNoFloatButton, ///< Supports minimizing dock widgets to the - ///< side-bar. By default it also turns off the - ///< float button, but you can remove - ///< Flag_TitleBarNoFloatButton to have both. + Flag_TitleBarShowAutoHide | Flag_TitleBarNoFloatButton, ///< Supports minimizing dock widgets to the + ///< side-bar. This flag also turns off the + ///< float button. Flag_KeepAboveIfNotUtilityWindow = 0x10000, ///< Only meaningful if Flag_DontUseUtilityFloatingWindows is set. If floating ///< windows are normal windows, you might still want them to keep above and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/KDDockWidgets.h new/KDDockWidgets-2.4.0/src/KDDockWidgets.h --- old/KDDockWidgets-2.3.0/src/KDDockWidgets.h 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/KDDockWidgets.h 2025-10-31 15:05:53.000000000 +0100 @@ -396,6 +396,7 @@ MovedToSideBar = 4, /// User clicked the pin-button (or programmatically) (auto-hide/sidebar/pin-unpin functionality) OverlayCollapse = 8 /// Dock widget went from overlay to sidebar (auto-hide/sidebar/pin-unpin functionality) }; +Q_ENUM_NS(CloseReason) /// @brief Initializes the desired frontend /// This function should be called before using any docking. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/LayoutSaver.cpp new/KDDockWidgets-2.4.0/src/LayoutSaver.cpp --- old/KDDockWidgets-2.3.0/src/LayoutSaver.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/LayoutSaver.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -533,7 +533,7 @@ if (auto mwFunc = Config::self().mainWindowFactoryFunc()) { mainWindow = mwFunc(mw.uniqueName, mw.options); } else { - KDDW_ERROR("Failed to restore layout create MainWindow with name {} first"); + KDDW_ERROR("Failed to restore layout create MainWindow with name {} first", mw.uniqueName); return false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/core/DockRegistry.cpp new/KDDockWidgets-2.4.0/src/core/DockRegistry.cpp --- old/KDDockWidgets-2.3.0/src/core/DockRegistry.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/core/DockRegistry.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -711,7 +711,7 @@ } // The following code is for hididng the overlay - if (!(Config::self().flags() & Config::Flag_AutoHideSupport)) + if (!(Config::self().flags() & Config::Flag_TitleBarShowAutoHide)) return false; if (view->is(ViewType::Group)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/core/TitleBar.cpp new/KDDockWidgets-2.4.0/src/core/TitleBar.cpp --- old/KDDockWidgets-2.3.0/src/core/TitleBar.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/core/TitleBar.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -47,7 +47,7 @@ , d(new Private()) , m_group(parent) , m_floatingWindow(nullptr) - , m_supportsAutoHide((Config::self().flags() & Config::Flag_AutoHideSupport) == Config::Flag_AutoHideSupport) + , m_supportsAutoHide((Config::self().flags() & Config::Flag_TitleBarShowAutoHide) == Config::Flag_TitleBarShowAutoHide) , m_isStandalone(false) { init(); @@ -73,7 +73,7 @@ , d(new Private()) , m_group(nullptr) , m_floatingWindow(parent) - , m_supportsAutoHide((Config::self().flags() & Config::Flag_AutoHideSupport) == Config::Flag_AutoHideSupport) + , m_supportsAutoHide((Config::self().flags() & Config::Flag_TitleBarShowAutoHide) == Config::Flag_TitleBarShowAutoHide) , m_isStandalone(false) { init(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/qtquick/DockWidgetInstantiator.cpp new/KDDockWidgets-2.4.0/src/qtquick/DockWidgetInstantiator.cpp --- old/KDDockWidgets-2.3.0/src/qtquick/DockWidgetInstantiator.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/qtquick/DockWidgetInstantiator.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -30,8 +30,9 @@ QString m_uniqueName; QString m_sourceFilename; QString m_title; - Core::DockWidget *m_dockWidget = nullptr; + QPointer<Core::DockWidget> m_dockWidget; QVector<QString> m_affinities; + KDDockWidgets::DockWidgetOptions m_options = KDDockWidgets::DockWidgetOption_None; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QVariantMap m_userData; KDBindings::ScopedConnection userDataConnection; @@ -214,6 +215,14 @@ delete this; } +void DockWidgetInstantiator::deleteDockWidgetLater() +{ + if (d->m_dockWidget) + d->m_dockWidget->deleteLater(); + + deleteLater(); +} + void DockWidgetInstantiator::classBegin() { // Nothing interesting to do here. @@ -252,6 +261,27 @@ } #endif +KDDockWidgets::DockWidgetOptions DockWidgetInstantiator::options() const +{ + return d->m_dockWidget ? d->m_dockWidget->options() : d->m_options; +} + +void DockWidgetInstantiator::setOptions(KDDockWidgets::DockWidgetOptions options) +{ + if (d->m_options != options) { + d->m_options = options; + if (d->m_dockWidget) { + d->m_dockWidget->setOptions(options); + } + Q_EMIT optionsChanged(options); + } +} + +KDDockWidgets::CloseReason DockWidgetInstantiator::lastCloseReason() const +{ + return d->m_dockWidget ? d->m_dockWidget->lastCloseReason() : KDDockWidgets::CloseReason::Unspecified; +} + void DockWidgetInstantiator::componentComplete() { plat()->ensureQmlEngine(this); @@ -279,7 +309,7 @@ } d->m_dockWidget = ViewFactory::self() - ->createDockWidget(d->m_uniqueName, qmlEngine(this)) + ->createDockWidget(d->m_uniqueName, qmlEngine(this), d->m_options) ->asDockWidgetController(); d->titleConnection = d->m_dockWidget->d->titleChanged.connect([this](const QString &title) { Q_EMIT titleChanged(title); }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/qtquick/DockWidgetInstantiator.h new/KDDockWidgets-2.4.0/src/qtquick/DockWidgetInstantiator.h --- old/KDDockWidgets-2.3.0/src/qtquick/DockWidgetInstantiator.h 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/qtquick/DockWidgetInstantiator.h 2025-10-31 15:05:53.000000000 +0100 @@ -44,6 +44,8 @@ Q_PROPERTY(bool isFloating READ isFloating WRITE setFloating NOTIFY isFloatingChanged) Q_PROPERTY(bool isOpen READ isOpen NOTIFY isOpenChanged) Q_PROPERTY(QVector<QString> affinities READ affinities WRITE setAffinities NOTIFY affinitiesChanged) + Q_PROPERTY(KDDockWidgets::DockWidgetOptions options READ options WRITE setOptions NOTIFY optionsChanged) + Q_PROPERTY(KDDockWidgets::CloseReason lastCloseReason READ lastCloseReason NOTIFY lastCloseReasonChanged) #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) Q_PROPERTY(QVariantMap userData READ userData WRITE setUserData NOTIFY userDataChanged) #endif @@ -71,6 +73,11 @@ QVector<QString> affinities() const; void setAffinities(const QVector<QString> &); + KDDockWidgets::DockWidgetOptions options() const; + void setOptions(KDDockWidgets::DockWidgetOptions); + + KDDockWidgets::CloseReason lastCloseReason() const; + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QVariantMap userData() const; void setUserData(const QVariantMap &userData); @@ -101,6 +108,9 @@ /// It's more usual to just hide dock widgets though. Q_INVOKABLE void deleteDockWidget(); + /// Deletes the dock widget via deleteLater() + Q_INVOKABLE void deleteDockWidgetLater(); + protected: void classBegin() override; void componentComplete() override; @@ -122,6 +132,7 @@ void removedFromSideBar(); void windowActiveAboutToChange(bool activated); void affinitiesChanged(); + void lastCloseReasonChanged(); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) void userDataChanged(); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/qtwidgets/views/MainWindow.cpp new/KDDockWidgets-2.4.0/src/qtwidgets/views/MainWindow.cpp --- old/KDDockWidgets-2.3.0/src/qtwidgets/views/MainWindow.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/qtwidgets/views/MainWindow.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -65,7 +65,7 @@ explicit Private(MainWindow *qq) : q(qq) , m_controller(qq->mainWindow()) - , m_supportsAutoHide(Config::self().flags() & Config::Flag_AutoHideSupport) + , m_supportsAutoHide(Config::self().flags() & Config::Flag_TitleBarShowAutoHide) , m_centralWidget(new MyCentralWidget(qq)) , m_layout(new QHBoxLayout(m_centralWidget)) // 1 level of indirection so we can add some // margins diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/qtwidgets/views/Stack.cpp new/KDDockWidgets-2.4.0/src/qtwidgets/views/Stack.cpp --- old/KDDockWidgets-2.3.0/src/qtwidgets/views/Stack.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/qtwidgets/views/Stack.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -228,12 +228,15 @@ bool Stack::isPositionDraggable(QPoint p) const { - if (tabPosition() != QTabWidget::North) { - qWarning() << Q_FUNC_INFO << "Not implemented yet. Only North is supported"; + switch (tabPosition()) { + case QTabWidget::North: + return p.y() >= 0 && p.y() <= tabBar()->height(); + case QTabWidget::South: + return p.y() >= tabBar()->y(); + default: + qWarning() << Q_FUNC_INFO << "Not implemented yet. Only North and South is supported"; return false; } - - return p.y() >= 0 && p.y() <= tabBar()->height(); } QAbstractButton *Stack::button(TitleBarButtonType type) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/src/qtwidgets/views/TabBar.cpp new/KDDockWidgets-2.4.0/src/qtwidgets/views/TabBar.cpp --- old/KDDockWidgets-2.3.0/src/qtwidgets/views/TabBar.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/src/qtwidgets/views/TabBar.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -84,6 +84,7 @@ , TabBarViewInterface(controller) , d(new Private(controller)) { + setShape(Config::self().tabsAtBottom() ? QTabBar::RoundedSouth : QTabBar::RoundedNorth); setStyle(proxyStyle()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/tests/CMakeLists.txt new/KDDockWidgets-2.4.0/tests/CMakeLists.txt --- old/KDDockWidgets-2.3.0/tests/CMakeLists.txt 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/tests/CMakeLists.txt 2025-10-31 15:05:53.000000000 +0100 @@ -172,8 +172,8 @@ ) add_test( NAME tst_qml_standalone - COMMAND ${CMAKE_COMMAND} -E env QT_FATAL_WARNINGS=1 qml -I ${CMAKE_BINARY_DIR} tests/qml_standalone_test.qml - -platform offscreen + COMMAND ${CMAKE_COMMAND} -E env QT_FATAL_WARNINGS=1 qml -I ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/tests/qml_standalone_test.qml -platform offscreen WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/tests/qml_standalone_test.qml new/KDDockWidgets-2.4.0/tests/qml_standalone_test.qml --- old/KDDockWidgets-2.3.0/tests/qml_standalone_test.qml 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/tests/qml_standalone_test.qml 2025-10-31 15:05:53.000000000 +0100 @@ -16,6 +16,9 @@ // File copied from another examples, but added timer to quit // This is just to test that KDDW can run under qml.exe without C++ +// You can run with: +// qml -I build-dev6-qml-module tests/qml_standalone_test.qml -platform xcb + ApplicationWindow { visible: true width: 1000 @@ -167,10 +170,42 @@ } } + function expect(condition, message) { + if (!condition) { + // Test has fatal warnings + console.warn("EXPECTATION FAILED: " + message); + } + } + + function tst_closeReason() { + // This function tests that the close reason is properly set when closing a dockwidget. + expect(dock4.isOpen === true, "dock4 should be open"); + expect(dock4.lastCloseReason === KDDW.KDDockWidgets.CloseReason.Unspecified, "lastCloseReason should be Unspecified"); + + dock4.actualTitleBar.titleBarQmlItem.closeButton.clicked(); + expect(dock4.isOpen === false, "dock4 should be closed"); + expect(dock4.lastCloseReason == KDDW.KDDockWidgets.CloseReason.TitleBarCloseButton, "lastCloseReason should be TitleBarCloseButton"); + } + + function tst_deleteLater() { + dock4.deleteDockWidgetLater(); + expect(KDDW.Singletons.dockRegistry.containsDockWidget("dock4") === true, "dock4 should only be removed later"); + Qt.callLater(function() { + expect(KDDW.Singletons.dockRegistry.containsDockWidget("dock4") === false, "dock4 should not exist anymore"); + }); + } + + Timer { interval: 4000 running: true repeat: false - onTriggered: Qt.quit() + onTriggered: { + tst_closeReason(); + tst_deleteLater(); + Qt.callLater(function() { + Qt.quit() + }); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/tests/qtwidgets/tst_qtwidgets.cpp new/KDDockWidgets-2.4.0/tests/qtwidgets/tst_qtwidgets.cpp --- old/KDDockWidgets-2.3.0/tests/qtwidgets/tst_qtwidgets.cpp 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/tests/qtwidgets/tst_qtwidgets.cpp 2025-10-31 15:05:53.000000000 +0100 @@ -191,7 +191,10 @@ void tst_overlayCrash(); void tst_setAsCurrentTab(); void tst_crash326(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + // Qt < 6.7 has a crash. See 97d227acc74c603 in qtbase void tst_crash661(); +#endif void tst_restoreWithIncompleteFactory(); void tst_deleteDockWidget(); void tst_standaloneTitleBar(); @@ -2079,6 +2082,7 @@ QVERIFY(originalGroup != dock1->d->group()); } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) void TestQtWidgets::tst_crash661() { EnsureTopLevelsDeleted e; @@ -2110,6 +2114,7 @@ QMouseEvent releaseEvent(QEvent::MouseButtonRelease, QPoint(5, 5), {}, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); QCoreApplication::sendEvent(*it, &releaseEvent); } +#endif void TestQtWidgets::tst_restoreWithIncompleteFactory() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/KDDockWidgets-2.3.0/version.txt new/KDDockWidgets-2.4.0/version.txt --- old/KDDockWidgets-2.3.0/version.txt 2025-09-27 17:40:23.000000000 +0200 +++ new/KDDockWidgets-2.4.0/version.txt 2025-10-31 15:05:53.000000000 +0100 @@ -1 +1 @@ -2.3.0 +2.4.0
