path: root/src/widgets
diff options
authorLiang Qi <>2016-10-06 13:04:47 +0200
committerLiang Qi <>2016-10-06 20:12:27 +0200
commitef25620ac1acbe7a723b6b213d7d50468a748119 (patch)
treeabdff2aed36655dfb0305d232b0ac48f8ad67391 /src/widgets
parent669add92d9adc15ecfa0b2d62dd90ea9066d401e (diff)
parent6feec9da93032d11a768802ac2187d9d4153b1ec (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')
4 files changed, 16 insertions, 9 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index d2b909d201..6e1bee94c4 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -903,15 +903,13 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in
QFileSystemModelPrivate::QFileSystemNode *parentNode = indexNode->parent;
int visibleLocation = parentNode->visibleLocation(parentNode->children.value(indexNode->fileName)->fileName);
- d->addNode(parentNode, newName,indexNode->info->fileInfo());
QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
parentNode->children[newName] = oldValue;
- QFileInfo info(parentPath, newName);
oldValue->fileName = newName;
oldValue->parent = parentNode;
- oldValue->populate(d->fileInfoGatherer.getInfo(info));
+ oldValue->populate(d->fileInfoGatherer.getInfo(QFileInfo(parentPath, newName)));
oldValue->isVisible = true;
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index f172679d04..6a4aaa489a 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -253,7 +253,7 @@
\snippet shareddirmodel/main.cpp 0
The model is set up to use data from a certain file system. The call to
- \l{QFileSystemModel::}{setRootPath()} tell the model which drive on the
+ \l{QFileSystemModel::}{setRootPath()} tells the model which drive on the
file system to expose to the views.
We create two views so that we can examine the items held in the model in two
@@ -304,7 +304,7 @@
signals and slots mechanism.
This section describes some basic concepts that are central to the way
- item of data are accessed by other components via a model class. More
+ items of data are accessed by other components via a model class. More
advanced concepts are discussed in later sections.
\section3 Model indexes
@@ -1869,7 +1869,7 @@
\snippet qsortfilterproxymodel/main.cpp 1
- Since proxy models are inherit from QAbstractItemModel, they can be connected to
+ Since proxy models inherit from QAbstractItemModel, they can be connected to
any kind of view, and can be shared between views. They can also be used to
process the information obtained from other proxy models in a pipeline arrangement.
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()
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index a8f58eabb3..fa80a7a6ca 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -769,7 +769,6 @@ void qDrawPlainRect(QPainter *p, const QRect &r, const QColor &c,
\fn void qDrawBorderPixmap(QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap)
\relates <qdrawutil.h>
\since 4.6
- \overload
\brief The qDrawBorderPixmap function is for drawing a pixmap into
the margins of a rectangle.