summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2019-08-19 14:04:00 +0200
committerLiang Qi <liang.qi@qt.io>2019-08-20 10:41:56 +0000
commit2f52e1da0df5be9ba2b1e5ebda60a6b3bf63681e (patch)
treea7d3ec792c974523d909af277221ed44afe1386e
parentc7b1cbdea9a9ec3d9af9331d2704390d3bb0fafe (diff)
parent70e7445dbeba9bd24de963e7e431c4698b6b4569 (diff)
Merge remote-tracking branch 'qt/5.12' into 5.13
Conflicts: src/gui/configure.json src/gui/util/qtexturefilereader.cpp src/gui/util/util.pri tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
-rw-r--r--config_help.txt1
-rw-r--r--qmake/main.cpp42
-rw-r--r--src/corelib/configure.json2
-rw-r--r--src/dbus/qdbusserver.cpp8
-rw-r--r--src/gui/opengl/qopenglprogrambinarycache.cpp2
-rw-r--r--src/gui/opengl/qopenglprogrambinarycache_p.h2
-rw-r--r--src/gui/painting/qbezier.cpp32
-rw-r--r--src/network/ssl/qsslcontext_openssl.cpp44
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp7
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice.cpp12
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice_p.h1
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro14
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp37
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp3
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp4
15 files changed, 142 insertions, 69 deletions
diff --git a/config_help.txt b/config_help.txt
index ebcfa3fb42..3a82d83bc0 100644
--- a/config_help.txt
+++ b/config_help.txt
@@ -281,6 +281,7 @@ Gui, printing, widget options:
es2 (default on Windows), desktop (default on Unix),
dynamic (Windows only)
-opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto]
+ -egl ................. Enable EGL support [auto]
-angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto]
(Windows only)
-combined-angle-lib .. Merge LibEGL and LibGLESv2 into LibANGLE (Windows only)
diff --git a/qmake/main.cpp b/qmake/main.cpp
index a598296898..dd1cca9633 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -242,6 +242,39 @@ static int doLink(int argc, char **argv)
#endif
+static bool setFilePermissions(QFile &file, QFileDevice::Permissions permissions)
+{
+ if (file.setPermissions(permissions))
+ return true;
+ fprintf(stderr, "Error setting permissions on %s: %s\n",
+ qPrintable(file.fileName()), qPrintable(file.errorString()));
+ return false;
+}
+
+static bool copyFileTimes(QFile &targetFile, const QString &sourceFilePath,
+ bool mustEnsureWritability, QString *errorString)
+{
+#ifdef Q_OS_WIN
+ bool mustRestorePermissions = false;
+ QFileDevice::Permissions targetPermissions;
+ if (mustEnsureWritability) {
+ targetPermissions = targetFile.permissions();
+ if (!targetPermissions.testFlag(QFileDevice::WriteUser)) {
+ mustRestorePermissions = true;
+ if (!setFilePermissions(targetFile, targetPermissions | QFileDevice::WriteUser))
+ return false;
+ }
+ }
+#endif
+ if (!IoUtils::touchFile(targetFile.fileName(), sourceFilePath, errorString))
+ return false;
+#ifdef Q_OS_WIN
+ if (mustRestorePermissions && !setFilePermissions(targetFile, targetPermissions))
+ return false;
+#endif
+ return true;
+}
+
static int installFile(const QString &source, const QString &target, bool exe = false,
bool preservePermissions = false)
{
@@ -270,18 +303,15 @@ static int installFile(const QString &source, const QString &target, bool exe =
targetPermissions |= QFileDevice::ExeOwner | QFileDevice::ExeUser |
QFileDevice::ExeGroup | QFileDevice::ExeOther;
}
- if (!targetFile.setPermissions(targetPermissions)) {
- fprintf(stderr, "Error setting permissions on %s: %s\n",
- qPrintable(target), qPrintable(targetFile.errorString()));
+ if (!setFilePermissions(targetFile, targetPermissions))
return 3;
- }
- // Copy file times
QString error;
- if (!IoUtils::touchFile(target, sourceFile.fileName(), &error)) {
+ if (!copyFileTimes(targetFile, sourceFile.fileName(), preservePermissions, &error)) {
fprintf(stderr, "%s", qPrintable(error));
return 3;
}
+
return 0;
}
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index b7eefb58c8..1b01b2b817 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -820,7 +820,7 @@
},
"datestring": {
"label": "QDate/QTime/QDateTime",
- "purpose": "Provides convertion between dates and strings.",
+ "purpose": "Provides conversion between dates and strings.",
"section": "Data structures",
"condition": "features.textdate",
"output": [ "publicFeature", "feature" ]
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index a2dfb86164..3ac5c794e1 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -109,12 +109,16 @@ QDBusServer::QDBusServer(QObject *parent)
*/
QDBusServer::~QDBusServer()
{
- QWriteLocker locker(&d->lock);
+ QMutex *managerMutex = nullptr;
+ if (QDBusConnectionManager::instance())
+ managerMutex = &QDBusConnectionManager::instance()->mutex;
+ QMutexLocker locker(managerMutex);
+ QWriteLocker writeLocker(&d->lock);
if (QDBusConnectionManager::instance()) {
- QMutexLocker locker(&QDBusConnectionManager::instance()->mutex);
for (const QString &name : qAsConst(d->serverConnectionNames))
QDBusConnectionManager::instance()->removeConnection(name);
d->serverConnectionNames.clear();
+ locker.unlock();
}
d->serverObject = nullptr;
d->ref.store(0);
diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp b/src/gui/opengl/qopenglprogrambinarycache.cpp
index af48cdacc7..40237b9935 100644
--- a/src/gui/opengl/qopenglprogrambinarycache.cpp
+++ b/src/gui/opengl/qopenglprogrambinarycache.cpp
@@ -263,6 +263,7 @@ public:
bool QOpenGLProgramBinaryCache::load(const QByteArray &cacheKey, uint programId)
{
+ QMutexLocker lock(&m_mutex);
if (m_memCache.contains(cacheKey)) {
const MemCacheEntry *e = m_memCache[cacheKey];
return setProgramBinary(programId, e->format, e->blob.constData(), e->blob.size());
@@ -401,6 +402,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
GLint outSize = 0;
#if defined(QT_OPENGL_ES_2)
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
+ QMutexLocker lock(&m_mutex);
initializeProgramBinaryOES(context);
getProgramBinaryOES(programId, blobSize, &outSize, &blobFormat, p);
} else
diff --git a/src/gui/opengl/qopenglprogrambinarycache_p.h b/src/gui/opengl/qopenglprogrambinarycache_p.h
index 9fade08e66..e181a6ab81 100644
--- a/src/gui/opengl/qopenglprogrambinarycache_p.h
+++ b/src/gui/opengl/qopenglprogrambinarycache_p.h
@@ -54,6 +54,7 @@
#include <QtGui/qtguiglobal.h>
#include <QtGui/qopenglshaderprogram.h>
#include <QtCore/qcache.h>
+#include <QtCore/qmutex.h>
QT_BEGIN_NAMESPACE
@@ -99,6 +100,7 @@ private:
void initializeProgramBinaryOES(QOpenGLContext *context);
bool m_programBinaryOESInitialized = false;
#endif
+ QMutex m_mutex;
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index 8cda4b4072..65e6063fe4 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -122,10 +122,10 @@ void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold
int levels[10];
beziers[0] = *this;
levels[0] = 9;
- QBezier *b = beziers;
- int *lvl = levels;
+ int top = 0;
- while (b >= beziers) {
+ while (top >= 0) {
+ QBezier *b = &beziers[top];
// check if we can pop the top bezier curve from the stack
qreal y4y1 = b->y4 - b->y1;
qreal x4x1 = b->x4 - b->x1;
@@ -139,17 +139,15 @@ void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold
qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
l = 1.;
}
- if (d < bezier_flattening_threshold*l || *lvl == 0) {
+ if (d < bezier_flattening_threshold * l || levels[top] == 0) {
// good enough, we pop it off and add the endpoint
polygon->append(QPointF(b->x4, b->y4));
- --b;
- --lvl;
+ --top;
} else {
// split, second half of the polygon goes lower into the stack
b->split(b+1, b);
- lvl[1] = --lvl[0];
- ++b;
- ++lvl;
+ levels[top + 1] = --levels[top];
+ ++top;
}
}
}
@@ -160,10 +158,10 @@ void QBezier::addToPolygon(QDataBuffer<QPointF> &polygon, qreal bezier_flattenin
int levels[10];
beziers[0] = *this;
levels[0] = 9;
- QBezier *b = beziers;
- int *lvl = levels;
+ int top = 0;
- while (b >= beziers) {
+ while (top >= 0) {
+ QBezier *b = &beziers[top];
// check if we can pop the top bezier curve from the stack
qreal y4y1 = b->y4 - b->y1;
qreal x4x1 = b->x4 - b->x1;
@@ -177,17 +175,15 @@ void QBezier::addToPolygon(QDataBuffer<QPointF> &polygon, qreal bezier_flattenin
qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
l = 1.;
}
- if (d < bezier_flattening_threshold*l || *lvl == 0) {
+ if (d < bezier_flattening_threshold * l || levels[top] == 0) {
// good enough, we pop it off and add the endpoint
polygon.add(QPointF(b->x4, b->y4));
- --b;
- --lvl;
+ --top;
} else {
// split, second half of the polygon goes lower into the stack
b->split(b+1, b);
- lvl[1] = --lvl[0];
- ++b;
- ++lvl;
+ levels[top + 1] = --levels[top];
+ ++top;
}
}
}
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index e81e5582f4..8566d78aef 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -157,32 +157,36 @@ SSL* QSslContext::createSsl()
for (int a = 0; a < protocols.count(); ++a) {
if (protocols.at(a).size() > 255) {
qCWarning(lcSsl) << "TLS NPN extension" << protocols.at(a)
- << "is too long and will be truncated to 255 characters.";
- protocols[a] = protocols.at(a).left(255);
+ << "is too long and will be ignored.";
+ continue;
+ } else if (protocols.at(a).isEmpty()) {
+ continue;
}
m_supportedNPNVersions.append(protocols.at(a).size()).append(protocols.at(a));
}
- m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
- m_npnContext.len = m_supportedNPNVersions.count();
- m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
+ if (m_supportedNPNVersions.size()) {
+ m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
+ m_npnContext.len = m_supportedNPNVersions.count();
+ m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
- // Callback's type has a parameter 'const unsigned char ** out'
- // since it was introduced in 1.0.2. Internally, OpenSSL's own code
- // (tests/examples) cast it to unsigned char * (since it's 'out').
- // We just re-use our NPN callback and cast here:
- typedef int (*alpn_callback_t) (SSL *, const unsigned char **, unsigned char *,
- const unsigned char *, unsigned int, void *);
- // With ALPN callback is for a server side only, for a client m_npnContext.status
- // will stay in NextProtocolNegotiationNone.
- q_SSL_CTX_set_alpn_select_cb(ctx, alpn_callback_t(next_proto_cb), &m_npnContext);
- // Client:
- q_SSL_set_alpn_protos(ssl, m_npnContext.data, m_npnContext.len);
- }
+ if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
+ // Callback's type has a parameter 'const unsigned char ** out'
+ // since it was introduced in 1.0.2. Internally, OpenSSL's own code
+ // (tests/examples) cast it to unsigned char * (since it's 'out').
+ // We just re-use our NPN callback and cast here:
+ typedef int (*alpn_callback_t) (SSL *, const unsigned char **, unsigned char *,
+ const unsigned char *, unsigned int, void *);
+ // With ALPN callback is for a server side only, for a client m_npnContext.status
+ // will stay in NextProtocolNegotiationNone.
+ q_SSL_CTX_set_alpn_select_cb(ctx, alpn_callback_t(next_proto_cb), &m_npnContext);
+ // Client:
+ q_SSL_set_alpn_protos(ssl, m_npnContext.data, m_npnContext.len);
+ }
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
- // And in case our peer does not support ALPN, but supports NPN:
- q_SSL_CTX_set_next_proto_select_cb(ctx, next_proto_cb, &m_npnContext);
+ // And in case our peer does not support ALPN, but supports NPN:
+ q_SSL_CTX_set_next_proto_select_cb(ctx, next_proto_cb, &m_npnContext);
+ }
}
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 487e975db6..e290ba79dd 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -928,6 +928,13 @@ bool QSslSocketBackendPrivate::initSslContext()
QCFType<CFMutableArrayRef> cfNames(CFArrayCreateMutable(nullptr, 0, &kCFTypeArrayCallBacks));
if (cfNames) {
for (const QByteArray &name : protocolNames) {
+ if (name.size() > 255) {
+ qCWarning(lcSsl) << "TLS ALPN extension" << name
+ << "is too long and will be ignored.";
+ continue;
+ } else if (name.isEmpty()) {
+ continue;
+ }
QCFString cfName(QString::fromLatin1(name).toCFString());
CFArrayAppendValue(cfNames, cfName);
}
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
index 7e3a870421..fec59cfc7b 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
@@ -342,10 +342,14 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
}
qCDebug(qLcKmsDebug) << "Physical size is" << physSize << "mm" << "for output" << connectorName;
- const QByteArray formatStr = userConnectorConfig.value(QStringLiteral("format"), QStringLiteral("xrgb8888"))
+ const QByteArray formatStr = userConnectorConfig.value(QStringLiteral("format"), QString())
.toByteArray().toLower();
uint32_t drmFormat;
- if (formatStr == "xrgb8888") {
+ bool drmFormatExplicit = true;
+ if (formatStr.isEmpty()) {
+ drmFormat = DRM_FORMAT_XRGB8888;
+ drmFormatExplicit = false;
+ } else if (formatStr == "xrgb8888") {
drmFormat = DRM_FORMAT_XRGB8888;
} else if (formatStr == "xbgr8888") {
drmFormat = DRM_FORMAT_XBGR8888;
@@ -368,7 +372,10 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
} else {
qWarning("Invalid pixel format \"%s\" for output %s", formatStr.constData(), connectorName.constData());
drmFormat = DRM_FORMAT_XRGB8888;
+ drmFormatExplicit = false;
}
+ qCDebug(qLcKmsDebug) << "Format is" << hex << drmFormat << dec << "requested_by_user =" << drmFormatExplicit
+ << "for output" << connectorName;
const QString cloneSource = userConnectorConfig.value(QStringLiteral("clones")).toString();
if (!cloneSource.isEmpty())
@@ -411,6 +418,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
output.forced_plane_id = 0;
output.forced_plane_set = false;
output.drm_format = drmFormat;
+ output.drm_format_requested_by_user = drmFormatExplicit;
output.clone_source = cloneSource;
output.size = framebufferSize;
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice_p.h b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
index 403972fbb8..14da6bb947 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice_p.h
+++ b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
@@ -201,6 +201,7 @@ struct QKmsOutput
uint32_t forced_plane_id = 0;
bool forced_plane_set = false;
uint32_t drm_format = DRM_FORMAT_XRGB8888;
+ bool drm_format_requested_by_user = false;
QString clone_source;
QVector<QKmsPlane> available_planes;
struct QKmsPlane *eglfs_plane = nullptr;
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 02e00039ae..f0dd013922 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -21,8 +21,6 @@ SOURCES += main.mm \
qcocoamenuloader.mm \
qcocoahelpers.mm \
qmultitouch_mac.mm \
- qcocoaaccessibilityelement.mm \
- qcocoaaccessibility.mm \
qcocoacursor.mm \
qcocoaclipboard.mm \
qcocoadrag.mm \
@@ -57,8 +55,6 @@ HEADERS += qcocoaintegration.h \
qcocoamenuloader.h \
qcocoahelpers.h \
qmultitouch_mac_p.h \
- qcocoaaccessibilityelement.h \
- qcocoaaccessibility.h \
qcocoacursor.h \
qcocoaclipboard.h \
qcocoadrag.h \
@@ -83,13 +79,21 @@ qtConfig(vulkan) {
HEADERS += qcocoavulkaninstance.h
}
+qtConfig(accessibility) {
+ QT += accessibility_support-private
+ SOURCES += qcocoaaccessibilityelement.mm \
+ qcocoaaccessibility.mm
+ HEADERS += qcocoaaccessibilityelement.h \
+ qcocoaaccessibility.h
+}
+
RESOURCES += qcocoaresources.qrc
LIBS += -framework AppKit -framework CoreServices -framework Carbon -framework IOKit -framework QuartzCore -framework CoreVideo -framework Metal -framework IOSurface -lcups
QT += \
core-private gui-private \
- accessibility_support-private clipboard_support-private theme_support-private \
+ clipboard_support-private theme_support-private \
fontdatabase_support-private graphics_support-private
qtConfig(vulkan): QT += vulkan_support-private
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index 24051c352e..359b086372 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -155,20 +155,33 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface(EGLConfig eglConfig)
qCDebug(qLcEglfsKmsDebug, "Creating gbm_surface for screen %s", qPrintable(name()));
const auto gbmDevice = static_cast<QEglFSKmsGbmDevice *>(device())->gbmDevice();
- EGLint native_format = -1;
- EGLBoolean success = eglGetConfigAttrib(display(), eglConfig, EGL_NATIVE_VISUAL_ID, &native_format);
- qCDebug(qLcEglfsKmsDebug) << "Got native format" << hex << native_format << dec << "from eglGetConfigAttrib() with return code" << bool(success);
-
- if (success)
- m_gbm_surface = gbm_surface_create(gbmDevice,
- rawGeometry().width(),
- rawGeometry().height(),
- native_format,
- GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
+ // If there was no format override given in the config file,
+ // query the native (here, gbm) format from the EGL config.
+ const bool queryFromEgl = !m_output.drm_format_requested_by_user;
+ if (queryFromEgl) {
+ EGLint native_format = -1;
+ EGLBoolean success = eglGetConfigAttrib(display(), eglConfig, EGL_NATIVE_VISUAL_ID, &native_format);
+ qCDebug(qLcEglfsKmsDebug) << "Got native format" << hex << native_format << dec
+ << "from eglGetConfigAttrib() with return code" << bool(success);
+
+ if (success) {
+ m_gbm_surface = gbm_surface_create(gbmDevice,
+ rawGeometry().width(),
+ rawGeometry().height(),
+ native_format,
+ GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
+ if (m_gbm_surface)
+ m_output.drm_format = gbmFormatToDrmFormat(native_format);
+ }
+ }
- if (!m_gbm_surface) { // fallback for older drivers
+ // Fallback for older drivers, and when "format" is explicitly specified
+ // in the output config. (not guaranteed that the requested format works
+ // of course, but do what we are told to)
+ if (!m_gbm_surface) {
uint32_t gbmFormat = drmFormatToGbmFormat(m_output.drm_format);
- qCDebug(qLcEglfsKmsDebug, "Could not create surface with EGL_NATIVE_VISUAL_ID, falling back to format %x", gbmFormat);
+ if (queryFromEgl)
+ qCDebug(qLcEglfsKmsDebug, "Could not create surface with EGL_NATIVE_VISUAL_ID, falling back to format %x", gbmFormat);
m_gbm_surface = gbm_surface_create(gbmDevice,
rawGeometry().width(),
rawGeometry().height(),
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 8ca367773d..09e725f98a 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -679,9 +679,6 @@ void tst_qmake::qinstall()
QFile srcfile(src.filePath("main.cpp"));
QVERIFY(srcfile.setPermissions(srcfile.permissions() & ~writeFlags));
QDir dst("zort");
-#ifdef Q_OS_WIN
- QEXPECT_FAIL("", "QTBUG-77299", Abort);
-#endif
QVERIFY(qinstall(src.absolutePath(), dst.absolutePath()));
QCOMPARE(src.entryList(QDir::Files, QDir::Name), dst.entryList(QDir::Files, QDir::Name));
}
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 95799905de..27cc385df4 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -4842,6 +4842,7 @@ void tst_QLineEdit::inputRejected()
QCOMPARE(spyInputRejected.count(), 0);
QTest::keyClicks(testWidget, "fgh");
QCOMPARE(spyInputRejected.count(), 3);
+#if QT_CONFIG(clipboard)
testWidget->clear();
spyInputRejected.clear();
QApplication::clipboard()->setText("ijklmno");
@@ -4849,6 +4850,7 @@ void tst_QLineEdit::inputRejected()
// The first 5 characters are accepted, but
// the last 2 are not.
QCOMPARE(spyInputRejected.count(), 1);
+#endif
testWidget->setMaxLength(INT_MAX);
testWidget->clear();
@@ -4859,11 +4861,13 @@ void tst_QLineEdit::inputRejected()
QCOMPARE(spyInputRejected.count(), 0);
QTest::keyClicks(testWidget, "a#");
QCOMPARE(spyInputRejected.count(), 2);
+#if QT_CONFIG(clipboard)
testWidget->clear();
spyInputRejected.clear();
QApplication::clipboard()->setText("a#");
testWidget->paste();
QCOMPARE(spyInputRejected.count(), 1);
+#endif
testWidget->clear();
testWidget->setValidator(0);