Merge remote-tracking branch 'origin/5.12.7' into 5.12

Change-Id: Ie152ac565d56ca4ae29998ee034ba4b8b5b8e234
This commit is contained in:
Qt Forward Merge Bot 2020-01-31 12:00:26 +01:00
commit 44879f8cde
14 changed files with 142 additions and 12 deletions

25
dist/changes-5.12.7 vendored Normal file
View File

@ -0,0 +1,25 @@
Qt 5.12.7 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.6.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* QtSQL *
****************************************************************************
- sqlite:
* Updated to v3.30.1

View File

@ -3,7 +3,7 @@
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2019
dita.metadata.default.copyryear = 2020
dita.metadata.default.copyrholder = The Qt Company Ltd
dita.metadata.default.audience = programmer

View File

@ -78,7 +78,7 @@ HTML.footer += \
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
" <li id=\"menu-item-10375\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-10375\"><a href=\"mailto:feedback@theqtcompany.com?Subject=Feedback%20about%20doc.qt.io%20site\">Feedback</a></li>\n" \
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2019 The Qt Company</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2020 The Qt Company</a></li>\n" \
" </ul>\n" \
"</div>\n" \
"</div>\n" \

View File

@ -8,7 +8,7 @@ HTML.footer = \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2020 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br/>" \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -5,7 +5,7 @@
HTML.footer = \
" </div>\n" \
" <p class=\"copy-notice\">\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2020 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners. " \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2019 The Qt Company Ltd.
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 The Qt Company Ltd.

View File

@ -0,0 +1,30 @@
From 423d82ac8c7c545e8eac6f70a3e5e92208b7d991 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@qt.io>
Date: Tue, 21 Jan 2020 15:15:00 +0100
Subject: [PATCH] Fix CVE-2019-19880 in SQLite
Fixes: QTBUG-81565
Change-Id: I6bf2364e696315e5262d1abfa2f0b6947f14a33b
---
src/3rdparty/sqlite/sqlite3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index d5b43857ad..cd1a4d5221 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -147620,9 +147620,11 @@ static ExprList *exprListAppendList(
int nInit = pList ? pList->nExpr : 0;
for(i=0; i<pAppend->nExpr; i++){
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
+ assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
pDup->op = TK_NULL;
pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
+ pDup->u.zToken = 0;
}
pList = sqlite3ExprListAppend(pParse, pList, pDup);
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
--
2.21.0 (Apple Git-122.2)

View File

@ -147620,9 +147620,11 @@ static ExprList *exprListAppendList(
int nInit = pList ? pList->nExpr : 0;
for(i=0; i<pAppend->nExpr; i++){
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
pDup->op = TK_NULL;
pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
pDup->u.zToken = 0;
}
pList = sqlite3ExprListAppend(pParse, pList, pDup);
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;

View File

@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2018 Intel Corporation
** Copyright (C) 2020 Intel Corporation
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -208,6 +208,8 @@ bool QLibraryPrivate::load_sys()
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
if (!prefixes.at(prefix).isEmpty() && name.startsWith(prefixes.at(prefix)))
continue;
if (path.isEmpty() && prefixes.at(prefix).contains(QLatin1Char('/')))
continue;
if (!suffixes.at(suffix).isEmpty() && name.endsWith(suffixes.at(suffix)))
continue;
if (loadHints & QLibrary::LoadArchiveMemberHint) {

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
@ -62,7 +62,7 @@ static const char docTypeHeader[] =
#define PROGRAMNAME "qdbuscpp2xml"
#define PROGRAMVERSION "0.2"
#define PROGRAMCOPYRIGHT "Copyright (C) 2019 The Qt Company Ltd."
#define PROGRAMCOPYRIGHT "Copyright (C) 2020 The Qt Company Ltd."
static QString outputFile;
static int flags;

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
@ -46,7 +46,7 @@
#define PROGRAMNAME "qdbusxml2cpp"
#define PROGRAMVERSION "0.8"
#define PROGRAMCOPYRIGHT "Copyright (C) 2019 The Qt Company Ltd."
#define PROGRAMCOPYRIGHT "Copyright (C) 2020 The Qt Company Ltd."
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
@ -1890,7 +1890,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
"<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
"<p>Qt is The Qt Company Ltd product developed as an open source "
"project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
).arg(QStringLiteral("2019"),
).arg(QStringLiteral("2020"),
QStringLiteral("qt.io/licensing"),
QStringLiteral("qt.io"));
QMessageBox *msgBox = new QMessageBox(parent);

View File

@ -8934,6 +8934,23 @@ bool QWidget::event(QEvent *event)
}
}
switch (event->type()) {
case QEvent::PlatformSurface: {
// Sync up QWidget's view of whether or not the widget has been created
switch (static_cast<QPlatformSurfaceEvent*>(event)->surfaceEventType()) {
case QPlatformSurfaceEvent::SurfaceCreated:
if (!testAttribute(Qt::WA_WState_Created))
create();
break;
case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed:
if (testAttribute(Qt::WA_WState_Created)) {
// Child windows have already been destroyed by QWindow,
// so we skip them here.
destroy(false, false);
}
break;
}
break;
}
case QEvent::MouseMove:
mouseMoveEvent((QMouseEvent*)event);
break;

View File

@ -57,6 +57,7 @@
#include <QtGui/qpaintengine.h>
#include <QtGui/qbackingstore.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qpa/qplatformwindow.h>
#include <QtGui/qscreen.h>
#include <qmenubar.h>
#include <qcompleter.h>
@ -221,6 +222,7 @@ private slots:
void setFixedSize();
void ensureCreated();
void createAndDestroy();
void winIdChangeEvent();
void persistentWinId();
void showNativeChild();
@ -4134,6 +4136,58 @@ public:
int winIdChangeEventCount() const { return m_winIdList.count(); }
};
class CreateDestroyWidget : public WinIdChangeWidget
{
public:
void create() { QWidget::create(); }
void destroy() { QWidget::destroy(); }
};
void tst_QWidget::createAndDestroy()
{
CreateDestroyWidget widget;
// Create and destroy via QWidget
widget.create();
QVERIFY(widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 1);
QVERIFY(widget.internalWinId());
widget.destroy();
QVERIFY(!widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 2);
QVERIFY(!widget.internalWinId());
// Create via QWidget, destroy via QWindow
widget.create();
QVERIFY(widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 3);
QVERIFY(widget.internalWinId());
widget.windowHandle()->destroy();
QVERIFY(!widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 4);
QVERIFY(!widget.internalWinId());
// Create via QWidget again
widget.create();
QVERIFY(widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 5);
QVERIFY(widget.internalWinId());
// Destroy via QWindow, create via QWindow
widget.windowHandle()->destroy();
QVERIFY(widget.windowHandle());
QVERIFY(!widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 6);
QVERIFY(!widget.internalWinId());
widget.windowHandle()->create();
QVERIFY(widget.testAttribute(Qt::WA_WState_Created));
QCOMPARE(widget.winIdChangeEventCount(), 7);
QVERIFY(widget.internalWinId());
}
void tst_QWidget::winIdChangeEvent()
{
{