diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-08-31 11:15:17 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-08-31 11:15:17 (GMT) |
commit | 5e980fb9a4504e1613186c92c67c89a8cce4b4c4 (patch) | |
tree | 7e9f3b522d38ae95c6e28d9834a070aa28af8609 | |
parent | 54d69ef97327e735cdeca1f1a808ba09a781cf08 (diff) | |
parent | 5a9000c3aca05e28c4fc537f82d85d6ec4395dc5 (diff) | |
download | Qt-5e980fb9a4504e1613186c92c67c89a8cce4b4c4.zip Qt-5e980fb9a4504e1613186c92c67c89a8cce4b4c4.tar.gz Qt-5e980fb9a4504e1613186c92c67c89a8cce4b4c4.tar.bz2 |
Merge branch 'qt-4.7' into 4.7
Conflicts:
src/gui/inputmethod/qcoefepinputcontext_s60.cpp
45 files changed, 593 insertions, 284 deletions
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/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. 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..1547a7c 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}. @@ -610,7 +610,6 @@ introduced in Qt 4.7. \sincelist 4.7 - */ /*! 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() */ 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 0a98c01..474126d 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1420,7 +1420,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. @@ -1460,7 +1460,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 59e4cbb..20410ab 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2615,7 +2615,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 57b7dea..e75189c 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3026,7 +3026,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 cc5279a..24d7f75 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 @@ -624,7 +624,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. */ @@ -718,7 +718,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.) @@ -1083,7 +1083,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. @@ -1229,7 +1229,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/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h index 731d956..412d33c 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h @@ -77,7 +77,7 @@ public: yoff(0) { #ifdef Q_OS_SYMBIAN - if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) { + if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) { showInputPanelOnFocus = false; } #endif diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index c5c9f5e..231bd37 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1018,7 +1018,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 @@ -1406,7 +1406,7 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) /*! \qmlmethod void TextInput::deselect() - \since Quick 1.1 + \since QtQuick 1.1 Removes active text selection. */ @@ -1578,7 +1578,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. @@ -1626,7 +1626,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.) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h index d3f11f6..0ae984a 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h @@ -80,7 +80,7 @@ public: selectPressed(false) { #ifdef Q_OS_SYMBIAN - if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) { + if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) { showInputPanelOnFocus = false; } #endif 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 c656418..79005ce 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -64,6 +64,8 @@ #define QT_EAknCursorPositionChanged MAknEdStateObserver::EAknEdwinStateEvent(6) // MAknEdStateObserver::EAknActivatePenInputRequest #define QT_EAknActivatePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(7) +// MAknEdStateObserver::EAknClosePenInputRequest +#define QT_EAknClosePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(10) // EAknEditorFlagSelectionVisible is only valid from 3.2 onwards. // Sym^3 AVKON FEP manager expects that this flag is used for FEP-aware editors @@ -107,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), @@ -252,9 +255,6 @@ bool QCoeFepInputContext::needsInputPanel() bool QCoeFepInputContext::filterEvent(const QEvent *event) { - // The CloseSoftwareInputPanel event is not handled here, because the VK will automatically - // close when it discovers that the underlying widget does not have input capabilities. - if (!focusWidget()) return false; @@ -318,6 +318,12 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) if (!needsInputPanel()) return false; + if ((event->type() == QEvent::CloseSoftwareInputPanel) + && (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)) { + m_fepState->ReportAknEdStateEventL(QT_EAknClosePenInputRequest); + return false; + } + if (event->type() == QEvent::RequestSoftwareInputPanel) { // Only request virtual keyboard if it is not yet active or if this is the first time // panel is requested for this application. @@ -354,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; } } @@ -580,7 +582,7 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) if (!moveWithinVisibleArea) { // Check if the widget contains cursorPositionChanged signal and connect to it. QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); - if (gv->scene() && gv->scene()->focusItem()) { + if (gv->scene() && gv->scene()->focusItem() && S60->partial_keyboardAutoTranslation) { int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); if (index != -1) connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); @@ -1069,15 +1071,24 @@ 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; + m_pendingTransactionCancel = true; + QList<QInputMethodEvent::Attribute> attributes; QInputMethodEvent event(QLatin1String(""), attributes); event.setCommitString(QLatin1String(""), 0, 0); 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 @@ -1087,7 +1098,18 @@ TInt QCoeFepInputContext::DocumentLengthForFep() const return 0; QVariant variant = w->inputMethodQuery(Qt::ImSurroundingText); - return variant.value<QString>().size() + m_preeditString.size(); + + int size = variant.value<QString>().size() + m_preeditString.size(); + + // To fix an issue with backspaces not being generated if document size is zero, + // fake document length to be at least one always, except when dealing with + // hidden text widgets, where this faking would generate extra asterisk. Since the + // primary use of hidden text widgets is password fields, they are unlikely to + // support multiple lines anyway. + if (size == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText)) + size = 1; + + return size; } TInt QCoeFepInputContext::DocumentMaximumLengthForFep() const @@ -1170,6 +1192,12 @@ void QCoeFepInputContext::GetEditorContentForFep(TDes& aEditorContent, TInt aDoc // FEP expects the preedit string to be part of the editor content, so let's mix it in. int cursor = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); text.insert(cursor, m_preeditString); + + // Add additional space to empty non-password text to compensate + // for the fake length we specified in DocumentLengthForFep(). + if (text.size() == 0 && !(m_textCapabilities & TCoeInputCapabilities::ESecretText)) + text += QChar(0x20); + aEditorContent.Copy(qt_QString2TPtrC(text.mid(aDocumentPosition, aLengthToRetrieve))); } 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/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 diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 2700bbb..80e6ec6 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -126,8 +126,10 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act default: break; }; - if (key != 0) + if (key != 0) { QSoftKeyManager::instance()->d_func()->softKeyCommandActions.insert(action, key); + connect(action, SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*))); + } #endif QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey; switch (standardKey) { @@ -160,7 +162,13 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key QScopedPointer<QAction> action(createAction(standardKey, actionWidget)); connect(action.data(), SIGNAL(triggered()), QSoftKeyManager::instance(), SLOT(sendKeyEvent())); + +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) + // Don't connect destroyed slot if is was already connected in createAction + if (!(QSoftKeyManager::instance()->d_func()->softKeyCommandActions.contains(action.data()))) +#endif connect(action.data(), SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*))); + QSoftKeyManager::instance()->d_func()->keyedActions.insert(action.data(), key); return action.take(); #endif //QT_NO_ACTION @@ -169,7 +177,9 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key void QSoftKeyManager::cleanupHash(QObject *obj) { Q_D(QSoftKeyManager); - QAction *action = qobject_cast<QAction*>(obj); + // Can't use qobject_cast in destroyed() signal handler as that'll return NULL, + // so use static_cast instead. Since the pointer is only used as a hash key, it is safe. + QAction *action = static_cast<QAction *>(obj); d->keyedActions.remove(action); #if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) d->softKeyCommandActions.remove(action); 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<QString, const QSymbianTypeFaceExtras *> QSymbianTypeFaceExtrasHash; +typedef void (*QThreadLocalReleaseFunc)(); + class Q_AUTOTEST_EXPORT QS60ThreadLocalData { public: @@ -105,6 +109,8 @@ public: bool usingCONEinstances; RWsSession wsSession; CWsScreenDevice *screenDevice; + QSymbianTypeFaceExtrasHash fontData; + QVector<QThreadLocalReleaseFunc> 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<QWidget *>(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/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 3c2d63c..e80eced 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -233,11 +233,22 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) QSize oldSize(q->size()); QRect oldGeom(data.crect); + bool checkExtra = true; + if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) { + // Do not allow fullscreen/maximized windows to expand beyond client rect + TRect r = S60->clientRect(); + w = qMin(w, r.Width()); + h = qMin(h, r.Height()); + + if (w == r.Width() && h == r.Height()) + checkExtra = false; + } + // Lose maximized status if deliberate resize if (w != oldSize.width() || h != oldSize.height()) data.window_state &= ~Qt::WindowMaximized; - if (extra) { // any size restrictions? + if (checkExtra && extra) { // any size restrictions? w = qMin(w,extra->maxw); h = qMin(h,extra->maxh); w = qMax(w,extra->minw); 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<const QSymbianTypeFaceExtras *> m_extras; - mutable QHash<QString, const QSymbianTypeFaceExtras *> m_extrasHash; mutable QSet<QString> m_applicationFontFamilies; }; @@ -269,8 +268,9 @@ void QSymbianFontDatabaseExtrasImplementation::clear() static_cast<const QSymbianFontDatabaseExtrasImplementation*>(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<const QSymbianTypeFaceExtras *>::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<CFont, CFontFromScreenDeviceReleaser> 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<CFont, CFontFromFontStoreReleaser> 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 diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index a879b49..198bc04 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE #ifdef QT_GUI_PASSWORD_ECHO_DELAY -static int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY; +static const int qt_passwordEchoDelay = QT_GUI_PASSWORD_ECHO_DELAY; #endif /*! @@ -93,8 +93,8 @@ void QLineControl::updateDisplayText(bool forceUpdate) if (m_echoMode == QLineEdit::Password) { str.fill(m_passwordCharacter); #ifdef QT_GUI_PASSWORD_ECHO_DELAY - if (m_passwordEchoTimer != 0 && !str.isEmpty()) { - int cursor = m_text.length() - 1; + if (m_passwordEchoTimer != 0 && m_cursor > 0 && m_cursor <= m_text.length()) { + int cursor = m_cursor - 1; QChar uc = m_text.at(cursor); str[cursor] = uc; if (cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { 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) { diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 328c5c2..be3276d 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -812,6 +812,7 @@ static const char *certificate_blacklist[] = { "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43", "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0", "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0", + "05:e2:e6:a4:cd:09:ea:54:d6:65:b0:75:fe:22:a2:56", 0 }; diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 1f33458..3276375 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -1764,6 +1764,13 @@ void tst_QLineEdit::passwordEchoDelay() QApplication::sendEvent(testWidget, &ev); QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7')); + testWidget->setCursorPosition(3); + QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7')); + QTest::keyPress(testWidget, 'a'); + QCOMPARE(testWidget->displayText(), QString(3, fillChar) + QLatin1Char('a') + QString(5, fillChar)); + QTest::keyPress(testWidget, Qt::Key_Backspace); + QCOMPARE(testWidget->displayText(), QString(8, fillChar)); + // restore clean state testWidget->setEchoMode(QLineEdit::Normal); } diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-google.com-diginotar.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-google.com-diginotar.pem new file mode 100644 index 0000000..12bbcae --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-google.com-diginotar.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFKDCCBBCgAwIBAgIQBeLmpM0J6lTWZbB1/iKiVjANBgkqhkiG9w0BAQUFADBm +MQswCQYDVQQGEwJOTDESMBAGA1UEChMJRGlnaU5vdGFyMSEwHwYDVQQDExhEaWdp +Tm90YXIgUHVibGljIENBIDIwMjUxIDAeBgkqhkiG9w0BCQEWEWluZm9AZGlnaW5v +dGFyLm5sMB4XDTExMDcxMDE5MDYzMFoXDTEzMDcwOTE5MDYzMFowajELMAkGA1UE +BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxFjAUBgNVBAcTDU1vdW50YWluIFZp +ZXcxFzAVBgNVBAUTDlBLMDAwMjI5MjAwMDAyMRUwEwYDVQQDEwwqLmdvb2dsZS5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNbeKubCV0aCxhOiOS +CSQ/w9HXTYuD5BLKuiqXNw3setdTymeJz2L8aWOHo3nicFNDVwWTgwWomGNr2J6Q +7g1iINNSW0rR4E1l2szRkcnAY6c6i/Eke93nF4i2hDsnIBveolF5yjpuRm73uQQD +ulHjA3BFRF/PTi0fw2/Yt+8ieoMuNcMWN6Eou5Gqt5YZkWv176ofeCbsBmMrP87x +OhhtTDckCapk4VQZG2XrfzZcV6tdzCp5TI8uHdu17cdzXm1imZ8tyvzFeiCEOQN8 +vPNzB/fIr3CJQ5q4uM5aKT3DD5PeVzf4rfJKQNgCTWiIBc9XcWEUuszwAsnmg7e2 +EJRdAgMBAAGjggHMMIIByDA6BggrBgEFBQcBAQQuMCwwKgYIKwYBBQUHMAGGHmh0 +dHA6Ly92YWxpZGF0aW9uLmRpZ2lub3Rhci5ubDAfBgNVHSMEGDAWgBTfM8Cvkv43 +/LbYFhbQ2bGR1fpupTAJBgNVHRMEAjAAMIHGBgNVHSAEgb4wgbswgbgGDmCEEAGH +aQEBAQIEAQICMIGlMCcGCCsGAQUFBwIBFhtodHRwOi8vd3d3LmRpZ2lub3Rhci5u +bC9jcHMwegYIKwYBBQUHAgIwbhpsQ29uZGl0aW9ucywgYXMgbWVudGlvbmVkIG9u +IG91ciB3ZWJzaXRlICh3d3cuZGlnaW5vdGFyLm5sKSwgYXJlIGFwcGxpY2FibGUg +dG8gYWxsIG91ciBwcm9kdWN0cyBhbmQgc2VydmljZXMuMEkGA1UdHwRCMEAwPqA8 +oDqGOGh0dHA6Ly9zZXJ2aWNlLmRpZ2lub3Rhci5ubC9jcmwvcHVibGljMjAyNS9s +YXRlc3RDUkwuY3JsMA4GA1UdDwEB/wQEAwIEsDAbBgNVHREEFDASgRBhZG1pbkBn +b29nbGUuY29tMB0GA1UdDgQWBBQHSn0WJzIo0eMBMQUNsMqN6eF/7TANBgkqhkiG +9w0BAQUFAAOCAQEAAs5dL7N9wzRJkI4Aq4lC5t8j5ZadqnqUcgYLADzSv4ExytNH +UY2nH6iVTihC0UPSsILWraoeApdT7Rphz/8DLQEBRGdeKWAptNM3EbiXtQaZT2uB +pidL8UoafX0kch3f71Y1scpBEjvu5ZZLnjg0A8AL0tnsereOVdDpU98bKqdbbrnM +FRmBlSf7xdaNca6JJHeEpga4E9Ty683CmccrSGXdU2tTCuHEJww+iOAUtPIZcsum +U7/eYeY1pMyGLyIjbNgRY7nDzRwvM/BsbL9eh4/mSQj/4nncqJd22sVQpCggQiVK +baB2sVGcVNBkK55bT8gPqnx8JypubyUvayzZGg== +-----END CERTIFICATE----- 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"); diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b801e1e..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. @@ -1199,7 +1180,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) @@ -3952,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<FunctionNode *>(*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<InnerNode *>(*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<QString, Node*> NodeMultiMap; -typedef QMap<QString, NodeMultiMap> NewSinceMaps; -typedef QMap<Node*, NodeMultiMap> ParentMaps; -typedef QMap<QString, const Node*> NodeMap; -typedef QMap<QString, NodeMap> NewClassMaps; - typedef QMap<QString, QString> GuidMap; typedef QMap<QString, GuidMap*> 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<QString, NodeMap > funcIndex; QMap<Text, const Node*> legaleseTexts; - NewSinceMaps newSinceMaps; - static QString sinceTitles[]; - NewClassMaps newClassMaps; - NewClassMaps newQmlClassMaps; static int id; static QString ditaTags[]; QStack<QXmlStreamWriter*> 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 3367301..355c9b2 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -77,6 +77,25 @@ QString Generator::outDir; QString Generator::project; QHash<QString, QString> 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"; } } @@ -783,10 +814,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) @@ -1091,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 <version>. + if (project.isEmpty()) + text << "version"; + else + text << project; + text << " " << since[0]; + } else { + // Reconstruct the <project> <version> string. + text << " " << since.join(" "); + } + + text << "." << Atom::ParaRight; generateText(text, node, marker); } } @@ -1346,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<FunctionNode *>(*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<InnerNode *>(*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<QString, const Node*> NodeMap; +typedef QMultiMap<QString, Node*> NodeMultiMap; +typedef QMap<QString, NodeMultiMap> NewSinceMaps; +typedef QMap<Node*, NodeMultiMap> ParentMaps; +typedef QMap<QString, NodeMap> 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=\"([^\"]+)\">).*(</@link>)"); @@ -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<Section> sections; QList<Section>::ConstIterator s; + for (int i=0; i<LastSinceType; ++i) sections.append(Section(sinceTitle(i),QString(),QString(),QString())); NodeMultiMap::const_iterator n = nsmap.value().constBegin(); + while (n != nsmap.value().constEnd()) { + const Node* node = n.value(); switch (node->type()) { 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() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << 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() << "<ul>\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<NumParagraphs; i++) // i = 0..36 paragraphOffset[i+1] = paragraphOffset[i] + paragraph[i].count(); - int curParNr = 0; - int curParOffset = 0; - /* Output the alphabet as a row of links. */ @@ -2262,8 +2247,12 @@ void HtmlGenerator::generateCompactList(const Node *relative, Output a <div> element to contain all the <dl> elements. */ out() << "<div class=\"flowListDiv\">\n"; + numTableRows = 0; + + int curParNr = 0; + int curParOffset = 0; - for (int i=0; i<classMap.count()-1; i++) { + for (int i=0; i<classMap.count(); i++) { while ((curParNr < NumParagraphs) && (curParOffset == paragraph[curParNr].count())) { ++curParNr; @@ -2324,7 +2313,9 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "</dd>\n"; curParOffset++; } - out() << "</dl>\n"; + if (classMap.count() > 0) + out() << "</dl>\n"; + out() << "</div>\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<FunctionNode *>(*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<InnerNode *>(*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<QString, Node*> NodeMultiMap; -typedef QMap<QString, NodeMultiMap> NewSinceMaps; -typedef QMap<Node*, NodeMultiMap> ParentMaps; -typedef QMap<QString, const Node*> NodeMap; -typedef QMap<QString, NodeMap> 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<QString, NodeMap > funcIndex; QMap<Text, const Node *> 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 56d76d3..189c28f 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); |