diff options
| -rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 2 | ||||
| -rw-r--r-- | tests/auto/testlib/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | tests/auto/testlib/initmain/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | tests/auto/testlib/initmain/tst_initmain.cpp | 5 |
4 files changed, 18 insertions, 3 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 9c7f4682bc5..1f026775435 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1200,7 +1200,7 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth) verticalShift = -verticalShift; - tr.adjust(hpadding, verticalShift - vpadding, horizontalShift - hpadding, vpadding); + tr.adjust(hpadding, verticalShift + vpadding, horizontalShift - hpadding, -vpadding); bool selected = opt->state & QStyle::State_Selected; if (selected) { tr.setTop(tr.top() - verticalShift); diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt index 35a26a8e345..0829d71f187 100644 --- a/tests/auto/testlib/CMakeLists.txt +++ b/tests/auto/testlib/CMakeLists.txt @@ -1,6 +1,7 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +add_subdirectory(initmain) add_subdirectory(qsignalspy) add_subdirectory(tostring) diff --git a/tests/auto/testlib/initmain/CMakeLists.txt b/tests/auto/testlib/initmain/CMakeLists.txt new file mode 100644 index 00000000000..6dfdc8965f0 --- /dev/null +++ b/tests/auto/testlib/initmain/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (C) 2025 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsignalspy LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_initmain + SOURCES + tst_initmain.cpp +) diff --git a/tests/auto/testlib/initmain/tst_initmain.cpp b/tests/auto/testlib/initmain/tst_initmain.cpp index cdaac0c14f4..cf1a0880035 100644 --- a/tests/auto/testlib/initmain/tst_initmain.cpp +++ b/tests/auto/testlib/initmain/tst_initmain.cpp @@ -3,6 +3,7 @@ #include <QtCore/QCoreApplication> +#include <QtCore/qxptype_traits.h> #include <QTest> class tst_InitMain : public QObject @@ -19,8 +20,8 @@ private: static bool m_initMainCalled; }; -static_assert(QTest::Internals::HasInitMain<tst_InitMain>::value); -static_assert(!QTest::Internals::HasInitMain<QObject>::value); +static_assert(QTest::Internal::hasInitMain<tst_InitMain>); +static_assert(!QTest::Internal::hasInitMain<QObject>); bool tst_InitMain::m_initMainCalled = false; |
