summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-02 15:57:44 +0100
commitd3e6e732c70ebc2340d6376d727b3c623be23810 (patch)
tree18d469f02ac36edd04b87a9bfa4886ceef0490f0 /src/widgets/kernel
parentfdfd63053ae6b10af06553be3c1b15de274bebf7 (diff)
parentba8d3430029d8c4342e9a47c110ee8c9879818f4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qaction.cpp27
-rw-r--r--src/widgets/kernel/qaction.h4
-rw-r--r--src/widgets/kernel/qdesktopwidget.qdoc5
-rw-r--r--src/widgets/kernel/qshortcut.cpp2
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp11
5 files changed, 40 insertions, 9 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index dbec689efa..72d6fffefd 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -45,10 +45,10 @@
#include "qapplication.h"
#include "qevent.h"
#include "qlist.h"
-#include "qdebug.h"
#include <private/qshortcutmap_p.h>
#include <private/qapplication_p.h>
#include <private/qmenu_p.h>
+#include <private/qdebug_p.h>
#define QAPP_CHECK(functionName) \
if (Q_UNLIKELY(!qApp)) { \
@@ -1302,6 +1302,31 @@ bool QAction::isIconVisibleInMenu() const
return d->iconVisibleInMenu;
}
+#ifndef QT_NO_DEBUG_STREAM
+Q_WIDGETS_EXPORT QDebug operator<<(QDebug d, const QAction *action)
+{
+ QDebugStateSaver saver(d);
+ d.nospace();
+ d << "QAction(" << static_cast<const void *>(action);
+ if (action) {
+ d << " text=" << action->text();
+ if (!action->toolTip().isEmpty())
+ d << " toolTip=" << action->toolTip();
+ if (action->isCheckable())
+ d << " checked=" << action->isChecked();
+ if (!action->shortcut().isEmpty())
+ d << " shortcut=" << action->shortcut();
+ d << " menuRole=";
+ QtDebugUtils::formatQEnum(d, action->menuRole());
+ d << " visible=" << action->isVisible();
+ } else {
+ d << '0';
+ }
+ d << ')';
+ return d;
+}
+#endif // QT_NO_DEBUG_STREAM
+
QT_END_NAMESPACE
#include "moc_qaction.cpp"
diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
index 6caf37c80f..abfa2cdd42 100644
--- a/src/widgets/kernel/qaction.h
+++ b/src/widgets/kernel/qaction.h
@@ -209,6 +209,10 @@ private:
#endif
};
+#ifndef QT_NO_DEBUG_STREAM
+Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QAction *);
+#endif
+
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtWidgets/qactiongroup.h>
QT_END_INCLUDE_NAMESPACE
diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc
index d1a6ecabd6..abdbd35f5b 100644
--- a/src/widgets/kernel/qdesktopwidget.qdoc
+++ b/src/widgets/kernel/qdesktopwidget.qdoc
@@ -238,11 +238,6 @@
\property QDesktopWidget::screenCount
\brief the number of screens currently available on the system.
- Note that on some platforms, screenCount will be zero if there are actually
- no screens connected. Applications which were running at the time the
- screenCount went to zero will stop rendering graphics until one or more
- screens are restored.
-
\since 4.6
*/
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 55f733045e..77efaf1632 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -335,7 +335,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
shown and the character will be underlined. On Windows, shortcuts
are normally not displayed until the user presses the \uicontrol Alt
key, but this is a setting the user can change. On Mac, shortcuts
- are disabled by default. Call qt_set_sequence_auto_mnemonic() to
+ are disabled by default. Call \l qt_set_sequence_auto_mnemonic() to
enable them. However, because mnemonic shortcuts do not fit in
with Aqua's guidelines, Qt will not show the shortcut character
underlined.
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index dab49f2f11..462a41ce5d 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -90,6 +90,11 @@ public:
if (usesNativeWidgets || window->parent() == 0)
return;
Q_Q(QWindowContainer);
+ if (q->internalWinId()) {
+ // Allow use native widgets if the window container is already a native widget
+ usesNativeWidgets = true;
+ return;
+ }
QWidget *p = q->parentWidget();
while (p) {
if (
@@ -153,8 +158,10 @@ public:
as a child of a QAbstractScrollArea or QMdiArea, it will
create a \l {Native Widgets vs Alien Widgets} {native window} for
every widget in its parent chain to allow for proper stacking and
- clipping in this use case. Applications with many native child
- windows may suffer from performance issues.
+ clipping in this use case. Creating a native window for the window
+ container also allows for proper stacking and clipping. This must
+ be done before showing the window container. Applications with
+ many native child windows may suffer from performance issues.
The window container has a number of known limitations: