From fc4c398e323a501331afe13e6bf2a15dd8003cef Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 23 Apr 2010 10:12:49 +0200 Subject: Cocoa: quiting the app from the menubar may cause a crash This happends if the app creates a menubar and assignes an action to quit, and the delete the menubar. Under some circumstances the action is not removed from the quit item, and a crash might occur. This patch clears the quit action from the menubar for this condition Reviewed-by: prasanth --- src/gui/widgets/qmenu_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 7645c23..e8400d6 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1831,7 +1831,7 @@ void QMenuBarPrivate::macDestroyMenuBar() menubars()->remove(tlw); mac_menubar = 0; - if (qt_mac_current_menubar.qmenubar == q) { + if (!qt_mac_current_menubar.qmenubar || qt_mac_current_menubar.qmenubar == q) { #ifdef QT_MAC_USE_COCOA QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); [loader removeActionsFromAppMenu]; -- cgit v0.12 From e30e3bb524536ef0f6b55272901b24bbbd4dfbd6 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Fri, 23 Apr 2010 10:31:39 +0200 Subject: Diacritic input broken, duplicate the base glypha (on Mac OS X carbon) This was a regression introduced by 8da880e77db04c. The saved key event needs to be cleared if we process a valid raw key event. Task-number: QTBUG-7099 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qkeymapper_mac.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp index f259654..a7145d4 100644 --- a/src/gui/kernel/qkeymapper_mac.cpp +++ b/src/gui/kernel/qkeymapper_mac.cpp @@ -756,14 +756,23 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e return true; } - if (qApp->inputContext() && qApp->inputContext()->isComposing()) { + QInputContext *currentContext = qApp->inputContext(); + if (currentContext && currentContext->isComposing()) { if (ekind == kEventRawKeyDown) { - QMacInputContext *context = qobject_cast(qApp->inputContext()); + QMacInputContext *context = qobject_cast(currentContext); if (context) context->setLastKeydownEvent(event); } return false; } + // Once we process the key down , we dont need to send the saved event again from + // kEventTextInputUnicodeForKeyEvent, so clear it. + if (currentContext && ekind == kEventRawKeyDown) { + QMacInputContext *context = qobject_cast(currentContext); + if (context) + context->setLastKeydownEvent(0); + } + //get modifiers Qt::KeyboardModifiers modifiers; int qtKey; -- cgit v0.12 From f353a5d9acde9a0234cbba547317f8014e004027 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 23 Apr 2010 13:08:39 +0200 Subject: qdoc: Removed nested
    elements from the TOC Moved the class="leveli" into the
  • elements. --- tools/qdoc3/htmlgenerator.cpp | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index bf2f724..5c33b70 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1923,18 +1923,30 @@ void HtmlGenerator::generateTableOfContents(const Node *node, inLink = true; out() << "
    \n"; - out() << "

    Table of Contents

    \n"; + out() << "

    Contents

    \n"; sectionNumber.append("1"); - out() << "
      \n"; + out() << "
        \n"; if (node->subType() == Node::Module) { if (moduleNamespaceMap.contains(node->name())) { - out() << "
      • Namespaces
      • \n"; + out() << "
      • Namespaces
      • \n"; } if (moduleClassMap.contains(node->name())) { - out() << "
      • Classes
      • \n"; - } - out() << "
      • Detailed Description
      • \n"; + out() << "
      • Classes
      • \n"; + } + out() << "
      • Detailed Description
      • \n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1946,14 +1958,20 @@ void HtmlGenerator::generateTableOfContents(const Node *node, QList
        ::ConstIterator s = sections->begin(); while (s != sections->end()) { if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { - out() << "
      • " << (*s).name << "
      • \n"; } ++s; } - out() << "
      • Detailed Description
      • \n"; + out() << "
      • Detailed Description
      • \n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1968,12 +1986,10 @@ void HtmlGenerator::generateTableOfContents(const Node *node, if (sectionNumber.size() < nextLevel) { do { sectionNumber.append("1"); - out() << "
          \n"; } while (sectionNumber.size() < nextLevel); } else { while (sectionNumber.size() > nextLevel) { - out() << "
        \n"; sectionNumber.removeLast(); } sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); @@ -1981,19 +1997,20 @@ void HtmlGenerator::generateTableOfContents(const Node *node, int numAtoms; Text headingText = Text::sectionHeading(atom); QString s = headingText.toString(); - out() << "
      • "; + out() << "
      • "; out() << ""; generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms); out() << "
      • \n"; } while (!sectionNumber.isEmpty()) { - out() << "
      \n"; sectionNumber.removeLast(); } + out() << "
    \n"; out() << "
    \n"; inContents = false; inLink = false; -- cgit v0.12