summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/kernel.pri2
-rw-r--r--src/gui/kernel/qclipboard.cpp11
-rw-r--r--src/gui/kernel/qclipboard.h5
-rw-r--r--src/gui/kernel/qclipboard_qpa.cpp14
-rw-r--r--src/gui/kernel/qevent.cpp32
-rw-r--r--src/gui/kernel/qevent.h24
-rw-r--r--src/gui/kernel/qguiapplication.cpp63
-rw-r--r--src/gui/kernel/qguiapplication.h6
-rw-r--r--src/gui/kernel/qguiapplication_p.h2
-rw-r--r--src/gui/kernel/qinputmethod.cpp14
-rw-r--r--src/gui/kernel/qinputmethod.h2
-rw-r--r--src/gui/kernel/qinputmethod_p.h11
-rw-r--r--src/gui/kernel/qkeysequence.cpp24
-rw-r--r--src/gui/kernel/qplatformclipboard_qpa.cpp10
-rw-r--r--src/gui/kernel/qplatformclipboard_qpa.h11
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp8
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.h11
-rw-r--r--src/gui/kernel/qplatformdialoghelper_qpa.cpp29
-rw-r--r--src/gui/kernel/qplatformdialoghelper_qpa.h20
-rw-r--r--src/gui/kernel/qplatformdrag_qpa.cpp9
-rw-r--r--src/gui/kernel/qplatformdrag_qpa.h11
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa.cpp4
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa.h11
-rw-r--r--src/gui/kernel/qplatformintegration_qpa.h11
-rw-r--r--src/gui/kernel/qplatformnativeinterface_qpa.cpp35
-rw-r--r--src/gui/kernel/qplatformnativeinterface_qpa.h20
-rw-r--r--src/gui/kernel/qplatformopenglcontext_qpa.h11
-rw-r--r--src/gui/kernel/qplatformscreen_qpa.h11
-rw-r--r--src/gui/kernel/qplatformscreenpageflipper_qpa.cpp21
-rw-r--r--src/gui/kernel/qplatformscreenpageflipper_qpa.h11
-rw-r--r--src/gui/kernel/qplatformservices_qpa.h11
-rw-r--r--src/gui/kernel/qplatformsharedgraphicscache_qpa.h11
-rw-r--r--src/gui/kernel/qplatformsurface_qpa.cpp9
-rw-r--r--src/gui/kernel/qplatformsurface_qpa.h11
-rw-r--r--src/gui/kernel/qplatformtheme_qpa.h11
-rw-r--r--src/gui/kernel/qplatformthemeplugin_qpa.cpp9
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp24
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.h15
38 files changed, 408 insertions, 147 deletions
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index b0fe871741..3c1b6b4e48 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -105,7 +105,7 @@ SOURCES += \
kernel/qplatformservices_qpa.cpp \
kernel/qplatformscreenpageflipper_qpa.cpp
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) {
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
HEADERS += \
kernel/qplatformopenglcontext_qpa.h \
kernel/qopenglcontext.h \
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 27179cf141..ef5e4f9c18 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -237,17 +237,6 @@ QClipboard::~QClipboard()
*/
-/*****************************************************************************
- QApplication member functions related to QClipboard.
- *****************************************************************************/
-
-// text handling is done directly in qclipboard_qws, for now
-
-/*!
- \fn bool QClipboard::event(QEvent *e)
- \reimp
-*/
-
/*!
\overload
diff --git a/src/gui/kernel/qclipboard.h b/src/gui/kernel/qclipboard.h
index 5c88764d88..1c21e5eaca 100644
--- a/src/gui/kernel/qclipboard.h
+++ b/src/gui/kernel/qclipboard.h
@@ -91,13 +91,8 @@ Q_SIGNALS:
void selectionChanged();
void findBufferChanged();
void dataChanged();
-private Q_SLOTS:
- void ownerDestroyed();
protected:
- void connectNotify(const char *);
- bool event(QEvent *);
-
friend class QApplication;
friend class QApplicationPrivate;
friend class QGuiApplication;
diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp
index 0d97fdd0be..187e09253e 100644
--- a/src/gui/kernel/qclipboard_qpa.cpp
+++ b/src/gui/kernel/qclipboard_qpa.cpp
@@ -57,12 +57,6 @@ void QClipboard::clear(Mode mode)
setMimeData(0, mode);
}
-
-bool QClipboard::event(QEvent *e)
-{
- return QObject::event(e);
-}
-
const QMimeData* QClipboard::mimeData(Mode mode) const
{
QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard();
@@ -90,14 +84,6 @@ bool QClipboard::ownsMode(Mode mode) const
return clipboard->ownsMode(mode);
}
-void QClipboard::connectNotify( const char * )
-{
-}
-
-void QClipboard::ownerDestroyed()
-{
-}
-
#endif // QT_NO_CLIPBOARD
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 52880a231d..266eb143e5 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1672,16 +1672,13 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace
}
/*!
- Sets the tentative commit string to \a tentativeCommitString.
+ \fn void QInputMethodEvent::setTentativeCommitString(const QString &string)
+ Sets the tentative commit string to \a string.
The tentative commit string is what the preedit string is expected to be committed as.
The string can be used within the editor to trigger code that reacts on text changes such as validators.
\deprecated
*/
-void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitString)
-{
- tentativeCommit = tentativeCommitString;
-}
/*!
\fn const QList<Attribute> &QInputMethodEvent::attributes() const
@@ -3202,31 +3199,6 @@ QDebug operator<<(QDebug dbg, const QEvent *e) {
}
#endif
-#ifndef QT_NO_CLIPBOARD
-/*!
- \class QClipboardEvent
- \ingroup events
- \internal
-
- \brief The QClipboardEvent class provides the parameters used in a clipboard event.
-
- This class is for internal use only, and exists to aid the clipboard on various
- platforms to get all the information it needs. Use QEvent::Clipboard instead.
-
- \sa QClipboard
-*/
-
-QClipboardEvent::QClipboardEvent(QEventPrivate *data)
- : QEvent(QEvent::Clipboard)
-{
- d = data;
-}
-
-QClipboardEvent::~QClipboardEvent()
-{
-}
-#endif // QT_NO_CLIPBOARD
-
/*!
\class QShortcutEvent
\brief The QShortcutEvent class provides an event which is generated when
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 176747aa95..96e630ed0a 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -159,10 +159,8 @@ public:
inline QPoint pixelDelta() const { return pixelD; }
inline QPoint angleDelta() const { return angleD; }
-#if QT_DEPRECATED_SINCE(5, 0)
- inline QT_DEPRECATED int delta() const { return qt4D; }
- inline QT_DEPRECATED Qt::Orientation orientation() const { return qt4O; }
-#endif
+ inline int delta() const { return qt4D; }
+ inline Qt::Orientation orientation() const { return qt4O; }
#ifndef QT_NO_INTEGER_EVENT_COORDINATES
inline QPoint pos() const { return p.toPoint(); }
@@ -461,15 +459,18 @@ public:
QInputMethodEvent();
QInputMethodEvent(const QString &preeditText, const QList<Attribute> &attributes);
void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0);
- QT_DEPRECATED void setTentativeCommitString(const QString &tentativeCommitString);
-
inline const QList<Attribute> &attributes() const { return attrs; }
inline const QString &preeditString() const { return preedit; }
inline const QString &commitString() const { return commit; }
inline int replacementStart() const { return replace_from; }
inline int replacementLength() const { return replace_length; }
+
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED inline void setTentativeCommitString(const QString &string)
+ { tentativeCommit = string; }
QT_DEPRECATED inline const QString &tentativeCommitString() const { return tentativeCommit; }
+#endif
QInputMethodEvent(const QInputMethodEvent &other);
@@ -684,17 +685,6 @@ protected:
};
#endif
-#ifndef QT_NO_CLIPBOARD
-class Q_GUI_EXPORT QClipboardEvent : public QEvent
-{
-public:
- explicit QClipboardEvent(QEventPrivate *data);
- ~QClipboardEvent();
-
- QEventPrivate *data() { return d; }
-};
-#endif
-
class Q_GUI_EXPORT QWindowStateChangeEvent: public QEvent
{
public:
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8cbf55de05..8fd4d4a2b3 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -68,6 +68,7 @@
#include <QtGui/QGenericPluginFactory>
#include <QtGui/qstylehints.h>
#include <QtGui/qinputpanel.h>
+#include <QtGui/qpixmapcache.h>
#include <QtGui/qplatformtheme_qpa.h>
#include <QtGui/qplatforminputcontext_qpa.h>
#include <private/qplatforminputcontext_qpa_p.h>
@@ -347,17 +348,14 @@ QGuiApplication::QGuiApplication(QGuiApplicationPrivate &p)
QGuiApplication::~QGuiApplication()
{
Q_D(QGuiApplication);
- // flush clipboard contents
- if (QGuiApplicationPrivate::qt_clipboard) {
- QEvent event(QEvent::Clipboard);
- QGuiApplication::sendEvent(QGuiApplicationPrivate::qt_clipboard, &event);
- }
d->eventDispatcher->closingDown();
d->eventDispatcher = 0;
+#ifndef QT_NO_CLIPBOARD
delete QGuiApplicationPrivate::qt_clipboard;
QGuiApplicationPrivate::qt_clipboard = 0;
+#endif
clearPalette();
@@ -626,33 +624,6 @@ static void init_platform(const QString &pluginArgument, const QString &platform
}
}
- if (name.isEmpty()) {
- const QStringList keys = QPlatformIntegrationFactory::keys(platformPluginPath);
-#if defined(Q_OS_MAC)
- const QString defaultPlatform = QLatin1String("cocoa");
-#elif defined (Q_OS_WIN)
- const QString defaultPlatform = QLatin1String("windows");
-#elif defined (Q_OS_QNX)
- const QString defaultPlatform = QLatin1String("qnx");
-#elif !defined (QT_NO_XCB)
- const QString defaultPlatform = QLatin1String("xcb");
-#elif !defined (QT_NO_WAYLAND)
- const QString defaultPlatform = QLatin1String("wayland");
-#elif !defined (QT_NO_EGLFS)
- const QString defaultPlatform = QLatin1String("eglfs");
-#else
- const QString defaultPlatform = QLatin1String("minimal");
-#endif
- if (keys.contains(defaultPlatform)) {
- qWarning("No platform plugin argument was specified, defaulting to \"%s\".",
- qPrintable(defaultPlatform));
- name = defaultPlatform;
- } else {
- qFatal("No platform plugin argument was specified and the default plugin \"%s\" is not available",
- qPrintable(defaultPlatform));
- }
- }
-
// Create the platform integration.
QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, platformPluginPath);
if (QGuiApplicationPrivate::platform_integration) {
@@ -889,6 +860,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
qt_cleanupFontDatabase();
+ QPixmapCache::clear();
+
delete platform_theme;
delete platform_integration;
platform_integration = 0;
@@ -1026,6 +999,7 @@ bool QGuiApplication::notify(QObject *object, QEvent *event)
}
#endif
+ QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(qobject_cast<QWindow *>(object), event);
return QCoreApplication::notify(object, event);
}
@@ -1047,6 +1021,20 @@ bool QGuiApplication::compressEvent(QEvent *event, QObject *receiver, QPostEvent
return QCoreApplication::compressEvent(event, receiver, postedEvents);
}
+void QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event)
+{
+ if (!window)
+ return;
+ QPlatformWindow *platformWindow = window->handle();
+ if (!platformWindow)
+ return;
+ // spontaneous events come from the platform integration already, we don't need to send the events back
+ if (event->spontaneous())
+ return;
+ // let the platform window do any handling it needs to as well
+ platformWindow->windowEvent(event);
+}
+
bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
{
return window->nativeEvent(eventType, message, result);
@@ -1260,7 +1248,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
QWindow *window = e->window.data();
modifier_buttons = e->modifiers;
if (e->nullWindow)
- window = QGuiApplication::activeWindow();
+ window = QGuiApplication::focusWindow();
if (!window)
return;
if (window->d_func()->blockedByModalWindow) {
@@ -2183,18 +2171,17 @@ QInputMethod *QGuiApplication::inputMethod()
}
/*!
+ \fn QInputPanel *QGuiApplication::inputPanel() const
returns the input panel.
The input panel returns properties about the state and position of
the virtual keyboard. It also provides information about the position of the
current focused input element.
- \sa QInputPanel
+ \obsolete
+
+ \sa inputMethod()
*/
-QInputPanel *QGuiApplication::inputPanel() const
-{
- return inputMethod();
-}
/*!
\fn void QGuiApplication::fontDatabaseChanged()
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 2a1ea3d9de..9aad39ed47 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -90,7 +90,7 @@ public:
static QWindow *modalWindow();
-#ifdef QT_DEPRECATED
+#if QT_DEPRECATED_SINCE(5, 0)
static QT_DEPRECATED QWindow *activeWindow() { return focusWindow(); }
#endif
static QWindow *focusWindow();
@@ -130,7 +130,9 @@ public:
static void setDesktopSettingsAware(bool on);
static bool desktopSettingsAware();
- QT_DEPRECATED QInputPanel *inputPanel() const;
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED QInputPanel *inputPanel() const { return inputMethod(); }
+#endif
static QInputMethod *inputMethod();
static QPlatformNativeInterface *platformNativeInterface();
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 435994cdd3..78641de55b 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -126,6 +126,8 @@ public:
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
+ static void sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event);
+
static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
{
if (!(alignment & Qt::AlignHorizontal_Mask))
diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp
index c443a47cac..0e0bc7237a 100644
--- a/src/gui/kernel/qinputmethod.cpp
+++ b/src/gui/kernel/qinputmethod.cpp
@@ -97,12 +97,7 @@ QObject *QInputMethod::inputItem() const
void QInputMethod::setInputItem(QObject *inputItem)
{
Q_D(QInputMethod);
-
- if (d->inputItem.data() == inputItem)
- return;
-
- d->inputItem = inputItem;
- emit inputItemChanged();
+ d->setInputItem(inputItem);
}
/*!
@@ -112,7 +107,7 @@ void QInputMethod::setInputItem(QObject *inputItem)
*/
QWindow *QInputMethod::inputWindow() const
{
- return qApp->activeWindow();
+ return qApp->focusWindow();
}
/*!
@@ -299,7 +294,7 @@ void QInputMethod::update(Qt::InputMethodQueries queries)
if (queries & Qt::ImEnabled) {
QObject *focus = qApp->focusObject();
bool enabled = d->objectAcceptsInputMethod(focus);
- setInputItem(enabled ? focus : 0);
+ d->setInputItem(enabled ? focus : 0);
QPlatformInputContextPrivate::setInputMethodAccepted(enabled);
}
@@ -365,9 +360,8 @@ void QInputMethodPrivate::q_connectFocusObject()
void QInputMethodPrivate::q_checkFocusObject(QObject *object)
{
- Q_Q(QInputMethod);
bool enabled = objectAcceptsInputMethod(object);
- q->setInputItem(enabled ? object : 0);
+ setInputItem(enabled ? object : 0);
}
bool QInputMethodPrivate::objectAcceptsInputMethod(QObject *object)
diff --git a/src/gui/kernel/qinputmethod.h b/src/gui/kernel/qinputmethod.h
index 92ae016b97..095c17ffd8 100644
--- a/src/gui/kernel/qinputmethod.h
+++ b/src/gui/kernel/qinputmethod.h
@@ -69,11 +69,13 @@ class Q_GUI_EXPORT QInputMethod : public QObject
Q_ENUMS(Action)
public:
+#ifdef QT_DEPRECATED
QT_DEPRECATED QObject *inputItem() const;
QT_DEPRECATED void setInputItem(QObject *inputItemChanged);
// the window containing the editor
QT_DEPRECATED QWindow *inputWindow() const;
+#endif
QTransform inputItemTransform() const;
void setInputItemTransform(const QTransform &transform);
diff --git a/src/gui/kernel/qinputmethod_p.h b/src/gui/kernel/qinputmethod_p.h
index 34a0430f10..1e55b00318 100644
--- a/src/gui/kernel/qinputmethod_p.h
+++ b/src/gui/kernel/qinputmethod_p.h
@@ -69,6 +69,17 @@ public:
{
return inputMethod->d_func();
}
+ inline void setInputItem(QObject *item)
+ {
+ Q_Q(QInputMethod);
+
+ if (inputItem.data() == item)
+ return;
+
+ inputItem = item;
+ emit q->inputItemChanged();
+ }
+
void q_connectFocusObject();
void q_checkFocusObject(QObject *object);
bool objectAcceptsInputMethod(QObject *object);
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index c616681b64..4946a1dc18 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -55,14 +55,14 @@
#endif
#include "qvariant.h"
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
#include <QtCore/private/qcore_mac_p.h>
#include <Carbon/Carbon.h>
#endif
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
static bool qt_sequence_no_mnemonics = true;
struct MacSpecialKey {
int key;
@@ -876,7 +876,7 @@ const uint QKeySequencePrivate::numberOfKeyBindings = sizeof(QKeySequencePrivate
\value Underline Underline text.
\value Undo Undo.
\value UnknownKey Unbound key.
- \value WhatsThis Activate whats this.
+ \value WhatsThis Activate "what's this".
\value ZoomIn Zoom in.
\value ZoomOut Zoom out.
*/
@@ -966,7 +966,7 @@ QKeySequence::QKeySequence(const QKeySequence& keysequence)
d->ref.ref();
}
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
static inline int maybeSwapShortcut(int shortcut)
{
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
@@ -998,7 +998,7 @@ QList<QKeySequence> QKeySequence::keyBindings(StandardKey key)
QKeyBinding keyBinding = QKeySequencePrivate::keyBindings[i];
if (keyBinding.standardKey == key && (keyBinding.platform & platform)) {
uint shortcut =
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
maybeSwapShortcut(QKeySequencePrivate::keyBindings[i].shortcut);
#else
QKeySequencePrivate::keyBindings[i].shortcut;
@@ -1200,7 +1200,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
if (nativeText) {
gmodifs = globalModifs();
if (gmodifs->isEmpty()) {
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
const bool dontSwap = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
if (dontSwap)
*gmodifs << QModifKeyName(Qt::META, QChar(kCommandUnicode));
@@ -1240,7 +1240,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
modifs += *gmodifs; // Test non-translated ones last
QString sl = accel;
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
for (int i = 0; i < modifs.size(); ++i) {
const QModifKeyName &mkf = modifs.at(i);
if (sl.contains(mkf.name)) {
@@ -1292,7 +1292,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
int fnum = 0;
if (accel.length() == 1) {
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
int qtKey = qtkeyForMacSymbol(accel[0]);
if (qtKey != -1) {
ret |= qtKey;
@@ -1371,7 +1371,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
if (key == -1 || key == Qt::Key_unknown)
return s;
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
if (nativeText) {
// On Mac OS X the order (by default) is Meta, Alt, Shift, Control.
// If the AA_MacDontSwapCtrlAndMeta is enabled, then the order
@@ -1427,7 +1427,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
} else if (key) {
int i=0;
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
if (nativeText) {
QChar ch = qt_macSymbolForQtKey(key);
if (!ch.isNull())
@@ -1437,7 +1437,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
} else
#endif
{
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
NonSymbol:
#endif
while (keyname[i].name) {
@@ -1463,7 +1463,7 @@ NonSymbol:
}
}
-#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
if (nativeText)
s += p;
else
diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp
index bc08a73a7f..7273450077 100644
--- a/src/gui/kernel/qplatformclipboard_qpa.cpp
+++ b/src/gui/kernel/qplatformclipboard_qpa.cpp
@@ -79,6 +79,16 @@ QClipboardData::~QClipboardData()
Q_GLOBAL_STATIC(QClipboardData,q_clipboardData);
+/*!
+ \class QPlatformClipboard
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformClipboard class provides an abstraction for the system clipboard.
+ */
+
QPlatformClipboard::~QPlatformClipboard()
{
diff --git a/src/gui/kernel/qplatformclipboard_qpa.h b/src/gui/kernel/qplatformclipboard_qpa.h
index 4dd672b21e..95c8103b7e 100644
--- a/src/gui/kernel/qplatformclipboard_qpa.h
+++ b/src/gui/kernel/qplatformclipboard_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMCLIPBOARD_QPA_H
#define QPLATFORMCLIPBOARD_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qplatformdefs.h>
#ifndef QT_NO_CLIPBOARD
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
index a4e998ddbc..5ea080c40a 100644
--- a/src/gui/kernel/qplatformcursor_qpa.cpp
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -62,6 +62,10 @@ QList<QPlatformCursor *> QPlatformCursorPrivate::getInstances()
/*!
\class QPlatformCursor
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
\brief The QPlatformCursor class provides information about
pointer device events (movement, buttons), and requests to change
@@ -124,6 +128,10 @@ void QPlatformCursor::setPos(const QPoint &pos)
/*!
\class QPlatformCursorImage
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
\brief The QPlatformCursorImage class provides a set of graphics
intended to be used as cursors.
diff --git a/src/gui/kernel/qplatformcursor_qpa.h b/src/gui/kernel/qplatformcursor_qpa.h
index c1a572b27d..fb3e4604d2 100644
--- a/src/gui/kernel/qplatformcursor_qpa.h
+++ b/src/gui/kernel/qplatformcursor_qpa.h
@@ -41,6 +41,17 @@
#ifndef QPLATFORMCURSOR_QPA_H
#define QPLATFORMCURSOR_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QList>
#include <QtGui/QImage>
#include <QtGui/QMouseEvent>
diff --git a/src/gui/kernel/qplatformdialoghelper_qpa.cpp b/src/gui/kernel/qplatformdialoghelper_qpa.cpp
index 385484828a..f2114d17e0 100644
--- a/src/gui/kernel/qplatformdialoghelper_qpa.cpp
+++ b/src/gui/kernel/qplatformdialoghelper_qpa.cpp
@@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE
\class QPlatformDialogHelper
\since 5.0
\internal
+ \ingroup qpa
+
\brief The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
*/
@@ -159,6 +161,15 @@ QFontDialogOptions::FontDialogOptions QFontDialogOptions::options() const
return d->options;
}
+/*!
+ \class QPlatformFontDialogHelper
+ \since 5.0
+ \internal
+ \ingroup qpa
+
+ \brief The QPlatformFontDialogHelper class allows for platform-specific customization of font dialogs.
+
+*/
const QSharedPointer<QFontDialogOptions> &QPlatformFontDialogHelper::options() const
{
return m_options;
@@ -327,6 +338,15 @@ void QColorDialogOptions::setStandardColor(int index, QRgb color)
qColorDialogStaticData()->standardRgb[index] = color;
}
+/*!
+ \class QPlatformColorDialogHelper
+ \since 5.0
+ \internal
+ \ingroup qpa
+
+ \brief The QPlatformColorDialogHelper class allows for platform-specific customization of color dialogs.
+
+*/
const QSharedPointer<QColorDialogOptions> &QPlatformColorDialogHelper::options() const
{
return m_options;
@@ -543,6 +563,15 @@ void QFileDialogOptions::setInitiallySelectedFiles(const QStringList &files)
d->initiallySelectedFiles = files;
}
+/*!
+ \class QPlatformFileDialogHelper
+ \since 5.0
+ \internal
+ \ingroup qpa
+
+ \brief The QPlatformFileDialogHelper class allows for platform-specific customization of file dialogs.
+
+*/
const QSharedPointer<QFileDialogOptions> &QPlatformFileDialogHelper::options() const
{
return m_options;
diff --git a/src/gui/kernel/qplatformdialoghelper_qpa.h b/src/gui/kernel/qplatformdialoghelper_qpa.h
index 5fdffae5cb..5cd3ab055b 100644
--- a/src/gui/kernel/qplatformdialoghelper_qpa.h
+++ b/src/gui/kernel/qplatformdialoghelper_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMDIALOGHELPER_H
#define QPLATFORMDIALOGHELPER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QtGlobal>
#include <QtCore/QObject>
#include <QtCore/QList>
@@ -73,11 +84,6 @@ public:
SnapToDefaultButton
};
enum DialogCode { Rejected, Accepted };
- enum ShowFlag {
- ShowModal = 0x00000001
- };
-
- Q_DECLARE_FLAGS(ShowFlags, ShowFlag)
QPlatformDialogHelper();
virtual ~QPlatformDialogHelper();
@@ -88,8 +94,8 @@ public:
virtual void _q_platformRunNativeAppModalPanel() = 0;
virtual void deleteNativeDialog_sys() = 0;
- virtual bool show_sys(ShowFlags showFlags,
- Qt::WindowFlags windowFlags,
+ virtual bool show_sys(Qt::WindowFlags windowFlags,
+ Qt::WindowModality windowModality,
QWindow *parent) = 0;
virtual void hide_sys() = 0;
diff --git a/src/gui/kernel/qplatformdrag_qpa.cpp b/src/gui/kernel/qplatformdrag_qpa.cpp
index 0e7b0f41cc..d9fc3a2ab8 100644
--- a/src/gui/kernel/qplatformdrag_qpa.cpp
+++ b/src/gui/kernel/qplatformdrag_qpa.cpp
@@ -82,6 +82,15 @@ public:
Qt::DropAction cursor_drop_action;
};
+/*!
+ \class QPlatformDrag
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformDrag class provides an abstraction for drag.
+ */
QPlatformDrag::QPlatformDrag() : d_ptr(new QPlatformDragPrivate)
{
}
diff --git a/src/gui/kernel/qplatformdrag_qpa.h b/src/gui/kernel/qplatformdrag_qpa.h
index 22133706d1..14282c5a21 100644
--- a/src/gui/kernel/qplatformdrag_qpa.h
+++ b/src/gui/kernel/qplatformdrag_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMDRAG_H
#define QPLATFORMDRAG_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#include <QtGui/QPixmap>
diff --git a/src/gui/kernel/qplatforminputcontext_qpa.cpp b/src/gui/kernel/qplatforminputcontext_qpa.cpp
index 8612b4b42f..53839088c5 100644
--- a/src/gui/kernel/qplatforminputcontext_qpa.cpp
+++ b/src/gui/kernel/qplatforminputcontext_qpa.cpp
@@ -49,6 +49,10 @@ QT_BEGIN_NAMESPACE
/*!
\class QPlatformInputContext
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
\brief The QPlatformInputContext class abstracts the input method dependent data and composing state.
An input method is responsible for inputting complex text that cannot
diff --git a/src/gui/kernel/qplatforminputcontext_qpa.h b/src/gui/kernel/qplatforminputcontext_qpa.h
index 5e8060c6e0..696146b859 100644
--- a/src/gui/kernel/qplatforminputcontext_qpa.h
+++ b/src/gui/kernel/qplatforminputcontext_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMINPUTCONTEXT_H
#define QPLATFORMINPUTCONTEXT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qinputpanel.h>
QT_BEGIN_HEADER
diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h
index fe40fd3dad..a44f4343ef 100644
--- a/src/gui/kernel/qplatformintegration_qpa.h
+++ b/src/gui/kernel/qplatformintegration_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMINTEGRATION_H
#define QPLATFORMINTEGRATION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qwindowdefs.h>
#include <QtGui/qplatformscreen_qpa.h>
#include <QtGui/qsurfaceformat.h>
diff --git a/src/gui/kernel/qplatformnativeinterface_qpa.cpp b/src/gui/kernel/qplatformnativeinterface_qpa.cpp
index 48e43f5226..c17eee4415 100644
--- a/src/gui/kernel/qplatformnativeinterface_qpa.cpp
+++ b/src/gui/kernel/qplatformnativeinterface_qpa.cpp
@@ -43,6 +43,17 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformNativeInterface
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformNativeInterface class provides an abstraction for retrieving native
+ resource handles.
+ */
+
void *QPlatformNativeInterface::nativeResourceForIntegration(const QByteArray &resource)
{
Q_UNUSED(resource);
@@ -69,6 +80,30 @@ void * QPlatformNativeInterface::nativeResourceForBackingStore(const QByteArray
return 0;
}
+QPlatformNativeInterface::NativeResourceForIntegrationFunction QPlatformNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
+{
+ Q_UNUSED(resource);
+ return 0;
+}
+
+QPlatformNativeInterface::NativeResourceForContextFunction QPlatformNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource)
+{
+ Q_UNUSED(resource);
+ return 0;
+}
+
+QPlatformNativeInterface::NativeResourceForWindowFunction QPlatformNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource)
+{
+ Q_UNUSED(resource);
+ return 0;
+}
+
+QPlatformNativeInterface::NativeResourceForBackingStoreFunction QPlatformNativeInterface::nativeResourceFunctionForBackingStore(const QByteArray &resource)
+{
+ Q_UNUSED(resource);
+ return 0;
+}
+
/*!
Contains generic window properties that the platform may utilize.
*/
diff --git a/src/gui/kernel/qplatformnativeinterface_qpa.h b/src/gui/kernel/qplatformnativeinterface_qpa.h
index dd1ef22354..918ba4a9b8 100644
--- a/src/gui/kernel/qplatformnativeinterface_qpa.h
+++ b/src/gui/kernel/qplatformnativeinterface_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMNATIVEINTERFACE_QPA_H
#define QPLATFORMNATIVEINTERFACE_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qwindowdefs.h>
#include <QtCore/QObject>
#include <QtCore/QVariant>
@@ -65,6 +76,15 @@ public:
virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
virtual void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore);
+ typedef void * (*NativeResourceForIntegrationFunction)();
+ typedef void * (*NativeResourceForContextFunction)(QOpenGLContext *context);
+ typedef void * (*NativeResourceForWindowFunction)(QWindow *window);
+ typedef void * (*NativeResourceForBackingStoreFunction)(QBackingStore *backingStore);
+ virtual NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource);
+ virtual NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource);
+ virtual NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource);
+ virtual NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource);
+
virtual QVariantMap windowProperties(QPlatformWindow *window) const;
virtual QVariant windowProperty(QPlatformWindow *window, const QString &name) const;
virtual QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const;
diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.h b/src/gui/kernel/qplatformopenglcontext_qpa.h
index af70368f5e..ddcb87ad5a 100644
--- a/src/gui/kernel/qplatformopenglcontext_qpa.h
+++ b/src/gui/kernel/qplatformopenglcontext_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMGLCONTEXT_H
#define QPLATFORMGLCONTEXT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#ifndef QT_NO_OPENGL
#include <QtCore/qnamespace.h>
diff --git a/src/gui/kernel/qplatformscreen_qpa.h b/src/gui/kernel/qplatformscreen_qpa.h
index b6eb91f9b2..71d734867e 100644
--- a/src/gui/kernel/qplatformscreen_qpa.h
+++ b/src/gui/kernel/qplatformscreen_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMSCREEN_H
#define QPLATFORMSCREEN_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qmetatype.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qcoreevent.h>
diff --git a/src/gui/kernel/qplatformscreenpageflipper_qpa.cpp b/src/gui/kernel/qplatformscreenpageflipper_qpa.cpp
index d652e34e5e..b912c6055e 100644
--- a/src/gui/kernel/qplatformscreenpageflipper_qpa.cpp
+++ b/src/gui/kernel/qplatformscreenpageflipper_qpa.cpp
@@ -43,6 +43,15 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformScreenBuffer
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformScreenBuffer class provides an abstraction for screen buffers.
+ */
QPlatformScreenBuffer::QPlatformScreenBuffer()
: m_destroyed(false)
, m_ready(true)
@@ -73,6 +82,18 @@ void QPlatformScreenBuffer::displayed()
{
}
+
+/*!
+ \class QPlatformScreenPageFlipper
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformScreenPageFlipper class provides an abstraction for flipping the screen
+ page.
+ */
+
QPlatformScreenPageFlipper::QPlatformScreenPageFlipper(QObject *parent)
:QObject(parent)
{
diff --git a/src/gui/kernel/qplatformscreenpageflipper_qpa.h b/src/gui/kernel/qplatformscreenpageflipper_qpa.h
index 850f9d8d2f..116d2dbf82 100644
--- a/src/gui/kernel/qplatformscreenpageflipper_qpa.h
+++ b/src/gui/kernel/qplatformscreenpageflipper_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMSCREENPAGEFLIPPER_QPA_H
#define QPLATFORMSCREENPAGEFLIPPER_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
QT_BEGIN_HEADER
diff --git a/src/gui/kernel/qplatformservices_qpa.h b/src/gui/kernel/qplatformservices_qpa.h
index aff2e5d6fe..c9bfe020ab 100644
--- a/src/gui/kernel/qplatformservices_qpa.h
+++ b/src/gui/kernel/qplatformservices_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMSERVICES_QPA_H
#define QPLATFORMSERVICES_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QtGlobal>
QT_BEGIN_HEADER
diff --git a/src/gui/kernel/qplatformsharedgraphicscache_qpa.h b/src/gui/kernel/qplatformsharedgraphicscache_qpa.h
index 8a92dbdd31..679b8ab7de 100644
--- a/src/gui/kernel/qplatformsharedgraphicscache_qpa.h
+++ b/src/gui/kernel/qplatformsharedgraphicscache_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMSHAREDGRAPHICSCACHE_QPA_H
#define QPLATFORMSHAREDGRAPHICSCACHE_QPA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qobject.h>
#include <QtGui/qimage.h>
diff --git a/src/gui/kernel/qplatformsurface_qpa.cpp b/src/gui/kernel/qplatformsurface_qpa.cpp
index 6d3b6503d7..1f752fe3e2 100644
--- a/src/gui/kernel/qplatformsurface_qpa.cpp
+++ b/src/gui/kernel/qplatformsurface_qpa.cpp
@@ -43,6 +43,15 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformSurface
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformSurface class provides an abstraction for a surface.
+ */
QPlatformSurface::~QPlatformSurface()
{
diff --git a/src/gui/kernel/qplatformsurface_qpa.h b/src/gui/kernel/qplatformsurface_qpa.h
index 80ee99c899..f64a697fc5 100644
--- a/src/gui/kernel/qplatformsurface_qpa.h
+++ b/src/gui/kernel/qplatformsurface_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMSURFACE_H
#define QPLATFORMSURFACE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qnamespace.h>
#include <QtGui/qsurface.h>
#include <QtGui/qsurfaceformat.h>
diff --git a/src/gui/kernel/qplatformtheme_qpa.h b/src/gui/kernel/qplatformtheme_qpa.h
index 6ac6a0f573..8d936e8267 100644
--- a/src/gui/kernel/qplatformtheme_qpa.h
+++ b/src/gui/kernel/qplatformtheme_qpa.h
@@ -42,6 +42,17 @@
#ifndef QPLATFORMTHEME_H
#define QPLATFORMTHEME_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QtGlobal>
QT_BEGIN_HEADER
diff --git a/src/gui/kernel/qplatformthemeplugin_qpa.cpp b/src/gui/kernel/qplatformthemeplugin_qpa.cpp
index 8383c9b948..da2743d6e3 100644
--- a/src/gui/kernel/qplatformthemeplugin_qpa.cpp
+++ b/src/gui/kernel/qplatformthemeplugin_qpa.cpp
@@ -43,6 +43,15 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformThemePlugin
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+
+ \brief The QPlatformScreen class provides an abstraction for theme plugins.
+ */
QPlatformThemePlugin::QPlatformThemePlugin(QObject *parent)
: QObject(parent)
{
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index a9dfbba788..b507eb4fdd 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -147,6 +147,7 @@ QMargins QPlatformWindow::frameMargins() const
*/
void QPlatformWindow::setVisible(bool visible)
{
+ Q_UNUSED(visible);
QRect rect(QPoint(), geometry().size());
QWindowSystemInterface::handleSynchronousExposeEvent(window(), rect);
}
@@ -313,6 +314,29 @@ bool QPlatformWindow::setMouseGrabEnabled(bool grab)
}
/*!
+ Reimplement to be able to let Qt indicate that the window has been
+ modified. Return true if the native window supports setting the modified
+ flag, false otherwise.
+*/
+bool QPlatformWindow::setWindowModified(bool modified)
+{
+ Q_UNUSED(modified);
+ return false;
+}
+
+/*!
+ Reimplement this method to be able to do any platform specific event
+ handling. All events for window() are passed to this function before being
+ sent to QWindow::event().
+
+ The default implementation is empty and does nothing with \a event.
+*/
+void QPlatformWindow::windowEvent(QEvent *event)
+{
+ Q_UNUSED(event);
+}
+
+/*!
\class QPlatformWindow
\since 4.8
\internal
diff --git a/src/gui/kernel/qplatformwindow_qpa.h b/src/gui/kernel/qplatformwindow_qpa.h
index a72de7b547..729f35e025 100644
--- a/src/gui/kernel/qplatformwindow_qpa.h
+++ b/src/gui/kernel/qplatformwindow_qpa.h
@@ -41,6 +41,17 @@
#ifndef QPLATFORMWINDOW_H
#define QPLATFORMWINDOW_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qscopedpointer.h>
#include <QtCore/qrect.h>
#include <QtCore/qmargins.h>
@@ -102,6 +113,10 @@ public:
virtual bool setKeyboardGrabEnabled(bool grab);
virtual bool setMouseGrabEnabled(bool grab);
+ virtual bool setWindowModified(bool modified);
+
+ virtual void windowEvent(QEvent *event);
+
protected:
QScopedPointer<QPlatformWindowPrivate> d_ptr;
private: