Merge 5.13 into 5.13.2

Change-Id: Id8852e90bfc5e4bd3e344435195992c5c7a0ab86
This commit is contained in:
Frederik Gladhorn 2019-10-11 09:54:09 +02:00
commit afb82ef5be
23 changed files with 79 additions and 49 deletions

View File

@ -825,9 +825,7 @@ defineTest(qtConfLibrary_pkgConfig) {
!qtConfResolveLibs($${1}.libs, $$libs): \
return(false)
contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false)
qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false)
eval(libs = $$libpaths $$libs)
qtRunLoggedCommand("$$pkg_config --static --libs $$args", libs)|return(false)
!qtConfResolveLibs($${1}.libs, $$libs): \
return(false)
}

View File

@ -16,7 +16,7 @@ PROVIDER_NAME = qt$$lower($$MODULE)
INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}
!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
if(qtConfig(lttng)|qtConfig(etw)) {
SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}
isEmpty(BUILDS)|build_pass {

View File

@ -27,8 +27,8 @@ distclean: clean_all
$(EXPORT_SUBTARGETS): % : %-build
# Generic targets
%_first: $(firstword $(call targets, %)) ;
%_all: $(call targets, %) ;
%_first: $(EXPORT_PRE_TARGETDEPS) $(firstword $(call targets, %)) ;
%_all: $(EXPORT_PRE_TARGETDEPS) $(call targets, %) ;
# Actions
%-build: ACTION = build

View File

@ -29,6 +29,8 @@ cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args"
debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
system("$$QMAKE_CD $$system_quote($$OUT_PWD) && $$cmd")
QMAKE_EXTRA_VARIABLES += PRE_TARGETDEPS
# Subtargets
for(build, BUILDS): \

View File

@ -4690,7 +4690,7 @@
The definitions above define a qmake target called \c mytarget, containing a
Makefile target called \c{.buildfile} which in turn is generated with the
\l{touchfunction}{touch()} function. Finally, the
\c touch command. Finally, the
\c{.depends} member specifies that \c mytarget depends on \c mytarget2,
another target that is defined afterwards. \c mytarget2 is a dummy target.
It is only defined to echo some text to the console.

View File

@ -709,10 +709,14 @@ QT_END_NAMESPACE
#include "private/qcoreapplication_p.h"
QT_WARNING_DISABLE_GCC("-Wattributes")
QT_WARNING_DISABLE_CLANG("-Wattributes")
QT_WARNING_DISABLE_INTEL(2621)
extern const char qt_core_interpreter[] __attribute__((section(".interp")))
= ELF_INTERPRETER;
extern "C" void qt_core_boilerplate();
extern "C" void qt_core_boilerplate() __attribute__((force_align_arg_pointer));
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_BUILD_STR "\n"

View File

@ -232,7 +232,7 @@ QT_BEGIN_NAMESPACE
\row \li DocumentsLocation
\li "~/Documents"
\row \li FontsLocation
\li "~/.fonts"
\li "~/.fonts", "~/.local/share/fonts", "/usr/local/share/fonts", "/usr/share/fonts"
\row \li ApplicationsLocation
\li "~/.local/share/applications", "/usr/local/share/applications", "/usr/share/applications"
\row \li MusicLocation

View File

@ -348,6 +348,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
break;
case FontsLocation:
dirs += QDir::homePath() + QLatin1String("/.fonts");
dirs += xdgDataDirs();
for (int i = 1; i < dirs.count(); ++i)
dirs[i].append(QLatin1String("/fonts"));
break;
default:
break;

View File

@ -870,8 +870,12 @@ bool QDBusConnection::disconnect(const QString &service, const QString &path, co
This function does not replace existing objects: if there is already an object registered at
path \a path, this function will return false. Use unregisterObject() to unregister it first.
The ExportChildObjects flag exports child objects on D-Bus based on the
path of the registered objects and the QObject::objectName of the child.
Therefore, it is important for the child object to have an object name.
You cannot register an object as a child object of an object that
was registered with QDBusConnection::ExportChildObjects.
was registered with ExportChildObjects.
*/
bool QDBusConnection::registerObject(const QString &path, QObject *object, RegisterOptions options)
{
@ -890,8 +894,12 @@ bool QDBusConnection::registerObject(const QString &path, QObject *object, Regis
This function does not replace existing objects: if there is already an object registered at
path \a path, this function will return false. Use unregisterObject() to unregister it first.
The ExportChildObjects flag exports child objects on D-Bus based on the
path of the registered objects and the QObject::objectName of the child.
Therefore, it is important for the child object to have an object name.
You cannot register an object as a child object of an object that
was registered with QDBusConnection::ExportChildObjects.
was registered with ExportChildObjects.
*/
bool QDBusConnection::registerObject(const QString &path, const QString &interface, QObject *object, RegisterOptions options)
{

View File

@ -416,7 +416,7 @@ QFrameInfo QMoviePrivate::infoForFrame(int frameNumber)
} else {
// We've read all frames now. Return an end marker
haveReadAll = true;
return QFrameInfo::endMarker();
return frameNumber == greatestFrameNumber + 1 ? QFrameInfo::endMarker() : QFrameInfo();
}
}
}

View File

@ -358,7 +358,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
int precedingSpaces = 0;
int exportedIndex = 0;
for (int i=0; i <= fragmentText.count(); ++i) {
QChar character = fragmentText[i];
QChar character = (i == fragmentText.count() ? QChar() : fragmentText.at(i));
bool isSpace = character.unicode() == ' ';
// find more than one space. -> <text:s text:c="2" />

View File

@ -152,6 +152,18 @@
"features": [
"disable_program_cache"
]
}
},
{
"id": 13,
"description": "Disable DesktopGL on Windows with Mobile Intel(R) 4 Series Express Chipset Family graphics card (QTBUG-58772)",
"vendor_id": "0x8086",
"device_id": [ "0x2A42" ],
"os": {
"type": "win"
},
"features": [
"disable_desktopgl"
]
}
]
}

View File

@ -790,7 +790,7 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode)
xcb_randr_mode_info_t *modeInfo = modesIter.data;
if (modeInfo->id == mode) {
const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal;
m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / dotCount : 0;
m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / qreal(dotCount) : 0;
m_mode = mode;
break;
}

View File

@ -226,7 +226,7 @@ private:
QRect m_availableGeometry;
Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation;
QXcbCursor *m_cursor;
int m_refreshRate = 60;
qreal m_refreshRate = 60.0;
int m_pixelDensity = 1;
QEdidParser m_edid;
};

View File

@ -70,7 +70,7 @@ src_winmain.depends = sub-corelib # just for the module .pri file
src_corelib.subdir = $$PWD/corelib
src_corelib.target = sub-corelib
src_corelib.depends = src_tools_moc src_tools_rcc src_tools_qfloat16_tables
src_corelib.depends = src_tools_moc src_tools_rcc src_tools_tracegen src_tools_qfloat16_tables
src_xml.subdir = $$PWD/xml
src_xml.target = sub-xml
@ -157,17 +157,12 @@ src_android.subdir = $$PWD/android
src_3rdparty_freetype.depends += src_corelib
}
}
SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_qfloat16_tables
SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_tracegen src_tools_qfloat16_tables
qtConfig(regularexpression):pcre2 {
SUBDIRS += src_3rdparty_pcre2
src_corelib.depends += src_3rdparty_pcre2
}
TOOLS = src_tools_moc src_tools_rcc src_tools_qlalr src_tools_qfloat16_tables
!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
SUBDIRS += src_tools_tracegen
src_corelib.depends += src_tools_tracegen
TOOLS += src_tools_tracegen
}
TOOLS = src_tools_moc src_tools_rcc src_tools_tracegen src_tools_qlalr src_tools_qfloat16_tables
SUBDIRS += src_corelib src_tools_qlalr
win32:SUBDIRS += src_winmain
qtConfig(network) {

View File

@ -42,6 +42,7 @@
#include <qvector.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qtypeinfo.h>
struct Tracepoint

View File

@ -514,15 +514,6 @@ void QStyledItemDelegate::updateEditorGeometry(QWidget *editor,
QStyle *style = widget ? widget->style() : QApplication::style();
QRect geom = style->subElementRect(QStyle::SE_ItemViewItemText, &opt, widget);
const int delta = qSmartMinSize(editor).width() - geom.width();
if (delta > 0) {
//we need to widen the geometry
if (editor->layoutDirection() == Qt::RightToLeft)
geom.adjust(-delta, 0, 0, 0);
else
geom.adjust(0, 0, delta, 0);
}
editor->setGeometry(geom);
}

View File

@ -788,10 +788,12 @@ void QOpenGLWidgetPrivate::initialize()
if (initialized)
return;
// Get our toplevel's context with which we will share in order to make the
// texture usable by the underlying window's backingstore.
// If no global shared context get our toplevel's context with which we
// will share in order to make the texture usable by the underlying window's backingstore.
QWidget *tlw = q->window();
QOpenGLContext *shareContext = get(tlw)->shareContext();
QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext)
shareContext = get(tlw)->shareContext();
// If shareContext is null, showing content on-screen will not work.
// However, offscreen rendering and grabFramebuffer() will stay fully functional.

View File

@ -885,7 +885,7 @@ void QWidgetWindow::handleDragEnterEvent(QDragEnterEvent *event, QWidget *widget
void QWidgetWindow::handleDragMoveEvent(QDragMoveEvent *event)
{
auto *widget = findDnDTarget(m_widget, event->pos());
QPointer<QWidget> widget = findDnDTarget(m_widget, event->pos());
if (!widget) {
event->ignore();
if (m_dragTarget) { // Send DragLeave to previous
@ -908,14 +908,18 @@ void QWidgetWindow::handleDragMoveEvent(QDragMoveEvent *event)
QGuiApplication::forwardEvent(m_dragTarget, &leaveEvent, event);
m_dragTarget = nullptr;
}
// Send DragEnter to new widget.
handleDragEnterEvent(static_cast<QDragEnterEvent*>(event), widget);
// Handling 'DragEnter' should suffice for the application.
translated.setDropAction(event->dropAction());
translated.setAccepted(event->isAccepted());
// The drag enter event is always immediately followed by a drag move event,
// see QDragEnterEvent documentation.
QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
// widget might have been deleted when handling the leaveEvent
if (widget) {
// Send DragEnter to new widget.
handleDragEnterEvent(static_cast<QDragEnterEvent*>(event), widget);
// Handling 'DragEnter' should suffice for the application.
translated.setDropAction(event->dropAction());
translated.setAccepted(event->isAccepted());
// The drag enter event is always immediately followed by a drag move event,
// see QDragEnterEvent documentation.
if (m_dragTarget)
QGuiApplication::forwardEvent(m_dragTarget, &translated, event);
}
}
event->setAccepted(translated.isAccepted());
event->setDropAction(translated.dropAction());

View File

@ -746,6 +746,7 @@ void QTextEdit::setAlignment(Qt::Alignment a)
QTextCursor cursor = d->control->textCursor();
cursor.mergeBlockFormat(fmt);
d->control->setTextCursor(cursor);
d->relayoutDocument();
}
/*!

View File

@ -62,6 +62,7 @@ private slots:
#ifndef QT_NO_WIDGETS
void infiniteLoop();
#endif
void emptyMovie();
};
// Testing get/set functions
@ -220,5 +221,13 @@ void tst_QMovie::infiniteLoop()
}
#endif
void tst_QMovie::emptyMovie()
{
QMovie movie;
movie.setCacheMode(QMovie::CacheAll);
movie.jumpToFrame(100);
QCOMPARE(movie.currentFrameNumber(), -1);
}
QTEST_MAIN(tst_QMovie)
#include "tst_qmovie.moc"

View File

@ -1131,7 +1131,7 @@ void tst_QDtls::handshakeReadyRead()
QUdpSocket *socket = qobject_cast<QUdpSocket *>(sender());
Q_ASSERT(socket);
if (!socket->pendingDatagramSize())
if (socket->pendingDatagramSize() <= 0)
return;
const bool isServer = socket == &serverSocket;

View File

@ -352,7 +352,7 @@ void tst_QDtlsCookie::receiveMessage(QUdpSocket *socket, QByteArray *message,
{
Q_ASSERT(socket && message);
if (!socket->pendingDatagramSize())
if (socket->pendingDatagramSize() <= 0)
testLoop.enterLoopMSecs(handshakeTimeoutMS);
QVERIFY(!testLoop.timeout());
@ -377,7 +377,7 @@ void tst_QDtlsCookie::serverReadyRead()
{
Q_ASSERT(clientsToWait);
if (!serverSocket.pendingDatagramSize())
if (serverSocket.pendingDatagramSize() <= 0)
return;
QByteArray hello;
@ -410,7 +410,7 @@ void tst_QDtlsCookie::clientReadyRead()
QUdpSocket *clientSocket = qobject_cast<QUdpSocket *>(sender());
Q_ASSERT(clientSocket);
if (!clientSocket->pendingDatagramSize())
if (clientSocket->pendingDatagramSize() <= 0)
return;
QDtls *handshake = nullptr;