Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
This commit is contained in:
Frederik Gladhorn 2013-01-28 11:07:32 +01:00
commit 02ba93dd3d
107 changed files with 369 additions and 446 deletions

32
configure vendored
View File

@ -3102,7 +3102,7 @@ Configure options:
+ -accessibility ..... Compile Accessibility support. + -accessibility ..... Compile Accessibility support.
-no-sql-<driver> ... Disable SQL <driver> entirely. -no-sql-<driver> ... Disable SQL <driver> entirely.
-qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default -qt-sql-<driver> ... Enable a SQL <driver> in the Qt SQL module, by default
none are turned on. none are turned on.
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
at run time. at run time.
@ -3188,11 +3188,11 @@ Additional options:
($QT_DEFAULT_BUILD_PARTS) ($QT_DEFAULT_BUILD_PARTS)
-nomake <part> ..... Exclude part from the list of parts to be built. -nomake <part> ..... Exclude part from the list of parts to be built.
-no-gui ............ Don't build the QtGui library and dependencies. -no-gui ............ Don't build the Qt GUI module and dependencies.
+ -gui ............... Build the QtGui library and dependencies. + -gui ............... Build the Qt GUI module and dependencies.
-no-widgets ........ Don't build the QtWidgets library and dependencies. -no-widgets ........ Don't build the Qt Widgets module and dependencies.
+ -widgets ........... Build the QtWidgets library and dependencies. + -widgets ........... Build the Qt Widgets module and dependencies.
-R <string> ........ Add an explicit runtime library path to the Qt -R <string> ........ Add an explicit runtime library path to the Qt
libraries. libraries.
@ -3234,9 +3234,9 @@ Additional options:
$PHN -no-pch ............ Do not use precompiled header support. $PHN -no-pch ............ Do not use precompiled header support.
$PHY -pch ............... Use precompiled header support. $PHY -pch ............... Use precompiled header support.
$DBN -no-dbus ........... Do not compile the QtDBus module. $DBN -no-dbus ........... Do not compile the Qt D-Bus module.
$DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1. $DBY -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1.
-dbus-linked ....... Compile the QtDBus module and link to libdbus-1. -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1.
-reduce-relocations ..... Reduce relocations in the libraries through extra -reduce-relocations ..... Reduce relocations in the libraries through extra
linker optimizations (Qt/X11 and Qt for Embedded Linux only; linker optimizations (Qt/X11 and Qt for Embedded Linux only;
@ -4437,7 +4437,7 @@ if [ "$CFG_DBUS" != "no" ]; then
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
# CFG_DBUS is "yes" or "linked" here # CFG_DBUS is "yes" or "linked" here
echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found." echo "The Qt D-Bus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
echo " Turn on verbose messaging (-v) to $0 to see the final report." echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue" echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue." echo " switch (-continue) to $0 to continue."
@ -5676,7 +5676,7 @@ EOF
esac esac
if [ "$CFG_GUI" = "no" ]; then if [ "$CFG_GUI" = "no" ]; then
# WebKit requires QtGui # WebKit requires Qt GUI
canBuildWebKit="no" canBuildWebKit="no"
fi fi
@ -6230,12 +6230,12 @@ if [ -n "$PKG_CONFIG" ]; then
else else
echo "pkg-config ............. no" echo "pkg-config ............. no"
fi fi
[ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no" [ "$CFG_DBUS" = "no" ] && echo "Qt D-Bus module ........ no"
[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)" [ "$CFG_DBUS" = "yes" ] && echo "Qt D-Bus module ........ yes (run-time)"
[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module .......... yes (linked)" [ "$CFG_DBUS" = "linked" ] && echo "Qt D-Bus module ........ yes (linked)"
echo "QtConcurrent code ...... $CFG_CONCURRENT" echo "Qt Concurrent code ..... $CFG_CONCURRENT"
echo "QtGui module ........... $CFG_GUI" echo "Qt GUI module .......... $CFG_GUI"
echo "QtWidgets module ....... $CFG_WIDGETS" echo "Qt Widgets module ...... $CFG_WIDGETS"
if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then if [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore" echo "JavaScriptCore JIT ..... To be decided by JavaScriptCore"
else else

View File

@ -54,7 +54,7 @@
\snippet rasterwindow/rasterwindow.h 1 \snippet rasterwindow/rasterwindow.h 1
We first start by including the QtGui headers. This means we We first start by including the \c <QtGui> header. This means we
can use all classes in the Qt GUI module. Classes can also be can use all classes in the Qt GUI module. Classes can also be
included individually if that is preferred. included individually if that is preferred.

View File

@ -38,7 +38,7 @@
The example also shows how to add as well as remove data from both The example also shows how to add as well as remove data from both
the database and the associated XML file using the API provided by the database and the associated XML file using the API provided by
the QtSql and QtXml modules, respectively. the Qt SQL and Qt XML modules, respectively.
\image masterdetail-example.png \image masterdetail-example.png
*/ */

View File

@ -424,6 +424,6 @@ void MainWindow::about()
"are kept in a database, while each album's tracks are stored " "are kept in a database, while each album's tracks are stored "
"in an XML file. </p><p>The example also shows how to add as " "in an XML file. </p><p>The example also shows how to add as "
"well as remove data from both the database and the " "well as remove data from both the database and the "
"associated XML file using the API provided by the QtSql and " "associated XML file using the API provided by the Qt SQL and "
"QtXml modules, respectively.</p>")); "Qt XML modules, respectively.</p>"));
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -76,8 +76,8 @@
\snippet mainwindows/application/mainwindow.cpp 0 \snippet mainwindows/application/mainwindow.cpp 0
We start by including \c <QtGui>, a header file that contains the We start by including \c <QtGui>, a header file that contains the
definition of all classes in the \l QtCore and \l QtGui definition of all classes in the Qt Core and Qt GUI
libraries. This saves us from the trouble of having to include modules. This saves us from the trouble of having to include
every class individually. We also include \c mainwindow.h. every class individually. We also include \c mainwindow.h.
You might wonder why we don't include \c <QtGui> in \c You might wonder why we don't include \c <QtGui> in \c

View File

@ -28,7 +28,7 @@
/*! /*!
\example tools/completer \example tools/completer
\title Completer Example \title Completer Example
\ingroup example-widgets-tools \ingroup examples-widgets-tools
\brief The Completer example shows how to provide string-completion facilities \brief The Completer example shows how to provide string-completion facilities
for an input widget based on data provided by a model. for an input widget based on data provided by a model.

View File

@ -56,8 +56,8 @@
\snippet mainwindows/dockwidgets/mainwindow.cpp 0 \snippet mainwindows/dockwidgets/mainwindow.cpp 0
We start by including \c <QtGui>, a header file that contains the We start by including \c <QtGui>, a header file that contains the
definition of all classes in the \l QtCore and \l QtGui definition of all classes in the Qt Core and Qt GUI
libraries. This saves us from having to include modules. This saves us from having to include
every class individually and is especially convenient if we add new every class individually and is especially convenient if we add new
widgets. We also include \c mainwindow.h. widgets. We also include \c mainwindow.h.

View File

@ -28,7 +28,7 @@
/*! /*!
\example tools/regexp \example tools/regexp
\title Regular Expressions Example \title Regular Expressions Example
\ingroup example-widgets-tools \ingroup examples-widgets-tools
\brief The Regular Expressions (RegExp) example shows how regular expressions in Qt are \brief The Regular Expressions (RegExp) example shows how regular expressions in Qt are
applied to text by providing an environment in which new regular expressions can be applied to text by providing an environment in which new regular expressions can be

View File

@ -37,7 +37,7 @@
A style in Qt is a subclass of QStyle or of one of its A style in Qt is a subclass of QStyle or of one of its
subclasses. Styles perform drawing on behalf of widgets. Qt subclasses. Styles perform drawing on behalf of widgets. Qt
provides a whole range of predefined styles, either built into provides a whole range of predefined styles, either built into
the \l QtWidgets library or found in plugins. Styles are usually the Qt Widgets module or found in plugins. Styles are usually
customized by subclassing QProxyStyle and reimplementing a few customized by subclassing QProxyStyle and reimplementing a few
virtual functions. While QProxyStyle provides a transparent way virtual functions. While QProxyStyle provides a transparent way
to customize either a specific style or the appropriate platform's to customize either a specific style or the appropriate platform's

View File

@ -25,44 +25,43 @@ defineReplace(cmakeModuleList) {
return ($$join(out, ";")) return ($$join(out, ";"))
} }
defineReplace(cmakeRelativePath) {
path = $$relative_path($$1, $$2)
return($$replace(path, ([^/])$, \\1/))
}
CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE}) CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.)) CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.))
CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::") CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
!isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}" !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"
CMAKE_QT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]/ CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
CMAKE_QT_INSTALL_PREFIX_ESCAPED = "^$$re_escape($$CMAKE_QT_INSTALL_PREFIX)" contains(CMAKE_INCLUDE_DIR, "^\.\.") {
CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
contains(CMAKE_INCLUDE_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
CMAKE_INCLUDE_DIR = $$replace(CMAKE_INCLUDE_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
} else {
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
} }
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
contains(CMAKE_LIB_DIR, "^\.\.") {
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
contains(CMAKE_LIB_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { CMAKE_LIB_DIR_IS_ABSOLUTE = True
CMAKE_LIB_DIR = $$replace(CMAKE_LIB_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", ) } else {
CMAKE_RELATIVE_INSTALL_DIR = $$replace(CMAKE_LIB_DIR, "[^/]+", ..) CMAKE_RELATIVE_INSTALL_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
# We need to go up another two levels because the CMake files are # We need to go up another two levels because the CMake files are
# installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME} # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_DIR}../../" CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_DIR}../../"
} else {
CMAKE_LIB_DIR_IS_ABSOLUTE = True
} }
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
contains(CMAKE_BIN_DIR, "^\.\.") {
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
CMAKE_BIN_DIR = $$replace(CMAKE_BIN_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
} else {
CMAKE_BIN_DIR_IS_ABSOLUTE = True CMAKE_BIN_DIR_IS_ABSOLUTE = True
} }
CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ # For the mkspecs CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX])
contains(CMAKE_ARCHDATA_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { contains(CMAKE_ARCHDATA_DIR, "^\.\.") { # For the mkspecs
CMAKE_ARCHDATA_DIR = $$replace(CMAKE_ARCHDATA_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", ) CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/
} else {
CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True
} }

View File

@ -3285,4 +3285,25 @@ MakefileGenerator::writePkgConfigFile()
t << endl; t << endl;
} }
QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QString &src, const QString &dst)
{
QString ret;
if (project->isEmpty(replace_rule)
|| project->isActiveConfig("no_sed_meta_install")
|| project->isEmpty("QMAKE_STREAM_EDITOR")) {
ret += "-$(INSTALL_FILE) \"" + src + "\" \"" + dst + "\"";
} else {
ret += "-$(SED)";
const ProStringList &replace_rules = project->values(replace_rule);
for (int r = 0; r < replace_rules.size(); ++r) {
const ProString match = project->first(ProKey(replace_rules.at(r) + ".match")),
replace = project->first(ProKey(replace_rules.at(r) + ".replace"));
if (!match.isEmpty() /*&& match != replace*/)
ret += " -e \"s," + match + "," + replace + ",g\"";
}
ret += " \"" + src + "\" >\"" + dst + "\"";
}
return ret;
}
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -248,6 +248,8 @@ protected:
inline QStringList fileFixify(const QStringList& files, FileFixifyType fix, bool canon=true) const inline QStringList fileFixify(const QStringList& files, FileFixifyType fix, bool canon=true) const
{ return fileFixify(files, QString(), QString(), fix, canon); } { return fileFixify(files, QString(), QString(), fix, canon); }
QString installMetaFile(const ProKey &replace_rule, const QString &src, const QString &dst);
public: public:
MakefileGenerator(); MakefileGenerator();
virtual ~MakefileGenerator(); virtual ~MakefileGenerator();

View File

@ -868,32 +868,15 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
if(!uninst.isEmpty()) if(!uninst.isEmpty())
uninst.append("\n\t"); uninst.append("\n\t");
uninst.append("-$(DEL_FILE) \"" + dst_meta + "\""); uninst.append("-$(DEL_FILE) \"" + dst_meta + "\"");
const ProKey replace_rule("QMAKE_" + type.toUpper() + "_INSTALL_REPLACE");
const QString dst_meta_dir = fileInfo(dst_meta).path(); const QString dst_meta_dir = fileInfo(dst_meta).path();
if(!dst_meta_dir.isEmpty()) { if(!dst_meta_dir.isEmpty()) {
if(!ret.isEmpty()) if(!ret.isEmpty())
ret += "\n\t"; ret += "\n\t";
ret += mkdir_p_asstring(dst_meta_dir, true); ret += mkdir_p_asstring(dst_meta_dir, true);
} }
QString install_meta = "$(INSTALL_FILE) \"" + src_meta + "\" \"" + dst_meta + "\"";
if(project->isEmpty(replace_rule) || project->isActiveConfig("no_sed_meta_install")) {
if (!ret.isEmpty()) if (!ret.isEmpty())
ret += "\n\t"; ret += "\n\t";
ret += "-" + install_meta; ret += installMetaFile(ProKey("QMAKE_" + type.toUpper() + "_INSTALL_REPLACE"), src_meta, dst_meta);
} else {
if(!ret.isEmpty())
ret += "\n\t";
ret += "-$(SED)";
const ProStringList &replace_rules = project->values(replace_rule);
for(int r = 0; r < replace_rules.size(); ++r) {
const ProString &match = project->first(ProKey(replace_rules.at(r) + ".match")),
&replace = project->first(ProKey(replace_rules.at(r) + ".replace"));
if(!match.isEmpty() /*&& match != replace*/)
ret += " -e \"s," + match + "," + replace + ",g\"";
}
ret += " \"" + src_meta + "\" >\"" + dst_meta + "\"";
//ret += " || " + install_meta;
}
} }
} }
} }

View File

@ -476,11 +476,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
<< attrTag("Condition", condition) << attrTag("Condition", condition)
<< valueTag(tool.Configuration.PrimaryOutput); << valueTag(tool.Configuration.PrimaryOutput);
} }
if (!tool.Configuration.PrimaryOutputExtension.isEmpty()) {
xml<< tag("TargetExt")
<< attrTag("Condition", condition)
<< valueTag(tool.Configuration.PrimaryOutputExtension);
}
if ( tool.Configuration.linker.IgnoreImportLibrary != unset) { if ( tool.Configuration.linker.IgnoreImportLibrary != unset) {
xml<< tag("IgnoreImportLibrary") xml<< tag("IgnoreImportLibrary")
<< attrTag("Condition", condition) << attrTag("Condition", condition)
@ -681,11 +677,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< attrTag("Condition", condition) << attrTag("Condition", condition)
<< valueTag(config.PrimaryOutput); << valueTag(config.PrimaryOutput);
} }
if (!config.PrimaryOutputExtension.isEmpty()) {
xml << tag("TargetExt")
<< attrTag("Condition", condition)
<< valueTag(config.PrimaryOutputExtension);
}
if (config.linker.IgnoreImportLibrary != unset) { if (config.linker.IgnoreImportLibrary != unset) {
xml << tag("IgnoreImportLibrary") xml << tag("IgnoreImportLibrary")
<< attrTag("Condition", condition) << attrTag("Condition", condition)

View File

@ -860,7 +860,6 @@ public:
QString ConfigurationName; QString ConfigurationName;
QString OutputDirectory; QString OutputDirectory;
QString PrimaryOutput; QString PrimaryOutput;
QString PrimaryOutputExtension;
QString ProgramDatabase; QString ProgramDatabase;
triState RegisterOutput; triState RegisterOutput;
useOfATL UseOfATL; useOfATL UseOfATL;

View File

@ -944,7 +944,6 @@ void VcprojGenerator::initConfiguration()
conf.PrimaryOutput = project->first("TARGET").toQString(); conf.PrimaryOutput = project->first("TARGET").toQString();
if ( !conf.PrimaryOutput.isEmpty() && !project->first("TARGET_VERSION_EXT").isEmpty() && project->isActiveConfig("shared")) if ( !conf.PrimaryOutput.isEmpty() && !project->first("TARGET_VERSION_EXT").isEmpty() && project->isActiveConfig("shared"))
conf.PrimaryOutput.append(project->first("TARGET_VERSION_EXT").toQString()); conf.PrimaryOutput.append(project->first("TARGET_VERSION_EXT").toQString());
conf.PrimaryOutputExtension = project->first("TARGET_EXT").toQString();
} }
conf.Name = project->values("BUILD_NAME").join(' '); conf.Name = project->values("BUILD_NAME").join(' ');

View File

@ -392,7 +392,7 @@ void Win32MakefileGenerator::processRcFileVar()
QByteArray rcString; QByteArray rcString;
QTextStream ts(&rcString, QFile::WriteOnly); QTextStream ts(&rcString, QFile::WriteOnly);
QStringList vers = project->first("VERSION").toQString().split("."); QStringList vers = project->first("VERSION").toQString().split(".", QString::SkipEmptyParts);
for (int i = vers.size(); i < 4; i++) for (int i = vers.size(); i < 4; i++)
vers += "0"; vers += "0";
QString versionString = vers.join('.'); QString versionString = vers.join('.');
@ -851,22 +851,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
} }
if(!ret.isEmpty()) if(!ret.isEmpty())
ret += "\n\t"; ret += "\n\t";
const ProKey replace_rule("QMAKE_PKGCONFIG_INSTALL_REPLACE"); ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true), dst_pc);
if (project->isEmpty(replace_rule)
|| project->isActiveConfig("no_sed_meta_install")
|| project->isEmpty("QMAKE_STREAM_EDITOR")) {
ret += "-$(INSTALL_FILE) \"" + pkgConfigFileName(true) + "\" \"" + dst_pc + "\"";
} else {
ret += "-$(SED)";
const ProStringList &replace_rules = project->values(replace_rule);
for (int r = 0; r < replace_rules.size(); ++r) {
const ProString match = project->first(ProKey(replace_rules.at(r) + ".match")),
replace = project->first(ProKey(replace_rules.at(r) + ".replace"));
if (!match.isEmpty() /*&& match != replace*/)
ret += " -e \"s," + match + "," + replace + ",g\"";
}
ret += " \"" + pkgConfigFileName(true) + "\" >\"" + dst_pc + "\"";
}
if(!uninst.isEmpty()) if(!uninst.isEmpty())
uninst.append("\n\t"); uninst.append("\n\t");
uninst.append("-$(DEL_FILE) \"" + dst_pc + "\""); uninst.append("-$(DEL_FILE) \"" + dst_pc + "\"");

View File

@ -381,7 +381,7 @@
#define QT_NO_CONTEXTMENU #define QT_NO_CONTEXTMENU
#endif #endif
// QtDBus module // Qt D-Bus module
#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_DOM)) #if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_DOM))
#define QT_NO_DBUS #define QT_NO_DBUS
#endif #endif

View File

@ -1096,6 +1096,6 @@ Feature: DBUS
Description: Provides classes for D-Bus. Description: Provides classes for D-Bus.
Section: D-Bus Section: D-Bus
Requires: PROPERTIES DOM Requires: PROPERTIES DOM
Name: QtDBus module Name: Qt D-Bus module
SeeAlso: ??? SeeAlso: ???

View File

@ -633,7 +633,7 @@ bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Per
QString QFileSystemEngine::homePath() QString QFileSystemEngine::homePath()
{ {
QString home = QFile::decodeName(qgetenv("HOME")); QString home = QFile::decodeName(qgetenv("HOME"));
if (home.isNull()) if (home.isEmpty())
home = rootPath(); home = rootPath();
return QDir::cleanPath(home); return QDir::cleanPath(home);
} }

View File

@ -2092,9 +2092,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\section1 QVariant and GUI Types \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 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. \c toColor(), \c toImage(), or \c toPixmap() functions in QVariant.
Instead, you can use the QVariant::value() or the qVariantValue() Instead, you can use the QVariant::value() or the qVariantValue()

View File

@ -2804,7 +2804,7 @@ QVariant QMetaProperty::read(const QObject *object) const
} }
// the status variable is changed by qt_metacall to indicate what it did // 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 // upon. Don't change it without looking into QDBusAbstractInterface first
// -1 (unchanged): normal qt_metacall, result stored in argv[0] // -1 (unchanged): normal qt_metacall, result stored in argv[0]
// changed: result stored directly in value // 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 // 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 // upon. Don't change it without looking into QDBusAbstractInterface first
// -1 (unchanged): normal qt_metacall, result stored in argv[0] // -1 (unchanged): normal qt_metacall, result stored in argv[0]
// changed: result stored directly in value, return the value of status // changed: result stored directly in value, return the value of status

View File

@ -452,8 +452,8 @@ bool QMimeData::hasHtml() const
Returns a QVariant storing a QImage if the object can return an Returns a QVariant storing a QImage if the object can return an
image; otherwise returns a null variant. image; otherwise returns a null variant.
A QVariant is used because QMimeData belongs to the \l QtCore A QVariant is used because QMimeData belongs to the Qt Core
library, whereas QImage belongs to \l QtGui. To convert the module, whereas QImage belongs to Qt GUI. To convert the
QVariant to a QImage, simply use qvariant_cast(). For example: QVariant to a QImage, simply use qvariant_cast(). For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 5 \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. Sets the data in the object to the given \a image.
A QVariant is used because QMimeData belongs to the \l QtCore A QVariant is used because QMimeData belongs to the Qt Core
library, whereas QImage belongs to \l QtGui. The conversion module, whereas QImage belongs to Qt GUI. The conversion
from QImage to QVariant is implicit. For example: from QImage to QVariant is implicit. For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 6 \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 color (MIME type \c application/x-color); otherwise returns a
null variant. null variant.
A QVariant is used because QMimeData belongs to the \l QtCore A QVariant is used because QMimeData belongs to the Qt Core
library, whereas QColor belongs to \l QtGui. To convert the module, whereas QColor belongs to Qt GUI. To convert the
QVariant to a QColor, simply use qvariant_cast(). For example: QVariant to a QColor, simply use qvariant_cast(). For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 7 \snippet code/src_corelib_kernel_qmimedata.cpp 7

View File

@ -163,12 +163,8 @@ public:
inline QList<T> findChildren(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const inline QList<T> findChildren(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{ {
QList<T> list; QList<T> list;
union { qt_qFindChildren_helper(this, aName, reinterpret_cast<T>(0)->staticMetaObject,
QList<T> *typedList; reinterpret_cast<QList<void *> *>(&list), options);
QList<void *> *voidList;
} u;
u.typedList = &list;
qt_qFindChildren_helper(this, aName, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
return list; return list;
} }
@ -177,12 +173,8 @@ public:
inline QList<T> findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const inline QList<T> findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{ {
QList<T> list; QList<T> list;
union { qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject,
QList<T> *typedList; reinterpret_cast<QList<void *> *>(&list), options);
QList<void *> *voidList;
} u;
u.typedList = &list;
qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
return list; return list;
} }
#endif #endif
@ -192,12 +184,8 @@ public:
inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{ {
QList<T> list; QList<T> list;
union { qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject,
QList<T> *typedList; reinterpret_cast<QList<void *> *>(&list), options);
QList<void *> *voidList;
} u;
u.typedList = &list;
qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
return list; return list;
} }
#endif #endif

View File

@ -949,8 +949,8 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names
\section1 A Note on GUI Types \section1 A Note on GUI Types
Because QVariant is part of the QtCore library, it cannot provide Because QVariant is part of the Qt Core module, it cannot provide
conversion functions to data types defined in QtGui, such as conversion functions to data types defined in Qt GUI, such as
QColor, QImage, and QPixmap. In other words, there is no \c QColor, QImage, and QPixmap. In other words, there is no \c
toColor() function. Instead, you can use the QVariant::value() or toColor() function. Instead, you can use the QVariant::value() or
the qvariant_cast() template function. For example: the qvariant_cast() template function. For example:

View File

@ -390,7 +390,7 @@ void qDetectCpuFeatures()
// For that reason, simply forego the CPUID check at all and return the set // 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 // 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 // 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). // (it's the user's fault for using a broken compiler).
// //
// This also disables the runtime checking that the processor actually // This also disables the runtime checking that the processor actually

View File

@ -27,7 +27,7 @@
/*! /*!
\page usingadaptors.html \page usingadaptors.html
\title Using QtDBus Adaptors \title Using Qt D-Bus Adaptors
\brief How to create and use DBus adaptors in Qt. \brief How to create and use DBus adaptors in Qt.
\ingroup best-practices \ingroup best-practices
@ -56,7 +56,7 @@
of the MethodCall type. (See \l {Declaring Slots in D-Bus Adaptors} for more 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. information). Signals in the class will be automatically relayed over D-Bus.
However, not all types are allowed signals or slots' parameter lists: see 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 Also, any property declared with Q_PROPERTY will be automatically exposed
over the Properties interface on D-Bus. Since the QObject property system over the Properties interface on D-Bus. Since the QObject property system
@ -67,7 +67,7 @@
\list \list
\li \l{Declaring Slots in D-Bus Adaptors} \li \l{Declaring Slots in D-Bus Adaptors}
\li \l{Declaring Signals 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} \li \l{D-Bus Adaptor Example}
\endlist \endlist
@ -78,8 +78,8 @@
\page qdbusadaptorexample.html \page qdbusadaptorexample.html
\title D-Bus Adaptor Example \title D-Bus Adaptor Example
\previouspage The QtDBus Type System \previouspage The Qt D-Bus Type System
\contentspage Using QtDBus Adaptors \contentspage Using Qt D-Bus Adaptors
The following example code shows how a D-Bus interface can be implemented The following example code shows how a D-Bus interface can be implemented
using an adaptor. using an adaptor.
@ -198,11 +198,11 @@
\page qdbusdeclaringslots.html \page qdbusdeclaringslots.html
\title Declaring Slots in D-Bus Adaptors \title Declaring Slots in D-Bus Adaptors
\contentspage Using QtDBus Adaptors \contentspage Using Qt D-Bus Adaptors
\nextpage Declaring Signals in D-Bus Adaptors \nextpage Declaring Signals in D-Bus Adaptors
Slots in D-Bus adaptors are declared just like normal, public slots, but their 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 information). Slots whose parameters do not follow those rules or that are not
public will not be accessible via D-Bus. public will not be accessible via D-Bus.
@ -259,7 +259,7 @@
\section1 Automatic Replies \section1 Automatic Replies
Method replies are generated automatically with the contents of the output 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 worry about constructing proper QDBusMessage objects and sending them over
the connection. the connection.
@ -267,7 +267,7 @@
it needs to send a special reply or even an error, it can do so by using 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::createReply() or QDBusMessage::createErrorReply() on the
QDBusMessage parameter and send it with QDBusConnection::send(). 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 \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 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 \snippet code/doc_src_qdbusadaptors.cpp 11
As can be seen in the example, when a delayed reply is in place, 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 are used only to determine the slot's signature when communicating
the adaptor's description to remote applications, or in case the the adaptor's description to remote applications, or in case the
code in the slot decides not to use a delayed reply. 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 QDBusMessage::reply() on the original message. It then becomes the
resposibility of the called code to eventually send a reply to the resposibility of the called code to eventually send a reply to the
caller. caller.
@ -321,8 +321,8 @@
to complete should make that fact clear in documentation so that callers to complete should make that fact clear in documentation so that callers
properly set higher timeouts. properly set higher timeouts.
\sa {Using QtDBus Adaptors}, {Declaring Signals in D-Bus Adaptors}, \sa {Using Qt D-Bus Adaptors}, {Declaring Signals in D-Bus Adaptors},
{The QtDBus Type System}, QDBusConnection, QDBusMessage {The Qt D-Bus Type System}, QDBusConnection, QDBusMessage
*/ */
/*! /*!
@ -330,12 +330,12 @@
\title Declaring Signals in D-Bus Adaptors \title Declaring Signals in D-Bus Adaptors
\previouspage Declaring Slots in D-Bus Adaptors \previouspage Declaring Slots in D-Bus Adaptors
\contentspage Using QtDBus Adaptors \contentspage Using Qt D-Bus Adaptors
\nextpage The QtDBus Type System \nextpage The Qt D-Bus Type System
Any signal in a class derived from QDBusAbstractAdaptor will be automatically Any signal in a class derived from QDBusAbstractAdaptor will be automatically
relayed into D-Bus, provided that the signal's parameters conform to certain 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. is necessary to make this relay.
However, signals must still be emitted. The easiest way to emit an adaptor 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 the corresponding signals in the adaptor. It will inspect the list of signals
in both classes and connect those whose parameters match exactly. 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}, {Declaring Slots in D-Bus Adaptors},
{The QtDBus Type System}, QDBusAbstractAdaptor {The Qt D-Bus Type System}, QDBusAbstractAdaptor
*/ */
/*! /*!
\page qdbustypesystem.html \page qdbustypesystem.html
\title The QtDBus Type System \title The Qt D-Bus Type System
\previouspage Declaring Signals in D-Bus Adaptors \previouspage Declaring Signals in D-Bus Adaptors
\contentspage Using QtDBus Adaptors \contentspage Using Qt D-Bus Adaptors
\nextpage D-Bus Adaptor Example \nextpage D-Bus Adaptor Example
D-Bus has an extensible type system based on a few primitives and 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 implements the interface to that type system through the
QDBusArgument class, allowing user programs to send and receive QDBusArgument class, allowing user programs to send and receive
practically every C++ type over the bus. practically every C++ type over the bus.
@ -436,13 +436,13 @@
\section1 Extending the Type System \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 declared as a Qt meta-type with the Q_DECLARE_METATYPE() macro and
registered with the qDBusRegisterMetaType() function. The registered with the qDBusRegisterMetaType() function. The
streaming operators \c{operator>>} and \c{operator<<} will be streaming operators \c{operator>>} and \c{operator<<} will be
automatically found by the registration system. 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 use with Qt's \l{Container classes}{container classes}, such as
QMap and QList, so it is not necessary to write the streaming QMap and QList, so it is not necessary to write the streaming
operator functions for those. For other types, and specially for operator functions for those. For other types, and specially for
@ -454,7 +454,7 @@
\section1 The Type System in Use \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. 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, \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. Its presence in the method implementation (outside the class declaration) is optional.
\sa {Using QtDBus Adaptors} \sa {Using Qt D-Bus Adaptors}
*/ */

View File

@ -27,10 +27,10 @@
/*! /*!
\page qdbusxml2cpp.html \page qdbusxml2cpp.html
\title QtDBus XML compiler (qdbusxml2cpp) \title Qt D-Bus XML compiler (qdbusxml2cpp)
\keyword 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 static code representing those interfaces, which can then be used to make calls to remote
objects or implement said interfaces. objects or implement said interfaces.

View File

@ -96,7 +96,7 @@
purpose is to be used in a one-to-many context, signal messages purpose is to be used in a one-to-many context, signal messages
are designed to work over an "opt-in" mechanism. 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 messages into a simpler, object-oriented approach familiar to Qt
developers. In most cases, the developer need not worry about developers. In most cases, the developer need not worry about
sending or receiving messages. sending or receiving messages.
@ -208,9 +208,9 @@
type information over the bus: type information over the bus:
\list \list
\li \l{Using QtDBus Adaptors} \li \l{Using Qt D-Bus Adaptors}
\li \l{The QtDBus Type System} \li \l{The Qt D-Bus Type System}
\li \l{QtDBus XML compiler (qdbusxml2cpp)} \li \l{Qt D-Bus XML compiler (qdbusxml2cpp)}
\li \l{Qt D-Bus C++ Classes} \li \l{Qt D-Bus C++ Classes}
\endlist \endlist
*/ */

View File

@ -28,7 +28,7 @@
/*! /*!
\module QtDBus \module QtDBus
\title Qt D-Bus C++ Classes \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. to perform Inter-Process Communication using the \l{D-Bus} protocol.
\ingroup modules \ingroup modules
@ -37,12 +37,12 @@
\target The QDBus compiler \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 other, remote applications by exporting objects, as well as use
services exported by those applications by placing calls and services exported by those applications by placing calls and
accessing properties. 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 {signalsandslots.html}{Signals and Slots} mechanism, allowing one
to connect to a signal emitted remotely as well as to connect a to connect to a signal emitted remotely as well as to connect a
local signal to remote slot. local signal to remote slot.
@ -52,7 +52,7 @@
\snippet code/doc_src_qtdbus.cpp 0 \snippet code/doc_src_qtdbus.cpp 0
If you're using qmake to build your application, you can add this 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: libraries:
\snippet code/doc_src_qtdbus.pro 1 \snippet code/doc_src_qtdbus.pro 1

View File

@ -128,7 +128,7 @@ void QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, QVariant &
if (int(mp.type()) != QMetaType::QVariant) { if (int(mp.type()) != QMetaType::QVariant) {
expectedSignature = QDBusMetaType::typeToSignature(where.userType()); expectedSignature = QDBusMetaType::typeToSignature(where.userType());
if (expectedSignature == 0) { 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", "used to read property %s.%s",
mp.typeName(), qPrintable(interface), mp.name()); mp.typeName(), qPrintable(interface), mp.name());
lastError = QDBusError(QDBusError::Failed, lastError = QDBusError(QDBusError::Failed,
@ -264,7 +264,7 @@ int QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call _c, int _id, void
\inmodule QtDBus \inmodule QtDBus
\since 4.2 \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, Generated-code classes also derive from QDBusAbstractInterface,
all methods described here are also valid for generated-code all methods described here are also valid for generated-code

View File

@ -177,10 +177,10 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
The class is used to send arguments over D-Bus to remote The class is used to send arguments over D-Bus to remote
applications and to receive them back. D-Bus offers an extensible applications and to receive them back. D-Bus offers an extensible
type system, based on a few primitive types and associations of 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. 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 providing functions to marshall and demarshall the primitive
types. The compound types are then created by association of one types. The compound types are then created by association of one
or more of the primitive types in arrays, dictionaries or 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 The following example illustrates how a structure containing an
integer and a string can be constructed using the \l 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 \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>>} In this example, both the \c{operator<<} and the \c{operator>>}
functions may produce a different number of reads/writes. This can 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() 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 that are supported directly by QDBusArgument because of their
widespread usage in Qt applications. 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) 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 that are supported directly by QDBusArgument because of their
widespread usage in Qt applications. 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) 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 that are supported directly by QDBusArgument because of their
widespread usage in Qt applications. 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 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 that are supported directly by QDBusArgument because of their
widespread usage in Qt applications. 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 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 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, Qt's \l {Container Classes} that take one template parameter,
you need not declare an \c{operator<<} function for it, since 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 the data. The same applies for STL's sequence containers, such
as \c {std::list}, \c {std::vector}, etc. as \c {std::list}, \c {std::vector}, etc.
@ -892,7 +892,7 @@ void QDBusArgument::endArray()
\snippet code/src_qdbus_qdbusargument.cpp 7 \snippet code/src_qdbus_qdbusargument.cpp 7
If the type you want to marshall is a QMap or QHash, you need not 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. generic templates to do the job of marshalling the data.
\sa endMap(), beginStructure(), beginArray(), beginMapEntry() \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 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 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. provides generic templates to do the job of demarshalling the data.
The same applies for STL's sequence containers, such as \c {std::list}, The same applies for STL's sequence containers, such as \c {std::list},
\c {std::vector}, etc. \c {std::vector}, etc.
@ -1016,7 +1016,7 @@ void QDBusArgument::endArray() const
\snippet code/src_qdbus_qdbusargument.cpp 10 \snippet code/src_qdbus_qdbusargument.cpp 10
If the type you want to demarshall is a QMap or QHash, you need not 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. generic templates to do the job of demarshalling the data.
\sa endMap(), beginStructure(), beginArray(), beginMapEntry() \sa endMap(), beginStructure(), beginArray(), beginMapEntry()

View File

@ -1168,7 +1168,7 @@ QByteArray QDBusConnection::localMachineId()
\inmodule QtDBus \inmodule QtDBus
\brief The QDBus namespace contains miscellaneous identifiers used \brief The QDBus namespace contains miscellaneous identifiers used
throughout the QtDBus library. throughout the Qt D-Bus module.
*/ */
/*! /*!

View File

@ -84,7 +84,7 @@ QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate
The QDBusContext class is an alternative to accessing the context The QDBusContext class is an alternative to accessing the context
that doesn't involve modifying the code generated by the \l 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 QDBusContext is used by subclassing it from the objects being
exported using QDBusConnection::registerObject(). The following 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. 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. 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 replies. It will also ignore the return value from the slot and
any output parameters. Instead, the called object is responsible any output parameters. Instead, the called object is responsible
for storing the incoming message and send a reply or error at a 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. msg parameter is a human-readable text explaining the failure.
If an error is sent, the return value and any output parameters 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 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. msg parameter is a human-readable text explaining the failure.
If an error is sent, the return value and any output parameters 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 void QDBusContext::sendErrorReply(QDBusError::ErrorType type, const QString &msg) const
{ {

View File

@ -176,7 +176,7 @@ static inline QDBusError::ErrorType get(const char *name)
C++ and Java exceptions are a valid analogy for D-Bus errors: C++ and Java exceptions are a valid analogy for D-Bus errors:
instead of returning normally with a return value, remote instead of returning normally with a return value, remote
applications and the bus may decide to throw an error 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 exception-throwing mechanism, so you will receive QDBusErrors in
the return reply (see QDBusReply::error()). the return reply (see QDBusReply::error()).

View File

@ -82,7 +82,7 @@ void QDBusSignature::doCheck()
The QVariant within a QDBusVariant is required to distinguish between a normal The QVariant within a QDBusVariant is required to distinguish between a normal
D-Bus value and a value within a D-Bus variant. 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 \brief The QDBusObjectPath class enables the programmer to
identify the OBJECT_PATH type provided by the D-Bus typesystem. 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 \brief The QDBusSignature class enables the programmer to
identify the SIGNATURE type provided by the D-Bus typesystem. identify the SIGNATURE type provided by the D-Bus typesystem.
\sa {The QtDBus type system} \sa {The Qt D-Bus Type System}
*/ */
/*! /*!

View File

@ -115,7 +115,7 @@ static inline QDebug operator<<(QDebug dbg, const QDBusConnectionPrivate *conn)
void qdbusDefaultThreadDebug(int action, int condition, QDBusConnectionPrivate *conn) void qdbusDefaultThreadDebug(int action, int condition, QDBusConnectionPrivate *conn)
{ {
qDBusDebug() << QThread::currentThread() qDBusDebug() << QThread::currentThread()
<< "QtDBus threading action" << action << "Qt D-Bus threading action" << action
<< (condition == QDBusLockerBase::BeforeLock ? "before lock" : << (condition == QDBusLockerBase::BeforeLock ? "before lock" :
condition == QDBusLockerBase::AfterLock ? "after lock" : condition == QDBusLockerBase::AfterLock ? "after lock" :
condition == QDBusLockerBase::BeforeUnlock ? "before unlock" : condition == QDBusLockerBase::BeforeUnlock ? "before unlock" :

View File

@ -198,7 +198,7 @@ QDBusInterfacePrivate::~QDBusInterfacePrivate()
\snippet code/src_qdbus_qdbusinterface.cpp 0 \snippet code/src_qdbus_qdbusinterface.cpp 0
\sa {QtDBus XML compiler (qdbusxml2cpp)} \sa {Qt D-Bus XML compiler (qdbusxml2cpp)}
*/ */
/*! /*!

View File

@ -620,7 +620,7 @@ bool QDBusMessage::isReplyRequired() const
/*! /*!
Sets whether the message will be replied later (if \a enable is 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). (if \a enable is false).
In D-Bus, all method calls must generate a reply to the caller, unless the 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 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. when necessary.
*/ */
bool QDBusMessage::isDelayedReply() const 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 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. not running already.
\sa setAutoStartService() \sa setAutoStartService()

View File

@ -145,21 +145,21 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
/*! /*!
\class QDBusMetaType \class QDBusMetaType
\inmodule QtDBus \inmodule QtDBus
\brief Meta-type registration system for the QtDBus module. \brief Meta-type registration system for the Qt D-Bus module.
\internal \internal
The QDBusMetaType class allows you to register class types for The QDBusMetaType class allows you to register class types for
marshalling and demarshalling over D-Bus. D-Bus supports a very marshalling and demarshalling over D-Bus. D-Bus supports a very
limited set of primitive types, but allows one to extend the type limited set of primitive types, but allows one to extend the type
system by creating compound types, such as arrays (lists) and 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. 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 information on the type system and how to register additional
types. types.
\sa {qdbustypesystem.html}{QtDBus type system}, \sa {qdbustypesystem.html}{Qt D-Bus Type System},
qDBusRegisterMetaType(), QMetaType, QVariant, QDBusArgument qDBusRegisterMetaType(), QMetaType, QVariant, QDBusArgument
*/ */
@ -170,7 +170,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
\since 4.2 \since 4.2
Registers \c{T} with the 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. {QMetaType}{meta-type system}, if it's not already registered.
To register a type, it must be declared as a meta-type with the 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 If \c{T} isn't a type derived from one of
Qt's \l{container classes}, the \c{operator<<} and Qt's \l{container classes}, the \c{operator<<} and
\c{operator>>} streaming operators between \c{T} and QDBusArgument \c{operator>>} streaming operators between \c{T} and QDBusArgument
must be already declared. See the \l {qdbustypesystem.html}{QtDBus must be already declared. See the \l {qdbustypesystem.html}{Qt D-Bus
type system} page for more information on how to declare such Type System} page for more information on how to declare such
types. types.
This function returns the Qt meta type id for the type (the same This function returns the Qt meta type id for the type (the same
value that is returned from qRegisterMetaType()). value that is returned from qRegisterMetaType()).
\sa {qdbustypesystem.html}{QtDBus type system}, qRegisterMetaType(), QMetaType \sa {qdbustypesystem.html}{Qt D-Bus Type System}, qRegisterMetaType(), QMetaType
*/ */
/*! /*!

View File

@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
\brief The QDBusUnixFileDescriptor class holds one Unix file descriptor. \brief The QDBusUnixFileDescriptor class holds one Unix file descriptor.
The QDBusUnixFileDescriptor class is used to hold one Unix file 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 send and receive Unix file descriptors over the D-Bus connection, mapping
automatically to the D-Bus type 'h'. 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. 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 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. a version was found at compile-time and run-time.
To verify that your connection does support passing file descriptors, To verify that your connection does support passing file descriptors,

View File

@ -315,7 +315,7 @@ namespace QDBusUtil
/*! /*!
\internal \internal
\since 4.5 \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) QString argumentToString(const QVariant &arg)
{ {

View File

@ -147,15 +147,15 @@
\section1 Qt GUI prior to Qt 5.0 \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 for all things relating to graphical user interfaces in Qt, and
included the Qt widget set, the item views, the graphics view included the Qt widget set, the item views, the graphics view
framework and also printing. Starting Qt 5, these classes have framework and also printing. Starting Qt 5, these classes have
been moved to the QtWidgets library. Printing has been been moved to the Qt Widgets module. Printing has been
moved to the QtPrintSupport library. Please note that these moved to the Qt Print Support module. Please note that these
libraries can be excluded from a Qt installation. 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. useful for all graphical applications.
\section1 Drag and Drop \section1 Drag and Drop

View File

@ -1460,9 +1460,8 @@ void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
\row \li SVG \li image/svg+xml \li Scalable Vector Graphics \row \li SVG \li image/svg+xml \li Scalable Vector Graphics
\endtable \endtable
Reading and writing SVG files is supported through Qt's Reading and writing SVG files is supported through the \l{Qt SVG} module.
\l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} The \l{Qt Image Formats} module provides support for additional image formats.
provides support for additional image formats.
Note that the QApplication instance must be created before this function is Note that the QApplication instance must be created before this function is
called. called.

View File

@ -717,9 +717,8 @@ void supportedImageHandlerMimeTypes(QFactoryLoader *loader,
\row \li XPM \li image/x-xpixmap \li X11 Pixmap \row \li XPM \li image/x-xpixmap \li X11 Pixmap
\endtable \endtable
Reading and writing SVG files is supported through Qt's Reading and writing SVG files is supported through the \l{Qt SVG} module.
\l{QtSvg Module}{SVG Module}. The \l{QtImageFormats Module}{Image Formats Module} The \l{Qt Image Formats} module provides support for additional image formats.
provides support for additional image formats.
Note that the QApplication instance must be created before this function is Note that the QApplication instance must be created before this function is
called. called.

View File

@ -83,7 +83,7 @@ QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId)
QPlatformPixmap::~QPlatformPixmap() QPlatformPixmap::~QPlatformPixmap()
{ {
// Sometimes the pixmap cleanup hooks will be called from derrived classes, which will // 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, // 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 // 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 // call the cleanup hooks itself before deleting the native pixmap and set is_cached to

View File

@ -220,7 +220,7 @@ static inline void clearFontUnlocked()
For any GUI application using Qt, there is precisely \b one QGuiApplication 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 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, 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 use QApplication instead, as it provides some functionality needed for creating
QWidget instances. QWidget instances.

View File

@ -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. have any type information.
\internal \internal

View File

@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
The only place to retrieve a QPlatformOpenGLContext from is through a QPlatformWindow. 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() 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 withhout using QOpenGLWidget. When using QOpenGLContext::currentContext(), it will ask
QPlatformOpenGLContext for the currentContext. Then a corresponding QOpenGLContext will be returned, QPlatformOpenGLContext for the currentContext. Then a corresponding QOpenGLContext will be returned,
which maps to the QPlatformOpenGLContext. which maps to the QPlatformOpenGLContext.

View File

@ -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 Specifies whether the window is meant for raster rendering with
QBackingStore, or OpenGL rendering with QOpenGLContext. 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 The window icon might be used by the windowing system for example to
decorate the window, and/or in the task switcher. 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() \sa setIcon()
*/ */
@ -1223,14 +1223,14 @@ void QWindow::setPosition(int posx, int posy)
/*! /*!
\fn QPoint QWindow::position() const \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() \sa setPosition()
*/ */
/*! /*!
\fn QSize QWindow::size() const \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() \sa resize()
*/ */
@ -1309,7 +1309,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 If the return value is true, the window receives all key events until
setKeyboardGrabEnabled(false) is called; other windows get no key events at setKeyboardGrabEnabled(false) is called; other windows get no key events at

View File

@ -1387,7 +1387,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
cases where expensive operations are ok to use, for instance when cases where expensive operations are ok to use, for instance when
the result is cached in a QPixmap. 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} {Drawing Utility Functions}
*/ */

View File

@ -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); trans.map(ti.width.toReal()/size, (ti.ascent.toReal()-ti.descent.toReal())/size, &x2, &y2);
uint annot = addXrefEntry(-1); uint annot = addXrefEntry(-1);
QByteArray x1s, y1s, x2s, y2s;
x1s.setNum(static_cast<double>(x1), 'f');
y1s.setNum(static_cast<double>(y1), 'f');
x2s.setNum(static_cast<double>(x2), 'f');
y2s.setNum(static_cast<double>(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 #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 #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 #endif
static_cast<double>(x1),
static_cast<double>(y1),
static_cast<double>(x2),
static_cast<double>(y2));
xprintf("/Type /Action\n/S /URI\n/URI (%s)\n", xprintf("/Type /Action\n/S /URI\n/URI (%s)\n",
ti.charFormat.anchorHref().toLatin1().constData()); ti.charFormat.anchorHref().toLatin1().constData());
xprintf(">>\n>>\n"); xprintf(">>\n>>\n");

View File

@ -143,7 +143,10 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
same argument, and it will try to open the URL using the same argument, and it will try to open the URL using the
appropriate mechanism for the user's desktop environment. 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
*/ */
/*! /*!

View File

@ -618,20 +618,17 @@ InvalidContext:
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum)
{ {
switch (buttonNum) { if (buttonNum == 0)
case 0:
return Qt::LeftButton; return Qt::LeftButton;
case 1: if (buttonNum == 1)
return Qt::RightButton; return Qt::RightButton;
case 2: if (buttonNum == 2)
return Qt::MidButton; return Qt::MiddleButton;
case 3: if (buttonNum >= 3 && buttonNum <= 31) { // handle XButton1 and higher via logical shift
return Qt::XButton1; return Qt::MouseButton(uint(Qt::MiddleButton) << (buttonNum - 3));
case 4:
return Qt::XButton2;
default:
return Qt::NoButton;
} }
// else error: buttonNum too high, or negative
return Qt::NoButton;
} }
bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret) { bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret) {

View File

@ -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 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 programmatically. To ease deployment the nib files are stored in Qt resources
and written to QDir::temp() before loading. (Earlier Qt versions used 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) void qt_mac_loadMenuNib(QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader)
{ {

View File

@ -82,7 +82,7 @@ private:
Q_INVOKABLE QPlatformPrinterSupport *createPlatformPrinterSupport(); Q_INVOKABLE QPlatformPrinterSupport *createPlatformPrinterSupport();
/* /*
Function to return the NSPrintInfo * from QMacPaintEnginePrivate. 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); Q_INVOKABLE void *NSPrintInfoForPrintEngine(QPrintEngine *printEngine);

View File

@ -68,7 +68,10 @@ Q_GLOBAL_STATIC(QStringList, globalDraggedTypesList)
void qt_mac_addToGlobalMimeList(QMacPasteboardMime *macMime) 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) void qt_mac_removeFromGlobalMimeList(QMacPasteboardMime *macMime)
@ -810,6 +813,10 @@ QList<QByteArray> QMacPasteboardMimeVCard::convertFromMime(const QString &mime,
void QMacPasteboardMime::initializeMimeTypes() void QMacPasteboardMime::initializeMimeTypes()
{ {
if (globalMimeList()->isEmpty()) { 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 //standard types that we wrap
new QMacPasteboardMimeTiff; new QMacPasteboardMimeTiff;
new QMacPasteboardMimeUnicodeText; new QMacPasteboardMimeUnicodeText;
@ -819,8 +826,6 @@ void QMacPasteboardMime::initializeMimeTypes()
new QMacPasteboardMimeUrl; new QMacPasteboardMimeUrl;
new QMacPasteboardMimeTypeName; new QMacPasteboardMimeTypeName;
new QMacPasteboardMimeVCard; new QMacPasteboardMimeVCard;
//make sure our "non-standard" types are always last! --Sam
new QMacPasteboardMimeAny;
} }
} }

View File

@ -420,14 +420,19 @@ static QTouchDevice *touchDevice = 0;
m_buttons |= Qt::LeftButton; m_buttons |= Qt::LeftButton;
break; break;
case NSLeftMouseUp: case NSLeftMouseUp:
m_buttons &= QFlag(~int(Qt::LeftButton)); m_buttons &= ~Qt::LeftButton;
break; break;
case NSRightMouseDown: case NSRightMouseDown:
m_buttons |= Qt::RightButton; m_buttons |= Qt::RightButton;
break; break;
case NSRightMouseUp: case NSRightMouseUp:
m_buttons &= QFlag(~int(Qt::RightButton)); m_buttons &= ~Qt::RightButton;
break; break;
case NSOtherMouseDown:
m_buttons |= cocoaButton2QtButton([theEvent buttonNumber]);
break;
case NSOtherMouseUp:
m_buttons &= ~cocoaButton2QtButton([theEvent buttonNumber]);
default: default:
break; break;
} }
@ -482,10 +487,10 @@ static QTouchDevice *touchDevice = 0;
- (void)mouseUp:(NSEvent *)theEvent - (void)mouseUp:(NSEvent *)theEvent
{ {
if (m_sendUpAsRightButton) { if (m_sendUpAsRightButton) {
m_buttons &= QFlag(~int(Qt::RightButton)); m_buttons &= ~Qt::RightButton;
m_sendUpAsRightButton = false; m_sendUpAsRightButton = false;
} else { } else {
m_buttons &= QFlag(~int(Qt::LeftButton)); m_buttons &= ~Qt::LeftButton;
} }
[self handleMouseEvent:theEvent]; [self handleMouseEvent:theEvent];
} }
@ -556,59 +561,13 @@ static QTouchDevice *touchDevice = 0;
- (void)rightMouseUp:(NSEvent *)theEvent - (void)rightMouseUp:(NSEvent *)theEvent
{ {
m_buttons &= QFlag(~int(Qt::RightButton)); m_buttons &= ~Qt::RightButton;
[self handleMouseEvent:theEvent]; [self handleMouseEvent:theEvent];
} }
- (void)otherMouseDown:(NSEvent *)theEvent - (void)otherMouseDown:(NSEvent *)theEvent
{ {
switch ([theEvent buttonNumber]) { m_buttons |= cocoaButton2QtButton([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;
}
[self handleMouseEvent:theEvent]; [self handleMouseEvent:theEvent];
} }
@ -621,53 +580,7 @@ static QTouchDevice *touchDevice = 0;
- (void)otherMouseUp:(NSEvent *)theEvent - (void)otherMouseUp:(NSEvent *)theEvent
{ {
switch ([theEvent buttonNumber]) { m_buttons &= ~cocoaButton2QtButton([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;
}
[self handleMouseEvent:theEvent]; [self handleMouseEvent:theEvent];
} }
@ -1259,7 +1172,7 @@ static QTouchDevice *touchDevice = 0;
// keep our state, and QGuiApplication state (buttons member) in-sync, // keep our state, and QGuiApplication state (buttons member) in-sync,
// or future mouse events will be processed incorrectly // 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]; NSPoint windowPoint = [self convertPoint: point fromView: nil];
QPoint qtWindowPoint(windowPoint.x, windowPoint.y); QPoint qtWindowPoint(windowPoint.x, windowPoint.y);

View File

@ -52,6 +52,7 @@
#include <QtCore/qmath.h> #include <QtCore/qmath.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtCore/QtEndian> #include <QtCore/QtEndian>
#include <QtCore/QThreadStorage>
#include <wchar.h> #include <wchar.h>
@ -1112,8 +1113,33 @@ void QWindowsFontDatabase::populate(const QString &family)
ReleaseDC(0, dummy); ReleaseDC(0, dummy);
} }
QWindowsFontDatabase::QWindowsFontDatabase() : typedef QSharedPointer<QWindowsFontEngineData> QWindowsFontEngineDataPtr;
m_fontEngineData(new QWindowsFontEngineData)
#ifndef QT_NO_THREAD
typedef QThreadStorage<QWindowsFontEngineDataPtr> FontEngineThreadLocalData;
Q_GLOBAL_STATIC(FontEngineThreadLocalData, fontEngineThreadLocalData)
QSharedPointer<QWindowsFontEngineData> sharedFontData()
{
FontEngineThreadLocalData *data = fontEngineThreadLocalData();
if (!data->hasLocalData())
data->setLocalData(QSharedPointer<QWindowsFontEngineData>(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 (Qt Print Support) // Properties accessed by QWin32PrintEngine (Qt Print Support)
static const int hfontMetaTypeId = qRegisterMetaType<HFONT>(); static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
@ -1121,10 +1147,12 @@ QWindowsFontDatabase::QWindowsFontDatabase() :
Q_UNUSED(hfontMetaTypeId) Q_UNUSED(hfontMetaTypeId)
Q_UNUSED(logFontMetaTypeId) Q_UNUSED(logFontMetaTypeId)
if (QWindowsContext::verboseFonts) if (QWindowsContext::verboseFonts) {
const QWindowsFontEngineDataPtr data = sharedFontData();
qDebug() << __FUNCTION__ << "Clear type: " qDebug() << __FUNCTION__ << "Clear type: "
<< m_fontEngineData->clearTypeEnabled << "gamma: " << data->clearTypeEnabled << "gamma: "
<< m_fontEngineData->fontSmoothingGamma; << data->fontSmoothingGamma;
}
} }
QWindowsFontDatabase::~QWindowsFontDatabase() QWindowsFontDatabase::~QWindowsFontDatabase()
@ -1136,7 +1164,7 @@ QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, QChar::S
{ {
QFontEngine *fe = QWindowsFontDatabase::createEngine(script, fontDef, QFontEngine *fe = QWindowsFontDatabase::createEngine(script, fontDef,
0, QWindowsContext::instance()->defaultDPI(), false, 0, QWindowsContext::instance()->defaultDPI(), false,
QStringList(), m_fontEngineData); QStringList(), sharedFontData());
if (QWindowsContext::verboseFonts) if (QWindowsContext::verboseFonts)
qDebug() << __FUNCTION__ << "FONTDEF" << fontDef << script << fe << handle; qDebug() << __FUNCTION__ << "FONTDEF" << fontDef << script << fe << handle;
return fe; return fe;
@ -1187,7 +1215,7 @@ QFontEngine *QWindowsFontDatabase::fontEngine(const QByteArray &fontData, qreal
fontEngine = QWindowsFontDatabase::createEngine(QChar::Script_Common, request, 0, fontEngine = QWindowsFontDatabase::createEngine(QChar::Script_Common, request, 0,
QWindowsContext::instance()->defaultDPI(), false, QStringList(), QWindowsContext::instance()->defaultDPI(), false, QStringList(),
m_fontEngineData); sharedFontData());
if (fontEngine) { if (fontEngine) {
if (request.family != fontEngine->fontDef.family) { if (request.family != fontEngine->fontDef.family) {

View File

@ -106,7 +106,6 @@ public:
private: private:
void populate(const QString &family = QString()); void populate(const QString &family = QString());
void removeApplicationFonts(); void removeApplicationFonts();
QSharedPointer<QWindowsFontEngineData> m_fontEngineData;
QSet<QString> m_families; QSet<QString> m_families;
struct WinApplicationFont { struct WinApplicationFont {

View File

@ -459,7 +459,7 @@ QPlatformOpenGLContext
// Let's try to do so by checking if the Qt Quick module is loaded. // Let's try to do so by checking if the Qt Quick module is loaded.
inline bool isQMLApplication() inline bool isQMLApplication()
{ {
// check if the QtQuick library is loaded // check if the Qt Quick module is loaded
#ifdef _DEBUG #ifdef _DEBUG
HMODULE handle = GetModuleHandle(L"Qt5Quick" QT_LIBINFIX L"d.dll"); HMODULE handle = GetModuleHandle(L"Qt5Quick" QT_LIBINFIX L"d.dll");
#else #else

View File

@ -114,7 +114,7 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters)
m_fontDatabase.reset(new QGenericUnixFontDatabase()); m_fontDatabase.reset(new QGenericUnixFontDatabase());
m_inputContext.reset(QPlatformInputContextFactory::create()); 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()); m_accessibility.reset(new QSpiAccessibleBridge());
#endif #endif
} }

View File

@ -29,7 +29,7 @@
\namespace QSql \namespace QSql
\inmodule QtSql \inmodule QtSql
\brief The QSql namespace contains miscellaneous identifiers used throughout \brief The QSql namespace contains miscellaneous identifiers used throughout
the Qt SQL library. the Qt SQL module.
\ingroup database \ingroup database

View File

@ -51,7 +51,7 @@
exported symbols. exported symbols.
\row \row
\li \b Self-contained \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. for non-gui testing.
\row \row
\li \b {Rapid testing} \li \b {Rapid testing}
@ -653,7 +653,7 @@
\snippet tutorial3/testgui.cpp 0 \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. definitions in addition to the QTest namespace.
\snippet tutorial3/testgui.cpp 1 \snippet tutorial3/testgui.cpp 1

View File

@ -6897,7 +6897,7 @@
\endcode \endcode
This ensures that the QDesignerTaskMenuExtension class is included 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 class will appear on the list created by calling the \l
{generatelist-command} {\\generatelist} command with the \c {generatelist-command} {\\generatelist} command with the \c
{{classesbymodule QtDesigner}} argument. {{classesbymodule QtDesigner}} argument.

View File

@ -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 We do this by obtaining the full path to the header file's location
and examine everything between "src/" and the filename. This is and examine everything between "src/" and the filename. This is
semi-dirty because we are assuming a particular directory structure. semi-dirty because we are assuming a particular directory structure.

View File

@ -30,7 +30,7 @@
\title Qt Widgets C++ Classes \title Qt Widgets C++ Classes
\ingroup modules \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 To include the definitions of the module's classes, use the
following directive: following directive:

View File

@ -90,7 +90,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
Qt provides a set of QStyle subclasses that emulate the native Qt provides a set of QStyle subclasses that emulate the native
look of the different platforms supported by Qt (QWindowsStyle, look of the different platforms supported by Qt (QWindowsStyle,
QMacStyle, etc.). These styles are built into the 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. plugin mechansim.
Most functions for drawing style elements take four arguments: 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 Qt contains a set of QStyle subclasses that emulate the styles of
the different platforms supported by Qt (QWindowsStyle, the different platforms supported by Qt (QWindowsStyle,
QMacStyle etc.). By default, these styles are built 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. plugins.
Qt's built-in widgets use QStyle to perform nearly all of their Qt's built-in widgets use QStyle to perform nearly all of their

View File

@ -27,8 +27,8 @@
/*! /*!
\page qtxml-index.html \page qtxml-index.html
\title Qt Xml \title Qt XML
\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 module is not actively maintained anymore. Please use
the QXmlStreamReader and QXmlStreamwriter classes in Qt Core instead. the QXmlStreamReader and QXmlStreamwriter classes in Qt Core instead.
@ -43,6 +43,6 @@
\snippet code/doc_src_qtxml.pro 1 \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. int this module.
*/ */

View File

@ -27,11 +27,11 @@
/*! /*!
\module QtXml \module QtXml
\title Qt Xml C++ classes \title Qt XML C++ Classes
\ingroup modules \ingroup modules
\ingroup technology-apis \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 module is not actively maintained anymore. Please use
the \l{QXmlStreamReader} and \l{QXmlStreamWriter} classes in \l{Qt Core} instead. the \l{QXmlStreamReader} and \l{QXmlStreamWriter} classes in \l{Qt Core} instead.

View File

@ -45,7 +45,7 @@
In addition to core XML support, classes for higher level querying In addition to core XML support, classes for higher level querying
and manipulation of XML data are provided by the Qt XML Patterns 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 classes can read and write a subset of SVG, an XML-based file
format. Qt also provides helper functions that may be useful to format. Qt also provides helper functions that may be useful to
those working with XML and XHTML: see Qt::escape() and those working with XML and XHTML: see Qt::escape() and

View File

@ -64,7 +64,7 @@ expect_pass("test(needsquoting)dirname")
expect_pass(test_platform_defs_include) expect_pass(test_platform_defs_include)
expect_pass(test_qtmainwin_library) expect_pass(test_qtmainwin_library)
# If QtDBus has been installed then run the tests for its macros. # If Qt D-Bus has been installed then run the tests for its macros.
find_package(Qt5DBus QUIET) find_package(Qt5DBus QUIET)
if (Qt5DBus_FOUND AND NOT APPLE) if (Qt5DBus_FOUND AND NOT APPLE)
expect_pass(test_dbus_module) expect_pass(test_dbus_module)

View File

@ -34,7 +34,7 @@ qt5_generate_moc("${main_file}" "${moc_file}")
# Qt Test and the definition of QTEST_MAIN. # Qt Test and the definition of QTEST_MAIN.
# If running this test manually (ctest -V -R no_link_gui from # If running this test manually (ctest -V -R no_link_gui from
# the tests/auto/cmake/build directory), the core_test is # the tests/auto/cmake/build directory), the core_test is
# expected to fail to link because of missing symbols from QtGui. # expected to fail to link because of missing symbols from Qt GUI.
# The gui_test is expected to build successfully (though it may # The gui_test is expected to build successfully (though it may
# be necessary to comment out the core_test and re-run cmake) # be necessary to comment out the core_test and re-run cmake)
add_executable(core_test "${main_file}" "${moc_file}") add_executable(core_test "${main_file}" "${moc_file}")

View File

@ -34,7 +34,7 @@ qt5_generate_moc("${main_file}" "${moc_file}")
# QtTest and the definition of QTEST_MAIN. # QtTest and the definition of QTEST_MAIN.
# If running this test manually (ctest -V -R no_link_widgets from # If running this test manually (ctest -V -R no_link_widgets from
# the tests/auto/cmake/build directory), the core_test is # the tests/auto/cmake/build directory), the core_test is
# expected to fail to link because of missing symbols from QtGui # expected to fail to link because of missing symbols from Qt GUI
# and Qt Widgets. # and Qt Widgets.
# The widgets_test is expected to build successfully (though it may # The widgets_test is expected to build successfully (though it may
# be necessary to comment out the core_test and re-run cmake) # be necessary to comment out the core_test and re-run cmake)

View File

@ -1344,6 +1344,14 @@ void tst_QDir::homePath()
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
if (strHome.length() > 1) // root dir = "/" if (strHome.length() > 1) // root dir = "/"
QVERIFY(!strHome.endsWith('/')); QVERIFY(!strHome.endsWith('/'));
QByteArray envHome = qgetenv("HOME");
#if !defined(_WRS_KERNEL) // unsetenv is not available on VxWorks DKM mode
unsetenv("HOME");
#endif
QCOMPARE(QDir::homePath(), QDir::rootPath());
qputenv("HOME", envHome);
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
if (strHome.length() > 3) // root dir = "c:/"; "//" is not really valid... if (strHome.length() > 3) // root dir = "c:/"; "//" is not really valid...
QVERIFY(!strHome.endsWith('/')); QVERIFY(!strHome.endsWith('/'));

View File

@ -1055,11 +1055,11 @@ signals:
void tst_QDBusConnection::serviceRegistrationRaceCondition() void tst_QDBusConnection::serviceRegistrationRaceCondition()
{ {
// There was a race condition in the updating of list of name owners in // There was a race condition in the updating of list of name owners in
// QtDBus. When the user connects to a signal coming from a given // Qt D-Bus. When the user connects to a signal coming from a given
// service, we must listen for NameOwnerChanged signals relevant to that // service, we must listen for NameOwnerChanged signals relevant to that
// name and update when the owner changes. However, it's possible that we // name and update when the owner changes. However, it's possible that we
// receive in one chunk from the server both the NameOwnerChanged signal // receive in one chunk from the server both the NameOwnerChanged signal
// about the service and the signal we're interested in. Since QtDBus // about the service and the signal we're interested in. Since Qt D-Bus
// posts events in order to handle the incoming signals, the update // posts events in order to handle the incoming signals, the update
// happens too late. // happens too late.

View File

@ -1598,7 +1598,7 @@ void tst_QGL::fboFormat()
void tst_QGL::testDontCrashOnDanglingResources() void tst_QGL::testDontCrashOnDanglingResources()
{ {
// We have a number of Q_GLOBAL_STATICS inside the Qt OpenGL // We have a number of Q_GLOBAL_STATICS inside the Qt OpenGL
// library. This test is verify that we don't crash as a result of // module. This test is verify that we don't crash as a result of
// them calling into libgl on application shutdown. // them calling into libgl on application shutdown.
QWidget *widget = new UnclippedWidget(); QWidget *widget = new UnclippedWidget();
widget->show(); widget->show();

View File

@ -501,7 +501,7 @@ static inline QProcessEnvironment processEnvironment()
{ {
QProcessEnvironment result; QProcessEnvironment result;
insertEnvironmentVariable(QStringLiteral("PATH"), result); insertEnvironmentVariable(QStringLiteral("PATH"), result);
// Preserve DISPLAY for X11 as some tests use QtGui. // Preserve DISPLAY for X11 as some tests use Qt GUI.
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
insertEnvironmentVariable(QStringLiteral("DISPLAY"), result); insertEnvironmentVariable(QStringLiteral("DISPLAY"), result);
#endif #endif

View File

@ -1244,17 +1244,17 @@ void tst_QAbstractSlider::setRepeatAction()
QCOMPARE(slider->value(), 55); QCOMPARE(slider->value(), 55);
waitUntilTimeElapsed(t, 550); waitUntilTimeElapsed(t, 550);
QCOMPARE(spy.count(), 1); QTRY_COMPARE(spy.count(), 1);
QCOMPARE(slider->value(), 65); QCOMPARE(slider->value(), 65);
QCOMPARE(spy.at(0).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd); QCOMPARE(spy.at(0).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
waitUntilTimeElapsed(t, 790); waitUntilTimeElapsed(t, 790);
QCOMPARE(spy.count(), 2); QTRY_COMPARE(spy.count(), 2);
QCOMPARE(slider->value(), 75); QCOMPARE(slider->value(), 75);
QCOMPARE(spy.at(1).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd); QCOMPARE(spy.at(1).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
waitUntilTimeElapsed(t, 1790); waitUntilTimeElapsed(t, 1790);
QCOMPARE(spy.count(), 6); QTRY_COMPARE(spy.count(), 6);
QCOMPARE(slider->value(), 115); QCOMPARE(slider->value(), 115);
QCOMPARE(spy.at(4).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd); QCOMPARE(spy.at(4).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
QCOMPARE(spy.at(5).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd); QCOMPARE(spy.at(5).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);

View File

@ -3317,18 +3317,18 @@ void Configure::displayConfig()
// Give some feedback // Give some feedback
sout << "Environment:" << endl; sout << "Environment:" << endl;
QString env = QString::fromLocal8Bit(getenv("INCLUDE")).replace(QRegExp("[;,]"), "\r\n "); QString env = QString::fromLocal8Bit(getenv("INCLUDE")).replace(QRegExp("[;,]"), "\n ");
if (env.isEmpty()) if (env.isEmpty())
env = "Unset"; env = "Unset";
sout << " INCLUDE=\r\n " << env << endl; sout << " INCLUDE=\n " << env << endl;
env = QString::fromLocal8Bit(getenv("LIB")).replace(QRegExp("[;,]"), "\r\n "); env = QString::fromLocal8Bit(getenv("LIB")).replace(QRegExp("[;,]"), "\n ");
if (env.isEmpty()) if (env.isEmpty())
env = "Unset"; env = "Unset";
sout << " LIB=\r\n " << env << endl; sout << " LIB=\n " << env << endl;
env = QString::fromLocal8Bit(getenv("PATH")).replace(QRegExp("[;,]"), "\r\n "); env = QString::fromLocal8Bit(getenv("PATH")).replace(QRegExp("[;,]"), "\n ");
if (env.isEmpty()) if (env.isEmpty())
env = "Unset"; env = "Unset";
sout << " PATH=\r\n " << env << endl; sout << " PATH=\n " << env << endl;
if (dictionary[QStringLiteral("EDITION")] != QStringLiteral("OpenSource")) { if (dictionary[QStringLiteral("EDITION")] != QStringLiteral("OpenSource")) {
QString l1 = licenseInfo[ "LICENSEE" ]; QString l1 = licenseInfo[ "LICENSEE" ];
@ -3342,9 +3342,9 @@ void Configure::displayConfig()
} }
sout << "Configuration:" << endl; sout << "Configuration:" << endl;
sout << " " << qmakeConfig.join("\r\n ") << endl; sout << " " << qmakeConfig.join("\n ") << endl;
sout << "Qt Configuration:" << endl; sout << "Qt Configuration:" << endl;
sout << " " << qtConfig.join("\r\n ") << endl; sout << " " << qtConfig.join("\n ") << endl;
sout << endl; sout << endl;
if (dictionary.contains("XQMAKESPEC")) if (dictionary.contains("XQMAKESPEC"))