summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qaction.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp15
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp6
-rw-r--r--src/widgets/kernel/qwindowcontainer_p.h3
5 files changed, 21 insertions, 7 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 3e76699aca..c0e3e98ae1 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -270,7 +270,7 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
\value AboutQtRole This action matches handles the "About Qt" menu item.
\value AboutRole This action should be placed where the "About" menu item is in the application menu. The text of
the menu item will be set to "About <application name>". The application name is fetched from the
- \c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}).
+ \c{Info.plist} file in the application's bundle (See \l{Qt for Mac OS X - Deployment}).
\value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu.
\value QuitRole This action should be placed where the Quit menu item is in the application menu.
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index dbeaef5bee..def3589d9a 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -7004,7 +7004,7 @@ void QWidget::setUpdatesEnabled(bool enable)
depending on the platform's default behavior for the window flags.
\sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(),
- showNormal(), isVisible(), windowFlags(), flags()
+ showNormal(), isVisible(), windowFlags()
*/
void QWidget::show()
{
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 0fd794cc02..0a4bc990e6 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -768,7 +768,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
}
}
- if (isMove) {
+ // generate a move event for QWidgets without window handles. QWidgets with native
+ // window handles already receive a move event from
+ // QGuiApplicationPrivate::processGeometryChangeEvent.
+ if (isMove && (!q->windowHandle() || q->testAttribute(Qt::WA_DontShowOnScreen))) {
QMoveEvent e(q->pos(), oldPos);
QApplication::sendEvent(q, &e);
}
@@ -876,9 +879,15 @@ int QWidget::metric(PaintDeviceMetric m) const
}
/*!
- \preliminary
+ If this is a native widget, return the associated QWindow.
+ Otherwise return null.
- Returns the QPlatformWindow this widget will be drawn into.
+ Native widgets include toplevel widgets, QGLWidget, and child widgets
+ on which winId() was called.
+
+ \since 5.0
+
+ \sa winId()
*/
QWindow *QWidget::windowHandle() const
{
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index 399f089e0f..a4b3caf78d 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -200,7 +200,11 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt:
connect(QGuiApplication::instance(), SIGNAL(focusWindowChanged(QWindow *)), this, SLOT(focusWindowChanged(QWindow *)));
}
-
+QWindow *QWindowContainer::containedWindow() const
+{
+ Q_D(const QWindowContainer);
+ return d->window;
+}
/*!
\internal
diff --git a/src/widgets/kernel/qwindowcontainer_p.h b/src/widgets/kernel/qwindowcontainer_p.h
index a21f9bd35a..014b163f97 100644
--- a/src/widgets/kernel/qwindowcontainer_p.h
+++ b/src/widgets/kernel/qwindowcontainer_p.h
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
class QWindowContainerPrivate;
-class QWindowContainer : public QWidget
+class Q_WIDGETS_EXPORT QWindowContainer : public QWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWindowContainer)
@@ -56,6 +56,7 @@ class QWindowContainer : public QWidget
public:
explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = 0, Qt::WindowFlags f = 0);
~QWindowContainer();
+ QWindow *containedWindow() const;
static void toplevelAboutToBeDestroyed(QWidget *parent);
static void parentWasChanged(QWidget *parent);