Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
This commit is contained in:
commit
02ba93dd3d
32
configure
vendored
32
configure
vendored
@ -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
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
@ -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>"));
|
||||||
}
|
}
|
||||||
|
BIN
examples/widgets/doc/images/completer-example-dirmodel.png
Normal file
BIN
examples/widgets/doc/images/completer-example-dirmodel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
examples/widgets/doc/images/completer-example-qdirmodel.png
Normal file
BIN
examples/widgets/doc/images/completer-example-qdirmodel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -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
|
||||||
|
@ -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.
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -94,7 +94,7 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) {
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// initialize QtCore application
|
// initialize Qt Core application
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
|
|
||||||
// get a list of all html files in the current directory
|
// get a list of all html files in the current directory
|
||||||
|
@ -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 = $$[QT_INSTALL_LIBS]/
|
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||||
contains(CMAKE_LIB_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
|
contains(CMAKE_LIB_DIR, "^\.\.") {
|
||||||
CMAKE_LIB_DIR = $$replace(CMAKE_LIB_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
|
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
|
||||||
CMAKE_RELATIVE_INSTALL_DIR = $$replace(CMAKE_LIB_DIR, "[^/]+", ..)
|
CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||||
|
} else {
|
||||||
|
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 = $$[QT_HOST_BINS]/
|
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
||||||
contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
|
contains(CMAKE_BIN_DIR, "^\.\.") {
|
||||||
CMAKE_BIN_DIR = $$replace(CMAKE_BIN_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
|
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
||||||
} 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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 (!ret.isEmpty())
|
||||||
if(project->isEmpty(replace_rule) || project->isActiveConfig("no_sed_meta_install")) {
|
ret += "\n\t";
|
||||||
if(!ret.isEmpty())
|
ret += installMetaFile(ProKey("QMAKE_" + type.toUpper() + "_INSTALL_REPLACE"), src_meta, dst_meta);
|
||||||
ret += "\n\t";
|
|
||||||
ret += "-" + install_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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
@ -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;
|
||||||
|
@ -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(' ');
|
||||||
|
@ -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 + "\"");
|
||||||
|
2
src/3rdparty/zlib/zconf.h
vendored
2
src/3rdparty/zlib/zconf.h
vendored
@ -8,7 +8,7 @@
|
|||||||
#ifndef ZCONF_H
|
#ifndef ZCONF_H
|
||||||
#define ZCONF_H
|
#define ZCONF_H
|
||||||
|
|
||||||
/* Since QtCore must export these symbols, define Z_PREFIX to avoid clashes system zlib */
|
/* Since Qt Core must export these symbols, define Z_PREFIX to avoid clashes system zlib */
|
||||||
#define Z_PREFIX
|
#define Z_PREFIX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -42,13 +42,13 @@
|
|||||||
(keyboard shortcut) is a child of the relevant window, so when the
|
(keyboard shortcut) is a child of the relevant window, so when the
|
||||||
user closes that window, the shortcut is deleted too.
|
user closes that window, the shortcut is deleted too.
|
||||||
|
|
||||||
\l QQuickItem, the basic visual element of the QtQuick module, inherits
|
\l QQuickItem, the basic visual element of the Qt Quick module, inherits
|
||||||
from QObject, but has a concept of the \e {visual parent} which
|
from QObject, but has a concept of the \e {visual parent} which
|
||||||
differs from that of the \e {QObject parent}. An item's visual parent
|
differs from that of the \e {QObject parent}. An item's visual parent
|
||||||
may not necessarily be the same as its object parent. See
|
may not necessarily be the same as its object parent. See
|
||||||
\l {Concepts - Visual Parent in Qt Quick} for more details.
|
\l {Concepts - Visual Parent in Qt Quick} for more details.
|
||||||
|
|
||||||
\l QWidget, the fundamental class of the QtWidgets module,
|
\l QWidget, the fundamental class of the Qt Widgets module,
|
||||||
extends the parent-child relationship. A child normally also becomes a
|
extends the parent-child relationship. A child normally also becomes a
|
||||||
child widget, i.e. it is displayed in its parent's coordinate system
|
child widget, i.e. it is displayed in its parent's coordinate system
|
||||||
and is graphically clipped by its parent's boundaries. For example,
|
and is graphically clipped by its parent's boundaries. For example,
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
Since the higher-level API is built on top of the lower-level API,
|
Since the higher-level API is built on top of the lower-level API,
|
||||||
some issues are common to both.
|
some issues are common to both.
|
||||||
|
|
||||||
If you want to provide plugins for use with Qt Designer, see the QtDesigner
|
If you want to provide plugins for use with Qt Designer, see the Qt Designer
|
||||||
module documentation.
|
module documentation.
|
||||||
|
|
||||||
Topics:
|
Topics:
|
||||||
|
@ -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
|
||||||
|
@ -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: ???
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
|
@ -1063,7 +1063,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
|
|||||||
The QAbstractItemModel class is one of the \l{Model/View Classes}
|
The QAbstractItemModel class is one of the \l{Model/View Classes}
|
||||||
and is part of Qt's \l{Model/View Programming}{model/view framework}. It
|
and is part of Qt's \l{Model/View Programming}{model/view framework}. It
|
||||||
can be used as the underlying data model for the item view elements in
|
can be used as the underlying data model for the item view elements in
|
||||||
QML or the item view classes in the QtWidgets module.
|
QML or the item view classes in the Qt Widgets module.
|
||||||
|
|
||||||
If you need a model to use with an item view such as QML's List View
|
If you need a model to use with an item view such as QML's List View
|
||||||
element or the C++ widgets QListView or QTableView, you should consider
|
element or the C++ widgets QListView or QTableView, you should consider
|
||||||
|
@ -789,7 +789,7 @@ void QCoreApplication::setQuitLockEnabled(bool enabled)
|
|||||||
*/
|
*/
|
||||||
bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|
bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|
||||||
{
|
{
|
||||||
// Make it possible for QtScript to hook into events even
|
// Make it possible for Qt Script to hook into events even
|
||||||
// though QApplication is subclassed...
|
// though QApplication is subclassed...
|
||||||
bool result = false;
|
bool result = false;
|
||||||
void *cbdata[] = { receiver, event, &result };
|
void *cbdata[] = { receiver, event, &result };
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
@ -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}
|
||||||
*/
|
*/
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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()
|
||||||
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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()).
|
||||||
|
|
||||||
|
@ -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}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -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" :
|
||||||
|
@ -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)}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -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()
|
||||||
|
@ -96,7 +96,7 @@ void QDBusMetaTypeId::init()
|
|||||||
// reentrancy is not a problem since everything else is locked on their own
|
// reentrancy is not a problem since everything else is locked on their own
|
||||||
// set the guard variable at the end
|
// set the guard variable at the end
|
||||||
if (!initialized.load()) {
|
if (!initialized.load()) {
|
||||||
// register our types with QtCore (calling qMetaTypeId<T>() does this implicitly)
|
// register our types with Qt Core (calling qMetaTypeId<T>() does this implicitly)
|
||||||
(void)message();
|
(void)message();
|
||||||
(void)argument();
|
(void)argument();
|
||||||
(void)variant();
|
(void)variant();
|
||||||
@ -106,7 +106,7 @@ void QDBusMetaTypeId::init()
|
|||||||
(void)unixfd();
|
(void)unixfd();
|
||||||
|
|
||||||
#ifndef QDBUS_NO_SPECIALTYPES
|
#ifndef QDBUS_NO_SPECIALTYPES
|
||||||
// and register QtCore's with us
|
// and register Qt Core's with us
|
||||||
registerHelper<QDate>();
|
registerHelper<QDate>();
|
||||||
registerHelper<QTime>();
|
registerHelper<QTime>();
|
||||||
registerHelper<QDateTime>();
|
registerHelper<QDateTime>();
|
||||||
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -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,
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const
|
|||||||
static inline QString typeNameToXml(const char *typeName)
|
static inline QString typeNameToXml(const char *typeName)
|
||||||
{
|
{
|
||||||
// ### copied from qtextdocument.cpp
|
// ### copied from qtextdocument.cpp
|
||||||
// ### move this into QtCore at some point
|
// ### move this into Qt Core at some point
|
||||||
QString plain = QLatin1String(typeName);
|
QString plain = QLatin1String(typeName);
|
||||||
QString rich;
|
QString rich;
|
||||||
rich.reserve(int(plain.length() * 1.1));
|
rich.reserve(int(plain.length() * 1.1));
|
||||||
|
@ -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
|
||||||
|
@ -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.
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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");
|
||||||
|
@ -732,10 +732,10 @@ void QFontEngineMultiQPA::setFallbackFamiliesList(const QStringList &fallbacks)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is used indirectly by QtWebKit when using QTextLayout::setRawFont
|
This is used indirectly by Qt WebKit when using QTextLayout::setRawFont
|
||||||
|
|
||||||
The purpose of this is to provide the necessary font fallbacks when drawing complex
|
The purpose of this is to provide the necessary font fallbacks when drawing complex
|
||||||
text. Since QtWebKit ends up repeatedly creating QTextLayout instances and passing them
|
text. Since Qt WebKit ends up repeatedly creating QTextLayout instances and passing them
|
||||||
the same raw font over and over again, we want to cache the corresponding multi font engine
|
the same raw font over and over again, we want to cache the corresponding multi font engine
|
||||||
as it may contain fallback font engines already.
|
as it may contain fallback font engines already.
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -470,7 +470,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
|
|||||||
}
|
}
|
||||||
// - Changing values in QAuthenticator will reset the 'phase'. Therefore if it is still "Done"
|
// - Changing values in QAuthenticator will reset the 'phase'. Therefore if it is still "Done"
|
||||||
// then nothing was filled in by the user or the cache
|
// then nothing was filled in by the user or the cache
|
||||||
// - If withCredentials has been set to false (e.g. by QtWebKit for a cross-origin XMLHttpRequest) then
|
// - If withCredentials has been set to false (e.g. by Qt WebKit for a cross-origin XMLHttpRequest) then
|
||||||
// we need to bail out if authentication is required.
|
// we need to bail out if authentication is required.
|
||||||
if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) {
|
if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) {
|
||||||
// Reset authenticator so the next request on that channel does not get messed up
|
// Reset authenticator so the next request on that channel does not get messed up
|
||||||
|
@ -231,7 +231,7 @@ bool QHttpNetworkConnectionChannel::sendRequest()
|
|||||||
url.setUserInfo(QString());
|
url.setUserInfo(QString());
|
||||||
request.setUrl(url);
|
request.setUrl(url);
|
||||||
}
|
}
|
||||||
// Will only be false if QtWebKit is performing a cross-origin XMLHttpRequest
|
// Will only be false if Qt WebKit is performing a cross-origin XMLHttpRequest
|
||||||
// and withCredentials has not been set to true.
|
// and withCredentials has not been set to true.
|
||||||
if (request.withCredentials())
|
if (request.withCredentials())
|
||||||
connection->d_func()->createAuthorization(socket, request);
|
connection->d_func()->createAuthorization(socket, request);
|
||||||
|
@ -186,7 +186,7 @@ QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(QNetworkAccessManager* const manage
|
|||||||
|
|
||||||
|
|
||||||
// Internal code that does a HTTP reply for the synchronous Ajax
|
// Internal code that does a HTTP reply for the synchronous Ajax
|
||||||
// in QtWebKit.
|
// in Qt WebKit.
|
||||||
QVariant synchronousHttpAttribute = request.attribute(
|
QVariant synchronousHttpAttribute = request.attribute(
|
||||||
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::SynchronousRequestAttribute));
|
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::SynchronousRequestAttribute));
|
||||||
if (synchronousHttpAttribute.isValid()) {
|
if (synchronousHttpAttribute.isValid()) {
|
||||||
|
@ -361,7 +361,7 @@ void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const
|
|||||||
|
|
||||||
q->QIODevice::open(QIODevice::ReadOnly);
|
q->QIODevice::open(QIODevice::ReadOnly);
|
||||||
// Internal code that does a HTTP reply for the synchronous Ajax
|
// Internal code that does a HTTP reply for the synchronous Ajax
|
||||||
// in QtWebKit.
|
// in Qt WebKit.
|
||||||
QVariant synchronousHttpAttribute = req.attribute(
|
QVariant synchronousHttpAttribute = req.attribute(
|
||||||
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::SynchronousRequestAttribute));
|
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::SynchronousRequestAttribute));
|
||||||
// The synchronous HTTP is a corner case, we will put all upload data in one big QByteArray in the outgoingDataBuffer.
|
// The synchronous HTTP is a corner case, we will put all upload data in one big QByteArray in the outgoingDataBuffer.
|
||||||
|
@ -204,7 +204,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
\value CookieLoadControlAttribute
|
\value CookieLoadControlAttribute
|
||||||
Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic)
|
Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic)
|
||||||
Indicates whether to send 'Cookie' headers in the request.
|
Indicates whether to send 'Cookie' headers in the request.
|
||||||
This attribute is set to false by QtWebKit when creating a cross-origin
|
This attribute is set to false by Qt WebKit when creating a cross-origin
|
||||||
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
||||||
Javascript that created the request.
|
Javascript that created the request.
|
||||||
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag}{here} for more information.
|
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag}{here} for more information.
|
||||||
@ -214,7 +214,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic)
|
Requests only, type: QMetaType::Int (default: QNetworkRequest::Automatic)
|
||||||
Indicates whether to save 'Cookie' headers received from the server in reply
|
Indicates whether to save 'Cookie' headers received from the server in reply
|
||||||
to the request.
|
to the request.
|
||||||
This attribute is set to false by QtWebKit when creating a cross-origin
|
This attribute is set to false by Qt WebKit when creating a cross-origin
|
||||||
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
||||||
Javascript that created the request.
|
Javascript that created the request.
|
||||||
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
|
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
|
||||||
@ -226,7 +226,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
if available. If this is set to QNetworkRequest::Manual and the authentication
|
if available. If this is set to QNetworkRequest::Manual and the authentication
|
||||||
mechanism is 'Basic' or 'Digest', Qt will not send an an 'Authorization' HTTP
|
mechanism is 'Basic' or 'Digest', Qt will not send an an 'Authorization' HTTP
|
||||||
header with any cached credentials it may have for the request's URL.
|
header with any cached credentials it may have for the request's URL.
|
||||||
This attribute is set to QNetworkRequest::Manual by QtWebKit when creating a cross-origin
|
This attribute is set to QNetworkRequest::Manual by Qt WebKit when creating a cross-origin
|
||||||
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
XMLHttpRequest where withCredentials has not been set explicitly to true by the
|
||||||
Javascript that created the request.
|
Javascript that created the request.
|
||||||
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
|
See \l{http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag} {here} for more information.
|
||||||
@ -286,7 +286,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
\since 4.7
|
\since 4.7
|
||||||
|
|
||||||
Indicates if an aspect of the request's loading mechanism has been
|
Indicates if an aspect of the request's loading mechanism has been
|
||||||
manually overridden, e.g. by QtWebKit.
|
manually overridden, e.g. by Qt WebKit.
|
||||||
|
|
||||||
\value Automatic default value: indicates default behaviour.
|
\value Automatic default value: indicates default behaviour.
|
||||||
|
|
||||||
@ -584,7 +584,7 @@ void QNetworkRequest::setSslConfiguration(const QSslConfiguration &config)
|
|||||||
Allows setting a reference to the \a object initiating
|
Allows setting a reference to the \a object initiating
|
||||||
the request.
|
the request.
|
||||||
|
|
||||||
For example QtWebKit sets the originating object to the
|
For example Qt WebKit sets the originating object to the
|
||||||
QWebFrame that initiated the request.
|
QWebFrame that initiated the request.
|
||||||
|
|
||||||
\sa originatingObject()
|
\sa originatingObject()
|
||||||
@ -1036,7 +1036,7 @@ QDateTime QNetworkHeadersPrivate::fromHttpDate(const QByteArray &value)
|
|||||||
dt = QDateTime::fromString(QString::fromLatin1(value), Qt::TextDate);
|
dt = QDateTime::fromString(QString::fromLatin1(value), Qt::TextDate);
|
||||||
} else {
|
} else {
|
||||||
// Use sscanf over QLocal/QDateTimeParser for speed reasons. See the
|
// Use sscanf over QLocal/QDateTimeParser for speed reasons. See the
|
||||||
// QtWebKit performance benchmarks to get an idea.
|
// Qt WebKit performance benchmarks to get an idea.
|
||||||
if (pos == 3) {
|
if (pos == 3) {
|
||||||
char month_name[4];
|
char month_name[4];
|
||||||
int day, year, hour, minute, second;
|
int day, year, hour, minute, second;
|
||||||
|
@ -73,6 +73,6 @@
|
|||||||
using code from the OpenSSL project are correctly certified for import
|
using code from the OpenSSL project are correctly certified for import
|
||||||
and export in relevant regions of the world.
|
and export in relevant regions of the world.
|
||||||
|
|
||||||
When the QtNetwork module is built with SSL support, the library is linked
|
When the Qt Network module is built with SSL support, the library is linked
|
||||||
against OpenSSL in a way that requires OpenSSL license compliance.
|
against OpenSSL in a way that requires OpenSSL license compliance.
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
/*! \namespace QSsl
|
/*! \namespace QSsl
|
||||||
|
|
||||||
\brief The QSsl namespace declares enums common to all SSL classes in QtNetwork.
|
\brief The QSsl namespace declares enums common to all SSL classes in Qt Network.
|
||||||
\since 4.3
|
\since 4.3
|
||||||
|
|
||||||
\ingroup network
|
\ingroup network
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\page qtopengl-index.html
|
\page qtopengl-index.html
|
||||||
\title Qt OpenGL
|
\title Qt OpenGL
|
||||||
\brief The QtOpenGL module offers classes that make it easy to
|
\brief The Qt OpenGL module offers classes that make it easy to
|
||||||
use OpenGL in Qt applications.
|
use OpenGL in Qt applications.
|
||||||
|
|
||||||
\warning Apart from the \l{QGLWidget} class, this module should not be used
|
\warning Apart from the \l{QGLWidget} class, this module should not be used
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
\ingroup modules
|
\ingroup modules
|
||||||
\ingroup technology-apis
|
\ingroup technology-apis
|
||||||
|
|
||||||
\brief The QtOpenGL module offers classes that make it easy to
|
\brief The Qt OpenGL module offers classes that make it easy to
|
||||||
use OpenGL in Qt applications.
|
use OpenGL in Qt applications.
|
||||||
|
|
||||||
\warning Apart from the \l{QGLWidget} class, this module should not be used
|
\warning Apart from the \l{QGLWidget} class, this module should not be used
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
// -------------
|
// -------------
|
||||||
//
|
//
|
||||||
// This file is not part of the Qt API. It exists for the convenience
|
// This file is not part of the Qt API. It exists for the convenience
|
||||||
// of the QtOpenGL module. This header file may change from
|
// of the Qt OpenGL module. This header file may change from
|
||||||
// version to version without notice, or even be removed.
|
// version to version without notice, or even be removed.
|
||||||
//
|
//
|
||||||
// We mean it.
|
// We mean it.
|
||||||
|
@ -881,7 +881,7 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions()
|
|||||||
void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window)
|
void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window)
|
||||||
{
|
{
|
||||||
// We need to start spinning the modal session. Usually this is done with
|
// We need to start spinning the modal session. Usually this is done with
|
||||||
// QDialog::exec() for QtWidgets based applications, but for others that
|
// QDialog::exec() for Qt Widgets based applications, but for others that
|
||||||
// just call show(), we need to interrupt(). We call this here, before
|
// just call show(), we need to interrupt(). We call this here, before
|
||||||
// setting currentModalSessionCached to zero, so that interrupt() calls
|
// setting currentModalSessionCached to zero, so that interrupt() calls
|
||||||
// [NSApp abortModal] if another modal session is currently running
|
// [NSApp abortModal] if another modal session is currently running
|
||||||
|
@ -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) {
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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,19 +1113,46 @@ 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()
|
||||||
{
|
{
|
||||||
// Properties accessed by QWin32PrintEngine (QtPrintSupport)
|
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)
|
||||||
static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
|
static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
|
||||||
static const int logFontMetaTypeId = qRegisterMetaType<LOGFONT>();
|
static const int logFontMetaTypeId = qRegisterMetaType<LOGFONT>();
|
||||||
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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -135,7 +135,7 @@ public:
|
|||||||
|
|
||||||
const QSharedPointer<QWindowsFontEngineData> &fontEngineData() const { return m_fontEngineData; }
|
const QSharedPointer<QWindowsFontEngineData> &fontEngineData() const { return m_fontEngineData; }
|
||||||
|
|
||||||
// Properties accessed by QWin32PrintEngine (QtPrintSupport)
|
// Properties accessed by QWin32PrintEngine (Qt Print Support)
|
||||||
LOGFONT logFont() const { return m_logfont; }
|
LOGFONT logFont() const { return m_logfont; }
|
||||||
HFONT hFont() const { return hfont; }
|
HFONT hFont() const { return hfont; }
|
||||||
bool trueType() const { return ttf; }
|
bool trueType() const { return ttf; }
|
||||||
|
@ -456,10 +456,10 @@ QPlatformOpenGLContext
|
|||||||
|
|
||||||
#ifdef Q_OS_WINCE
|
#ifdef Q_OS_WINCE
|
||||||
// It's not easy to detect if we are running a QML application
|
// It's not easy to detect if we are running a QML application
|
||||||
// Let's try to do so by checking if the QtQuick module is loaded.
|
// Let's try to do so by checking if the Qt Quick module is loaded.
|
||||||
inline bool isQMLApplication()
|
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
|
||||||
|
@ -114,7 +114,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters)
|
|||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -658,7 +658,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
|
|||||||
|
|
||||||
This function splits the argument into one of those
|
This function splits the argument into one of those
|
||||||
two forms. The three part form is the old form, which
|
two forms. The three part form is the old form, which
|
||||||
was used before the creation of QtQuick 2 and Qt
|
was used before the creation of Qt Quick 2 and Qt
|
||||||
Components. A <QML-module> is the QML equivalent of a
|
Components. A <QML-module> is the QML equivalent of a
|
||||||
C++ namespace. So this function splits \a arg on "::"
|
C++ namespace. So this function splits \a arg on "::"
|
||||||
and stores the parts in \a type, \a module, \a element,
|
and stores the parts in \a type, \a module, \a element,
|
||||||
|
@ -533,7 +533,7 @@
|
|||||||
A QML type belongs to a \e module. The module
|
A QML type belongs to a \e module. The module
|
||||||
may include all the related types for a platform or contain a certain
|
may include all the related types for a platform or contain a certain
|
||||||
version of \l{Qt Quick}. For example, the Qt Quick 2 \l{QML Elements} belong
|
version of \l{Qt Quick}. For example, the Qt Quick 2 \l{QML Elements} belong
|
||||||
to the QtQuick2 module while there is also a QtQuick1 module for the older
|
to the Qt Quick 2 module while there is also a Qt Quick 1 module for the older
|
||||||
types introduced in Qt 4.
|
types introduced in Qt 4.
|
||||||
|
|
||||||
QML modules allow grouping QML types. The \l{qmltype-command}
|
QML modules allow grouping QML types. The \l{qmltype-command}
|
||||||
@ -575,7 +575,7 @@
|
|||||||
point for readers to find instructional and reference materials that do,
|
point for readers to find instructional and reference materials that do,
|
||||||
such as tutorials, examples and class documentation. An example of an
|
such as tutorials, examples and class documentation. An example of an
|
||||||
overview might be a product page, such as a top level discussion of
|
overview might be a product page, such as a top level discussion of
|
||||||
QtQuick, individual modules, design principles, or tools.
|
Qt Quick, individual modules, design principles, or tools.
|
||||||
|
|
||||||
To signify that a document is an article, you append the article keyword
|
To signify that a document is an article, you append the article keyword
|
||||||
to the \\page command:
|
to the \\page command:
|
||||||
|
@ -5024,9 +5024,9 @@
|
|||||||
/ *!
|
/ *!
|
||||||
\module QtNetwork
|
\module QtNetwork
|
||||||
|
|
||||||
\title QtNetwork Module
|
\title Qt Network Module
|
||||||
|
|
||||||
\brief The QtNetwork module offers classes that allow
|
\brief The Qt Network module offers classes that allow
|
||||||
you to write TCP/IP clients and servers.
|
you to write TCP/IP clients and servers.
|
||||||
|
|
||||||
The network module provides classes to make network
|
The network module provides classes to make network
|
||||||
@ -5042,10 +5042,10 @@
|
|||||||
|
|
||||||
\quotation
|
\quotation
|
||||||
\raw HTML
|
\raw HTML
|
||||||
<h1><center>QtNetwork Module</center></h1>
|
<h1><center>Qt Network Module</center></h1>
|
||||||
\endraw
|
\endraw
|
||||||
|
|
||||||
The QtNetwork module offers classes that allow you to
|
The Qt Network module offers classes that allow you to
|
||||||
write TCP/IP clients and servers.\l {module
|
write TCP/IP clients and servers.\l {module
|
||||||
details} {More...}
|
details} {More...}
|
||||||
|
|
||||||
@ -5083,7 +5083,7 @@
|
|||||||
<h2>Detailed Description</h2>
|
<h2>Detailed Description</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The QtNetwork module offers classes that allow you to
|
The Qt Network module offers classes that allow you to
|
||||||
write TCP/IP clients and servers.
|
write TCP/IP clients and servers.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -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.
|
||||||
|
@ -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.
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
@ -381,7 +381,7 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect)
|
|||||||
efficient way to add reasonable online help facilities to
|
efficient way to add reasonable online help facilities to
|
||||||
applications, and to provide a basis for rich text editors. If
|
applications, and to provide a basis for rich text editors. If
|
||||||
you find the HTML support insufficient for your needs you may consider
|
you find the HTML support insufficient for your needs you may consider
|
||||||
the use of QtWebKit, which provides a full-featured web browser
|
the use of Qt WebKit, which provides a full-featured web browser
|
||||||
widget.
|
widget.
|
||||||
|
|
||||||
The shape of the mouse cursor on a QTextEdit is Qt::IBeamCursor by default.
|
The shape of the mouse cursor on a QTextEdit is Qt::IBeamCursor by default.
|
||||||
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -31,10 +31,10 @@ qt5_generate_moc("${main_file}" "${moc_file}")
|
|||||||
|
|
||||||
# The core_test is expected to fail to build because
|
# The core_test is expected to fail to build because
|
||||||
# QT_GUI_LIB is defined, which affects the contents of
|
# QT_GUI_LIB is defined, which affects the contents of
|
||||||
# QtTest 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}")
|
||||||
|
@ -34,8 +34,8 @@ 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 QtWidgets.
|
# 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)
|
||||||
add_executable(core_test "${main_file}" "${moc_file}")
|
add_executable(core_test "${main_file}" "${moc_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('/'));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user