summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-15 01:00:11 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-11-15 16:30:51 +0100
commit5abb976f23ef0f3cbb7b720e523c08d768c76c0e (patch)
tree55fece450d39fdaf2fb2e213fc321fcf936a18cb /src/gui
parent76a0f94a6d7d85f352e3d4a00c192bfc377cc776 (diff)
parentadc7bbe910a4b89a579ffa93da5a937cfc1379f4 (diff)
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/image.pri8
-rw-r--r--src/gui/kernel/qevent.h7
-rw-r--r--src/gui/kernel/qplatformwindow.cpp9
-rw-r--r--src/gui/kernel/qplatformwindow.h6
-rw-r--r--src/gui/rhi/qshader.cpp6
-rw-r--r--src/gui/text/qtextmarkdownimporter.cpp4
6 files changed, 33 insertions, 7 deletions
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 3b2ced3f58..1f42f28d1e 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -79,6 +79,14 @@ qtConfig(png) {
HEADERS += image/qpnghandler_p.h
SOURCES += image/qpnghandler.cpp
QMAKE_USE_PRIVATE += libpng
+
+ win32:mingw {
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86048
+ GCC_VERSION = "$${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.$${QMAKE_GCC_PATCH_VERSION}"
+ equals(GCC_VERSION, "8.1.0") {
+ QMAKE_CXXFLAGS += -fno-reorder-blocks-and-partition
+ }
+ }
}
# SIMD
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index dc33a83ac0..f363ece48b 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -853,7 +853,14 @@ private:
qint64 m_numericId;
};
Q_DECLARE_TYPEINFO(QPointingDeviceUniqueId, Q_MOVABLE_TYPE);
+
+#if 0
+#pragma qt_sync_suspend_processing
+#endif
template <> class QList<QPointingDeviceUniqueId> {}; // to prevent instantiation: use QVector instead
+#if 0
+#pragma qt_sync_resume_processing
+#endif
Q_GUI_EXPORT bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexcept;
inline bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) noexcept
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 2a0cb1094c..65accc9f68 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -694,9 +694,12 @@ static QSize fixInitialSize(QSize size, const QWindow *w,
However if the given window already has geometry which the application has
initialized, it takes priority.
*/
-QRect QPlatformWindow::initialGeometry(const QWindow *w,
- const QRect &initialGeometry, int defaultWidth, int defaultHeight)
+QRect QPlatformWindow::initialGeometry(const QWindow *w, const QRect &initialGeometry,
+ int defaultWidth, int defaultHeight,
+ const QScreen **resultingScreenReturn)
{
+ if (resultingScreenReturn)
+ *resultingScreenReturn = w->screen();
if (!w->isTopLevel()) {
const qreal factor = QHighDpiScaling::factor(w);
const QSize size = fixInitialSize(QHighDpi::fromNative(initialGeometry.size(), factor),
@@ -712,6 +715,8 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
: QGuiApplication::screenAt(initialGeometry.center());
if (!screen)
return initialGeometry;
+ if (resultingScreenReturn)
+ *resultingScreenReturn = screen;
// initialGeometry refers to window's screen
QRect rect(QHighDpi::fromNativePixels(initialGeometry, w));
if (wp->resizeAutomatic)
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 4d48cc2f13..b6aeb3a86a 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -63,6 +63,7 @@ QT_BEGIN_NAMESPACE
class QPlatformScreen;
class QPlatformWindowPrivate;
+class QScreen;
class QWindow;
class QIcon;
class QRegion;
@@ -142,8 +143,9 @@ public:
virtual void invalidateSurface();
- static QRect initialGeometry(const QWindow *w,
- const QRect &initialGeometry, int defaultWidth, int defaultHeight);
+ static QRect initialGeometry(const QWindow *w, const QRect &initialGeometry,
+ int defaultWidth, int defaultHeight,
+ const QScreen **resultingScreenReturn = nullptr);
virtual void requestUpdate();
bool hasPendingUpdateRequest() const;
diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp
index 14d780b4e4..dc6060f882 100644
--- a/src/gui/rhi/qshader.cpp
+++ b/src/gui/rhi/qshader.cpp
@@ -345,10 +345,10 @@ void QShader::removeShader(const QShaderKey &key)
static void writeShaderKey(QDataStream *ds, const QShaderKey &k)
{
- *ds << k.source();
+ *ds << int(k.source());
*ds << k.sourceVersion().version();
*ds << k.sourceVersion().flags();
- *ds << k.sourceVariant();
+ *ds << int(k.sourceVariant());
}
/*!
@@ -366,7 +366,7 @@ QByteArray QShader::serialized() const
return QByteArray();
ds << QShaderPrivate::QSB_VERSION;
- ds << d->stage;
+ ds << int(d->stage);
ds << d->desc.toCbor();
ds << d->shaders.count();
for (auto it = d->shaders.cbegin(), itEnd = d->shaders.cend(); it != itEnd; ++it) {
diff --git a/src/gui/text/qtextmarkdownimporter.cpp b/src/gui/text/qtextmarkdownimporter.cpp
index c2ad1e5612..78d18a714b 100644
--- a/src/gui/text/qtextmarkdownimporter.cpp
+++ b/src/gui/text/qtextmarkdownimporter.cpp
@@ -160,6 +160,10 @@ void QTextMarkdownImporter::import(QTextDocument *doc, const QString &markdown)
m_paragraphMargin = m_doc->defaultFont().pointSize() * 2 / 3;
m_cursor = new QTextCursor(doc);
doc->clear();
+ if (doc->defaultFont().pointSize() != -1)
+ m_monoFont.setPointSize(doc->defaultFont().pointSize());
+ else
+ m_monoFont.setPixelSize(doc->defaultFont().pixelSize());
qCDebug(lcMD) << "default font" << doc->defaultFont() << "mono font" << m_monoFont;
QByteArray md = markdown.toUtf8();
md_parse(md.constData(), MD_SIZE(md.size()), &callbacks, this);