From 0d7d5ff5d050537e33bc35d56c5214063821a1a4 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Tue, 29 Oct 2013 00:07:56 +0800 Subject: [PATCH] Doc: Fix miscellaneous typos Change-Id: Iaf0dd8974c3ad78beffa995c596a76fb3e4cceab Reviewed-by: Jerome Pasion Reviewed-by: Kurt Pattyn --- .../doc/snippets/code/src_corelib_tools_qbytearray.cpp | 4 ++-- src/corelib/doc/src/threads.qdoc | 4 ++-- src/corelib/io/qfileinfo.cpp | 2 +- src/corelib/thread/qreadwritelock.cpp | 2 +- src/network/bearer/qnetworkconfiguration.cpp | 1 - src/sql/models/qsqltablemodel.cpp | 2 +- src/widgets/itemviews/qabstractitemview.cpp | 2 +- src/widgets/itemviews/qlistwidget.cpp | 2 +- src/widgets/itemviews/qtablewidget.cpp | 2 +- 9 files changed, 10 insertions(+), 11 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 003fce580b..9210d2737f 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp @@ -416,7 +416,7 @@ text.data(); // returns "Qt is great!" //! [46] QString tmp = "test"; QByteArray text = tmp.toLocal8Bit(); -char *data = new char[text.size()] +char *data = new char[text.size()]; strcpy(data, text.data()); delete [] data; //! [46] @@ -424,7 +424,7 @@ delete [] data; //! [47] QString tmp = "test"; QByteArray text = tmp.toLocal8Bit(); -char *data = new char[text.size() + 1] +char *data = new char[text.size() + 1]; strcpy(data, text.data()); delete [] data; //! [47] diff --git a/src/corelib/doc/src/threads.qdoc b/src/corelib/doc/src/threads.qdoc index 890fd9f6ff..25276404b0 100644 --- a/src/corelib/doc/src/threads.qdoc +++ b/src/corelib/doc/src/threads.qdoc @@ -395,7 +395,7 @@ If a thread locks a resource but does not unlock it, the application may freeze because the resource will become permanently unavailable to other threads. - This can happen, for example, if a an exception is thrown and forces the current + This can happen, for example, if an exception is thrown and forces the current function to return without releasing its lock. Another similar scenario is a \e{deadlock}. For example, suppose that @@ -408,7 +408,7 @@ QMutexLocker, QReadLocker and QWriteLocker are convenience classes that make it easier to use QMutex and QReadWriteLock. They lock a resource when they are constructed, and automatically unlock it when they are destroyed. They are - designed to simplify code that use QMutex and QReadWriteLocker, thus reducing + designed to simplify code that use QMutex and QReadWriteLock, thus reducing the chances that a resource becomes permanently locked by accident. \section1 High-Level Event Queues diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 897af352c9..2cf97ef94e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -682,7 +682,7 @@ bool QFileInfo::exists() const \note If \a file is a symlink that points to a non-existing file, false is returned. - \note Using this function is faster for than using + \note Using this function is faster than using \c QFileInfo(file).exists() for file system access. */ bool QFileInfo::exists(const QString &file) diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp index e4cdf7a985..ffda3c4fad 100644 --- a/src/corelib/thread/qreadwritelock.cpp +++ b/src/corelib/thread/qreadwritelock.cpp @@ -98,7 +98,7 @@ QT_BEGIN_NAMESPACE \since 4.4 \value Recursive In this mode, a thread can lock the same - QReadWriteLock multiple times and the mutex won't be unlocked + QReadWriteLock multiple times. The QReadWriteLock won't be unlocked until a corresponding number of unlock() calls have been made. \value NonRecursive In this mode, a thread may only lock a diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp index 8d34db19cd..a66b39f733 100644 --- a/src/network/bearer/qnetworkconfiguration.cpp +++ b/src/network/bearer/qnetworkconfiguration.cpp @@ -591,7 +591,6 @@ QNetworkConfiguration::BearerType QNetworkConfiguration::bearerTypeFamily() cons \li Value \row \li BearerUnknown - \li \li The session is based on an unknown or unspecified bearer type. The value of the string returned describes the bearer type. \row diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index da9b96a625..7367f6e7f4 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -204,7 +204,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement, \inmodule QtSql QSqlTableModel is a high-level interface for reading and writing - database records from a single table. It is build on top of the + database records from a single table. It is built on top of the lower-level QSqlQuery and can be used to provide data to view classes such as QTableView. For example: diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 726c2704c4..fd704e479b 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -1042,7 +1042,7 @@ QAbstractItemView::SelectionBehavior QAbstractItemView::selectionBehavior() cons Sets the current item to be the item at \a index. Unless the current selection mode is - \l{QAbstractItemView::}{NoSelection}, the item is also be selected. + \l{QAbstractItemView::}{NoSelection}, the item is also selected. Note that this function also updates the starting position for any new selections the user performs. diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index aa1dbf1de3..5040192f31 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -1456,7 +1456,7 @@ QListWidgetItem *QListWidget::currentItem() const Sets the current item to \a item. Unless the selection mode is \l{QAbstractItemView::}{NoSelection}, - the item is also be selected. + the item is also selected. */ void QListWidget::setCurrentItem(QListWidgetItem *item) { diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp index 43b6b62cc1..71034f6165 100644 --- a/src/widgets/itemviews/qtablewidget.cpp +++ b/src/widgets/itemviews/qtablewidget.cpp @@ -2125,7 +2125,7 @@ QTableWidgetItem *QTableWidget::currentItem() const Sets the current item to \a item. Unless the selection mode is \l{QAbstractItemView::}{NoSelection}, - the item is also be selected. + the item is also selected. \sa currentItem(), setCurrentCell() */