Merge remote-tracking branch 'origin/5.11' into 5.12.0
Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
This commit is contained in:
commit
b36c5bdc30
@ -3,7 +3,7 @@ load(default_post)
|
|||||||
contains(TEMPLATE, .*app) {
|
contains(TEMPLATE, .*app) {
|
||||||
!macx-xcode {
|
!macx-xcode {
|
||||||
# Detect changes to the platform SDK
|
# 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)
|
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))
|
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).)
|
$(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->strongref.store(-1);
|
||||||
x->weakref.store(2); // the QWeakPointer that called us plus the QObject itself
|
x->weakref.store(2); // the QWeakPointer that called us plus the QObject itself
|
||||||
if (!d->sharedRefcount.testAndSetRelease(0, x)) {
|
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;
|
delete x;
|
||||||
x = d->sharedRefcount.loadAcquire();
|
x = d->sharedRefcount.loadAcquire();
|
||||||
x->weakref.ref();
|
x->weakref.ref();
|
||||||
|
@ -2533,6 +2533,7 @@ QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalP
|
|||||||
*/
|
*/
|
||||||
QTabletEvent::~QTabletEvent()
|
QTabletEvent::~QTabletEvent()
|
||||||
{
|
{
|
||||||
|
delete static_cast<QTabletEventPrivate *>(mExtra);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -803,7 +803,8 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
|
|||||||
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
|
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
|
||||||
{
|
{
|
||||||
bool shouldBeBlocked = false;
|
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);
|
shouldBeBlocked = self->isWindowBlocked(window);
|
||||||
updateBlockedStatusRecursion(window, shouldBeBlocked);
|
updateBlockedStatusRecursion(window, shouldBeBlocked);
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,10 @@
|
|||||||
#include "qopenglvertexarrayobject.h"
|
#include "qopenglvertexarrayobject.h"
|
||||||
|
|
||||||
#include <QtCore/private/qobject_p.h>
|
#include <QtCore/private/qobject_p.h>
|
||||||
|
#include <QtCore/qthread.h>
|
||||||
#include <QtGui/qopenglcontext.h>
|
#include <QtGui/qopenglcontext.h>
|
||||||
#include <QtGui/qoffscreensurface.h>
|
#include <QtGui/qoffscreensurface.h>
|
||||||
|
#include <QtGui/qguiapplication.h>
|
||||||
|
|
||||||
#include <QtGui/qopenglfunctions_3_0.h>
|
#include <QtGui/qopenglfunctions_3_0.h>
|
||||||
#include <QtGui/qopenglfunctions_3_2_core.h>
|
#include <QtGui/qopenglfunctions_3_2_core.h>
|
||||||
@ -204,18 +206,25 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
|
|||||||
if (context && context != ctx) {
|
if (context && context != ctx) {
|
||||||
oldContext = ctx;
|
oldContext = ctx;
|
||||||
oldContextSurface = ctx ? ctx->surface() : 0;
|
oldContextSurface = ctx ? ctx->surface() : 0;
|
||||||
// Cannot just make the current surface current again with another context.
|
// Before going through the effort of creating an offscreen surface
|
||||||
// The format may be incompatible and some platforms (iOS) may impose
|
// check that we are on the GUI thread because otherwise many platforms
|
||||||
// restrictions on using a window with different contexts. Create an
|
// will not able to create that offscreen surface.
|
||||||
// offscreen surface (a pbuffer or a hidden window) instead to be safe.
|
if (QThread::currentThread() != qGuiApp->thread()) {
|
||||||
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;
|
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;
|
context = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vao) {
|
if (vao && ctx) {
|
||||||
switch (vaoFuncsType) {
|
switch (vaoFuncsType) {
|
||||||
#ifndef QT_OPENGL_ES_2
|
#ifndef QT_OPENGL_ES_2
|
||||||
case Core_3_2:
|
case Core_3_2:
|
||||||
|
@ -216,8 +216,13 @@ NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurface
|
|||||||
<< NSOpenGLPFASamples << NSOpenGLPixelFormatAttribute(format.samples());
|
<< NSOpenGLPFASamples << NSOpenGLPixelFormatAttribute(format.samples());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow rendering on GPUs without a connected display
|
//Workaround for problems with Chromium and offline renderers on the lat 2013 MacPros.
|
||||||
attrs << NSOpenGLPFAAllowOfflineRenderers;
|
//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
|
// FIXME: Pull this information out of the NSView
|
||||||
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
|
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
|
||||||
|
@ -71,6 +71,7 @@ QEglFSKmsGbmCursor::QEglFSKmsGbmCursor(QEglFSKmsGbmScreen *screen)
|
|||||||
, m_bo(nullptr)
|
, m_bo(nullptr)
|
||||||
, m_cursorImage(0, 0, 0, 0, 0, 0)
|
, m_cursorImage(0, 0, 0, 0, 0, 0)
|
||||||
, m_state(CursorPendingVisible)
|
, m_state(CursorPendingVisible)
|
||||||
|
, m_deviceListener(nullptr)
|
||||||
{
|
{
|
||||||
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
|
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
|
||||||
if (!hideCursorVal.isEmpty() && hideCursorVal.toInt()) {
|
if (!hideCursorVal.isEmpty() && hideCursorVal.toInt()) {
|
||||||
|
@ -112,13 +112,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
|
|||||||
|
|
||||||
xcb_depth_next(&depth_iterator);
|
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()
|
QXcbVirtualDesktop::~QXcbVirtualDesktop()
|
||||||
|
@ -134,7 +134,7 @@ private:
|
|||||||
QString m_windowManagerName;
|
QString m_windowManagerName;
|
||||||
QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals;
|
QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals;
|
||||||
QMap<xcb_visualid_t, quint8> m_visualDepths;
|
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
|
class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen
|
||||||
|
@ -954,6 +954,7 @@ QLineEdit[echoMode="2"] {
|
|||||||
//! [119]
|
//! [119]
|
||||||
QLineEdit:read-only {
|
QLineEdit:read-only {
|
||||||
background: lightblue;
|
background: lightblue;
|
||||||
|
}
|
||||||
//! [119]
|
//! [119]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user