diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel_p.h | 3 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qsizepolicy.h | 1 | ||||
-rw-r--r-- | src/widgets/widgets/qframe.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qframe.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbararealayout.cpp | 6 |
7 files changed, 19 insertions, 7 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 68768b666e..1d23ffaadc 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -2063,6 +2063,10 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index) } #endif // filesystemwatcher && Q_OS_WIN +QFileSystemModelPrivate::QFileSystemModelPrivate() = default; + +QFileSystemModelPrivate::~QFileSystemModelPrivate() = default; + /*! \internal */ diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h index ad98b9ef44..0eec870016 100644 --- a/src/widgets/dialogs/qfilesystemmodel_p.h +++ b/src/widgets/dialogs/qfilesystemmodel_p.h @@ -213,7 +213,8 @@ public: bool isVisible = false; }; - QFileSystemModelPrivate() = default; + QFileSystemModelPrivate(); + ~QFileSystemModelPrivate(); void init(); /* \internal diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h index 428b269748..047f29fdc4 100644 --- a/src/widgets/graphicsview/qgraphicsitem.h +++ b/src/widgets/graphicsview/qgraphicsitem.h @@ -1032,14 +1032,14 @@ template <class T> inline T qgraphicsitem_cast(QGraphicsItem *item) { typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Item; return int(Item::Type) == int(QGraphicsItem::Type) - || (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : 0; + || (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : nullptr; } template <class T> inline T qgraphicsitem_cast(const QGraphicsItem *item) { typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Item; return int(Item::Type) == int(QGraphicsItem::Type) - || (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : 0; + || (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : nullptr; } #ifndef QT_NO_DEBUG_STREAM diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h index f275add923..42623ee3a7 100644 --- a/src/widgets/kernel/qsizepolicy.h +++ b/src/widgets/kernel/qsizepolicy.h @@ -233,6 +233,7 @@ Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE); #endif Q_DECLARE_OPERATORS_FOR_FLAGS(QSizePolicy::ControlTypes) +Q_DECLARE_MIXED_ENUM_OPERATORS(int, QSizePolicy::Policy, QSizePolicy::PolicyFlag) #ifndef QT_NO_DATASTREAM Q_WIDGETS_EXPORT QDataStream &operator<<(QDataStream &, const QSizePolicy &); diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp index 1661c5c881..7b50728ec9 100644 --- a/src/widgets/widgets/qframe.cpp +++ b/src/widgets/widgets/qframe.cpp @@ -463,9 +463,9 @@ int QFrame::frameWidth() const \brief the frame's rectangle The frame's rectangle is the rectangle the frame is drawn in. By - default, this is the entire widget. Setting the rectangle does - does \e not cause a widget update. The frame rectangle is - automatically adjusted when the widget changes size. + default, this is the entire widget. Setting the rectangle \e doesn't + cause a widget update. The frame rectangle is automatically adjusted + when the widget changes size. If you set the rectangle to a null rectangle (for example, QRect(0, 0, 0, 0)), then the resulting frame rectangle is diff --git a/src/widgets/widgets/qframe.h b/src/widgets/widgets/qframe.h index 595dfa929d..6355c10ae5 100644 --- a/src/widgets/widgets/qframe.h +++ b/src/widgets/widgets/qframe.h @@ -123,6 +123,8 @@ private: Q_DECLARE_PRIVATE(QFrame) }; +Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, QFrame::Shape, QFrame::Shadow) + QT_END_NAMESPACE #endif // QFRAME_H diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp index 493c094cc1..fb9a275f65 100644 --- a/src/widgets/widgets/qtoolbararealayout.cpp +++ b/src/widgets/widgets/qtoolbararealayout.cpp @@ -1364,10 +1364,14 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* } if (applyingLayout) { + // Clear the previous widgetItem for the toolBar, so that it's + // assigned correctly in QWidgetItemV2 constructor. + auto *toolBarPrivate = QWidgetPrivate::get(toolBar); + toolBarPrivate->widgetItem = nullptr; item.widgetItem = new QWidgetItemV2(toolBar); toolBar->setOrientation(floating ? ((shown & 2) ? Qt::Vertical : Qt::Horizontal) : dock.o); toolBar->setVisible(shown & 1); - toolBar->d_func()->setWindowState(floating, true, rect); + toolBar->d_func()->setWindowState(floating, false, rect); item.preferredSize = item.size; line.toolBarItems.append(item); |