Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/widgets/styles/qmacstyle_mac.mm Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
This commit is contained in:
commit
f4900d340a
10
configure
vendored
10
configure
vendored
@ -2815,8 +2815,14 @@ if [ -z "$QT_INSTALL_BINS" ]; then #default
|
||||
fi
|
||||
QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
|
||||
|
||||
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
||||
QT_INSTALL_LIBEXECS_DIRNAME="lib"
|
||||
else
|
||||
QT_INSTALL_LIBEXECS_DIRNAME="libexec"
|
||||
fi
|
||||
|
||||
if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default
|
||||
QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/libexec" #fallback
|
||||
QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/$$QT_INSTALL_LIBEXECS_DIRNAME" #fallback
|
||||
fi
|
||||
QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"`
|
||||
|
||||
@ -3038,7 +3044,7 @@ Installation options:
|
||||
-plugindir <dir> ...... Plugins will be installed to <dir>
|
||||
(default ARCHDATADIR/plugins)
|
||||
-libexecdir <dir> ..... Program executables will be installed to <dir>
|
||||
(default ARCHDATADIR/libexec)
|
||||
(default ARCHDATADIR/$QT_INSTALL_LIBEXECS_DIRNAME)
|
||||
-importdir <dir> ...... Imports for QML1 will be installed to <dir>
|
||||
(default ARCHDATADIR/imports)
|
||||
-qmldir <dir> ......... Imports for QML2 will be installed to <dir>
|
||||
|
6
dist/changes-5.0.2
vendored
6
dist/changes-5.0.2
vendored
@ -107,6 +107,12 @@ Qt for Windows CE
|
||||
* Tools *
|
||||
****************************************************************************
|
||||
|
||||
qmake
|
||||
-----
|
||||
|
||||
- $$(VAR) style environment variable expansions will not split on
|
||||
whitespace any more. Use $$split() if necessary.
|
||||
|
||||
|
||||
****************************************************************************
|
||||
* Plugins *
|
||||
|
33
doc/global/manifest-meta.qdocconf
Normal file
33
doc/global/manifest-meta.qdocconf
Normal file
@ -0,0 +1,33 @@
|
||||
# Additional meta information (attributes for matched entries, as well as tags)
|
||||
# to be added to manifest.xml files.
|
||||
#
|
||||
# manifestmeta.filters = <filter1>,<filter2>,...
|
||||
#
|
||||
# manifestmeta.<filter>.names = <Module1>/<name1>,<Module2>/<name2>,..
|
||||
# manifestmeta.<filter>.attributes = <attribute1:value1>,<attribute2:value2>,..
|
||||
# manifestmeta.<filter>.tags = <tag1>,<tag2>,..
|
||||
#
|
||||
# <filter>.names specify all the module/name combinations to apply the
|
||||
# attributes/tags to. You can use simple wildcard matching by appending
|
||||
# '*' at the end of name.
|
||||
#
|
||||
# Note: You cannot use operators (+, =, -) in the names.
|
||||
#
|
||||
# Examples: add a 'isHighlighted' attribute for two 'Analog Clock' examples,
|
||||
# add a 'database' tag for QtSql all examples, a 'webkit' tag for QtWebKit
|
||||
# examples, and a 'qt5' tag for all examples
|
||||
#
|
||||
# manifestmeta.filters = highlighted sql webkit global
|
||||
#
|
||||
# manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \
|
||||
# "QtWidgets/Analog Clock Example"
|
||||
# manifestmeta.highlighted.attributes = isHighlighted:true
|
||||
#
|
||||
# manifestmeta.sql.names = "QtSql/*"
|
||||
# manifestmeta.sql.tags = database
|
||||
#
|
||||
# manifestmeta.webkit.names = "QtWebKitExamples/*"
|
||||
# manifestmeta.webkit.tags = webkit
|
||||
#
|
||||
# manifestmeta.global.names = *
|
||||
# manifestmeta.global.tags = qt5
|
@ -3,6 +3,7 @@ include(qt-cpp-ignore.qdocconf)
|
||||
include(qt-defines.qdocconf)
|
||||
include(qt-html-templates-offline.qdocconf)
|
||||
include(compat.qdocconf)
|
||||
include(manifest-meta.qdocconf)
|
||||
|
||||
dita.metadata.default.author = Qt Project
|
||||
dita.metadata.default.permissions = all
|
||||
|
@ -290,14 +290,10 @@ box-shadow: 0px 0px 0px #fff;
|
||||
background-color: #F6F6F6;
|
||||
border: 1px solid #E6E6E6;
|
||||
border-collapse: separate;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 25px;
|
||||
margin-left: 15px;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 25px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
|
||||
@ -451,6 +447,9 @@ padding: 3px 5px 3px 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.qmldoc {
|
||||
margin-left: 15px;
|
||||
}
|
||||
/*
|
||||
-----------
|
||||
Content table
|
||||
|
@ -563,6 +563,10 @@ padding: 3px 5px 3px 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.qmldoc {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/*
|
||||
-----------
|
||||
Content table
|
||||
|
@ -36,14 +36,24 @@ CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.)
|
||||
CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
|
||||
!isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"
|
||||
|
||||
# Several distros (ArchLinux, Fedora) have in the past installed libraries
|
||||
# in /lib(64)?, but are now moving to install libraries in /usr/lib(64)?/.
|
||||
# The /lib paths are made symlinks to the /usr/lib paths. If someone searching
|
||||
# for a Qt 5 package finds it in /lib/cmake/Qt5Core, although it has been
|
||||
# installed in /usr/lib/cmake/Qt5Core, relative paths to the includes and
|
||||
# executables will not work. So, we treat installations to /usr as non-relocatable
|
||||
# packages with absolute paths.
|
||||
CMAKE_INSTALL_LIBS_DIR = $$[QT_INSTALL_LIBS]
|
||||
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_FORCE_ABSOLUTE_PATHS = True
|
||||
|
||||
CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
||||
!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
||||
CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
|
||||
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
||||
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_LIB_DIR, "^\\.\\./.*") {
|
||||
!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
||||
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
|
||||
CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||
} else {
|
||||
@ -54,13 +64,13 @@ contains(CMAKE_LIB_DIR, "^\\.\\./.*") {
|
||||
}
|
||||
|
||||
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
||||
!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
||||
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
||||
CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
||||
CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs
|
||||
!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs
|
||||
CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/
|
||||
CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
# fixExclusiveOutputDirs(1config, 2config)
|
||||
# Change all output paths that references 2config to have the string 1config in them
|
||||
defineTest(fixExclusiveOutputDirs) {
|
||||
unset(firstBuild)
|
||||
unset(secondBuild)
|
||||
unset(appendFirstBuild)
|
||||
firstBuild = $$1
|
||||
secondBuild = $$2
|
||||
count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false
|
||||
@ -29,11 +26,6 @@ defineTest(fixExclusiveOutputDirs) {
|
||||
# addExclusiveBuilds(1config, 1name, 2config, 2name)
|
||||
# Adds two BUILDS which are exclusive to each other.
|
||||
defineTest(addExclusiveBuilds) {
|
||||
unset(firstBuild)
|
||||
unset(firstBuildName)
|
||||
unset(secondBuild)
|
||||
unset(secondBuildName)
|
||||
|
||||
firstBuild = $$1
|
||||
firstBuildName = $$2
|
||||
secondBuild = $$3
|
||||
|
@ -9,7 +9,6 @@ defineReplace(qtPlatformTargetSuffix) {
|
||||
}
|
||||
|
||||
defineReplace(qtLibraryTarget) {
|
||||
unset(LIBRARY_NAME)
|
||||
LIBRARY_NAME = $$1
|
||||
mac:!static:contains(QT_CONFIG, qt_framework) {
|
||||
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
|
||||
|
@ -79,7 +79,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
#endif
|
||||
if (!project->isHostBuild()) {
|
||||
const ProValueMap &variables = project->variables();
|
||||
if (variables["QMAKESPEC"].first().contains("wince", Qt::CaseInsensitive)) {
|
||||
if (project->isActiveConfig("wince")) {
|
||||
CeSdkHandler sdkhandler;
|
||||
sdkhandler.parse();
|
||||
const QString sdkName = variables["CE_SDK"].join(' ')
|
||||
@ -414,7 +414,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
|
||||
|
||||
if (generateManifest) {
|
||||
t << "\n\tif not exist $(DESTDIR_TARGET) del " << manifest << ">NUL 2>&1";
|
||||
t << "\n\tif not exist $(DESTDIR_TARGET) if exist " << manifest
|
||||
<< " del " << manifest;
|
||||
t << "\n\tif exist " << manifest << " copy /Y " << manifest << ' ' << manifest_bak;
|
||||
const QString extraInlineFileContent = "\n!IF EXIST(" + manifest_res + ")\n" + manifest_res + "\n!ENDIF";
|
||||
t << "\n\t";
|
||||
|
@ -453,9 +453,9 @@ void QMakeEvaluator::evaluateExpression(
|
||||
break; }
|
||||
case TokEnvVar: {
|
||||
const ProString &var = getStr(tokPtr);
|
||||
const ProStringList &val = split_value_list(m_option->getEnv(var.toQString(m_tmp1)));
|
||||
debugMsg(2, "env var %s => %s", dbgStr(var), dbgStrList(val));
|
||||
addStrList(val, tok, ret, pending, joined);
|
||||
const ProString &val = ProString(m_option->getEnv(var.toQString(m_tmp1)));
|
||||
debugMsg(2, "env var %s => %s", dbgStr(var), dbgStr(val));
|
||||
addStr(val, ret, pending, joined);
|
||||
break; }
|
||||
case TokFuncName: {
|
||||
const ProKey &func = getHashStr(tokPtr);
|
||||
|
@ -15,17 +15,17 @@ win32-msvc2012 {
|
||||
error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
|
||||
}
|
||||
|
||||
DXINC_DIR = $$quote($${DX_DIR}Include)
|
||||
DXINC_DIR = $${DX_DIR}Include
|
||||
contains(QT_ARCH, x86_64) {
|
||||
DXLIB_DIR = $$quote($${DX_DIR}Lib\\x64)
|
||||
DXLIB_DIR = $${DX_DIR}Lib\\x64
|
||||
} else {
|
||||
DXLIB_DIR = $$quote($${DX_DIR}Lib\\x86)
|
||||
DXLIB_DIR = $${DX_DIR}Lib\\x86
|
||||
}
|
||||
|
||||
equals(QMAKE_TARGET.arch, x86_64) {
|
||||
FXC = "\"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\""
|
||||
FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\"
|
||||
} else {
|
||||
FXC = "\"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\""
|
||||
FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\"
|
||||
}
|
||||
|
||||
msvc {
|
||||
@ -36,7 +36,7 @@ win32-msvc2012 {
|
||||
|
||||
# Similarly we want the MinGW linker to use the import libraries shipped with the compiler
|
||||
# instead of those from the SDK which cause a crash on startup.
|
||||
LIBS += -L$$DXLIB_DIR
|
||||
LIBS += -L\"$$DXLIB_DIR\"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
ANGLE_DIR = $$(ANGLE_DIR)
|
||||
isEmpty(ANGLE_DIR) {
|
||||
ANGLE_DIR = $$PWD/../../3rdparty/angle
|
||||
ANGLE_DIR = $$absolute_path(../../3rdparty/angle)
|
||||
} else {
|
||||
!build_pass:message("Using external ANGLE from $$ANGLE_DIR")
|
||||
}
|
||||
@ -12,20 +12,19 @@ isEmpty(ANGLE_DIR) {
|
||||
error("$$ANGLE_DIR does not contain ANGLE")
|
||||
}
|
||||
|
||||
win32 {
|
||||
GNUTOOLS_DIR=$$PWD/../../../../gnuwin32/bin
|
||||
exists($$GNUTOOLS_DIR/gperf.exe) {
|
||||
# Escape closing parens when expanding the variable, otherwise cmd confuses itself.
|
||||
GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)"
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
gnutools.value = $$absolute_path(../../../../gnuwin32/bin)
|
||||
exists($$gnutools.value/gperf.exe) {
|
||||
gnutools.name = PATH
|
||||
gnutools.CONFIG = prepend
|
||||
}
|
||||
}
|
||||
|
||||
defineReplace(addGnuPath) {
|
||||
unset(gnuPath)
|
||||
gnuPath = $$1
|
||||
!isEmpty(gnuPath):!isEmpty(GNUTOOLS) {
|
||||
eval(gnuPath = $${GNUTOOLS} && $$gnuPath)
|
||||
silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath))
|
||||
!isEmpty(gnuPath):!isEmpty(gnutools.name) {
|
||||
qtAddToolEnv(gnuPath, gnutools)
|
||||
silent: gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$gnuPath
|
||||
}
|
||||
return($$gnuPath)
|
||||
}
|
||||
|
@ -136,8 +136,11 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue)
|
||||
|
||||
if (newValue.userType() == propertyType) {
|
||||
//no conversion is needed, we directly call the QMetaObject::metacall
|
||||
void *data = const_cast<void*>(newValue.constData());
|
||||
QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, &data);
|
||||
//check QMetaProperty::write for an explanation of these
|
||||
int status = -1;
|
||||
int flags = 0;
|
||||
void *argv[] = { const_cast<void *>(newValue.constData()), const_cast<QVariant *>(&newValue), &status, &flags };
|
||||
QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, argv);
|
||||
} else {
|
||||
targetValue->setProperty(propertyName.constData(), newValue);
|
||||
}
|
||||
|
@ -39,6 +39,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#ifndef QACCESSIBLE_H
|
||||
#define QACCESSIBLE_H
|
||||
|
||||
@ -677,3 +678,4 @@ inline void QAccessible::updateAccessibility(QObject *object, int child, Event r
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QACCESSIBLE_H
|
||||
#endif //!QT_NO_ACCESSIBILITY
|
||||
|
@ -4944,7 +4944,10 @@ QPaintEngine *QImage::paintEngine() const
|
||||
|
||||
if (!d->paintEngine) {
|
||||
QPaintDevice *paintDevice = const_cast<QImage *>(this);
|
||||
QPaintEngine *paintEngine = QGuiApplicationPrivate::platformIntegration()->createImagePaintEngine(paintDevice);
|
||||
QPaintEngine *paintEngine = 0;
|
||||
QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration();
|
||||
if (platformIntegration)
|
||||
paintEngine = platformIntegration->createImagePaintEngine(paintDevice);
|
||||
d->paintEngine = paintEngine ? paintEngine : new QRasterPaintEngine(paintDevice);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,9 @@
|
||||
#include <QtCore/private/qthread_p.h>
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtDebug>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <qpalette.h>
|
||||
#include <qscreen.h>
|
||||
#include "qsessionmanager.h"
|
||||
|
@ -686,25 +686,24 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
||||
\ingroup painting-3D
|
||||
|
||||
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
|
||||
object, defined by the \c{GL_EXT_framebuffer_object} extension. In
|
||||
addition it provides a rendering surface that can be painted on
|
||||
with a QPainter, rendered to using native OpenGL calls, or both. This
|
||||
surface can be bound and used as a regular texture in your own OpenGL
|
||||
drawing code. By default, the QOpenGLFramebufferObject class
|
||||
generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target),
|
||||
which is used as the internal rendering target.
|
||||
object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides
|
||||
a rendering surface that can be painted on with a QPainter with the help of
|
||||
QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface
|
||||
can be bound and used as a regular texture in your own OpenGL drawing code.
|
||||
By default, the QOpenGLFramebufferObject class generates a 2D OpenGL
|
||||
texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal
|
||||
rendering target.
|
||||
|
||||
\b{It is important to have a current OpenGL context when creating a
|
||||
QOpenGLFramebufferObject, otherwise initialization will fail.}
|
||||
|
||||
When using a QPainter to paint to a QOpenGLFramebufferObject you should take
|
||||
care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil
|
||||
attachment for QPainter to be able to render correctly.
|
||||
Note that you need to create a QOpenGLFramebufferObject with more than one
|
||||
sample per pixel for primitives to be antialiased when drawing using a
|
||||
QPainter. To create a multisample framebuffer object you should use one of
|
||||
the constructors that take a QOpenGLFramebufferObject parameter, and set the
|
||||
QOpenGLFramebufferObject::samples() property to a non-zero value.
|
||||
Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil
|
||||
attachment if you want QPainter to render correctly. Note that you need to
|
||||
create a QOpenGLFramebufferObject with more than one sample per pixel for
|
||||
primitives to be antialiased when drawing using a QPainter. To create a
|
||||
multisample framebuffer object you should use one of the constructors that
|
||||
take a QOpenGLFramebufferObjectFormat parameter, and set the
|
||||
QOpenGLFramebufferObjectFormat::samples() property to a non-zero value.
|
||||
|
||||
For multisample framebuffer objects a color render buffer is created,
|
||||
otherwise a texture with the specified texture target is created.
|
||||
@ -716,11 +715,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
||||
as a texture, you first need to copy from it to a regular framebuffer
|
||||
object using QOpenGLContext::blitFramebuffer().
|
||||
|
||||
\section1 Threading
|
||||
|
||||
As of Qt 4.8, it's possible to draw into a QOpenGLFramebufferObject
|
||||
using a QPainter in a separate thread. Note that OpenGL 2.0 or
|
||||
OpenGL ES 2.0 is required for this to work.
|
||||
It is possible to draw into a QOpenGLFramebufferObject using QPainter and
|
||||
QOpenGLPaintDevice in a separate thread.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -671,7 +671,7 @@ void QFontPrivate::detachButKeepEngineData(QFont *font)
|
||||
\sa QGuiApplication::setFont(), QGuiApplication::font()
|
||||
*/
|
||||
QFont::QFont()
|
||||
: d(QGuiApplication::font().d.data()), resolve_mask(0)
|
||||
: d(QGuiApplicationPrivate::instance() ? QGuiApplication::font().d.data() : new QFontPrivate()), resolve_mask(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ bool QTextCursor::movePosition(MoveOperation op, MoveMode mode, int n)
|
||||
Returns true if the cursor does visual navigation; otherwise
|
||||
returns false.
|
||||
|
||||
Visual navigation means skipping over hidden text pragraphs. The
|
||||
Visual navigation means skipping over hidden text paragraphs. The
|
||||
default is false.
|
||||
|
||||
\sa setVisualNavigation(), movePosition()
|
||||
@ -1298,7 +1298,7 @@ bool QTextCursor::visualNavigation() const
|
||||
|
||||
Sets visual navigation to \a b.
|
||||
|
||||
Visual navigation means skipping over hidden text pragraphs. The
|
||||
Visual navigation means skipping over hidden text paragraphs. The
|
||||
default is false.
|
||||
|
||||
\sa visualNavigation(), movePosition()
|
||||
|
@ -680,8 +680,13 @@ void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &)
|
||||
connection will be ignored, including certificate validation
|
||||
errors.
|
||||
|
||||
Note that calling this function without restraint may pose a
|
||||
security risk for your application. Use it with care.
|
||||
\warning Be sure to always let the user inspect the errors
|
||||
reported by the sslErrors() signal, and only call this method
|
||||
upon confirmation from the user that proceeding is ok.
|
||||
If there are unexpected errors, the reply should be aborted.
|
||||
Calling this method without inspecting the actual errors will
|
||||
most likely pose a security risk for your application. Use it
|
||||
with great care!
|
||||
|
||||
This function can be called from the slot connected to the
|
||||
sslErrors() signal, which indicates which errors were
|
||||
|
@ -1714,9 +1714,13 @@ void QSslSocket::startServerEncryption()
|
||||
will not emit the sslErrors() signal, and it is unnecessary to
|
||||
call this function.
|
||||
|
||||
Ignoring errors that occur during an SSL handshake should be done
|
||||
with caution. A fundamental characteristic of secure connections
|
||||
is that they should be established with an error free handshake.
|
||||
\warning Be sure to always let the user inspect the errors
|
||||
reported by the sslErrors() signal, and only call this method
|
||||
upon confirmation from the user that proceeding is ok.
|
||||
If there are unexpected errors, the connection should be aborted.
|
||||
Calling this method without inspecting the actual errors will
|
||||
most likely pose a security risk for your application. Use it
|
||||
with great care!
|
||||
|
||||
\sa sslErrors()
|
||||
*/
|
||||
|
@ -752,8 +752,8 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|
||||
Note that you need to create a QGLFramebufferObject with more than one
|
||||
sample per pixel for primitives to be antialiased when drawing using a
|
||||
QPainter. To create a multisample framebuffer object you should use one of
|
||||
the constructors that take a QGLFramebufferObject parameter, and set the
|
||||
QGLFramebufferObject::samples() property to a non-zero value.
|
||||
the constructors that take a QGLFramebufferObjectFormat parameter, and set
|
||||
the QGLFramebufferObjectFormat::samples() property to a non-zero value.
|
||||
|
||||
When painting to a QGLFramebufferObject using QPainter, the state of
|
||||
the current GL context will be altered by the paint engine to reflect
|
||||
|
@ -667,9 +667,8 @@ static QTouchDevice *touchDevice = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
NSPoint windowPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
||||
QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
|
||||
QPoint qt_windowPoint, qt_screenPoint;
|
||||
[self convertFromEvent:theEvent toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
|
||||
NSTimeInterval timestamp = [theEvent timestamp];
|
||||
ulong qt_timestamp = timestamp * 1000;
|
||||
|
||||
@ -687,7 +686,7 @@ static QTouchDevice *touchDevice = 0;
|
||||
currentWheelModifiers = [self convertKeyModifiers:[theEvent modifierFlags]];
|
||||
}
|
||||
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta, currentWheelModifiers);
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers);
|
||||
|
||||
if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled) {
|
||||
currentWheelModifiers = Qt::NoModifier;
|
||||
@ -695,7 +694,7 @@ static QTouchDevice *touchDevice = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta,
|
||||
QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta,
|
||||
[self convertKeyModifiers:[theEvent modifierFlags]]);
|
||||
}
|
||||
}
|
||||
|
@ -136,6 +136,10 @@
|
||||
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
|
||||
#endif
|
||||
|
||||
#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
|
||||
#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <class MaskType, class FlagType> inline bool testFlag(MaskType mask, FlagType flag)
|
||||
@ -696,34 +700,27 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
|
||||
result.version = (version.mid(0, majorDot).toInt() << 8)
|
||||
+ version.mid(majorDot + 1, minorDot - majorDot - 1).toInt();
|
||||
}
|
||||
if (result.version < 0x0300) {
|
||||
result.profile = QSurfaceFormat::NoProfile;
|
||||
if (result.version < 0x0300) {
|
||||
result.options |= QSurfaceFormat::DeprecatedFunctions;
|
||||
return result;
|
||||
}
|
||||
// v3 onwards
|
||||
GLint value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
|
||||
if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
|
||||
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
|
||||
result.options |= QSurfaceFormat::DeprecatedFunctions;
|
||||
if (value & WGL_CONTEXT_DEBUG_BIT_ARB)
|
||||
if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
|
||||
result.options |= QSurfaceFormat::DebugContext;
|
||||
if (result.version < 0x0302)
|
||||
return result;
|
||||
// v3.2 onwards: Profiles
|
||||
value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
|
||||
switch (value) {
|
||||
case WGL_CONTEXT_CORE_PROFILE_BIT_ARB:
|
||||
if (value & GL_CONTEXT_CORE_PROFILE_BIT)
|
||||
result.profile = QSurfaceFormat::CoreProfile;
|
||||
break;
|
||||
case WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
|
||||
else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
|
||||
result.profile = QSurfaceFormat::CompatibilityProfile;
|
||||
break;
|
||||
default:
|
||||
result.profile = QSurfaceFormat::NoProfile;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,10 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#endif
|
||||
|
||||
#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
|
||||
#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
|
||||
#endif
|
||||
|
||||
static Window createDummyWindow(QXcbScreen *screen, XVisualInfo *visualInfo)
|
||||
{
|
||||
Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(screen), screen->root(), visualInfo->visual, AllocNone);
|
||||
@ -169,6 +173,8 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
||||
format.setMinorVersion(minor);
|
||||
}
|
||||
|
||||
format.setProfile(QSurfaceFormat::NoProfile);
|
||||
|
||||
const int version = (major << 8) + minor;
|
||||
if (version < 0x0300) {
|
||||
format.setProfile(QSurfaceFormat::NoProfile);
|
||||
@ -180,9 +186,9 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
||||
// a debug context
|
||||
GLint value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
|
||||
if (value & ~GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
|
||||
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
|
||||
format.setOption(QSurfaceFormat::DeprecatedFunctions);
|
||||
if (value & GLX_CONTEXT_DEBUG_BIT_ARB)
|
||||
if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
|
||||
format.setOption(QSurfaceFormat::DebugContext);
|
||||
if (version < 0x0302)
|
||||
return;
|
||||
@ -190,17 +196,11 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
||||
// Version 3.2 and newer have a profile
|
||||
value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
|
||||
switch (value) {
|
||||
case GLX_CONTEXT_CORE_PROFILE_BIT_ARB:
|
||||
|
||||
if (value & GL_CONTEXT_CORE_PROFILE_BIT)
|
||||
format.setProfile(QSurfaceFormat::CoreProfile);
|
||||
break;
|
||||
case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
|
||||
else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
|
||||
format.setProfile(QSurfaceFormat::CompatibilityProfile);
|
||||
break;
|
||||
default:
|
||||
format.setProfile(QSurfaceFormat::NoProfile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -287,6 +287,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
|
||||
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
|
||||
|
||||
QList<QByteArray> glxExt = QByteArray(glXQueryExtensionsString(DISPLAY_FROM_XCB(m_screen), m_screen->screenNumber())).split(' ');
|
||||
bool supportsProfiles = glxExt.contains("GLX_ARB_create_context_profile");
|
||||
|
||||
// Use glXCreateContextAttribsARB if is available
|
||||
if (glxExt.contains("GLX_ARB_create_context") && glXCreateContextAttribsARB != 0) {
|
||||
@ -306,7 +307,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
|
||||
<< GLX_CONTEXT_MINOR_VERSION_ARB << minorVersion;
|
||||
|
||||
// If asking for OpenGL 3.2 or newer we should also specify a profile
|
||||
if (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1)) {
|
||||
if (supportsProfiles && (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1))) {
|
||||
if (m_format.profile() == QSurfaceFormat::CoreProfile)
|
||||
contextAttributes << GLX_CONTEXT_PROFILE_MASK_ARB << GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
|
||||
else
|
||||
|
@ -1030,7 +1030,7 @@ QVariant QDB2Result::data(int field)
|
||||
v = new QVariant(qGetIntData(d->hStmt, field, isNull));
|
||||
break;
|
||||
case QSql::LowPrecisionInt64:
|
||||
v = new QVariant(qGetBigIntData(d->hStmt, field, isNull));
|
||||
v = new QVariant((qint64) qGetBigIntData(d->hStmt, field, isNull));
|
||||
break;
|
||||
case QSql::LowPrecisionDouble:
|
||||
v = new QVariant(qGetDoubleData(d->hStmt, field, isNull));
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <qsocketnotifier.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qmutex.h>
|
||||
#include <QtSql/private/qsqlresult_p.h>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
#include <pg_config.h>
|
||||
@ -183,6 +184,7 @@ class QPSQLResultPrivate
|
||||
{
|
||||
public:
|
||||
QPSQLResultPrivate(QPSQLResult *qq): q(qq), driver(0), result(0), currentSize(-1), preparedQueriesEnabled(false) {}
|
||||
static QString fieldSerial(int i) { return QLatin1Char('$') + QString::number(i + 1); }
|
||||
|
||||
QPSQLResult *q;
|
||||
const QPSQLDriverPrivate *driver;
|
||||
@ -515,29 +517,6 @@ void QPSQLResult::virtual_hook(int id, void *data)
|
||||
QSqlResult::virtual_hook(id, data);
|
||||
}
|
||||
|
||||
static QString qReplacePlaceholderMarkers(const QString &query)
|
||||
{
|
||||
const int originalLength = query.length();
|
||||
bool inQuote = false;
|
||||
int markerIdx = 0;
|
||||
QString result;
|
||||
result.reserve(originalLength + 23);
|
||||
for (int i = 0; i < originalLength; ++i) {
|
||||
const QChar ch = query.at(i);
|
||||
if (ch == QLatin1Char('?') && !inQuote) {
|
||||
result += QLatin1Char('$');
|
||||
result += QString::number(++markerIdx);
|
||||
} else {
|
||||
if (ch == QLatin1Char('\''))
|
||||
inQuote = !inQuote;
|
||||
result += ch;
|
||||
}
|
||||
}
|
||||
|
||||
result.squeeze();
|
||||
return result;
|
||||
}
|
||||
|
||||
static QString qCreateParamString(const QVector<QVariant> boundValues, const QSqlDriver *driver)
|
||||
{
|
||||
if (boundValues.isEmpty())
|
||||
@ -581,7 +560,7 @@ bool QPSQLResult::prepare(const QString &query)
|
||||
qDeallocatePreparedStmt(d);
|
||||
|
||||
const QString stmtId = qMakePreparedStmtId();
|
||||
const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(qReplacePlaceholderMarkers(query));
|
||||
const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(QSqlResultPrivate::positionalToNamedBinding(query, QPSQLResultPrivate::fieldSerial));
|
||||
|
||||
PGresult *result = d->driver->exec(stmt);
|
||||
|
||||
|
@ -55,15 +55,13 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static QString qFieldSerial(int);
|
||||
|
||||
QString QSqlResultPrivate::holderAt(int index) const
|
||||
{
|
||||
return holders.size() > index ? holders.at(index).holderName : qFieldSerial(index);
|
||||
return holders.size() > index ? holders.at(index).holderName : fieldSerial(index);
|
||||
}
|
||||
|
||||
// return a unique id for bound names
|
||||
static QString qFieldSerial(int i)
|
||||
QString QSqlResultPrivate::fieldSerial(int i)
|
||||
{
|
||||
ushort arr[] = { ':', 'f', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
ushort *ptr = &arr[1];
|
||||
@ -83,59 +81,92 @@ static bool qIsAlnum(QChar ch)
|
||||
return u - 'a' < 26 || u - 'A' < 26 || u - '0' < 10 || u == '_';
|
||||
}
|
||||
|
||||
QString QSqlResultPrivate::positionalToNamedBinding()
|
||||
QString QSqlResultPrivate::positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx))
|
||||
{
|
||||
int n = sql.size();
|
||||
int n = query.size();
|
||||
|
||||
QString result;
|
||||
result.reserve(n * 5 / 4);
|
||||
bool inQuote = false;
|
||||
QChar closingQuote;
|
||||
int count = 0;
|
||||
|
||||
for (int i = 0; i < n; ++i) {
|
||||
QChar ch = sql.at(i);
|
||||
if (ch == QLatin1Char('?') && !inQuote) {
|
||||
result += qFieldSerial(count++);
|
||||
} else {
|
||||
if (ch == QLatin1Char('\''))
|
||||
inQuote = !inQuote;
|
||||
QChar ch = query.at(i);
|
||||
if (!closingQuote.isNull()) {
|
||||
if (ch == closingQuote) {
|
||||
if (closingQuote == QLatin1Char(']')
|
||||
&& i + 1 < n && query.at(i + 1) == closingQuote) {
|
||||
// consume the extra character. don't close.
|
||||
++i;
|
||||
result += ch;
|
||||
} else {
|
||||
closingQuote = QChar();
|
||||
}
|
||||
}
|
||||
result += ch;
|
||||
} else {
|
||||
if (ch == QLatin1Char('?')) {
|
||||
result += fieldSerialFunc(count++);
|
||||
} else {
|
||||
if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`'))
|
||||
closingQuote = ch;
|
||||
else if (ch == QLatin1Char('['))
|
||||
closingQuote = QLatin1Char(']');
|
||||
result += ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
result.squeeze();
|
||||
return result;
|
||||
}
|
||||
|
||||
QString QSqlResultPrivate::namedToPositionalBinding()
|
||||
QString QSqlResultPrivate::namedToPositionalBinding(const QString &query)
|
||||
{
|
||||
int n = sql.size();
|
||||
int n = query.size();
|
||||
|
||||
QString result;
|
||||
result.reserve(n);
|
||||
bool inQuote = false;
|
||||
QChar closingQuote;
|
||||
int count = 0;
|
||||
int i = 0;
|
||||
|
||||
while (i < n) {
|
||||
QChar ch = sql.at(i);
|
||||
if (ch == QLatin1Char(':') && !inQuote
|
||||
&& (i == 0 || sql.at(i - 1) != QLatin1Char(':'))
|
||||
&& (i + 1 < n && qIsAlnum(sql.at(i + 1)))) {
|
||||
QChar ch = query.at(i);
|
||||
if (!closingQuote.isNull()) {
|
||||
if (ch == closingQuote) {
|
||||
if (closingQuote == QLatin1Char(']')
|
||||
&& i + 1 < n && query.at(i + 1) == closingQuote) {
|
||||
// consume the extra character. don't close.
|
||||
++i;
|
||||
result += ch;
|
||||
} else {
|
||||
closingQuote = QChar();
|
||||
}
|
||||
}
|
||||
result += ch;
|
||||
++i;
|
||||
} else {
|
||||
if (ch == QLatin1Char(':')
|
||||
&& (i == 0 || query.at(i - 1) != QLatin1Char(':'))
|
||||
&& (i + 1 < n && qIsAlnum(query.at(i + 1)))) {
|
||||
int pos = i + 2;
|
||||
while (pos < n && qIsAlnum(sql.at(pos)))
|
||||
while (pos < n && qIsAlnum(query.at(pos)))
|
||||
++pos;
|
||||
QString holder(sql.mid(i, pos - i));
|
||||
QString holder(query.mid(i, pos - i));
|
||||
indexes[holder].append(count++);
|
||||
holders.append(QHolder(holder, i));
|
||||
result += QLatin1Char('?');
|
||||
i = pos;
|
||||
} else {
|
||||
if (ch == QLatin1Char('\''))
|
||||
inQuote = !inQuote;
|
||||
if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`'))
|
||||
closingQuote = ch;
|
||||
else if (ch == QLatin1Char('['))
|
||||
closingQuote = QLatin1Char(']');
|
||||
result += ch;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
result.squeeze();
|
||||
values.resize(holders.size());
|
||||
return result;
|
||||
@ -531,10 +562,10 @@ bool QSqlResult::savePrepare(const QString& query)
|
||||
return prepare(query);
|
||||
|
||||
// parse the query to memorize parameter location
|
||||
d->executedQuery = d->namedToPositionalBinding();
|
||||
d->executedQuery = d->namedToPositionalBinding(query);
|
||||
|
||||
if (driver()->hasFeature(QSqlDriver::NamedPlaceholders))
|
||||
d->executedQuery = d->positionalToNamedBinding();
|
||||
d->executedQuery = QSqlResultPrivate::positionalToNamedBinding(query);
|
||||
|
||||
return prepare(d->executedQuery);
|
||||
}
|
||||
@ -551,7 +582,7 @@ bool QSqlResult::prepare(const QString& query)
|
||||
d->sql = query;
|
||||
if (d->holders.isEmpty()) {
|
||||
// parse the query to memorize parameter location
|
||||
d->namedToPositionalBinding();
|
||||
d->namedToPositionalBinding(query);
|
||||
}
|
||||
return true; // fake prepares should always succeed
|
||||
}
|
||||
@ -617,7 +648,7 @@ bool QSqlResult::exec()
|
||||
void QSqlResult::bindValue(int index, const QVariant& val, QSql::ParamType paramType)
|
||||
{
|
||||
d->binds = PositionalBinding;
|
||||
d->indexes[qFieldSerial(index)].append(index);
|
||||
d->indexes[QSqlResultPrivate::fieldSerial(index)].append(index);
|
||||
if (d->values.count() <= index)
|
||||
d->values.resize(index + 1);
|
||||
d->values[index] = val;
|
||||
|
@ -106,8 +106,14 @@ public:
|
||||
clearIndex();;
|
||||
}
|
||||
|
||||
QString positionalToNamedBinding();
|
||||
QString namedToPositionalBinding();
|
||||
// positionalToNamedBinding uses fieldSerial() by default, which converts to Oracle-style names,
|
||||
// because this style is used in the API. A driver can reuse positionalToNamedBinding()
|
||||
// internally for its own naming style by supplying its own fieldSerialFunc. We cannot make
|
||||
// fieldSerial() virtual because it would allow a driver to impose its naming style on
|
||||
// executedQuery when set by QSqlResult::savePrepare().
|
||||
static QString fieldSerial(int);
|
||||
static QString positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx) = fieldSerial);
|
||||
QString namedToPositionalBinding(const QString &query);
|
||||
QString holderAt(int index) const;
|
||||
|
||||
QSqlResult *q;
|
||||
|
@ -188,6 +188,7 @@ private:
|
||||
#define CONFIG_INDEXES "indexes"
|
||||
#define CONFIG_LANGUAGE "language"
|
||||
#define CONFIG_MACRO "macro"
|
||||
#define CONFIG_MANIFESTMETA "manifestmeta"
|
||||
#define CONFIG_NATURALLANGUAGE "naturallanguage"
|
||||
#define CONFIG_NOLINKERRORS "nolinkerrors"
|
||||
#define CONFIG_OBSOLETELINKS "obsoletelinks"
|
||||
|
@ -1165,8 +1165,8 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
|
||||
}
|
||||
++c;
|
||||
}
|
||||
if (qcn->qmlBase() != 0) {
|
||||
qcn = static_cast<const QmlClassNode*>(qcn->qmlBase());
|
||||
if (qcn->qmlBaseNode() != 0) {
|
||||
qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode());
|
||||
if (!qcn->isAbstract())
|
||||
qcn = 0;
|
||||
}
|
||||
@ -1241,8 +1241,8 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
|
||||
}
|
||||
++c;
|
||||
}
|
||||
if (qcn->qmlBase() != 0) {
|
||||
qcn = static_cast<const QmlClassNode*>(qcn->qmlBase());
|
||||
if (qcn->qmlBaseNode() != 0) {
|
||||
qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode());
|
||||
if (!qcn->isAbstract())
|
||||
qcn = 0;
|
||||
}
|
||||
@ -1287,7 +1287,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
|
||||
}
|
||||
++c;
|
||||
}
|
||||
const DocNode* dn = current->qmlBase();
|
||||
const DocNode* dn = current->qmlBaseNode();
|
||||
if (dn) {
|
||||
if (dn->subType() == Node::QmlClass)
|
||||
current = static_cast<const QmlClassNode*>(dn);
|
||||
|
@ -951,13 +951,12 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
|
||||
else if (command == COMMAND_QMLINHERITS) {
|
||||
if (node->name() == arg)
|
||||
doc.location().warning(tr("%1 tries to inherit itself").arg(arg));
|
||||
else {
|
||||
setLink(node, Node::InheritsLink, arg);
|
||||
if (node->subType() == Node::QmlClass) {
|
||||
else if (node->subType() == Node::QmlClass) {
|
||||
QmlClassNode *qmlClass = static_cast<QmlClassNode*>(node);
|
||||
qmlClass->setQmlBaseName(arg);
|
||||
QmlClassNode::addInheritedBy(arg,node);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command == COMMAND_QMLINSTANTIATES) {
|
||||
if ((node->type() == Node::Document) && (node->subType() == Node::QmlClass)) {
|
||||
ClassNode* classNode = qdb_->findClassNode(arg.split("::"));
|
||||
|
@ -4198,7 +4198,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker*
|
||||
{
|
||||
if (!qcn)
|
||||
return;
|
||||
const DocNode* base = qcn->qmlBase();
|
||||
const DocNode* base = qcn->qmlBaseNode();
|
||||
if (base) {
|
||||
writeStartTag(DT_qmlInherits);
|
||||
//writeStartTag(DT_qmlTypeDef);
|
||||
|
@ -223,6 +223,7 @@ void HtmlGenerator::initializeGenerator(const Config &config)
|
||||
QString prefix = CONFIG_QHP + Config::dot + project + Config::dot;
|
||||
manifestDir = "qthelp://" + config.getString(prefix + "namespace");
|
||||
manifestDir += QLatin1Char('/') + config.getString(prefix + "virtualFolder") + QLatin1Char('/');
|
||||
readManifestMetaContent(config);
|
||||
examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH);
|
||||
if (!examplesPath.isEmpty())
|
||||
examplesPath += QLatin1Char('/');
|
||||
@ -3869,7 +3870,7 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker* mar
|
||||
{
|
||||
if (!qcn)
|
||||
return;
|
||||
const DocNode* base = qcn->qmlBase();
|
||||
const DocNode* base = qcn->qmlBaseNode();
|
||||
if (base) {
|
||||
Text text;
|
||||
text << Atom::ParaLeft << "Inherits ";
|
||||
@ -3991,10 +3992,11 @@ void HtmlGenerator::generateManifestFiles()
|
||||
generateManifestFile("examples", "example");
|
||||
generateManifestFile("demos", "demo");
|
||||
ExampleNode::exampleNodeMap.clear();
|
||||
manifestMetaContent.clear();
|
||||
}
|
||||
|
||||
/*!
|
||||
This function is called by generaqteManiferstFile(), once
|
||||
This function is called by generateManifestFiles(), once
|
||||
for each manifest file to be generated. \a manifest is the
|
||||
type of manifest file.
|
||||
*/
|
||||
@ -4086,6 +4088,36 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
|
||||
}
|
||||
if (!en->imageFileName().isEmpty())
|
||||
writer.writeAttribute("imageUrl", manifestDir + en->imageFileName());
|
||||
|
||||
QString fullName = project + QLatin1Char('/') + en->title();
|
||||
QSet<QString> tags;
|
||||
for (int idx=0; idx < manifestMetaContent.size(); ++idx) {
|
||||
foreach (const QString &name, manifestMetaContent[idx].names) {
|
||||
bool match = false;
|
||||
int wildcard = name.indexOf(QChar('*'));
|
||||
switch (wildcard) {
|
||||
case -1: // no wildcard, exact match
|
||||
match = (fullName == name);
|
||||
break;
|
||||
case 0: // '*' matches all
|
||||
match = true;
|
||||
break;
|
||||
default: // match with wildcard at the end
|
||||
match = fullName.startsWith(name.left(wildcard));
|
||||
}
|
||||
if (match) {
|
||||
tags += manifestMetaContent[idx].tags;
|
||||
foreach (const QString &attr, manifestMetaContent[idx].attributes) {
|
||||
QStringList attrList = attr.split(QLatin1Char(':'), QString::SkipEmptyParts);
|
||||
if (attrList.count() == 1)
|
||||
attrList.append(QStringLiteral("true"));
|
||||
if (attrList.count() == 2)
|
||||
writer.writeAttribute(attrList[0], attrList[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
writer.writeStartElement("description");
|
||||
Text brief = en->doc().briefText();
|
||||
if (!brief.isEmpty())
|
||||
@ -4093,12 +4125,11 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
|
||||
else
|
||||
writer.writeCDATA(QString("No description available"));
|
||||
writer.writeEndElement(); // description
|
||||
QStringList tags = en->title().toLower().split(QLatin1Char(' '));
|
||||
tags += QSet<QString>::fromList(en->title().toLower().split(QLatin1Char(' ')));
|
||||
if (!tags.isEmpty()) {
|
||||
writer.writeStartElement("tags");
|
||||
bool wrote_one = false;
|
||||
for (int n=0; n<tags.size(); ++n) {
|
||||
QString tag = tags.at(n);
|
||||
foreach (QString tag, tags) {
|
||||
if (tag.at(0).isDigit())
|
||||
continue;
|
||||
if (tag.at(0) == '-')
|
||||
@ -4109,7 +4140,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
|
||||
continue;
|
||||
if (tag.endsWith(QLatin1Char(':')))
|
||||
tag.chop(1);
|
||||
if (n>0 && wrote_one)
|
||||
if (wrote_one)
|
||||
writer.writeCharacters(",");
|
||||
writer.writeCharacters(tag);
|
||||
wrote_one = true;
|
||||
@ -4162,6 +4193,25 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
|
||||
file.close();
|
||||
}
|
||||
|
||||
/*!
|
||||
Reads metacontent - additional attributes and tags to apply
|
||||
when generating manifest files, read from config. Takes the
|
||||
configuration class \a config as a parameter.
|
||||
*/
|
||||
void HtmlGenerator::readManifestMetaContent(const Config &config)
|
||||
{
|
||||
QStringList names = config.getStringList(CONFIG_MANIFESTMETA + Config::dot + QStringLiteral("filters"));
|
||||
|
||||
foreach (const QString &manifest, names) {
|
||||
ManifestMetaFilter filter;
|
||||
QString prefix = CONFIG_MANIFESTMETA + Config::dot + manifest + Config::dot;
|
||||
filter.names = config.getStringSet(prefix + QStringLiteral("names"));
|
||||
filter.attributes = config.getStringSet(prefix + QStringLiteral("attributes"));
|
||||
filter.tags = config.getStringSet(prefix + QStringLiteral("tags"));
|
||||
manifestMetaContent.append(filter);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Find global entities that have documentation but no
|
||||
\e{relates} comand. Report these as errors if they
|
||||
|
@ -108,6 +108,7 @@ protected:
|
||||
virtual QString linkForNode(const Node *node, const Node *relative);
|
||||
|
||||
void generateManifestFile(QString manifest, QString element);
|
||||
void readManifestMetaContent(const Config &config);
|
||||
|
||||
private:
|
||||
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
|
||||
@ -118,6 +119,13 @@ private:
|
||||
EndMark
|
||||
};
|
||||
|
||||
struct ManifestMetaFilter
|
||||
{
|
||||
QSet<QString> names;
|
||||
QSet<QString> attributes;
|
||||
QSet<QString> tags;
|
||||
};
|
||||
|
||||
const QPair<QString,QString> anchorForNode(const Node *node);
|
||||
void generateBreadCrumbs(const QString& title,
|
||||
const Node *node,
|
||||
@ -242,6 +250,7 @@ private:
|
||||
bool obsoleteLinks;
|
||||
QStack<QXmlStreamWriter*> xmlWriterStack;
|
||||
static int id;
|
||||
QList<ManifestMetaFilter> manifestMetaContent;
|
||||
public:
|
||||
static bool debugging_on;
|
||||
static QString divNavTop;
|
||||
|
@ -2097,7 +2097,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name)
|
||||
abstract_(false),
|
||||
cnodeRequired_(false),
|
||||
cnode_(0),
|
||||
base_(0)
|
||||
baseNode_(0)
|
||||
{
|
||||
int i = 0;
|
||||
if (name.startsWith("QML:")) {
|
||||
|
@ -131,8 +131,7 @@ public:
|
||||
NextLink,
|
||||
PreviousLink,
|
||||
ContentsLink,
|
||||
IndexLink,
|
||||
InheritsLink /*,
|
||||
IndexLink /*,
|
||||
GlossaryLink,
|
||||
CopyrightLink,
|
||||
ChapterLink,
|
||||
@ -546,8 +545,10 @@ public:
|
||||
virtual void setAbstract(bool b) { abstract_ = b; }
|
||||
const ImportList& importList() const { return importList_; }
|
||||
void setImportList(const ImportList& il) { importList_ = il; }
|
||||
const DocNode* qmlBase() const { return base_; }
|
||||
void setQmlBase(DocNode* b) { base_ = b; }
|
||||
const QString& qmlBaseName() const { return baseName_; }
|
||||
void setQmlBaseName(const QString& name) { baseName_ = name; }
|
||||
const DocNode* qmlBaseNode() const { return baseNode_; }
|
||||
void setQmlBaseNode(DocNode* b) { baseNode_ = b; }
|
||||
void requireCppClass() { cnodeRequired_ = true; }
|
||||
bool cppClassRequired() const { return cnodeRequired_; }
|
||||
static void addInheritedBy(const QString& base, Node* sub);
|
||||
@ -562,7 +563,8 @@ private:
|
||||
bool abstract_;
|
||||
bool cnodeRequired_;
|
||||
ClassNode* cnode_;
|
||||
DocNode* base_;
|
||||
QString baseName_;
|
||||
DocNode* baseNode_;
|
||||
ImportList importList_;
|
||||
};
|
||||
|
||||
|
@ -91,3 +91,5 @@ qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
||||
QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf
|
||||
|
||||
load(qt_tool)
|
||||
|
||||
TR_EXCLUDE += $$PWD/*
|
||||
|
@ -623,6 +623,7 @@ const NodeMultiMap& QDocDatabase::getSinceMap(const QString& key) const
|
||||
to generating documentation.
|
||||
*/
|
||||
void QDocDatabase::resolveIssues() {
|
||||
resolveQmlInheritance(treeRoot());
|
||||
resolveTargets(treeRoot());
|
||||
tree_->resolveCppToQmlLinks();
|
||||
}
|
||||
@ -821,6 +822,35 @@ QString QDocDatabase::findTarget(const QString& target, const Node* node) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
/*!
|
||||
For each QML Type node in the tree beginning at \a root,
|
||||
if it has a QML base type name but its QML base type node
|
||||
pointer is 0, use the QML base type name to look up the
|
||||
base type node. If the node is found in the tree, set the
|
||||
node's QML base type node pointer.
|
||||
*/
|
||||
void QDocDatabase::resolveQmlInheritance(InnerNode* root)
|
||||
{
|
||||
// Dop we need recursion?
|
||||
foreach (Node* child, root->childNodes()) {
|
||||
if (child->type() == Node::Document && child->subType() == Node::QmlClass) {
|
||||
QmlClassNode* qcn = static_cast<QmlClassNode*>(child);
|
||||
if ((qcn->qmlBaseNode() == 0) && !qcn->qmlBaseName().isEmpty()) {
|
||||
QmlClassNode* bqcn = findQmlType(QString(), qcn->qmlBaseName());
|
||||
if (bqcn) {
|
||||
qcn->setQmlBaseNode(bqcn);
|
||||
}
|
||||
#if 0
|
||||
else {
|
||||
qDebug() << "Unable to resolve QML base type:" << qcn->qmlBaseName()
|
||||
<< "for QML type:" << qcn->name();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
*/
|
||||
void QDocDatabase::resolveTargets(InnerNode* root)
|
||||
|
@ -140,6 +140,7 @@ class QDocDatabase
|
||||
Tree* tree() { return tree_; }
|
||||
NamespaceNode* treeRoot() { return tree_->root(); }
|
||||
void resolveInheritance() { tree_->resolveInheritance(); }
|
||||
void resolveQmlInheritance(InnerNode* root);
|
||||
void resolveIssues();
|
||||
void fixInheritance() { tree_->fixInheritance(); }
|
||||
void resolveProperties() { tree_->resolveProperties(); }
|
||||
|
@ -106,7 +106,7 @@ QmlDocVisitor::~QmlDocVisitor()
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the location of thre nearest comment above the \a offset.
|
||||
Returns the location of the nearest comment above the \a offset.
|
||||
*/
|
||||
QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const
|
||||
{
|
||||
@ -322,13 +322,12 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
|
||||
else if (command == COMMAND_QMLINHERITS) {
|
||||
if (node->name() == args[0].first)
|
||||
doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first));
|
||||
else {
|
||||
CodeParser::setLink(node, Node::InheritsLink, args[0].first);
|
||||
if (node->subType() == Node::QmlClass) {
|
||||
else if (node->subType() == Node::QmlClass) {
|
||||
QmlClassNode *qmlClass = static_cast<QmlClassNode*>(node);
|
||||
qmlClass->setQmlBaseName(args[0].first);
|
||||
QmlClassNode::addInheritedBy(args[0].first,node);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command == COMMAND_QMLDEFAULT) {
|
||||
if (node->type() == Node::QmlProperty) {
|
||||
QmlPropertyNode* qpn = static_cast<QmlPropertyNode*>(node);
|
||||
@ -389,11 +388,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
|
||||
QmlClassNode *component = new QmlClassNode(current, name);
|
||||
component->setTitle(name);
|
||||
component->setImportList(importList);
|
||||
|
||||
if (applyDocumentation(definition->firstSourceLocation(), component)) {
|
||||
QmlClassNode::addInheritedBy(type, component);
|
||||
if (!component->links().contains(Node::InheritsLink))
|
||||
component->setLink(Node::InheritsLink, type, type);
|
||||
component->setQmlBaseName(type);
|
||||
}
|
||||
current = component;
|
||||
}
|
||||
|
@ -399,10 +399,12 @@ void Tree::addPropertyFunction(PropertyNode* property,
|
||||
|
||||
/*!
|
||||
This function resolves inheritance and reimplementation settings
|
||||
for each class node found in the namspace beginning ar \a rootNode.
|
||||
for each C++ class node found in the namspace beginning at \a rootNode.
|
||||
If it finds another namespace node in the child list of \a rootNode,
|
||||
it calls itself recursively. For each child of \a rootNode that is a
|
||||
class node, it calls the other resolveInheritance() function.
|
||||
|
||||
This function does not resolve QML inheritance.
|
||||
*/
|
||||
void Tree::resolveInheritance(NamespaceNode* rootNode)
|
||||
{
|
||||
|
@ -41,5 +41,3 @@ SUBDIRS = $$TOOLS_SUBDIRS
|
||||
bootstrap_prepare_docs.depends += $${src_tools_qdoc.target}-make_first
|
||||
bootstrap_prepare_docs.target = $${src_tools_bootstrap.target}-prepare_docs
|
||||
QMAKE_EXTRA_TARGETS += bootstrap_prepare_docs
|
||||
|
||||
TR_EXCLUDE += $$PWD/*
|
||||
|
@ -536,6 +536,7 @@ void QFileDialogPrivate::initHelper(QPlatformDialogHelper *h)
|
||||
QObject::connect(h, SIGNAL(filesSelected(QStringList)), d, SIGNAL(filesSelected(QStringList)));
|
||||
QObject::connect(h, SIGNAL(currentChanged(QString)), d, SIGNAL(currentChanged(QString)));
|
||||
QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SIGNAL(directoryEntered(QString)));
|
||||
QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SLOT(_q_nativeEnterDirectory(QString)));
|
||||
QObject::connect(h, SIGNAL(filterSelected(QString)), d, SIGNAL(filterSelected(QString)));
|
||||
static_cast<QPlatformFileDialogHelper *>(h)->setOptions(options);
|
||||
}
|
||||
@ -3114,6 +3115,12 @@ void QFileDialogPrivate::_q_fileRenamed(const QString &path, const QString oldNa
|
||||
}
|
||||
}
|
||||
|
||||
void QFileDialogPrivate::_q_nativeEnterDirectory(const QString &directory)
|
||||
{
|
||||
if (!directory.isEmpty()) // Windows native dialogs occasionally emit signals with empty strings.
|
||||
*lastVisitedDir() = directory;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
|
@ -240,6 +240,7 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_updateOkButton())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_currentChanged(const QModelIndex &index))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_enterDirectory(const QModelIndex &index))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_nativeEnterDirectory(const QString&))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_goToDirectory(const QString &path))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_useNameFilter(int index))
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_selectionChanged())
|
||||
|
@ -204,6 +204,7 @@ public:
|
||||
void _q_updateOkButton();
|
||||
void _q_currentChanged(const QModelIndex &index);
|
||||
void _q_enterDirectory(const QModelIndex &index);
|
||||
void _q_nativeEnterDirectory(const QString &directory);
|
||||
void _q_goToDirectory(const QString &);
|
||||
void _q_useNameFilter(int index);
|
||||
void _q_selectionChanged();
|
||||
|
@ -34,6 +34,15 @@ headerdirs += ..
|
||||
sourcedirs += .. \
|
||||
../../../examples/widgets/doc/src
|
||||
|
||||
excludefiles += ../widgets/qmacnativewidget_mac.h \
|
||||
../widgets/qmaccocoaviewcontainer_mac.h \
|
||||
../widgets/qcocoatoolbardelegate_mac_p.h \
|
||||
../widgets/qcocoamenu_mac_p.h \
|
||||
../widgets/qmaccocoaviewcontainer_mac.mm \
|
||||
../widgets/qcocoatoolbardelegate_mac.mm \
|
||||
../widgets/qmainwindowlayout_mac.mm \
|
||||
../widgets/qmacnativewidget_mac.mm
|
||||
|
||||
exampledirs += ../../../examples/widgets \
|
||||
../../../doc/src/snippets \
|
||||
../ \
|
||||
|
@ -2178,6 +2178,8 @@ bool QGraphicsItem::hasCursor() const
|
||||
*/
|
||||
void QGraphicsItem::unsetCursor()
|
||||
{
|
||||
if (!d_ptr->hasCursor)
|
||||
return;
|
||||
d_ptr->unsetExtra(QGraphicsItemPrivate::ExtraCursor);
|
||||
d_ptr->hasCursor = 0;
|
||||
if (d_ptr->scene) {
|
||||
|
@ -1391,6 +1391,14 @@ QWidget::~QWidget()
|
||||
|
||||
|
||||
QT_TRY {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
const QWidget* w = this;
|
||||
while (w->d_func()->extra && w->d_func()->extra->focus_proxy)
|
||||
w = w->d_func()->extra->focus_proxy;
|
||||
QWidget *window = w->window();
|
||||
QWExtra *e = window ? window->d_func()->extra : 0;
|
||||
if (!e || !e->proxyWidget)
|
||||
#endif
|
||||
clearFocus();
|
||||
} QT_CATCH(...) {
|
||||
// swallow this problem because we are in a destructor
|
||||
@ -8414,7 +8422,7 @@ void QWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
void QWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_WHEELEVENT
|
||||
|
@ -2705,7 +2705,8 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
|
||||
ret = false;
|
||||
break;
|
||||
case SH_ScrollBar_Transient:
|
||||
if (qobject_cast<const QScrollBar *>(w) ||
|
||||
if ((qobject_cast<const QScrollBar *>(w) && w->parent() &&
|
||||
qobject_cast<QAbstractScrollArea*>(w->parent()->parent())) ||
|
||||
(opt && QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ScrollBar))) {
|
||||
ret = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
|
@ -86,17 +86,13 @@ qreal dpiScaled(qreal value)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
bool isInstanceOf(QObject *obj, QAccessible::Role role)
|
||||
{
|
||||
bool match = false;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj);
|
||||
match = iface && iface->role() == role;
|
||||
delete iface;
|
||||
#else
|
||||
Q_UNUSED(obj)
|
||||
Q_UNUSED(role)
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
return match;
|
||||
}
|
||||
|
||||
@ -104,19 +100,15 @@ bool isInstanceOf(QObject *obj, QAccessible::Role role)
|
||||
bool hasAncestor(QObject *obj, QAccessible::Role role)
|
||||
{
|
||||
bool found = false;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
QObject *parent = obj ? obj->parent() : 0;
|
||||
while (parent && !found) {
|
||||
if (isInstanceOf(parent, role))
|
||||
found = true;
|
||||
parent = parent->parent();
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(obj)
|
||||
Q_UNUSED(role)
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
return found;
|
||||
}
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
|
@ -82,8 +82,10 @@ namespace QStyleHelper
|
||||
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
|
||||
int left = 0, int top = 0, int right = 0,
|
||||
int bottom = 0);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
bool isInstanceOf(QObject *obj, QAccessible::Role role);
|
||||
bool hasAncestor(QObject *obj, QAccessible::Role role);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ void QSystemTrayIconPrivate::install_sys()
|
||||
if (qpa_sys) {
|
||||
qpa_sys->init();
|
||||
QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)),
|
||||
q_func(), SLOT(emitActivated(QPlatformSystemTrayIcon::ActivationReason)));
|
||||
q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason)));
|
||||
QObject::connect(qpa_sys, SIGNAL(messageClicked()),
|
||||
q_func(), SIGNAL(messageClicked()));
|
||||
updateMenu_sys();
|
||||
|
@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f4f93c4fa90) 0
|
||||
QObject (0x7f4f93e37f60) 0
|
||||
primary-for QObjectCleanupHandler (0x7f4f93c4fa90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f4f93c62060) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45852d0) 0
|
||||
QObject (0xb4452038) 0
|
||||
primary-for QObjectCleanupHandler (0xb45852d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4452578) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f392077aa90) 0
|
||||
QObject (0x7f3920962f60) 0
|
||||
primary-for QObjectCleanupHandler (0x7f392077aa90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f392078d060) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45942d0) 0
|
||||
QObject (0xb4461038) 0
|
||||
primary-for QObjectCleanupHandler (0xb45942d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4461578) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fbaa1e96a90) 0
|
||||
QObject (0x7fbaa1ea7000) 0
|
||||
primary-for QObjectCleanupHandler (0x7fbaa1e96a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7fbaa1ea70c0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb452e2d0) 0
|
||||
QObject (0xb43fc038) 0
|
||||
primary-for QObjectCleanupHandler (0xb452e2d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb43fc578) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f7180f27a90) 0
|
||||
QObject (0x7f7180e6d480) 0
|
||||
primary-for QObjectCleanupHandler (0x7f7180f27a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f7180e6d540) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42044ec) 0
|
||||
QObject (0xb41bb348) 0
|
||||
primary-for QObjectCleanupHandler (0xb42044ec)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb41bb888) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fb654a90a90) 0
|
||||
QObject (0x7fb654c78f60) 0
|
||||
primary-for QObjectCleanupHandler (0x7fb654a90a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7fb654aa3060) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb434b2d0) 0
|
||||
QObject (0xb4418070) 0
|
||||
primary-for QObjectCleanupHandler (0xb434b2d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb44185b0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f04b9c1da90) 0
|
||||
QObject (0x7f04b9b0e900) 0
|
||||
primary-for QObjectCleanupHandler (0x7f04b9c1da90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f04b9b0e9c0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb4463c30) 0
|
||||
QObject (0xb4070508) 0
|
||||
primary-for QObjectCleanupHandler (0xb4463c30)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4070a48) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f0bd6b6ba90) 0
|
||||
QObject (0x7f0bd6aac4e0) 0
|
||||
primary-for QObjectCleanupHandler (0x7f0bd6b6ba90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f0bd6aac5a0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb426f5dc) 0
|
||||
QObject (0xb4063508) 0
|
||||
primary-for QObjectCleanupHandler (0xb426f5dc)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4063a48) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f5e7bb99a90) 0
|
||||
QObject (0x7f5e7bd82f60) 0
|
||||
primary-for QObjectCleanupHandler (0x7f5e7bb99a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f5e7bbad060) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45532d0) 0
|
||||
QObject (0xb4422038) 0
|
||||
primary-for QObjectCleanupHandler (0xb45532d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4422578) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fdcea1e6a90) 0
|
||||
QObject (0x7fdcea1e2120) 0
|
||||
primary-for QObjectCleanupHandler (0x7fdcea1e6a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7fdcea1e21e0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb44aa348) 0
|
||||
QObject (0xb441f0a8) 0
|
||||
primary-for QObjectCleanupHandler (0xb44aa348)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb441f5e8) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f8720705a90) 0
|
||||
QObject (0x7f87206474e0) 0
|
||||
primary-for QObjectCleanupHandler (0x7f8720705a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f87206475a0) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42315dc) 0
|
||||
QObject (0xb4025508) 0
|
||||
primary-for QObjectCleanupHandler (0xb42315dc)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb4025a48) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f6638185a90) 0
|
||||
QObject (0x7f663836ef60) 0
|
||||
primary-for QObjectCleanupHandler (0x7f6638185a90)
|
||||
|
||||
Class QPointerBase
|
||||
size=16 align=8
|
||||
base size=16 base align=8
|
||||
QPointerBase (0x7f663819a060) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0xb457e2d0) 0
|
||||
QObject (0xb444d038) 0
|
||||
primary-for QObjectCleanupHandler (0xb457e2d0)
|
||||
|
||||
Class QPointerBase
|
||||
size=8 align=4
|
||||
base size=8 base align=4
|
||||
QPointerBase (0xb444d578) 0
|
||||
|
||||
Class QSharedMemory::QPrivateSignal
|
||||
size=1 align=1
|
||||
base size=0 base align=1
|
||||
|
@ -1657,6 +1657,10 @@ void tst_QLocale::ampm()
|
||||
QLocale id("id_ID");
|
||||
QCOMPARE(id.amText(), QLatin1String("AM"));
|
||||
QCOMPARE(id.pmText(), QLatin1String("PM"));
|
||||
|
||||
QLocale ta("ta_LK");
|
||||
QCOMPARE(ta.amText(), QLatin1String("AM"));
|
||||
QCOMPARE(ta.pmText(), QLatin1String("PM"));
|
||||
}
|
||||
|
||||
void tst_QLocale::dateFormat()
|
||||
|
@ -2115,5 +2115,5 @@ void tst_QImage::cleanupFunctions()
|
||||
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QImage)
|
||||
QTEST_GUILESS_MAIN(tst_QImage)
|
||||
#include "tst_qimage.moc"
|
||||
|
@ -4,11 +4,11 @@ SUBDIRS=\
|
||||
qsslcipher \
|
||||
qsslerror \
|
||||
qsslkey \
|
||||
qsslsocket \
|
||||
qsslsocket_onDemandCertificates_member \
|
||||
qsslsocket_onDemandCertificates_static \
|
||||
|
||||
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
|
||||
contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked):
|
||||
contains(QT_CONFIG, private_tests) {
|
||||
SUBDIRS += \
|
||||
qsslsocket \
|
||||
qsslsocket_onDemandCertificates_member \
|
||||
qsslsocket_onDemandCertificates_static \
|
||||
}
|
||||
|
@ -58,6 +58,11 @@ public:
|
||||
return QSqlResult::savePrepare(sqlquery);
|
||||
}
|
||||
|
||||
QVector<QVariant> boundValues() const
|
||||
{
|
||||
return QSqlResult::boundValues();
|
||||
}
|
||||
|
||||
protected:
|
||||
QVariant data(int /* index */) { return QVariant(); }
|
||||
bool isNull(int /* index */) { return false; }
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void positionalToNamedBinding();
|
||||
void parseOfBoundValues();
|
||||
|
||||
};
|
||||
|
||||
@ -66,6 +67,39 @@ void tst_QSqlResult::positionalToNamedBinding()
|
||||
TestSqlDriverResult result(&testDriver);
|
||||
QString query("INSERT INTO MYTABLE (ID, NAME, BIRTH) VALUES(?, ?, ?)");
|
||||
QVERIFY(result.savePrepare(query));
|
||||
QCOMPARE(result.boundValues().count(), 3);
|
||||
}
|
||||
|
||||
void tst_QSqlResult::parseOfBoundValues()
|
||||
{
|
||||
TestSqlDriver testDriver;
|
||||
TestSqlDriverResult result(&testDriver);
|
||||
QVERIFY(result.savePrepare("SELECT :1 AS \":2\""));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT :1 AS ':2'"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT :1 AS [:2]"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]]]"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
|
||||
QVERIFY(result.savePrepare("SELECT ? AS \"?\""));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT ? AS '?'"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT ? AS [?]"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
|
||||
QVERIFY(result.savePrepare("SELECT ? AS \"'?\""));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT ? AS '?\"'"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT ? AS '?''?'"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
QVERIFY(result.savePrepare("SELECT ? AS [\"?']"));
|
||||
QCOMPARE(result.boundValues().count(), 1);
|
||||
}
|
||||
|
||||
QTEST_MAIN( tst_QSqlResult )
|
||||
|
@ -411,6 +411,7 @@ private slots:
|
||||
void destroyedSignal();
|
||||
|
||||
void keyboardModifiers();
|
||||
void mouseDoubleClickBubbling_QTBUG29680();
|
||||
|
||||
private:
|
||||
bool ensureScreenSize(int width, int height);
|
||||
@ -10047,5 +10048,30 @@ void tst_QWidget::keyboardModifiers()
|
||||
QCOMPARE(int(w->m_appModifiers), int(Qt::ControlModifier));
|
||||
}
|
||||
|
||||
class DClickWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
DClickWidget() : triggered(false) {}
|
||||
void mouseDoubleClickEvent(QMouseEvent *)
|
||||
{
|
||||
triggered = true;
|
||||
}
|
||||
bool triggered;
|
||||
};
|
||||
|
||||
void tst_QWidget::mouseDoubleClickBubbling_QTBUG29680()
|
||||
{
|
||||
DClickWidget parent;
|
||||
QWidget child(&parent);
|
||||
parent.resize(200, 200);
|
||||
child.resize(200, 200);
|
||||
parent.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&parent));
|
||||
|
||||
QTest::mouseDClick(&child, Qt::LeftButton);
|
||||
|
||||
QTRY_VERIFY(parent.triggered);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QWidget)
|
||||
#include "tst_qwidget.moc"
|
||||
|
@ -1602,7 +1602,7 @@ bool Configure::displayHelp()
|
||||
desc( "-libdir <dir>", "Libraries will be installed to <dir>\n(default PREFIX/lib)");
|
||||
desc( "-headerdir <dir>", "Headers will be installed to <dir>\n(default PREFIX/include)");
|
||||
desc( "-archdatadir <dir>", "Architecture-dependent data used by Qt will be installed to <dir>\n(default PREFIX)");
|
||||
desc( "-libexecdir <dir>", "Program executables will be installed to <dir>\n(default ARCHDATADIR/libexec)");
|
||||
desc( "-libexecdir <dir>", "Program executables will be installed to <dir>\n(default ARCHDATADIR/lib)");
|
||||
desc( "-plugindir <dir>", "Plugins will be installed to <dir>\n(default ARCHDATADIR/plugins)");
|
||||
desc( "-importdir <dir>", "Imports for QML1 will be installed to <dir>\n(default ARCHDATADIR/imports)");
|
||||
desc( "-qmldir <dir>", "Imports for QML2 will be installed to <dir>\n(default ARCHDATADIR/qml)");
|
||||
@ -3561,8 +3561,12 @@ void Configure::generateQConfigCpp()
|
||||
dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib";
|
||||
if (!dictionary["QT_INSTALL_ARCHDATA"].size())
|
||||
dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
|
||||
if (!dictionary["QT_INSTALL_LIBEXECS"].size())
|
||||
if (!dictionary["QT_INSTALL_LIBEXECS"].size()) {
|
||||
if (dictionary["QT_INSTALL_ARCHDATA"] == dictionary["QT_INSTALL_PREFIX"])
|
||||
dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/lib";
|
||||
else
|
||||
dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec";
|
||||
}
|
||||
if (!dictionary["QT_INSTALL_BINS"].size())
|
||||
dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin";
|
||||
if (!dictionary["QT_INSTALL_PLUGINS"].size())
|
||||
|
Loading…
Reference in New Issue
Block a user