summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qsizegrip.cpp8
-rw-r--r--src/widgets/widgets/qtabwidget.cpp14
-rw-r--r--src/widgets/widgets/qtabwidget.h1
3 files changed, 14 insertions, 9 deletions
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index 145bdf02d4..09557a3c90 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -301,7 +301,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e)
// Use a native X11 sizegrip for "real" top-level windows if supported.
if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE))
&& !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint)
- && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) {
+ && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) {
XEvent xev;
xev.xclient.type = ClientMessage;
xev.xclient.message_type = ATOM(_NET_WM_MOVERESIZE);
@@ -323,7 +323,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e)
}
#endif // Q_WS_X11
#ifdef Q_OS_WIN
- if (tlw->isWindow() && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) {
+ if (tlw->isWindow() && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) {
uint orientation = 0;
if (d->atBottom())
orientation = d->atLeft() ? SZ_SIZEBOTTOMLEFT : SZ_SIZEBOTTOMRIGHT;
@@ -413,11 +413,11 @@ void QSizeGrip::mouseMoveEvent(QMouseEvent * e)
#ifdef Q_WS_X11
if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE))
&& tlw->isTopLevel() && !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint)
- && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth())
+ && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth())
return;
#endif
#ifdef Q_OS_WIN
- if (tlw->isWindow() && qt_getWindowsSystemMenu(tlw) && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) {
+ if (tlw->isWindow() && qt_getWindowsSystemMenu(tlw) && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !tlw->hasHeightForWidth()) {
if (const HWND hwnd = QApplicationPrivate::getHWNDForWidget(tlw)) {
MSG msg;
while (PeekMessage(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE)) ;
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index 66d31e72c7..612d51826c 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -186,7 +186,6 @@ public:
void _q_removeTab(int);
void _q_tabMoved(int from, int to);
void init();
- bool hasHeightForWidth() const;
QTabBar *tabs;
QStackedWidget *stack;
@@ -238,11 +237,16 @@ void QTabWidgetPrivate::init()
}
-bool QTabWidgetPrivate::hasHeightForWidth() const
+/*!
+ \reimp
+*/
+
+bool QTabWidget::hasHeightForWidth() const
{
- bool has = size_policy.hasHeightForWidth();
- if (!has && stack)
- has = qt_widget_private(stack)->hasHeightForWidth();
+ Q_D(const QTabWidget);
+ bool has = d->size_policy.hasHeightForWidth();
+ if (!has && d->stack)
+ has = d->stack->hasHeightForWidth();
return has;
}
diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h
index 1865ddf897..26d9243eb9 100644
--- a/src/widgets/widgets/qtabwidget.h
+++ b/src/widgets/widgets/qtabwidget.h
@@ -125,6 +125,7 @@ public:
QSize sizeHint() const;
QSize minimumSizeHint() const;
int heightForWidth(int width) const;
+ bool hasHeightForWidth() const;
void setCornerWidget(QWidget * w, Qt::Corner corner = Qt::TopRightCorner);
QWidget * cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const;