diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-06 13:04:47 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-06 20:12:27 +0200 |
commit | ef25620ac1acbe7a723b6b213d7d50468a748119 (patch) | |
tree | abdff2aed36655dfb0305d232b0ac48f8ad67391 /src/widgets/kernel | |
parent | 669add92d9adc15ecfa0b2d62dd90ea9066d401e (diff) | |
parent | 6feec9da93032d11a768802ac2187d9d4153b1ec (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
mkspecs/features/mac/default_pre.prf
mkspecs/features/qpa/genericunixfontdatabase.prf
mkspecs/features/uikit/default_post.prf
mkspecs/features/uikit/resolve_config.prf
mkspecs/macx-ios-clang/features/default_post.prf
mkspecs/macx-ios-clang/features/resolve_config.prf
src/corelib/io/qiodevice.cpp
Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qlayoutitem.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp index 76568a2c33..ee0c28ec76 100644 --- a/src/widgets/kernel/qlayoutitem.cpp +++ b/src/widgets/kernel/qlayoutitem.cpp @@ -306,6 +306,8 @@ void QLayoutItem::invalidate() /*! If this item is a QLayout, it is returned as a QLayout; otherwise 0 is returned. This function provides type-safe casting. + + \sa spacerItem(), widget() */ QLayout * QLayoutItem::layout() { @@ -315,6 +317,8 @@ QLayout * QLayoutItem::layout() /*! If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned. This function provides type-safe casting. + + \sa layout(), widget() */ QSpacerItem * QLayoutItem::spacerItem() { @@ -345,8 +349,14 @@ QSpacerItem * QSpacerItem::spacerItem() */ /*! - If this item is a QWidget, it is returned as a QWidget; otherwise - 0 is returned. This function provides type-safe casting. + If this item manages a QWidget, returns that widget. Otherwise, + \c nullptr is returned. + + \note While the functions layout() and spacerItem() perform casts, this + function returns another object: QLayout and QSpacerItem inherit QLayoutItem, + while QWidget does not. + + \sa layout(), spacerItem() */ QWidget * QLayoutItem::widget() { |