From 1ea0e706981006c48ad16a1ff8051df03610f20b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 16 May 2011 11:28:00 +0200 Subject: qdoc: Fixed QTBUG-19338 --- tools/qdoc3/ditaxmlgenerator.cpp | 5 ++++- tools/qdoc3/generator.cpp | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 342bb90..c45648b 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1199,7 +1199,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, Just output the href as if the image is in the images directory... */ - fileName = QLatin1String("images/") + protectEnc(atom->string()); + if (atom->string()[0] == '/') + fileName = QLatin1String("images") + atom->string(); + else + fileName = QLatin1String("images/") + atom->string(); } if (currentTag() != DT_xref) diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index f05c030..81aba6b 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -783,10 +783,13 @@ QString Generator::imageFileName(const Node *relative, const QString& fileBase) if (filePath.isEmpty()) return QString(); - return QLatin1String("images/") - + Config::copyFile(relative->doc().location(), - filePath, userFriendlyFilePath, - outputDir() + QLatin1String("/images")); + QString path = Config::copyFile(relative->doc().location(), + filePath, + userFriendlyFilePath, + outputDir() + QLatin1String("/images")); + if (path[0] != '/') + return QLatin1String("images/") + path; + return QLatin1String("images") + path; } void Generator::setImageFileExtensions(const QStringList& extensions) -- cgit v0.12 From 1bd6f1bd280ee6e1ecd4de2291c8ccfb4d06b7a4 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 16 Jun 2011 16:10:38 +0200 Subject: Doc: Removed non-ASCII characters from the documentation. --- doc/src/platforms/supported-platforms.qdoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 9d47695..ba59c37 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -334,8 +334,8 @@ \section2 Advanced Text Layout Engine - Qt for Windows CE supports TrueType® and raster fonts. Qt also has - extended Unicode support and right-to-left languages. Qt’s rich text + Qt for Windows CE supports TrueType and raster fonts. Qt also has + extended Unicode support and right-to-left languages. Qt's rich text engine adds capabilities for complex text layouts including tables, path tracing and text which flows around shapes. @@ -373,7 +373,7 @@ by embedded Linux. You can use Qt to create highly memory efficient devices and applications that have completely unique user experiences. - Qt runs anywhere Linux runs. Qt’s intuitive API means fewer lines of + Qt runs anywhere Linux runs. Qt's intuitive API means fewer lines of code and higher level functionality in less time. Use the code from one single code-base and rebuild for all \l{Supported Platforms} {supported platforms}. @@ -410,7 +410,7 @@ frame buffer} that will match the physical device display, pixel for pixel. This gives the developer a realistic testing infrastructure testing on the desktop where the frame buffer simulates the physical - device display’s width, height and color depth. + device display's width, height and color depth. \section2 Inter-Process Communication (IPC) @@ -421,7 +421,7 @@ \section2 Extended Font Format Qt supports a wide range of font formats on embedded Linux including: - TrueType®, Postscript® Type1 and Qt pre-rendered fonts. Qt has + TrueType, Postscript Type1 and Qt pre-rendered fonts. Qt has extended Unicode support including automatic data extraction at build time and automatic update at runtime. @@ -681,7 +681,7 @@ \group platform-details Qt is a cross-platform application and UI framework. Using Qt, - you can write web-enabled applications once and deploy them + you can write GUI applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code. -- cgit v0.12 From 26c29a2dd7efa4c66063d1255e1f694462cbae85 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 16 Jun 2011 20:20:50 +0200 Subject: Doc: Added more appropriate links to help reduce confusion. Task-number: QTBUG-19919 --- src/gui/widgets/qtextedit.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 6757d77..b6661c9 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -2472,6 +2472,8 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options) and the text edit will try to guess the right format. Use setHtml() or setPlainText() directly to avoid text edit's guessing. + + \sa toPlainText(), toHtml() */ void QTextEdit::setText(const QString &text) { -- cgit v0.12 From 9ed61311bce15b8f1bb4b30ee9133f1a2355f41d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 16 Jun 2011 20:24:11 +0200 Subject: Doc: Added a simple introduction to Qt and fixed links. --- doc/src/declarative/declarativeui.qdoc | 2 +- doc/src/declarative/qtquick-intro.qdoc | 2 +- doc/src/index.qdoc | 4 +- doc/src/qt-features.qdoc | 204 +++++++++++++++++++++++++++++++++ doc/src/qt4-intro.qdoc | 2 +- 5 files changed, 209 insertions(+), 5 deletions(-) create mode 100644 doc/src/qt-features.qdoc diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 56ab29f..d1d82d8 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -46,7 +46,7 @@ Qt applications. \section1 Getting Started \list -\o \l{Intro to Qt Quick}{Introduction to Qt Quick} +\o \l{Introduction to Qt Quick} \o \l{QML for Qt Programmers}{QML Programming for Qt Programmers} \o \l{Getting Started Programming with QML} diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc index bdad2c3..4cd5db3 100644 --- a/doc/src/declarative/qtquick-intro.qdoc +++ b/doc/src/declarative/qtquick-intro.qdoc @@ -27,7 +27,7 @@ /*! \page qml-intro.html -\title Intro to Qt Quick +\title Introduction to Qt Quick Qt Quick is a collection of technologies that are designed to help developers create the kind of intuitive, modern, and fluid user interfaces that are diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 979c654..2ce6781 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -36,8 +36,8 @@ What is Qt \enddiv \list - \o \l{Qt Whitepaper}{Qt C++ Framework} - \o \l{Intro to Qt Quick}{Qt Quick} + \o \l{Qt Features Overview} + \o \l{Introduction to Qt Quick}{Qt Quick} \o \l{external: Qt Mobility Manual}{Qt Mobility} \o \l{Qt WebKit} \endlist diff --git a/doc/src/qt-features.qdoc b/doc/src/qt-features.qdoc new file mode 100644 index 0000000..0ae00b0 --- /dev/null +++ b/doc/src/qt-features.qdoc @@ -0,0 +1,204 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qt-overview.html + \title Qt Features Overview + + This document provides a summary of the most important features of Qt, + providing links to other pages in the documentation that cover these + features in more detail. It is not intended to be a comprehensive + guide to Qt's features. + + \section1 Fundamental Technologies in Qt + + Qt is built upon a set of core technologies, provided by the \l QtCore + and \l QtGui modules. These include the following: + + \list + \o \l{The Tulip Container Classes}, a set of template container classes. + \o \l{The Arthur Paint System}, the Qt 4 painting framework. + \o \l{The Interview Framework}, a model/view architecture for item views + and the \l{QtSQL Module}, which also uses this architecture. + \o \l{The Scribe Classes}, a framework for creating text documents, + performing low-level text layout and writing OpenDocument files. + \o A collection of \l{Qt Widget Gallery}{common desktop widgets}, styled + to fit in on each supported platform. + \o \l{The Qt 4 Main Window Classes}, a main window, toolbar, menu, and + docking architecture. + \o The \l{Graphics View} framework provides a canvas for producing + interactive graphics. + \o The \l{QtNetwork Module} provides support for TCP, UDP and local + sockets that are integrated with Qt's event model, including support + for Secure Socket Layer (SSL) communications, + \l{QNetworkProxy}{network proxy} servers and + \l{Bearer Management}{network bearer management}. + \o Enhanced \l{qt4-threads.html}{thread support} allows + \l{Signals & Slots}{signal-slot} connections across threads and + per-thread event loops. + Additionally, \l{Thread Support in Qt}{a framework for concurrent programming} + using Qt paradigms makes common threading tasks easier. + \o A \l{resource system} for embedding images and other resource files + into executable files makes it easier to deploy applications. + \o A \l{QTestLib Manual}{unit testing framework} for Qt applications and + libraries. + \endlist + + The mature classes provided by these technologies have been used to build + robust, cross-platform desktop applications. They are augmented by a number + of additional technologies and improvements that have appeared over the + lifetime of Qt 4. + + \section1 Graphical User Interfaces + + \div{class="float-right"} + \inlineimage gtk-tabwidget.png + \enddiv + \div{class="float-right"} + \inlineimage gtk-progressbar.png + \br + \inlineimage gtk-checkbox.png + \br + \inlineimage plastique-combobox.png + \br + \inlineimage plastique-radiobutton.png + \enddiv + + Alongside the support for traditional desktop user interfaces, Qt includes + support for declarative UI development with \l{Qt Quick}, a set of + technologies for creating fluid, dynamic user interfaces. A starting point + for exploring this approach can be found in the \l{Introduction to Qt Quick} + guide. + + Qt provides a range of standard user interface elements, called widgets, + for each supported platform. Widgets can be used as containers for other + widgets, as windows, and as regular controls that the user interacts with. + Where the platform supports it, widgets can be made to appear partially + transparent, and may be styled with \l{Qt Style Sheets}. + + Support for \l{QTouchEvent}{touch input} and \l{Gestures Programming}{gestures} + enable widgets to be used to create intuitive user interfaces for + touch-enabled devices. + + User interfaces can also be created dynamically at run-time with the + features provided by the \l{QtUiTools} module. + + A selection of available widgets are shown in the \l{Qt Widget Gallery}. + An introduction to the concepts behind widgets can be found in the + \l{Widgets Tutorial}. + + \clearfloat + \section1 Painting, Printing and Rendering + + \div{class="float-left"} + \inlineimage qpainter-affinetransformations.png + \enddiv + + Widgets are just one of many kinds of paint device that Qt can render onto. + This support for unified painting makes it possible for applications to use + the same painting code for different tasks, as well as allowing Qt to be + extended to support additional file formats. + + Qt provides support for common bitmap image formats, + \l{QtSvg Module}{Scalable Vector Graphics} (SVG) drawings and animations, + Postscript and Portable Document Format (PDF) files. Postscript and PDF are + integrated with \l{Printing with Qt}{Qt's printing system}, which also + allows printed output to be previewed. + + Interactive graphics can be created with the + \l{The Animation Framework}{animation framework}, allowing animations to be + used with both widgets and graphics items. Animations can be used with the + \l{The State Machine Framework}{state machine framework}, which provides a + way to express application logic and integrate it with the user interface. + Animations can be enhanced with a collection of + \l{QGraphicsEffect}{graphics effects} that operate on graphics items and + can be applied individually or combined to create more complex effects. + + Qt supports integration with \l{QtOpenGL}{OpenGL} on a number of levels, + providing convenience functions for handling textures and colors, as well + as providing support for pixel and sample buffers. Future support for + higher level 3D integration is provided by Qt3D enablers which include + \l{QMatrix4x4}{matrix multiplication}, \l{QQuaternion}{quaternions}, and an + API for \l{QGLShader}{vertex and fragment shaders}. + + Two APIs are provided for multimedia. The + \l{Phonon Overview}{Phonon Multimedia Framework} has traditionally been + used on desktop platforms. A set of + \l{QtMultimedia Module}{multimedia services} provides low-level access to + the system's audio system and is often used on mobile devices. + + \clearfloat + \section1 Infrastructure + + \div{class="float-right"} + \inlineimage qtscript-context2d.png + \enddiv + + Facilities for Inter-Process Communication (IPC) and Remote Procedure + Calling (RPC) mechanisms are available on platforms that support the + \l{intro-to-dbus.html}{D-Bus} message bus system. + + An \l{Undo Framework}{Undo framework} based on the + \l{Books about GUI Design#Design Patterns}{Command pattern} is designed to + enable a consistent approach to handling data in editing applications. + + The \l{QtScript} and \l{QtScriptTools} modules provide support for + application scripting and debugging using the ECMAScript language. + + The \l{QtHelp Module} provides the foundations of an interactive help + system that can be used in conjunction with Qt Creator or integrated into + applications directly. + + XML handling is supported in a number of places in Qt. The \l QtCore module + provides classes for reading and writing XML streams. The \l QtXmlPatterns + module includes XQuery, XPath and XSLT support, providing facilities for + XML processing beyond that supported by the QtXml module, which contains + SAX and DOM parsers. XML schema validation in the QtXmlPatterns module + covers large parts of version 1.0 of the specification. + + \clearfloat + \section1 Web Client Integration + + Integration between \l{Webkit in Qt}{Qt and WebKit} makes it possible for + developers to use a fully-featured Web browser engine to display documents + and access online services. Developers can access the browser's environment + to create documents and run scripts within one or more browser widgets. + + A \l{QWebElement}{DOM access API} for QtWebKit provides a cleaner and safer + way to access elements and structures of Web pages without the use of + JavaScript. + + \section1 Further Reading + + Many of the technologies mentioned here, as well as other, more specific + features, are listed in the \l{What's New in Qt 4} document. A complete + list of Qt's modules can be found on the \l{All Modules} page, which + also includes more domain-specific technologies. + + The tools that are supplied with Qt are covered by the listing in the + \l{Qt's Tools} document. +*/ diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 41d8b2e..d75bdca 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -132,7 +132,7 @@ In Qt 4.4: \list - \o \l{Webkit in QT}{Qt WebKit integration}, making it possible for developers + \o \l{WebKit in Qt}{Qt WebKit integration}, making it possible for developers to use a fully-featured Web browser to display documents and access online services. \o A multimedia API provided by the \l{Phonon Overview}{Phonon Multimedia Framework}. -- cgit v0.12 From 6a2f18140bbc41207eb2f5e2323b699600d89606 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 30 Jun 2011 19:08:43 +0200 Subject: Modified \since command behavior slightly to handle project and version. (The since argument can contain a project name and version, defaulting to the qdoc project if only a version number is specified.) Refactored common code into the Generator class. Fixed \sincelist HTML generation for tables containing only one item. --- tools/qdoc3/ditaxmlgenerator.cpp | 83 ----------------------- tools/qdoc3/ditaxmlgenerator.h | 11 --- tools/qdoc3/doc.cpp | 2 +- tools/qdoc3/generator.cpp | 142 +++++++++++++++++++++++++++++++++++++-- tools/qdoc3/generator.h | 12 ++++ tools/qdoc3/htmlgenerator.cpp | 103 +++++----------------------- tools/qdoc3/htmlgenerator.h | 11 --- tools/qdoc3/node.cpp | 10 +++ tools/qdoc3/node.h | 2 +- 9 files changed, 174 insertions(+), 202 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index c49ff65..64f12d6 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -62,25 +62,6 @@ QT_BEGIN_NAMESPACE #define COMMAND_VERSION Doc::alias("version") int DitaXmlGenerator::id = 0; -QString DitaXmlGenerator::sinceTitles[] = - { - " New Namespaces", - " New Classes", - " New Member Functions", - " New Functions in Namespaces", - " New Global Functions", - " New Macros", - " New Enum Types", - " New Typedefs", - " New Properties", - " New Variables", - " New QML Elements", - " New Qml Properties", - " New Qml Signals", - " New Qml Methods", - "" - }; - /* The strings in this array must appear in the same order as the values in enum DitaXmlGenerator::DitaTag. @@ -3955,70 +3936,6 @@ void DitaXmlGenerator::findAllClasses(const InnerNode* node) } } -/*! - For generating the "New Classes... in 4.x" section on the - What's New in 4.x" page. - */ -void DitaXmlGenerator::findAllSince(const InnerNode* node) -{ - NodeList::const_iterator child = node->childNodes().constBegin(); - while (child != node->childNodes().constEnd()) { - QString sinceVersion = (*child)->since(); - if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) { - NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion); - if (nsmap == newSinceMaps.end()) - nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap()); - NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); - if (ncmap == newClassMaps.end()) - ncmap = newClassMaps.insert(sinceVersion,NodeMap()); - NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); - if (nqcmap == newQmlClassMaps.end()) - nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); - - if ((*child)->type() == Node::Function) { - FunctionNode *func = static_cast(*child); - if ((func->status() > Node::Obsolete) && - (func->metaness() != FunctionNode::Ctor) && - (func->metaness() != FunctionNode::Dtor)) { - nsmap.value().insert(func->name(),(*child)); - } - } - else if ((*child)->url().isEmpty()) { - if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - nsmap.value().insert(className,(*child)); - ncmap.value().insert(className,(*child)); - } - else if ((*child)->subType() == Node::QmlClass) { - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - nsmap.value().insert(className,(*child)); - nqcmap.value().insert(className,(*child)); - } - } - else { - QString name = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - name = (*child)->parent()->name()+"::"+name; - nsmap.value().insert(name,(*child)); - } - if ((*child)->isInnerNode()) { - findAllSince(static_cast(*child)); - } - } - ++child; - } -} - void DitaXmlGenerator::findAllFunctions(const InnerNode* node) { NodeList::ConstIterator c = node->childNodes().begin(); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 408f46c..d8d3563 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -51,12 +51,6 @@ QT_BEGIN_NAMESPACE -typedef QMultiMap NodeMultiMap; -typedef QMap NewSinceMaps; -typedef QMap ParentMaps; -typedef QMap NodeMap; -typedef QMap NewClassMaps; - typedef QMap GuidMap; typedef QMap GuidMaps; @@ -418,7 +412,6 @@ class DitaXmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); - void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); virtual QString getLink(const Atom *atom, @@ -515,10 +508,6 @@ class DitaXmlGenerator : public PageGenerator #endif QMap funcIndex; QMap legaleseTexts; - NewSinceMaps newSinceMaps; - static QString sinceTitles[]; - NewClassMaps newClassMaps; - NewClassMaps newQmlClassMaps; static int id; static QString ditaTags[]; QStack xmlWriterStack; diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 479931d..37f68f8 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -828,7 +828,7 @@ void DocParser::parse(const QString& source, append(Atom::AnnotatedList, getArgument()); break; case CMD_SINCELIST: - append(Atom::SinceList, getArgument()); + append(Atom::SinceList, getRestOfLine().simplified()); break; case CMD_GENERATELIST: append(Atom::GeneratedList, getArgument()); diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 6c92e54..355c9b2 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -77,6 +77,25 @@ QString Generator::outDir; QString Generator::project; QHash Generator::outputPrefixes; +QString Generator::sinceTitles[] = + { + " New Namespaces", + " New Classes", + " New Member Functions", + " New Functions in Namespaces", + " New Global Functions", + " New Macros", + " New Enum Types", + " New Typedefs", + " New Properties", + " New Variables", + " New QML Elements", + " New QML Properties", + " New QML Signals", + " New QML Methods", + "" + }; + static void singularPlural(Text& text, const NodeList& nodes) { if (nodes.count() == 1) @@ -760,8 +779,18 @@ QString Generator::typeString(const Node *node) case Node::Class: return "class"; case Node::Fake: - default: - return "documentation"; + { + switch (node->subType()) { + case Node::QmlClass: + return "element"; + case Node::QmlPropertyGroup: + return "property group"; + case Node::QmlBasicType: + return "type"; + default: + return "documentation"; + } + } case Node::Enum: return "enum"; case Node::Typedef: @@ -770,6 +799,8 @@ QString Generator::typeString(const Node *node) return "function"; case Node::Property: return "property"; + default: + return "documentation"; } } @@ -1094,11 +1125,21 @@ void Generator::generateSince(const Node *node, CodeMarker *marker) text << " was introduced or modified in "; else text << " was introduced in "; - if (project.isEmpty()) - text << "version"; - else - text << project; - text << " " << node->since() << "." << Atom::ParaRight; + + QStringList since = node->since().split(" "); + if (since.count() == 1) { + // Handle legacy use of \since . + if (project.isEmpty()) + text << "version"; + else + text << project; + text << " " << since[0]; + } else { + // Reconstruct the string. + text << " " << since.join(" "); + } + + text << "." << Atom::ParaRight; generateText(text, node, marker); } } @@ -1349,4 +1390,91 @@ QStringList Generator::getMetadataElements(const InnerNode* inner, const QString return s; } +/*! + For generating the "New Classes... in 4.6" section on the + What's New in 4.6" page. + */ +void Generator::findAllSince(const InnerNode *node) +{ + NodeList::const_iterator child = node->childNodes().constBegin(); + + // Traverse the tree, starting at the node supplied. + + while (child != node->childNodes().constEnd()) { + + QString sinceString = (*child)->since(); + + if (((*child)->access() != Node::Private) && !sinceString.isEmpty()) { + + // Insert a new entry into each map for each new since string found. + NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceString); + if (nsmap == newSinceMaps.end()) + nsmap = newSinceMaps.insert(sinceString,NodeMultiMap()); + + NewClassMaps::iterator ncmap = newClassMaps.find(sinceString); + if (ncmap == newClassMaps.end()) + ncmap = newClassMaps.insert(sinceString,NodeMap()); + + NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceString); + if (nqcmap == newQmlClassMaps.end()) + nqcmap = newQmlClassMaps.insert(sinceString,NodeMap()); + + if ((*child)->type() == Node::Function) { + // Insert functions into the general since map. + FunctionNode *func = static_cast(*child); + if ((func->status() > Node::Obsolete) && + (func->metaness() != FunctionNode::Ctor) && + (func->metaness() != FunctionNode::Dtor)) { + nsmap.value().insert(func->name(),(*child)); + } + } + else if ((*child)->url().isEmpty()) { + if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { + // Insert classes into the since and class maps. + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + + nsmap.value().insert(className,(*child)); + ncmap.value().insert(className,(*child)); + } + else if ((*child)->subType() == Node::QmlClass) { + // Insert QML elements into the since and element maps. + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + + nsmap.value().insert(className,(*child)); + nqcmap.value().insert(className,(*child)); + } + else if ((*child)->type() == Node::QmlProperty) { + // Insert QML properties into the since map. + QString propertyName = (*child)->name(); + nsmap.value().insert(propertyName,(*child)); + } + } + else { + // Insert external documents into the general since map. + QString name = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + name = (*child)->parent()->name()+"::"+name; + + nsmap.value().insert(name,(*child)); + } + + // Find child nodes with since commands. + if ((*child)->isInnerNode()) { + findAllSince(static_cast(*child)); + } + } + ++child; + } +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index e5e9747..e66915b 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -57,6 +57,12 @@ QT_BEGIN_NAMESPACE +typedef QMap NodeMap; +typedef QMultiMap NodeMultiMap; +typedef QMap NewSinceMaps; +typedef QMap ParentMaps; +typedef QMap NewClassMaps; + class ClassNode; class Config; class CodeMarker; @@ -152,6 +158,7 @@ class Generator QString getMetadataElement(const InnerNode* inner, const QString& t); QStringList getMetadataElements(const InnerNode* inner, const QString& t); + void findAllSince(const InnerNode *node); private: void generateReimplementedFrom(const FunctionNode *func, @@ -180,6 +187,11 @@ class Generator const NodeList& subs, CodeMarker *marker); + static QString sinceTitles[]; + NewSinceMaps newSinceMaps; + NewClassMaps newClassMaps; + NewClassMaps newQmlClassMaps; + private: QString amp; QString lt; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 52da178..655c3b4 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -66,25 +66,6 @@ bool HtmlGenerator::debugging_on = false; QString HtmlGenerator::divNavTop = ""; -QString HtmlGenerator::sinceTitles[] = - { - " New Namespaces", - " New Classes", - " New Member Functions", - " New Functions in Namespaces", - " New Global Functions", - " New Macros", - " New Enum Types", - " New Typedefs", - " New Properties", - " New Variables", - " New QML Elements", - " New QML Properties", - " New QML Signals", - " New QML Methods", - "" - }; - static bool showBrokenLinks = false; static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*()"); @@ -606,14 +587,18 @@ int HtmlGenerator::generateAtom(const Atom *atom, ncmap = newClassMaps.find(atom->string()); NewClassMaps::const_iterator nqcmap; nqcmap = newQmlClassMaps.find(atom->string()); + if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) { QList
sections; QList
::ConstIterator s; + for (int i=0; itype()) { case Node::Fake: @@ -1346,6 +1331,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); + generateSince(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { out() << "" << divNavTop << "\n"; @@ -1362,6 +1348,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); + generateSince(fake, marker); out() << "
    \n"; @@ -1393,6 +1380,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateQmlInherits(qml_cn, marker); generateQmlInheritedBy(qml_cn, marker); generateQmlInstantiates(qml_cn, marker); + generateSince(qml_cn, marker); QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker); if (!allQmlMembersLink.isEmpty()) { @@ -2242,9 +2230,6 @@ void HtmlGenerator::generateCompactList(const Node *relative, for (int i=0; i element to contain all the
    elements. */ out() << "
    \n"; + numTableRows = 0; + + int curParNr = 0; + int curParOffset = 0; - for (int i=0; i\n"; curParOffset++; } - out() << "
    \n"; + if (classMap.count() > 0) + out() << "\n"; + out() << "\n"; } @@ -3357,70 +3348,6 @@ void HtmlGenerator::findAllClasses(const InnerNode *node) } } -/*! - For generating the "New Classes... in 4.6" section on the - What's New in 4.6" page. - */ -void HtmlGenerator::findAllSince(const InnerNode *node) -{ - NodeList::const_iterator child = node->childNodes().constBegin(); - while (child != node->childNodes().constEnd()) { - QString sinceVersion = (*child)->since(); - if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) { - NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion); - if (nsmap == newSinceMaps.end()) - nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap()); - NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); - if (ncmap == newClassMaps.end()) - ncmap = newClassMaps.insert(sinceVersion,NodeMap()); - NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); - if (nqcmap == newQmlClassMaps.end()) - nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); - - if ((*child)->type() == Node::Function) { - FunctionNode *func = static_cast(*child); - if ((func->status() > Node::Obsolete) && - (func->metaness() != FunctionNode::Ctor) && - (func->metaness() != FunctionNode::Dtor)) { - nsmap.value().insert(func->name(),(*child)); - } - } - else if ((*child)->url().isEmpty()) { - if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - nsmap.value().insert(className,(*child)); - ncmap.value().insert(className,(*child)); - } - else if ((*child)->subType() == Node::QmlClass) { - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - nsmap.value().insert(className,(*child)); - nqcmap.value().insert(className,(*child)); - } - } - else { - QString name = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - name = (*child)->parent()->name()+"::"+name; - nsmap.value().insert(name,(*child)); - } - if ((*child)->isInnerNode()) { - findAllSince(static_cast(*child)); - } - } - ++child; - } -} - void HtmlGenerator::findAllFunctions(const InnerNode *node) { NodeList::ConstIterator c = node->childNodes().begin(); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 70ec0b7..e36c562 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -56,12 +56,6 @@ QT_BEGIN_NAMESPACE -typedef QMultiMap NodeMultiMap; -typedef QMap NewSinceMaps; -typedef QMap ParentMaps; -typedef QMap NodeMap; -typedef QMap NewClassMaps; - class HelpProjectWriter; class HtmlGenerator : public PageGenerator @@ -224,7 +218,6 @@ class HtmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); - void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); virtual QString getLink(const Atom *atom, @@ -292,10 +285,6 @@ class HtmlGenerator : public PageGenerator NodeMap qmlClasses; QMap funcIndex; QMap legaleseTexts; - NewSinceMaps newSinceMaps; - static QString sinceTitles[]; - NewClassMaps newClassMaps; - NewClassMaps newQmlClassMaps; static int id; public: static bool debugging_on; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 683c210..87bbd93 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -157,6 +157,16 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc) } /*! + Sets the information about the project and version a node was introduced + in. The string is simplified, removing excess whitespace before being + stored. +*/ +void Node::setSince(const QString &since) +{ + sinc = since.simplified(); +} + +/*! Returns a string representing the access specifier. */ QString Node::accessString() const diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index e1e9440..cb16bea 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -151,7 +151,7 @@ class Node void setDoc(const Doc& doc, bool replace = false); void setStatus(Status status) { sta = status; } void setThreadSafeness(ThreadSafeness safeness) { saf = safeness; } - void setSince(const QString &since) { sinc = since; } + void setSince(const QString &since); void setRelates(InnerNode* pseudoParent); void setModuleName(const QString &module) { mod = module; } void setLink(LinkType linkType, const QString &link, const QString &desc); -- cgit v0.12 From 01b3f508d1f7e9951baf60f487feadfa98ba4751 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 30 Jun 2011 19:13:55 +0200 Subject: Doc: Removed whitespace. --- doc/src/qt4-intro.qdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index d75bdca..1547a7c 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -610,7 +610,6 @@ introduced in Qt 4.7. \sincelist 4.7 - */ /*! -- cgit v0.12 From 609dc22f719ecb8d48349fd56f84960bbf46d731 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 30 Jun 2011 19:14:30 +0200 Subject: Doc: Standardized on QtQuick for \since declarations. --- src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp | 4 ++-- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 4 ++-- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 4 ++-- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 +- src/declarative/graphicsitems/qdeclarativeimage.cpp | 4 ++-- src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 +- src/declarative/graphicsitems/qdeclarativemousearea.cpp | 2 +- src/declarative/graphicsitems/qdeclarativepositioners.cpp | 6 +++--- src/declarative/graphicsitems/qdeclarativerepeater.cpp | 6 +++--- src/declarative/graphicsitems/qdeclarativetext.cpp | 8 ++++---- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 10 +++++----- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 8 ++++---- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index b7fcbb5..fb1bdf6 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty bool AnimatedImage::cache - \since Quick 1.1 + \since QtQuick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty bool AnimatedImage::mirror - \since Quick 1.1 + \since QtQuick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 836ad49..bd6405c 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -215,7 +215,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() /*! \qmlproperty bool BorderImage::cache - \since Quick 1.1 + \since QtQuick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -224,7 +224,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() /*! \qmlproperty bool BorderImage::mirror - \since Quick 1.1 + \since QtQuick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 4a465cc..93af16f 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1414,7 +1414,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h) /*! \qmlmethod Flickable::resizeContent(real width, real height, QPointF center) \preliminary - \since Quick 1.1 + \since QtQuick 1.1 Resizes the content to \a width x \a height about \a center. @@ -1454,7 +1454,7 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center) /*! \qmlmethod Flickable::returnToBounds() \preliminary - \since Quick 1.1 + \since QtQuick 1.1 Ensures the content is within legal bounds. diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index afc3eac..5da3f77 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2584,7 +2584,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode) /*! \qmlmethod GridView::positionViewAtBeginning() \qmlmethod GridView::positionViewAtEnd() - \since Quick 1.1 + \since QtQuick 1.1 Positions the view at the beginning or end, taking into account any header or footer. diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index e6bb798..9b9d680 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -473,7 +473,7 @@ QRectF QDeclarativeImage::boundingRect() const /*! \qmlproperty bool Image::cache - \since Quick 1.1 + \since QtQuick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -482,7 +482,7 @@ QRectF QDeclarativeImage::boundingRect() const /*! \qmlproperty bool Image::mirror - \since Quick 1.1 + \since QtQuick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index ccf0de0..ee2d19d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -3444,7 +3444,7 @@ qreal QDeclarativeItem::implicitHeight() const /*! \qmlproperty real Item::implicitWidth \qmlproperty real Item::implicitHeight - \since Quick 1.1 + \since QtQuick 1.1 Defines the natural width or height of the Item if no \l width or \l height is specified. diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 8695bc6..16a76e2 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3007,7 +3007,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode) /*! \qmlmethod ListView::positionViewAtBeginning() \qmlmethod ListView::positionViewAtEnd() - \since Quick 1.1 + \since QtQuick 1.1 Positions the view at the beginning or end, taking into account any header or footer. diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 18f008a..0e06a4c 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -419,7 +419,7 @@ void QDeclarativeMouseArea::setEnabled(bool a) /*! \qmlproperty bool MouseArea::preventStealing - \since Quick 1.1 + \since QtQuick 1.1 This property holds whether the mouse events may be stolen from this MouseArea. diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index f3d1a68..483cad4 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -584,7 +584,7 @@ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent) /*! \qmlproperty enumeration Row::layoutDirection - \since Quick 1.1 + \since QtQuick 1.1 This property holds the layoutDirection of the row. @@ -878,7 +878,7 @@ void QDeclarativeGrid::setFlow(Flow flow) /*! \qmlproperty enumeration Grid::layoutDirection - \since Quick 1.1 + \since QtQuick 1.1 This property holds the layout direction of the layout. @@ -1236,7 +1236,7 @@ void QDeclarativeFlow::setFlow(Flow flow) /*! \qmlproperty enumeration Flow::layoutDirection - \since Quick 1.1 + \since QtQuick 1.1 This property holds the layout direction of the layout. diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 813c255..e881b96 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -128,7 +128,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() /*! \qmlsignal Repeater::onItemAdded(int index, Item item) - \since Quick 1.1 + \since QtQuick 1.1 This handler is called when an item is added to the repeater. The \a index parameter holds the index at which the item has been inserted within the @@ -137,7 +137,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() /*! \qmlsignal Repeater::onItemRemoved(int index, Item item) - \since Quick 1.1 + \since QtQuick 1.1 This handler is called when an item is removed from the repeater. The \a index parameter holds the index at which the item was removed from the repeater, @@ -306,7 +306,7 @@ int QDeclarativeRepeater::count() const /*! \qmlmethod Item Repeater::itemAt(index) - \since Quick 1.1 + \since QtQuick 1.1 Returns the \l Item that has been created at the given \a index, or \c null if no item exists at \a index. diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 91c12d2..6d1b15d 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1213,7 +1213,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode) /*! \qmlproperty int Text::lineCount - \since Quick 1.1 + \since QtQuick 1.1 Returns the number of lines visible in the text item. @@ -1229,7 +1229,7 @@ int QDeclarativeText::lineCount() const /*! \qmlproperty bool Text::truncated - \since Quick 1.1 + \since QtQuick 1.1 Returns true if the text has been truncated due to \l maximumLineCount or \l elide. @@ -1246,7 +1246,7 @@ bool QDeclarativeText::truncated() const /*! \qmlproperty int Text::maximumLineCount - \since Quick 1.1 + \since QtQuick 1.1 Set this property to limit the number of lines that the text item will show. If elide is set to Text.ElideRight, the text will be elided appropriately. @@ -1480,7 +1480,7 @@ qreal QDeclarativeText::paintedHeight() const /*! \qmlproperty real Text::lineHeight - \since Quick 1.1 + \since QtQuick 1.1 Sets the line height for the text. The value can be in pixels or a multiplier depending on lineHeightMode. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 42c520c..15a3cae 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -107,7 +107,7 @@ TextEdit { /*! \qmlsignal TextEdit::onLinkActivated(string link) - \since Quick 1.1 + \since QtQuick 1.1 This handler is called when the user clicks on a link embedded in the text. The link must be in rich text or HTML format and the @@ -616,7 +616,7 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode) /*! \qmlproperty int TextEdit::lineCount - \since Quick 1.1 + \since QtQuick 1.1 Returns the total number of lines in the textEdit item. */ @@ -710,7 +710,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos) /*! \qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters) - \since Quick 1.1 + \since QtQuick 1.1 Moves the cursor to \a position and updates the selection according to the optional \a mode parameter. (To only move the cursor, set the \l cursorPosition property.) @@ -1075,7 +1075,7 @@ void QDeclarativeTextEdit::setSelectByMouse(bool on) /*! \qmlproperty enum TextEdit::mouseSelectionMode - \since Quick 1.1 + \since QtQuick 1.1 Specifies how text should be selected using a mouse. @@ -1221,7 +1221,7 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus) /*! \qmlmethod void TextEdit::deselect() - \since Quick 1.1 + \since QtQuick 1.1 Removes active text selection. */ diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index c59c919..1c64464 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1014,7 +1014,7 @@ int QDeclarativeTextInput::positionAt(int x) const /*! \qmlmethod int TextInput::positionAt(int x, CursorPosition position = CursorBetweenCharacters) - \since Quick 1.1 + \since QtQuick 1.1 This function returns the character position at x pixels from the left of the textInput. Position 0 is before the @@ -1402,7 +1402,7 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) /*! \qmlmethod void TextInput::deselect() - \since Quick 1.1 + \since QtQuick 1.1 Removes active text selection. */ @@ -1574,7 +1574,7 @@ void QDeclarativeTextInput::setSelectByMouse(bool on) /*! \qmlproperty enum TextInput::mouseSelectionMode - \since Quick 1.1 + \since QtQuick 1.1 Specifies how text should be selected using a mouse. @@ -1622,7 +1622,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position) /*! \qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters) - \since Quick 1.1 + \since QtQuick 1.1 Moves the cursor to \a position and updates the selection according to the optional \a mode parameter. (To only move the cursor, set the \l cursorPosition property.) -- cgit v0.12 From 358e018dbb4b4dbdbfc702a6d462f113a1357e1e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 30 Jun 2011 19:16:21 +0200 Subject: Doc: Fixed \since declarations. --- src/gui/kernel/qkeysequence.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index f8e4e57..8635bf2 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -934,7 +934,7 @@ QKeySequence::QKeySequence(const QString &key) } /*! - \since 4.x + \since 4.7 Creates a key sequence from the \a key string based on \a format. */ QKeySequence::QKeySequence(const QString &key, QKeySequence::SequenceFormat format) @@ -1131,7 +1131,7 @@ int QKeySequence::assign(const QString &ks) /*! \fn int QKeySequence::assign(const QString &keys, QKeySequence::SequenceFormat format) - \since 4.x + \since 4.7 Adds the given \a keys to the key sequence (based on \a format). \a keys may contain up to four key codes, provided they are -- cgit v0.12 From 86608d537eabc3cf7e1d1ddd1d0a2f90ccc2de2a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 30 Jun 2011 20:48:32 +0200 Subject: Doc: Clarified the range of return values from QLineF::angle(). Task-number: QTBUG-20197 --- src/corelib/tools/qline.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index af3b7d5..0f67652 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -564,8 +564,9 @@ qreal QLineF::length() const Returns the angle of the line in degrees. - Positive values for the angles mean counter-clockwise while negative values - mean the clockwise direction. Zero degrees is at the 3 o'clock position. + The return value will be in the range of values from 0.0 up to but not + including 360.0. The angles are measured counter-clockwise from a point + on the x-axis to the right of the origin (x > 0). \sa setAngle() */ -- cgit v0.12 From 13e7d402c438fd2c527dbc302cf1103d5c835a2f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 26 Apr 2011 15:35:51 +0200 Subject: Make text rendering working outside the gui thread on Symbian. It was previously not possible to render text (QPainter::drawText) in a secondary thread on Symbian, it always resulted in some kind of panic. This patch corrects it. For S60 5.0 and earlier the behavior is not changed, threaded text rendering is only supported on Symbian^3 and newer. This also means QFontDatabase::supportsThreadedFontRendering() will return true from now on, but only on Symbian^3 and higher. Task-number: QTBUG-18516 Reviewed-by: mread (cherry picked from commit 0c62e02b80570bf8b92eff7acceb9018df61c89e) --- src/gui/kernel/qapplication_s60.cpp | 3 +++ src/gui/kernel/qt_s60_p.h | 26 ++++++++++++++++++++++++++ src/gui/text/qfontdatabase_s60.cpp | 30 +++++++++++++++++++----------- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index b98bdbc..a53d273 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -2723,6 +2723,9 @@ QS60ThreadLocalData::QS60ThreadLocalData() QS60ThreadLocalData::~QS60ThreadLocalData() { + for (int i = 0; i < releaseFuncs.count(); ++i) + releaseFuncs[i](); + releaseFuncs.clear(); if (!usingCONEinstances) { delete screenDevice; wsSession.Close(); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 4295f60..3e6a293 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -97,6 +97,10 @@ static const int qt_symbian_max_screens = 4; //this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2 #define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13) +class QSymbianTypeFaceExtras; +typedef QHash QSymbianTypeFaceExtrasHash; +typedef void (*QThreadLocalReleaseFunc)(); + class Q_AUTOTEST_EXPORT QS60ThreadLocalData { public: @@ -105,6 +109,8 @@ public: bool usingCONEinstances; RWsSession wsSession; CWsScreenDevice *screenDevice; + QSymbianTypeFaceExtrasHash fontData; + QVector releaseFuncs; }; class QS60Data @@ -178,6 +184,8 @@ public: inline CWsScreenDevice* screenDevice(const QWidget *widget); inline CWsScreenDevice* screenDevice(int screenNumber); static inline int screenNumberForWidget(const QWidget *widget); + inline QSymbianTypeFaceExtrasHash& fontData(); + inline void addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func); static inline CCoeAppUi* appUi(); static inline CEikMenuBar* menuBar(); #ifdef Q_WS_S60 @@ -477,6 +485,24 @@ inline int QS60Data::screenNumberForWidget(const QWidget *widget) return qt_widget_private(const_cast(w))->symbianScreenNumber; } +inline QSymbianTypeFaceExtrasHash& QS60Data::fontData() +{ + if (!tls.hasLocalData()) { + tls.setLocalData(new QS60ThreadLocalData); + } + return tls.localData()->fontData; +} + +inline void QS60Data::addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func) +{ + if (!tls.hasLocalData()) { + tls.setLocalData(new QS60ThreadLocalData); + } + QS60ThreadLocalData *data = tls.localData(); + if (!data->releaseFuncs.contains(func)) + data->releaseFuncs.append(func); +} + inline CCoeAppUi* QS60Data::appUi() { return CCoeEnv::Static()-> AppUi(); diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 1c1bc29..d209726 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -166,7 +166,6 @@ public: COpenFontRasterizer *m_rasterizer; mutable QList m_extras; - mutable QHash m_extrasHash; mutable QSet m_applicationFontFamilies; }; @@ -269,8 +268,9 @@ void QSymbianFontDatabaseExtrasImplementation::clear() static_cast(db->symbianExtras); if (!dbExtras) return; // initializeDb() has never been called + QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData(); if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { - qDeleteAll(dbExtras->m_extrasHash); + qDeleteAll(extrasHash); } else { typedef QList::iterator iterator; for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) { @@ -279,11 +279,16 @@ void QSymbianFontDatabaseExtrasImplementation::clear() } dbExtras->m_extras.clear(); } - dbExtras->m_extrasHash.clear(); + extrasHash.clear(); } void qt_cleanup_symbianFontDatabase() { + static bool cleanupDone = false; + if (cleanupDone) + return; + cleanupDone = true; + QFontDatabasePrivate *db = privateDb(); if (!db) return; @@ -334,9 +339,12 @@ COpenFont* OpenFontFromBitmapFont(const CBitmapFont* aBitmapFont) const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(const QString &aTypeface, bool bold, bool italic) const { + QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData(); + if (extrasHash.isEmpty() && QThread::currentThread() != QApplication::instance()->thread()) + S60->addThreadLocalReleaseFunc(clear); const QString typeface = qt_symbian_fontNameWithAppFontMarker(aTypeface); const QString searchKey = typeface + QString::number(int(bold)) + QString::number(int(italic)); - if (!m_extrasHash.contains(searchKey)) { + if (!extrasHash.contains(searchKey)) { TFontSpec searchSpec(qt_QString2TPtrC(typeface), 1); if (bold) searchSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold); @@ -350,7 +358,7 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c QScopedPointer sFont(font); QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font); sFont.take(); - m_extrasHash.insert(searchKey, extras); + extrasHash.insert(searchKey, extras); } else { const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec); Q_ASSERT(err == KErrNone && font); @@ -364,20 +372,20 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib(); const QString foundKey = QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length()); - if (!m_extrasHash.contains(foundKey)) { + if (!extrasHash.contains(foundKey)) { QScopedPointer sFont(font); QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont); sFont.take(); m_extras.append(extras); - m_extrasHash.insert(searchKey, extras); - m_extrasHash.insert(foundKey, extras); + extrasHash.insert(searchKey, extras); + extrasHash.insert(foundKey, extras); } else { m_store->ReleaseFont(font); - m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey)); + extrasHash.insert(searchKey, extrasHash.value(foundKey)); } } } - return m_extrasHash.value(searchKey); + return extrasHash.value(searchKey); } void QSymbianFontDatabaseExtrasImplementation::removeAppFontData( @@ -971,7 +979,7 @@ bool QFontDatabase::removeAllApplicationFonts() bool QFontDatabase::supportsThreadedFontRendering() { - return false; + return QSymbianTypeFaceExtras::symbianFontTableApiAvailable(); } static -- cgit v0.12 From 1679b2d71f4f573699aad20aebf4eacc7605fdc8 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 18 Aug 2011 15:43:55 +0300 Subject: Exact word bubble doesn't disappear when screen is tapped Sync FEP-aware text editors state to native side. Thus, native side can then do various operations based on editor state - such as removing the user typed 'exact word bubble'. Task-number: QTBUG-20919 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index d545f2e..8bdaa22 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1077,6 +1077,10 @@ void QCoeFepInputContext::CancelFepInlineEdit() if (m_hasTempPreeditString) return; + // Sync with native side editor state. Native side can then do various operations + // based on editor state, such as removing 'exact word bubble'. + ReportAknEdStateEvent(MAknEdStateObserver::EAknSyncEdwinState); + QList attributes; QInputMethodEvent event(QLatin1String(""), attributes); event.setCommitString(QLatin1String(""), 0, 0); -- cgit v0.12 From 3a3b4a0aca8ca31bb135b456eb58763733cf047f Mon Sep 17 00:00:00 2001 From: Timo Turunen Date: Fri, 19 Aug 2011 13:19:01 +0300 Subject: Update 4.7.4 changes Reviewed-by: Trust Me --- dist/changes-4.7.4 | 304 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 304 insertions(+) diff --git a/dist/changes-4.7.4 b/dist/changes-4.7.4 index a37e66a..9a08d15 100644 --- a/dist/changes-4.7.4 +++ b/dist/changes-4.7.4 @@ -19,13 +19,317 @@ Merge Request: http://qt.gitorious.org * Library * **************************************************************************** +QtGui +----- + + - [QTBUG-20214] QRentBook: LSK and RSK of booking page will change + somethimes + - [QTBUG-19656] Spectrum: the Mode menu disappears after the device is + changed from portrait to landscape. + - [QTBUG-19260] Cursor cannot be placed between letters f and i - "fi" + is interpreted as one character + - [QTBUG-19157] Crash in QGLContextPrivate::bindTexture() when using + QPainter::fillRect() with a brush having a size > max_texture_size + - [QTBUG-19089] TextInput positionToRectangle doesn't return correct + coordinates for the cursor in pre-edit mode + - [QTBUG-19067] Font glyphs get clipped on the top + - [QTBUG-18500] QTextBlock crash + - [QTBUG-18303] Arabic multiline text is clipped on the right + - [QTBUG-18185] QStaticText: Wrong kerning and baselines when rotating a + QGraphicsView + - [QTBUG-17443] Feedreadercrash: when opening feed with unicode characters + - [QTBUG-17244] QGraphicsLayout Layouting should be done in one go. Ugly + layouting visible otherwise + - [QTBUG-17209] Bug-231 introduces an off-by-one error + - [QTBUG-17117] Arabic reordering problem when 2 fonts are used + - [QTBUG-11131] QAbstractScrollArea::setViewport() causes crash when used + from within event handler method + - [QTBUG-16422] Big coordinate values cause segfault on ARM when calling + QGraphicsEllipseItem::contains + - [QTBUG-18017] Regression: Text selection with shift-click stopped working + - [QTBUG-18192] Crash when invoking blockBoundingRect over a QTextDocument + documentLayout + - [QTBUG-17505] Inflexible focus handling in QGraphicsScene + - [QTBUG-17020] QPainter::drawText() fails to draw correct text in some + circumstances. Related to QTBUG-12950 + - [QTBUG-16401] QGraphicsScene returns focus incorrectly when QGraphicsView + is focused + - [QTBUG-17812] regression: qsortfilterproxymodel::reset doesn't invalidate + the model (Windows) + - [QTBUG-17230] QPlainTextEdit corruption/crash after scrolling + - [QTBUG-17536] qguistatemachine::cloneEvent doesn't clone + GraphicsSceneWheel Events correctly + - [QTBUG-17254] XPM files crash QImage (write) + - [QTBUG-16292] QTreeView crash in indexRowSizeHint/itemHeight + - [QTBUG-17390] Child widgets don't inherit their parent's input contexts + - [QTBUG-15910] setstylesheet on a QComboBox causes a segmentation fault + - [QTBUG-16652] Compilation of "4.7" branch fails: + private/qdrawhelper_arm_simd_p.h: No such file or directory + +QtNetwork +--------- + + - [QTBUG-17464] SIGBUS in fetchAndAddOrdered from + QlcdEngine::connectionStateSignalsSlot + - [QTBUG-16022] QHttpNetworkConnectionChannel::expand discards data if + gzip-stream has missing end-of-stream marker + - [QTBUG-17199] ICD Bearer management: Causes the main thread to hang + when ran on a different thread. + +QtCore +------ + + - [QTBUG-15421] QDirIterator returns hidden directories when it should only + return files and returns hidden files when it should only return + directories + +QtScript +-------- + + - [QTBUG-17815] Missing APIShims in obsoleted QScriptValue constructor + - [QTBUG-17788] Crash when calling collectGarbage() after requesting + arguments object of native context + +QtDBus +------ + + - [QTBUG-14228] Ensure Qt 4.7 doesn't crash when a D-Bus message with file + descriptors is received + +QtSql +----- + + - [QTBUG-14831] Dynamic sorting of a QSortFilterProxyModel on a + QSqlTableModel with OnManualSubmit is broken (4.7 regression) + +Declarative +----------- + + - [QTBUG-20159] No effect of setting color on a QStaticText or a + QML element + - [QTBUG-18428] Colored and underlined styled text are not underlined or + completely coloured on device + - [QTBUG-18362] wigglytext.qml does not behave correctly in qmlscene + - [QTBUG-18266] More than one XmlListModel - Lists randomly show data from + wrong model + - [QTBUG-15983] Cannot pass enum value as signal parameter from C++ to QML + - [QTBUG-14974] ListView and GridView + contentY performance + - [QTBUG-18412] Crash in sendPostedEvents() - QObject::isWidgetType() + (issue with QDeclarativePixmapReply) + - [QTBUG-15356] PathView doesn't update if preferredHighlightBegin and + preferredHighlightEnd changed + - [QTBUG-17562] TextInput text in echo mode PasswordEchoOnEdit revealed + on refocus + - [QTBUG-17775] Crash when using FolderListModel with a repeater + - [QTBUG-17361] Nested pressDelays crashes application + - [QTBUG-15705] QDeclarativeTextInput::mousePressEvent() doesn't call + QInputContext::mouseHandler() + - [QTBUG-17501] Focus: Tap any of the Rounded-cornered rectangle, the + context menu doesn't disappear. + - [QTBUG-17008] ListView + XmlListModel freeze application when change + language key combination + - [QTBUG-17324] incorrect 'version is not installed' error when importing + QML module + - [QTBUG-16999] QML TextInput doesn't scroll if writing preedit at the end + of the line + - [QTBUG-13451] Support property versioning in QML + - [QTBUG-16959] Crash when using Grid.TopToBottom flow with Repeater + inside Grid + - [QTBUG-16522] QML ListView Should Support Dynamic Headers and Footers + - [QTBUG-17114] QtQuick 1.1 alignment regression + - [QTBUG-16283] TextEdit and TextInput need text selection modes + - [QTBUG-16284] Disable drag and drop in TextEdit and TextInput + +OpenVG +------ + - [QTBUG-18682] QImage convertToFormat does not work with certain image + formats when default (OpenVG) rendering engine used. + +OpenGL +------ + - [QTBUG-14217] Unresolved symbol QGLWindowSurface::staticMetaObject when + building for Windows Mobile 5.0 with OpenGL ES 1.1 support + - [QTBUG-18184] mingw gcc 4 static build failed in tools/qml because of the + symbol export in libQtOpenGL + - [QTBUG-17256] Change QGLPixmapData load functions to use the + 'convertInPlace' versions of QImage to save memory + +3rdParty +-------- + + - Image formats + * [QTBUG-20425] Update bundled libpng to 1.5.4 (security) + **************************************************************************** * Platform Specific Changes * **************************************************************************** +Qt for Linux/X11 +---------------- + + - Declarative + * [QTBUG-19914] Segfault in QDeclarativeBinding::createBinding triggered + by QMultimediaKit + - gui + * [QTBUG-16175] REG: Qt 4.7/Linux Qt Designer / Qt Creator show multiple + warnings: "Application asked to unregister timer 0x17000002 which is + not registered in this thread. Fix application." + +Qt for Windows +-------------- + + - gui + * [QTBUG-19878] QImage constructor crash when opening some tiff images + - corelib + * [QTBUG-17014] Qt event delivery is unreliable on windows platforms + - declarative + * [QTBUG-19198] ListView lose items + * [QTBUG-18587] Roles are not removed in listmodel + - qmake + * [QTBUG-18537] Compiling Qt on Windows XP x64 using MinGW-w64 fails + +Qt for Mac OS X +--------------- + + - gui + * [QTBUG-20496] Qt does not compile under OSX Lion or llvm-gcc + * [QTBUG-18547] Buffer overrun in QMacPixmapData::macCreatePixels + (QPixmap_mac.cpp) + * [QTBUG-15474] Mac: Qt:Sheet dialog permanently loses focus after + moving the parent window + * [QTBUG-15897] QMainWindow crash in destructor when having a + QDockWidget of type Qt::Drawer containing a QTreeWidget + - corelib + * [QTBUG-11481] Floating Dock Widget behavior on Mac [REGRESSION] + - network + * [QTBUG-14520] SSL Isn't working with osx 10.5 + * [QTBUG-5645] SSL Memory leaks on Mac. + +Qt for Symbian +-------------- + + - general + * [QTBUG-20216] Update QtOpenGL section in Symbian platform notes + - examples + * [QTBUG-15176] Default heap/stack size might not be enough for symbian + - qmake & mkspecs + * [QTBUG-20669] Symbian: DEBUGGABLE_UDEBONLY keyword needed in + generated mmp files + * [QTBUG-20192] Qt sis can't be created on symbian^1 5.0 and + symbian^3 PS2 environments + * [QTBUG-18207] QMAKE_CLEAN items with wildcards in symbian-abld + builds will halt the build without obvious reason. + * [QTBUG-17927] Simplified Chinese language is not supported + in Qt 4.7.2 + - openvg + * [QTBUG-20339] when camera application is opened and closed, the qml + application in the background is getting closed + * [QTBUG-18027] Lazy conversion in fromSymbianCFbsBitmap for openVG + - opengl + * [QTBUG-19183] Enable multisampling if there's hw support for it + on Symbian + * [QTBUG-19180] Simplify texture pooling in GL graphics system + * [QTBUG-18850] Fix orientation change. Current behaviour results to + black screen + * [QTBUG-15254] Implement QPixmap::fromSymbianRSgImage() in the + OpenGL graphics system + * [QTBUG-18209] Native image handle provider support in QGLPixmapData + * [QTBUG-18270] Use destroyed swap behaviour in GL graphics system + on Symbian + * [QTBUG-15252] Implement CFbsBitmap backend for QPixmap in OpenGL + graphics system on Symbian + * [QTBUG-17850] Implement GL graphics system releaseCachedResources() + * [QTBUG-15253] Verify that applications using the OpenGL graphics + system on Symbian consume zero graphics memory when they are + not visible + * [QTBUG-16977] Symbian: Implement QPixmap::fromSymbianCFbsBitmap() in + the OpenGL graphics system + * [QTBUG-16949] Symbian: Recreate EGL surface on native window resize + - gui + * [QTBUG-20255] Regression: Some QMenus are shown completely transparent + in Symbian + * [QTBUG-20240] Regression: QS60Style - All standardIcons are drawn as + "small icons" + * [QTBUG-20813] Disabled splitscreen translation still moves screen + * [QTBUG-20034] Splitview - Auto-translation should translate as + little as possible to ensure visibility of the cursor + * [QTBUG-20007] Symbian: Do not add linked fonts to the QFontDatabase + * [QTBUG-19911] Orientation change causes unnecessary resizes to top + level window on Symbian + * [QTBUG-19880] Drawing a QPixmap to QImage causes a deep copy on + Symbian + * [QTBUG-19864] Predicted word is duplicated when doing an orientation + switch + * [QTBUG-19856] Doing an orientation change while in splitview mode + and closing VKB causes QGraphicsView to be incorrectly resized + * [QTBUG-19782] UI of the QWidget based applications those uses + QGroupBoxs are mess up in latest Symbian RND release + * [QTBUG-19734] KERN-EXEC 3 panic in + QCoeFepInputContext::translateInputWidget() method + * [QTBUG-19689] Textinput: last word inputted was duplicated after + press "Password" button + * [QTBUG-19578] Fix BCM2727 detection function on Symbian + * [QTBUG-19528] Opening symbol menu while typing with prediction on + causes issues + * [QTBUG-19471] Using QFileDialog crashes in Symbian + * [QTBUG-19104] while setting a softkey action in a qt application + on symbian, the icon specified only is shown partially + * [QTBUG-19043] Fullscreen main window with softkeys initially layouts + using full screen dimensions instead of client area dimensions + * [QTBUG-18863] QS60Style: compiling simulated style crashes due to + missing placeHolderTexture implementation + * [QTBUG-18493] Qt reserves graphics resources when launching application + directly to background + * [QTBUG-18486] Control pane (RSK Cancel) of the test note is covered by + "Options, Exit" when re-launching the application from Open applications + list + * [QTBUG-18409] If fullscreen application without softkeys opens a + fullscreen child dialog with softkeys, once the child dialog closes, + softkeys remain visible on applicaiton main screen. + * [QTBUG-17874] autotest failure between Qt 4.6.3 and Qt 4.7.2 in + QLinearGradient::setStops method on Symbian^3 platform + * [QTBUG-17844] Different point size for the font created using QFont + class and returned by QFontDialog + * [QTBUG-16857] Black corners around popup menu in Symbian^3 + * [QTBUG-16785] QML app: After layout switch the focused text input field + is not visible on Split view + * [QTBUG-15031] Predictive text is not committed when writing in a QLineEdit + * [QTBUG-14058] Wrong availableGeometry detected in Symbian + * [QTBUG-17576] GraphicsViews: Focused widget is not visible after + orientation change + * [QTBUG-17930] Regression: Theme background in style is incorrect + * [QTBUG-18024] Don't use EGL surfaces for translucency with 32MB GPU chip + * [QTBUG-17984] QML application: focused text input field is not visible + when split view is opened + - declarative + * [QTBUG-20218] Symbian 5.3: QML text edit components are sending + software input panel requests + * [QTBUG-19821] Flickr: There is gridding on picture + * [QTBUG-19669] All events that QDeclarativeDebugTrace shows on + Symbian are of duration '0' + * [QTBUG-18869] Compilation breakage for Symbian (qmltooling) + * [QTBUG-18549] Animation timer seems to take too long time to expire + during scrolling a qml list in Symbian device. + * [QTBUG-17592] qml.pri causes havoc on Symbian 3.2 and 5.0 + - network + * [QTBUG-18795] QNetworkConfigurationManager::allConfigurations + (QNetworkConfiguration::Active) not returning any active configuration + when instantiated and called from Secondary thread + * [QTBUG-18722] QDesktopServices::openUrl() doesn't handle URL encodings + correctly + * [QTBUG-18572] Crash with KERN-EXEC 0 when + QNetworkConfigurationManagerPrivate fails to connect + - corelib + * [QTBUG-17776] Qmlviewer: qmlviewer will crash after closing the + application "flickr demo" + **************************************************************************** * Tools * **************************************************************************** + - [QTBUG-18595] Enable remote debugging for qmlviewer + - [QTBUG-18063] qdoc3 depends on private header files from QML + - [QTBUG-16462] qdoc3 segfaults due to a uninitialized member variable + when using the WebXML output. -- cgit v0.12 From aaf94776ce1034ec2b2402b9ca0e5cf7c7848b12 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 19 Aug 2011 13:46:51 +0200 Subject: Fix QPixmap::grabWindow() on Mac OS X Lion The old approach was not the recommended one and although it worked on Mac OS X 10.6 it did not work on 10.7. The new approach works correctly on 10.6 and 10.7, so the fix is applied for both versions. Task-number: QTBUG-19824 Merge-request: 1332 Reviewed-by: sroedal --- src/gui/image/qpixmap_mac.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 6872cfa..45f00a0 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -841,6 +841,31 @@ static void qt_mac_grabDisplayRect(CGDirectDisplayID display, const QRect &displ } // Returns a pixmap containing the screen contents at rect. +static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) +{ + const int maxDisplays = 128; // 128 displays should be enough for everyone. + CGDirectDisplayID displays[maxDisplays]; + CGDisplayCount displayCount; + const CGRect cgRect = CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()); + const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount); + + if (err && displayCount == 0) + return QPixmap(); + QPixmap windowPixmap(rect.size()); + for (uint i = 0; i < displayCount; ++i) { + const CGRect bounds = CGDisplayBounds(displays[i]); + // Translate to display-local coordinates + QRect displayRect = rect.translated(qRound(-bounds.origin.x), qRound(-bounds.origin.y)); + // Adjust for inverted y axis. + displayRect.moveTop(qRound(bounds.size.height) - displayRect.y() - rect.height()); + QCFType image = CGDisplayCreateImageForRect(displays[i], bounds); + QPixmap pix = QPixmap::fromMacCGImageRef(image); + QPainter painter(&windowPixmap); + painter.drawPixmap(-bounds.origin.x, -bounds.origin.y, pix); + } + return windowPixmap; +} + static QPixmap qt_mac_grabScreenRect(const QRect &rect) { if (!resolveOpenGLSymbols()) @@ -916,7 +941,8 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) QRect rect(globalCoord.x() + x, globalCoord.y() + y, w, h); #ifdef QT_MAC_USE_COCOA - return qt_mac_grabScreenRect(rect); + return (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? + qt_mac_grabScreenRect_10_6(rect) : qt_mac_grabScreenRect(rect); #else #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) { -- cgit v0.12 From b186288cbf796be662f86ae4d5c70e39ba6afb67 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 19 Aug 2011 14:49:27 +0300 Subject: Exact word bubble doesn't disappear when screen is tapped (fix part 2) Prevent syncing with native side, if input capability changes are pending. Native side seems to be rather touchy about extra events, and might crash if syncing is requested while handling a capability change is on-going. Additionally, only cancel the transaction once. Otherwise cancellation might lead into loop (since we sync the state with native side) that eventually causes the application to crash. Task-number: QTBUG-20919 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_p.h | 1 + src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 9857015..8c30838 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -154,6 +154,7 @@ private: TUint m_textCapabilities; bool m_inDestruction; bool m_pendingInputCapabilitiesChanged; + bool m_pendingTransactionCancel; int m_cursorVisibility; int m_inlinePosition; MFepInlineTextFormatRetriever *m_formatRetriever; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 8bdaa22..9cf4212 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -109,6 +109,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_textCapabilities(TCoeInputCapabilities::EAllText), m_inDestruction(false), m_pendingInputCapabilitiesChanged(false), + m_pendingTransactionCancel(false), m_cursorVisibility(1), m_inlinePosition(0), m_formatRetriever(0), @@ -1074,12 +1075,10 @@ void QCoeFepInputContext::CancelFepInlineEdit() // We are not supposed to ever have a tempPreeditString and a real preedit string // from S60 at the same time, so it should be safe to rely on this test to determine // whether we should honor S60's request to clear the text or not. - if (m_hasTempPreeditString) + if (m_hasTempPreeditString || m_pendingTransactionCancel) return; - // Sync with native side editor state. Native side can then do various operations - // based on editor state, such as removing 'exact word bubble'. - ReportAknEdStateEvent(MAknEdStateObserver::EAknSyncEdwinState); + m_pendingTransactionCancel = true; QList attributes; QInputMethodEvent event(QLatin1String(""), attributes); @@ -1087,6 +1086,13 @@ void QCoeFepInputContext::CancelFepInlineEdit() m_preeditString.clear(); m_inlinePosition = 0; sendEvent(event); + + // Sync with native side editor state. Native side can then do various operations + // based on editor state, such as removing 'exact word bubble'. + if (!m_pendingInputCapabilitiesChanged) + ReportAknEdStateEvent(MAknEdStateObserver::EAknSyncEdwinState); + + m_pendingTransactionCancel = false; } TInt QCoeFepInputContext::DocumentLengthForFep() const -- cgit v0.12 From 090ff76845ca5b9c61319f359a94cc239b18846b Mon Sep 17 00:00:00 2001 From: Aleksandar Stojiljkovic Date: Fri, 19 Aug 2011 17:16:35 +0300 Subject: Avoid calling QInputMethod update when adding or removing QGraphicsItems that don't have focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing item from QGraphicsScene takes longer if focus is in item (and that item is not being removed) with ItemAcceptsInputMethod. update() in QInputContext or in subclasses could be expensive - usually requires inputMethodFocus and a sequence of inputMethodQuery calls to get the state. In MeeGo, additionally, dbus IPC in MInputContext makes it order of magnitude slower. Minor indentation issue in QGraphicsViewPrivate::updateInputMethodSensitivity() Reviewed-by: Samuel Rødal --- src/gui/graphicsview/qgraphicsscene.cpp | 14 ++++++++++---- src/gui/graphicsview/qgraphicsview.cpp | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 27639f9..7925c69 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2688,10 +2688,11 @@ void QGraphicsScene::addItem(QGraphicsItem *item) // Ensure that newly added items that have subfocus set, gain // focus automatically if there isn't a focus item already. - if (!d->focusItem && item != d->lastFocusItem && item->focusItem() == item) + if (!d->focusItem && item != d->lastFocusItem && item->focusItem() == item) { item->focusItem()->setFocus(); - - d->updateInputMethodSensitivityInViews(); + // Update input method only if added item got focus + d->updateInputMethodSensitivityInViews(); + } } /*! @@ -2942,6 +2943,9 @@ void QGraphicsScene::removeItem(QGraphicsItem *item) { // ### Refactoring: This function shares much functionality with _q_removeItemLater() Q_D(QGraphicsScene); + + bool wasFocused(item == focusItem()); + if (!item) { qWarning("QGraphicsScene::removeItem: cannot remove 0-item"); return; @@ -2968,7 +2972,9 @@ void QGraphicsScene::removeItem(QGraphicsItem *item) // Deliver post-change notification item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant); - d->updateInputMethodSensitivityInViews(); + // Avoid calling input method update if removed item wasn't focused + if (wasFocused) + d->updateInputMethodSensitivityInViews(); } /*! diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 41b07c4..4bfcbb2 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -1101,8 +1101,8 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity() if (!proxy) { q->setInputMethodHints(focusItem->inputMethodHints()); } else if (QWidget *widget = proxy->widget()) { - if (QWidget *fw = widget->focusWidget()) - widget = fw; + if (QWidget *fw = widget->focusWidget()) + widget = fw; q->setInputMethodHints(widget->inputMethodHints()); } else { q->setInputMethodHints(0); -- cgit v0.12 From a3f2ac29714744fb7a34aa7789ce89cb58c09de7 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 19 Aug 2011 16:15:57 +0200 Subject: Fix compile issue with Mac OS X 10.5 Reviewed-by: ossi --- src/gui/image/qpixmap_mac.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 45f00a0..8d72a59 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -840,6 +840,7 @@ static void qt_mac_grabDisplayRect(CGDirectDisplayID display, const QRect &displ ptrCGLDestroyContext(glContextObj); // and destroy the context } +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) // Returns a pixmap containing the screen contents at rect. static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) { @@ -865,6 +866,7 @@ static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) } return windowPixmap; } +#endif static QPixmap qt_mac_grabScreenRect(const QRect &rect) { @@ -941,8 +943,12 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) QRect rect(globalCoord.x() + x, globalCoord.y() + y, w, h); #ifdef QT_MAC_USE_COCOA - return (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ? - qt_mac_grabScreenRect_10_6(rect) : qt_mac_grabScreenRect(rect); +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) + return qt_mac_grabScreenRect_10_6(rect); + else +#endif + return qt_mac_grabScreenRect(rect); #else #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) { -- cgit v0.12 From e828368117ea34bbeac60e910dea170e868a82c3 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sun, 21 Aug 2011 01:59:35 +0400 Subject: don't crash when destroying children this was uncovered by my don't-detach patch. Reviewed-by: ossi --- tools/qdoc3/node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 683c210..56d76d3 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -545,7 +545,8 @@ void InnerNode::removeFromRelated() */ void InnerNode::deleteChildren() { - qDeleteAll(children); + NodeList childrenCopy = children; // `children` will be changed in ~Node() + qDeleteAll(childrenCopy); } /*! -- cgit v0.12 From d62bb74d329b6ee5f6c52ac26e11bfe9a27f56a0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Jun 2011 14:11:09 +0200 Subject: Added an additional check to workaround an issue on Windows. Reviewed-by: David Boddie Original-patch-by: Friedemann Kleint (cherry picked from commit 8b1654ec6a892e84c1654c9196e80461ee6e92fa) --- tools/qdoc3/cppcodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 9591801..2067716 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -953,7 +953,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, ident += ch; finish = i; readChar(); - } while (isalnum(ch) || ch == '_'); + } while (ch >= 0 && isalnum(ch) || ch == '_'); if (classRegExp.exactMatch(ident)) { tag = QLatin1String("type"); -- cgit v0.12 From c5f46907fbc0354aacc4bc4a6f5ab97c8b656d1a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 22 Aug 2011 15:16:34 +0200 Subject: Fix problem with grabWindow on Mac OS X 10.6 with Cocoa For some reason the test did not fail locally but fails in the CI system. A manual check of the images from the test shows it should have failed. Reason for this will be investigated separately Reviewed-by: Sergio Ahumada --- src/gui/image/qpixmap_mac.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 8d72a59..3afc724 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -857,9 +857,8 @@ static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) const CGRect bounds = CGDisplayBounds(displays[i]); // Translate to display-local coordinates QRect displayRect = rect.translated(qRound(-bounds.origin.x), qRound(-bounds.origin.y)); - // Adjust for inverted y axis. - displayRect.moveTop(qRound(bounds.size.height) - displayRect.y() - rect.height()); - QCFType image = CGDisplayCreateImageForRect(displays[i], bounds); + QCFType image = CGDisplayCreateImageForRect(displays[i], + CGRectMake(displayRect.x(), displayRect.y(), displayRect.width(), displayRect.height())); QPixmap pix = QPixmap::fromMacCGImageRef(image); QPainter painter(&windowPixmap); painter.drawPixmap(-bounds.origin.x, -bounds.origin.y, pix); -- cgit v0.12 From 076ac0ee55b54ae3759af76cf5790e31fbd0f7e5 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 22 Aug 2011 17:09:01 +0300 Subject: Symbian: Not possible to catch RequestSoftwareInputPanel in eventFilter Do not consume QEvent::RequestSoftwareInputPanel in QCoeFepInputContext. Task-number: QTBUG-20155 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 9cf4212..bc27c1e 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -360,10 +360,6 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) if (sControl) { sControl->setIgnoreFocusChanged(false); } - //If m_pointerHandler has already been set, it means that fep inline editing is in progress. - //When this is happening, do not filter out pointer events. - if (!m_pointerHandler) - return true; } } -- cgit v0.12 From 4748be8f436e2bc13b5755f2ffe2428a338f7239 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojiljkovic Date: Tue, 23 Aug 2011 10:52:13 +0300 Subject: Revert "Avoid calling QInputMethod update when adding or removing QGraphicsItems that don't have focus" This reverts commit 090ff76845ca5b9c61319f359a94cc239b18846b ... due to failing unit tests. --- src/gui/graphicsview/qgraphicsscene.cpp | 14 ++++---------- src/gui/graphicsview/qgraphicsview.cpp | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 7925c69..27639f9 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2688,11 +2688,10 @@ void QGraphicsScene::addItem(QGraphicsItem *item) // Ensure that newly added items that have subfocus set, gain // focus automatically if there isn't a focus item already. - if (!d->focusItem && item != d->lastFocusItem && item->focusItem() == item) { + if (!d->focusItem && item != d->lastFocusItem && item->focusItem() == item) item->focusItem()->setFocus(); - // Update input method only if added item got focus - d->updateInputMethodSensitivityInViews(); - } + + d->updateInputMethodSensitivityInViews(); } /*! @@ -2943,9 +2942,6 @@ void QGraphicsScene::removeItem(QGraphicsItem *item) { // ### Refactoring: This function shares much functionality with _q_removeItemLater() Q_D(QGraphicsScene); - - bool wasFocused(item == focusItem()); - if (!item) { qWarning("QGraphicsScene::removeItem: cannot remove 0-item"); return; @@ -2972,9 +2968,7 @@ void QGraphicsScene::removeItem(QGraphicsItem *item) // Deliver post-change notification item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant); - // Avoid calling input method update if removed item wasn't focused - if (wasFocused) - d->updateInputMethodSensitivityInViews(); + d->updateInputMethodSensitivityInViews(); } /*! diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 4bfcbb2..41b07c4 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -1101,8 +1101,8 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity() if (!proxy) { q->setInputMethodHints(focusItem->inputMethodHints()); } else if (QWidget *widget = proxy->widget()) { - if (QWidget *fw = widget->focusWidget()) - widget = fw; + if (QWidget *fw = widget->focusWidget()) + widget = fw; q->setInputMethodHints(widget->inputMethodHints()); } else { q->setInputMethodHints(0); -- cgit v0.12