summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 15:21:33 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 15:21:33 (GMT)
commitaa59008b92d4d1eb5b45352cac3408cc39086dba (patch)
tree13d3014d707b86e293726fd38d0e75d1354f378e /src/gui/kernel
parente0463464773f5eb2bda98a467a9c91092a1f1964 (diff)
parentcd796aa6dcdf83fa50ced56a9885835fda851a09 (diff)
downloadQt-aa59008b92d4d1eb5b45352cac3408cc39086dba.zip
Qt-aa59008b92d4d1eb5b45352cac3408cc39086dba.tar.gz
Qt-aa59008b92d4d1eb5b45352cac3408cc39086dba.tar.bz2
Merge commit 'origin/4.5'
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qaction.cpp4
-rw-r--r--src/gui/kernel/qwidget_mac.mm19
2 files changed, 20 insertions, 3 deletions
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 59b00b8..4ee17f4 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -256,7 +256,9 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
as described in the QMenuBar documentation.
\value ApplicationSpecificRole This action should be put in the application menu with an application specific role
\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.
+ \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}).
\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/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 6d0b01e..250cc35 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2690,10 +2690,15 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
createWinId();
if (q->isWindow()) {
#ifndef QT_MAC_USE_COCOA
- if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
- mwl->updateHIToolBarStatus();
+ // We do this down below for wasCreated, so avoid doing this twice
+ // (only for performance, it gets called a lot anyway).
+ if (!wasCreated) {
+ if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
+ mwl->updateHIToolBarStatus();
+ }
}
#else
+ // Simply transfer our toolbar over. Everything should stay put, unlike in Carbon.
if (oldToolbar && !(f & Qt::FramelessWindowHint)) {
OSWindowRef newWindow = qt_mac_window_for(q);
[newWindow setToolbar:oldToolbar];
@@ -2708,6 +2713,16 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
if (wasCreated) {
transferChildren();
+#ifndef QT_MAC_USE_COCOA
+ // If we were a unified window, We just transfered our toolbars out of the unified toolbar.
+ // So redo the status one more time. It apparently is not an issue with Cocoa.
+ if (q->isWindow()) {
+ if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) {
+ mwl->updateHIToolBarStatus();
+ }
+ }
+#endif
+
if (topData &&
(!topData->caption.isEmpty() || !topData->filePath.isEmpty()))
setWindowTitle_helper(q->windowTitle());