summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/examples/movie.qdoc4
-rw-r--r--doc/src/examples/trafficinfo.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc2
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc20
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc1
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp16
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp3
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
-rw-r--r--src/gui/text/qtextoption.cpp7
-rw-r--r--src/network/ssl/qsslsocket.cpp6
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp55
-rw-r--r--src/network/ssl/qsslsocket_p.h11
12 files changed, 68 insertions, 61 deletions
diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc
index 733f52d..4d7b3e0 100644
--- a/doc/src/examples/movie.qdoc
+++ b/doc/src/examples/movie.qdoc
@@ -30,8 +30,8 @@
\title Movie Example
The Movie example demonstrates how to use QMovie and QLabel to
- display animations. Now that Qt comes with \l{Phonon
- Overview}{Phonon} (the multimedia framework), QMovie is mostly
+ display animations. Now that Qt comes with the \l{Phonon multimedia
+ framework} {Phonon multimedia framework}, QMovie is mostly
useful if one wants to play a simple animation without the added
complexity of a multimedia framework to install and deploy.
diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc
index fe69d52..bc06178 100644
--- a/doc/src/examples/trafficinfo.qdoc
+++ b/doc/src/examples/trafficinfo.qdoc
@@ -145,5 +145,5 @@
The rest of the code in this example is just for representing the time and
station information to the user, and uses techniques described in the
- \l{Widgets Examples}.
+ \l{Widget Examples}.
*/
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index 4a1b631..c5dd27c 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -45,7 +45,7 @@
outlines the approach used to enable it in custom widgets. Drag
and drop operations are also supported by Qt's item views and by
the graphics view framework. More information is available in
- \l{Using Drag and Drop with Item Views} and \l{Graphics View
+ \l{Using drag & drop with item views} and \l{Graphics View
Framework}.
\section1 Drag and Drop Classes
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 94b9f0d..131f063 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -900,7 +900,7 @@
after its application through the use of certain types of selection
commands. These are discussed later in this section.
- \section3 Current item &amp selected items
+ \section3 Current item and selected items
In a view, there is always a current item and a selected item - two
independent states. An item can be the current item and selected at the
@@ -1257,7 +1257,7 @@
reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
function.
- \section3 Model headers &amp data
+ \section3 Model headers and data
For items in the view, we want to return the strings in the string list.
The \l{QAbstractItemModel::data()}{data()} function is responsible for
@@ -1350,7 +1350,7 @@
\snippet doc/src/snippets/stringlistmodel/model.cpp 1
- \section3 Inserting &amp removing rows
+ \section3 Inserting and removing rows
It is possible to change the number of rows and columns in a model. In the
string list model it only makes sense to change the number of rows, so we
@@ -1634,7 +1634,7 @@
contain the text given in the search string. This pattern can also be
used in the list and table widgets.
- \section1 Using drag &amp drop with item views
+ \section1 Using drag & drop with item views
Qt's drag and drop infrastructure is fully supported by the model/view framework.
Items in lists, tables, and trees can be dragged within the views, and data can be
@@ -1714,7 +1714,7 @@
of QAbstractItemModel::removeRows(), either directly or by inheriting the
implementation from its base class.
- \section3 Enabling drag &amp drop for items
+ \section3 Enabling drag & drop for items
Models indicate to views which items can be dragged, and which will accept drops,
by reimplementing the QAbstractItemModel::flags() function to provide suitable
@@ -2124,12 +2124,12 @@
children may be displayed incorrectly in some views until the user
attempts to view the non-existent child items.
- \section2 Navigation &amp model index creation
+ \section2 Navigation and model index creation
Hierarchical models need to provide functions that views can call to navigate the
tree-like structures they expose, and obtain model indexes for items.
- \section3 Parents &amp children
+ \section3 Parents and children
Since the structure exposed to views is determined by the underlying data
structure, it is up to each model subclass to create its own model indexes
@@ -2153,7 +2153,7 @@
models to supply some unique identifier to this function to ensure that
the model index can be re-associated with its corresponding item later on.
- \section2 Drag &amp drop support and MIME type handling
+ \section2 Drag & drop support and MIME type handling
The model/view classes support drag and drop operations, providing default behavior
that is sufficient for many applications. However, it is also possible to customize
@@ -2282,7 +2282,7 @@
\endlist
For more information about drag and drop with item views, refer to
- \l{Using Drag and Drop with Item Views}.
+ \l{Using drag & drop with item views}.
\section3 Convenience views
@@ -2293,7 +2293,7 @@
the existing contents with the data being transferred, the underlying model
will set the data of the target items rather than insert new rows and columns
into the model. For more information on drag and drop in convenience views,
- you can see \l{Using Drag and Drop with Item Views}.
+ you can see \l{Using drag & drop with item views}.
\section2 Performance optimization for large amounts of data
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 023b4ce..5119638 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -34,6 +34,7 @@
\tableofcontents
+ \target Phonon Overview
\section1 Introduction
Qt uses the Phonon multimedia framework to provide functionality
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 8415259..e3fce18 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1197,7 +1197,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
\l{QAbstractItemModel::}{endInsertRows()} must be called.
\sa {Model Classes}, {Model Subclassing Reference}, QModelIndex,
- QAbstractItemView, {Using Drag and Drop with Item Views},
+ QAbstractItemView, {Using drag & drop with item views},
{Simple DOM Model Example}, {Simple Tree Model Example},
{Editable Tree Model Example}, {Fetch More Example}
*/
@@ -1761,7 +1761,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const
where to place the data. This can occur in a tree when data is dropped on
a parent. Models will usually append the data to the parent in this case.
- \sa supportedDropActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDropActions(), {Using drag & drop with item views}
*/
bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
@@ -1798,8 +1798,8 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
reimplement the dropMimeData() function to handle the additional
operations.
- \sa dropMimeData(), Qt::DropActions, {Using Drag and Drop with Item
- Views}
+ \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item
+ views}
*/
Qt::DropActions QAbstractItemModel::supportedDropActions() const
{
@@ -1815,7 +1815,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
supportedDragActions() is used by QAbstractItemView::startDrag() as the
default values when a drag occurs.
- \sa Qt::DropActions, {Using Drag and Drop with Item Views}
+ \sa Qt::DropActions, {Using drag & drop with item views}
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
@@ -1831,7 +1831,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const
Sets the supported drag \a actions for the items in the model.
- \sa supportedDragActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDragActions(), {Using drag & drop with item views}
*/
void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
{
@@ -2547,7 +2547,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
For example, as shown in the diagram, we move three rows from
row 2 to 4 in the source, so \a sourceFirst is 2 and \a sourceLast is 4.
- We move those items to above row 2 in the destination, so \a destinationRow is 2.
+ We move those items to above row 2 in the destination, so \a destinationChild is 2.
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 6
@@ -2558,7 +2558,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
\o To append rows to another parent, move them to after the last row.
For example, as shown in the diagram, we move three rows to a
- collection of 6 existing rows (ending in row 5), so \a destinationStart is 6:
+ collection of 6 existing rows (ending in row 5), so \a destinationChild is 6:
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 7
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 51dc543..74c51f4 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -133,7 +133,8 @@
\img graphicsview-parentchild.png
- \section1 Transformation
+ \target Transformations
+ \section1 Transformations
QGraphicsItem supports projective transformations in addition to its base
position, pos(). There are several ways to change an item's transformation.
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 4fb93fc..97499f3 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1363,7 +1363,7 @@ bool QAbstractItemView::dragEnabled() const
Note that the model used needs to provide support for drag and drop operations.
- \sa setDragDropMode() {Using Drag and Drop with Item Views}
+ \sa setDragDropMode() {Using drag & drop with item views}
*/
/*!
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 8f31e46..9eeec0b 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -392,7 +392,12 @@ QList<QTextOption::Tab> QTextOption::tabs() const
/*!
\fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar())
- Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter
+
+ Creates a tab with the given position, tab type, and delimiter
+ (\a pos, \a tabType, \a delim).
+
+ \note \a delim is only used when \a tabType is DelimiterTab.
+
\since 4.7
*/
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 809e8aa..f85fa84 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1849,7 +1849,7 @@ QList<QSslCipher> QSslSocketPrivate::defaultCiphers()
*/
QList<QSslCipher> QSslSocketPrivate::supportedCiphers()
{
- QSslSocketPrivate::ensureCertsAndCiphersLoaded();
+ QSslSocketPrivate::ensureInitialized();
QMutexLocker locker(&globalData()->mutex);
return globalData()->supportedCiphers;
}
@@ -1879,7 +1879,7 @@ void QSslSocketPrivate::setDefaultSupportedCiphers(const QList<QSslCipher> &ciph
*/
QList<QSslCertificate> QSslSocketPrivate::defaultCaCertificates()
{
- QSslSocketPrivate::ensureCertsAndCiphersLoaded();
+ QSslSocketPrivate::ensureInitialized();
QMutexLocker locker(&globalData()->mutex);
return globalData()->config->caCertificates;
}
@@ -1962,7 +1962,7 @@ void QSslConfigurationPrivate::setDefaultConfiguration(const QSslConfiguration &
*/
void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPrivate *ptr)
{
- QSslSocketPrivate::ensureCertsAndCiphersLoaded();
+ QSslSocketPrivate::ensureInitialized();
QMutexLocker locker(&globalData()->mutex);
const QSslConfigurationPrivate *global = globalData()->config.constData();
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index b602b29..b537582 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -74,9 +74,8 @@
QT_BEGIN_NAMESPACE
-bool QSslSocketPrivate::s_initialized = false;
-QBasicAtomicInt QSslSocketPrivate::s_CertsAndCiphersLoaded;
-Q_GLOBAL_STATIC(QMutex, s_CertsAndCiphersLoadedMutex);
+bool QSslSocketPrivate::s_libraryLoaded = false;
+bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
// Useful defines
#define SSL_ERRORSTR() QString::fromLocal8Bit(q_ERR_error_string(q_ERR_get_error(), NULL))
@@ -171,7 +170,7 @@ QSslSocketBackendPrivate::QSslSocketBackendPrivate()
session(0)
{
// Calls SSL_library_init().
- ensureCertsAndCiphersLoaded();
+ ensureInitialized();
}
QSslSocketBackendPrivate::~QSslSocketBackendPrivate()
@@ -422,18 +421,18 @@ void QSslSocketPrivate::deinitialize()
bool QSslSocketPrivate::supportsSsl()
{
- return ensureInitialized();
+ return ensureLibraryLoaded();
}
-bool QSslSocketPrivate::ensureInitialized()
+bool QSslSocketPrivate::ensureLibraryLoaded()
{
if (!q_resolveOpenSslSymbols())
return false;
// Check if the library itself needs to be initialized.
QMutexLocker locker(openssl_locks()->initLock());
- if (!s_initialized) {
- s_initialized = true;
+ if (!s_libraryLoaded) {
+ s_libraryLoaded = true;
// Initialize OpenSSL.
q_CRYPTO_set_id_callback(id_function);
@@ -474,25 +473,15 @@ bool QSslSocketPrivate::ensureInitialized()
return true;
}
-/*!
- \internal
-
- Declared static in QSslSocketPrivate, makes sure the SSL libraries have
- been initialized.
-*/
-
-void QSslSocketPrivate::ensureCertsAndCiphersLoaded()
+void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
{
- // use double-checked locking to speed up this function
- if (s_CertsAndCiphersLoaded)
+ QMutexLocker locker(openssl_locks()->initLock());
+ if (s_loadedCiphersAndCerts)
return;
+ s_loadedCiphersAndCerts = true;
- QMutexLocker locker(s_CertsAndCiphersLoadedMutex());
- if (s_CertsAndCiphersLoaded)
- return;
+ resetDefaultCiphers();
- if (!supportsSsl())
- return;
//load symbols needed to receive certificates from system store
#if defined(Q_OS_MAC)
QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security");
@@ -528,12 +517,22 @@ void QSslSocketPrivate::ensureCertsAndCiphersLoaded()
qWarning("could not load crypt32 library"); // should never happen
}
#endif
- resetDefaultCiphers();
setDefaultCaCertificates(systemCaCertificates());
- // we need to make sure that s_CertsAndCiphersLoaded is executed after the library loading above
- // (the compiler/processor might reorder instructions otherwise)
- if (!s_CertsAndCiphersLoaded.testAndSetRelease(0, 1))
- Q_ASSERT_X(false, "certificate store", "certificate store has already been initialized!");
+}
+
+/*!
+ \internal
+
+ Declared static in QSslSocketPrivate, makes sure the SSL libraries have
+ been initialized.
+*/
+
+void QSslSocketPrivate::ensureInitialized()
+{
+ if (!supportsSsl())
+ return;
+
+ ensureCiphersAndCertsLoaded();
}
/*!
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index b474175..72b3ef7 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -63,7 +63,6 @@
#include <QtCore/qstringlist.h>
#include <private/qringbuffer_p.h>
-#include <QtCore/QMutex>
QT_BEGIN_NAMESPACE
@@ -114,8 +113,7 @@ public:
QString verificationPeerName;
static bool supportsSsl();
- static bool ensureInitialized();
- static void ensureCertsAndCiphersLoaded();
+ static void ensureInitialized();
static void deinitialize();
static QList<QSslCipher> defaultCiphers();
static QList<QSslCipher> supportedCiphers();
@@ -163,8 +161,11 @@ public:
virtual QSslCipher sessionCipher() const = 0;
private:
- static bool s_initialized;
- static QBasicAtomicInt s_CertsAndCiphersLoaded;
+ static bool ensureLibraryLoaded();
+ static void ensureCiphersAndCertsLoaded();
+
+ static bool s_libraryLoaded;
+ static bool s_loadedCiphersAndCerts;
};
QT_END_NAMESPACE