summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-07 01:00:10 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-03-07 01:00:10 +0100
commitcf00c01f68198f55e0be5de4d9b720a31dea1a21 (patch)
tree0d119a5be7ef2a258858ded2b264e96d6cd5a572
parentada1b61991b16f21c5cd9c785dc7fbfa832f18be (diff)
parent3eb42abab6c7d1f3a32ca55c972b1d7a4a703658 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp16
-rw-r--r--mkspecs/android-clang/qmake.conf2
-rw-r--r--mkspecs/devices/integrity-armv8-msm8996au/qmake.conf2
-rw-r--r--src/gui/kernel/qplatformintegration.cpp2
-rw-r--r--src/gui/kernel/qplatformintegration.h1
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm1
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/qeglfsopenwfdintegration.cpp24
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp2
-rw-r--r--src/tools/uic/qclass_lib_map.h14
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp39
-rw-r--r--tests/auto/tools/uic/baseline/icontheme.ui.h1
-rw-r--r--tests/auto/tools/uic/baseline/languagesdialog.ui.h1
-rw-r--r--tests/auto/tools/uic/baseline/qttrid.ui.h1
-rw-r--r--tests/auto/tools/uic/baseline/remotecontrol.ui.h1
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui.h1
16 files changed, 72 insertions, 38 deletions
diff --git a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
index 2b77dc2fcc..0c3ed86565 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
+++ b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
@@ -66,14 +66,14 @@ EmbeddedDialog::EmbeddedDialog(QWidget *parent)
ui->style->setCurrentIndex(ui->style->count() - 1);
}
- connect(ui->layoutDirection, SIGNAL(activated(int)),
- this, SLOT(layoutDirectionChanged(int)));
- connect(ui->spacing, SIGNAL(valueChanged(int)),
- this, SLOT(spacingChanged(int)));
- connect(ui->fontComboBox, SIGNAL(currentFontChanged(QFont)),
- this, SLOT(fontChanged(QFont)));
- connect(ui->style, SIGNAL(activated(QString)),
- this, SLOT(styleChanged(QString)));
+ connect(ui->layoutDirection, QOverload<int>::of(&QComboBox::activated),
+ this, &EmbeddedDialog::layoutDirectionChanged);
+ connect(ui->spacing, &QSlider::valueChanged,
+ this, &EmbeddedDialog::spacingChanged);
+ connect(ui->fontComboBox, &QFontComboBox::currentFontChanged,
+ this, &EmbeddedDialog::fontChanged);
+ connect(ui->style, QOverload<const QString &>::of(&QComboBox::activated),
+ this, &EmbeddedDialog::styleChanged);
}
EmbeddedDialog::~EmbeddedDialog()
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index 2f38e100b2..fae2c8ebd9 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -21,7 +21,7 @@ else: equals(ANDROID_TARGET_ARCH, armeabi): \
else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
QMAKE_CFLAGS += -target aarch64-none-linux-android
else: equals(ANDROID_TARGET_ARCH, x86): \
- QMAKE_CFLAGS += -target i686-none-linux-android
+ QMAKE_CFLAGS += -target i686-none-linux-android -mstackrealign
else: equals(ANDROID_TARGET_ARCH, x86_64): \
QMAKE_CFLAGS += -target x86_64-none-linux-android
else: equals(ANDROID_TARGET_ARCH, mips): \
diff --git a/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf b/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf
index 90299bf3e9..e78bde54b9 100644
--- a/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf
+++ b/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf
@@ -38,7 +38,7 @@ QMAKE_LIBDIR += $$(QCLIBS_DIR)/multimedia/display
QMAKE_INCDIR += $$(QC_MULTIMEDIA_INC_DIR)
-QMAKE_LIBS_EGL += -lESXEGL_Adreno -lESXGLESv2_Adreno -ladreno_utils -lGSLUser -lOSUser -lpanel -livfs -lposix -lpmem -ltzbsp -lpaged_alloc -lglnext-llvm -lopenwfd
+QMAKE_LIBS_EGL += -lESXEGL_Adreno -lESXGLESv2_Adreno -ladreno_utils -lGSLUser -lOSUser -lpanel -livfs -lposix -lpmem -ltzbsp -lpaged_alloc -lglnext-llvm -lopenwfd -lplanedef -lmmosallibrary
QMAKE_LIBS_OPENGL_ES2 += $${QMAKE_LIBS_EGL}
QMAKE_CFLAGS += -DINTEGRITY
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 866ce08a28..2aaa4c8510 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -265,7 +265,7 @@ QPlatformServices *QPlatformIntegration::services() const
bool QPlatformIntegration::hasCapability(Capability cap) const
{
return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement
- || cap == TopStackedNativeChildWindows;
+ || cap == TopStackedNativeChildWindows || cap == WindowActivation;
}
QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index 37884e1f78..d88f818920 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -97,6 +97,7 @@ public:
NonFullScreenWindows,
NativeWidgets,
WindowManagement,
+ WindowActivation, // whether requestActivate is supported
SyncState,
RasterGLSurface,
AllGLFunctionsQueryable,
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 220e89a0c4..c7fff266ad 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1328,7 +1328,7 @@ QFont::StyleHint QFont::styleHint() const
order to display them correctly. In some writing systems, such as Brahmic scripts, this is
required in order for the text to be legible, but in e.g. Latin script, it is merely
a cosmetic feature. The PreferNoShaping flag will disable all such features when they
- are not required, which will improve performance in most cases.
+ are not required, which will improve performance in most cases (since Qt 5.10).
Any of these may be OR-ed with one of these flags:
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 21d9d9ee90..028e759ff4 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1363,6 +1363,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
// "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
bool isInverted = [theEvent isDirectionInvertedFromDevice];
+ qCDebug(lcQpaCocoaMouse) << "scroll wheel @ window pos" << qt_windowPoint << "delta px" << pixelDelta << "angle" << angleDelta << "phase" << ph << (isInverted ? "inverted" : "");
QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted);
}
#endif // QT_CONFIG(wheelevent)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/qeglfsopenwfdintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/qeglfsopenwfdintegration.cpp
index bb176a69d2..738c30c65a 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/qeglfsopenwfdintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_openwfd/qeglfsopenwfdintegration.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
#define MAX_NUM_OF_WFD_BUFFERS 3
#define MAX_NUM_OF_WFD_DEVICES 4
-#define MAX_NUM_OF_WFD_PIPELINES 4
+#define MAX_NUM_OF_WFD_PIPELINES 16
#define MAX_NUM_OF_WFD_PORT_MODES 64
#define MAX_NUM_OF_WFD_PORTS 4
@@ -77,7 +77,17 @@ void QEglFSOpenWFDIntegration::platformInit()
wfdEnumerateDevices(devIds, numDevs, nullptr);
// Create device
- mDevice = wfdCreateDevice(WFD_DEFAULT_DEVICE_ID, nullptr);
+ WFDint dev_attribs[3] = {WFD_DEVICE_CLIENT_TYPE,
+ WFD_CLIENT_ID_CLUSTER,
+ WFD_NONE};
+
+ bool ok;
+ WFDint clientType = qgetenv("QT_OPENWFD_CLIENT_ID").toInt(&ok, 16);
+
+ if (ok)
+ dev_attribs[1] = clientType;
+
+ mDevice = wfdCreateDevice(WFD_DEFAULT_DEVICE_ID, dev_attribs);
if (WFD_INVALID_HANDLE == mDevice)
qFatal( "Failed to create wfd device");
@@ -138,9 +148,13 @@ EGLNativeWindowType QEglFSOpenWFDIntegration::createNativeWindow(QPlatformWindow
WFDint pipelineIds[MAX_NUM_OF_WFD_PIPELINES];
wfdEnumeratePipelines(mDevice, pipelineIds, numPipelines, nullptr);
- WFDint testId = 0;
- testId = pipelineIds[0];
- WFDPipeline pipeline = wfdCreatePipeline(mDevice, testId, nullptr);
+ bool ok;
+ WFDint pipelineId = qgetenv("QT_OPENWFD_PIPELINE_ID").toInt(&ok);
+
+ if (!ok)
+ pipelineId = pipelineIds[0];
+
+ WFDPipeline pipeline = wfdCreatePipeline(mDevice, pipelineId, nullptr);
if (WFD_INVALID_HANDLE == pipeline)
qFatal("Failed to create wfd pipeline");
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 0ba9d28642..d51fddffea 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -150,6 +150,8 @@ void WriteIncludes::acceptProperty(DomProperty *node)
add(QLatin1String("QDate"));
if (node->kind() == DomProperty::Locale)
add(QLatin1String("QLocale"));
+ if (node->kind() == DomProperty::IconSet)
+ add(QLatin1String("QIcon"));
TreeWalker::acceptProperty(node);
}
diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h
index 810b326b30..8e1afa0878 100644
--- a/src/tools/uic/qclass_lib_map.h
+++ b/src/tools/uic/qclass_lib_map.h
@@ -628,13 +628,13 @@ QT_CLASS_LIB(QGraphicsRotation, QtWidgets, qgraphicstransform.h)
QT_CLASS_LIB(QGraphicsView, QtWidgets, qgraphicsview.h)
QT_CLASS_LIB(QGraphicsWidget, QtWidgets, qgraphicswidget.h)
QT_CLASS_LIB(QBitmap, QtGui, qbitmap.h)
-QT_CLASS_LIB(QIcon, QtWidgets, qicon.h)
-QT_CLASS_LIB(QIconEngine, QtWidgets, qiconengine.h)
-QT_CLASS_LIB(QIconEngineV2, QtWidgets, qiconengine.h)
-QT_CLASS_LIB(QIconEngineFactoryInterface, QtWidgets, qiconengineplugin.h)
-QT_CLASS_LIB(QIconEnginePlugin, QtWidgets, qiconengineplugin.h)
-QT_CLASS_LIB(QIconEngineFactoryInterfaceV2, QtWidgets, qiconengineplugin.h)
-QT_CLASS_LIB(QIconEnginePluginV2, QtWidgets, qiconengineplugin.h)
+QT_CLASS_LIB(QIcon, QtGui, qicon.h)
+QT_CLASS_LIB(QIconEngine, QtGui, qiconengine.h)
+QT_CLASS_LIB(QIconEngineV2, QtGui, qiconengine.h)
+QT_CLASS_LIB(QIconEngineFactoryInterface, QtGui, qiconengineplugin.h)
+QT_CLASS_LIB(QIconEnginePlugin, QtGui, qiconengineplugin.h)
+QT_CLASS_LIB(QIconEngineFactoryInterfaceV2, QtGui, qiconengineplugin.h)
+QT_CLASS_LIB(QIconEnginePluginV2, QtGui, qiconengineplugin.h)
QT_CLASS_LIB(QImageTextKeyLang, QtGui, qimage.h)
QT_CLASS_LIB(QImage, QtGui, qimage.h)
QT_CLASS_LIB(QImageIOHandler, QtGui, qimageiohandler.h)
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index a7cf4fe35a..e6bd526f69 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -467,6 +467,11 @@ static QString msgRectMismatch(const QRect &r1, const QRect &r2)
return result;
}
+static bool isPlatformWayland()
+{
+ return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive);
+}
+
void tst_QWindow::positioning()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(
@@ -474,7 +479,7 @@ void tst_QWindow::positioning()
QSKIP("This platform does not support non-fullscreen windows");
}
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
+ if (isPlatformWayland())
QSKIP("Wayland: This fails. Figure out why.");
// Some platforms enforce minimum widths for windows, which can cause extra resize
@@ -780,7 +785,7 @@ void tst_QWindow::isExposed()
window.hide();
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
+ if (isPlatformWayland())
QSKIP("Wayland: This is flaky. Figure out why.");
QCoreApplication::processEvents();
@@ -791,8 +796,8 @@ void tst_QWindow::isExposed()
void tst_QWindow::isActive()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
Window window;
// Some platforms enforce minimum widths for windows, which can cause extra resize
@@ -1340,6 +1345,9 @@ void tst_QWindow::touchCancelWithTouchToMouse()
void tst_QWindow::touchInterruptedByPopup()
{
+ if (isPlatformWayland())
+ QSKIP("Wayland: This test crashes with xdg-shell unstable v6");
+
InputTestWindow window;
window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
window.show();
@@ -1475,8 +1483,8 @@ void tst_QWindow::close()
void tst_QWindow::activateAndClose()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
for (int i = 0; i < 10; ++i) {
QWindow window;
@@ -1834,7 +1842,7 @@ void tst_QWindow::mask()
void tst_QWindow::initialSize()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
+ if (isPlatformWayland())
QSKIP("Wayland: This fails. Figure out why.");
QSize defaultSize(0,0);
@@ -1871,8 +1879,8 @@ static bool isPlatformOffscreenOrMinimal()
void tst_QWindow::modalDialog()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
if (QGuiApplication::platformName() == QLatin1String("cocoa"))
QSKIP("Test fails due to QTBUG-61965, and is slow due to QTBUG-61964");
@@ -1907,7 +1915,7 @@ void tst_QWindow::modalDialog()
void tst_QWindow::modalDialogClosingOneOfTwoModal()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
+ if (isPlatformWayland())
QSKIP("Wayland: This fails. Figure out why.");
QWindow normalWindow;
@@ -1952,8 +1960,8 @@ void tst_QWindow::modalDialogClosingOneOfTwoModal()
void tst_QWindow::modalWithChildWindow()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
QWindow normalWindow;
normalWindow.setFramePosition(m_availableTopLeft + QPoint(80, 80));
@@ -1986,8 +1994,8 @@ void tst_QWindow::modalWithChildWindow()
void tst_QWindow::modalWindowModallity()
{
- if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
- QSKIP("Wayland: This fails. Figure out why.");
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
QWindow normal_window;
normal_window.setFramePosition(m_availableTopLeft + QPoint(80, 80));
@@ -2032,6 +2040,9 @@ void tst_QWindow::modalWindowPosition()
#ifndef QT_NO_CURSOR
void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109()
{
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
+ QSKIP("QWindow::requestActivate() is not supported.");
+
if (isPlatformOffscreenOrMinimal())
QSKIP("Can't test window focusing on offscreen/minimal");
diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h
index 94122c01de..75a1b648cd 100644
--- a/tests/auto/tools/uic/baseline/icontheme.ui.h
+++ b/tests/auto/tools/uic/baseline/icontheme.ui.h
@@ -10,6 +10,7 @@
#define ICONTHEME_H
#include <QtCore/QVariant>
+#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>
diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
index 981ff20cbf..6f722a4e74 100644
--- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
@@ -10,6 +10,7 @@
#define LANGUAGESDIALOG_H
#include <QtCore/QVariant>
+#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
diff --git a/tests/auto/tools/uic/baseline/qttrid.ui.h b/tests/auto/tools/uic/baseline/qttrid.ui.h
index 3893ef3569..b7ec1062de 100644
--- a/tests/auto/tools/uic/baseline/qttrid.ui.h
+++ b/tests/auto/tools/uic/baseline/qttrid.ui.h
@@ -10,6 +10,7 @@
#define QTTRID_H
#include <QtCore/QVariant>
+#include <QtGui/QIcon>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
index c3a563f235..c883637dc4 100644
--- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h
+++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
@@ -10,6 +10,7 @@
#define REMOTECONTROL_H
#include <QtCore/QVariant>
+#include <QtGui/QIcon>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
index 4ebbf3c435..5d670b46af 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
@@ -40,6 +40,7 @@
#define TABBEDBROWSER_H
#include <QtCore/QVariant>
+#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QFrame>