File fix-build-with-Qt_6_10_2.patch of Package dtkwidget
diff -Nur dtkwidget-6.7.32/src/widgets/dtabbar.cpp dtkwidget-6.7.32-new/src/widgets/dtabbar.cpp
--- dtkwidget-6.7.32/src/widgets/dtabbar.cpp 2026-01-22 17:23:51.000000000 +0800
+++ dtkwidget-6.7.32-new/src/widgets/dtabbar.cpp 2026-02-04 21:26:29.204790023 +0800
@@ -699,7 +699,11 @@
if (tab->leftWidget) {
QRect rect = style()->subElementRect(QStyle::SE_TabBarTabLeftButton, &opt, this);
QPoint p = rect.topLeft();
+#if QT_VERSION <= QT_VERSION_CHECK(6, 10, 1)
if ((index == d->pressedIndex) || d->paintWithOffsets) {
+#else
+ if (d->at(index)->dragOffset != 0) {
+#endif
if (vertical)
p.setY(p.y() + d->at(index)->dragOffset);
else
@@ -711,7 +715,11 @@
if (tab->rightWidget) {
QRect rect = style()->subElementRect(QStyle::SE_TabBarTabRightButton, &opt, this);
QPoint p = rect.topLeft();
+#if QT_VERSION <= QT_VERSION_CHECK(6, 10, 1)
if ((index == d->pressedIndex) || d->paintWithOffsets) {
+#else
+ if (d->at(index)->dragOffset != 0) {
+#endif
if (vertical)
p.setY(p.y() + tab->dragOffset);
else
@@ -1234,7 +1242,11 @@
// 强制让文本居中
tab.rightButtonSize = QSize();
+#if QT_VERSION <= QT_VERSION_CHECK(6, 10, 1)
if (d->paintWithOffsets && d->at(i)->dragOffset != 0) {
+#else
+ if (d->at(i)->dragOffset != 0) {
+#endif
if (vertical) {
tab.rect.moveTop(tab.rect.y() + d->at(i)->dragOffset);
} else {
@@ -1286,7 +1298,11 @@
// 强制让文本居中
tab.rightButtonSize = QSize();
+#if QT_VERSION <= QT_VERSION_CHECK(6, 10, 1)
if (d->paintWithOffsets && d->at(selected)->dragOffset != 0) {
+#else
+ if (d->at(selected)->dragOffset != 0) {
+#endif
if (vertical) {
tab.rect.moveTop(tab.rect.y() + d->at(selected)->dragOffset);
} else {