diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index a7d7ef0889..7b9253ac64 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -198,6 +198,7 @@ public: static QObjectPrivate *get(QObject *o) { return o->d_func(); } + static const QObjectPrivate *get(const QObject *o) { return o->d_func(); } int signalIndex(const char *signalName, const QMetaObject **meta = 0) const; inline bool isSignalConnected(uint signalIdx, bool checkDeclarative = true) const; diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp index d9c1c524d7..b8b6f4302d 100644 --- a/src/widgets/kernel/qstackedlayout.cpp +++ b/src/widgets/kernel/qstackedlayout.cpp @@ -253,7 +253,7 @@ QLayoutItem *QStackedLayout::itemAt(int index) const // on the object then) static bool qt_wasDeleted(const QWidget *w) { - return QWidgetPrivate::get(w)->wasDeleted; + return QObjectPrivate::get(w)->wasDeleted; }