Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev

This commit is contained in:
Qt Forward Merge Bot 2018-03-07 00:00:30 +00:00 committed by The Qt Project
commit d7c1c9dd92
16 changed files with 72 additions and 38 deletions

View File

@ -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()

View File

@ -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): \

View File

@ -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

View File

@ -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

View File

@ -97,6 +97,7 @@ public:
NonFullScreenWindows,
NativeWidgets,
WindowManagement,
WindowActivation, // whether requestActivate is supported
SyncState,
RasterGLSurface,
AllGLFunctionsQueryable,

View File

@ -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:

View File

@ -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)

View File

@ -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");

View File

@ -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);
}

View File

@ -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)

View File

@ -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");

View File

@ -10,6 +10,7 @@
#define ICONTHEME_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>

View File

@ -10,6 +10,7 @@
#define LANGUAGESDIALOG_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>

View File

@ -10,6 +10,7 @@
#define QTTRID_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>

View File

@ -10,6 +10,7 @@
#define REMOTECONTROL_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>

View File

@ -40,6 +40,7 @@
#define TABBEDBROWSER_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QFrame>