summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qclipboard.cpp5
-rw-r--r--src/gui/kernel/qguiapplication.cpp10
-rw-r--r--src/gui/kernel/qplatformscreen.cpp4
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp12
4 files changed, 29 insertions, 2 deletions
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 21127eebbd..f14355bc01 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -425,8 +425,9 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode)
/*!
\fn QMimeData *QClipboard::mimeData(Mode mode) const
- Returns a reference to a QMimeData representation of the current
- clipboard data.
+ Returns a pointer to a QMimeData representation of the current
+ clipboard data (can be NULL if the given \a mode is not
+ supported by the platform).
The \a mode argument is used to control which part of the system
clipboard is used. If \a mode is QClipboard::Clipboard, the
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index d8457bc041..7beab72ab0 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -351,6 +351,16 @@ void QWindowGeometrySpecification::applyTo(QWindow *window) const
static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER;
/*!
+ \macro qGuiApp
+ \relates QGuiApplication
+
+ A global pointer referring to the unique application object.
+ Only valid for use when that object is a QGuiApplication.
+
+ \sa QCoreApplication::instance(), qApp
+*/
+
+/*!
\class QGuiApplication
\brief The QGuiApplication class manages the GUI application's control
flow and main settings.
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
index 3c1552c31e..1d519e84f9 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -342,6 +342,10 @@ void QPlatformScreen::resizeMaximizedWindows()
for (int i = 0; i < windows.size(); ++i) {
QWindow *w = windows.at(i);
+ // Skip non-platform windows, e.g., offscreen windows.
+ if (!w->handle())
+ continue;
+
if (platformScreenForWindow(w) != this)
continue;
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index d7dc0faceb..000d727380 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -41,6 +41,8 @@
#include <QtCore/qatomic.h>
#include <QtCore/QDebug>
+#include <QOpenGLContext>
+#include <QtGui/qguiapplication.h>
#ifdef major
#undef major
@@ -761,6 +763,16 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format)
*/
void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format)
{
+#ifndef QT_NO_OPENGL
+ if (qApp) {
+ QOpenGLContext *globalContext = QOpenGLContext::globalShareContext();
+ if (globalContext && globalContext->isValid()) {
+ qWarning("Warning: Setting a new default format with a different version or profile "
+ "after the global shared context is created may cause issues with context "
+ "sharing.");
+ }
+ }
+#endif
*qt_default_surface_format() = format;
}