summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qaction.cpp5
-rw-r--r--src/gui/kernel/qapplication_x11.cpp12
-rw-r--r--src/gui/kernel/qwidget_wince.cpp2
3 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 00cba04..f5e1f29 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -262,6 +262,11 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
\c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}).
\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.
+
+ Setting this value only has effect on items that are in the immediate menus
+ of the menubar, not the submenus of those menus. For example, if you have
+ File menu in your menubar and the File menu has a submenu, setting the
+ MenuRole for the actions in that submenu have no effect. They will never be moved.
*/
/*!
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 0d07a02..170224d 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1915,9 +1915,12 @@ void qt_init(QApplicationPrivate *priv, int,
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000
- && defaultVisual->green_mask == 0xff00
- && defaultVisual->blue_mask == 0xff);
+ X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000
+ || defaultVisual->red_mask == 0xf800)
+ && (defaultVisual->green_mask == 0xff00
+ || defaultVisual->green_mask == 0x7e0)
+ && (defaultVisual->blue_mask == 0xff
+ || defaultVisual->blue_mask == 0x1f));
}
}
#endif // QT_NO_MITSHM
@@ -5401,7 +5404,8 @@ class QSessionManagerPrivate : public QObjectPrivate
{
public:
QSessionManagerPrivate(QSessionManager* mgr, QString& id, QString& key)
- : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key), eventLoop(0) {}
+ : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key),
+ restartHint(QSessionManager::RestartIfRunning), eventLoop(0) {}
QSessionManager* sm;
QStringList restartCommand;
QStringList discardCommand;
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index bcc9cfd..fa71925 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -316,7 +316,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (desktop) {
q->setAttribute(Qt::WA_WState_Visible);
- } else if (topLevel) {
+ } else if (topLevel && !q->testAttribute(Qt::WA_DontShowOnScreen)) {
RECT cr;
GetClientRect(id, &cr);
// one cannot trust cr.left and cr.top, use a correction POINT instead