From c9ae652487514acd19f3631224ced7ac14f756c8 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Tue, 22 Jan 2013 17:41:46 +0400 Subject: QPdfEnginePrivate: Fix invalid format for rectangles on some locales This is done by using locale-independent QByteArray::setNum() instead of qvsnprintf() for printing doubles. Task-number: QTBUG-24949 Change-Id: I68cb192417d9a94f72e039c40f647b4a6826a3b7 Reviewed-by: John Layt --- src/gui/painting/qpdf.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 07a3caa51b..eed64180e5 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2461,15 +2461,19 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti) trans.map(ti.width.toReal()/size, (ti.ascent.toReal()-ti.descent.toReal())/size, &x2, &y2); uint annot = addXrefEntry(-1); + QByteArray x1s, y1s, x2s, y2s; + x1s.setNum(static_cast(x1), 'f'); + y1s.setNum(static_cast(y1), 'f'); + x2s.setNum(static_cast(x2), 'f'); + y2s.setNum(static_cast(y2), 'f'); + QByteArray rectData = x1s + ' ' + y1s + ' ' + x2s + ' ' + y2s; + xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect ["); + xprintf(rectData.constData()); #ifdef Q_DEBUG_PDF_LINKS - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [16 16 1]\n/A <<\n", + xprintf("]\n/Border [16 16 1]\n/A <<\n"); #else - xprintf("<<\n/Type /Annot\n/Subtype /Link\n/Rect [%f %f %f %f]\n/Border [0 0 0]\n/A <<\n", + xprintf("]\n/Border [0 0 0]\n/A <<\n"); #endif - static_cast(x1), - static_cast(y1), - static_cast(x2), - static_cast(y2)); xprintf("/Type /Action\n/S /URI\n/URI (%s)\n", ti.charFormat.anchorHref().toLatin1().constData()); xprintf(">>\n>>\n"); -- cgit v1.2.3 From 05b4000e01ff5785739617c3069fbe0b0d36a606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 2 Jan 2013 17:43:39 +0200 Subject: Fixed checking HOME variable return value using isEmpty() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: Ic57b1978d63e99b056cde35ca8cb9d2a07ff8ce8 Reviewed-by: Oswald Buddenhagen Reviewed-by: Samuel Rødal --- src/corelib/io/qfilesystemengine_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 2fc7557509..4af01f6730 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -633,7 +633,7 @@ bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Per QString QFileSystemEngine::homePath() { QString home = QFile::decodeName(qgetenv("HOME")); - if (home.isNull()) + if (home.isEmpty()) home = rootPath(); return QDir::cleanPath(home); } -- cgit v1.2.3 From ff1b65a58c21a77d00f75581a7492c2fafd67ae8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 24 Jan 2013 14:37:15 +0100 Subject: Make QWindowsFontEngineData thread-local. Task-number: QTBUG-29266 Change-Id: Id963187f1ef03caf4e9ed3c4397225a9ad7362bb Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../platforms/windows/qwindowsfontdatabase.cpp | 42 ++++++++++++++++++---- .../platforms/windows/qwindowsfontdatabase.h | 1 - 2 files changed, 35 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index b5b2232702..2d68c4684a 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include @@ -1112,8 +1113,33 @@ void QWindowsFontDatabase::populate(const QString &family) ReleaseDC(0, dummy); } -QWindowsFontDatabase::QWindowsFontDatabase() : - m_fontEngineData(new QWindowsFontEngineData) +typedef QSharedPointer QWindowsFontEngineDataPtr; + +#ifndef QT_NO_THREAD +typedef QThreadStorage FontEngineThreadLocalData; + +Q_GLOBAL_STATIC(FontEngineThreadLocalData, fontEngineThreadLocalData) + +QSharedPointer sharedFontData() +{ + FontEngineThreadLocalData *data = fontEngineThreadLocalData(); + if (!data->hasLocalData()) + data->setLocalData(QSharedPointer(new QWindowsFontEngineData)); + return data->localData(); +} +#else // !QT_NO_THREAD +Q_GLOBAL_STATIC(QWindowsFontEngineDataPtr, fontEngineData) + +QWindowsFontEngineDataPtr sharedFontData() +{ + QWindowsFontEngineDataPtr *data = fontEngineData(); + if (data->isNull()) + *data = QWindowsFontEngineDataPtr(new QWindowsFontEngineData); + return *data; +} +#endif // QT_NO_THREAD + +QWindowsFontDatabase::QWindowsFontDatabase() { // Properties accessed by QWin32PrintEngine (QtPrintSupport) static const int hfontMetaTypeId = qRegisterMetaType(); @@ -1121,10 +1147,12 @@ QWindowsFontDatabase::QWindowsFontDatabase() : Q_UNUSED(hfontMetaTypeId) Q_UNUSED(logFontMetaTypeId) - if (QWindowsContext::verboseFonts) + if (QWindowsContext::verboseFonts) { + const QWindowsFontEngineDataPtr data = sharedFontData(); qDebug() << __FUNCTION__ << "Clear type: " - << m_fontEngineData->clearTypeEnabled << "gamma: " - << m_fontEngineData->fontSmoothingGamma; + << data->clearTypeEnabled << "gamma: " + << data->fontSmoothingGamma; + } } QWindowsFontDatabase::~QWindowsFontDatabase() @@ -1138,7 +1166,7 @@ QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, { QFontEngine *fe = QWindowsFontDatabase::createEngine(script, fontDef, 0, QWindowsContext::instance()->defaultDPI(), false, - QStringList(), m_fontEngineData); + QStringList(), sharedFontData()); if (QWindowsContext::verboseFonts) qDebug() << __FUNCTION__ << "FONTDEF" << fontDef << script << fe << handle; return fe; @@ -1189,7 +1217,7 @@ QFontEngine *QWindowsFontDatabase::fontEngine(const QByteArray &fontData, qreal fontEngine = QWindowsFontDatabase::createEngine(QUnicodeTables::Common, request, 0, QWindowsContext::instance()->defaultDPI(), false, QStringList(), - m_fontEngineData); + sharedFontData()); if (fontEngine) { if (request.family != fontEngine->fontDef.family) { diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h index 32b650595b..c14d6027c2 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.h +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.h @@ -106,7 +106,6 @@ public: private: void populate(const QString &family = QString()); void removeApplicationFonts(); - QSharedPointer m_fontEngineData; QSet m_families; struct WinApplicationFont { -- cgit v1.2.3 From e3ac2b6392bfd1449f94393804fe7f4b4207b5a7 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Fri, 25 Jan 2013 00:23:39 +0000 Subject: Minor QWindow documentation improvement for the accessor/mutators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I003e5dbf1e87fd98cb24c2efdfd39560326f2731 Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 27881c9db3..db19aa9366 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -216,7 +216,7 @@ QWindow::~QWindow() } /*! - Set the \a surfaceType of the window. + Sets the \a surfaceType of the window. Specifies whether the window is meant for raster rendering with QBackingStore, or OpenGL rendering with QOpenGLContext. @@ -593,7 +593,7 @@ QString QWindow::filePath() const } /*! - \brief set the window's \a icon in the windowing system + \brief Sets the window's \a icon in the windowing system The window icon might be used by the windowing system for example to decorate the window, and/or in the task switcher. @@ -607,7 +607,7 @@ void QWindow::setIcon(const QIcon &icon) } /*! - \brief set the window's icon in the windowing system + \brief Sets the window's icon in the windowing system \sa setIcon() */ @@ -1212,14 +1212,14 @@ void QWindow::setPosition(int posx, int posy) /*! \fn QPoint QWindow::position() const - \brief get the position of the window on the desktop excluding any window frame + \brief Returns the position of the window on the desktop excluding any window frame \sa setPosition() */ /*! \fn QSize QWindow::size() const - \brief get the size of the window excluding any window frame + \brief Returns the size of the window excluding any window frame \sa resize() */ @@ -1298,7 +1298,7 @@ QPlatformSurface *QWindow::surfaceHandle() const } /*! - Set whether keyboard grab should be enabled or not (\a grab). + Sets whether keyboard grab should be enabled or not (\a grab). If the return value is true, the window receives all key events until setKeyboardGrabEnabled(false) is called; other windows get no key events at -- cgit v1.2.3 From 63569a68d2fd5ca90c4660e632fba2f3f3b37d73 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sat, 29 Dec 2012 02:09:39 +0800 Subject: Doc: Fix module name format Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion --- src/3rdparty/zlib/zconf.h | 2 +- src/corelib/doc/src/objectmodel/objecttrees.qdoc | 4 +- src/corelib/doc/src/plugins-howto.qdoc | 2 +- src/corelib/global/qfeatures.h | 2 +- src/corelib/global/qfeatures.txt | 2 +- src/corelib/io/qsettings.cpp | 4 +- src/corelib/itemmodels/qabstractitemmodel.cpp | 2 +- src/corelib/kernel/qcoreapplication.cpp | 2 +- src/corelib/kernel/qmetaobject.cpp | 4 +- src/corelib/kernel/qmimedata.cpp | 12 +++--- src/corelib/kernel/qvariant.cpp | 4 +- src/corelib/tools/qsimd.cpp | 2 +- src/dbus/doc/src/dbus-adaptors.qdoc | 50 +++++++++++----------- src/dbus/doc/src/qdbusxml2cpp.qdoc | 4 +- src/dbus/doc/src/qtdbus-index.qdoc | 8 ++-- src/dbus/doc/src/qtdbus-module.qdoc | 8 ++-- src/dbus/qdbusabstractinterface.cpp | 4 +- src/dbus/qdbusargument.cpp | 26 +++++------ src/dbus/qdbusconnection.cpp | 2 +- src/dbus/qdbuscontext.cpp | 10 ++--- src/dbus/qdbuserror.cpp | 2 +- src/dbus/qdbusextratypes.cpp | 6 +-- src/dbus/qdbusintegrator.cpp | 2 +- src/dbus/qdbusinterface.cpp | 2 +- src/dbus/qdbusmessage.cpp | 6 +-- src/dbus/qdbusmetatype.cpp | 20 ++++----- src/dbus/qdbusunixfiledescriptor.cpp | 4 +- src/dbus/qdbusutil.cpp | 2 +- src/dbus/qdbusxmlgenerator.cpp | 2 +- src/gui/doc/src/qtgui.qdoc | 10 ++--- src/gui/image/qimagereader.cpp | 5 +-- src/gui/image/qimagewriter.cpp | 5 +-- src/gui/image/qplatformpixmap.cpp | 2 +- src/gui/kernel/qguiapplication.cpp | 2 +- src/gui/kernel/qopenglcontext.cpp | 2 +- src/gui/kernel/qplatformopenglcontext.cpp | 2 +- src/gui/painting/qpainter.cpp | 2 +- src/gui/text/qfontengine_qpa.cpp | 4 +- src/network/access/qhttpnetworkconnection.cpp | 2 +- .../access/qhttpnetworkconnectionchannel.cpp | 2 +- src/network/access/qnetworkreplyhttpimpl.cpp | 2 +- src/network/access/qnetworkreplyimpl.cpp | 2 +- src/network/access/qnetworkrequest.cpp | 12 +++--- src/network/doc/src/ssl.qdoc | 2 +- src/network/ssl/qssl.cpp | 2 +- src/opengl/doc/src/qtopengl-index.qdoc | 2 +- src/opengl/doc/src/qtopengl-module.qdoc | 2 +- src/opengl/qglpaintdevice_p.h | 2 +- .../platforms/cocoa/qcocoaeventdispatcher.mm | 2 +- src/plugins/platforms/cocoa/qcocoamenuloader.mm | 2 +- .../platforms/cocoa/qcocoanativeinterface.h | 2 +- .../platforms/windows/qwindowsfontdatabase.cpp | 2 +- src/plugins/platforms/windows/qwindowsfontengine.h | 2 +- .../platforms/windows/qwindowsintegration.cpp | 4 +- src/sql/kernel/qsql.qdoc | 2 +- src/testlib/doc/src/qttestlib-manual.qdoc | 4 +- src/tools/qdoc/cppcodeparser.cpp | 2 +- src/tools/qdoc/doc/qdoc-guide/qdoc-guide.qdoc | 4 +- src/tools/qdoc/doc/qdoc-manual.qdoc | 12 +++--- src/tools/qdoc/node.cpp | 2 +- src/widgets/doc/src/qtwidgets.qdoc | 2 +- src/widgets/styles/qstyle.cpp | 4 +- src/widgets/widgets/qtextedit.cpp | 2 +- src/xml/doc/src/qtxml-index.qdoc | 6 +-- src/xml/doc/src/qtxml.qdoc | 4 +- src/xml/doc/src/xml-processing.qdoc | 2 +- 66 files changed, 161 insertions(+), 163 deletions(-) (limited to 'src') diff --git a/src/3rdparty/zlib/zconf.h b/src/3rdparty/zlib/zconf.h index 06e7786cdf..dc52489bc2 100644 --- a/src/3rdparty/zlib/zconf.h +++ b/src/3rdparty/zlib/zconf.h @@ -8,7 +8,7 @@ #ifndef ZCONF_H #define ZCONF_H -/* Since QtCore must export these symbols, define Z_PREFIX to avoid clashes system zlib */ +/* Since Qt Core must export these symbols, define Z_PREFIX to avoid clashes system zlib */ #define Z_PREFIX /* diff --git a/src/corelib/doc/src/objectmodel/objecttrees.qdoc b/src/corelib/doc/src/objectmodel/objecttrees.qdoc index 86b8d0ee31..407f4ce3e0 100644 --- a/src/corelib/doc/src/objectmodel/objecttrees.qdoc +++ b/src/corelib/doc/src/objectmodel/objecttrees.qdoc @@ -42,13 +42,13 @@ (keyboard shortcut) is a child of the relevant window, so when the user closes that window, the shortcut is deleted too. - \l QQuickItem, the basic visual element of the QtQuick module, inherits + \l QQuickItem, the basic visual element of the Qt Quick module, inherits from QObject, but has a concept of the \e {visual parent} which differs from that of the \e {QObject parent}. An item's visual parent may not necessarily be the same as its object parent. See \l {Concepts - Visual Parent in Qt Quick} for more details. - \l QWidget, the fundamental class of the QtWidgets module, + \l QWidget, the fundamental class of the Qt Widgets module, extends the parent-child relationship. A child normally also becomes a child widget, i.e. it is displayed in its parent's coordinate system and is graphically clipped by its parent's boundaries. For example, diff --git a/src/corelib/doc/src/plugins-howto.qdoc b/src/corelib/doc/src/plugins-howto.qdoc index b547b738f1..af15d94af2 100644 --- a/src/corelib/doc/src/plugins-howto.qdoc +++ b/src/corelib/doc/src/plugins-howto.qdoc @@ -69,7 +69,7 @@ Since the higher-level API is built on top of the lower-level API, some issues are common to both. - If you want to provide plugins for use with Qt Designer, see the QtDesigner + If you want to provide plugins for use with Qt Designer, see the Qt Designer module documentation. Topics: diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index 010ab7b9b3..7ae4863da3 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -378,7 +378,7 @@ #define QT_NO_CONTEXTMENU #endif -// QtDBus module +// Qt D-Bus module #if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_DOM)) #define QT_NO_DBUS #endif diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index ad1ca5a6d5..a97309b876 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1089,6 +1089,6 @@ Feature: DBUS Description: Provides classes for D-Bus. Section: D-Bus Requires: PROPERTIES DOM -Name: QtDBus module +Name: Qt D-Bus module SeeAlso: ??? diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 91503e3327..d7b100ba3c 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -2092,9 +2092,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, \section1 QVariant and GUI Types - Because QVariant is part of the \l QtCore library, it cannot provide + Because QVariant is part of the Qt Core module, it cannot provide conversion functions to data types such as QColor, QImage, and - QPixmap, which are part of \l QtGui. In other words, there is no + QPixmap, which are part of Qt GUI. In other words, there is no \c toColor(), \c toImage(), or \c toPixmap() functions in QVariant. Instead, you can use the QVariant::value() or the qVariantValue() diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index ebe38a97cd..cc9a74d99d 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -1063,7 +1063,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, The QAbstractItemModel class is one of the \l{Model/View Classes} and is part of Qt's \l{Model/View Programming}{model/view framework}. It can be used as the underlying data model for the item view elements in - QML or the item view classes in the QtWidgets module. + QML or the item view classes in the Qt Widgets module. If you need a model to use with an item view such as QML's List View element or the C++ widgets QListView or QTableView, you should consider diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 75ff43180c..ec808424f9 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -749,7 +749,7 @@ void QCoreApplication::setQuitLockEnabled(bool enabled) */ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event) { - // Make it possible for QtScript to hook into events even + // Make it possible for Qt Script to hook into events even // though QApplication is subclassed... bool result = false; void *cbdata[] = { receiver, event, &result }; diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index b2d3470aee..14d96e96fd 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -2804,7 +2804,7 @@ QVariant QMetaProperty::read(const QObject *object) const } // the status variable is changed by qt_metacall to indicate what it did - // this feature is currently only used by QtDBus and should not be depended + // this feature is currently only used by Qt D-Bus and should not be depended // upon. Don't change it without looking into QDBusAbstractInterface first // -1 (unchanged): normal qt_metacall, result stored in argv[0] // changed: result stored directly in value @@ -2883,7 +2883,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const } // the status variable is changed by qt_metacall to indicate what it did - // this feature is currently only used by QtDBus and should not be depended + // this feature is currently only used by Qt D-Bus and should not be depended // upon. Don't change it without looking into QDBusAbstractInterface first // -1 (unchanged): normal qt_metacall, result stored in argv[0] // changed: result stored directly in value, return the value of status diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index a54980513c..6e571d2969 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -452,8 +452,8 @@ bool QMimeData::hasHtml() const Returns a QVariant storing a QImage if the object can return an image; otherwise returns a null variant. - A QVariant is used because QMimeData belongs to the \l QtCore - library, whereas QImage belongs to \l QtGui. To convert the + A QVariant is used because QMimeData belongs to the Qt Core + module, whereas QImage belongs to Qt GUI. To convert the QVariant to a QImage, simply use qvariant_cast(). For example: \snippet code/src_corelib_kernel_qmimedata.cpp 5 @@ -469,8 +469,8 @@ QVariant QMimeData::imageData() const /*! Sets the data in the object to the given \a image. - A QVariant is used because QMimeData belongs to the \l QtCore - library, whereas QImage belongs to \l QtGui. The conversion + A QVariant is used because QMimeData belongs to the Qt Core + module, whereas QImage belongs to Qt GUI. The conversion from QImage to QVariant is implicit. For example: \snippet code/src_corelib_kernel_qmimedata.cpp 6 @@ -499,8 +499,8 @@ bool QMimeData::hasImage() const color (MIME type \c application/x-color); otherwise returns a null variant. - A QVariant is used because QMimeData belongs to the \l QtCore - library, whereas QColor belongs to \l QtGui. To convert the + A QVariant is used because QMimeData belongs to the Qt Core + module, whereas QColor belongs to Qt GUI. To convert the QVariant to a QColor, simply use qvariant_cast(). For example: \snippet code/src_corelib_kernel_qmimedata.cpp 7 diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index c9e0019710..60ab5506a4 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -949,8 +949,8 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names \section1 A Note on GUI Types - Because QVariant is part of the QtCore library, it cannot provide - conversion functions to data types defined in QtGui, such as + Because QVariant is part of the Qt Core module, it cannot provide + conversion functions to data types defined in Qt GUI, such as QColor, QImage, and QPixmap. In other words, there is no \c toColor() function. Instead, you can use the QVariant::value() or the qvariant_cast() template function. For example: diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 7f09743497..f2cb5e88ee 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -390,7 +390,7 @@ void qDetectCpuFeatures() // For that reason, simply forego the CPUID check at all and return the set // of features that we found at compile time, through the #defines from the // compiler. This should at least allow code to execute, even if none of - // the specialized code found in QtGui and elsewhere will ever be enabled + // the specialized code found in Qt GUI and elsewhere will ever be enabled // (it's the user's fault for using a broken compiler). // // This also disables the runtime checking that the processor actually diff --git a/src/dbus/doc/src/dbus-adaptors.qdoc b/src/dbus/doc/src/dbus-adaptors.qdoc index 261324508e..46a6b79c0b 100644 --- a/src/dbus/doc/src/dbus-adaptors.qdoc +++ b/src/dbus/doc/src/dbus-adaptors.qdoc @@ -27,7 +27,7 @@ /*! \page usingadaptors.html - \title Using QtDBus Adaptors + \title Using Qt D-Bus Adaptors \brief How to create and use DBus adaptors in Qt. \ingroup best-practices @@ -56,7 +56,7 @@ of the MethodCall type. (See \l {Declaring Slots in D-Bus Adaptors} for more information). Signals in the class will be automatically relayed over D-Bus. However, not all types are allowed signals or slots' parameter lists: see - \l {The QtDBus Type System} for more information. + \l {The Qt D-Bus Type System} for more information. Also, any property declared with Q_PROPERTY will be automatically exposed over the Properties interface on D-Bus. Since the QObject property system @@ -67,7 +67,7 @@ \list \li \l{Declaring Slots in D-Bus Adaptors} \li \l{Declaring Signals in D-Bus Adaptors} - \li \l{The QtDBus Type System} + \li \l{The Qt D-Bus Type System} \li \l{D-Bus Adaptor Example} \endlist @@ -78,8 +78,8 @@ \page qdbusadaptorexample.html \title D-Bus Adaptor Example - \previouspage The QtDBus Type System - \contentspage Using QtDBus Adaptors + \previouspage The Qt D-Bus Type System + \contentspage Using Qt D-Bus Adaptors The following example code shows how a D-Bus interface can be implemented using an adaptor. @@ -198,11 +198,11 @@ \page qdbusdeclaringslots.html \title Declaring Slots in D-Bus Adaptors - \contentspage Using QtDBus Adaptors + \contentspage Using Qt D-Bus Adaptors \nextpage Declaring Signals in D-Bus Adaptors Slots in D-Bus adaptors are declared just like normal, public slots, but their - parameters must follow certain rules (see \l{The QtDBus Type System} for more + parameters must follow certain rules (see \l{The Qt D-Bus Type System} for more information). Slots whose parameters do not follow those rules or that are not public will not be accessible via D-Bus. @@ -259,7 +259,7 @@ \section1 Automatic Replies Method replies are generated automatically with the contents of the output - parameters (if there were any) by the QtDBus implementation. Slots need not + parameters (if there were any) by the Qt D-Bus implementation. Slots need not worry about constructing proper QDBusMessage objects and sending them over the connection. @@ -267,7 +267,7 @@ it needs to send a special reply or even an error, it can do so by using QDBusMessage::createReply() or QDBusMessage::createErrorReply() on the QDBusMessage parameter and send it with QDBusConnection::send(). The - QtDBus implementation will not generate any reply if the slot did so. + Qt D-Bus implementation will not generate any reply if the slot did so. \warning When a caller places a method call and waits for a reply, it will only wait for a limited amount of time. Slots intending to take a long time @@ -306,12 +306,12 @@ \snippet code/doc_src_qdbusadaptors.cpp 11 As can be seen in the example, when a delayed reply is in place, - the return value(s) from the slot will be ignored by QtDBus. They + the return value(s) from the slot will be ignored by Qt D-Bus. They are used only to determine the slot's signature when communicating the adaptor's description to remote applications, or in case the code in the slot decides not to use a delayed reply. - The delayed reply itself is requested from QtDBus by calling + The delayed reply itself is requested from Qt D-Bus by calling QDBusMessage::reply() on the original message. It then becomes the resposibility of the called code to eventually send a reply to the caller. @@ -321,8 +321,8 @@ to complete should make that fact clear in documentation so that callers properly set higher timeouts. - \sa {Using QtDBus Adaptors}, {Declaring Signals in D-Bus Adaptors}, - {The QtDBus Type System}, QDBusConnection, QDBusMessage + \sa {Using Qt D-Bus Adaptors}, {Declaring Signals in D-Bus Adaptors}, + {The Qt D-Bus Type System}, QDBusConnection, QDBusMessage */ /*! @@ -330,12 +330,12 @@ \title Declaring Signals in D-Bus Adaptors \previouspage Declaring Slots in D-Bus Adaptors - \contentspage Using QtDBus Adaptors - \nextpage The QtDBus Type System + \contentspage Using Qt D-Bus Adaptors + \nextpage The Qt D-Bus Type System Any signal in a class derived from QDBusAbstractAdaptor will be automatically relayed into D-Bus, provided that the signal's parameters conform to certain - rules (see \l{The QtDBus Type System} for more information). No special code + rules (see \l{The Qt D-Bus Type System} for more information). No special code is necessary to make this relay. However, signals must still be emitted. The easiest way to emit an adaptor @@ -349,21 +349,21 @@ the corresponding signals in the adaptor. It will inspect the list of signals in both classes and connect those whose parameters match exactly. - \sa {Using QtDBus Adaptors}, + \sa {Using Qt D-Bus Adaptors}, {Declaring Slots in D-Bus Adaptors}, - {The QtDBus Type System}, QDBusAbstractAdaptor + {The Qt D-Bus Type System}, QDBusAbstractAdaptor */ /*! \page qdbustypesystem.html - \title The QtDBus Type System + \title The Qt D-Bus Type System \previouspage Declaring Signals in D-Bus Adaptors - \contentspage Using QtDBus Adaptors + \contentspage Using Qt D-Bus Adaptors \nextpage D-Bus Adaptor Example D-Bus has an extensible type system based on a few primitives and - composition of the primitives in arrays and structures. QtDBus + composition of the primitives in arrays and structures. Qt D-Bus implements the interface to that type system through the QDBusArgument class, allowing user programs to send and receive practically every C++ type over the bus. @@ -436,13 +436,13 @@ \section1 Extending the Type System - In order to use one's own type with QtDBus, the type has to be + In order to use one's own type with Qt D-Bus, the type has to be declared as a Qt meta-type with the Q_DECLARE_METATYPE() macro and registered with the qDBusRegisterMetaType() function. The streaming operators \c{operator>>} and \c{operator<<} will be automatically found by the registration system. - QtDBus provides template specializations for arrays and maps for + Qt D-Bus provides template specializations for arrays and maps for use with Qt's \l{Container classes}{container classes}, such as QMap and QList, so it is not necessary to write the streaming operator functions for those. For other types, and specially for @@ -454,7 +454,7 @@ \section1 The Type System in Use - All of the QtDBus types (primitives and user-defined alike) can be + All of the Qt D-Bus types (primitives and user-defined alike) can be used to send and receive messages of all types over the bus. \warning You may not use any type that is not on the list above, @@ -477,5 +477,5 @@ Its presence in the method implementation (outside the class declaration) is optional. - \sa {Using QtDBus Adaptors} + \sa {Using Qt D-Bus Adaptors} */ diff --git a/src/dbus/doc/src/qdbusxml2cpp.qdoc b/src/dbus/doc/src/qdbusxml2cpp.qdoc index 90fb2e15ec..7ec9d446d6 100644 --- a/src/dbus/doc/src/qdbusxml2cpp.qdoc +++ b/src/dbus/doc/src/qdbusxml2cpp.qdoc @@ -27,10 +27,10 @@ /*! \page qdbusxml2cpp.html - \title QtDBus XML compiler (qdbusxml2cpp) + \title Qt D-Bus XML compiler (qdbusxml2cpp) \keyword qdbusxml2cpp - The QtDBus XML compiler is a tool that can be used to parse interface descriptions and produce + The Qt D-Bus XML compiler is a tool that can be used to parse interface descriptions and produce static code representing those interfaces, which can then be used to make calls to remote objects or implement said interfaces. diff --git a/src/dbus/doc/src/qtdbus-index.qdoc b/src/dbus/doc/src/qtdbus-index.qdoc index ccef4de614..261183cb96 100644 --- a/src/dbus/doc/src/qtdbus-index.qdoc +++ b/src/dbus/doc/src/qtdbus-index.qdoc @@ -96,7 +96,7 @@ purpose is to be used in a one-to-many context, signal messages are designed to work over an "opt-in" mechanism. - The QtDBus module fully encapsulates the low-level concept of + The Qt D-Bus module fully encapsulates the low-level concept of messages into a simpler, object-oriented approach familiar to Qt developers. In most cases, the developer need not worry about sending or receiving messages. @@ -208,9 +208,9 @@ type information over the bus: \list - \li \l{Using QtDBus Adaptors} - \li \l{The QtDBus Type System} - \li \l{QtDBus XML compiler (qdbusxml2cpp)} + \li \l{Using Qt D-Bus Adaptors} + \li \l{The Qt D-Bus Type System} + \li \l{Qt D-Bus XML compiler (qdbusxml2cpp)} \li \l{Qt D-Bus C++ Classes} \endlist */ diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc index a2801e856b..12fc864e16 100644 --- a/src/dbus/doc/src/qtdbus-module.qdoc +++ b/src/dbus/doc/src/qtdbus-module.qdoc @@ -28,7 +28,7 @@ /*! \module QtDBus \title Qt D-Bus C++ Classes - \brief The QtDBus module is a Unix-only library that you can use + \brief The Qt D-Bus module is a Unix-only library that you can use to perform Inter-Process Communication using the \l{D-Bus} protocol. \ingroup modules @@ -37,12 +37,12 @@ \target The QDBus compiler - Applications using the QtDBus module can provide services to + Applications using the Qt D-Bus module can provide services to other, remote applications by exporting objects, as well as use services exported by those applications by placing calls and accessing properties. - The QtDBus module provides an interface that extends the Qt \l + The Qt D-Bus module provides an interface that extends the Qt \l {signalsandslots.html}{Signals and Slots} mechanism, allowing one to connect to a signal emitted remotely as well as to connect a local signal to remote slot. @@ -52,7 +52,7 @@ \snippet code/doc_src_qtdbus.cpp 0 If you're using qmake to build your application, you can add this - line to your .pro file to make it link against the QtDBus + line to your .pro file to make it link against the Qt D-Bus libraries: \snippet code/doc_src_qtdbus.pro 1 diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp index a7bdbe4525..2a8681d1d7 100644 --- a/src/dbus/qdbusabstractinterface.cpp +++ b/src/dbus/qdbusabstractinterface.cpp @@ -128,7 +128,7 @@ void QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, QVariant & if (int(mp.type()) != QMetaType::QVariant) { expectedSignature = QDBusMetaType::typeToSignature(where.userType()); if (expectedSignature == 0) { - qWarning("QDBusAbstractInterface: type %s must be registered with QtDBus before it can be " + qWarning("QDBusAbstractInterface: type %s must be registered with Qt D-Bus before it can be " "used to read property %s.%s", mp.typeName(), qPrintable(interface), mp.name()); lastError = QDBusError(QDBusError::Failed, @@ -264,7 +264,7 @@ int QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call _c, int _id, void \inmodule QtDBus \since 4.2 - \brief The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding, allowing access to remote interfaces + \brief The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the Qt D-Bus binding, allowing access to remote interfaces Generated-code classes also derive from QDBusAbstractInterface, all methods described here are also valid for generated-code diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp index d88a1b893e..191eb5eea6 100644 --- a/src/dbus/qdbusargument.cpp +++ b/src/dbus/qdbusargument.cpp @@ -177,10 +177,10 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d) The class is used to send arguments over D-Bus to remote applications and to receive them back. D-Bus offers an extensible type system, based on a few primitive types and associations of - them. See the \l {qdbustypesystem.html}{QtDBus type system} page + them. See the \l {qdbustypesystem.html}{Qt D-Bus Type System} page for more information on the type system. - QDBusArgument is the central class in the QtDBus type system, + QDBusArgument is the central class in the Qt D-Bus type system, providing functions to marshall and demarshall the primitive types. The compound types are then created by association of one or more of the primitive types in arrays, dictionaries or @@ -188,7 +188,7 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d) The following example illustrates how a structure containing an integer and a string can be constructed using the \l - {qdbustypesystem.html}{QtDBus type system}: + {qdbustypesystem.html}{Qt D-Bus type system}: \snippet code/src_qdbus_qdbusargument.cpp 0 @@ -229,9 +229,9 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d) In this example, both the \c{operator<<} and the \c{operator>>} functions may produce a different number of reads/writes. This can - confuse the QtDBus type system and should be avoided. + confuse the Qt D-Bus type system and should be avoided. - \sa QDBusAbstractInterface, {qdbustypesystem.html}{The QtDBus type + \sa QDBusAbstractInterface, {qdbustypesystem.html}{The Qt D-Bus type system}, {usingadaptors.html}{Using Adaptors}, qdbus_cast() */ @@ -522,7 +522,7 @@ QDBusArgument &QDBusArgument::operator<<(const QDBusVariant &arg) that are supported directly by QDBusArgument because of their widespread usage in Qt applications. - Other arrays are supported through compound types in QtDBus. + Other arrays are supported through compound types in Qt D-Bus. */ QDBusArgument &QDBusArgument::operator<<(const QStringList &arg) { @@ -540,7 +540,7 @@ QDBusArgument &QDBusArgument::operator<<(const QStringList &arg) that are supported directly by QDBusArgument because of their widespread usage in Qt applications. - Other arrays are supported through compound types in QtDBus. + Other arrays are supported through compound types in Qt D-Bus. */ QDBusArgument &QDBusArgument::operator<<(const QByteArray &arg) { @@ -784,7 +784,7 @@ const QDBusArgument &QDBusArgument::operator>>(QDBusVariant &arg) const that are supported directly by QDBusArgument because of their widespread usage in Qt applications. - Other arrays are supported through compound types in QtDBus. + Other arrays are supported through compound types in Qt D-Bus. */ const QDBusArgument &QDBusArgument::operator>>(QStringList &arg) const { @@ -802,7 +802,7 @@ const QDBusArgument &QDBusArgument::operator>>(QStringList &arg) const that are supported directly by QDBusArgument because of their widespread usage in Qt applications. - Other arrays are supported through compound types in QtDBus. + Other arrays are supported through compound types in Qt D-Bus. */ const QDBusArgument &QDBusArgument::operator>>(QByteArray &arg) const { @@ -855,7 +855,7 @@ void QDBusArgument::endStructure() If the type you want to marshall is a QList, QVector or any of the Qt's \l {Container Classes} that take one template parameter, you need not declare an \c{operator<<} function for it, since - QtDBus provides generic templates to do the job of marshalling + Qt D-Bus provides generic templates to do the job of marshalling the data. The same applies for STL's sequence containers, such as \c {std::list}, \c {std::vector}, etc. @@ -892,7 +892,7 @@ void QDBusArgument::endArray() \snippet code/src_qdbus_qdbusargument.cpp 7 If the type you want to marshall is a QMap or QHash, you need not - declare an \c{operator<<} function for it, since QtDBus provides + declare an \c{operator<<} function for it, since Qt D-Bus provides generic templates to do the job of marshalling the data. \sa endMap(), beginStructure(), beginArray(), beginMapEntry() @@ -981,7 +981,7 @@ void QDBusArgument::endStructure() const If the type you want to demarshall is a QList, QVector or any of the Qt's \l {Container Classes} that take one template parameter, you - need not declare an \c{operator>>} function for it, since QtDBus + need not declare an \c{operator>>} function for it, since Qt D-Bus provides generic templates to do the job of demarshalling the data. The same applies for STL's sequence containers, such as \c {std::list}, \c {std::vector}, etc. @@ -1016,7 +1016,7 @@ void QDBusArgument::endArray() const \snippet code/src_qdbus_qdbusargument.cpp 10 If the type you want to demarshall is a QMap or QHash, you need not - declare an \c{operator>>} function for it, since QtDBus provides + declare an \c{operator>>} function for it, since Qt D-Bus provides generic templates to do the job of demarshalling the data. \sa endMap(), beginStructure(), beginArray(), beginMapEntry() diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index a4c241941f..d576112f8d 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -1199,7 +1199,7 @@ QByteArray QDBusConnection::localMachineId() \inmodule QtDBus \brief The QDBus namespace contains miscellaneous identifiers used - throughout the QtDBus library. + throughout the Qt D-Bus module. */ /*! diff --git a/src/dbus/qdbuscontext.cpp b/src/dbus/qdbuscontext.cpp index 4bf229355b..7cc3648cf8 100644 --- a/src/dbus/qdbuscontext.cpp +++ b/src/dbus/qdbuscontext.cpp @@ -84,7 +84,7 @@ QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate The QDBusContext class is an alternative to accessing the context that doesn't involve modifying the code generated by the \l - {QtDBus XML Compiler (qdbusxml2cpp)}. + {Qt D-Bus XML compiler (qdbusxml2cpp)}. QDBusContext is used by subclassing it from the objects being exported using QDBusConnection::registerObject(). The following @@ -159,10 +159,10 @@ bool QDBusContext::isDelayedReply() const /*! Sets whether this call will have a delayed reply or not. - If \a enable is false, QtDBus will automatically generate a reply + If \a enable is false, Qt D-Bus will automatically generate a reply back to the caller, if needed, as soon as the called slot returns. - If \a enable is true, QtDBus will not generate automatic + If \a enable is true, Qt D-Bus will not generate automatic replies. It will also ignore the return value from the slot and any output parameters. Instead, the called object is responsible for storing the incoming message and send a reply or error at a @@ -181,7 +181,7 @@ void QDBusContext::setDelayedReply(bool enable) const msg parameter is a human-readable text explaining the failure. If an error is sent, the return value and any output parameters - from the called slot will be ignored by QtDBus. + from the called slot will be ignored by Qt D-Bus. */ void QDBusContext::sendErrorReply(const QString &name, const QString &msg) const { @@ -195,7 +195,7 @@ void QDBusContext::sendErrorReply(const QString &name, const QString &msg) const msg parameter is a human-readable text explaining the failure. If an error is sent, the return value and any output parameters - from the called slot will be ignored by QtDBus. + from the called slot will be ignored by Qt D-Bus. */ void QDBusContext::sendErrorReply(QDBusError::ErrorType type, const QString &msg) const { diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp index 7e98c2405f..d578bf7d76 100644 --- a/src/dbus/qdbuserror.cpp +++ b/src/dbus/qdbuserror.cpp @@ -176,7 +176,7 @@ static inline QDBusError::ErrorType get(const char *name) C++ and Java exceptions are a valid analogy for D-Bus errors: instead of returning normally with a return value, remote applications and the bus may decide to throw an error - condition. However, the QtDBus implementation does not use the C++ + condition. However, the Qt D-Bus implementation does not use the C++ exception-throwing mechanism, so you will receive QDBusErrors in the return reply (see QDBusReply::error()). diff --git a/src/dbus/qdbusextratypes.cpp b/src/dbus/qdbusextratypes.cpp index 20619624fc..87dd4f7dd9 100644 --- a/src/dbus/qdbusextratypes.cpp +++ b/src/dbus/qdbusextratypes.cpp @@ -82,7 +82,7 @@ void QDBusSignature::doCheck() The QVariant within a QDBusVariant is required to distinguish between a normal D-Bus value and a value within a D-Bus variant. - \sa {The QtDBus type system} + \sa {The Qt D-Bus Type System} */ /*! @@ -123,7 +123,7 @@ void QDBusSignature::doCheck() \brief The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-Bus typesystem. - \sa {The QtDBus type system} + \sa {The Qt D-Bus Type System} */ /*! @@ -176,7 +176,7 @@ void QDBusSignature::doCheck() \brief The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus typesystem. - \sa {The QtDBus type system} + \sa {The Qt D-Bus Type System} */ /*! diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 325cee6bae..1cf9de5610 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -115,7 +115,7 @@ static inline QDebug operator<<(QDebug dbg, const QDBusConnectionPrivate *conn) void qdbusDefaultThreadDebug(int action, int condition, QDBusConnectionPrivate *conn) { qDBusDebug() << QThread::currentThread() - << "QtDBus threading action" << action + << "Qt D-Bus threading action" << action << (condition == QDBusLockerBase::BeforeLock ? "before lock" : condition == QDBusLockerBase::AfterLock ? "after lock" : condition == QDBusLockerBase::BeforeUnlock ? "before unlock" : diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp index deb933d8c4..d4a027f2db 100644 --- a/src/dbus/qdbusinterface.cpp +++ b/src/dbus/qdbusinterface.cpp @@ -198,7 +198,7 @@ QDBusInterfacePrivate::~QDBusInterfacePrivate() \snippet code/src_qdbus_qdbusinterface.cpp 0 - \sa {QtDBus XML compiler (qdbusxml2cpp)} + \sa {Qt D-Bus XML compiler (qdbusxml2cpp)} */ /*! diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp index 62599bdf83..ce5af42e74 100644 --- a/src/dbus/qdbusmessage.cpp +++ b/src/dbus/qdbusmessage.cpp @@ -620,7 +620,7 @@ bool QDBusMessage::isReplyRequired() const /*! Sets whether the message will be replied later (if \a enable is - true) or if an automatic reply should be generated by QtDBus + true) or if an automatic reply should be generated by Qt D-Bus (if \a enable is false). In D-Bus, all method calls must generate a reply to the caller, unless the @@ -639,7 +639,7 @@ void QDBusMessage::setDelayedReply(bool enable) const /*! Returns the delayed reply flag, as set by setDelayedReply(). By default, this - flag is false, which means QtDBus will generate automatic replies + flag is false, which means Qt D-Bus will generate automatic replies when necessary. */ bool QDBusMessage::isDelayedReply() const @@ -674,7 +674,7 @@ void QDBusMessage::setAutoStartService(bool enable) /*! Returns the auto start flag, as set by setAutoStartService(). By default, this - flag is true, which means QtDBus will auto start a service, if it is + flag is true, which means Qt D-Bus will auto start a service, if it is not running already. \sa setAutoStartService() diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp index 9d478fe959..ff5818d684 100644 --- a/src/dbus/qdbusmetatype.cpp +++ b/src/dbus/qdbusmetatype.cpp @@ -96,7 +96,7 @@ void QDBusMetaTypeId::init() // reentrancy is not a problem since everything else is locked on their own // set the guard variable at the end if (!initialized.load()) { - // register our types with QtCore (calling qMetaTypeId() does this implicitly) + // register our types with Qt Core (calling qMetaTypeId() does this implicitly) (void)message(); (void)argument(); (void)variant(); @@ -106,7 +106,7 @@ void QDBusMetaTypeId::init() (void)unixfd(); #ifndef QDBUS_NO_SPECIALTYPES - // and register QtCore's with us + // and register Qt Core's with us registerHelper(); registerHelper(); registerHelper(); @@ -145,21 +145,21 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock) /*! \class QDBusMetaType \inmodule QtDBus - \brief Meta-type registration system for the QtDBus module. + \brief Meta-type registration system for the Qt D-Bus module. \internal The QDBusMetaType class allows you to register class types for marshalling and demarshalling over D-Bus. D-Bus supports a very limited set of primitive types, but allows one to extend the type system by creating compound types, such as arrays (lists) and - structs. In order to use them with QtDBus, those types must be + structs. In order to use them with Qt D-Bus, those types must be registered. - See \l {qdbustypesystem.html}{QtDBus type system} for more + See \l {qdbustypesystem.html}{Qt D-Bus Type System} for more information on the type system and how to register additional types. - \sa {qdbustypesystem.html}{QtDBus type system}, + \sa {qdbustypesystem.html}{Qt D-Bus Type System}, qDBusRegisterMetaType(), QMetaType, QVariant, QDBusArgument */ @@ -170,7 +170,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock) \since 4.2 Registers \c{T} with the - \l {qdbustypesystem.html}{QtDBus type system} and the Qt \l + \l {qdbustypesystem.html}{Qt D-Bus Type System} and the Qt \l {QMetaType}{meta-type system}, if it's not already registered. To register a type, it must be declared as a meta-type with the @@ -182,14 +182,14 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock) If \c{T} isn't a type derived from one of Qt's \l{container classes}, the \c{operator<<} and \c{operator>>} streaming operators between \c{T} and QDBusArgument - must be already declared. See the \l {qdbustypesystem.html}{QtDBus - type system} page for more information on how to declare such + must be already declared. See the \l {qdbustypesystem.html}{Qt D-Bus + Type System} page for more information on how to declare such types. This function returns the Qt meta type id for the type (the same value that is returned from qRegisterMetaType()). - \sa {qdbustypesystem.html}{QtDBus type system}, qRegisterMetaType(), QMetaType + \sa {qdbustypesystem.html}{Qt D-Bus Type System}, qRegisterMetaType(), QMetaType */ /*! diff --git a/src/dbus/qdbusunixfiledescriptor.cpp b/src/dbus/qdbusunixfiledescriptor.cpp index 2ad5b52d4d..53fb439887 100644 --- a/src/dbus/qdbusunixfiledescriptor.cpp +++ b/src/dbus/qdbusunixfiledescriptor.cpp @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE \brief The QDBusUnixFileDescriptor class holds one Unix file descriptor. The QDBusUnixFileDescriptor class is used to hold one Unix file - descriptor for use with the QtDBus module. This allows applications to + descriptor for use with the Qt D-Bus module. This allows applications to send and receive Unix file descriptors over the D-Bus connection, mapping automatically to the D-Bus type 'h'. @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE Unix file descriptor passing is not available in all D-Bus connections. This feature is present with D-Bus library and bus daemon version 1.4 and - upwards on Unix systems. QtDBus automatically enables the feature if such + upwards on Unix systems. Qt D-Bus automatically enables the feature if such a version was found at compile-time and run-time. To verify that your connection does support passing file descriptors, diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index ea8424dc8b..df5e272a1e 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -315,7 +315,7 @@ namespace QDBusUtil /*! \internal \since 4.5 - Dumps the contents of a QtDBus argument from \a arg into a string. + Dumps the contents of a Qt D-Bus argument from \a arg into a string. */ QString argumentToString(const QVariant &arg) { diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp index 6871387130..387caae957 100644 --- a/src/dbus/qdbusxmlgenerator.cpp +++ b/src/dbus/qdbusxmlgenerator.cpp @@ -59,7 +59,7 @@ extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const static inline QString typeNameToXml(const char *typeName) { // ### copied from qtextdocument.cpp - // ### move this into QtCore at some point + // ### move this into Qt Core at some point QString plain = QLatin1String(typeName); QString rich; rich.reserve(int(plain.length() * 1.1)); diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc index f41c1c7c91..aa44dcfad5 100644 --- a/src/gui/doc/src/qtgui.qdoc +++ b/src/gui/doc/src/qtgui.qdoc @@ -147,15 +147,15 @@ \section1 Qt GUI prior to Qt 5.0 - Prior to Qt 5.0, the Qt GUI library was the monolithic container + Prior to Qt 5.0, the Qt GUI module was the monolithic container for all things relating to graphical user interfaces in Qt, and included the Qt widget set, the item views, the graphics view framework and also printing. Starting Qt 5, these classes have - been moved to the QtWidgets library. Printing has been - moved to the QtPrintSupport library. Please note that these - libraries can be excluded from a Qt installation. + been moved to the Qt Widgets module. Printing has been + moved to the Qt Print Support module. Please note that these + modules can be excluded from a Qt installation. - QtGui now contains only a small set of enablers, which are generally + Qt GUI now contains only a small set of enablers, which are generally useful for all graphical applications. \section1 Drag and Drop diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 6836035e59..71408ecd23 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -1456,9 +1456,8 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, \row \li SVG \li Scalable Vector Graphics \endtable - Reading and writing SVG files is supported through Qt's - \l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} - provides support for additional image formats. + Reading and writing SVG files is supported through the \l{Qt SVG} module. + The \l{Qt Image Formats} module provides support for additional image formats. Note that the QApplication instance must be created before this function is called. diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 3270a5ca01..8e0f3fdcf0 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -697,9 +697,8 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, \row \li XPM \li X11 Pixmap \endtable - Reading and writing SVG files is supported through Qt's - \l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} - provides support for additional image formats. + Reading and writing SVG files is supported through the \l{Qt SVG} module. + The \l{Qt Image Formats} module provides support for additional image formats. Note that the QApplication instance must be created before this function is called. diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp index ba8a52d14f..ce66972dc3 100644 --- a/src/gui/image/qplatformpixmap.cpp +++ b/src/gui/image/qplatformpixmap.cpp @@ -83,7 +83,7 @@ QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId) QPlatformPixmap::~QPlatformPixmap() { // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will - // then set is_cached to false. For example, on X11 QtGui needs to delete the GLXPixmap + // then set is_cached to false. For example, on X11 Qt GUI needs to delete the GLXPixmap // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted, // otherwise some drivers will leak the GL surface. In this case, QX11PlatformPixmap will // call the cleanup hooks itself before deleting the native pixmap and set is_cached to diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 694ba3fc1b..3044c1dee2 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -220,7 +220,7 @@ static inline void clearFontUnlocked() For any GUI application using Qt, there is precisely \b one QGuiApplication object no matter whether the application has 0, 1, 2 or more windows at any given time. For non-GUI Qt applications, use QCoreApplication instead, - as it does not depend on the \l QtGui library. For QWidget based Qt applications, + as it does not depend on the Qt GUI module. For QWidget based Qt applications, use QApplication instead, as it provides some functionality needed for creating QWidget instances. diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 65a7ac19ef..bf3de0de8d 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -667,7 +667,7 @@ QScreen *QOpenGLContext::screen() const } /*! - internal: Needs to have a pointer to qGLContext. But since this is in QtGui we cant + internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we cant have any type information. \internal diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp index 0b30884f06..f4d343d78a 100644 --- a/src/gui/kernel/qplatformopenglcontext.cpp +++ b/src/gui/kernel/qplatformopenglcontext.cpp @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE The only place to retrieve a QPlatformOpenGLContext from is through a QPlatformWindow. The context which is current for a specific thread can be collected by the currentContext() - function. This is how QPlatformOpenGLContext also makes it possible to use the QtGui module + function. This is how QPlatformOpenGLContext also makes it possible to use the Qt GUI module withhout using QOpenGLWidget. When using QOpenGLContext::currentContext(), it will ask QPlatformOpenGLContext for the currentContext. Then a corresponding QOpenGLContext will be returned, which maps to the QPlatformOpenGLContext. diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 0ab2ab5589..0811b5282f 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1387,7 +1387,7 @@ void QPainterPrivate::updateState(QPainterState *newState) cases where expensive operations are ok to use, for instance when the result is cached in a QPixmap. - \sa QPaintDevice, QPaintEngine, {QtSvg Module}, {Basic Drawing Example}, + \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, {Drawing Utility Functions} */ diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index b083e20428..4a61b27298 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -732,10 +732,10 @@ void QFontEngineMultiQPA::setFallbackFamiliesList(const QStringList &fallbacks) } /* - This is used indirectly by QtWebKit when using QTextLayout::setRawFont + This is used indirectly by Qt WebKit when using QTextLayout::setRawFont The purpose of this is to provide the necessary font fallbacks when drawing complex - text. Since QtWebKit ends up repeatedly creating QTextLayout instances and passing them + text. Since Qt WebKit ends up repeatedly creating QTextLayout instances and passing them the same raw font over and over again, we want to cache the corresponding multi font engine as it may contain fallback font engines already. */ diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index be6d1b866a..eec5cfa96d 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -470,7 +470,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket } // - Changing values in QAuthenticator will reset the 'phase'. Therefore if it is still "Done" // then nothing was filled in by the user or the cache - // - If withCredentials has been set to false (e.g. by QtWebKit for a cross-origin XMLHttpRequest) then + // - If withCredentials has been set to false (e.g. by Qt WebKit for a cross-origin XMLHttpRequest) then // we need to bail out if authentication is required. if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) { // Reset authenticator so the next request on that channel does not get messed up diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index c4e2b1752d..38723a7032 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -231,7 +231,7 @@ bool QHttpNetworkConnectionChannel::sendRequest() url.setUserInfo(QString()); request.setUrl(url); } - // Will only be false if QtWebKit is performing a cross-origin XMLHttpRequest + // Will only be false if Qt WebKit is performing a cross-origin XMLHttpRequest // and withCredentials has not been set to true. if (request.withCredentials()) connection->d_func()->createAuthorization(socket, request); diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index c2c4f0f043..480598918f 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -186,7 +186,7 @@ QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(QNetworkAccessManager* const manage // Internal code that does a HTTP reply for the synchronous Ajax - // in QtWebKit. + // in Qt WebKit. QVariant synchronousHttpAttribute = request.attribute( static_cast(QNetworkRequest::SynchronousRequestAttribute)); if (synchronousHttpAttribute.isValid()) { diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 7f98206e52..e12286c459 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -361,7 +361,7 @@ void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const q->QIODevice::open(QIODevice::ReadOnly); // Internal code that does a HTTP reply for the synchronous Ajax - // in QtWebKit. + // in Qt WebKit. QVariant synchronousHttpAttribute = req.attribute( static_cast(QNetworkRequest::SynchronousRequestAttribute)); // The synchronous HTTP is a corner case, we will put all upload data in one big QByteArray in the outgoingDataBuffer. diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index fd76fdbae0..3a3e24b80b 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -204,7 +204,7 @@ QT_BEGIN_NAMESPACE \value CookieLoadControlAttribute Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic) Indicates whether to send 'Cookie' headers in the request. - This attribute is set to false by QtWebKit when creating a cross-origin + This attribute is set to false by Qt WebKit when creating a cross-origin XMLHttpRequest where withCredentials has not been set explicitly to true by the Javascript that created the request. See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag}{here} for more information. @@ -214,7 +214,7 @@ QT_BEGIN_NAMESPACE Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic) Indicates whether to save 'Cookie' headers received from the server in reply to the request. - This attribute is set to false by QtWebKit when creating a cross-origin + This attribute is set to false by Qt WebKit when creating a cross-origin XMLHttpRequest where withCredentials has not been set explicitly to true by the Javascript that created the request. See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information. @@ -226,7 +226,7 @@ QT_BEGIN_NAMESPACE if available. If this is set to QNetworkRequest::Manual and the authentication mechanism is 'Basic' or 'Digest', Qt will not send an an 'Authorization' HTTP header with any cached credentials it may have for the request's URL. - This attribute is set to QNetworkRequest::Manual by QtWebKit when creating a cross-origin + This attribute is set to QNetworkRequest::Manual by Qt WebKit when creating a cross-origin XMLHttpRequest where withCredentials has not been set explicitly to true by the Javascript that created the request. See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information. @@ -286,7 +286,7 @@ QT_BEGIN_NAMESPACE \since 4.7 Indicates if an aspect of the request's loading mechanism has been - manually overridden, e.g. by QtWebKit. + manually overridden, e.g. by Qt WebKit. \value Automatic default value: indicates default behaviour. @@ -584,7 +584,7 @@ void QNetworkRequest::setSslConfiguration(const QSslConfiguration &config) Allows setting a reference to the \a object initiating the request. - For example QtWebKit sets the originating object to the + For example Qt WebKit sets the originating object to the QWebFrame that initiated the request. \sa originatingObject() @@ -1036,7 +1036,7 @@ QDateTime QNetworkHeadersPrivate::fromHttpDate(const QByteArray &value) dt = QDateTime::fromString(QString::fromLatin1(value), Qt::TextDate); } else { // Use sscanf over QLocal/QDateTimeParser for speed reasons. See the - // QtWebKit performance benchmarks to get an idea. + // Qt WebKit performance benchmarks to get an idea. if (pos == 3) { char month_name[4]; int day, year, hour, minute, second; diff --git a/src/network/doc/src/ssl.qdoc b/src/network/doc/src/ssl.qdoc index 4fea6f00a9..7c6ba1155f 100644 --- a/src/network/doc/src/ssl.qdoc +++ b/src/network/doc/src/ssl.qdoc @@ -73,6 +73,6 @@ using code from the OpenSSL project are correctly certified for import and export in relevant regions of the world. - When the QtNetwork module is built with SSL support, the library is linked + When the Qt Network module is built with SSL support, the library is linked against OpenSSL in a way that requires OpenSSL license compliance. */ diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp index f555125392..6fcd977759 100644 --- a/src/network/ssl/qssl.cpp +++ b/src/network/ssl/qssl.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE /*! \namespace QSsl - \brief The QSsl namespace declares enums common to all SSL classes in QtNetwork. + \brief The QSsl namespace declares enums common to all SSL classes in Qt Network. \since 4.3 \ingroup network diff --git a/src/opengl/doc/src/qtopengl-index.qdoc b/src/opengl/doc/src/qtopengl-index.qdoc index 4a97da46f7..94109aa706 100644 --- a/src/opengl/doc/src/qtopengl-index.qdoc +++ b/src/opengl/doc/src/qtopengl-index.qdoc @@ -28,7 +28,7 @@ /*! \page qtopengl-index.html \title Qt OpenGL - \brief The QtOpenGL module offers classes that make it easy to + \brief The Qt OpenGL module offers classes that make it easy to use OpenGL in Qt applications. \warning Apart from the \l{QGLWidget} class, this module should not be used diff --git a/src/opengl/doc/src/qtopengl-module.qdoc b/src/opengl/doc/src/qtopengl-module.qdoc index a0aef0e0d3..e75eb49447 100644 --- a/src/opengl/doc/src/qtopengl-module.qdoc +++ b/src/opengl/doc/src/qtopengl-module.qdoc @@ -31,7 +31,7 @@ \ingroup modules \ingroup technology-apis - \brief The QtOpenGL module offers classes that make it easy to + \brief The Qt OpenGL module offers classes that make it easy to use OpenGL in Qt applications. \warning Apart from the \l{QGLWidget} class, this module should not be used diff --git a/src/opengl/qglpaintdevice_p.h b/src/opengl/qglpaintdevice_p.h index b80267e985..4fa17306b5 100644 --- a/src/opengl/qglpaintdevice_p.h +++ b/src/opengl/qglpaintdevice_p.h @@ -47,7 +47,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of the QtOpenGL module. This header file may change from +// of the Qt OpenGL module. This header file may change from // version to version without notice, or even be removed. // // We mean it. diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index 305e7ff985..a0734530c5 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -881,7 +881,7 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions() void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window) { // We need to start spinning the modal session. Usually this is done with - // QDialog::exec() for QtWidgets based applications, but for others that + // QDialog::exec() for Qt Widgets based applications, but for others that // just call show(), we need to interrupt(). We call this here, before // setting currentModalSessionCached to zero, so that interrupt() calls // [NSApp abortModal] if another modal session is currently running diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm index 60bcd82aae..2a9dcec64b 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm @@ -88,7 +88,7 @@ QString qt_mac_applicationmenu_string(int type) The reason for having the nib file is that those can not be created programmatically. To ease deployment the nib files are stored in Qt resources and written to QDir::temp() before loading. (Earlier Qt versions used - to require having the nib file in the QtGui framework.) + to require having the nib file in the Qt GUI framework.) */ void qt_mac_loadMenuNib(QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader) { diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h index 825f88a269..34e8fb61e2 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h @@ -82,7 +82,7 @@ private: Q_INVOKABLE QPlatformPrinterSupport *createPlatformPrinterSupport(); /* Function to return the NSPrintInfo * from QMacPaintEnginePrivate. - Needed by the native print dialog in the QtPrintSupport library. + Needed by the native print dialog in the Qt Print Support module. */ Q_INVOKABLE void *NSPrintInfoForPrintEngine(QPrintEngine *printEngine); diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 2d68c4684a..b4fb19e8e8 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1141,7 +1141,7 @@ QWindowsFontEngineDataPtr sharedFontData() QWindowsFontDatabase::QWindowsFontDatabase() { - // Properties accessed by QWin32PrintEngine (QtPrintSupport) + // Properties accessed by QWin32PrintEngine (Qt Print Support) static const int hfontMetaTypeId = qRegisterMetaType(); static const int logFontMetaTypeId = qRegisterMetaType(); Q_UNUSED(hfontMetaTypeId) diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h index cfe1acf3a7..a23db2f235 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.h +++ b/src/plugins/platforms/windows/qwindowsfontengine.h @@ -135,7 +135,7 @@ public: const QSharedPointer &fontEngineData() const { return m_fontEngineData; } - // Properties accessed by QWin32PrintEngine (QtPrintSupport) + // Properties accessed by QWin32PrintEngine (Qt Print Support) LOGFONT logFont() const { return m_logfont; } HFONT hFont() const { return hfont; } bool trueType() const { return ttf; } diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index af5f94870f..aac28c36dc 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -414,10 +414,10 @@ QPlatformOpenGLContext #ifdef Q_OS_WINCE // It's not easy to detect if we are running a QML application -// Let's try to do so by checking if the QtQuick module is loaded. +// Let's try to do so by checking if the Qt Quick module is loaded. inline bool isQMLApplication() { - // check if the QtQuick library is loaded + // check if the Qt Quick module is loaded #ifdef _DEBUG HMODULE handle = GetModuleHandle(L"Qt5Quick" QT_LIBINFIX L"d.dll"); #else diff --git a/src/sql/kernel/qsql.qdoc b/src/sql/kernel/qsql.qdoc index 64be479da7..7941f9cd58 100644 --- a/src/sql/kernel/qsql.qdoc +++ b/src/sql/kernel/qsql.qdoc @@ -29,7 +29,7 @@ \namespace QSql \inmodule QtSql \brief The QSql namespace contains miscellaneous identifiers used throughout - the Qt SQL library. + the Qt SQL module. \ingroup database diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index 0b8d2e3056..70bc6112c0 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -51,7 +51,7 @@ exported symbols. \row \li \b Self-contained - \li Qt Test requires only a few symbols from the Qt Core library + \li Qt Test requires only a few symbols from the Qt Core module for non-gui testing. \row \li \b {Rapid testing} @@ -653,7 +653,7 @@ \snippet tutorial3/testgui.cpp 0 - The only difference is that you need to include the QtGui class + The only difference is that you need to include the Qt GUI class definitions in addition to the QTest namespace. \snippet tutorial3/testgui.cpp 1 diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index a3d07da4a0..e83147776f 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -658,7 +658,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, This function splits the argument into one of those two forms. The three part form is the old form, which - was used before the creation of QtQuick 2 and Qt + was used before the creation of Qt Quick 2 and Qt Components. A is the QML equivalent of a C++ namespace. So this function splits \a arg on "::" and stores the parts in \a type, \a module, \a element, diff --git a/src/tools/qdoc/doc/qdoc-guide/qdoc-guide.qdoc b/src/tools/qdoc/doc/qdoc-guide/qdoc-guide.qdoc index 0c5845a794..d2a2a66beb 100644 --- a/src/tools/qdoc/doc/qdoc-guide/qdoc-guide.qdoc +++ b/src/tools/qdoc/doc/qdoc-guide/qdoc-guide.qdoc @@ -533,7 +533,7 @@ A QML type belongs to a \e module. The module may include all the related types for a platform or contain a certain version of \l{Qt Quick}. For example, the Qt Quick 2 \l{QML Elements} belong - to the QtQuick2 module while there is also a QtQuick1 module for the older + to the Qt Quick 2 module while there is also a Qt Quick 1 module for the older types introduced in Qt 4. QML modules allow grouping QML types. The \l{qmltype-command} @@ -575,7 +575,7 @@ point for readers to find instructional and reference materials that do, such as tutorials, examples and class documentation. An example of an overview might be a product page, such as a top level discussion of - QtQuick, individual modules, design principles, or tools. + Qt Quick, individual modules, design principles, or tools. To signify that a document is an article, you append the article keyword to the \\page command: diff --git a/src/tools/qdoc/doc/qdoc-manual.qdoc b/src/tools/qdoc/doc/qdoc-manual.qdoc index 6da996ecb3..f157f0a2d9 100644 --- a/src/tools/qdoc/doc/qdoc-manual.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual.qdoc @@ -5024,9 +5024,9 @@ / *! \module QtNetwork - \title QtNetwork Module + \title Qt Network Module - \brief The QtNetwork module offers classes that allow + \brief The Qt Network module offers classes that allow you to write TCP/IP clients and servers. The network module provides classes to make network @@ -5042,10 +5042,10 @@ \quotation \raw HTML -

QtNetwork Module

+

Qt Network Module

\endraw - The QtNetwork module offers classes that allow you to + The Qt Network module offers classes that allow you to write TCP/IP clients and servers.\l {module details} {More...} @@ -5083,7 +5083,7 @@

Detailed Description

- The QtNetwork module offers classes that allow you to + The Qt Network module offers classes that allow you to write TCP/IP clients and servers.

@@ -6897,7 +6897,7 @@ \endcode This ensures that the QDesignerTaskMenuExtension class is included - in the \c QtDesigner module, which means, for example, that the + in the Qt Designer module, which means, for example, that the class will appear on the list created by calling the \l {generatelist-command} {\\generatelist} command with the \c {{classesbymodule QtDesigner}} argument. diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index f4e45afe74..0fb9ccc97f 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -1287,7 +1287,7 @@ void InnerNode::removeChild(Node *child) } /*! - Find the module (QtCore, QtGui, etc.) to which the class belongs. + Find the module (Qt Core, Qt GUI, etc.) to which the class belongs. We do this by obtaining the full path to the header file's location and examine everything between "src/" and the filename. This is semi-dirty because we are assuming a particular directory structure. diff --git a/src/widgets/doc/src/qtwidgets.qdoc b/src/widgets/doc/src/qtwidgets.qdoc index fd0e7995b7..2e3403e9d9 100644 --- a/src/widgets/doc/src/qtwidgets.qdoc +++ b/src/widgets/doc/src/qtwidgets.qdoc @@ -30,7 +30,7 @@ \title Qt Widgets C++ Classes \ingroup modules - \brief The QtWidgets module extends Qt Gui with C++ widget functionality. + \brief The Qt Widgets module extends Qt GUI with C++ widget functionality. To include the definitions of the module's classes, use the following directive: diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 26274f1c7b..9c4901795d 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -90,7 +90,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C Qt provides a set of QStyle subclasses that emulate the native look of the different platforms supported by Qt (QWindowsStyle, QMacStyle, etc.). These styles are built into the - QtGui library, other styles can be made available using Qt's + Qt GUI module, other styles can be made available using Qt's plugin mechansim. Most functions for drawing style elements take four arguments: @@ -153,7 +153,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C Qt contains a set of QStyle subclasses that emulate the styles of the different platforms supported by Qt (QWindowsStyle, QMacStyle etc.). By default, these styles are built - into the QtGui library. Styles can also be made available as + into the Qt GUI module. Styles can also be made available as plugins. Qt's built-in widgets use QStyle to perform nearly all of their diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index c60c9a3f57..b8f7e7e1d4 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -381,7 +381,7 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect) efficient way to add reasonable online help facilities to applications, and to provide a basis for rich text editors. If you find the HTML support insufficient for your needs you may consider - the use of QtWebKit, which provides a full-featured web browser + the use of Qt WebKit, which provides a full-featured web browser widget. The shape of the mouse cursor on a QTextEdit is Qt::IBeamCursor by default. diff --git a/src/xml/doc/src/qtxml-index.qdoc b/src/xml/doc/src/qtxml-index.qdoc index 329dbc1c7f..2247ce5ace 100644 --- a/src/xml/doc/src/qtxml-index.qdoc +++ b/src/xml/doc/src/qtxml-index.qdoc @@ -27,8 +27,8 @@ /*! \page qtxml-index.html - \title Qt Xml - \brief The QtXml module provides C++ implementations of the SAX and DOM standards for XML. + \title Qt XML + \brief The Qt XML module provides C++ implementations of the SAX and DOM standards for XML. The module is not actively maintained anymore. Please use the QXmlStreamReader and QXmlStreamwriter classes in Qt Core instead. @@ -43,6 +43,6 @@ \snippet code/doc_src_qtxml.pro 1 - The \l{Qt Xml C++ classes} page gives an overview over the available classes + The \l{Qt XML C++ Classes} page gives an overview over the available classes int this module. */ diff --git a/src/xml/doc/src/qtxml.qdoc b/src/xml/doc/src/qtxml.qdoc index 62899b71a7..1647630d6d 100644 --- a/src/xml/doc/src/qtxml.qdoc +++ b/src/xml/doc/src/qtxml.qdoc @@ -27,11 +27,11 @@ /*! \module QtXml - \title Qt Xml C++ classes + \title Qt XML C++ Classes \ingroup modules \ingroup technology-apis - \brief The QtXml module provides C++ implementations of the SAX and DOM standards for XML. + \brief The Qt XML module provides C++ implementations of the SAX and DOM standards for XML. The module is not actively maintained anymore. Please use the \l{QXmlStreamReader} and \l{QXmlStreamWriter} classes in \l{Qt Core} instead. diff --git a/src/xml/doc/src/xml-processing.qdoc b/src/xml/doc/src/xml-processing.qdoc index 1e7c82da36..a1487a8c9e 100644 --- a/src/xml/doc/src/xml-processing.qdoc +++ b/src/xml/doc/src/xml-processing.qdoc @@ -45,7 +45,7 @@ In addition to core XML support, classes for higher level querying and manipulation of XML data are provided by the Qt XML Patterns - module. In the QtSvg module, the QSvgRenderer and QSvgGenerator + module. In the Qt SVG module, the QSvgRenderer and QSvgGenerator classes can read and write a subset of SVG, an XML-based file format. Qt also provides helper functions that may be useful to those working with XML and XHTML: see Qt::escape() and -- cgit v1.2.3 From 6f1f8934938f0b79a30b034093633aa336da1323 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Fri, 25 Jan 2013 18:05:02 +0200 Subject: Fix XCB plugin compilation without accessibility Change-Id: Ic2bee5b5c20505a866656575b5f5fb853cea4aae Reviewed-by: Frederik Gladhorn Reviewed-by: Laszlo Papp --- src/plugins/platforms/xcb/qxcbintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 9fe6e4253b..1840dd1ce5 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -114,7 +114,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters) m_fontDatabase.reset(new QGenericUnixFontDatabase()); m_inputContext.reset(QPlatformInputContextFactory::create()); -#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE +#if !defined(QT_NO_ACCESSIBILITY) && !defined(QT_NO_ACCESSIBILITY_ATSPI_BRIDGE) m_accessibility.reset(new QSpiAccessibleBridge()); #endif } -- cgit v1.2.3 From f210a8593450049fc366098cab040daea10ca758 Mon Sep 17 00:00:00 2001 From: Rick Stockton Date: Thu, 20 Dec 2012 20:38:45 -0800 Subject: cocoa: Fix Mouse Event tracking of button status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Within qcocoahelpers, make function cocoaButton2QtButton() handle all button numbers. Within qnsview, call the function in several places (eliminating duplicate, inefficient code). Task-number: QTBUG-28567 Change-Id: Ibae2ae4e8a881b825a8862afb82aa80437751111 Reviewed-by: Morten Johan Sørvig Reviewed-by: Rick Stockton --- src/plugins/platforms/cocoa/qcocoahelpers.mm | 19 ++--- src/plugins/platforms/cocoa/qnsview.mm | 113 +++------------------------ 2 files changed, 21 insertions(+), 111 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index c6d6e35794..0c5d26054c 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -623,20 +623,17 @@ CGFloat qt_mac_get_scalefactor() Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) { - switch (buttonNum) { - case 0: + if (buttonNum == 0) return Qt::LeftButton; - case 1: + if (buttonNum == 1) return Qt::RightButton; - case 2: - return Qt::MidButton; - case 3: - return Qt::XButton1; - case 4: - return Qt::XButton2; - default: - return Qt::NoButton; + if (buttonNum == 2) + return Qt::MiddleButton; + if (buttonNum >= 3 && buttonNum <= 31) { // handle XButton1 and higher via logical shift + return Qt::MouseButton(uint(Qt::MiddleButton) << (buttonNum - 3)); } + // else error: buttonNum too high, or negative + return Qt::NoButton; } bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret) { diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index a0e76cb452..b822061feb 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -403,14 +403,19 @@ static QTouchDevice *touchDevice = 0; m_buttons |= Qt::LeftButton; break; case NSLeftMouseUp: - m_buttons &= QFlag(~int(Qt::LeftButton)); + m_buttons &= ~Qt::LeftButton; break; case NSRightMouseDown: m_buttons |= Qt::RightButton; break; case NSRightMouseUp: - m_buttons &= QFlag(~int(Qt::RightButton)); + m_buttons &= ~Qt::RightButton; break; + case NSOtherMouseDown: + m_buttons |= cocoaButton2QtButton([theEvent buttonNumber]); + break; + case NSOtherMouseUp: + m_buttons &= ~cocoaButton2QtButton([theEvent buttonNumber]); default: break; } @@ -465,10 +470,10 @@ static QTouchDevice *touchDevice = 0; - (void)mouseUp:(NSEvent *)theEvent { if (m_sendUpAsRightButton) { - m_buttons &= QFlag(~int(Qt::RightButton)); + m_buttons &= ~Qt::RightButton; m_sendUpAsRightButton = false; } else { - m_buttons &= QFlag(~int(Qt::LeftButton)); + m_buttons &= ~Qt::LeftButton; } [self handleMouseEvent:theEvent]; } @@ -539,59 +544,13 @@ static QTouchDevice *touchDevice = 0; - (void)rightMouseUp:(NSEvent *)theEvent { - m_buttons &= QFlag(~int(Qt::RightButton)); + m_buttons &= ~Qt::RightButton; [self handleMouseEvent:theEvent]; } - (void)otherMouseDown:(NSEvent *)theEvent { - switch ([theEvent buttonNumber]) { - case 3: - m_buttons |= Qt::MiddleButton; - break; - case 4: - m_buttons |= Qt::ExtraButton1; // AKA Qt::BackButton - break; - case 5: - m_buttons |= Qt::ExtraButton2; // AKA Qt::ForwardButton - break; - case 6: - m_buttons |= Qt::ExtraButton3; - break; - case 7: - m_buttons |= Qt::ExtraButton4; - break; - case 8: - m_buttons |= Qt::ExtraButton5; - break; - case 9: - m_buttons |= Qt::ExtraButton6; - break; - case 10: - m_buttons |= Qt::ExtraButton7; - break; - case 11: - m_buttons |= Qt::ExtraButton8; - break; - case 12: - m_buttons |= Qt::ExtraButton9; - break; - case 13: - m_buttons |= Qt::ExtraButton10; - break; - case 14: - m_buttons |= Qt::ExtraButton11; - break; - case 15: - m_buttons |= Qt::ExtraButton12; - break; - case 16: - m_buttons |= Qt::ExtraButton13; - break; - default: - m_buttons |= Qt::MiddleButton; - break; - } + m_buttons |= cocoaButton2QtButton([theEvent buttonNumber]); [self handleMouseEvent:theEvent]; } @@ -604,53 +563,7 @@ static QTouchDevice *touchDevice = 0; - (void)otherMouseUp:(NSEvent *)theEvent { - switch ([theEvent buttonNumber]) { - case 3: - m_buttons &= QFlag(~int(Qt::MiddleButton)); - break; - case 4: - m_buttons &= QFlag(~int(Qt::ExtraButton1)); // AKA Qt::BackButton - break; - case 5: - m_buttons &= QFlag(~int(Qt::ExtraButton2)); // AKA Qt::ForwardButton - break; - case 6: - m_buttons &= QFlag(~int(Qt::ExtraButton3)); - break; - case 7: - m_buttons &= QFlag(~int(Qt::ExtraButton4)); - break; - case 8: - m_buttons &= QFlag(~int(Qt::ExtraButton5)); - break; - case 9: - m_buttons &= QFlag(~int(Qt::ExtraButton6)); - break; - case 10: - m_buttons &= QFlag(~int(Qt::ExtraButton7)); - break; - case 11: - m_buttons &= QFlag(~int(Qt::ExtraButton8)); - break; - case 12: - m_buttons &= QFlag(~int(Qt::ExtraButton9)); - break; - case 13: - m_buttons &= QFlag(~int(Qt::ExtraButton10)); - break; - case 14: - m_buttons &= QFlag(~int(Qt::ExtraButton11)); - break; - case 15: - m_buttons &= QFlag(~int(Qt::ExtraButton12)); - break; - case 16: - m_buttons &= QFlag(~int(Qt::ExtraButton13)); - break; - default: - m_buttons &= QFlag(~int(Qt::MiddleButton)); - break; - } + m_buttons &= ~cocoaButton2QtButton([theEvent buttonNumber]); [self handleMouseEvent:theEvent]; } @@ -1242,7 +1155,7 @@ static QTouchDevice *touchDevice = 0; // keep our state, and QGuiApplication state (buttons member) in-sync, // or future mouse events will be processed incorrectly - m_buttons &= QFlag(~int(Qt::LeftButton)); + m_buttons &= ~Qt::LeftButton; NSPoint windowPoint = [self convertPoint: point fromView: nil]; QPoint qtWindowPoint(windowPoint.x, windowPoint.y); -- cgit v1.2.3 From 8a0a09f6d1cbeba0a88402c4318b1caaefa90d06 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 16 Jan 2013 14:07:50 +0100 Subject: Doc: Add a note for QDesktopServices about deprecated functions Add a note in QDesktopServices class reference about storageLocation() and displayName() functions being deprecated since Qt 5. Task-number: QTBUG-27869 Change-Id: I739771fef15534823071beabd62aa7b4e7b34cc0 Reviewed-by: Jerome Pasion Reviewed-by: David Faure (KDE) --- src/gui/util/qdesktopservices.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 61f9393dfb..97847af8ea 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -143,7 +143,10 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) same argument, and it will try to open the URL using the appropriate mechanism for the user's desktop environment. - \sa QSystemTrayIcon, QProcess + \note Since Qt 5, storageLocation() and displayName() are replaced by functionality + provided by the QStandardPaths class. + + \sa QSystemTrayIcon, QProcess, QStandardPaths */ /*! -- cgit v1.2.3 From add16725a34f7d249c9e93d9ecbfc0c7cc488d80 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 18:26:09 -0800 Subject: Don't use the union trick to do unlawful casts GCC 4.7 is printing this (bogus) warning: qobject.h:166:15: warning: 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags]::' declared with greater visibility than the type of its field 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags]::::typedList' [-Wattributes] Change-Id: I2d1c365e3191f3a5c7b2241deb35f0ae47d79afc Reviewed-by: Olivier Goffart Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/kernel/qobject.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 632d97ca65..a2d7dcd7ef 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -163,12 +163,8 @@ public: inline QList findChildren(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const { QList list; - union { - QList *typedList; - QList *voidList; - } u; - u.typedList = &list; - qt_qFindChildren_helper(this, aName, reinterpret_cast(0)->staticMetaObject, u.voidList, options); + qt_qFindChildren_helper(this, aName, reinterpret_cast(0)->staticMetaObject, + reinterpret_cast *>(&list), options); return list; } @@ -177,12 +173,8 @@ public: inline QList findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const { QList list; - union { - QList *typedList; - QList *voidList; - } u; - u.typedList = &list; - qt_qFindChildren_helper(this, re, reinterpret_cast(0)->staticMetaObject, u.voidList, options); + qt_qFindChildren_helper(this, re, reinterpret_cast(0)->staticMetaObject, + reinterpret_cast *>(&list), options); return list; } #endif @@ -192,12 +184,8 @@ public: inline QList findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const { QList list; - union { - QList *typedList; - QList *voidList; - } u; - u.typedList = &list; - qt_qFindChildren_helper(this, re, reinterpret_cast(0)->staticMetaObject, u.voidList, options); + qt_qFindChildren_helper(this, re, reinterpret_cast(0)->staticMetaObject, + reinterpret_cast *>(&list), options); return list; } #endif -- cgit v1.2.3 From 0b68fc019bbeedb8b6b59bbbdf31f66596b6d5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 2 Jan 2013 20:11:41 +0100 Subject: Cocoa: Correct mime handler prioritization. According to the documentation recently added mime type converters should take precedence over previously added converters. Make it so. Task-number: QTBUG-25951 Change-Id: Ic23ca7cbb93a98711d762b1ef0e0dd2aa1ceaeda Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qmacmime.mm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qmacmime.mm b/src/plugins/platforms/cocoa/qmacmime.mm index 339559b6a6..89539de331 100644 --- a/src/plugins/platforms/cocoa/qmacmime.mm +++ b/src/plugins/platforms/cocoa/qmacmime.mm @@ -68,7 +68,10 @@ Q_GLOBAL_STATIC(QStringList, globalDraggedTypesList) void qt_mac_addToGlobalMimeList(QMacPasteboardMime *macMime) { - globalMimeList()->append(macMime); + // globalMimeList is in decreasing priority order. Recently added + // converters take prioity over previously added converters: prepend + // to the list. + globalMimeList()->prepend(macMime); } void qt_mac_removeFromGlobalMimeList(QMacPasteboardMime *macMime) @@ -810,6 +813,10 @@ QList QMacPasteboardMimeVCard::convertFromMime(const QString &mime, void QMacPasteboardMime::initializeMimeTypes() { if (globalMimeList()->isEmpty()) { + // Create QMacPasteboardMimeAny first to put it at the end of globalMimeList + // with lowest priority. (the constructor prepends to the list) + new QMacPasteboardMimeAny; + //standard types that we wrap new QMacPasteboardMimeTiff; new QMacPasteboardMimeUnicodeText; @@ -819,8 +826,6 @@ void QMacPasteboardMime::initializeMimeTypes() new QMacPasteboardMimeUrl; new QMacPasteboardMimeTypeName; new QMacPasteboardMimeVCard; - //make sure our "non-standard" types are always last! --Sam - new QMacPasteboardMimeAny; } } -- cgit v1.2.3