summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qstackedlayout.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-29 07:42:39 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-09-29 07:42:39 +0000
commit75aea3ff5eec4a5c8f4184e14a90f4a5e3a577b0 (patch)
treefcf23325ec038627de8861c9e8f9a4aa2223feef /src/widgets/kernel/qstackedlayout.cpp
parent433e5ccf507fc153db589df80655618f241af0c3 (diff)
parentcdb56c42fc1145ad25560720fb95df2bfa760a20 (diff)
Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8
Diffstat (limited to 'src/widgets/kernel/qstackedlayout.cpp')
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 006b3e8588..d9c1c524d7 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -41,7 +41,7 @@
#include "qlayout_p.h"
#include <qlist.h>
-#include <qwidget.h>
+#include "private/qwidget_p.h"
#include "private/qlayoutengine_p.h"
QT_BEGIN_NAMESPACE
@@ -251,14 +251,10 @@ QLayoutItem *QStackedLayout::itemAt(int index) const
// Code that enables proper handling of the case that takeAt() is
// called somewhere inside QObject destructor (can't call hide()
// on the object then)
-
-class QtFriendlyLayoutWidget : public QWidget
+static bool qt_wasDeleted(const QWidget *w)
{
-public:
- inline bool wasDeleted() const { return d_ptr->wasDeleted; }
-};
-
-static bool qt_wasDeleted(const QWidget *w) { return static_cast<const QtFriendlyLayoutWidget*>(w)->wasDeleted(); }
+ return QWidgetPrivate::get(w)->wasDeleted;
+}
/*!