Merge remote-tracking branch 'origin/5.3' into 5.4

The isAlwaysAskOption was removed in 3862171315
so manually removed code in
src/plugins/bearer/connman/qconnmanengine.cpp

Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/tools/qcollator_macx.cpp
	src/corelib/tools/qstring.cpp
	src/gui/kernel/qwindow.cpp
	src/gui/kernel/qwindow_p.h
	src/gui/text/qtextengine.cpp
	src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp
	src/plugins/platforms/xcb/qglxintegration.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	src/testlib/qtestlog.cpp
	src/widgets/dialogs/qfiledialog.cpp
	src/widgets/kernel/qwindowcontainer.cpp
	tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
	tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
	tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp

Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
This commit is contained in:
Frederik Gladhorn 2014-09-22 14:17:52 +02:00
commit c5a3e5edd9
227 changed files with 2396 additions and 609 deletions

2
configure vendored
View File

@ -195,7 +195,7 @@ expandQMakeConf()
extractQMakeVariables()
{
$AWK '
LC_ALL=C $AWK '
BEGIN {
values["LITERAL_WHITESPACE"] = " "
values["LITERAL_DOLLAR"] = "$"

98
dist/changes-5.3.2 vendored Normal file
View File

@ -0,0 +1,98 @@
Qt 5.3.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.3.0 and Qt 5.3.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://qt-project.org/doc/qt-5.3
The Qt version 5.3 series is binary compatible with the 5.2.x series.
Applications compiled for 5.2 will continue to run with 5.3.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
http://bugreports.qt-project.org/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Library *
****************************************************************************
QtCore
------
- QObject:
* [QTBUG-40638] Fixed disconnecting from pointer to member signal that
belongs in the base class but whose type is explicitly given as a
pointer to a member in the derived class
QtGui
-----
- Fonts:
* [QTBUG-39846] Fixed regression in font families returned by
QFontDatabase::families() for certain writing systems.
- QImage:
* QImage::fill(uint) now fills the given pixel value unconverted when
used on RGBA8888 image, making it consistent with the documentation
and treatment of all other image formats.
- Text:
* [QTBUG-39832] Fixed lines breaking on non-breaking spaces.
* [QTBUG-39930][QTBUG-39860] Fixed several regressions in font selection
when combining different writing systems in the same text.
QtNetwork
---------
- [QTBUG-30829][QTBUG-35101] Fixed NTLM (SSPI) Proxy Authentication
(HTTP/HTTPS)
- QNetworkAccessManager:
* Fixed high CPU load when handling POST/upload QIODevice that generates
data on readyRead().
* [QTBUG-40797] QNetworkAccessManager now properly handles FTP transfer
failures by removing failed cached ftp connections.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
Android
-------
- [QTBUG-39978] Fixed regression where QScreen::physicalSize() would
return 0x0.
- Added support for building libraries with spaces in name.
- [QTBUG-39377] Fixed common characters like digits and punctuation
showing as boxes when positioned next to non-latin scripts.
- [QTBUG-39377] Fixed common characters like digits and punctuation
showing as boxes when positioned next to non-latin scripts.
- Fixed font selection to prefer "Droid Serif" when Serif style hint is
set on QFont.
- [QTBUG-40957] Fixed bug on some devices where the application would
crash at shutdown if the virtual keyboard was open.
EGLFS
-----
- Double click events are now sent correctly on eglfs.
Windows
-------
- [QTBUG-39172] Fixed using QRawFont with fallback fonts, e.g. in the case
of text rendering in Qt Quick.
X11 / XCB
---------
- [QTBUG-39666][QTBUG-39573][QTBUG-39570] QTabletEvents and proximity
events correctly identify the tool in use; the meaning of certain
valuators depends on the tool; and the valuators' current values are
not lost between events

View File

@ -46,6 +46,9 @@
#include "scribblearea.h"
static const qreal MinimumDiameter = 3.0;
static const qreal MaximumDiameter = 50.0;
//! [0]
ScribbleArea::ScribbleArea(QWidget *parent)
: QWidget(parent)
@ -179,6 +182,7 @@ bool ScribbleArea::event(QEvent *event)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
{
QTouchEvent *touch = static_cast<QTouchEvent *>(event);
QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints();
foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) {
switch (touchPoint.state()) {
@ -189,7 +193,9 @@ bool ScribbleArea::event(QEvent *event)
{
QRectF rect = touchPoint.rect();
if (rect.isEmpty()) {
qreal diameter = qreal(50) * touchPoint.pressure();
qreal diameter = MinimumDiameter;
if (touch->device()->capabilities() & QTouchDevice::Pressure)
diameter = MinimumDiameter + (MaximumDiameter - MinimumDiameter) * touchPoint.pressure();
rect.setSize(QSizeF(diameter, diameter));
}

View File

@ -143,7 +143,9 @@ void MainWindow::showFont(QTreeWidgetItem *item)
QString oldText = textEdit->toPlainText().trimmed();
bool modified = textEdit->document()->isModified();
textEdit->clear();
textEdit->document()->setDefaultFont(QFont(family, 32, weight, italic));
QFont font(family, 32, weight, italic);
font.setStyleName(style);
textEdit->document()->setDefaultFont(font);
QTextCursor cursor = textEdit->textCursor();
QTextBlockFormat blockFormat;
@ -324,6 +326,7 @@ void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
// Calculate the maximum width and total height of the text.
foreach (int size, sampleSizes) {
QFont font(family, size, weight, italic);
font.setStyleName(style);
font = QFont(font, painter->device());
QFontMetricsF fontMetrics(font);
QRectF rect = fontMetrics.boundingRect(
@ -357,6 +360,7 @@ void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
// Draw each line of text.
foreach (int size, sampleSizes) {
QFont font(family, size, weight, italic);
font.setStyleName(style);
font = QFont(font, painter->device());
QFontMetricsF fontMetrics(font);
QRectF rect = fontMetrics.boundingRect(QString("%1 %2").arg(

View File

@ -26,11 +26,8 @@ QMAKE_LIBS_OPENVG += -lOpenVG -lEGL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX5_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -Wno-psabi
IMX5_CFLAGS_RELEASE = -O2 $$IMX5_CFLAGS
QMAKE_CFLAGS_RELEASE += $$IMX5_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX5_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG += $$IMX5_CFLAGS
QMAKE_CXXFLAGS_DEBUG += $$IMX5_CFLAGS
QMAKE_CFLAGS += $$IMX5_CFLAGS
QMAKE_CXXFLAGS += $$IMX5_CFLAGS
include(../common/linux_arm_device_post.conf)

View File

@ -28,11 +28,8 @@ QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE = -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS
QMAKE_CFLAGS += $$IMX6_CFLAGS
QMAKE_CXXFLAGS += $$IMX6_CFLAGS
include(../common/linux_arm_device_post.conf)

View File

@ -12,10 +12,6 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LFLAGS_THREAD = -pthread

View File

@ -12,10 +12,6 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LFLAGS_THREAD = -pthread

View File

@ -4,7 +4,6 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = freebsd bsd
CONFIG += gdb_dwarf_index
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
@ -13,10 +12,6 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LFLAGS_THREAD = -pthread

View File

@ -366,11 +366,6 @@ public class QtActivityDelegate
});
}
public boolean isSoftwareKeyboardVisible()
{
return m_keyboardIsVisible;
}
String getAppIconSize(Activity a)
{
int size = a.getResources().getDimensionPixelSize(android.R.dimen.app_icon_size);

View File

@ -397,25 +397,6 @@ public class QtNative
});
}
private static boolean isSoftwareKeyboardVisible()
{
final Semaphore semaphore = new Semaphore(0);
final Boolean[] ret = {false};
runAction(new Runnable() {
@Override
public void run() {
ret[0] = m_activityDelegate.isSoftwareKeyboardVisible();
semaphore.release();
}
});
try {
semaphore.acquire();
} catch (Exception e) {
e.printStackTrace();
}
return ret[0];
}
private static void setFullScreen(final boolean fullScreen)
{
runAction(new Runnable() {

View File

@ -7,6 +7,11 @@ INCLUDEPATH += \
LIBS_PRIVATE = $$QMAKE_LIBS_CORE $$QMAKE_LIBS_GUI
lib_replace.match = $$[QT_INSTALL_LIBS/get]
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
win32-msvc2012|win32-msvc2013|winrt {
FXC = fxc.exe

View File

@ -121,7 +121,7 @@ void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
{
asm volatile (".set push\n"
".set mips32\n"
"sync 0x11\n"
"sync 0x12\n"
".set pop\n" ::: "memory");
}

View File

@ -1345,12 +1345,9 @@ static void qDefaultMsgHandler(QtMsgType type, const char *buf)
qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf));
}
#if defined(Q_COMPILER_THREAD_LOCAL) || (defined(Q_CC_MSVC) && !defined(Q_OS_WINCE))
#if defined(Q_CC_MSVC)
static __declspec(thread) bool msgHandlerGrabbed = false;
#else
#if defined(Q_COMPILER_THREAD_LOCAL)
static thread_local bool msgHandlerGrabbed = false;
#endif
static bool grabMessageHandler()
{
@ -1369,7 +1366,7 @@ static void ungrabMessageHandler()
#else
static bool grabMessageHandler() { return true; }
static void ungrabMessageHandler() { }
#endif // (Q_COMPILER_THREAD_LOCAL) || ((Q_CC_MSVC) && !(Q_OS_WINCE))
#endif // (Q_COMPILER_THREAD_LOCAL)
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
{

View File

@ -125,7 +125,7 @@
to author a plugin. This includes avoiding loading our nib for the main
menu and not taking possession of the native menu bar. When setting this
attribute to true will also set the AA_DontUseNativeMenuBar attribute
to true.
to true. It also disables native event filters.
\value AA_DontUseNativeMenuBar All menubars created while this attribute is
set to true won't be used as a native menubar (e.g, the menubar at

View File

@ -169,6 +169,7 @@
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
# define Q_PROCESSOR_X86_32
# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
# define Q_PROCESSOR_WORDSIZE 4
/*
* We define Q_PROCESSOR_X86 == 6 for anything above a equivalent or better

View File

@ -42,6 +42,17 @@
#ifndef QDIR_P_H
#define QDIR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qfilesystementry_p.h"
#include "qfilesystemmetadata_p.h"

View File

@ -167,7 +167,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
disk into a 16-bit Unicode QString. By default, it assumes that
the user system's local 8-bit encoding is used (e.g., UTF-8
on most unix based operating systems; see QTextCodec::codecForLocale() for
details). This can be changed using setCodec().
details). This can be changed using \l QTextStream::setCodec().
To write text, we can use operator<<(), which is overloaded to
take a QTextStream on the left and various data types (including
@ -987,8 +987,8 @@ bool QFile::open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
those cases, size() returns \c 0. See QIODevice::isSequential()
for more information.
\warning For Windows CE you may not be able to call seek(), setSize(),
fileTime(). size() returns \c 0.
\warning For Windows CE you may not be able to call seek(), and size()
returns \c 0.
\warning Since this function opens the file without specifying the file name,
you cannot use this QFile with a QFileInfo.

View File

@ -269,7 +269,7 @@ int QFileDevice::handle() const
/*!
Returns the name of the file.
The default implementation in QFileDevice returns QString().
The default implementation in QFileDevice returns a null string.
*/
QString QFileDevice::fileName() const
{

View File

@ -496,6 +496,7 @@ QStringList QFseventsFileSystemWatcherEngine::removePaths(const QStringList &pat
bool QFseventsFileSystemWatcherEngine::startStream()
{
Q_ASSERT(stream == 0);
Q_AUTORELEASE_POOL(pool)
if (stream) // This shouldn't happen, but let's be nice and handle it.
stopStream();

View File

@ -752,6 +752,9 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len)
if (len && writtenBytes == 0) {
writtenBytes = -1;
q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno));
} else {
// reset the cached size, if any
metaData.clearFlags(QFileSystemMetaData::SizeAttribute);
}
return writtenBytes;

View File

@ -217,7 +217,7 @@ QIODevicePrivate::~QIODevicePrivate()
\li waitFor....() - Subclasses of QIODevice implement blocking
functions for device-specific operations. For example, QProcess
has a function called waitForStarted() which suspends operation in
has a function called \l {QProcess::}{waitForStarted()} which suspends operation in
the calling thread until the process has started.
\endlist
@ -730,8 +730,7 @@ qint64 QIODevice::bytesAvailable() const
return d->buffer.size();
}
/*!
For buffered devices, this function returns the number of bytes
/*! For buffered devices, this function returns the number of bytes
waiting to be written. For devices with no buffer, this function
returns 0.
@ -943,9 +942,10 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
data read as a QByteArray.
This function has no way of reporting errors; returning an empty
QByteArray() can mean either that no data was currently available
QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
QByteArray QIODevice::read(qint64 maxSize)
{
Q_D(QIODevice);
@ -994,10 +994,10 @@ QByteArray QIODevice::read(qint64 maxSize)
\overload
Reads all available data from the device, and returns it as a
QByteArray.
byte array.
This function has no way of reporting errors; returning an empty
QByteArray() can mean either that no data was currently available
QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
QByteArray QIODevice::readAll()
@ -1177,10 +1177,10 @@ qint64 QIODevice::readLine(char *data, qint64 maxSize)
\overload
Reads a line from the device, but no more than \a maxSize characters,
and returns the result as a QByteArray.
and returns the result as a byte array.
This function has no way of reporting errors; returning an empty
QByteArray() can mean either that no data was currently available
QByteArray can mean either that no data was currently available
for reading, or that an error occurred.
*/
QByteArray QIODevice::readLine(qint64 maxSize)
@ -1531,7 +1531,7 @@ qint64 QIODevice::peek(char *data, qint64 maxSize)
\snippet code/src_corelib_io_qiodevice.cpp 5
This function has no way of reporting errors; returning an empty
QByteArray() can mean either that no data was currently available
QByteArray can mean either that no data was currently available
for peeking, or that an error occurred.
\sa read()

View File

@ -1689,8 +1689,8 @@ void QProcess::setEnvironment(const QStringList &environment)
\deprecated
Returns the environment that QProcess will use when starting a
process, or an empty QStringList if no environment has been set
using setEnvironment() or setEnvironmentHash(). If no environment
has been set, the environment of the calling process will be used.
using setEnvironment(). If no environment has been set, the
environment of the calling process will be used.
\note The environment settings are ignored on Windows CE,
as there is no concept of an environment.
@ -2016,7 +2016,7 @@ QByteArray QProcess::readAllStandardError()
\note No further splitting of the arguments is performed.
\b{Windows:} The arguments are quoted and joined into a command line
that is compatible with the CommandLineToArgvW() Windows function.
that is compatible with the \c CommandLineToArgvW() Windows function.
For programs that have different command line quoting requirements,
you need to use setNativeArguments().
@ -2320,8 +2320,8 @@ int QProcess::exitCode() const
Returns the exit status of the last process that finished.
On Windows, if the process was terminated with TerminateProcess()
from another application this function will still return NormalExit
On Windows, if the process was terminated with TerminateProcess() from
another application, this function will still return NormalExit
unless the exit code is less than 0.
*/
QProcess::ExitStatus QProcess::exitStatus() const

View File

@ -703,18 +703,20 @@ void QTemporaryFile::setFileTemplate(const QString &name)
/*!
If \a file is not already a native file then a QTemporaryFile is created
in the tempPath() and \a file is copied into the temporary file, then a
pointer to the temporary file is returned. If \a file is already a native
file, a QTemporaryFile is not created, no copy is made and 0 is returned.
If \a file is not already a native file, then a QTemporaryFile is created
in QDir::tempPath(), the contents of \a file is copied into it, and a pointer
to the temporary file is returned. Does nothing and returns \c 0 if \a file
is already a native file.
For example:
\code
QFile f(":/resources/file.txt");
QTemporaryFile::createNativeFile(f); // Returns a pointer to a temporary file
QFile f("/users/qt/file.txt");
QTemporaryFile::createNativeFile(f); // Returns 0
\endcode
\sa QFileInfo::isNativePath()
*/

View File

@ -42,6 +42,17 @@
#ifndef QTEMPORARYFILE_P_H
#define QTEMPORARYFILE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qglobal.h>
#ifndef QT_NO_TEMPORARYFILE

View File

@ -2824,7 +2824,7 @@ QTextStream &reset(QTextStream &stream)
/*!
\relates QTextStream
Calls skipWhiteSpace() on \a stream and returns \a stream.
Calls \l {QTextStream::}{skipWhiteSpace()} on \a stream and returns \a stream.
\sa {QTextStream manipulators}
*/

View File

@ -2338,7 +2338,7 @@ void QUrl::setHost(const QString &host, ParsingMode mode)
as DNS requests or in HTTP request headers). If that flag is not present,
this function returns the International Domain Name (IDN) in Unicode form,
according to the list of permissible top-level domains (see
idnWhiteList()).
idnWhitelist()).
All other flags are ignored. Host names cannot contain control or percent
characters, so the returned value can be considered fully decoded.
@ -2679,8 +2679,8 @@ void QUrl::setQuery(const QUrlQuery &query)
Sets the query string of the URL to an encoded version of \a
query. The contents of \a query are converted to a string
internally, each pair delimited by the character returned by
pairDelimiter(), and the key and value are delimited by
valueDelimiter().
queryPairDelimiter(), and the key and value are delimited by
queryValueDelimiter().
\note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
like HTML forms do. If you need that kind of encoding, you must encode
@ -2699,8 +2699,8 @@ void QUrl::setQuery(const QUrlQuery &query)
Sets the query string of the URL to the encoded version of \a
query. The contents of \a query are converted to a string
internally, each pair delimited by the character returned by
pairDelimiter(), and the key and value are delimited by
valueDelimiter().
queryPairDelimiter(), and the key and value are delimited by
queryValueDelimiter().
\obsolete Use QUrlQuery and setQuery().
@ -2714,11 +2714,11 @@ void QUrl::setQuery(const QUrlQuery &query)
Inserts the pair \a key = \a value into the query string of the
URL.
The key/value pair is encoded before it is added to the query. The
The key-value pair is encoded before it is added to the query. The
pair is converted into separate strings internally. The \a key and
\a value is first encoded into UTF-8 and then delimited by the
character returned by valueDelimiter(). Each key/value pair is
delimited by the character returned by pairDelimiter().
character returned by queryValueDelimiter(). Each key-value pair is
delimited by the character returned by queryPairDelimiter().
\note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
like HTML forms do. If you need that kind of encoding, you must encode
@ -2952,9 +2952,8 @@ QString QUrl::query(ComponentFormattingOptions options) const
The fragment is sometimes also referred to as the URL "reference".
Passing an argument of QString() (a null QString) will unset the fragment.
Passing an argument of QString("") (an empty but not null QString)
will set the fragment to an empty string (as if the original URL
had a lone "#").
Passing an argument of QString("") (an empty but not null QString) will set the
fragment to an empty string (as if the original URL had a lone "#").
The \a fragment data is interpreted according to \a mode: in StrictMode,
any '%' characters must be followed by exactly two hexadecimal characters
@ -3029,10 +3028,10 @@ QString QUrl::fragment(ComponentFormattingOptions options) const
The fragment is sometimes also referred to as the URL "reference".
Passing an argument of QByteArray() (a null QByteArray) will unset
the fragment. Passing an argument of QByteArray("") (an empty but
not null QByteArray) will set the fragment to an empty string (as
if the original URL had a lone "#").
Passing an argument of QByteArray() (a null QByteArray) will unset the fragment.
Passing an argument of QByteArray("") (an empty but not null QByteArray)
will set the fragment to an empty string (as if the original URL
had a lone "#").
\obsolete Use setFragment(), which has the same behavior of null / empty.

View File

@ -420,17 +420,17 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
}
/*!
Converts the value to a QVariant.
Converts the value to a \l {QVariant::}{QVariant()}.
The QJsonValue types will be converted as follows:
\value Null QVariant()
\value Null {QVariant::}{QVariant()}
\value Bool QMetaType::Bool
\value Double QMetaType::Double
\value String QString
\value Array QVariantList
\value Object QVariantMap
\value Undefined QVariant()
\value Undefined {QVariant::}{QVariant()}
\sa fromVariant()
*/
@ -553,7 +553,7 @@ QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const
Converts the value to an array and returns it.
If type() is not Array, a QJsonArray() will be returned.
If type() is not Array, a \l{QJsonArray::}{QJsonArray()} will be returned.
*/
QJsonArray QJsonValue::toArray() const
{
@ -578,8 +578,8 @@ QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const
Converts the value to an object and returns it.
If type() is not Object, the QJsonObject() will be returned.
*/
If type() is not Object, the \l {QJsonObject::}{QJsonObject()} will be returned.
*/
QJsonObject QJsonValue::toObject() const
{
return toObject(QJsonObject());

View File

@ -169,7 +169,7 @@ blackberry {
kernel/qeventdispatcher_blackberry_p.h
}
qqnx_pps {
qqnx_pps:!blackberry-playbook {
LIBS_PRIVATE += -lpps
SOURCES += \
kernel/qppsattribute.cpp \

View File

@ -2533,6 +2533,9 @@ void QCoreApplication::removeLibraryPath(const QString &path)
\note The filter function set here receives native messages,
i.e. MSG or XCB event structs.
\note Native event filters will be disabled when the application the
Qt::AA_MacPluginApplication attribute is set.
For maximum portability, you should always try to use QEvents
and QObject::installEventFilter() whenever possible.
@ -2542,6 +2545,11 @@ void QCoreApplication::removeLibraryPath(const QString &path)
*/
void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter *filterObj)
{
if (QCoreApplication::testAttribute(Qt::AA_MacPluginApplication)) {
qWarning("Native event filters are not applied when the Qt::AA_MacPluginApplication attribute is set");
return;
}
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance(QCoreApplicationPrivate::theMainThread);
if (!filterObj || !eventDispatcher)
return;

View File

@ -42,6 +42,17 @@
#ifndef QEVENTLOOP_P_H
#define QEVENTLOOP_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qobject_p.h"
QT_BEGIN_NAMESPACE

View File

@ -86,15 +86,14 @@ Q_GLOBAL_STATIC(JClassHash, cachedClasses)
static jclass getCachedClass(JNIEnv *env, const char *className)
{
jclass clazz = 0;
QString key = QLatin1String(className);
QHash<QString, jclass>::iterator it = cachedClasses->find(key);
QString classDotEnc = QString::fromLatin1(className).replace(QLatin1Char('/'), QLatin1Char('.'));
QHash<QString, jclass>::iterator it = cachedClasses->find(classDotEnc);
if (it == cachedClasses->end()) {
QJNIObjectPrivate classLoader = QtAndroidPrivate::classLoader();
if (!classLoader.isValid())
return 0;
QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(QString::fromLatin1(className).replace(QLatin1Char('/'),
QLatin1Char('.')));
QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(classDotEnc);
QJNIObjectPrivate classObject = classLoader.callObjectMethod("loadClass",
"(Ljava/lang/String;)Ljava/lang/Class;",
stringName.object());
@ -102,7 +101,7 @@ static jclass getCachedClass(JNIEnv *env, const char *className)
if (!exceptionCheckAndClear(env) && classObject.isValid())
clazz = static_cast<jclass>(env->NewGlobalRef(classObject.object()));
cachedClasses->insert(key, clazz);
cachedClasses->insert(classDotEnc, clazz);
} else {
clazz = it.value();
}

View File

@ -43,6 +43,17 @@
# error "Include qmetaobject_p.h (or moc's utils.h) before including this file."
#endif
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
QT_BEGIN_NAMESPACE
// This function is shared with moc.cpp. This file should be included where needed.

View File

@ -1644,9 +1644,10 @@ void QObject::killTimer(int id)
int at = d->extraData ? d->extraData->runningTimers.indexOf(id) : -1;
if (at == -1) {
// timer isn't owned by this object
qWarning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s), timer has not been killed",
qWarning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s, %s), timer has not been killed",
id,
this,
metaObject()->className(),
qPrintable(objectName()));
return;
}

View File

@ -42,6 +42,17 @@
#ifndef QMIMEDATABASE_P_H
#define QMIMEDATABASE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>

View File

@ -42,6 +42,17 @@
#ifndef QMIMEGLOBPATTERN_P_H
#define QMIMEGLOBPATTERN_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qstringlist.h>
#include <QtCore/qhash.h>

View File

@ -42,6 +42,17 @@
#ifndef QMIMEMAGICRULE_P_H
#define QMIMEMAGICRULE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qbytearray.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qlist.h>

View File

@ -42,6 +42,17 @@
#ifndef QMIMEMAGICRULEMATCHER_P_H
#define QMIMEMAGICRULEMATCHER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
#include <QtCore/qstring.h>

View File

@ -42,6 +42,17 @@
#ifndef QMIMEPROVIDER_P_H
#define QMIMEPROVIDER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qdatetime.h>
#include "qmimedatabase_p.h"
#include <QtCore/qset.h>

View File

@ -42,6 +42,17 @@
#ifndef QMIMETYPE_P_H
#define QMIMETYPE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qmimetype.h"
#include <QtCore/qhash.h>

View File

@ -43,6 +43,17 @@
#ifndef QMIMETYPEPARSER_P_H
#define QMIMETYPEPARSER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qmimedatabase_p.h"
#include "qmimeprovider_p.h"

View File

@ -42,6 +42,17 @@
#ifndef QSYSTEMLIBRARY_P_H
#define QSYSTEMLIBRARY_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qglobal.h>
#ifdef Q_OS_WIN
# include <QtCore/qstring.h>

View File

@ -62,8 +62,6 @@
# include "QtCore/qatomic_ia64.h"
#elif defined(Q_PROCESSOR_MIPS)
# include "QtCore/qatomic_mips.h"
#elif defined(Q_PROCESSOR_SPARC)
# include "QtCore/qatomic_sparc.h"
#elif defined(Q_PROCESSOR_X86)
# include <QtCore/qatomic_x86.h>

View File

@ -64,7 +64,7 @@ void QCollatorPrivate::init()
if (caseSensitivity == Qt::CaseInsensitive)
options |= kUCCollateCaseInsensitiveMask;
if (numericMode)
options |= kUCCollateDigitsAsNumberMask;
options |= kUCCollateDigitsAsNumberMask | kUCCollateDigitsOverrideMask;
if (ignorePunctuation)
options |= kUCCollatePunctuationSignificantMask;

View File

@ -43,6 +43,17 @@
#ifndef QCOLLATOR_P_H
#define QCOLLATOR_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qcollator.h"
#include <QVector>
#ifdef QT_USE_ICU

View File

@ -43,6 +43,8 @@
#include "qregularexpression.h"
#ifndef QT_NO_REGULAREXPRESSION
#include <QtCore/qcoreapplication.h>
#include <QtCore/qmutex.h>
#include <QtCore/qvector.h>
@ -2582,3 +2584,5 @@ static const char *pcreCompileErrorCodes[] =
#endif // #if 0
QT_END_NAMESPACE
#endif // QT_NO_REGULAREXPRESSION

View File

@ -42,6 +42,17 @@
#ifndef QSIMD_P_H
#define QSIMD_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qglobal.h>
#include <qatomic.h>

View File

@ -1327,9 +1327,6 @@ const QString::Null QString::null = { };
Returns a copy of the \a str string. The given string is converted
to Unicode using the fromUtf8() function.
This constructor is only available if Qt is configured with STL
compatibility enabled.
\sa fromLatin1(), fromLocal8Bit(), fromUtf8(), QByteArray::fromStdString()
*/
@ -1362,7 +1359,7 @@ const QString::Null QString::null = { };
wchar_t is 2 bytes wide (e.g. windows) and in ucs4 on platforms
where wchar_t is 4 bytes wide (most Unix systems).
This operator is mostly useful to pass a QString to a function
This method is mostly useful to pass a QString to a function
that accepts a std::wstring object.
\sa utf16(), toLatin1(), toUtf8(), toLocal8Bit()
@ -7861,12 +7858,9 @@ bool QString::isRightToLeft() const
QString. The Unicode data is converted into 8-bit characters using
the toUtf8() function.
This operator is mostly useful to pass a QString to a function
This method is mostly useful to pass a QString to a function
that accepts a std::string object.
If the QString contains non-Latin1 Unicode characters, using this
can lead to loss of information.
\sa toLatin1(), toUtf8(), toLocal8Bit(), QByteArray::toStdString()
*/

View File

@ -43,6 +43,17 @@
#ifndef QSTRINGITERATOR_H
#define QSTRINGITERATOR_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qstring.h>
QT_BEGIN_NAMESPACE

View File

@ -710,6 +710,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
script = QChar::Script(prop->script);
}
#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change.
if (Q_LIKELY(script != QChar::Script_Common)) {
// override preceding Common-s
while (sor > 0 && scripts[sor - 1] == QChar::Script_Common)
@ -719,6 +720,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
if (sor > 0)
script = scripts[sor - 1];
}
#endif
while (sor < eor)
scripts[sor++] = script;
@ -726,6 +728,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
script = prop->script;
}
eor = length;
#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change.
if (Q_LIKELY(script != QChar::Script_Common)) {
// override preceding Common-s
while (sor > 0 && scripts[sor - 1] == QChar::Script_Common)
@ -735,6 +739,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)
if (sor > 0)
script = scripts[sor - 1];
}
#endif
while (sor < eor)
scripts[sor++] = script;
}

View File

@ -47,6 +47,17 @@
#ifndef QGIFHANDLER_P_H
#define QGIFHANDLER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/qimageiohandler.h>
#include <QtGui/qimage.h>
#include <QtCore/qbytearray.h>

View File

@ -2927,6 +2927,8 @@ QImage QImage::mirrored_helper(bool horizontal, bool vertical) const
result.d->colortable = d->colortable;
result.d->has_alpha_clut = d->has_alpha_clut;
result.d->devicePixelRatio = d->devicePixelRatio;
result.d->dpmx = d->dpmx;
result.d->dpmy = d->dpmy;
do_mirror(result.d, d, horizontal, vertical);

View File

@ -163,7 +163,9 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
const uint *ptr = fetch(buffer, srcData, x, l);
ptr = srcLayout->convertToARGB32PM(buffer, ptr, l, srcLayout, 0);
ptr = destLayout->convertFromARGB32PM(buffer, ptr, l, destLayout, 0);
store(srcData, ptr, x, l);
// The conversions might be passthrough and not use the buffer, in that case we are already done.
if (srcData != (const uchar*)ptr)
store(srcData, ptr, x, l);
x += l;
}
srcData += data->bytes_per_line;

View File

@ -42,6 +42,17 @@
#ifndef QJPEGHANDLER_P_H
#define QJPEGHANDLER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/qimageiohandler.h>
#include <QtCore/QSize>
#include <QtCore/QRect>

View File

@ -42,6 +42,17 @@
#ifndef QPIXMAP_BLITTER_P_H
#define QPIXMAP_BLITTER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformpixmap.h>
#include <private/qpaintengine_blitter_p.h>

View File

@ -176,7 +176,9 @@ bool QGuiApplicationPrivate::noGrab = false;
static qreal fontSmoothingGamma = 1.7;
extern void qRegisterGuiVariant();
#ifndef QT_NO_ANIMATION
extern void qRegisterGuiGetInterpolator();
#endif
extern void qInitDrawhelperAsm();
extern void qInitImageConversions();
@ -588,6 +590,7 @@ QGuiApplication::~QGuiApplication()
#endif //QT_NO_SESSIONMANAGER
clearPalette();
QFontDatabase::removeAllApplicationFonts();
#ifndef QT_NO_CURSOR
d->cursor_list.clear();
@ -1312,8 +1315,10 @@ void QGuiApplicationPrivate::init()
// trigger registering of QVariant's GUI types
qRegisterGuiVariant();
#ifndef QT_NO_ANIMATION
// trigger registering of animation interpolators
qRegisterGuiGetInterpolator();
#endif
// set a global share context when enabled unless there is already one
#ifndef QT_NO_OPENGL

View File

@ -83,7 +83,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create()
QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE"));
if (icString == QLatin1String("none"))
icString = QStringLiteral("compose");
return 0;
ic = create(icString);
if (ic && ic->isValid())

View File

@ -305,10 +305,10 @@ void QPlatformScreen::resizeMaximizedWindows()
if (platformScreenForWindow(w) != this)
continue;
if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry)
w->setGeometry(newGeometry);
else if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry)
if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry)
w->setGeometry(newAvailableGeometry);
else if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry)
w->setGeometry(newGeometry);
}
}

View File

@ -46,9 +46,11 @@
// W A R N I N G
// -------------
//
// This file is part of the QPA API and is not meant to be used
// in applications. Usage of this API may make your code
// source and binary incompatible with future versions of Qt.
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QtGlobal>

View File

@ -42,6 +42,17 @@
#ifndef QSHAPEDPIXMAPDNDWINDOW_H
#define QSHAPEDPIXMAPDNDWINDOW_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/QWindow>
#include <QtGui/QPixmap>
#include <QtGui/QBackingStore>

View File

@ -39,8 +39,19 @@
**
****************************************************************************/
#ifndef QSIMPLEDRAG_H
#define QSIMPLEDRAG_H
#ifndef QSIMPLEDRAG_P_H
#define QSIMPLEDRAG_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformdrag.h>

View File

@ -391,11 +391,30 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate)
q->destroy();
connectToScreen(newScreen);
if (newScreen && shouldRecreate)
q->create();
create(true);
emitScreenChangedRecursion(newScreen);
}
}
void QWindowPrivate::create(bool recursive)
{
Q_Q(QWindow);
if (!platformWindow) {
platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(q);
QObjectList childObjects = q->children();
for (int i = 0; i < childObjects.size(); i ++) {
QObject *object = childObjects.at(i);
if (object->isWindowType()) {
QWindow *window = static_cast<QWindow *>(object);
if (recursive)
window->d_func()->create(true);
if (window->d_func()->platformWindow)
window->d_func()->platformWindow->setParent(platformWindow);
}
}
}
}
void QWindowPrivate::clearFocusObject()
{
}
@ -516,18 +535,7 @@ bool QWindow::isVisible() const
void QWindow::create()
{
Q_D(QWindow);
if (!d->platformWindow) {
d->platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(this);
QObjectList childObjects = children();
for (int i = 0; i < childObjects.size(); i ++) {
QObject *object = childObjects.at(i);
if(object->isWindowType()) {
QWindow *window = static_cast<QWindow *>(object);
if (window->d_func()->platformWindow)
window->d_func()->platformWindow->setParent(d->platformWindow);
}
}
}
d->create(false);
}
/*!

View File

@ -85,6 +85,7 @@ class QPlatformWindow;
class QBackingStore;
class QScreen;
class QAccessibleInterface;
class QWindowContainer;
class Q_GUI_EXPORT QWindow : public QObject, public QSurface
{
@ -359,6 +360,7 @@ private:
friend class QGuiApplication;
friend class QGuiApplicationPrivate;
friend class QWindowContainer;
friend Q_GUI_EXPORT QWindowPrivate *qt_window_private(QWindow *window);
};

View File

@ -133,6 +133,7 @@ public:
void _q_clearAlert();
bool windowRecreationRequired(QScreen *newScreen) const;
void create(bool recursive);
void setTopLevelScreen(QScreen *newScreen, bool recreate);
void connectToScreen(QScreen *topLevelScreen);
void disconnectFromScreen();

View File

@ -42,6 +42,17 @@
#ifndef QOPENGL_P_H
#define QOPENGL_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qopengl.h>
#include <private/qopenglcontext_p.h>
#include <QtCore/qset.h>

View File

@ -42,6 +42,17 @@
#ifndef QOPENGLQUERYHELPER_P_H
#define QOPENGLQUERYHELPER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qglobal.h>
#if !defined(QT_OPENGL_ES_2)

View File

@ -42,6 +42,17 @@
#ifndef QABSTRACTOPENGLTEXTURE_P_H
#define QABSTRACTOPENGLTEXTURE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#ifndef QT_NO_OPENGL
#include "private/qobject_p.h"

View File

@ -42,6 +42,17 @@
#ifndef QOPENGLTEXTUREBLITTER_P_H
#define QOPENGLTEXTUREBLITTER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/qopengl.h>
#include <QtGui/QMatrix3x3>

View File

@ -42,6 +42,17 @@
#ifndef QOPENGLTEXTUREHELPER_P_H
#define QOPENGLTEXTUREHELPER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qglobal.h>
#ifndef QT_NO_OPENGL

View File

@ -51,6 +51,17 @@
#ifndef QOPENGLVERSIONFUNCTIONFACTORY_P_H
#define QOPENGLVERSIONFUNCTIONFACTORY_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#ifndef QT_NO_OPENGL
#include <QtCore/QtGlobal>

View File

@ -42,6 +42,17 @@
#ifndef QTRIANGULATINGSTROKER_P_H
#define QTRIANGULATINGSTROKER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <private/qdatabuffer_p.h>
#include <qvarlengtharray.h>
#include <private/qvectorpath_p.h>

View File

@ -42,6 +42,17 @@
#ifndef QBLITTABLE_P_H
#define QBLITTABLE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qsize.h>
#include <QtGui/private/qpixmap_blitter_p.h>

View File

@ -533,8 +533,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = -1;
lastPixel.y = -1;
lastPixel.x = INT_MIN;
lastPixel.y = INT_MIN;
bool closed;
const QPainterPath::ElementType *e = subPath(type, end, points, &closed);
@ -588,8 +588,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = -1;
lastPixel.y = -1;
lastPixel.x = INT_MIN;
lastPixel.y = INT_MIN;
const qreal *begin = points;
const qreal *end = points + 2*path.elementCount();

View File

@ -42,6 +42,17 @@
#ifndef QCOSMETICSTROKER_P_H
#define QCOSMETICSTROKER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <private/qdrawhelper_p.h>
#include <private/qvectorpath_p.h>
#include <private/qpaintengine_raster_p.h>

View File

@ -42,6 +42,17 @@
#ifndef QPAINTENGINE_BLITTER_P_H
#define QPAINTENGINE_BLITTER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "private/qpaintengine_raster_p.h"
#ifndef QT_NO_BLITTABLE

View File

@ -822,6 +822,13 @@ QFontEngine *loadSingleEngine(int script,
QFontCache::Key key(def,script);
QFontEngine *engine = QFontCache::instance()->findEngine(key);
if (!engine) {
// If the font data's native stretch matches the requested stretch we need to set stretch to 100
// to avoid the fontengine synthesizing stretch. If they didn't match exactly we need to calculate
// the new stretch factor. This only done if not matched by styleName.
bool styleNameMatch = !request.styleName.isEmpty() && request.styleName == style->styleName;
if (!styleNameMatch && style->key.stretch != 0 && request.stretch != 0)
def.stretch = (request.stretch * 100 + 50) / style->key.stretch;
engine = pfdb->fontEngine(def, size->handle);
if (engine) {
Q_ASSERT(engine->type() != QFontEngine::Multi);
@ -931,7 +938,7 @@ static
unsigned int bestFoundry(int script, unsigned int score, int styleStrategy,
const QtFontFamily *family, const QString &foundry_name,
QtFontStyle::Key styleKey, int pixelSize, char pitch,
QtFontDesc *desc, int force_encoding_id)
QtFontDesc *desc, int force_encoding_id, QString styleName = QString())
{
Q_UNUSED(force_encoding_id);
Q_UNUSED(script);
@ -953,7 +960,7 @@ unsigned int bestFoundry(int script, unsigned int score, int styleStrategy,
FM_DEBUG(" looking for matching style in foundry '%s' %d",
foundry->name.isEmpty() ? "-- none --" : foundry->name.toLatin1().constData(), foundry->count);
QtFontStyle *style = bestStyle(foundry, styleKey);
QtFontStyle *style = bestStyle(foundry, styleKey, styleName);
if (!style->smoothScalable && (styleStrategy & QFont::ForceOutline)) {
FM_DEBUG(" ForceOutline set, but not smoothly scalable");
@ -1140,13 +1147,13 @@ static int match(int script, const QFontDef &request,
unsigned int newscore =
bestFoundry(script, score, request.styleStrategy,
test.family, foundry_name, styleKey, request.pixelSize, pitch,
&test, force_encoding_id);
&test, force_encoding_id, request.styleName);
if (test.foundry == 0) {
// the specific foundry was not found, so look for
// any foundry matching our requirements
newscore = bestFoundry(script, score, request.styleStrategy, test.family,
QString(), styleKey, request.pixelSize,
pitch, &test, force_encoding_id);
pitch, &test, force_encoding_id, request.styleName);
}
if (newscore < score) {

View File

@ -550,60 +550,58 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
}
}
}
if (!hasScript) {
if (codePageRange[0] & ((1 << Latin1CsbBit) | (1 << CentralEuropeCsbBit) | (1 << TurkishCsbBit) | (1 << BalticCsbBit))) {
writingSystems.setSupported(QFontDatabase::Latin);
hasScript = true;
//qDebug("font %s supports Latin", familyName.latin1());
}
if (codePageRange[0] & (1 << CyrillicCsbBit)) {
writingSystems.setSupported(QFontDatabase::Cyrillic);
hasScript = true;
//qDebug("font %s supports Cyrillic", familyName.latin1());
}
if (codePageRange[0] & (1 << GreekCsbBit)) {
writingSystems.setSupported(QFontDatabase::Greek);
hasScript = true;
//qDebug("font %s supports Greek", familyName.latin1());
}
if (codePageRange[0] & (1 << HebrewCsbBit)) {
writingSystems.setSupported(QFontDatabase::Hebrew);
hasScript = true;
//qDebug("font %s supports Hebrew", familyName.latin1());
}
if (codePageRange[0] & (1 << ArabicCsbBit)) {
writingSystems.setSupported(QFontDatabase::Arabic);
hasScript = true;
//qDebug("font %s supports Arabic", familyName.latin1());
}
if (codePageRange[0] & (1 << VietnameseCsbBit)) {
writingSystems.setSupported(QFontDatabase::Vietnamese);
hasScript = true;
//qDebug("font %s supports Vietnamese", familyName.latin1());
}
if (codePageRange[0] & (1 << SimplifiedChineseCsbBit)) {
writingSystems.setSupported(QFontDatabase::SimplifiedChinese);
hasScript = true;
//qDebug("font %s supports Simplified Chinese", familyName.latin1());
}
if (codePageRange[0] & (1 << TraditionalChineseCsbBit)) {
writingSystems.setSupported(QFontDatabase::TraditionalChinese);
hasScript = true;
//qDebug("font %s supports Traditional Chinese", familyName.latin1());
}
if (codePageRange[0] & (1 << JapaneseCsbBit)) {
writingSystems.setSupported(QFontDatabase::Japanese);
hasScript = true;
//qDebug("font %s supports Japanese", familyName.latin1());
}
if (codePageRange[0] & ((1 << KoreanCsbBit) | (1 << KoreanJohabCsbBit))) {
writingSystems.setSupported(QFontDatabase::Korean);
hasScript = true;
//qDebug("font %s supports Korean", familyName.latin1());
}
if (!hasScript)
writingSystems.setSupported(QFontDatabase::Symbol);
if (codePageRange[0] & ((1 << Latin1CsbBit) | (1 << CentralEuropeCsbBit) | (1 << TurkishCsbBit) | (1 << BalticCsbBit))) {
writingSystems.setSupported(QFontDatabase::Latin);
hasScript = true;
//qDebug("font %s supports Latin", familyName.latin1());
}
if (codePageRange[0] & (1 << CyrillicCsbBit)) {
writingSystems.setSupported(QFontDatabase::Cyrillic);
hasScript = true;
//qDebug("font %s supports Cyrillic", familyName.latin1());
}
if (codePageRange[0] & (1 << GreekCsbBit)) {
writingSystems.setSupported(QFontDatabase::Greek);
hasScript = true;
//qDebug("font %s supports Greek", familyName.latin1());
}
if (codePageRange[0] & (1 << HebrewCsbBit)) {
writingSystems.setSupported(QFontDatabase::Hebrew);
hasScript = true;
//qDebug("font %s supports Hebrew", familyName.latin1());
}
if (codePageRange[0] & (1 << ArabicCsbBit)) {
writingSystems.setSupported(QFontDatabase::Arabic);
hasScript = true;
//qDebug("font %s supports Arabic", familyName.latin1());
}
if (codePageRange[0] & (1 << VietnameseCsbBit)) {
writingSystems.setSupported(QFontDatabase::Vietnamese);
hasScript = true;
//qDebug("font %s supports Vietnamese", familyName.latin1());
}
if (codePageRange[0] & (1 << SimplifiedChineseCsbBit)) {
writingSystems.setSupported(QFontDatabase::SimplifiedChinese);
hasScript = true;
//qDebug("font %s supports Simplified Chinese", familyName.latin1());
}
if (codePageRange[0] & (1 << TraditionalChineseCsbBit)) {
writingSystems.setSupported(QFontDatabase::TraditionalChinese);
hasScript = true;
//qDebug("font %s supports Traditional Chinese", familyName.latin1());
}
if (codePageRange[0] & (1 << JapaneseCsbBit)) {
writingSystems.setSupported(QFontDatabase::Japanese);
hasScript = true;
//qDebug("font %s supports Japanese", familyName.latin1());
}
if (codePageRange[0] & ((1 << KoreanCsbBit) | (1 << KoreanJohabCsbBit))) {
writingSystems.setSupported(QFontDatabase::Korean);
hasScript = true;
//qDebug("font %s supports Korean", familyName.latin1());
}
if (!hasScript)
writingSystems.setSupported(QFontDatabase::Symbol);
return writingSystems;
}

View File

@ -118,7 +118,9 @@ private:
return;
const int end = start + length;
for (int i = start + 1; i < end; ++i) {
if (m_analysis[i] == m_analysis[start]
if (m_analysis[i].bidiLevel == m_analysis[start].bidiLevel
&& m_analysis[i].flags == m_analysis[start].flags
&& (m_analysis[i].script == m_analysis[start].script || m_string[i] == QLatin1Char('.'))
&& m_analysis[i].flags < QScriptAnalysis::SpaceTabOrObject
&& i - start < MaxItemLength)
continue;

View File

@ -2501,7 +2501,7 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
}
int lineEnd = line.from + line.length + line.trailingSpaces;
int pos = *cursorPos;
int pos = qBound(0, *cursorPos, lineEnd);
int itm;
const QCharAttributes *attributes = eng->attributes();
if (!attributes) {

View File

@ -42,6 +42,17 @@
#ifndef QABSTRACTLAYOUTSTYLEINFO_P_H
#define QABSTRACTLAYOUTSTYLEINFO_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qnamespace.h>
#include "qlayoutpolicy_p.h"

View File

@ -42,6 +42,17 @@
#ifndef QLAYOUTPOLICY_H
#define QLAYOUTPOLICY_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qobject.h>
#include <QtCore/qnamespace.h>

View File

@ -231,6 +231,8 @@ void QNetworkAccessAuthenticationManager::cacheCredentials(const QUrl &url,
const QAuthenticator *authenticator)
{
Q_ASSERT(authenticator);
if (authenticator->isNull())
return;
QString domain = QString::fromLatin1("/"); // FIXME: make QAuthenticator return the domain
QString realm = authenticator->realm();

View File

@ -211,7 +211,7 @@ void QNetworkAccessFtpBackend::ftpConnectionReady(QNetworkAccessCache::Cacheable
// no, defer the actual operation until after we've logged in
}
void QNetworkAccessFtpBackend::disconnectFromFtp()
void QNetworkAccessFtpBackend::disconnectFromFtp(CacheCleanupMode mode)
{
state = Disconnecting;
@ -219,7 +219,12 @@ void QNetworkAccessFtpBackend::disconnectFromFtp()
disconnect(ftp, 0, this, 0);
QByteArray key = makeCacheKey(url());
QNetworkAccessManagerPrivate::getObjectCache(this)->releaseEntry(key);
if (mode == RemoveCachedConnection) {
QNetworkAccessManagerPrivate::getObjectCache(this)->removeEntry(key);
ftp->dispose();
} else {
QNetworkAccessManagerPrivate::getObjectCache(this)->releaseEntry(key);
}
ftp = 0;
}
@ -274,14 +279,7 @@ void QNetworkAccessFtpBackend::ftpDone()
}
// we're not connected, so remove the cache entry:
QByteArray key = makeCacheKey(url());
QNetworkAccessManagerPrivate::getObjectCache(this)->removeEntry(key);
disconnect(ftp, 0, this, 0);
ftp->dispose();
ftp = 0;
state = Disconnecting;
disconnectFromFtp(RemoveCachedConnection);
finished();
return;
}
@ -301,7 +299,7 @@ void QNetworkAccessFtpBackend::ftpDone()
else
error(QNetworkReply::ContentAccessDenied, msg);
disconnectFromFtp();
disconnectFromFtp(RemoveCachedConnection);
finished();
}

View File

@ -90,7 +90,12 @@ public:
virtual void downstreamReadyWrite();
void disconnectFromFtp();
enum CacheCleanupMode {
ReleaseCachedConnection,
RemoveCachedConnection
};
void disconnectFromFtp(CacheCleanupMode mode = ReleaseCachedConnection);
public slots:
void ftpConnectionReady(QNetworkAccessCache::CacheableObject *object);

View File

@ -439,9 +439,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt
phase = Done;
break;
case Ntlm:
// #### extract from header
if (user.isEmpty() && password.isEmpty())
phase = Done;
// work is done in calculateResponse()
break;
case DigestMd5: {
this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));

View File

@ -42,6 +42,17 @@
#ifndef QURLINFO_H
#define QURLINFO_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qdatetime.h>
#include <QtCore/qstring.h>
#include <QtCore/qiodevice.h>

View File

@ -594,16 +594,18 @@ void QHttpSocketEngine::slotSocketReadNotification()
priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
priv->hasFailed = false;
} else if (statusCode == 407) {
if (d->credentialsSent) {
if (d->authenticator.isNull())
d->authenticator.detach();
priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
if (d->credentialsSent && priv->phase != QAuthenticatorPrivate::Phase2) {
// Remember that (e.g.) NTLM is two-phase, so only reset when the authentication is not currently in progress.
//407 response again means the provided username/password were invalid.
d->authenticator = QAuthenticator(); //this is needed otherwise parseHttpResponse won't set the state, and then signal isn't emitted.
d->authenticator.detach();
priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
priv->hasFailed = true;
}
else if (d->authenticator.isNull())
d->authenticator.detach();
priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
priv->parseHttpResponse(d->reply->header(), true);

View File

@ -42,6 +42,17 @@
#ifndef QSSLCERTIFICATEEXTENSION_P_H
#define QSSLCERTIFICATEEXTENSION_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qsslcertificateextension.h"
QT_BEGIN_NAMESPACE

View File

@ -44,6 +44,17 @@
#ifndef QSSLCONTEXT_OPENSSL_P_H
#define QSSLCONTEXT_OPENSSL_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qvariant.h>
#include <QtNetwork/qsslcertificate.h>
#include <QtNetwork/qsslconfiguration.h>

View File

@ -42,6 +42,17 @@
#ifndef QCFSOCKETNOTIFIER_P_H
#define QCFSOCKETNOTIFIER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qabstracteventdispatcher.h>
#include <QtCore/qhash.h>

View File

@ -42,6 +42,17 @@
#ifndef QMACGLCONVENIENCE_H
#define QMACGLCONVENIENCE_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QSurfaceFormat>
#include <QString>
#include <OpenGL/OpenGL.h>

View File

@ -42,6 +42,17 @@
#ifndef QMACMIME_H
#define QMACMIME_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore>
#include <CoreFoundation/CoreFoundation.h>

View File

@ -42,6 +42,17 @@
#ifndef QDEVICEDISCOVERY_H
#define QDEVICEDISCOVERY_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QObject>
#include <QSocketNotifier>
#include <QStringList>

View File

@ -42,6 +42,17 @@
#ifndef QEGLCOMPOSITOR_H
#define QEGLCOMPOSITOR_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QTimer>
QT_BEGIN_NAMESPACE

View File

@ -42,6 +42,17 @@
#ifndef QEGLCONVENIENCE_H
#define QEGLCONVENIENCE_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtGui/QSurfaceFormat>
#include <QtCore/QVector>
#include <QtCore/QSizeF>

View File

@ -42,6 +42,17 @@
#ifndef QEGLPBUFFER_H
#define QEGLPBUFFER_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <EGL/egl.h>
#include <qpa/qplatformoffscreensurface.h>

View File

@ -42,6 +42,17 @@
#ifndef QEGLPLATFORMBACKINGSTORE_H
#define QEGLPLATFORMBACKINGSTORE_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformbackingstore.h>
#include <QImage>

View File

@ -42,6 +42,17 @@
#ifndef QEGLPLATFORMCONTEXT_H
#define QEGLPLATFORMCONTEXT_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformwindow.h>
#include <qpa/qplatformopenglcontext.h>
#include <QtCore/QVariant>

View File

@ -42,6 +42,17 @@
#ifndef QEGLPLATFORMCURSOR_H
#define QEGLPLATFORMCURSOR_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformcursor.h>
#include <qpa/qplatformscreen.h>
#include <QtGui/QOpenGLFunctions>

View File

@ -42,6 +42,17 @@
#ifndef QEGLPLATFORMINTEGRATION_H
#define QEGLPLATFORMINTEGRATION_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformnativeinterface.h>
#include <QtCore/QVariant>

Some files were not shown because too many files have changed in this diff Show More