summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qaction.cpp4
-rw-r--r--src/gui/kernel/qwidget_mac.mm19
-rw-r--r--src/gui/widgets/qmenubar.cpp5
-rw-r--r--src/gui/widgets/qplaintextedit.cpp14
-rw-r--r--src/network/socket/qlocalserver_tcp.cpp2
5 files changed, 31 insertions, 13 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());
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index f4288ac..e1d41de 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -670,8 +670,9 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\header \i String matches \i Placement \i Notes
\row \i about.*
\i Application Menu | About <application name>
- \i If this entry is not found no About item will appear in
- the Application Menu
+ \i The application name is fetched from the \c {Info.plist} file
+ (see note below). If this entry is not found no About item
+ will appear in the Application Menu.
\row \i config, options, setup, settings or preferences
\i Application Menu | Preferences
\i If this entry is not found the Settings item will be disabled
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 4977b31..bab6b89 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1014,14 +1014,13 @@ void QPlainTextEditPrivate::ensureViewportLayouted()
QPlainText uses very much the same technology and concepts as
QTextEdit, but is optimized for plain text handling.
- QPlainTextEdit works on paragraphs and characters. A paragraph is a
- formatted string which is word-wrapped to fit into the width of
+ QPlainTextEdit works on paragraphs and characters. A paragraph is
+ a formatted string which is word-wrapped to fit into the width of
the widget. By default when reading plain text, one newline
signifies a paragraph. A document consists of zero or more
- paragraphs. The words in the paragraph are aligned in accordance
- with the paragraph's alignment. Paragraphs are separated by hard
- line breaks. Each character within a paragraph has its own
- attributes, for example, font and color.
+ paragraphs. Paragraphs are separated by hard line breaks. Each
+ character within a paragraph has its own attributes, for example,
+ font and color.
The shape of the mouse cursor on a QPlainTextEdit is
Qt::IBeamCursor by default. It can be changed through the
@@ -1162,7 +1161,8 @@ void QPlainTextEditPrivate::ensureViewportLayouted()
\sa QTextDocument, QTextCursor, {Application Example},
- {Syntax Highlighter Example}, {Rich Text Processing}
+ {Code Editor Example}, {Syntax Highlighter Example},
+ {Rich Text Processing}
*/
diff --git a/src/network/socket/qlocalserver_tcp.cpp b/src/network/socket/qlocalserver_tcp.cpp
index b248f2f..bcf822e 100644
--- a/src/network/socket/qlocalserver_tcp.cpp
+++ b/src/network/socket/qlocalserver_tcp.cpp
@@ -92,7 +92,7 @@ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
{
if (pendingConnections.isEmpty())
tcpServer.waitForNewConnection(msec, timedOut);
- else
+ else if (timedOut)
*timedOut = false;
}