summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp4
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc6
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp14
-rw-r--r--src/widgets/styles/qdrawutil.cpp1
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());
parentNode->visibleChildren.removeAt(visibleLocation);
QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
parentNode->children[newName] = oldValue;
- QFileInfo info(parentPath, newName);
oldValue->fileName = newName;
oldValue->parent = parentNode;
#ifndef QT_NO_FILESYSTEMWATCHER
- oldValue->populate(d->fileInfoGatherer.getInfo(info));
+ oldValue->populate(d->fileInfoGatherer.getInfo(QFileInfo(parentPath, newName)));
#endif
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 @@
\codeline
\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.