Merge "Merge remote-tracking branch 'origin/5.11' into 5.12.0" into refs/staging/5.12.0
This commit is contained in:
commit
d24835a60c
@ -3,7 +3,7 @@ load(default_post)
|
||||
contains(TEMPLATE, .*app) {
|
||||
!macx-xcode {
|
||||
# Detect changes to the platform SDK
|
||||
QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION
|
||||
QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION QMAKE_XCODE_DEVELOPER_PATH
|
||||
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
CURRENT_MAC_SDK_VERSION := $(shell /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version)
|
||||
CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version)
|
||||
|
||||
ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
|
||||
$(info The platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
|
||||
|
@ -1384,6 +1384,9 @@ QtSharedPointer::ExternalRefCountData *QtSharedPointer::ExternalRefCountData::ge
|
||||
x->strongref.store(-1);
|
||||
x->weakref.store(2); // the QWeakPointer that called us plus the QObject itself
|
||||
if (!d->sharedRefcount.testAndSetRelease(0, x)) {
|
||||
// ~ExternalRefCountData has a Q_ASSERT, so we use this trick to
|
||||
// only execute this if Q_ASSERTs are enabled
|
||||
Q_ASSERT((x->weakref.store(0), true));
|
||||
delete x;
|
||||
x = d->sharedRefcount.loadAcquire();
|
||||
x->weakref.ref();
|
||||
|
@ -2533,6 +2533,7 @@ QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalP
|
||||
*/
|
||||
QTabletEvent::~QTabletEvent()
|
||||
{
|
||||
delete static_cast<QTabletEventPrivate *>(mExtra);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -803,7 +803,8 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
|
||||
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
|
||||
{
|
||||
bool shouldBeBlocked = false;
|
||||
if (!QWindowPrivate::get(window)->isPopup() && !self->modalWindowList.isEmpty())
|
||||
const bool popupType = (window->type() == Qt::ToolTip) || (window->type() == Qt::Popup);
|
||||
if (!popupType && !self->modalWindowList.isEmpty())
|
||||
shouldBeBlocked = self->isWindowBlocked(window);
|
||||
updateBlockedStatusRecursion(window, shouldBeBlocked);
|
||||
}
|
||||
|
@ -40,8 +40,10 @@
|
||||
#include "qopenglvertexarrayobject.h"
|
||||
|
||||
#include <QtCore/private/qobject_p.h>
|
||||
#include <QtCore/qthread.h>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
#include <QtGui/qoffscreensurface.h>
|
||||
#include <QtGui/qguiapplication.h>
|
||||
|
||||
#include <QtGui/qopenglfunctions_3_0.h>
|
||||
#include <QtGui/qopenglfunctions_3_2_core.h>
|
||||
@ -204,18 +206,25 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
|
||||
if (context && context != ctx) {
|
||||
oldContext = ctx;
|
||||
oldContextSurface = ctx ? ctx->surface() : 0;
|
||||
// Cannot just make the current surface current again with another context.
|
||||
// The format may be incompatible and some platforms (iOS) may impose
|
||||
// restrictions on using a window with different contexts. Create an
|
||||
// offscreen surface (a pbuffer or a hidden window) instead to be safe.
|
||||
offscreenSurface.reset(new QOffscreenSurface);
|
||||
offscreenSurface->setFormat(context->format());
|
||||
offscreenSurface->create();
|
||||
if (context->makeCurrent(offscreenSurface.data())) {
|
||||
ctx = context;
|
||||
} else {
|
||||
qWarning("QOpenGLVertexArrayObject::destroy() failed to make VAO's context current");
|
||||
// Before going through the effort of creating an offscreen surface
|
||||
// check that we are on the GUI thread because otherwise many platforms
|
||||
// will not able to create that offscreen surface.
|
||||
if (QThread::currentThread() != qGuiApp->thread()) {
|
||||
ctx = 0;
|
||||
} else {
|
||||
// Cannot just make the current surface current again with another context.
|
||||
// The format may be incompatible and some platforms (iOS) may impose
|
||||
// restrictions on using a window with different contexts. Create an
|
||||
// offscreen surface (a pbuffer or a hidden window) instead to be safe.
|
||||
offscreenSurface.reset(new QOffscreenSurface);
|
||||
offscreenSurface->setFormat(context->format());
|
||||
offscreenSurface->create();
|
||||
if (context->makeCurrent(offscreenSurface.data())) {
|
||||
ctx = context;
|
||||
} else {
|
||||
qWarning("QOpenGLVertexArrayObject::destroy() failed to make VAO's context current");
|
||||
ctx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +233,7 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
|
||||
context = 0;
|
||||
}
|
||||
|
||||
if (vao) {
|
||||
if (vao && ctx) {
|
||||
switch (vaoFuncsType) {
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
case Core_3_2:
|
||||
|
@ -216,8 +216,13 @@ NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurface
|
||||
<< NSOpenGLPFASamples << NSOpenGLPixelFormatAttribute(format.samples());
|
||||
}
|
||||
|
||||
// Allow rendering on GPUs without a connected display
|
||||
attrs << NSOpenGLPFAAllowOfflineRenderers;
|
||||
//Workaround for problems with Chromium and offline renderers on the lat 2013 MacPros.
|
||||
//FIXME: Think if this could be solved via QSurfaceFormat in the future.
|
||||
static bool offlineRenderersAllowed = qEnvironmentVariableIsEmpty("QT_MAC_PRO_WEBENGINE_WORKAROUND");
|
||||
if (offlineRenderersAllowed) {
|
||||
// Allow rendering on GPUs without a connected display
|
||||
attrs << NSOpenGLPFAAllowOfflineRenderers;
|
||||
}
|
||||
|
||||
// FIXME: Pull this information out of the NSView
|
||||
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
|
||||
|
@ -71,6 +71,7 @@ QEglFSKmsGbmCursor::QEglFSKmsGbmCursor(QEglFSKmsGbmScreen *screen)
|
||||
, m_bo(nullptr)
|
||||
, m_cursorImage(0, 0, 0, 0, 0, 0)
|
||||
, m_state(CursorPendingVisible)
|
||||
, m_deviceListener(nullptr)
|
||||
{
|
||||
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
|
||||
if (!hideCursorVal.isEmpty() && hideCursorVal.toInt()) {
|
||||
|
@ -112,13 +112,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
|
||||
|
||||
xcb_depth_next(&depth_iterator);
|
||||
}
|
||||
|
||||
if (connection->hasXRandr()) {
|
||||
xcb_connection_t *conn = connection->xcb_connection();
|
||||
auto screen_info = Q_XCB_REPLY(xcb_randr_get_screen_info, conn, screen->root);
|
||||
if (screen_info)
|
||||
m_rotation = screen_info->rotation;
|
||||
}
|
||||
}
|
||||
|
||||
QXcbVirtualDesktop::~QXcbVirtualDesktop()
|
||||
|
@ -134,7 +134,7 @@ private:
|
||||
QString m_windowManagerName;
|
||||
QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals;
|
||||
QMap<xcb_visualid_t, quint8> m_visualDepths;
|
||||
uint16_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
|
||||
uint16_t m_rotation = 0;
|
||||
};
|
||||
|
||||
class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen
|
||||
|
@ -954,6 +954,7 @@ QLineEdit[echoMode="2"] {
|
||||
//! [119]
|
||||
QLineEdit:read-only {
|
||||
background: lightblue;
|
||||
}
|
||||
//! [119]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user