diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp | 2 | ||||
-rw-r--r-- | src/corelib/doc/src/objectmodel/signalsandslots.qdoc | 4 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 2 | ||||
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.cpp | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp index 4f8c4c095e..c2a375f498 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp @@ -427,7 +427,7 @@ ba2.constData(); // Returns "ca\0" with terminating \0. QByteArray ba3("ca\0r\0t", 4); ba3.size(); // Returns 4. -ba2.constData(); // Returns "ca\0r" with terminating \0. +ba3.constData(); // Returns "ca\0r" with terminating \0. const char cart[] = {'c', 'a', '\0', 'r', '\0', 't'}; QByteArray ba4(QByteArray::fromRawData(cart, 6)); diff --git a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc index 4e285f2966..b86aae830f 100644 --- a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc +++ b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc @@ -79,7 +79,9 @@ signal must match the signature of the receiving slot. (In fact a slot may have a shorter signature than the signal it receives because it can ignore extra arguments.) Since the signatures are - compatible, the compiler can help us detect type mismatches. + compatible, the compiler can help us detect type mismatches when + using the function pointer-based syntax. The string-based SIGNAL + and SLOT syntax will detect type mismatches at runtime. Signals and slots are loosely coupled: A class which emits a signal neither knows nor cares which slots receive the signal. Qt's signals and slots mechanism ensures that if you connect a diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 33cda4a447..cd30533ff8 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -284,8 +284,6 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt ? f1->filename_cache.localeAwareCompare(f2->filename_cache) : f1->filename_cache.compare(f2->filename_cache); } - if (r == 0) // Enforce an order - the order the items appear in the array - r = (&n1) - (&n2); if (qt_cmp_si_sort_flags & QDir::Reversed) return r > 0; return r < 0; diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 9791a02723..2ea560e611 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -1303,12 +1303,12 @@ void QAbstractItemModel::resetInternalData() */ /*! - \fn bool QAbstractItemModel::moveRow(const QModelIndex &sourceParent, int sourceColumn, const QModelIndex &destinationParent, int destinationChild) + \fn bool QAbstractItemModel::moveRow(const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild) - On models that support this, moves \a sourceColumn from \a sourceParent to \a destinationChild under + On models that support this, moves \a sourceRow from \a sourceParent to \a destinationChild under \a destinationParent. - Returns \c{true} if the columns were successfully moved; otherwise returns + Returns \c{true} if the rows were successfully moved; otherwise returns \c{false}. \sa moveRows(), moveColumn() |