diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-15 16:25:08 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-15 16:25:08 (GMT) |
commit | 22fe90983b8168a3f846a883efa1113bb8b31782 (patch) | |
tree | d4b2cb3a4230f3edcf481720a9b9737ed18bc9ac | |
parent | 03c01176ebf423085e56ceabcf8335ca5027a786 (diff) | |
parent | 30630cf2bf8c7604efc3a52f74983c2237f309c3 (diff) | |
download | Qt-22fe90983b8168a3f846a883efa1113bb8b31782.zip Qt-22fe90983b8168a3f846a883efa1113bb8b31782.tar.gz Qt-22fe90983b8168a3f846a883efa1113bb8b31782.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (96 commits)
Unbreak the Maemo 5 build after the Symbian fix
QNAM HTTP: Fix problem with cached files and metaDataChanged()
Add a testcase for QTBUG-11213 to prevent future regressions.
Autotest: reenable the NTLM proxy test on tst_QTcpSocket
Autotest: add a small, boring test for QAuthenticator
Add documentation for the QAuthenticator options.
Expose the QAuthenticator map of options in the API.
Add a QAuthenticatorPrivate parsing for the headers without QHttpResponseHeader
Revert BIC change "Build Qt with option -Zc:wchar_t under MSVC"
Fix for tst_qmdisubwindow::fixedMinMaxSize failure on Cocoa
Add unit tests for QMimeData.
fix qconfig.h reference for shadow builds
Drag and drop cursor doesnot change on invalid drop areas (Cocoa)
Crash while runnig tst_QMdiSubWindow::emittingOfSignals test on Cocoa
fix qconfig.h aliased header creation
fix warning directive on gnuc
qdoc: Removed navigation arrow that was causing display problems.
Silence warning when building with MSVC 2005
Fix an Assert in QTextTable
Revert "Fix an Assert in QTextTable"
...
155 files changed, 2993 insertions, 2287 deletions
@@ -691,6 +691,7 @@ my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dis my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" ); my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" ); my %colliding_headers = (); +my %inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ); foreach (@modules_to_sync) { #iteration info @@ -800,8 +801,10 @@ foreach (@modules_to_sync) { foreach (@subdirs) { my $subdir = "$_"; my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0); + push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir}); foreach (@headers) { my $header = "$_"; + my $shadow = ($header =~ s/^\*//); $header = 0 if("$header" =~ /^ui_.*.h/); foreach (@ignore_headers) { $header = 0 if("$header" eq "$_"); @@ -819,6 +822,7 @@ foreach (@modules_to_sync) { } my $iheader = $subdir . "/" . $header; + $iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow); my @classes = $public_header ? classNames($iheader) : (); if($showonly) { print "$header [$lib]\n"; @@ -843,7 +847,7 @@ foreach (@modules_to_sync) { my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.'; $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" . " #if defined(__GNUC__)\n" . - " #pragma warning \"$warning_msg\"\n" . + " #warning \"$warning_msg\"\n" . " #elif defined(_MSC_VER)\n" . " #pragma message \"WARNING: $warning_msg\"\n" . " #endif\n". @@ -4481,11 +4481,6 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; fi mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H" - for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do - if [ '!' -f "$conf" ]; then - ln -s "$QCONFIG_H" "$conf" - fi - done #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured rm -f mkspecs/default diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index 641b936..6fe0223 100644 --- a/doc/src/classes/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc @@ -1577,7 +1577,6 @@ \since 4.4 \brief The MediaObject class provides an interface for media playback. - The media object manages a \l{Phonon::}{MediaSource}, which supplies the media object with multimedia content, e.g., from a file. A playback in Phonon is always started by calling the @@ -1651,17 +1650,8 @@ playback of the current source, but it is possible to try with a different one. A user readable error message is given by errorString(). - \section1 Symbian Platform Security Requirements - - On Symbian, processes which access media via the network must - have the \c NetworkServices platform security capability. If the client - process lacks this capability, operations will result in errors. - This failure is indicated by a state() of Phonon::ErrorState. - - Platform security capabilities are added via the - \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} - qmake variable. + \sa {Symbian Platform Security Requirements} \sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget, {Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer, Phonon::createPlayer(), {Phonon Module} diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index afedb44..1341bbb 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -164,14 +164,22 @@ The \c createBlock() function creates a block from the \c Block.qml file and moves the new block to its position on the game canvas. This involves several steps: \list -\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to generate an element from \c Block.qml. - If the component is ready, we can call \c createObject() to create an instance of the \c Block item. -\o If \c createObject() returned null (i.e. if there was an error while - loading the object), print the error information. -\o Place the block in its position on the board and set its width and height. - Also, store it in the blocks array for future reference. -\o Finally, print error information to the console if the component could not be - loaded for some reason (for example, if the file is missing). + +\o \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to + generate an element from \c Block.qml. If the component is ready, + we can call \c createObject() to create an instance of the \c Block + item. + +\o If \c createObject() returned null (i.e. if there was an error + while loading the object), print the error information. + +\o Place the block in its position on the board and set its width and + height. Also, store it in the blocks array for future reference. + +\o Finally, print error information to the console if the component + could not be loaded for some reason (for example, if the file is + missing). + \endlist diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 0edd242..c2930b3 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -113,7 +113,7 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt \row \o \l {Connections} \o Explicitly connects signals and signal handlers \row \o \l {Component} \o Encapsulate QML items as a component \row \o \l {Timer} \o Provides timed triggers -\row \o \l {QtObject} \o Basic element containing only the objectName property +\row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property \row \o \l {WorkerScript} \o Enables the use of threads in QML \row \o \l {Loader} \o Controls the loading of items or components \row \o \l {Repeater} \o Uses a model to create multiples of components diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 9126a79..3f1b184 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -314,7 +314,7 @@ Item { \section2 Signal Handlers -Signal handlers allow actions to be taken in reponse to an event. For instance, +Signal handlers allow actions to be taken in response to an event. For instance, the \l MouseArea element has signal handlers to handle mouse press, release and click: diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index b44e6f2..a2f4d3a 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -429,4 +429,77 @@ Rectangle { } \endcode +\section1 Accessing Views and Models from Delegates + +You can access the view for which a delegate is used, and its +properties, by using ListView.view in a delegate on a ListView, or +GridView.view in a delegate on a GridView, etc. In particular, you can +access the model and its properties by using ListView.view.model. + +This is useful when you want to use the same delegate for a number of +views, for example, but you want decorations or other features to be +different for each view, and you would like these different settings to +be properties of each of the views. Similarly, it might be of interest +to access or show some properties of the model. + +In the following example, the delegate shows the property \e{language} +of the model, and the color of one of the fields depends on the +property \e{fruit_color} of the view. + +\code +Rectangle { + width: 200; height: 200 + + ListModel { + id: fruitModel + property string language: "en" + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } + } + + Component { + id: fruitDelegate + Row { + Text { text: " Fruit: " + name; color: ListView.view.fruit_color } + Text { text: " Cost: $" + cost } + Text { text: " Language: " + ListView.view.model.language } + } + } + + ListView { + property color fruit_color: "green" + model: fruitModel + delegate: fruitDelegate + anchors.fill: parent + } +} +\endcode + +Another important case is when some action (e.g. mouse click) in the +delegate should update data in the model. In this case you can define +a function in the model, e.g.: + +\code + setData(int row, const QString & field_name, QVariant new_value), +\endcode + +...and call it from the delegate using: + +\code + ListView.view.model.setData(index, field, value) +\endcode + +...assuming that \e{field} holds the name of the field which should be +updated, and that \e{value} holds the new value. + */ diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc index 733f52d..4d7b3e0 100644 --- a/doc/src/examples/movie.qdoc +++ b/doc/src/examples/movie.qdoc @@ -30,8 +30,8 @@ \title Movie Example The Movie example demonstrates how to use QMovie and QLabel to - display animations. Now that Qt comes with \l{Phonon - Overview}{Phonon} (the multimedia framework), QMovie is mostly + display animations. Now that Qt comes with the \l{Phonon multimedia + framework} {Phonon multimedia framework}, QMovie is mostly useful if one wants to play a simple animation without the added complexity of a multimedia framework to install and deploy. diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc index fe69d52..bc06178 100644 --- a/doc/src/examples/trafficinfo.qdoc +++ b/doc/src/examples/trafficinfo.qdoc @@ -145,5 +145,5 @@ The rest of the code in this example is just for representing the time and station information to the user, and uses techniques described in the - \l{Widgets Examples}. + \l{Widget Examples}. */ diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc index 4a1b631..c5dd27c 100644 --- a/doc/src/frameworks-technologies/dnd.qdoc +++ b/doc/src/frameworks-technologies/dnd.qdoc @@ -45,7 +45,7 @@ outlines the approach used to enable it in custom widgets. Drag and drop operations are also supported by Qt's item views and by the graphics view framework. More information is available in - \l{Using Drag and Drop with Item Views} and \l{Graphics View + \l{Using drag & drop with item views} and \l{Graphics View Framework}. \section1 Drag and Drop Classes diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc index 94b9f0d..131f063 100644 --- a/doc/src/frameworks-technologies/model-view-programming.qdoc +++ b/doc/src/frameworks-technologies/model-view-programming.qdoc @@ -900,7 +900,7 @@ after its application through the use of certain types of selection commands. These are discussed later in this section. - \section3 Current item & selected items + \section3 Current item and selected items In a view, there is always a current item and a selected item - two independent states. An item can be the current item and selected at the @@ -1257,7 +1257,7 @@ reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()} function. - \section3 Model headers & data + \section3 Model headers and data For items in the view, we want to return the strings in the string list. The \l{QAbstractItemModel::data()}{data()} function is responsible for @@ -1350,7 +1350,7 @@ \snippet doc/src/snippets/stringlistmodel/model.cpp 1 - \section3 Inserting & removing rows + \section3 Inserting and removing rows It is possible to change the number of rows and columns in a model. In the string list model it only makes sense to change the number of rows, so we @@ -1634,7 +1634,7 @@ contain the text given in the search string. This pattern can also be used in the list and table widgets. - \section1 Using drag & drop with item views + \section1 Using drag & drop with item views Qt's drag and drop infrastructure is fully supported by the model/view framework. Items in lists, tables, and trees can be dragged within the views, and data can be @@ -1714,7 +1714,7 @@ of QAbstractItemModel::removeRows(), either directly or by inheriting the implementation from its base class. - \section3 Enabling drag & drop for items + \section3 Enabling drag & drop for items Models indicate to views which items can be dragged, and which will accept drops, by reimplementing the QAbstractItemModel::flags() function to provide suitable @@ -2124,12 +2124,12 @@ children may be displayed incorrectly in some views until the user attempts to view the non-existent child items. - \section2 Navigation & model index creation + \section2 Navigation and model index creation Hierarchical models need to provide functions that views can call to navigate the tree-like structures they expose, and obtain model indexes for items. - \section3 Parents & children + \section3 Parents and children Since the structure exposed to views is determined by the underlying data structure, it is up to each model subclass to create its own model indexes @@ -2153,7 +2153,7 @@ models to supply some unique identifier to this function to ensure that the model index can be re-associated with its corresponding item later on. - \section2 Drag & drop support and MIME type handling + \section2 Drag & drop support and MIME type handling The model/view classes support drag and drop operations, providing default behavior that is sufficient for many applications. However, it is also possible to customize @@ -2282,7 +2282,7 @@ \endlist For more information about drag and drop with item views, refer to - \l{Using Drag and Drop with Item Views}. + \l{Using drag & drop with item views}. \section3 Convenience views @@ -2293,7 +2293,7 @@ the existing contents with the data being transferred, the underlying model will set the data of the target items rather than insert new rows and columns into the model. For more information on drag and drop in convenience views, - you can see \l{Using Drag and Drop with Item Views}. + you can see \l{Using drag & drop with item views}. \section2 Performance optimization for large amounts of data diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc index 023b4ce..5119638 100644 --- a/doc/src/frameworks-technologies/phonon.qdoc +++ b/doc/src/frameworks-technologies/phonon.qdoc @@ -34,6 +34,7 @@ \tableofcontents + \target Phonon Overview \section1 Introduction Qt uses the Phonon multimedia framework to provide functionality diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index b6766d5..a32d120 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -343,8 +343,8 @@ /*! \page examples-draganddrop.html \ingroup all-examples - \title Drag & Drop Examples - \brief How to access your platform's native darg & drop functionality + \title Drag & Drop Examples + \brief How to access your platform's native darg & drop functionality \image draganddrop-examples.png diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 18a1746..92721c5 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -44,7 +44,7 @@ <li><a href="installation.html">Installation & first steps</a></li> <li><a href="how-to-learn-qt.html">How to learn Qt</a></li> <li><a href="tutorials.html">Tutorials</a></li> - <li><a href="examples.html">Examples</a></li> + <li><a href="all-examples.html">Examples</a></li> <li><a href="qt4-7-intro.html">Whats new in Qt 4.7</a></li> </ul> </div> @@ -56,30 +56,29 @@ <div class="indexboxcont indexboxbar "> <div class="sectionlist tricol"> <ul> - <li><a href="classes.html">Class index</a></li> - <li><a href="functions.html">Function index</a></li> - <li><a href="modules.html">Modules</a></li> - <li><a href="namespaces.html">Namespaces</a></li> - <li><a href="qtglobal.html">Global stuff</a></li> - <li><a href="qdeclarativeelements.html">QML elements</a></li> + <li><a href="classes.html">Class index</a></li> + <li><a href="functions.html">Function index</a></li> + <li><a href="modules.html">Modules</a></li> + <li><a href="namespaces.html">Namespaces</a></li> + <li><a href="qtglobal.html">Global Declarations</a></li> </ul> </div> <div class="sectionlist tricol"> <ul> - <li><a href="qt-basic-concepts.html">Basic Qt Architecture</a></li> - <li><a href="declarativeui.html">Device UI's & Qt Quick</a></li> - <li><a href="qt-gui-concepts.html">Desktop UI components</a></li> - <li><a href="platform-specific.html">Platform-specific info</a></li> - <li><a href="qt-graphics.html">Graphics, Painting & Printing</a></li> - <li><a href="qt-network.html">Input/Output & networking</a></li> + <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> + <li><a href="qt-basic-concepts.html">Qt Architecture</a></li> + <li><a href="developing-with-qt.html">Cross-platform & Platform-specific Development</a></li> + <li><a href="technology-apis.html">Qt & standard technologies </a></li> + <li><a href="best-practices.html">Qt How-to's & best practices</a></li> </ul> </div> <div class="sectionlist"> <ul> - <li><a href="model-view-programming.html">Model/View programming</a></li> - <li><a href="technology-apis.html">Qt API's for other technologies</a></li> - <li><a href="best-practices.html">Qt How-to's & best practices</a></li> - <li><a href="developing-with-qt.html">Cross-platform development</a></li> + <li><a href="declarativeui.html">Qt Quick</a></li> + <li><a href="qdeclarativeintroduction.html">Introduction to QML</a></li> + <li><a href="qdeclarativeelements.html">QML Elements</a></li> + <li><a href="qt-gui-concepts.html">UI components</a></li> + <li><a href="declarativeui.html">Qt & GUI design</a></li> </ul> </div> </div> diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 22d858f..afb17c4 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -51,6 +51,7 @@ \o \l {Exception Safety with Symbian} \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support} \o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake} + \o \l {Symbian Platform Security Requirements} {Symbian Platform Security Requirements} \endlist \o \list @@ -60,6 +61,22 @@ */ /*! + \page symbian-platform-security-requirements.html + + \title Symbian Platform Security Requirements + \ingroup qtsymbian + + On Symbian, processes that access media via the network must + have the \c NetworkServices platform security capability. If the client + process lacks this capability, operations will result in errors. + This failure is indicated by a state() of Phonon::ErrorState. + + Platform security capabilities are added via the + \l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY} + qmake variable. +*/ + +/*! \page symbian-with-qt-introduction.html \title The Symbian platform - Introduction to Qt diff --git a/doc/src/template/style/OfflineStyle.css b/doc/src/template/style/OfflineStyle.css index afa7de0..9f5d28b 100644 --- a/doc/src/template/style/OfflineStyle.css +++ b/doc/src/template/style/OfflineStyle.css @@ -1,588 +1,26 @@ @media screen { - html - { - color: #000000; - background: #FFFFFF; - } - body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td - { - margin: 0; - padding: 0; - } - table - { - border-collapse: collapse; - border-spacing: 0; - } - fieldset, img - { - border: 0; - } - address, caption, cite, code, dfn, em, strong, th, var, optgroup - { - font-style: inherit; - font-weight: inherit; - } - del, ins - { - text-decoration: none; - } - li - { - list-style: none; - } - caption, th - { - text-align: left; - } - h1, h2, h3, h4, h5, h6 - { - font-size: 100%; - } - q:before, q:after - { - content: ''; - } - abbr, acronym - { - border: 0; - font-variant: normal; - } - sup - { - vertical-align: baseline; - } - sub - { - vertical-align: baseline; - } - tt, .qmlreadonly span, .qmldefault span - { - word-spacing:5px; - } - .heading - { - font: normal 600 16px/1.0 Arial; - } - .subtitle - { - font-size: 13px; - } - .small-subtitle - { - font-size: 13px; - } - legend - { - color: #000000; - } - input, button, textarea, select, optgroup, option - { - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; - } - input, button, textarea, select - { - font-size: 100%; - } - body - { - font: normal 13px/1.2 Verdana; - color: #363534; - } - strong - { - font-weight: bold; - } - em - { - font-style: italic; - } - a - { - color: #00732f; - text-decoration: none; - } - .header, .footer, .wrapper - { - /*min-width: 600px;*/ - max-width: 1500px; - margin: 0 5px; - } + .wrapper { - position:relative; top:50px; + background: none; + } .wrapper .bd { + background: none; position: relative; } - .header, .footer - { - display: block; - clear: both; - overflow: hidden; - } - .header - { - height: 115px; - position: relative; - } - - - .header .qtref - { - position: absolute; - top: 28px; - left: 88px; - width: 302px; - height: 22px; - } - .header .qtref span - { - display: block; - height: 22px; - } - .wrap .content h1 - { - font: 600 18px/1.2 Arial; - } - .wrap .content h2 - { - font: 600 16px/1.2 Arial; - } - .wrap .content h3 - { - font: 600 14px/1.2 Arial; - } - .wrap .content h4 - { - font: 600 12px/1.2 Arial; - } - - .wrap .content p - { - line-height: 20px; - padding: 5px; - } - .wrap .content table p - { - line-height: 20px; - padding: 0px; - } - .wrap .content ul - { - padding-left: 25px; - padding-top: 10px; - } - a:hover - { - color: #4c0033; - text-decoration: underline; - } - .content a:visited - { - color: #4c0033; - text-decoration: none; - } - .content a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - - pre - { - border: 1px solid #DDDDDD; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - overflow-x: auto; - } - table, pre - { - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #E6E6E6; - border-collapse: separate; - font-size: 11px; - /*min-width: 395px;*/ - margin-bottom: 25px; - display: inline-block; - } - thead - { - margin-top: 5px; - font:600 12px/1.2 Arial; - } - th - { - padding: 5px 15px 5px 15px; - background-color: #E1E1E1; - /* border-bottom: 1px solid #E6E6E6;*/ - border-left: 1px solid #E6E6E6; - /* border-right: 1px solid #E6E6E6;*/ - } - td - { - padding: 3px 15px 3px 20px; - /* border-left: 1px solid #E6E6E6; - border-right: 1px solid #E6E6E6;*/ - } - tr.odd td:hover, tr.even td:hover - { - /* border-right: 1px solid #C3C3C3; - border-left: 1px solid #C3C3C3;*/ - } - - td.rightAlign - { - padding: 3px 15px 3px 10px; - } - table tr.odd - { - border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; - color: #66666E; - } - table tr.even - { - border-left: 1px solid #E6E6E6; - background-color: #ffffff; - color: #66666E; - } - table tr.odd td:hover, table tr.even td:hover - { - background-color: #E6E6E6; - } - - span.comment - { - color: #8B0000; - font-style: italic; - } - span.string, span.char - { - color: #254117; - } - - .qmltype - { - text-align: center; - font-size: 160%; - } - .qmlreadonly - { - float: right; - color: #254117; - } - - .qmldefault - { - float: right; - color: red; - } - - .footer - { - border-top:1px solid #E5E5E5; - min-height: 100px; - color: #797775; - font: normal 9px/1 Verdana; - text-align: center; - padding-top: 40px; - margin: 0; - } - .wrap - { - margin: 0 5px 0 5px; - } - .wrap .toolbar - { - display:block; - } - - .wrap .breadcrumb ul li - { - float: left; - background: url(../images/breadcrumb.png) no-repeat 0 5px; - padding-left: 15px; - margin-left: 15px; - font-weight: bold; - } - .wrap .breadcrumb ul li.last - { - font-weight: normal; - } - .wrap .breadcrumb ul li a - { - /* color: #363534;*/ - color: #00732F; - } - .wrap .breadcrumb ul li.first - { - background-image: none; - padding-left: 0; - margin-left: 0; - } - .wrap .content - { - word-wrap:break-word; - } - .wrap .content li - { - /*padding-left: 12px;*/ - background: url(../images/bullet_sq.png) no-repeat 0 5px; - font: normal 400 10pt/1 Verdana; - /* color: #44a51c;*/ - margin-bottom: 10px; - } - - .offline .wrap .content - { - padding-top: 15px; - } - - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - - hr - { - background-color: #E6E6E6; - border: 1px solid #E6E6E6; - height: 1px; - width: 100%; - text-align: left; - margin: 5px 0px 5px 0px; - } - - .content .alignedsummary - { - margin: 5px; - width:100%; - } - - - .toc - { - float: right; - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #DDDDDD; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - height: auto; - width: 200px; - } - - .toc h3, .generic a - { - font: 600 12px/1.2 Arial; - } - - .wrap .content .toc ul - { - padding-left: 0px; - } - - - .wrap .content .toc .level2 - { - margin-left: 15px; - } - - .wrap .content .toc .level3 - { - margin-left: 30px; - } - - .content .toc li - { - font: normal 10px/1.2 Verdana; - background: url(../images/bullet_dn.png) no-repeat 0 5px; - } - - - .generic{ - max-width:75%; - } - .generic td{ - padding:0; - } - - .generic .odd .alphaChar{ - background-color: #F6F6F6; - } - - .generic .even .alphaChar{ - background-color: #FFFFFF; - } - - .highlightedCode - { - margin:10px; - } - - .flowList{ - vertical-align:top; - } - .alphaChar{ - width:100%; - background-color:#F6F6F6; - border:1px solid #E6E6E6; - font-size:12pt; - padding-left:10px; - margin-top:10px; - margin-bottom:10px; - } - - .flowList dl{ - } - .flowList dd{ - display:inline-block; - margin-left:10px; - width:250px; - } - .wrap .content .flowList p{ - padding:0px; - } - - .relpage - { - -moz-border-radius: 7px 7px 7px 7px; - border: 1px solid #DDDDDD; - padding: 25px 25px; - clear: both; - } - .relpage ul - { - float: none; - padding: 15px; - } - .content .relpage li - { - font: normal 11px/1.2 Verdana; - } - h3.fn, span.fn - { - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - font-weight: bold; - word-spacing:3px; - } - - .functionIndex { - font-size:12pt; - word-spacing:10px; - margin-bottom:10px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - width:100%; - } - - .centerAlign { text-align:center;} - .rightAlign {text-align:right;} - .leftAlign {text-align:left;} - .topAlign{vertical-align:top } - .functionIndex a{display:inline-block;} - - /* start index box */ - .indexbox - { - width: 100%; - display:inline-block; - } - - .indexboxcont { display: block; } - - .indexboxbar - { - border-bottom:1px solid #E5E5E5; - margin-bottom: 25px; - } - - .indexboxcont .section - { - display: inline-block; - padding:0 2% 0 1%; - vertical-align:top; - } - - .indexboxcont .section { - float: left; - } - - .indexboxcont .section p - { - padding-top: 20px; - padding-bottom: 20px; - } - .indexboxcont .sectionlist - { - display: inline-block; - vertical-align:top; - padding: 0; - } - .indexboxcont .sectionlist ul - { - margin-bottom: 20px; - } - - .indexboxcont .sectionlist ul li - { - line-height: 12px; - } - - .content .indexboxcont li - { - font: normal 600 13px/1 Verdana; - } - - .indexbox a:hover, .indexbox a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - - .indexbox a:visited - { - color: #00732f; - text-decoration: none; - } - - .indexbox .indexIcon { - width: 11%; - } - - - .indexboxcont:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - + body.offline { background-image: none; + background-color: #FFFFFF; + } .offline .footer { @@ -811,22 +249,3 @@ ul.sf-menu li li li.sfHover ul { } /* end of screen media */ -/* start of print media */ - -@media print -{ - input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft - { - display: none; - background: none; - } - .content - { - position: absolute; - top: 0px; - left: 0px; - background: none; - display: block; - } -} -/* end of print media */ diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 184a832..9f80921 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1,6 +1,8 @@ @media screen { - html + +/* basic elements */ + html { color: #000000; background: #FFFFFF; @@ -18,8 +20,7 @@ fieldset, img { border: 0; - height:100%; - width:100% + max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { @@ -41,7 +42,6 @@ h1, h2, h3, h4, h5, h6 { font-size: 100%; -/* font-weight: normal; */ } q:before, q:after { @@ -52,11 +52,7 @@ border: 0; font-variant: normal; } - sup - { - vertical-align: baseline; - } - sub + sup, sub { vertical-align: baseline; } @@ -64,19 +60,6 @@ { word-spacing:5px; } - .heading - { - font: normal 600 16px/1.0 Arial; - padding-bottom: 15px; - } - .subtitle - { - font-size: 13px; - } - .small-subtitle - { - font-size: 13px; - } legend { color: #000000; @@ -92,9 +75,19 @@ { font-size: 100%; } + strong + { + font-weight: bold; + } + em + { + font-style: italic; + } + + /* adding Qt theme */ html { - background-color: #e5e5e5; + /* background-color: #e5e5e5;*/ } body { @@ -102,73 +95,115 @@ font: normal 13px/1.2 Verdana; color: #363534; } - strong + a { - font-weight: bold; + color: #00732f; + text-decoration: none; } - em + hr { - font-style: italic; + background-color: #E6E6E6; + border: 1px solid #E6E6E6; + height: 1px; + width: 100%; + text-align: left; + margin: 15px 0px 15px 0px; } - a + + pre { - color: #00732f; - text-decoration: none; + border: 1px solid #DDDDDD; + -moz-border-radius: 7px 7px 7px 7px; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + overflow-x: auto; } - .header, .footer, .wrapper + table, pre { - min-width: 600px; - max-width: 1500px; - margin: 0 30px; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 11px; + margin-bottom: 25px; } - .wrapper + pre.highlightedCode { + display: block; + overflow:hidden; + } + thead { - background: url(../images/bg_r.png) repeat-y 100% 0; + margin-top: 5px; + font:600 12px/1.2 Arial; } - .wrapper .hd + th { - padding-left: 216px; - height: 15px; - background: url(../images/page.png) no-repeat 0 0; - overflow: hidden; + padding: 5px 15px 5px 15px; + background-color: #E1E1E1; + border-left: 1px solid #E6E6E6; } - .offline .wrapper .hd + td { - background: url(../images/page.png) no-repeat 0 -15px; + padding: 3px 15px 3px 20px; } - .wrapper .hd span + tr.odd td:hover, tr.even td:hover {} + + td.rightAlign + { + padding: 3px 5px 3px 10px; + } + table tr.odd { - height: 15px; - display: block; - overflow: hidden; - background: url(../images/page.png) no-repeat 100% -30px; + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; + color: #66666E; } - .wrapper .bd + table tr.even { - background: url(../images/bg_l.png) repeat-y 0 0; - position: relative; + border-left: 1px solid #E6E6E6; + background-color: #ffffff; + color: #66666E; } - .offline .wrapper .bd + table tr.odd td:hover, table tr.even td:hover { - background: url(../images/bg_l_blank.png) repeat-y 0 0; + /* background-color: #E6E6E6;*/ /* disabled until further notice */ } - .wrapper .ft + + span.comment { - padding-left: 216px; - height: 15px; - background: url(../images/page.png) no-repeat 0 -75px; - overflow: hidden; + color: #8B0000; + font-style: italic; } - .offline .wrapper .ft + span.string, span.char { - background: url(../images/page.png) no-repeat 0 -90px; + color: #254117; } - .wrapper .ft span + + +/* end basic elements */ + +/* font style elements */ + .heading { - height: 15px; - display: block; - background: url(../images/page.png) no-repeat 100% -60px; - overflow: hidden; + font: normal bold 16px/1.0 Arial; + padding-bottom: 15px; + } + .subtitle + { + font-size: 13px; + } + .small-subtitle + { + font-size: 13px; + } +/* end font style elements */ + +/* global settings*/ + .header, .footer, .wrapper + { + min-width: 600px; + max-width: 1500px; + margin: 0 30px; } .header, .footer { @@ -176,6 +211,17 @@ clear: both; overflow: hidden; } + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + +/* end global settings*/ +/* header elements */ .header { height: 115px; @@ -203,7 +249,247 @@ text-indent: -999em; background: url(../images/sprites-combined.png) no-repeat -78px -235px; } + .content a:visited + { + color: #4c0033; + text-decoration: none; + } + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + #nav-topright + { + height: 70px; + } + + #nav-topright ul + { + list-style-type: none; + float: right; + width: 370px; + margin-top: 11px; + } + + #nav-topright li + { + display: inline-block; + margin-right: 20px; + float: left; + } + + #nav-topright li.nav-topright-last + { + margin-right: 0; + } + + #nav-topright li a + { + background: transparent url(../images/sprites-combined.png) no-repeat; + height: 18px; + display: block; + overflow: hidden; + text-indent: -9999px; + } + + #nav-topright li.nav-topright-home a + { + width: 65px; + background-position: -2px -91px; + } + + #nav-topright li.nav-topright-home a:hover + { + background-position: -2px -117px; + } + + + #nav-topright li.nav-topright-dev a + { + width: 30px; + background-position: -76px -91px; + } + + #nav-topright li.nav-topright-dev a:hover + { + background-position: -76px -117px; + } + + + #nav-topright li.nav-topright-labs a + { + width: 40px; + background-position: -114px -91px; + } + + #nav-topright li.nav-topright-labs a:hover + { + background-position: -114px -117px; + } + + #nav-topright li.nav-topright-doc a + { + width: 32px; + background-position: -162px -91px; + } + + #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a + { + background-position: -162px -117px; + } + + #nav-topright li.nav-topright-blog a + { + width: 40px; + background-position: -203px -91px; + } + + #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a + { + background-position: -203px -117px; + } + + #nav-topright li.nav-topright-shop a + { + width: 40px; + background-position: -252px -91px; + } + + #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a + { + background-position: -252px -117px; + } + + #nav-logo + { + background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; + left: -3px; + position: absolute; + width: 75px; + height: 75px; + top: 13px; + } + #nav-logo a + { + width: 75px; + height: 75px; + display: block; + text-indent: -9999px; + overflow: hidden; + } + + + .shortCut-topleft-inactive + { + padding-left: 3px; + background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; + height: 20px; + width: 47px; + } + .shortCut-topleft-inactive span + { + font-variant: normal; + } + .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover + { + text-decoration:none; + } + #shortCut + { + padding-top: 10px; + font-weight: bolder; + color: #b0adab; + } + #shortCut ul + { + list-style-type: none; + float: left; + width: 347px; + margin-left: 100px; + } + #shortCut li + { + display: inline-block; + margin-right: 25px; + float: left; + white-space: nowrap; + } + #shortCut li a + { + color: #b0adab; + } + #shortCut li a:hover + { + color: #44a51c; + } + + + +/* end header elements */ +/* content and sidebar elements */ + .wrapper + { + background: url(../images/bg_r.png) repeat-y 100% 0; + } + .wrapper .hd + { + padding-left: 216px; + height: 15px; + background: url(../images/page.png) no-repeat 0 0; + overflow: hidden; + } + + + + + .wrapper .hd span + { + height: 15px; + display: block; + overflow: hidden; + background: url(../images/page.png) no-repeat 100% -30px; + } + .wrapper .bd + { + background: url(../images/bg_l.png) repeat-y 0 0; + position: relative; + } + + + + + .wrapper .ft + { + padding-left: 216px; + height: 15px; + background: url(../images/page.png) no-repeat 0 -75px; + overflow: hidden; + } + + + + + .wrapper .ft span + { + height: 15px; + display: block; + background: url(../images/page.png) no-repeat 100% -60px; + overflow: hidden; + } + .navTop{ + float:right; + display:block; + padding-right:15px; + + } + + + +/* end content and sidebar elements */ +/* sidebar elements */ .sidebar { float: left; @@ -212,10 +498,10 @@ font-size: 11px; } - .offline .sidebar, .offline .feedback, .offline .t_button - { - display: none; - } + + + + .sidebar .searchlabel { @@ -258,9 +544,8 @@ .sidebar .box h2 { - font: 600 16px/1.2 Arial; + font: bold 16px/1.2 Arial; padding: 0; -/* min-height: 32px;*/ } .sidebar .box h2 span { @@ -273,10 +558,6 @@ } .sidebar #lookup.box h2 span { -/* background: url(../images/sprites-combined.png) no-repeat -6px -311px; - width: 27px; - height: 35px; - margin-right: 13px;*/ } .sidebar .box#topics h2 { @@ -284,10 +565,6 @@ } .sidebar #topics.box h2 span { - /* background: url(../images/sprites-combined.png) no-repeat -94px -311px; - width: 27px; - height: 32px; - margin-right: 13px;*/ } .sidebar .box#examples h2 { @@ -295,10 +572,6 @@ } .sidebar #examples.box h2 span { - /* background: url(../images/sprites-combined.png) no-repeat -48px -311px; - width: 30px; - height: 31px; - margin-right: 9px;*/ } .sidebar .box .list @@ -315,7 +588,6 @@ } .sidebar .box ul { - /*padding:10px;*/ padding-bottom:5px; padding-left:10px; padding-top:5px; @@ -342,16 +614,40 @@ color:#AAD2F0; font-style:italic; } + .sidebar .search form input.loading + { + background:url("../images/spinner.gif") no-repeat scroll right center transparent; + } +.floatingResult{ + z-index:1; + position:relative; + padding-top:0px; + background-color:white; + border:solid 1px black; + height:250px; + width:600px; + overflow-x:hidden; + overflow-y:auto; +} + + .floatingResult:hover{ + display:block; + } + .floatingResult:hover{ + } + +/* end sidebar elements */ +/* content elements */ .wrap { margin: 0 5px 0 208px; overflow: visible; } - .offline .wrap - { - margin: 0 5px 0 5px; - } + + + + .wrap .toolbar { background-color: #fafafa; @@ -437,8 +733,11 @@ color: #00732F; } - .offline .wrap .breadcrumb + + .wrap .content { + padding: 30px; + word-wrap:break-word; } .wrap .breadcrumb ul @@ -466,48 +765,51 @@ padding-left: 0; margin-left: 0; } - .wrap .content - { - padding: 30px; - word-wrap:break-word; - } + + + + .wrap .content ol li { + background:none; + font:normal 10pt/1 Verdana; + + margin-bottom:10px; + margin-left:12px; + /*list-style-type:disc;*/ + } + .wrap .content li { - /*padding-left: 12px;*/ background: url(../images/bullet_sq.png) no-repeat 0 5px; font: normal 400 10pt/1 Verdana; - /* color: #44a51c;*/ margin-bottom: 10px; padding-left:12px; } - .content li:hover - { - /* text-decoration: underline;*/ - } - .offline .wrap .content - { - padding-top: 15px; - } + + + + + + + + + .content li:hover {} .wrap .content h1 { - font: 600 18px/1.2 Arial; + font: bold 18px/1.2 Arial; } .wrap .content h2 { - border-bottom:1px solid #DDDDDD; font:600 16px/1.2 Arial; margin-top:15px; - width:100%; - + width:100%; } .wrap .content h3 { - font: 600 14px/1.2 Arial; - /*border-bottom:1px solid #DDDDDD;*/ + font: bold 14px/1.2 Arial; font:600 16px/1.2 Arial; margin-top:15px; width:100%; @@ -516,7 +818,6 @@ { line-height: 20px; padding: 5px; - /* text-align:justify;*/ } .wrap .content table p { @@ -533,25 +834,6 @@ color: #4c0033; text-decoration: underline; } - .content a:visited - { - color: #4c0033; - text-decoration: none; - } - .content a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } .footer - { - min-height: 100px; - color: #797775; - font: normal 9px/1 Verdana; - text-align: center; - padding-top: 40px; - background-color: #E6E7E8; - margin: 0; - } .feedback { float: none; @@ -568,267 +850,36 @@ color: #00732F; text-decoration: underline; } - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - #nav-topright - { - height: 70px; - } - - #nav-topright ul - { - list-style-type: none; - float: right; - width: 370px; - margin-top: 11px; - } - - #nav-topright li - { - display: inline-block; - margin-right: 20px; - float: left; - } - - #nav-topright li.nav-topright-last - { - margin-right: 0; - } - - #nav-topright li a - { - background: transparent url(../images/sprites-combined.png) no-repeat; - height: 18px; - display: block; - overflow: hidden; - text-indent: -9999px; - } - - #nav-topright li.nav-topright-home a - { - width: 65px; - background-position: -2px -91px; - } - - #nav-topright li.nav-topright-home a:hover - { - background-position: -2px -117px; - } - - - #nav-topright li.nav-topright-dev a - { - width: 30px; - background-position: -76px -91px; - } - - #nav-topright li.nav-topright-dev a:hover - { - background-position: -76px -117px; - } - - - #nav-topright li.nav-topright-labs a - { - width: 40px; - background-position: -114px -91px; - } - - #nav-topright li.nav-topright-labs a:hover - { - background-position: -114px -117px; - } - - #nav-topright li.nav-topright-doc a - { - width: 32px; - background-position: -162px -91px; - } - - #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a - { - background-position: -162px -117px; - } - - #nav-topright li.nav-topright-blog a - { - width: 40px; - background-position: -203px -91px; - } - - #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a - { - background-position: -203px -117px; - } - - #nav-topright li.nav-topright-shop a - { - width: 40px; - background-position: -252px -91px; - } - - #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a - { - background-position: -252px -117px; - } - - #nav-logo - { - background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; - left: -3px; - position: absolute; - width: 75px; - height: 75px; - top: 13px; - } - #nav-logo a - { - width: 75px; - height: 75px; - display: block; - text-indent: -9999px; - overflow: hidden; - } - - - .shortCut-topleft-inactive - { - padding-left: 3px; - background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; - height: 20px; - width: 47px; - } - .shortCut-topleft-inactive span - { - font-variant: normal; - } - .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover - { - text-decoration:none; + .alphaChar{ + width:100%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; } - #shortCut - { - padding-top: 10px; - font-weight: bolder; - color: #b0adab; - } - #shortCut ul - { - list-style-type: none; - float: left; - width: 347px; - margin-left: 100px; - } - #shortCut li - { - display: inline-block; - margin-right: 25px; - float: left; - white-space: nowrap; - } - #shortCut li a - { - color: #b0adab; - } - #shortCut li a:hover - { - color: #44a51c; - } + .flowList{ + vertical-align:top; + } - hr - { - background-color: #E6E6E6; - border: 1px solid #E6E6E6; - height: 1px; - width: 100%; - text-align: left; - margin: 15px 0px 15px 0px; - } + .flowList dl{ + } + .flowList dd{ + display:inline-block; + margin-left:10px; + width:250px; + } + .wrap .content .flowList p{ + padding:0px; + } .content .alignedsummary { margin: 15px; } - pre - { - border: 1px solid #DDDDDD; - -moz-border-radius: 7px 7px 7px 7px; - margin: 0 20px 10px 10px; - padding: 20px 15px 20px 20px; - overflow-x: auto; - } - table, pre - { - -moz-border-radius: 7px 7px 7px 7px; - background-color: #F6F6F6; - border: 1px solid #E6E6E6; - border-collapse: separate; - font-size: 11px; - /*min-width: 395px;*/ - margin-bottom: 25px; - /* display: inline-block;*/ - } - thead - { - margin-top: 5px; - font:600 12px/1.2 Arial; - } - th - { - padding: 5px 15px 5px 15px; - background-color: #E1E1E1; - /* border-bottom: 1px solid #E6E6E6;*/ - border-left: 1px solid #E6E6E6; - /* border-right: 1px solid #E6E6E6;*/ - } - td - { - padding: 3px 15px 3px 20px; - /* border-left: 1px solid #E6E6E6; - border-right: 1px solid #E6E6E6;*/ - } - tr.odd td:hover, tr.even td:hover - { - /* border-right: 1px solid #C3C3C3; - border-left: 1px solid #C3C3C3;*/ - } - - td.rightAlign - { - padding: 3px 5px 3px 10px; - } - table tr.odd - { - border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; - color: #66666E; - } - table tr.even - { - border-left: 1px solid #E6E6E6; - background-color: #ffffff; - color: #66666E; - } - table tr.odd td:hover, table tr.even td:hover - { - background-color: #E6E6E6; - } - - span.comment - { - color: #8B0000; - font-style: italic; - } - span.string, span.char - { - color: #254117; - } + .qmltype { @@ -856,7 +907,6 @@ *.qmlitem p { } - #feedbackBox { display: none; @@ -934,16 +984,14 @@ .toc h3, .generic a { - font: 600 12px/1.2 Arial; + font: bold 12px/1.2 Arial; } .generic{ - /*max-width:75%;*/ } .generic td{ padding:5px; } - .generic .alphaChar{ margin-top:5px; } @@ -991,6 +1039,16 @@ padding-left: 0px; } + .wrap .content .toc h3{ + border-bottom:0px; + margin-top:0px; + } + + .wrap .content .toc h3 a:hover{ + color:#00732F; + text-decoration:none; + } + .wrap .content .toc .level2 { @@ -1007,7 +1065,6 @@ font: normal 10px/1.2 Verdana; background: url(../images/bullet_dn.png) no-repeat 0 5px; } - .relpage { -moz-border-radius: 7px 7px 7px 7px; @@ -1071,6 +1128,24 @@ .functionIndex a{ display:inline-block; } + +/* end content elements */ +/* footer elements */ + + .footer + { + min-height: 100px; + color: #797775; + font: normal 9px/1 Verdana; + text-align: center; + padding-top: 40px; + background-color: #E6E7E8; + margin: 0; + } +/* end footer elements */ + + + /* start index box */ .indexbox @@ -1082,15 +1157,15 @@ .indexboxcont { display: block; - /* overflow: hidden;*/ + } .indexboxbar { background: transparent url(../images/horBar.png ) repeat-x left bottom; margin-bottom: 25px; - /* background-image: none; - border-bottom: 1px solid #e2e2e2;*/ + + } .indexboxcont .section @@ -1141,7 +1216,7 @@ .content .indexboxcont li { - font: normal 600 13px/1 Verdana; + font: normal bold 13px/1 Verdana; } .indexbox a:hover, .indexbox a:visited:hover @@ -1190,87 +1265,285 @@ visibility: hidden; } -.sidebar .search form input.loading -{ - background:url("../images/spinner.gif") no-repeat scroll right center transparent; -} - /* end of screen media */ - -.flowList{ -vertical-align:top; -} -.alphaChar{ -width:100%; -background-color:#F6F6F6; -border:1px solid #E6E6E6; --moz-border-radius: 7px 7px 7px 7px; -font-size:12pt; -padding-left:10px; -margin-top:10px; -margin-bottom:10px; -} -.flowList dl{ -} -.flowList dd{ -display:inline-block; -margin-left:10px; -width:250px; -} -.wrap .content .flowList p{ -padding:0px; -} -pre.highlightedCode { - display: block; - overflow:hidden; -} -.floatingResult{ - z-index:1; - position:relative; - padding-top:0px; - background-color:white; - border:solid 1px black; - height:250px; - width:600px; - overflow-x:hidden; - overflow-y:auto; -} +/* start of offline spec*/ + .offline .wrapper .hd + { + background: url(../images/page.png) no-repeat 0 -15px; + } + .offline .wrapper .bd + { + background: url(../images/bg_l_blank.png) repeat-y 0 0; + } + .offline .wrapper .ft + { + background: url(../images/page.png) no-repeat 0 -90px; + } + .offline .sidebar, + .offline .feedback, + .offline .t_button, + .offline #narrowsearch, + .offline #narrowmenu + { + display: none; + } + .offline .wrap + { + margin: 0 5px 0 5px; + } + .offline .wrap .breadcrumb + { + } - .floatingResult:hover{ - display:block; - } - .floatingResult:hover{ - /*display:none;*/ - } + .offline .wrap .content + { + padding-top: 15px; + } - .wrap .content ol li { - background:none; - font:400 10pt/1 Verdana; - margin-bottom:10px; - margin-left:12px; + +/* end of offline spec*/ + +/* start of creator spec*/ + .creator + { + margin-left:0px; + margin-right:0px; + padding-left:0px; + padding-right:0px; } - .wrap .content ol li { + .creator .wrap .content ol li { list-style-type:decimal; } - .navTop{ - float:right; - display:block; - padding-right:15px; - /*margin-top:10px;*/ + .creator .header .icon, + .creator .feedback, + .creator .t_button, + .creator .feedback, + .creator #feedbackBox, + .creator #feedback, + .creator #blurpage, + .creator .indexbox .indexIcon span, + .creator .wrapper .hd, + .creator .indexbox .indexIcon, + .creator .header #nav-logo, + .creator #offlinemenu, + .creator #offlinesearch, + .creator .header #nav-topright, + .creator .header #shortCut , + .creator .wrapper .hd, + .creator .wrapper .ft, + .creator .sidebar, + .creator .wrap .feedback + { + display:none; + } + + body.creator + { + background: none; + + font: normal 13px/1.2 Verdana; + color: #363534; + background-color: #FFFFFF; + } + + + + .creator .header, .footer, .wrapper + { + max-width: 1500px; + margin: 0px; + } + + .creator .wrapper + { + position:relative; + top:50px; + } + .creator .wrapper .bd + { + + background:#FFFFFF; } + + + .creator .header, .footer + { + display: block; + clear: both; + overflow: hidden; + } + .creator .wrap .content p + + { + line-height: 20px; + padding: 5px; + } + + .creator .header .qtref span + { + background:none; + } + + - .wrap .content .toc h3{ - border-bottom:0px; - margin-top:0px; + .creator .footer + { + border-top:1px solid #E5E5E5; + min-height: 100px; + margin:0px; + } + + .creator .wrap + { + + padding:0 5px 0 5px; + margin: 0px; + } + .creator .wrap .toolbar + { + + + border-bottom:1px solid #E5E5E5; + width:100%, + } + .creator .wrap .breadcrumb ul li a + { + /* color: #363534;*/ + color: #00732F; + } + + .creator .wrap .content + { + padding: 0px; + word-wrap:break-word; + } + + .creator .wrap .content ol li { + background:none; + font: inherit; + padding-left: 0px; + } + + .creator .wrap .content .descr ol li { + margin-left: 45px; + + } + .creator .content .alignedsummary + { + margin: 5px; + width:100%; + } + .creator .generic{ + max-width:75%; + } + .creator .generic td{ + padding:0; } + .creator .indexboxbar + { + border-bottom:1px solid #E5E5E5; + margin-bottom: 25px; + background: none; + } - .wrap .content .toc h3 a:hover{ - color:#00732F; - text-decoration:none; + + + .creator .header + { + width: 100%; + margin: 0; + height: auto; + background-color: #ffffff; + padding: 10px 0 5px 0; + overflow: visible; + border-bottom: solid #E5E5E5 1px; + z-index:1; + + + + + + + + + position:fixed; + } + + + .creator .header .content + { + } + .creator .header .qtref + { + color: #00732F; + position: static; + float: left; + margin-left: 5px; + font: bold 18px/1 Arial; + } + + .creator .header .qtref:visited + { + color: #00732F; + } + .creator .header .qtref:hover + { + color: #00732F; + text-decoration:none; + } + .creator .header .qtref span + { + background-image: none; + text-indent: 0; + text-decoration:none; + } + + + + + + + .creator .wrap .toolbar + { + display:block; + padding-top:0px; + } + + + + .creator .wrap .breadcrumb ul li { + font-weight: normal; + } + + .creator .wrap .breadcrumb ul li a { + /*color: #44a51c;*/ + } + + .creator .wrap .breadcrumb ul li.last a { + /*color: #363534;*/ + } + + .creator #narrowmenu ul + { + border-bottom:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #E5E5E5; } + + .creator #narrowmenu li ul { + margin-top:-15px; + } + + + .creator .toc { + margin:10px 20px 10px 10px; + } +/* end of creator spec*/ +} + /* end of screen media */ /* start of print media */ diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index 68f8712..80567ef 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -55,7 +55,7 @@ Rectangle { Image { id: background anchors.fill: parent - source: "../shared/pics/background.jpg" + source: "../shared/pics/background.png" fillMode: Image.PreserveAspectCrop } } diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h index 5b5827b..c92db44 100644 --- a/examples/network/bearermonitor/sessionwidget.h +++ b/examples/network/bearermonitor/sessionwidget.h @@ -41,12 +41,12 @@ #ifndef SESSIONWIDGET_H #define SESSIONWIDGET_H +#include <qnetworksession.h> #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) #include "ui_sessionwidget_maemo.h" #else #include "ui_sessionwidget.h" #endif -#include <qnetworksession.h> QT_USE_NAMESPACE diff --git a/examples/network/bearermonitor/sessionwidget_maemo.ui b/examples/network/bearermonitor/sessionwidget_maemo.ui index ca68246..8867509 100644 --- a/examples/network/bearermonitor/sessionwidget_maemo.ui +++ b/examples/network/bearermonitor/sessionwidget_maemo.ui @@ -214,6 +214,54 @@ </item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="errorStringLayout_2"> + <item> + <widget class="QLabel" name="rxData"> + <property name="text"> + <string>0</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="txData"> + <property name="text"> + <string>0</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="errorStringLayout_3"> + <item> + <widget class="QLabel" name="errorStringLabel_2"> + <property name="text"> + <string>Active Time:</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="activeTime"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>0 seconds</string> + </property> + </widget> + </item> + </layout> + </item> </layout> </item> <item> diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 5324e65..0a18b47 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -86,20 +86,20 @@ defineReplace(imageCollectionCmd) { for(image, $$list($$split(1))) { EMBEDDED_IMAGES += $$image count(EMBEDDED_IMAGES, 5) { - isEmpty(RET): RET += echo $$EMBEDDED_IMAGES > images.tmp $$escape_expand(\\n\\t) - else: RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\\n\\t) + isEmpty(RET): RET += echo $$EMBEDDED_IMAGES > $${UI_DIR}/images.tmp $$escape_expand(\\n\\t) + else: RET += echo $$EMBEDDED_IMAGES >> $${UI_DIR}/images.tmp $$escape_expand(\\n\\t) unset(EMBEDDED_IMAGES) } } - !isEmpty(EMBEDDED_IMAGES):RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\\n\\t) + !isEmpty(EMBEDDED_IMAGES):RET += echo $$EMBEDDED_IMAGES >> $${UI_DIR}/images.tmp $$escape_expand(\\n\\t) !isEmpty(RET) { - RET += $$QMAKE_UIC3 -embed $$TARGET -f images.tmp -o $$2 $$escape_expand(\\n\\t) + RET += $$QMAKE_UIC3 -embed $$TARGET -f $${UI_DIR}/images.tmp -o $$2 $$escape_expand(\\n\\t) return($$RET) } return($$QMAKE_UIC3 -embed $$TARGET $$1 -o $$2) } -image_collection.output = qmake_image_collection$${first(QMAKE_EXT_CPP)} +image_collection.output = $${UI_DIR}/qmake_image_collection$${first(QMAKE_EXT_CPP)} image_collection.variable_out = SOURCES image_collection.input = IMAGES image_collection.CONFIG += combine @@ -109,7 +109,7 @@ image_collection.name = UIC3 Image collection in ${QMAKE_FILE_OUT} silent:image_collection.commands = @echo uic3 -embed ${QMAKE_FILE_IN} && $$image_collection.commands } else { image_collection.commands = ${QMAKE_FUNC_imageCollectionCmd} - silent:image_collection.commands = @echo uic3 -embed $$TARGET -f images.tmp && $image_collection.commands + silent:image_collection.commands = @echo uic3 -embed $$TARGET -f $${UI_DIR}/images.tmp && $image_collection.commands } QMAKE_EXTRA_COMPILERS += image_collection diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf index cced090..a977e7a 100644 --- a/mkspecs/linux-g++-maemo/qmake.conf +++ b/mkspecs/linux-g++-maemo/qmake.conf @@ -27,7 +27,4 @@ QMAKE_CXXFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-call # Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs: DEFINES += QT_GL_NO_SCISSOR_TEST -# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width: -DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 - load(qt_config) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d6b3e09..45a96f5 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1756,6 +1756,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } QStringList tmp_dep = project->values((*it) + ".depends"); QString tmp_dep_cmd; + QString dep_cd_cmd; if(!project->isEmpty((*it) + ".depend_command")) { int argv0 = -1; QStringList cmdline = project->values((*it) + ".depend_command"); @@ -1774,6 +1775,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cmdline[argv0] = escapeFilePath(cmdline.at(argv0)); } } + dep_cd_cmd = QLatin1String("cd ") + + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && "); } QStringList &vars = project->values((*it) + ".variables"); if(tmp_out.isEmpty() || tmp_cmd.isEmpty()) @@ -1875,7 +1879,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), tmp_out); - dep_cmd = fixEnvVariables(dep_cmd); + dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1973,7 +1977,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if(!tmp_dep_cmd.isEmpty() && doDepends()) { char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), out); - dep_cmd = fixEnvVariables(dep_cmd); + dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd); if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { diff --git a/src/3rdparty/phonon/phonon/mediasource.cpp b/src/3rdparty/phonon/phonon/mediasource.cpp index be22dc3..11d2428 100644 --- a/src/3rdparty/phonon/phonon/mediasource.cpp +++ b/src/3rdparty/phonon/phonon/mediasource.cpp @@ -50,7 +50,7 @@ MediaSource::MediaSource(const QString &filename) const QFileInfo fileInfo(filename); if (fileInfo.exists()) { bool localFs = QAbstractFileEngine::LocalDiskFlag & QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag); - if (localFs) { + if (localFs && !filename.startsWith(QLatin1String(":/")) && !filename.startsWith(QLatin1String("qrc://"))) { d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath()); } else { #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri new file mode 100644 index 0000000..575412d --- /dev/null +++ b/src/3rdparty/sqlite.pri @@ -0,0 +1,4 @@ +CONFIG(release, debug|release):DEFINES *= NDEBUG +DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE +INCLUDEPATH += $$PWD/sqlite +SOURCES += $$PWD/sqlite/sqlite3.c diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index ed2ae6e..5cd7f0e 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -470,6 +470,7 @@ \value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces \value TextJustificationForced Ensures that text lines are justified. + \omitvalue TextBypassShaping \omitvalue BreakAnywhere \omitvalue DontClip \omitvalue DontPrint @@ -1730,7 +1731,7 @@ \value Key_MediaLast \value Key_unknown - \value Key_Call A key to answer or initiate a call (see \l Key_ToggleCallHangup for a key to toggle current call state) + \value Key_Call A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state) \value Key_Camera A key to activate the camera shutter \value Key_CameraFocus A key to focus the camera \value Key_Context1 @@ -1738,7 +1739,7 @@ \value Key_Context3 \value Key_Context4 \value Key_Flip - \value Key_Hangup A key to end an ongoing call (see \l Key_ToggleCallHangup for a key to toggle current call state) + \value Key_Hangup A key to end an ongoing call (see Qt::Key_ToggleCallHangup for a key to toggle current call state) \value Key_No \value Key_Select \value Key_Yes diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index 4a25562..1dd51ea 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -155,10 +155,10 @@ public: if ((first - buf) < size) { // underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer makeSpace(len + size, freeSpaceAtStart); - memcpy(first - size, block, size); } first -= size; len += size; + memcpy(first, block, size); } private: diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 9bc4063..739ac4d 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1399,10 +1399,10 @@ QString QProcess::nativeArguments() const \since 4.7 \overload - Sets additional native command line arguments for the program. + Sets additional native command line \a arguments for the program. On operating systems where the system API for passing command line - arguments to a subprocess natively uses a single string, one can + \a arguments to a subprocess natively uses a single string, one can conceive command lines which cannot be passed via QProcess's portable list-based API. In such cases this function must be used to set a string which is \e appended to the string composed from the usual diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 8415259..e3fce18 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1197,7 +1197,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, \l{QAbstractItemModel::}{endInsertRows()} must be called. \sa {Model Classes}, {Model Subclassing Reference}, QModelIndex, - QAbstractItemView, {Using Drag and Drop with Item Views}, + QAbstractItemView, {Using drag & drop with item views}, {Simple DOM Model Example}, {Simple Tree Model Example}, {Editable Tree Model Example}, {Fetch More Example} */ @@ -1761,7 +1761,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const where to place the data. This can occur in a tree when data is dropped on a parent. Models will usually append the data to the parent in this case. - \sa supportedDropActions(), {Using Drag and Drop with Item Views} + \sa supportedDropActions(), {Using drag & drop with item views} */ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) @@ -1798,8 +1798,8 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti reimplement the dropMimeData() function to handle the additional operations. - \sa dropMimeData(), Qt::DropActions, {Using Drag and Drop with Item - Views} + \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item + views} */ Qt::DropActions QAbstractItemModel::supportedDropActions() const { @@ -1815,7 +1815,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const supportedDragActions() is used by QAbstractItemView::startDrag() as the default values when a drag occurs. - \sa Qt::DropActions, {Using Drag and Drop with Item Views} + \sa Qt::DropActions, {Using drag & drop with item views} */ Qt::DropActions QAbstractItemModel::supportedDragActions() const { @@ -1831,7 +1831,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const Sets the supported drag \a actions for the items in the model. - \sa supportedDragActions(), {Using Drag and Drop with Item Views} + \sa supportedDragActions(), {Using drag & drop with item views} */ void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions) { @@ -2547,7 +2547,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star For example, as shown in the diagram, we move three rows from row 2 to 4 in the source, so \a sourceFirst is 2 and \a sourceLast is 4. - We move those items to above row 2 in the destination, so \a destinationRow is 2. + We move those items to above row 2 in the destination, so \a destinationChild is 2. \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 6 @@ -2558,7 +2558,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star \o To append rows to another parent, move them to after the last row. For example, as shown in the diagram, we move three rows to a - collection of 6 existing rows (ending in row 5), so \a destinationStart is 6: + collection of 6 existing rows (ending in row 5), so \a destinationChild is 6: \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 7 diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 57f79a0..b2cf49b 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6954,7 +6954,7 @@ bool QString::isRightToLeft() const /*! \fn bool QString::isRightToLeft() const - \internal + Returns true if the string is read right to left. */ diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 190b22c..1673a03 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1388,26 +1388,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec */ /*! - \property QDeclarativeItem::baseline - \internal -*/ - -/*! - \property QDeclarativeItem::focus - \internal -*/ - -/*! - \property QDeclarativeItem::wantsFocus - \internal -*/ - -/*! - \property QDeclarativeItem::transformOrigin - \internal -*/ - -/*! \fn void QDeclarativeItem::childrenRectChanged(const QRectF &) \internal */ @@ -1970,6 +1950,9 @@ QVariant QDeclarativeItem::inputMethodQuery(Qt::InputMethodQuery query) const return v; } +/*! + \internal + */ void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event) { Q_D(QDeclarativeItem); @@ -1980,6 +1963,9 @@ void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event) d->doneEventPreHandler = true; } +/*! + \internal + */ void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event) { Q_D(QDeclarativeItem); @@ -1990,6 +1976,9 @@ void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event) d->doneEventPreHandler = true; } +/*! + \internal + */ void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event) { Q_D(QDeclarativeItem); @@ -2000,7 +1989,6 @@ void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event) d->doneEventPreHandler = true; } - /*! \internal */ @@ -2543,11 +2531,6 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi \sa {qmlstates}{States} */ -/*! - \property QDeclarativeItem::state - \internal -*/ - /*! \internal */ QString QDeclarativeItemPrivate::state() const { @@ -2570,11 +2553,6 @@ void QDeclarativeItemPrivate::setState(const QString &state) For more information see \l Transform. */ -/*! - \property QDeclarativeItem::transform - \internal -*/ - /*! \internal */ QDeclarativeListProperty<QGraphicsTransform> QDeclarativeItem::transform() { @@ -2863,6 +2841,26 @@ void QDeclarativeItem::setSmooth(bool smooth) } /*! + \property QDeclarativeItem::focus + \internal +*/ + +/*! + \property QDeclarativeItem::transform + \internal +*/ + +/*! + \property QDeclarativeItem::transformOrigin + \internal +*/ + +/*! + \property QDeclarativeItem::wantsFocus + \internal +*/ + +/*! \internal Return the width of the item */ diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index e745ca6..cc7f8e5 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -118,9 +118,9 @@ void QDeclarativeLoaderPrivate::initResize() be instantiated may be specified directly by the \l sourceComponent property, or loaded from a URL via the \l source property. - Loader can be used to delay the creation of a component until it is required. - For example, this loads "Page1.qml" as a component into the Loader element - when the \l MouseArea is clicked: + Loader can be used to delay the creation of a component until it + is required. For example, this loads "Page1.qml" as a component + into the Loader element, when the \l MouseArea is clicked: \code import Qt 4.7 @@ -165,7 +165,6 @@ void QDeclarativeLoaderPrivate::initResize() /*! \internal \class QDeclarativeLoader - \qmlclass Loader */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f3eef23..d13e139 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -202,8 +202,9 @@ QString QDeclarativeTextEdit::text() const Sets the font size in pixels. - Using this function makes the font device dependent. - Use \l font.pointSize to set the size of the font in a device independent manner. + Using this function makes the font device dependent. Use + \l{TextEdit::font.pointSize} to set the size of the font in a + device independent manner. */ /*! diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 97ef99c..f2eb770 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE QObject. See the QObject documentation for further details. */ /*! - \qmlproperty string QtObject::objectName + \qmlproperty string QML:QtObject::objectName This property allows you to give a name to this specific object instance. See \l{scripting.html#accessing-child-qobjects}{Accessing Child QObjects} @@ -237,8 +237,8 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) } /*! -\qmlmethod url Qt::resolvedUrl(url) -Returns \c url resolved relative to the URL of the caller. + \qmlmethod url Qt::resolvedUrl(url) + Returns \c url resolved relative to the URL of the caller. */ QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url) { @@ -1090,8 +1090,6 @@ If you are certain the files will be local, you could simplify to: To create a QML object from an arbitrary string of QML (instead of a file), use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}. - -\sa {Dynamic Object Management} */ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QScriptEngine *engine) @@ -1139,8 +1137,6 @@ Each object in this array has the members \c lineNumber, \c columnNumber, \c fil Note that this function returns immediately, and therefore may not work if the \a qml string loads new components (that is, external QML files that have not yet been loaded). If this is the case, consider using \l{QML:Qt::createComponent()}{Qt.createComponent()} instead. - -\sa {Dynamic Object Management} */ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine) diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 9895ff2..9f4df22 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -596,7 +596,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla with a combined value of all key roles that is not already present in the model. - \sa {demos/declarative/rssnews}{RSS News demo} + \sa {RSS News} */ QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent) diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp index e406cba..ad8801a 100644 --- a/src/gui/dialogs/qwizard_win.cpp +++ b/src/gui/dialogs/qwizard_win.cpp @@ -180,7 +180,8 @@ QVistaBackButton::QVistaBackButton(QWidget *widget) QSize QVistaBackButton::sizeHint() const { ensurePolished(); - int width = 32, height = 32; + int size = int(QStyleHelper::dpiScaled(32)); + int width = size, height = size; /* HANDLE theme = pOpenThemeData(0, L"Navigation"); SIZE size; @@ -213,8 +214,8 @@ void QVistaBackButton::paintEvent(QPaintEvent *) HANDLE theme = pOpenThemeData(0, L"Navigation"); //RECT rect; RECT clipRect; - int xoffset = QWidget::mapToParent(r.topLeft()).x(); - int yoffset = QWidget::mapToParent(r.topLeft()).y(); + int xoffset = QWidget::mapToParent(r.topLeft()).x() - 1; + int yoffset = QWidget::mapToParent(r.topLeft()).y() - 1; clipRect.top = r.top() + yoffset; clipRect.bottom = r.bottom() + yoffset; @@ -245,6 +246,11 @@ QVistaHelper::QVistaHelper(QWizard *wizard) is_vista = resolveSymbols(); if (is_vista) backButton_ = new QVistaBackButton(wizard); + + // Handle diff between Windows 7 and Vista + iconSpacing = QStyleHelper::dpiScaled(7); + textSpacing = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? + iconSpacing : QStyleHelper::dpiScaled(20); } QVistaHelper::~QVistaHelper() @@ -308,18 +314,15 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type) void QVistaHelper::drawTitleBar(QPainter *painter) { - if (vistaState() == VistaAero) - drawBlackRect( - QRect(0, 0, wizard->width(), titleBarSize() + topOffset()), - painter->paintEngine()->getDC()); + HDC hdc = painter->paintEngine()->getDC(); + if (vistaState() == VistaAero) + drawBlackRect(QRect(0, 0, wizard->width(), + titleBarSize() + topOffset()), hdc); Q_ASSERT(backButton_); const int btnTop = backButton_->mapToParent(QPoint()).y(); const int btnHeight = backButton_->size().height(); - const int verticalCenter = (btnTop + btnHeight / 2); - - wizard->windowIcon().paint( - painter, QRect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize())); + const int verticalCenter = (btnTop + btnHeight / 2) - 1; const QString text = wizard->window()->windowTitle(); const QFont font = QApplication::font("QWorkspaceTitleBar"); @@ -327,14 +330,25 @@ void QVistaHelper::drawTitleBar(QPainter *painter) const QRect brect = fontMetrics.boundingRect(text); int textHeight = brect.height(); int textWidth = brect.width(); + int glowOffset = 0; + if (vistaState() == VistaAero) { textHeight += 2 * glowSize(); textWidth += 2 * glowSize(); + glowOffset = glowSize(); } + drawTitleText( painter, text, - QRect(titleOffset(), verticalCenter - textHeight / 2, textWidth, textHeight), - painter->paintEngine()->getDC()); + QRect(titleOffset() - glowOffset, verticalCenter - textHeight / 2, textWidth, textHeight), + hdc); + + if (!wizard->windowIcon().isNull()) { + QRect rect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize()); + HICON hIcon = wizard->windowIcon().pixmap(iconSize()).toWinHICON(); + DrawIconEx(hdc, rect.left(), rect.top(), hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT); + DestroyIcon(hIcon); + } } void QVistaHelper::setTitleBarIconAndCaptionVisible(bool visible) @@ -734,7 +748,7 @@ bool QVistaHelper::resolveSymbols() int QVistaHelper::titleOffset() { - int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + padding(); + int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + textSpacing; return leftMargin() + iconOffset; } diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h index 5f3b6c2..caf018d 100644 --- a/src/gui/dialogs/qwizard_win_p.h +++ b/src/gui/dialogs/qwizard_win_p.h @@ -61,6 +61,7 @@ #include <qwidget.h> #include <qabstractbutton.h> #include <QtGui/private/qwidget_p.h> +#include <QtGui/private/qstylehelper_p.h> QT_BEGIN_NAMESPACE @@ -100,9 +101,14 @@ public: enum VistaState { VistaAero, VistaBasic, Classic, Dirty }; static VistaState vistaState(); static int titleBarSize() { return frameSize() + captionSize(); } - static int topPadding() { return 8; } - static int topOffset() { return titleBarSize() + (vistaState() == VistaAero ? 13 : 3); } - + static int topPadding() { // padding under text + return int(QStyleHelper::dpiScaled( + QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? 4 : 6)); + } + static int topOffset() { + static int aeroOffset = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? + QStyleHelper::dpiScaled(4) : QStyleHelper::dpiScaled(13); + return (titleBarSize() + (vistaState() == VistaAero ? aeroOffset : 3)); } private: static HFONT getCaptionFont(HANDLE hTheme); bool drawTitleText(QPainter *painter, const QString &text, const QRect &rect, HDC hdc); @@ -111,11 +117,10 @@ private: static int frameSize() { return GetSystemMetrics(SM_CYSIZEFRAME); } static int captionSize() { return GetSystemMetrics(SM_CYCAPTION); } - static int backButtonSize() { return 31; } // ### should be queried from back button itself + static int backButtonSize() { return int(QStyleHelper::dpiScaled(30)); } static int iconSize() { return 16; } // Standard Aero - static int padding() { return 7; } // Standard Aero - static int leftMargin() { return backButtonSize() + padding(); } static int glowSize() { return 10; } + int leftMargin() { return backButton_->isVisible() ? backButtonSize() + iconSpacing : 0; } int titleOffset(); bool resolveSymbols(); @@ -139,6 +144,10 @@ private: QRect rtTitle; QWizard *wizard; QVistaBackButton *backButton_; + + int titleBarOffset; // Extra spacing above the text + int iconSpacing; // Space between button and icon + int textSpacing; // Space between icon and text }; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index fe2a84e..bf36d9b 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -133,7 +133,8 @@ \img graphicsview-parentchild.png - \section1 Transformation + \target Transformations + \section1 Transformations QGraphicsItem supports projective transformations in addition to its base position, pos(). There are several ways to change an item's transformation. diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 4fb93fc..97499f3 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1363,7 +1363,7 @@ bool QAbstractItemView::dragEnabled() const Note that the model used needs to provide support for drag and drop operations. - \sa setDragDropMode() {Using Drag and Drop with Item Views} + \sa setDragDropMode() {Using drag & drop with item views} */ /*! diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index 5dbd1f0..4748f89 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -100,69 +100,80 @@ public: QIcon getMacIcon(const QFileInfo &fi) const; #endif QFileIconProvider *q_ptr; - QString homePath; + const QString homePath; private: - QIcon file; - QIcon fileLink; - QIcon directory; - QIcon directoryLink; - QIcon harddisk; - QIcon floppy; - QIcon cdrom; - QIcon ram; - QIcon network; - QIcon computer; - QIcon desktop; - QIcon trashcan; - QIcon generic; - QIcon home; + mutable QIcon file; + mutable QIcon fileLink; + mutable QIcon directory; + mutable QIcon directoryLink; + mutable QIcon harddisk; + mutable QIcon floppy; + mutable QIcon cdrom; + mutable QIcon ram; + mutable QIcon network; + mutable QIcon computer; + mutable QIcon desktop; + mutable QIcon trashcan; + mutable QIcon generic; + mutable QIcon home; }; -QFileIconProviderPrivate::QFileIconProviderPrivate() +QFileIconProviderPrivate::QFileIconProviderPrivate() : + homePath(QDir::home().absolutePath()) { - QStyle *style = QApplication::style(); - file = style->standardIcon(QStyle::SP_FileIcon); - directory = style->standardIcon(QStyle::SP_DirIcon); - fileLink = style->standardIcon(QStyle::SP_FileLinkIcon); - directoryLink = style->standardIcon(QStyle::SP_DirLinkIcon); - harddisk = style->standardIcon(QStyle::SP_DriveHDIcon); - floppy = style->standardIcon(QStyle::SP_DriveFDIcon); - cdrom = style->standardIcon(QStyle::SP_DriveCDIcon); - network = style->standardIcon(QStyle::SP_DriveNetIcon); - computer = style->standardIcon(QStyle::SP_ComputerIcon); - desktop = style->standardIcon(QStyle::SP_DesktopIcon); - trashcan = style->standardIcon(QStyle::SP_TrashIcon); - home = style->standardIcon(QStyle::SP_DirHomeIcon); - homePath = QDir::home().absolutePath(); } QIcon QFileIconProviderPrivate::getIcon(QStyle::StandardPixmap name) const { switch (name) { case QStyle::SP_FileIcon: + if (file.isNull()) + file = QApplication::style()->standardIcon(name); return file; case QStyle::SP_FileLinkIcon: + if (fileLink.isNull()) + fileLink = QApplication::style()->standardIcon(name); return fileLink; case QStyle::SP_DirIcon: + if (directory.isNull()) + directory = QApplication::style()->standardIcon(name); return directory; case QStyle::SP_DirLinkIcon: + if (directoryLink.isNull()) + directoryLink = QApplication::style()->standardIcon(name); return directoryLink; case QStyle::SP_DriveHDIcon: + if (harddisk.isNull()) + harddisk = QApplication::style()->standardIcon(name); return harddisk; case QStyle::SP_DriveFDIcon: + if (floppy.isNull()) + floppy = QApplication::style()->standardIcon(name); return floppy; case QStyle::SP_DriveCDIcon: + if (cdrom.isNull()) + cdrom = QApplication::style()->standardIcon(name); return cdrom; case QStyle::SP_DriveNetIcon: + if (network.isNull()) + network = QApplication::style()->standardIcon(name); return network; case QStyle::SP_ComputerIcon: + if (computer.isNull()) + computer = QApplication::style()->standardIcon(name); return computer; case QStyle::SP_DesktopIcon: + if (desktop.isNull()) + desktop = QApplication::style()->standardIcon(name); return desktop; case QStyle::SP_TrashIcon: + if (trashcan.isNull()) + trashcan = QApplication::style()->standardIcon(name); return trashcan; case QStyle::SP_DirHomeIcon: + if (home.isNull()) + home = QApplication::style()->standardIcon(name); return home; default: return QIcon(); diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 94211fd..aaf479f 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -5294,6 +5294,7 @@ bool QApplication::keypadNavigationEnabled() \sa QCoreApplication::instance() */ +#ifndef QT_NO_IM // ************************************************************************ // Input Method support // ************************************************************************ @@ -5359,6 +5360,7 @@ QInputContext *QApplication::inputContext() const #endif return d->inputContext; } +#endif // QT_NO_IM //Returns the current platform used by keyBindings uint QApplicationPrivate::currentPlatform(){ diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index d31d9e5..799d4c2 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -267,8 +267,11 @@ public: virtual void commitData(QSessionManager& sm); virtual void saveState(QSessionManager& sm); #endif + +#ifndef QT_NO_IM void setInputContext(QInputContext *); QInputContext *inputContext() const; +#endif static QLocale keyboardInputLocale(); static Qt::LayoutDirection keyboardInputDirection(); diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 8652816..6795149 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -85,6 +85,8 @@ QT_END_NAMESPACE - (BOOL)canBecomeKeyWindow { QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)]; + if (!widget) + return NO; // This should happen only for qt_root_win bool isToolTip = (widget->windowType() == Qt::ToolTip); bool isPopup = (widget->windowType() == Qt::Popup); @@ -94,6 +96,8 @@ QT_END_NAMESPACE - (BOOL)canBecomeMainWindow { QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)]; + if (!widget) + return NO; // This should happen only for qt_root_win bool isToolTip = (widget->windowType() == Qt::ToolTip); bool isPopup = (widget->windowType() == Qt::Popup); diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 5c90e2e..1935531 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -269,6 +269,28 @@ static int qCocoaViewCount = 0; dropData = new QCocoaDropData(dropPasteboard); } +- (void)changeDraggingCursor:(NSDragOperation)newOperation +{ + static SEL action = nil; + static bool operationSupported = false; + if (action == nil) { + action = NSSelectorFromString(@"operationNotAllowedCursor"); + if ([NSCursor respondsToSelector:action]) { + operationSupported = true; + } + } + if (operationSupported) { + NSCursor *notAllowedCursor = [NSCursor performSelector:action]; + bool isNotAllowedCursor = ([NSCursor currentCursor] == notAllowedCursor); + if (newOperation == NSDragOperationNone && !isNotAllowedCursor) { + [notAllowedCursor push]; + } else if (newOperation != NSDragOperationNone && isNotAllowedCursor) { + [notAllowedCursor pop]; + } + + } +} + - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender { // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly @@ -300,6 +322,7 @@ static int qCocoaViewCount = 0; if (!qDEEvent.isAccepted()) { // widget is not interested in this drag, so ignore this drop data. [self removeDropData]; + [self changeDraggingCursor:NSDragOperationNone]; return NSDragOperationNone; } else { // save the mouse position, used by draggingExited handler. @@ -321,6 +344,7 @@ static int qCocoaViewCount = 0; nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDMEvent.dropAction()); } QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent); + [self changeDraggingCursor:nsActions]; return nsActions; } } @@ -335,16 +359,21 @@ static int qCocoaViewCount = 0; if (dragEnterSequence != [sender draggingSequenceNumber]) [self draggingEntered:sender]; // drag enter event was rejected, so ignore the move event. - if (dropData == 0) + if (dropData == 0) { + [self changeDraggingCursor:NSDragOperationNone]; return NSDragOperationNone; + } // return last value, if we are still in the answerRect. NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint]; NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; NSDragOperation nsActions = [sender draggingSourceOperationMask]; QPoint posDrag(localPoint.x, localPoint.y); if (qt_mac_mouse_inside_answer_rect(posDrag) - && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) - return QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction)); + && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) { + NSDragOperation operation = QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction)); + [self changeDraggingCursor:operation]; + return operation; + } // send drag move event to the widget QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions; Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions); @@ -373,6 +402,7 @@ static int qCocoaViewCount = 0; qDMEvent.setDropAction(Qt::IgnoreAction); } qt_mac_copy_answer_rect(qDMEvent); + [self changeDraggingCursor:operation]; return operation; } @@ -388,6 +418,8 @@ static int qCocoaViewCount = 0; QApplication::sendEvent(qwidget, &de); [self removeDropData]; } + [self changeDraggingCursor:NSDragOperationEvery]; + } - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 33aaa24..b6b63ca 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -106,6 +106,7 @@ Q_GUI_EXPORT - (void) qt_clearQWidget; - (BOOL)qt_leftButtonIsRightButton; - (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped; +- (void)changeDraggingCursor:(NSDragOperation)newOperation; + (DnDParams*)currentMouseEvent; @end diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index f5688f4..6359ecf 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -41,6 +41,7 @@ #include "qgesture.h" #include "private/qgesture_p.h" +#include "private/qstandardgestures_p.h" #ifndef QT_NO_GESTURES @@ -726,6 +727,34 @@ void QTapAndHoldGesture::setPosition(const QPointF &value) d_func()->position = value; } +/*! + Set the timeout, in milliseconds, before the gesture triggers. + + The recognizer will detect a touch down and and if \a msecs + later the touch is still down, it will trigger the QTapAndHoldGesture. + The default value is 700 milliseconds. +*/ +// static +void QTapAndHoldGesture::setTimeout(int msecs) +{ + QTapAndHoldGesturePrivate::Timeout = msecs; +} + +/*! + Gets the timeout, in milliseconds, before the gesture triggers. + + The recognizer will detect a touch down and and if timeout() + later the touch is still down, it will trigger the QTapAndHoldGesture. + The default value is 700 milliseconds. +*/ +// static +int QTapAndHoldGesture::timeout() +{ + return QTapAndHoldGesturePrivate::Timeout; +} + +int QTapAndHoldGesturePrivate::Timeout = 700; // in ms + QT_END_NAMESPACE #endif // QT_NO_GESTURES diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index 8c10895..8f410b1 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -252,6 +252,9 @@ public: QPointF position() const; void setPosition(const QPointF &pos); + static void setTimeout(int msecs); + static int timeout(); + friend class QTapAndHoldGestureRecognizer; }; diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h index f5474c1..29b923e 100644 --- a/src/gui/kernel/qgesture_p.h +++ b/src/gui/kernel/qgesture_p.h @@ -177,6 +177,7 @@ public: QPointF position; int timerId; + static int Timeout; }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index e43a560..fe9dd8a 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE QGestureManager::QGestureManager(QObject *parent) - : QObject(parent), state(NotGesture), m_lastCustomGestureId(0) + : QObject(parent), state(NotGesture), m_lastCustomGestureId(Qt::CustomGesture) { qRegisterMetaType<Qt::GestureState>(); @@ -119,7 +119,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r if (type == Qt::CustomGesture) { // generate a new custom gesture id ++m_lastCustomGestureId; - type = Qt::GestureType(Qt::CustomGesture + m_lastCustomGestureId); + type = Qt::GestureType(m_lastCustomGestureId); } m_recognizers.insertMulti(type, recognizer); delete dummy; diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 62d8a53..e05f8cc 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -517,7 +517,6 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object, const QMouseEvent *me = static_cast<const QMouseEvent *>(event); const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event); - enum { TimerInterval = 2000 }; enum { TapRadius = 40 }; switch (event->type()) { @@ -526,21 +525,21 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object, q->setHotSpot(d->position); if (d->timerId) q->killTimer(d->timerId); - d->timerId = q->startTimer(TimerInterval); + d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout); return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout case QEvent::MouseButtonPress: d->position = me->globalPos(); q->setHotSpot(d->position); if (d->timerId) q->killTimer(d->timerId); - d->timerId = q->startTimer(TimerInterval); + d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout); return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout case QEvent::TouchBegin: d->position = ev->touchPoints().at(0).startScreenPos(); q->setHotSpot(d->position); if (d->timerId) q->killTimer(d->timerId); - d->timerId = q->startTimer(TimerInterval); + d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout); return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout case QEvent::GraphicsSceneMouseRelease: case QEvent::MouseButtonRelease: diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 233df15..fed8d0a 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -338,8 +338,10 @@ QInputContext *QWidgetPrivate::inputContext() const #ifndef QT_NO_IM if (ic) return ic; -#endif return qApp->inputContext(); +#else + return 0; +#endif } /*! diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index e57ec77..c788711 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4389,6 +4389,13 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM data.window_state = data.window_state & ~Qt::WindowMaximized; const bool visible = q->isVisible(); + // Apply size restrictions, applicable for Windows & Widgets. + if (QWExtra *extra = extraData()) { + w = qMin(w, extra->maxw); + h = qMin(h, extra->maxh); + w = qMax(w, extra->minw); + h = qMax(h, extra->minh); + } data.crect = QRect(x, y, w, h); if (realWindow) { diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index daa40a1..769ab2f 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1283,7 +1283,7 @@ void QTextCursor::setVisualNavigation(bool b) /*! \since 4.7 - Sets the visual x position for vertical cursor movements. + Sets the visual x position for vertical cursor movements to \a x. The vertical movement x position is cleared automatically when the cursor moves horizontally, and kept unchanged when the cursor moves vertically. The mechanism allows the cursor to move up and down on a @@ -1335,8 +1335,8 @@ bool QTextCursor::keepPositionOnInsert() const Defines whether the cursor should keep its current position when text gets inserted at the current position of the cursor. - If \b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor. - If \b is false, the cursor moves along with the inserted text. + If \a b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor. + If \a b is false, the cursor moves along with the inserted text. The default is false. diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp index 8f31e46..9eeec0b 100644 --- a/src/gui/text/qtextoption.cpp +++ b/src/gui/text/qtextoption.cpp @@ -392,7 +392,12 @@ QList<QTextOption::Tab> QTextOption::tabs() const /*! \fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar()) - Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter + + Creates a tab with the given position, tab type, and delimiter + (\a pos, \a tabType, \a delim). + + \note \a delim is only used when \a tabType is DelimiterTab. + \since 4.7 */ diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index 5100176..e3985ce 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -754,19 +754,39 @@ void QTextTable::insertColumns(int pos, int num) QTextFormatCollection *c = p->formatCollection(); p->beginEditBlock(); + QList<int> extendedSpans; for (int i = 0; i < d->nRows; ++i) { int cell; if (i == d->nRows - 1 && pos == d->nCols) cell = d->fragment_end; else cell = d->grid[i*d->nCols + pos]; - QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); - QTextCharFormat fmt = c->charFormat(it->format); if (pos > 0 && pos < d->nCols && cell == d->grid[i*d->nCols + pos - 1]) { // cell spans the insertion place, extend it - fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num); - p->setCharFormat(it.position(), 1, fmt); + if (!extendedSpans.contains(cell)) { + QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); + QTextCharFormat fmt = c->charFormat(it->format); + fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num); + p->setCharFormat(it.position(), 1, fmt); + d->dirty = true; + extendedSpans << cell; + } } else { + /* If the next cell is spanned from the row above, we need to find the right position + to insert to */ + if (i > 0 && pos < d->nCols && cell == d->grid[(i-1) * d->nCols + pos]) { + int gridIndex = i*d->nCols + pos; + const int gridEnd = d->nRows * d->nCols - 1; + while (gridIndex < gridEnd && cell == d->grid[gridIndex]) { + ++gridIndex; + } + if (gridIndex == gridEnd) + cell = d->fragment_end; + else + cell = d->grid[gridIndex]; + } + QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); + QTextCharFormat fmt = c->charFormat(it->format); fmt.setTableCellRowSpan(1); fmt.setTableCellColumnSpan(1); Q_ASSERT(fmt.objectIndex() == objectIndex()); diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 1afabec..9e2b85e 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -286,13 +286,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket resend = false; //create the response header to be used with QAuthenticatorPrivate. - QHttpResponseHeader responseHeader; QList<QPair<QByteArray, QByteArray> > fields = reply->header(); - QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin(); - while (it != fields.constEnd()) { - responseHeader.addValue(QString::fromLatin1(it->first), QString::fromUtf8(it->second)); - it++; - } + //find out the type of authentication protocol requested. QAuthenticatorPrivate::Method authMethod = reply->d_func()->authenticationMethod(isProxy); if (authMethod != QAuthenticatorPrivate::None) { @@ -310,7 +305,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket if (auth->isNull()) auth->detach(); QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*auth); - priv->parseHttpResponse(responseHeader, isProxy); + priv->parseHttpResponse(fields, isProxy); if (priv->phase == QAuthenticatorPrivate::Done) { if ((isProxy && pendingProxyAuthSignal) ||(!isProxy && pendingAuthSignal)) { diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index a6c5c02..f617244 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -944,10 +944,10 @@ bool QNetworkAccessHttpBackend::sendCacheContents(const QNetworkCacheMetaData &m checkForRedirect(status); - emit metaDataChanged(); - - // invoke this asynchronously, else Arora/QtDemoBrowser don't like cached downloads - // see task 250221 / 251801 + // This needs to be emitted in the event loop because it can be reached at + // the direct code path of qnam.get(...) before the user has a chance + // to connect any signals. + QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection); qRegisterMetaType<QIODevice*>("QIODevice*"); QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents)); diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index bccfec1..fa592c2 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -230,6 +230,14 @@ QT_BEGIN_NAMESPACE \since 4.7 + \omitvalue MaximumDownloadBufferSizeAttribute + \since 4.7 + \internal + + \omitvalue DownloadBufferAttribute + \since 4.7 + \internal + \value User Special type. Additional information can be passed in QVariants with types ranging from User to UserMax. The default diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index d2945c4..cdadf0f 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -82,6 +82,8 @@ public: CookieLoadControlAttribute, AuthenticationReuseAttribute, CookieSaveControlAttribute, + MaximumDownloadBufferSizeAttribute, // internal + DownloadBufferAttribute, // internal User = 1000, UserMax = 32767 diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index e4023c8..d61c686 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -50,6 +50,8 @@ #include <qdatastream.h> #include <qendian.h> #include <qstring.h> +#include <qdatetime.h> + QT_BEGIN_NAMESPACE @@ -83,6 +85,44 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas Note that, in particular, NTLM version 2 is not supported. + \section1 Options + + In addition to the username and password required for authentication, a + QAuthenticator object can also contain additional options. The + options() function can be used to query incoming options sent by + the server; the setOption() function can + be used to set outgoing options, to be processed by the authenticator + calculation. The options accepted and provided depend on the authentication + type (see method()). + + The following tables list known incoming options as well as accepted + outgoing options. The list of incoming options is not exhaustive, since + servers may include additional information at any time. The list of + outgoing options is exhaustive, however, and no unknown options will be + treated or sent back to the server. + + \section2 Basic + + \table + \header \o Option \o Direction \o Description + \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm() + \endtable + + The Basic authentication mechanism supports no outgoing options. + + \section2 NTLM version 1 + + The NTLM authentication mechanism currently supports no incoming or outgoing options. + + \section2 Digest-MD5 + + \table + \header \o Option \o Direction \o Description + \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm() + \endtable + + The Digest-MD5 authentication mechanism supports no outgoing options. + \sa QSslSocket */ @@ -138,7 +178,8 @@ bool QAuthenticator::operator==(const QAuthenticator &other) const return d->user == other.d->user && d->password == other.d->password && d->realm == other.d->realm - && d->method == other.d->method; + && d->method == other.d->method + && d->options == other.d->options; } /*! @@ -162,7 +203,18 @@ QString QAuthenticator::user() const void QAuthenticator::setUser(const QString &user) { detach(); - d->user = user; + + int separatorPosn = 0; + separatorPosn = user.indexOf(QLatin1String("\\")); + + if (separatorPosn == -1) { + //No domain name present + d->user = user; + } else { + //domain name is present + d->realm = user.left(separatorPosn); + d->user = user.mid(separatorPosn+1); + } } /*! @@ -205,9 +257,49 @@ QString QAuthenticator::realm() const return d ? d->realm : QString(); } +/*! + \since 4.7 + Returns the value related to option \a opt if it was set by the server. + See \l{QAuthenticator#Options} for more information on incoming options. + If option \a opt isn't found, an invalid QVariant will be returned. + + \sa options(), QAuthenticator#Options +*/ +QVariant QAuthenticator::option(const QString &opt) const +{ + return d ? d->options.value(opt) : QVariant(); +} /*! - returns true if the authenticator is null. + \since 4.7 + Returns all incoming options set in this QAuthenticator object by parsing + the server reply. See \l{QAuthenticator#Options} for more information + on incoming options. + + \sa option(), QAuthenticator#Options +*/ +QVariantHash QAuthenticator::options() const +{ + return d ? d->options : QVariantHash(); +} + +/*! + \since 4.7 + + Sets the outgoing option \a opt to value \a value. + See \l{QAuthenticator#Options} for more information on outgoing options. + + \sa options(), option(), QAuthenticator#Options +*/ +void QAuthenticator::setOption(const QString &opt, const QVariant &value) +{ + detach(); + d->options.insert(opt, value); +} + + +/*! + Returns true if the authenticator is null. */ bool QAuthenticator::isNull() const { @@ -228,7 +320,20 @@ QAuthenticatorPrivate::QAuthenticatorPrivate() #ifndef QT_NO_HTTP void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, bool isProxy) { - QList<QPair<QString, QString> > values = header.values(); + const QList<QPair<QString, QString> > values = header.values(); + QList<QPair<QByteArray, QByteArray> > rawValues; + + QList<QPair<QString, QString> >::const_iterator it, end; + for (it = values.constBegin(), end = values.constEnd(); it != end; ++it) + rawValues.append(qMakePair(it->first.toLatin1(), it->second.toUtf8())); + + // continue in byte array form + parseHttpResponse(rawValues, isProxy); +} +#endif + +void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByteArray> > &values, bool isProxy) +{ const char *search = isProxy ? "proxy-authenticate" : "www-authenticate"; method = None; @@ -242,38 +347,40 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, authentication parameters. */ - QString headerVal; + QByteArray headerVal; for (int i = 0; i < values.size(); ++i) { - const QPair<QString, QString> ¤t = values.at(i); - if (current.first.toLower() != QLatin1String(search)) + const QPair<QByteArray, QByteArray> ¤t = values.at(i); + if (current.first.toLower() != search) continue; - QString str = current.second; - if (method < Basic && str.startsWith(QLatin1String("Basic"), Qt::CaseInsensitive)) { - method = Basic; headerVal = str.mid(6); - } else if (method < Ntlm && str.startsWith(QLatin1String("NTLM"), Qt::CaseInsensitive)) { + QByteArray str = current.second.toLower(); + if (method < Basic && str.startsWith("basic")) { + method = Basic; + headerVal = current.second.mid(6); + } else if (method < Ntlm && str.startsWith("ntlm")) { method = Ntlm; - headerVal = str.mid(5); - } else if (method < DigestMd5 && str.startsWith(QLatin1String("Digest"), Qt::CaseInsensitive)) { + headerVal = current.second.mid(5); + } else if (method < DigestMd5 && str.startsWith("digest")) { method = DigestMd5; - headerVal = str.mid(7); + headerVal = current.second.mid(7); } } - challenge = headerVal.trimmed().toLatin1(); + challenge = headerVal.trimmed(); QHash<QByteArray, QByteArray> options = parseDigestAuthenticationChallenge(challenge); switch(method) { case Basic: - realm = QString::fromLatin1(options.value("realm")); + if(realm.isEmpty()) + this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); if (user.isEmpty()) phase = Done; break; case Ntlm: // #### extract from header - realm.clear(); break; case DigestMd5: { - realm = QString::fromLatin1(options.value("realm")); + if(realm.isEmpty()) + this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); if (options.value("stale").toLower() == "true") phase = Start; if (user.isEmpty()) @@ -286,7 +393,6 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, phase = Invalid; } } -#endif QByteArray QAuthenticatorPrivate::calculateResponse(const QByteArray &requestMethod, const QByteArray &path) { @@ -661,6 +767,20 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge, */ #define NTLMSSP_NEGOTIATE_56 0x80000000 +/* + * AvId values + */ +#define AVTIMESTAMP 7 + +//#define NTLMV1_CLIENT + + +//************************Global variables*************************** + +const int blockSize = 64; //As per RFC2104 Block-size is 512 bits +const int nDigestLen = 16; //Trunctaion Length of the Hmac-Md5 digest +const quint8 respversion = 1; +const quint8 hirespversion = 1; /* usage: // fill up ctx with what we know. @@ -803,6 +923,7 @@ public: // extracted QString targetNameStr, targetInfoStr; + QByteArray targetInfoBuff; }; @@ -818,6 +939,7 @@ public: // extracted QByteArray lmResponseBuf, ntlmResponseBuf; QString domainStr, userStr, workstationStr, sessionKeyStr; + QByteArray v2Hash; }; @@ -899,7 +1021,7 @@ static QString qStringFromUcs2Le(const QByteArray& src) return QString((const QChar *)src.data(), src.size()/2); } - +#ifdef NTLMV1_CLIENT static QByteArray qEncodeNtlmResponse(const QAuthenticatorPrivate *ctx, const QNtlmPhase2Block& ch) { QCryptographicHash md4(QCryptographicHash::Md4); @@ -941,7 +1063,232 @@ static QByteArray qEncodeLmResponse(const QAuthenticatorPrivate *ctx, const QNtl hash.fill(0); return rc; } +#endif + +/********************************************************************* +* Function Name: qEncodeHmacMd5 +* Params: +* key: Type - QByteArray +* - It is the Authentication key +* message: Type - QByteArray +* - This is the actual message which will be encoded +* using HMacMd5 hash algorithm +* +* Return Value: +* hmacDigest: Type - QByteArray +* +* Description: +* This function will be used to encode the input message using +* HMacMd5 hash algorithm. +* +* As per the RFC2104 the HMacMd5 algorithm can be specified +* --------------------------------------- +* MD5(K XOR opad, MD5(K XOR ipad, text)) +* --------------------------------------- +* +*********************************************************************/ +QByteArray qEncodeHmacMd5(QByteArray &key, const QByteArray &message) +{ + Q_ASSERT_X(!(message.isEmpty()),"qEncodeHmacMd5", "Empty message check"); + Q_ASSERT_X(!(key.isEmpty()),"qEncodeHmacMd5", "Empty key check"); + + QCryptographicHash hash(QCryptographicHash::Md5); + QByteArray hMsg; + + QByteArray iKeyPad(blockSize, 0x36); + QByteArray oKeyPad(blockSize, 0x5c); + + hash.reset(); + // Adjust the key length to blockSize + + if(blockSize < key.length()) { + hash.addData(key); + key = hash.result(); //MD5 will always return 16 bytes length output + } + + //Key will be <= 16 or 20 bytes as hash function (MD5 or SHA hash algorithms) + //key size can be max of Block size only + key = key.leftJustified(blockSize,0,true); + + //iKeyPad, oKeyPad and key are all of same size "blockSize" + + //xor of iKeyPad with Key and store the result into iKeyPad + for(int i = 0; i<key.size();i++) { + iKeyPad[i] = key[i]^iKeyPad[i]; + } + + //xor of oKeyPad with Key and store the result into oKeyPad + for(int i = 0; i<key.size();i++) { + oKeyPad[i] = key[i]^oKeyPad[i]; + } + + iKeyPad.append(message); // (K0 xor ipad) || text + + hash.reset(); + hash.addData(iKeyPad); + hMsg = hash.result(); + //Digest gen after pass-1: H((K0 xor ipad)||text) + + QByteArray hmacDigest; + oKeyPad.append(hMsg); + hash.reset(); + hash.addData(oKeyPad); + hmacDigest = hash.result(); + // H((K0 xor opad )|| H((K0 xor ipad) || text)) + + /*hmacDigest should not be less than half the length of the HMAC output + (to match the birthday attack bound) and not less than 80 bits + (a suitable lower bound on the number of bits that need to be + predicted by an attacker). + Refer RFC 2104 for more details on truncation part */ + + /*MD5 hash always returns 16 byte digest only and HMAC-MD5 spec + (RFC 2104) also says digest length should be 16 bytes*/ + return hmacDigest; +} + +static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx, + QNtlmPhase3Block *phase3) +{ + Q_ASSERT(phase3 != 0); + // since v2 Hash is need for both NTLMv2 and LMv2 it is calculated + // only once and stored and reused + if(phase3->v2Hash.size() == 0) { + QCryptographicHash md4(QCryptographicHash::Md4); + QByteArray passUnicode = qStringAsUcs2Le(ctx->password); + md4.addData(passUnicode.data(), passUnicode.size()); + + QByteArray hashKey = md4.result(); + Q_ASSERT(hashKey.size() == 16); + // Assuming the user and domain is always unicode in challenge + QByteArray message = + qStringAsUcs2Le(ctx->user.toUpper()) + + qStringAsUcs2Le(ctx->realm); + + phase3->v2Hash = qEncodeHmacMd5(hashKey, message); + } + return phase3->v2Hash; +} + +static QByteArray clientChallenge(const QAuthenticatorPrivate *ctx) +{ + Q_ASSERT(ctx->cnonce.size() >= 8); + QByteArray clientCh = ctx->cnonce.right(8); + return clientCh; +} + +// caller has to ensure a valid targetInfoBuff +static bool qExtractServerTime(const QByteArray& targetInfoBuff, + quint64 *serverTime) +{ + Q_ASSERT(serverTime != 0); + bool retValue = false; + QDataStream ds(targetInfoBuff); + ds.setByteOrder(QDataStream::LittleEndian); + + quint16 avId; + quint16 avLen; + + ds >> avId; + ds >> avLen; + while(avId != 0) { + if(avId == AVTIMESTAMP) { + QByteArray timeArray(avLen, 0); + //avLen size of QByteArray is allocated + ds.readRawData(timeArray.data(), avLen); + bool ok; + *serverTime = timeArray.toHex().toLongLong(&ok, 16); + retValue = true; + break; + } + ds.skipRawData(avLen); + ds >> avId; + ds >> avLen; + } + return retValue; +} + +static QByteArray qEncodeNtlmv2Response(const QAuthenticatorPrivate *ctx, + const QNtlmPhase2Block& ch, + QNtlmPhase3Block *phase3) +{ + Q_ASSERT(phase3 != 0); + // return value stored in phase3 + qCreatev2Hash(ctx, phase3); + + QByteArray temp; + QDataStream ds(&temp, QIODevice::WriteOnly); + ds.setByteOrder(QDataStream::LittleEndian); + + ds << respversion; + ds << hirespversion; + //Reserved + QByteArray reserved1(6, 0); + ds.writeRawData(reserved1.constData(), reserved1.size()); + + quint64 time = 0; + + //if server sends time, use it instead of current time + if(!(ch.targetInfo.len && qExtractServerTime(ch.targetInfoBuff, &time))) { + QDateTime currentTime(QDate::currentDate(), + QTime::currentTime(), Qt::UTC); + + // number of seconds between 1601 and epoc(1970) + // 369 years, 89 leap years + // ((369 * 365) + 89) * 24 * 3600 = 11644473600 + + time = Q_UINT64_C(currentTime.toTime_t() + 11644473600); + + // represented as 100 nano seconds + time = Q_UINT64_C(time * 10000000); + } + ds << time; + + //8 byte client challenge + QByteArray clientCh = clientChallenge(ctx); + ds.writeRawData(clientCh.constData(), clientCh.size()); + + //Reserved + QByteArray reserved2(4, 0); + ds.writeRawData(reserved2.constData(), reserved2.size()); + + if (ch.targetInfo.len > 0) { + ds.writeRawData(ch.targetInfoBuff.constData(), + ch.targetInfoBuff.size()); + } + + //Reserved + QByteArray reserved3(4, 0); + ds.writeRawData(reserved3.constData(), reserved3.size()); + + QByteArray message((const char*)ch.challenge, sizeof(ch.challenge)); + message.append(temp); + + QByteArray ntChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message); + ntChallengeResp.append(temp); + + return ntChallengeResp; +} + +static QByteArray qEncodeLmv2Response(const QAuthenticatorPrivate *ctx, + const QNtlmPhase2Block& ch, + QNtlmPhase3Block *phase3) +{ + Q_ASSERT(phase3 != 0); + // return value stored in phase3 + qCreatev2Hash(ctx, phase3); + + QByteArray message((const char*)ch.challenge, sizeof(ch.challenge)); + QByteArray clientCh = clientChallenge(ctx); + + message.append(clientCh); + + QByteArray lmChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message); + lmChallengeResp.append(clientCh); + + return lmChallengeResp; +} static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch) { @@ -976,7 +1323,10 @@ static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch) } if (ch.targetInfo.len > 0) { - // UNUSED right now + if (ch.targetInfo.len + ch.targetInfo.offset > (unsigned)data.size()) + return false; + + ch.targetInfoBuff = data.mid(ch.targetInfo.offset, ch.targetInfo.len); } return true; @@ -996,7 +1346,8 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas bool unicode = ch.flags & NTLMSSP_NEGOTIATE_UNICODE; - ctx->realm = ch.targetNameStr; + if(ctx->realm.isEmpty()) + ctx->realm = ch.targetNameStr; pb.flags = NTLMSSP_NEGOTIATE_NTLM; if (unicode) @@ -1010,6 +1361,7 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas offset = qEncodeNtlmString(pb.domain, offset, ctx->realm, unicode); pb.domainStr = ctx->realm; + offset = qEncodeNtlmString(pb.user, offset, ctx->user, unicode); pb.userStr = ctx->user; @@ -1017,11 +1369,23 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas pb.workstationStr = ctx->workstation; // Get LM response +#ifdef NTLMV1_CLIENT pb.lmResponseBuf = qEncodeLmResponse(ctx, ch); +#else + if (ch.targetInfo.len > 0) { + pb.lmResponseBuf = QByteArray(); + } else { + pb.lmResponseBuf = qEncodeLmv2Response(ctx, ch, &pb); + } +#endif offset = qEncodeNtlmBuffer(pb.lmResponse, offset, pb.lmResponseBuf); // Get NTLM response +#ifdef NTLMV1_CLIENT pb.ntlmResponseBuf = qEncodeNtlmResponse(ctx, ch); +#else + pb.ntlmResponseBuf = qEncodeNtlmv2Response(ctx, ch, &pb); +#endif offset = qEncodeNtlmBuffer(pb.ntlmResponse, offset, pb.ntlmResponseBuf); diff --git a/src/network/kernel/qauthenticator.h b/src/network/kernel/qauthenticator.h index 13ce593..983b7c0 100644 --- a/src/network/kernel/qauthenticator.h +++ b/src/network/kernel/qauthenticator.h @@ -43,6 +43,7 @@ #define QAUTHENTICATOR_H #include <QtCore/qstring.h> +#include <QtCore/qvariant.h> QT_BEGIN_HEADER @@ -73,6 +74,10 @@ public: QString realm() const; + QVariant option(const QString &opt) const; + QVariantHash options() const; + void setOption(const QString &opt, const QVariant &value); + bool isNull() const; void detach(); private: diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h index e9ce9ac..1096601 100644 --- a/src/network/kernel/qauthenticator_p.h +++ b/src/network/kernel/qauthenticator_p.h @@ -57,12 +57,13 @@ #include <qbytearray.h> #include <qstring.h> #include <qauthenticator.h> +#include <qvariant.h> QT_BEGIN_NAMESPACE class QHttpResponseHeader; -class QAuthenticatorPrivate +class Q_AUTOTEST_EXPORT QAuthenticatorPrivate { public: enum Method { None, Basic, Plain, Login, Ntlm, CramMd5, DigestMd5 }; @@ -71,7 +72,7 @@ public: QAtomicInt ref; QString user; QString password; - QHash<QByteArray, QByteArray> options; + QVariantHash options; Method method; QString realm; QByteArray challenge; @@ -102,6 +103,7 @@ public: #ifndef QT_NO_HTTP void parseHttpResponse(const QHttpResponseHeader &, bool isProxy); #endif + void parseHttpResponse(const QList<QPair<QByteArray, QByteArray> >&, bool isProxy); }; diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 55f926d..0640c7c 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -577,7 +577,7 @@ void QTcpServer::incomingConnection(int socketDescriptor) /*! This function is called by QTcpServer::incomingConnection() - to add a socket to the list of pending incoming connections. + to add the \a socket to the list of pending incoming connections. \note Don't forget to call this member from reimplemented incomingConnection() if you do not want to break the diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index f85fa84..f73068e 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -574,7 +574,7 @@ void QSslSocket::setProtocol(QSsl::SslProtocol protocol) certificate is valid. The default mode is AutoVerifyPeer, which tells QSslSocket to use - VerifyPeer for clients, QueryPeer for clients. + VerifyPeer for clients and QueryPeer for servers. \sa setPeerVerifyMode(), peerVerifyDepth(), mode() */ @@ -594,7 +594,7 @@ QSslSocket::PeerVerifyMode QSslSocket::peerVerifyMode() const certificate is valid. The default mode is AutoVerifyPeer, which tells QSslSocket to use - VerifyPeer for clients, QueryPeer for clients. + VerifyPeer for clients and QueryPeer for servers. Setting this mode after encryption has started has no effect on the current connection. diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 1d794ae..c297eea 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -475,27 +475,12 @@ bool QSslSocketPrivate::ensureLibraryLoaded() void QSslSocketPrivate::ensureCiphersAndCertsLoaded() { + QMutexLocker locker(openssl_locks()->initLock()); if (s_loadedCiphersAndCerts) return; s_loadedCiphersAndCerts = true; resetDefaultCiphers(); - setDefaultCaCertificates(systemCaCertificates()); -} - -/*! - \internal - - Declared static in QSslSocketPrivate, makes sure the SSL libraries have - been initialized. -*/ - -void QSslSocketPrivate::ensureInitialized() -{ - if (!supportsSsl()) - return; - - ensureCiphersAndCertsLoaded(); //load symbols needed to receive certificates from system store #if defined(Q_OS_MAC) @@ -532,6 +517,22 @@ void QSslSocketPrivate::ensureInitialized() qWarning("could not load crypt32 library"); // should never happen } #endif + setDefaultCaCertificates(systemCaCertificates()); +} + +/*! + \internal + + Declared static in QSslSocketPrivate, makes sure the SSL libraries have + been initialized. +*/ + +void QSslSocketPrivate::ensureInitialized() +{ + if (!supportsSsl()) + return; + + ensureCiphersAndCertsLoaded(); } /*! @@ -970,8 +971,20 @@ void QSslSocketBackendPrivate::transmit() #endif plainSocket->disconnectFromHost(); break; + case SSL_ERROR_SYSCALL: // some IO error + case SSL_ERROR_SSL: // error in the SSL library + // we do not know exactly what the error is, nor whether we can recover from it, + // so just return to prevent an endless loop in the outer "while" statement + q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR())); + q->setSocketError(QAbstractSocket::UnknownSocketError); + emit q->error(QAbstractSocket::UnknownSocketError); + return; default: - // ### Handle errors better. + // SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT: can only happen with a + // BIO_s_connect() or BIO_s_accept(), which we do not call. + // SSL_ERROR_WANT_X509_LOOKUP: can only happen with a + // SSL_CTX_set_client_cert_cb(), which we do not call. + // So this default case should never be triggered. q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); @@ -1105,17 +1118,16 @@ bool QSslSocketBackendPrivate::startHandshake() QString peerName = (verificationPeerName.isEmpty () ? q->peerName() : verificationPeerName); QString commonName = configuration.peerCertificate.subjectInfo(QSslCertificate::CommonName); - QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard); - if (!regexp.exactMatch(peerName)) { + if (!isMatchingHostname(commonName.toLower(), peerName.toLower())) { bool matched = false; foreach (const QString &altName, configuration.peerCertificate .alternateSubjectNames().values(QSsl::DnsEntry)) { - regexp.setPattern(altName); - if (regexp.exactMatch(peerName)) { + if (isMatchingHostname(altName.toLower(), peerName.toLower())) { matched = true; break; } } + if (!matched) { // No matches in common names or alternate names. QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate); @@ -1245,4 +1257,39 @@ QList<QSslCertificate> QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates return certificates; } +bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QString &hostname) +{ + int wildcard = cn.indexOf(QLatin1Char('*')); + + // Check this is a wildcard cert, if not then just compare the strings + if (wildcard < 0) + return cn == hostname; + + int firstCnDot = cn.indexOf(QLatin1Char('.')); + int secondCnDot = cn.indexOf(QLatin1Char('.'), firstCnDot+1); + + // Check at least 3 components + if ((-1 == secondCnDot) || (secondCnDot+1 >= cn.length())) + return false; + + // Check * is last character of 1st component (ie. there's a following .) + if (wildcard+1 != firstCnDot) + return false; + + // Check only one star + if (cn.lastIndexOf(QLatin1Char('*')) != wildcard) + return false; + + // Check characters preceding * (if any) match + if (wildcard && (hostname.leftRef(wildcard) != cn.leftRef(wildcard))) + return false; + + // Check characters following first . match + if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot)) + return false; + + // Ok, I guess this was a wildcard CN and the hostname matches. + return true; +} + QT_END_NAMESPACE diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h index 987dfae..7a4e6b6 100644 --- a/src/network/ssl/qsslsocket_openssl_p.h +++ b/src/network/ssl/qsslsocket_openssl_p.h @@ -116,6 +116,7 @@ public: static QSslCipher QSslCipher_from_SSL_CIPHER(SSL_CIPHER *cipher); static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509); + Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname); }; #if defined(Q_OS_SYMBIAN) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ee49a3d..d3f6a29 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1128,7 +1128,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush) d->fill(path); } -extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp +extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index fc28a73..2fa33bf 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1334,6 +1334,10 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co \value OpenGL_Version_3_2 OpenGL version 3.2 or higher is present. + \value OpenGL_Version_3_3 OpenGL version 3.3 or higher is present. + + \value OpenGL_Version_4_0 OpenGL version 4.0 or higher is present. + \value OpenGL_ES_CommonLite_Version_1_0 OpenGL ES version 1.0 Common Lite or higher is present. \value OpenGL_ES_Common_Version_1_0 OpenGL ES version 1.0 Common or higher is present. @@ -5037,8 +5041,9 @@ void QGLWidget::deleteTexture(QMacCompatGLuint id) /*! \since 4.4 - Calls the corresponding QGLContext::drawTexture() on - this widget's context. + Calls the corresponding QGLContext::drawTexture() with + \a target, \a textureId, and \a textureTarget for this + widget's context. */ void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) { @@ -5058,8 +5063,9 @@ void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QM /*! \since 4.4 - Calls the corresponding QGLContext::drawTexture() on - this widget's context. + Calls the corresponding QGLContext::drawTexture() with + \a point, \a textureId, and \a textureTarget for this + widget's context. */ void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget) { diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro index 5223beb..e053f37 100644 --- a/src/plugins/sqldrivers/db2/db2.pro +++ b/src/plugins/sqldrivers/db2/db2.pro @@ -1,10 +1,6 @@ -TARGET = qsqldb2 +TARGET = qsqldb2 -HEADERS = ../../../sql/drivers/db2/qsql_db2.h -SOURCES = main.cpp \ - ../../../sql/drivers/db2/qsql_db2.cpp - -unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2 -win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli +SOURCES = main.cpp +include(../../../sql/drivers/db2/qsql_db2.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro index ec2bc7b..7870ec8 100644 --- a/src/plugins/sqldrivers/ibase/ibase.pro +++ b/src/plugins/sqldrivers/ibase/ibase.pro @@ -1,14 +1,6 @@ -TARGET = qsqlibase +TARGET = qsqlibase -HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h -SOURCES = main.cpp \ - ../../../sql/drivers/ibase/qsql_ibase.cpp - -unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds - -win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) { - !win32-borland:LIBS *= -lgds32_ms - win32-borland:LIBS += gds32.lib -} +SOURCES = main.cpp +include(../../../sql/drivers/ibase/qsql_ibase.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro index 9f5c619..b6d42ff 100644 --- a/src/plugins/sqldrivers/mysql/mysql.pro +++ b/src/plugins/sqldrivers/mysql/mysql.pro @@ -1,23 +1,6 @@ -TARGET = qsqlmysql +TARGET = qsqlmysql -HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h -SOURCES = main.cpp \ - ../../../sql/drivers/mysql/qsql_mysql.cpp - -unix: { - isEmpty(QT_LFLAGS_MYSQL) { - !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS *= -lmysqlclient_r - else:LIBS *= -lmysqlclient - } - } else { - LIBS *= $$QT_LFLAGS_MYSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - } -} - -win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - LIBS *= -llibmysql -} +SOURCES = main.cpp +include(../../../sql/drivers/mysql/qsql_mysql.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro index 3bf70a1..d7dcce9 100644 --- a/src/plugins/sqldrivers/oci/oci.pro +++ b/src/plugins/sqldrivers/oci/oci.pro @@ -1,13 +1,6 @@ -TARGET = qsqloci +TARGET = qsqloci -HEADERS = ../../../sql/drivers/oci/qsql_oci.h -SOURCES = main.cpp \ - ../../../sql/drivers/oci/qsql_oci.cpp - -win32:LIBS *= -loci - -unix:!contains( LIBS, .*clnts.* ):LIBS *= -lclntsh - -macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ +SOURCES = main.cpp +include(../../../sql/drivers/oci/qsql_oci.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro index 2bf85f1..677eb6e 100644 --- a/src/plugins/sqldrivers/odbc/odbc.pro +++ b/src/plugins/sqldrivers/odbc/odbc.pro @@ -1,19 +1,6 @@ -TARGET = qsqlodbc +TARGET = qsqlodbc -HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h -SOURCES = main.cpp \ - ../../../sql/drivers/odbc/qsql_odbc.cpp - -unix { - !contains( LIBS, .*odbc.* ) { - LIBS *= $$QT_LFLAGS_ODBC - } - DEFINES += UNICODE -} - -win32 { - !win32-borland:LIBS *= -lodbc32 - win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib -} +SOURCES = main.cpp +include(../../../sql/drivers/odbc/qsql_odbc.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro index 80a5348..8276c0a 100644 --- a/src/plugins/sqldrivers/psql/psql.pro +++ b/src/plugins/sqldrivers/psql/psql.pro @@ -1,18 +1,6 @@ -TARGET = qsqlpsql +TARGET = qsqlpsql -HEADERS = ../../../sql/drivers/psql/qsql_psql.h -SOURCES = main.cpp \ - ../../../sql/drivers/psql/qsql_psql.cpp - -unix|win32-g++*: { - !isEmpty(QT_LFLAGS_PSQL) { - !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz - !static:LIBS *= $$QT_LFLAGS_PSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL - } - !contains(LIBS, .*pq.*):LIBS *= -lpq -} - -win32:!win32-g++*:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 +SOURCES = main.cpp +include(../../../sql/drivers/psql/qsql_psql.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro index fb31233..f4c1671 100644 --- a/src/plugins/sqldrivers/sqlite/sqlite.pro +++ b/src/plugins/sqldrivers/sqlite/sqlite.pro @@ -1,18 +1,7 @@ -TARGET = qsqlite +TARGET = qsqlite -HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h -SOURCES = smain.cpp \ - ../../../sql/drivers/sqlite/qsql_sqlite.cpp - -!system-sqlite:!contains( LIBS, .*sqlite.* ) { - CONFIG(release, debug|release):DEFINES *= NDEBUG - DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE - INCLUDEPATH += ../../../3rdparty/sqlite - SOURCES += ../../../3rdparty/sqlite/sqlite3.c -} else { - LIBS *= $$QT_LFLAGS_SQLITE - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE -} +SOURCES = smain.cpp +include(../../../sql/drivers/sqlite/qsql_sqlite.pri) wince*: DEFINES += HAVE_LOCALTIME_S=0 diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro index 88db22a..e6197b9 100644 --- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro +++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro @@ -1,9 +1,6 @@ -TARGET = qsqlite2 +TARGET = qsqlite2 -HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h -SOURCES = smain.cpp \ - ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp - -!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite +SOURCES = smain.cpp +include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro index 08a166b..b8e8ded 100644 --- a/src/plugins/sqldrivers/tds/tds.pro +++ b/src/plugins/sqldrivers/tds/tds.pro @@ -1,15 +1,6 @@ -TARGET = qsqltds +TARGET = qsqltds -HEADERS = ../../../sql/drivers/tds/qsql_tds.h - -SOURCES = main.cpp \ - ../../../sql/drivers/tds/qsql_tds.cpp - -unix:!contains( LIBS, .*sybdb.* ):LIBS *= -lsybdb - -win32 { - !win32-borland:LIBS *= -lNTWDBLIB - win32-borland:LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB -} +SOURCES = main.cpp +include(../../../sql/drivers/tds/qsql_tds.pri) include(../qsqldriverbase.pri) diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 451d1b0..f6390bb 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1268,6 +1268,7 @@ QDateTime QScriptValue::toDateTime() const Q_D(const QScriptValue); if (!d || !d->engine) return QDateTime(); + QScript::APIShim shim(d->engine); return QScriptEnginePrivate::toDateTime(d->engine->currentFrame, d->jscValue); } @@ -1284,6 +1285,7 @@ QRegExp QScriptValue::toRegExp() const Q_D(const QScriptValue); if (!d || !d->engine) return QRegExp(); + QScript::APIShim shim(d->engine); return QScriptEnginePrivate::toRegExp(d->engine->currentFrame, d->jscValue); } #endif // QT_NO_REGEXP @@ -1303,6 +1305,7 @@ QObject *QScriptValue::toQObject() const Q_D(const QScriptValue); if (!d || !d->engine) return 0; + QScript::APIShim shim(d->engine); return QScriptEnginePrivate::toQObject(d->engine->currentFrame, d->jscValue); } @@ -1317,6 +1320,7 @@ const QMetaObject *QScriptValue::toQMetaObject() const Q_D(const QScriptValue); if (!d || !d->engine) return 0; + QScript::APIShim shim(d->engine); return QScriptEnginePrivate::toQMetaObject(d->engine->currentFrame, d->jscValue); } @@ -1407,6 +1411,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex, Q_D(const QScriptValue); if (!d || !d->isObject()) return QScriptValue(); + QScript::APIShim shim(d->engine); return d->engine->scriptValueFromJSCValue(d->property(arrayIndex, mode)); } @@ -1434,6 +1439,7 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value, "cannot set value created in a different engine"); return; } + QScript::APIShim shim(d->engine); JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value); d->setProperty(arrayIndex, jsValue, flags); } diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri new file mode 100644 index 0000000..16557f0 --- /dev/null +++ b/src/sql/drivers/db2/qsql_db2.pri @@ -0,0 +1,8 @@ +HEADERS += $$PWD/qsql_db2.h +SOURCES += $$PWD/qsql_db2.cpp + +unix { + !contains(LIBS, .*db2.*):LIBS += -ldb2 +} else:!win32-borland { + !contains(LIBS, .*db2.*):LIBS += -ldb2cli +} diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index 05e7265..87cc0b1 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -1,119 +1,11 @@ -contains(sql-drivers, all ) { - sql-driver += psql mysql odbc oci tds db2 sqlite ibase -} - -contains(sql-drivers, psql) { - HEADERS += drivers/psql/qsql_psql.h - SOURCES += drivers/psql/qsql_psql.cpp - - unix|win32-g++* { - !static:!isEmpty(QT_LFLAGS_PSQL) { - !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz - !static:LIBS *= $$QT_LFLAGS_PSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL - } - !contains(LIBS, .*pq.*):LIBS *= -lpq - } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 -} - -contains(sql-drivers, mysql) { - HEADERS += drivers/mysql/qsql_mysql.h - SOURCES += drivers/mysql/qsql_mysql.cpp - - unix { - isEmpty(QT_LFLAGS_MYSQL) { - !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS *= -lmysqlclient_r - else:LIBS *= -lmysqlclient - } - } else { - LIBS *= $$QT_LFLAGS_MYSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - } - } - - win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - !win32-g++*:LIBS *= -llibmysql - else:LIBS *= -lmysql - } -} - -contains(sql-drivers, odbc) { - HEADERS += drivers/odbc/qsql_odbc.h - SOURCES += drivers/odbc/qsql_odbc.cpp - - mac:!contains( LIBS, .*odbc.* ):LIBS *= -liodbc - unix:!contains( LIBS, .*odbc.* ):LIBS *= -lodbc - unix:DEFINES += UNICODE - - win32 { - !win32-borland:LIBS *= -lodbc32 - else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib - } -} - -contains(sql-drivers, oci) { - HEADERS += drivers/oci/qsql_oci.h - SOURCES += drivers/oci/qsql_oci.cpp - - unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh - - win32:LIBS += -loci -} - -contains(sql-drivers, tds) { - HEADERS += drivers/tds/qsql_tds.h - SOURCES += drivers/tds/qsql_tds.cpp - - unix:LIBS += -L$SYBASE/lib -lsybdb - - win32 { - !win32-borland:LIBS += -lNTWDBLIB - else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB - } -} - -contains(sql-drivers, db2) { - HEADERS += drivers/db2/qsql_db2.h - SOURCES += drivers/db2/qsql_db2.cpp - - unix:LIBS += -ldb2 - - win32 { - !win32-borland:LIBS += -ldb2cli -# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib - } -} - -contains(sql-drivers, ibase) { - HEADERS += drivers/ibase/qsql_ibase.h - SOURCES += drivers/ibase/qsql_ibase.cpp - - unix:LIBS *= -lgds - - win32 { - !win32-borland:LIBS *= -lgds32_ms - else:LIBS += gds32.lib - } -} - -contains(sql-drivers, sqlite2) { - HEADERS += drivers/sqlite2/qsql_sqlite2.h - SOURCES += drivers/sqlite2/qsql_sqlite2.cpp - !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite -} - -contains(sql-drivers, sqlite) { - !system-sqlite:!contains( LIBS, .*sqlite3.* ) { - CONFIG(release, debug|release):DEFINES *= NDEBUG - DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE - INCLUDEPATH += ../3rdparty/sqlite - SOURCES += ../3rdparty/sqlite/sqlite3.c - } else { - LIBS *= $$QT_LFLAGS_SQLITE - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE - } - - HEADERS += drivers/sqlite/qsql_sqlite.h - SOURCES += drivers/sqlite/qsql_sqlite.cpp -} +contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase + +contains(sql-drivers, psql):include($$PWD/psql/qsql_psql.pri) +contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri) +contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri) +contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri) +contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri) +contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri) +contains(sql-drivers, ibase):include($$PWD/ibase/qsql_ibase.pri) +contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri) +contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri) diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri new file mode 100644 index 0000000..33fbb0d --- /dev/null +++ b/src/sql/drivers/ibase/qsql_ibase.pri @@ -0,0 +1,11 @@ +HEADERS += $$PWD/qsql_ibase.h +SOURCES += $$PWD/qsql_ibase.cpp + +unix { + !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds +} else { + !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { + win32-borland:LIBS += gds32.lib + else:LIBS += -lgds32_ms + } +} diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri new file mode 100644 index 0000000..1b9c3dd --- /dev/null +++ b/src/sql/drivers/mysql/qsql_mysql.pri @@ -0,0 +1,16 @@ +HEADERS += $$PWD/qsql_mysql.h +SOURCES += $$PWD/qsql_mysql.cpp + +unix { + isEmpty(QT_LFLAGS_MYSQL) { + !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { + use_libmysqlclient_r:LIBS += -lmysqlclient_r + else:LIBS += -lmysqlclient + } + } else { + LIBS *= $$QT_LFLAGS_MYSQL + QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL + } +} else { + !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql +} diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri new file mode 100644 index 0000000..60ccc4c --- /dev/null +++ b/src/sql/drivers/oci/qsql_oci.pri @@ -0,0 +1,9 @@ +HEADERS += $$PWD/qsql_oci.h +SOURCES += $$PWD/qsql_oci.cpp + +unix { + !contains(LIBS, .*clnts.*):LIBS += -lclntsh +} else { + LIBS *= -loci +} +macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri new file mode 100644 index 0000000..66a8d51 --- /dev/null +++ b/src/sql/drivers/odbc/qsql_odbc.pri @@ -0,0 +1,13 @@ +HEADERS += $$PWD/qsql_odbc.h +SOURCES += $$PWD/qsql_odbc.cpp + +unix { + DEFINES += UNICODE + !contains(LIBS, .*odbc.*) { + macx:LIBS += -liodbc + else:LIBS += $$QT_LFLAGS_ODBC + } +} else { + win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib + else:LIBS *= -lodbc32 +} diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri new file mode 100644 index 0000000..97db4be --- /dev/null +++ b/src/sql/drivers/psql/qsql_psql.pri @@ -0,0 +1,13 @@ +HEADERS += $$PWD/qsql_psql.h +SOURCES += $$PWD/qsql_psql.cpp + +unix|win32-g++* { + !static:!isEmpty(QT_LFLAGS_PSQL) { + !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz + LIBS *= $$QT_LFLAGS_PSQL + QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL + } + !contains(LIBS, .*pq.*):LIBS += -lpq +} else { + !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32 +} diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri new file mode 100644 index 0000000..7ad5936 --- /dev/null +++ b/src/sql/drivers/sqlite/qsql_sqlite.pri @@ -0,0 +1,9 @@ +HEADERS += $$PWD/qsql_sqlite.h +SOURCES += $$PWD/qsql_sqlite.cpp + +!system-sqlite:!contains(LIBS, .*sqlite3.*) { + include($$PWD/../../../3rdparty/sqlite.pri) +} else { + LIBS *= $$QT_LFLAGS_SQLITE + QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE +} diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri new file mode 100644 index 0000000..9a9f6cd --- /dev/null +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri @@ -0,0 +1,4 @@ +HEADERS += $$PWD/qsql_sqlite2.h +SOURCES += $$PWD/qsql_sqlite2.cpp + +!contains(LIBS, .*sqlite.*):LIBS += -lsqlite diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri new file mode 100644 index 0000000..c552ead --- /dev/null +++ b/src/sql/drivers/tds/qsql_tds.pri @@ -0,0 +1,10 @@ +HEADERS += $$PWD/qsql_tds.h +SOURCES += $$PWD/qsql_tds.cpp + +unix { + !contains(LIBS, .*sybdb.*):LIBS += -lsybdb +} else:win32-borland { + LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB +} else { + LIBS *= -lNTWDBLIB +} diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index cfaa3fa..2d9ea93 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -112,6 +112,7 @@ SUBDIRS=\ qmdisubwindow \ qmessagebox \ qmetaobject \ + qmimedata \ qmouseevent_modal \ qmovie \ qnetworkaccessmanager_and_qprogressdialog \ diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index 0765bfc..f58f932 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -275,3 +275,30 @@ void bogosity() // no spaces here. test collateral damage from ignoring equal sign Class::member=QObject::tr("just QObject"); } + + + +namespace Internal { + +class Message : public QObject +{ + Q_OBJECT +public: + Message(QObject *parent = 0); +}; + +} // The temporary closing of the namespace triggers the problem + +namespace Internal { + +static inline QString message1() +{ + return Message::tr("message1"); // Had no namespace +} + +static inline QString message2() +{ + return Message::tr("message2"); // Already had namespace +} + +} diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index 208191d..7ac318e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -120,6 +120,19 @@ backslashed \ stuff.</source> </message> </context> <context> + <name>Internal::Message</name> + <message> + <location filename="main.cpp" line="296"/> + <source>message1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="301"/> + <source>message2</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>Kåntekst</name> <message utf8="true"> <location filename="finddialog.cpp" line="180"/> diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp index 994057b..2f98521 100644 --- a/tests/auto/mediaobject/tst_mediaobject.cpp +++ b/tests/auto/mediaobject/tst_mediaobject.cpp @@ -204,9 +204,8 @@ void tst_MediaObject::testPlayFromResource() #ifdef Q_OS_SYMBIAN QSKIP("Not implemented yet.", SkipAll); #else - QFile file(MEDIA_FILEPATH); MediaObject media; - media.setCurrentSource(&file); + media.setCurrentSource(QString(MEDIA_FILEPATH)); QVERIFY(media.state() != Phonon::ErrorState); if (media.state() != Phonon::StoppedState) QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000); diff --git a/tests/auto/qauthenticator/qauthenticator.pro b/tests/auto/qauthenticator/qauthenticator.pro new file mode 100644 index 0000000..05f83bc --- /dev/null +++ b/tests/auto/qauthenticator/qauthenticator.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +requires(contains(QT_CONFIG,private_tests)) +QT = core network +SOURCES += tst_qauthenticator.cpp +DEFINES += SRCDIR=\\\"$$PWD/\\\" diff --git a/tests/auto/qauthenticator/tst_qauthenticator.cpp b/tests/auto/qauthenticator/tst_qauthenticator.cpp new file mode 100644 index 0000000..37d6774 --- /dev/null +++ b/tests/auto/qauthenticator/tst_qauthenticator.cpp @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the FOO module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include <QtCore/QString> +#include <QtTest/QtTest> +#include <QtCore/QCoreApplication> +#include <QtNetwork/QAuthenticator> + +#include <private/qauthenticator_p.h> + +class tst_QAuthenticator : public QObject +{ + Q_OBJECT + +public: + tst_QAuthenticator(); + +private Q_SLOTS: + void basicAuth(); + void basicAuth_data(); + + void ntlmAuth_data(); + void ntlmAuth(); +}; + +tst_QAuthenticator::tst_QAuthenticator() +{ +} + +void tst_QAuthenticator::basicAuth_data() +{ + QTest::addColumn<QString>("data"); + QTest::addColumn<QString>("realm"); + QTest::addColumn<QString>("user"); + QTest::addColumn<QString>("password"); + QTest::addColumn<QByteArray>("expectedReply"); + + QTest::newRow("just-user") << "" << "" << "foo" << "" << QByteArray("foo:").toBase64(); + QTest::newRow("user-password") << "" << "" << "foo" << "bar" << QByteArray("foo:bar").toBase64(); + QTest::newRow("user-password-realm") << "realm=\"secure area\"" << "secure area" << "foo" << "bar" << QByteArray("foo:bar").toBase64(); +} + +void tst_QAuthenticator::basicAuth() +{ + QFETCH(QString, data); + QFETCH(QString, realm); + QFETCH(QString, user); + QFETCH(QString, password); + QFETCH(QByteArray, expectedReply); + + QAuthenticator auth; + auth.detach(); + QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(auth); + QVERIFY(priv->phase == QAuthenticatorPrivate::Start); + + QList<QPair<QByteArray, QByteArray> > headers; + headers << qMakePair(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8()); + priv->parseHttpResponse(headers, /*isProxy = */ false); + + QCOMPARE(auth.realm(), realm); + QCOMPARE(auth.option("realm").toString(), realm); + + auth.setUser(user); + auth.setPassword(password); + + QVERIFY(priv->phase == QAuthenticatorPrivate::Start); + + QCOMPARE(priv->calculateResponse("GET", "/").constData(), ("Basic " + expectedReply).constData()); +} + +void tst_QAuthenticator::ntlmAuth_data() +{ + QTest::addColumn<QString>("data"); + QTest::addColumn<QString>("realm"); + + QTest::newRow("no-realm") << "TlRMTVNTUAACAAAAHAAcADAAAAAFAoEATFZ3OLRQADIAAAAAAAAAAJYAlgBMAAAAUQBUAC0AVABFAFMAVAAtAEQATwBNAEEASQBOAAIAHABRAFQALQBUAEUAUwBUAC0ARABPAE0AQQBJAE4AAQAcAFEAVAAtAFQARQBTAFQALQBTAEUAUgBWAEUAUgAEABYAcQB0AC0AdABlAHMAdAAtAG4AZQB0AAMANABxAHQALQB0AGUAcwB0AC0AcwBlAHIAdgBlAHIALgBxAHQALQB0AGUAcwB0AC0AbgBlAHQAAAAAAA==" << ""; + QTest::newRow("with-realm") << "TlRMTVNTUAACAAAADAAMADgAAAAFAoECWCZkccFFAzwAAAAAAAAAAL4AvgBEAAAABQLODgAAAA9NAEcARABOAE8ASwACAAwATQBHAEQATgBPAEsAAQAcAE4ATwBLAC0AQQBNAFMAUwBTAEYARQAtADAAMQAEACAAbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQADAD4AbgBvAGsALQBhAG0AcwBzAHMAZgBlAC0AMAAxAC4AbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQAFACAAbQBnAGQAbgBvAGsALgBuAG8AawBpAGEALgBjAG8AbQAAAAAA" << "NOE"; +} + +void tst_QAuthenticator::ntlmAuth() +{ + QFETCH(QString, data); + QFETCH(QString, realm); + + QAuthenticator auth; + auth.detach(); + QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(auth); + QVERIFY(priv->phase == QAuthenticatorPrivate::Start); + + QList<QPair<QByteArray, QByteArray> > headers; + + // NTLM phase 1: negotiate + // This phase of NTLM contains no information, other than what we're willing to negotiate + // Current implementation uses flags: + // NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET + headers << qMakePair<QByteArray, QByteArray>("WWW-Authenticate", "NTLM"); + priv->parseHttpResponse(headers, /*isProxy = */ false); + QCOMPARE(priv->calculateResponse("GET", "/").constData(), "NTLM TlRMTVNTUAABAAAABQIAAAAAAAAAAAAAAAAAAAAAAAA="); + + // NTLM phase 2: challenge + headers.clear(); + headers << qMakePair(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8()); + priv->parseHttpResponse(headers, /*isProxy = */ false); + + QEXPECT_FAIL("with-realm", "NTLM authentication code doesn't extract the realm", Continue); + QCOMPARE(auth.realm(), realm); + + auth.setUser("unimportant"); + auth.setPassword("unimportant"); + + QVERIFY(!priv->calculateResponse("GET", "/").isEmpty()); +} + +QTEST_MAIN(tst_QAuthenticator); + +#include "tst_qauthenticator.moc" diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 4c651bf..93b1891 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -1082,7 +1082,7 @@ void tst_QFileInfo::isHidden_data() #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory")); - QVERIFY(SetFileAttributesW(QString("./hidden-directory").utf16(),FILE_ATTRIBUTE_HIDDEN)); + QVERIFY(SetFileAttributesW(reinterpret_cast<LPCWSTR>(QString("./hidden-directory").utf16()),FILE_ATTRIBUTE_HIDDEN)); QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true; QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true; #endif diff --git a/tests/auto/qmake/testdata/simple_app/build/README b/tests/auto/qmake/testdata/simple_app/build/README new file mode 100644 index 0000000..acfd9d9 --- /dev/null +++ b/tests/auto/qmake/testdata/simple_app/build/README @@ -0,0 +1 @@ +Here to ensure build/ exists, used by the simple_app_shadowbuild2 test. diff --git a/tests/auto/qmake/testdata/simple_app/simple_app.pro b/tests/auto/qmake/testdata/simple_app/simple_app.pro index f496d5b..a8c4ad6 100644 --- a/tests/auto/qmake/testdata/simple_app/simple_app.pro +++ b/tests/auto/qmake/testdata/simple_app/simple_app.pro @@ -3,6 +3,7 @@ CONFIG += qt warn_on HEADERS = test_file.h SOURCES = test_file.cpp \ main.cpp +RESOURCES = test.qrc TARGET = simple_app DESTDIR = ./ diff --git a/tests/auto/qmake/testdata/simple_app/test.qrc b/tests/auto/qmake/testdata/simple_app/test.qrc new file mode 100644 index 0000000..decde3d --- /dev/null +++ b/tests/auto/qmake/testdata/simple_app/test.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>test.qrc</file> + </qresource> +</RCC> diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp index 03054e7..5efe714 100644 --- a/tests/auto/qmake/tst_qmake.cpp +++ b/tests/auto/qmake/tst_qmake.cpp @@ -65,6 +65,7 @@ public slots: private slots: void simple_app(); void simple_app_shadowbuild(); + void simple_app_shadowbuild2(); void simple_lib(); void simple_dll(); void subdirs(); @@ -163,6 +164,21 @@ void tst_qmake::simple_app_shadowbuild() QVERIFY( test_compiler.removeMakefile( buildDir ) ); } +void tst_qmake::simple_app_shadowbuild2() +{ + QString workDir = base_path + "/testdata/simple_app"; + QString buildDir = base_path + "/testdata/simple_app/build"; + + QVERIFY( test_compiler.qmake( workDir, "simple_app", buildDir )); + QVERIFY( test_compiler.make( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); + QVERIFY( test_compiler.makeClean( buildDir )); + QVERIFY( test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should still exist after a make clean + QVERIFY( test_compiler.makeDistClean( buildDir )); + QVERIFY( !test_compiler.exists( buildDir, "simple_app", Exe, "1.0.0" )); // Should not exist after a make distclean + QVERIFY( test_compiler.removeMakefile( buildDir ) ); +} + void tst_qmake::simple_dll() { QString workDir = base_path + "/testdata/simple_dll"; diff --git a/tests/auto/qmimedata/qmimedata.pro b/tests/auto/qmimedata/qmimedata.pro new file mode 100644 index 0000000..13fbe65 --- /dev/null +++ b/tests/auto/qmimedata/qmimedata.pro @@ -0,0 +1,4 @@ +load(qttest_p4) +SOURCES += tst_qmimedata.cpp + + diff --git a/tests/auto/qmimedata/tst_qmimedata.cpp b/tests/auto/qmimedata/tst_qmimedata.cpp new file mode 100644 index 0000000..be7a654 --- /dev/null +++ b/tests/auto/qmimedata/tst_qmimedata.cpp @@ -0,0 +1,343 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include <QtTest/QtTest> + +#include <QMimeData> + +class tst_QMimeData : public QObject +{ + Q_OBJECT +public: + tst_QMimeData() + { + } + +private slots: + void clear() const; + void colorData() const; + void data() const; + void formats() const; + void hasColor() const; + void hasFormat() const; + void hasHtml() const; + void hasImage() const; + // hasText() covered by setText() + // hasUrls() covered by setUrls() + // html() covered by setHtml() + void imageData() const; + void removeFormat() const; + // setColorData() covered by hasColor() + // setData() covered in a few different tests + void setHtml() const; + // setImageData() covered in a few tests + void setText() const; + void setUrls() const; + // text() covered in setText() + // urls() covered by setUrls() +}; + +void tst_QMimeData::clear() const +{ + QMimeData mimeData; + + // set, clear, verify empty + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasText()); + mimeData.clear(); + QVERIFY(mimeData.hasText() == false); + + // repopulate, verify not empty + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasText()); +} + +void tst_QMimeData::colorData() const +{ + QMimeData mimeData; + QColor red = Qt::red; + QColor blue = Qt::blue; + + // set, verify + mimeData.setColorData(red); + QVERIFY(mimeData.hasColor()); + QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), red); + + // change, verify + mimeData.setColorData(Qt::blue); + QVERIFY(mimeData.hasColor()); + QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), blue); +} + +void tst_QMimeData::data() const +{ + QMimeData mimeData; + + // set text, verify + mimeData.setData("text/plain", "pirates"); + QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates")); + QVERIFY(mimeData.data("text/html").length() == 0); + + // html time + mimeData.setData("text/html", "ninjas"); + QCOMPARE(mimeData.data("text/html"), QByteArray("ninjas")); + QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates")); // make sure text not damaged + QCOMPARE(mimeData.data("text/html"), mimeData.html().toLatin1()); +} + +void tst_QMimeData::formats() const +{ + QMimeData mimeData; + + // set text, verify + mimeData.setData("text/plain", "pirates"); + QCOMPARE(mimeData.formats(), QStringList() << "text/plain"); + + // set html, verify + mimeData.setData("text/html", "ninjas"); + QCOMPARE(mimeData.formats(), QStringList() << "text/plain" << "text/html"); + + // clear, verify + mimeData.clear(); + QCOMPARE(mimeData.formats(), QStringList()); + + // set an odd format, verify + mimeData.setData("foo/bar", "somevalue"); + QCOMPARE(mimeData.formats(), QStringList() << "foo/bar"); +} + +void tst_QMimeData::hasColor() const +{ + QMimeData mimeData; + + // initial state + QVERIFY(mimeData.hasColor() == false); + + // set, verify + mimeData.setColorData(QColor(Qt::red)); + QVERIFY(mimeData.hasColor()); + + // clear, verify + mimeData.clear(); + QVERIFY(mimeData.hasColor() == false); + + // set something else, verify + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasColor() == false); +} + +void tst_QMimeData::hasFormat() const +{ + QMimeData mimeData; + + // initial state + QVERIFY(mimeData.hasFormat("text/plain") == false); + + // add, verify + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasFormat("text/plain")); + QVERIFY(mimeData.hasFormat("text/html") == false); + + // clear, verify + mimeData.clear(); + QVERIFY(mimeData.hasFormat("text/plain") == false); + QVERIFY(mimeData.hasFormat("text/html") == false); +} + +void tst_QMimeData::hasHtml() const +{ + QMimeData mimeData; + + // initial state + QVERIFY(mimeData.hasHtml() == false); + + // add plain, verify false + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasHtml() == false); + + // add html, verify + mimeData.setData("text/html", "ninjas"); + QVERIFY(mimeData.hasHtml()); + + // clear, verify + mimeData.clear(); + QVERIFY(mimeData.hasHtml() == false); + + // readd, verify + mimeData.setData("text/html", "ninjas"); + QVERIFY(mimeData.hasHtml()); +} + +void tst_QMimeData::hasImage() const +{ + QMimeData mimeData; + + // initial state + QVERIFY(mimeData.hasImage() == false); + + // add text, verify false + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasImage() == false); + + // add image + mimeData.setImageData(QImage()); + QVERIFY(mimeData.hasImage()); + + // clear, verify + mimeData.clear(); + QVERIFY(mimeData.hasImage() == false); +} + +void tst_QMimeData::imageData() const +{ + QMimeData mimeData; + + // initial state + QCOMPARE(mimeData.imageData(), QVariant()); + + // set, test + mimeData.setImageData(QImage()); + QVERIFY(mimeData.hasImage()); + QCOMPARE(mimeData.imageData(), QVariant(QImage())); + + // clear, verify + mimeData.clear(); + QCOMPARE(mimeData.imageData(), QVariant()); +} + +void tst_QMimeData::removeFormat() const +{ + QMimeData mimeData; + + // add, verify + mimeData.setData("text/plain", "pirates"); + QVERIFY(mimeData.hasFormat("text/plain")); + + // add another, verify + mimeData.setData("text/html", "ninjas"); + QVERIFY(mimeData.hasFormat("text/html")); + + // remove, verify + mimeData.removeFormat("text/plain"); + QVERIFY(mimeData.hasFormat("text/plain") == false); + QVERIFY(mimeData.hasFormat("text/html")); + + // remove, verify + mimeData.removeFormat("text/html"); + QVERIFY(mimeData.hasFormat("text/plain") == false); + QVERIFY(mimeData.hasFormat("text/html") == false); +} + +void tst_QMimeData::setHtml() const +{ + QMimeData mimeData; + + // initial state + QVERIFY(mimeData.hasHtml() == false); + + // add html, verify + mimeData.setHtml("ninjas"); + QVERIFY(mimeData.hasHtml()); + QCOMPARE(mimeData.html(), QLatin1String("ninjas")); + + // reset html + mimeData.setHtml("pirates"); + QVERIFY(mimeData.hasHtml()); + QCOMPARE(mimeData.html(), QLatin1String("pirates")); +} + +void tst_QMimeData::setText() const +{ + QMimeData mimeData; + + // verify initial state + QCOMPARE(mimeData.text(), QLatin1String("")); + QVERIFY(mimeData.hasText() == false); + + // set, verify + mimeData.setText("pirates"); + QVERIFY(mimeData.hasText()); + QCOMPARE(mimeData.text(), QLatin1String("pirates")); + QCOMPARE(mimeData.text().toLatin1(), mimeData.data("text/plain")); + + // reset, verify + mimeData.setText("ninjas"); + QVERIFY(mimeData.hasText()); + QCOMPARE(mimeData.text(), QLatin1String("ninjas")); + QCOMPARE(mimeData.text().toLatin1(), mimeData.data("text/plain")); + + // clear, verify + mimeData.clear(); + QCOMPARE(mimeData.text(), QLatin1String("")); + QVERIFY(mimeData.hasText() == false); +} + +void tst_QMimeData::setUrls() const +{ + QMimeData mimeData; + QList<QUrl> shortUrlList; + QList<QUrl> longUrlList; + + // set up + shortUrlList += QUrl("http://qt.nokia.com"); + longUrlList = shortUrlList; + longUrlList += QUrl("http://www.google.com"); + + // verify initial state + QVERIFY(mimeData.hasUrls() == false); + + // set a few, verify + mimeData.setUrls(shortUrlList); + QCOMPARE(mimeData.urls(), shortUrlList); + + // change them, verify + mimeData.setUrls(longUrlList); + QCOMPARE(mimeData.urls(), longUrlList); + + // clear, verify + mimeData.clear(); + QVERIFY(mimeData.hasUrls() == false); +} + + +QTEST_MAIN(tst_QMimeData) +#include "tst_qmimedata.moc" diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 6885adf..7a732cc 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -4265,6 +4265,35 @@ void tst_QScriptEngine::reentrancy() QScriptEngine eng; QCOMPARE(eng.evaluate("Array()").toString(), QString()); } + + { + QScriptEngine eng1; + QScriptEngine eng2; + { + QScriptValue d1 = eng1.newDate(0); + QScriptValue d2 = eng2.newDate(0); + QCOMPARE(d1.toDateTime(), d2.toDateTime()); + QCOMPARE(d2.toDateTime(), d1.toDateTime()); + } + { + QScriptValue r1 = eng1.newRegExp("foo", "gim"); + QScriptValue r2 = eng2.newRegExp("foo", "gim"); + QCOMPARE(r1.toRegExp(), r2.toRegExp()); + QCOMPARE(r2.toRegExp(), r1.toRegExp()); + } + { + QScriptValue o1 = eng1.newQObject(this); + QScriptValue o2 = eng2.newQObject(this); + QCOMPARE(o1.toQObject(), o2.toQObject()); + QCOMPARE(o2.toQObject(), o1.toQObject()); + } + { + QScriptValue mo1 = eng1.newQMetaObject(&staticMetaObject); + QScriptValue mo2 = eng2.newQMetaObject(&staticMetaObject); + QCOMPARE(mo1.toQMetaObject(), mo2.toQMetaObject()); + QCOMPARE(mo2.toQMetaObject(), mo1.toQMetaObject()); + } + } } void tst_QScriptEngine:: incDecNonObjectProperty() diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 8aa4e711..83a3388 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -2123,6 +2123,10 @@ void tst_QScriptValue::getSetProperty() QVERIFY(object.property(foo).strictlyEquals(num)); QVERIFY(object.property("foo").strictlyEquals(num)); QVERIFY(object.propertyFlags(foo) == 0); + + // Setting index property on non-Array + object.setProperty(13, num); + QVERIFY(object.property(13).equals(num)); } void tst_QScriptValue::arrayElementGetterSetter() diff --git a/tests/auto/qscrollbar/tst_qscrollbar.cpp b/tests/auto/qscrollbar/tst_qscrollbar.cpp index 735b2dd..16d5b42 100644 --- a/tests/auto/qscrollbar/tst_qscrollbar.cpp +++ b/tests/auto/qscrollbar/tst_qscrollbar.cpp @@ -130,7 +130,7 @@ void tst_QScrollBar::task_209492() QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint, Qt::LeftButton, Qt::LeftButton, 0); QApplication::sendEvent(verticalScrollBar, &mousePressEvent); - QTest::qWait(50); + QTest::qWait(1); QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint, Qt::LeftButton, Qt::LeftButton, 0); QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent); diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 0cf638b..0c12974 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -55,6 +55,7 @@ #include <QAuthenticator> #include "private/qhostinfo_p.h" +#include "private/qsslsocket_openssl_p.h" #include "../network-settings.h" @@ -163,6 +164,7 @@ private slots: void setDefaultCiphers(); void supportedCiphers(); void systemCaCertificates(); + void wildcardCertificateNames(); void wildcard(); void setEmptyKey(); void spontaneousWrite(); @@ -1063,6 +1065,28 @@ void tst_QSslSocket::systemCaCertificates() QCOMPARE(certs, QSslSocket::defaultCaCertificates()); } +void tst_QSslSocket::wildcardCertificateNames() +{ + // Passing CN matches + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("www.example.com"), QString("www.example.com")), true ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example.com"), QString("www.example.com")), true ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx*.example.com"), QString("xxxwww.example.com")), true ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("f*.example.com"), QString("foo.example.com")), true ); + + // Failing CN matches + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx.example.com"), QString("www.example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*"), QString("www.example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.*.com"), QString("www.example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example.com"), QString("baa.foo.example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("f*.example.com"), QString("baa.example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.com"), QString("example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*fail.com"), QString("example.com")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example."), QString("www.example.")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example."), QString("www.example")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString(""), QString("www")), false ); + QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*"), QString("www")), false ); +} + void tst_QSslSocket::wildcard() { QSKIP("TODO: solve wildcard problem", SkipAll); diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index 31cae40..e3b2ca5 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -275,7 +275,7 @@ void tst_QTcpSocket::initTestCase_data() QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false; QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false; -// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false; + QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false; #ifndef QT_NO_OPENSSL QTest::newRow("WithoutProxy SSL") << false << 0 << true; @@ -284,7 +284,7 @@ void tst_QTcpSocket::initTestCase_data() QTest::newRow("WithHttpProxy SSL") << true << int(HttpProxy) << true; QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true; -// QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true; + QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true; #endif } diff --git a/tests/auto/qtexttable/tst_qtexttable.cpp b/tests/auto/qtexttable/tst_qtexttable.cpp index 2e6007e..9dcc369 100644 --- a/tests/auto/qtexttable/tst_qtexttable.cpp +++ b/tests/auto/qtexttable/tst_qtexttable.cpp @@ -48,9 +48,14 @@ #include <qtexttable.h> #include <qdebug.h> #include <qtextcursor.h> +#include <qtextdocument.h> +#include <qtextedit.h> //TESTED_FILES= +typedef QList<int> IntList; +Q_DECLARE_METATYPE(IntList) + QT_FORWARD_DECLARE_CLASS(QTextDocument) class tst_QTextTable : public QObject @@ -78,6 +83,7 @@ private slots: void insertRows(); void deleteInTable(); void mergeCells(); + void mergeAndInsert(); void splitCells(); void blocksForTableShouldHaveEmptyFormat(); void removeTableByRemoveRows(); @@ -93,6 +99,8 @@ private slots: void removeColumns3(); void removeColumns4(); void removeColumns5(); + void QTBUG11282_insertBeforeMergedEnding_data(); + void QTBUG11282_insertBeforeMergedEnding(); private: QTextTable *create2x2Table(); @@ -586,6 +594,16 @@ void tst_QTextTable::mergeCells() QVERIFY(table->cellAt(0, 1) == table->cellAt(1, 1)); } +void tst_QTextTable::mergeAndInsert() +{ + QTextTable *table = cursor.insertTable(4,3); + table->mergeCells(0,1,3,2); + table->mergeCells(3,0,1,3); + //Don't crash ! + table->insertColumns(1,2); + QCOMPARE(table->columns(), 5); +} + void tst_QTextTable::splitCells() { QTextTable *table = create4x4Table(); @@ -931,5 +949,42 @@ void tst_QTextTable::removeColumns5() QCOMPARE(table->cellAt(3, 2).firstPosition(), 11); } +void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding_data() +{ + QTest::addColumn<int>("rows"); + QTest::addColumn<int>("columns"); + QTest::addColumn<QList<int> >("merge"); + QTest::addColumn<QList<int> >("insert"); + + QTest::newRow("2x3, merge two, insert one") << 2 << 3 << (QList<int>() << 1 << 2 << 2) + << (QList<int>() << 1 << 1) ; + QTest::newRow("3x4, merge three, insert one") << 3 << 4 << (QList<int>() << 1 << 3 << 3) + << (QList<int>() << 1 << 1) ; + QTest::newRow("4x3, merge two, insert two") << 4 << 3 << (QList<int>() << 1 << 4 << 2) + << (QList<int>() << 1 << 2) ; + QTest::newRow("4x4, merge middle two, insert one") << 4 << 4 << (QList<int>() << 1 << 4 << 2) + << (QList<int>() << 1 << 1) ; +} + +void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding() +{ + QFETCH(int, rows); + QFETCH(int, columns); + QFETCH(QList<int>, merge); + QFETCH(QList<int>, insert); + QTextTable *table = cursor.insertTable(rows, columns); + QTextEdit *textEdit = new QTextEdit; + textEdit->setDocument(doc); + textEdit->show(); + QTest::qWaitForWindowShown(textEdit); + table->mergeCells(0,merge.at(0), merge.at(1), merge.at(2)); + //Don't crash ! + table->insertColumns(insert.at(0), insert.at(1)); + //Check that the final size is what we expected + QCOMPARE(table->rows(), rows); + QCOMPARE(table->columns(), columns + insert.at(1)); + delete textEdit; +} + QTEST_MAIN(tst_QTextTable) #include "tst_qtexttable.moc" diff --git a/tests/auto/quuid/quuid.pro b/tests/auto/quuid/quuid.pro index f7608fa..25e2456 100644 --- a/tests/auto/quuid/quuid.pro +++ b/tests/auto/quuid/quuid.pro @@ -1,3 +1,6 @@ -load(qttest_p4) -QT = core -SOURCES += tst_quuid.cpp +TEMPLATE = subdirs + +SUBDIRS = testProcessUniqueness + +SUBDIRS += test + diff --git a/tests/auto/quuid/test/test.pro b/tests/auto/quuid/test/test.pro new file mode 100644 index 0000000..123aa50 --- /dev/null +++ b/tests/auto/quuid/test/test.pro @@ -0,0 +1,29 @@ +load(qttest_p4) + +QT = core +SOURCES += ../tst_quuid.cpp +TARGET = tst_quuid + +CONFIG(debug_and_release_target) { + CONFIG(debug, debug|release) { + DESTDIR = ../debug + } else { + DESTDIR = ../release + } +} else { + DESTDIR = .. +} + +wince* { + addFile_processUniqueness.sources = $$OUT_PWD/../testProcessUniqueness/testProcessUniqueness.exe + addFile_processUniqueness.path = testProcessUniqueness + + DEPLOYMENT += addFile_processUniqueness +} + +symbian { + binDep.sources = testProcessUniqueness.exe + binDep.path = \\sys\\bin + + DEPLOYMENT += binDep +} diff --git a/tests/auto/quuid/testProcessUniqueness/main.cpp b/tests/auto/quuid/testProcessUniqueness/main.cpp new file mode 100644 index 0000000..4d33c84 --- /dev/null +++ b/tests/auto/quuid/testProcessUniqueness/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <stdio.h> +#include <QUuid> + +// This is a testcase for QTBUG-11213 +int main(int argc, char **argv) +{ + Q_UNUSED(argc) + Q_UNUSED(argv) + + // First, break QUuid. + qrand(); + + // Now print a few uuids. + printf("%s", qPrintable(QUuid::createUuid().toString())); + printf("%s", qPrintable(QUuid::createUuid().toString())); + printf("%s", qPrintable(QUuid::createUuid().toString())); + + // Done + return 0; +} + diff --git a/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro new file mode 100644 index 0000000..88df1a2 --- /dev/null +++ b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro @@ -0,0 +1,8 @@ +SOURCES = main.cpp +CONFIG += console + +DESTDIR = ./ + +# no install rule for application used by test +INSTALLS = + diff --git a/tests/auto/quuid/tst_quuid.cpp b/tests/auto/quuid/tst_quuid.cpp index 47f356a..409d8cf 100644 --- a/tests/auto/quuid/tst_quuid.cpp +++ b/tests/auto/quuid/tst_quuid.cpp @@ -73,6 +73,7 @@ private slots: void versions(); void threadUniqueness(); + void processUniqueness(); public: // Variables @@ -196,5 +197,33 @@ void tst_QUuid::threadUniqueness() qDeleteAll(threads); } +void tst_QUuid::processUniqueness() +{ + QProcess process; + QString processOneOutput; + QString processTwoOutput; + + // Start it once +#ifdef Q_OS_MAC + process.start("testProcessUniqueness/testProcessUniqueness.app"); +#else + process.start("testProcessUniqueness/testProcessUniqueness"); +#endif + QVERIFY(process.waitForFinished()); + processOneOutput = process.readAllStandardOutput(); + + // Start it twice +#ifdef Q_OS_MAC + process.start("testProcessUniqueness/testProcessUniqueness.app"); +#else + process.start("testProcessUniqueness/testProcessUniqueness"); +#endif + QVERIFY(process.waitForFinished()); + processTwoOutput = process.readAllStandardOutput(); + + // They should be *different*! + QVERIFY(processOneOutput != processTwoOutput); +} + QTEST_MAIN(tst_QUuid) #include "tst_quuid.moc" diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro index 26d3456..e84cf31 100644 --- a/tools/assistant/lib/lib.pro +++ b/tools/assistant/lib/lib.pro @@ -69,3 +69,16 @@ HEADERS += qhelpenginecore.h \ # access to clucene HEADERS += qhelpsearchindexwriter_clucene_p.h \ qhelpsearchindexreader_clucene_p.h + +TR_DIR = $$PWD/../../../translations +TRANSLATIONS = \ + $$TR_DIR/qt_help_cs.ts \ + $$TR_DIR/qt_help_da.ts \ + $$TR_DIR/qt_help_de.ts \ + $$TR_DIR/qt_help_hu.ts \ + $$TR_DIR/qt_help_ja.ts \ + $$TR_DIR/qt_help_pl.ts \ + $$TR_DIR/qt_help_ru.ts \ + $$TR_DIR/qt_help_zh_CN.ts \ + $$TR_DIR/qt_help_zh_TW.ts \ + $$TR_DIR/qt_help_fr.ts diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp index b0faf0c..5247847 100644 --- a/tools/assistant/lib/qhelpprojectdata.cpp +++ b/tools/assistant/lib/qhelpprojectdata.cpp @@ -327,10 +327,12 @@ bool QHelpProjectDataPrivate::hasValidSyntax(const QString &nameSpace, QUrl url; const QLatin1String scheme("qthelp"); url.setScheme(scheme); - url.setHost(nameSpace); + const QString canonicalNamespace = nameSpace.toLower(); + url.setHost(canonicalNamespace); url.setPath(vFolder); - const QString expectedUrl(scheme + QLatin1String("://") + nameSpace + slash + vFolder); + const QString expectedUrl(scheme + QLatin1String("://") + + canonicalNamespace + slash + vFolder); return url.isValid() && url.toString() == expectedUrl; } diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro index eb8cc51..16a520e 100644 --- a/tools/assistant/tools/assistant/assistant.pro +++ b/tools/assistant/tools/assistant/assistant.pro @@ -1,4 +1,4 @@ -include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri) +include(../../../shared/fontpanel/fontpanel.pri) TEMPLATE = app LANGUAGE = C++ TARGET = assistant @@ -108,3 +108,16 @@ contains(CONFIG, static): { DEFINES += USE_STATIC_SQLITE_PLUGIN } } + +TR_DIR = $$PWD/../../../../translations +TRANSLATIONS = \ + $$TR_DIR/assistant_cs.ts \ + $$TR_DIR/assistant_da.ts \ + $$TR_DIR/assistant_de.ts \ + $$TR_DIR/assistant_fr.ts \ + $$TR_DIR/assistant_hu.ts \ + $$TR_DIR/assistant_ja.ts \ + $$TR_DIR/assistant_pl.ts \ + $$TR_DIR/assistant_ru.ts \ + $$TR_DIR/assistant_zh_CN.ts \ + $$TR_DIR/assistant_zh_TW.ts diff --git a/tools/assistant/translations/qt_help.pro b/tools/assistant/translations/qt_help.pro deleted file mode 100644 index 6f66876..0000000 --- a/tools/assistant/translations/qt_help.pro +++ /dev/null @@ -1,53 +0,0 @@ -# Include those manually as they do not contain any directory specification - -SOURCES += ../lib/qhelpcollectionhandler.cpp \ - ../lib/qhelpcontentwidget.cpp \ - ../lib/qhelpdatainterface.cpp \ - ../lib/qhelpdbreader.cpp \ - ../lib/qhelpengine.cpp \ - ../lib/qhelpenginecore.cpp \ - ../lib/qhelpgenerator.cpp \ - ../lib/qhelpindexwidget.cpp \ - ../lib/qhelpprojectdata.cpp \ - ../lib/qhelpsearchengine.cpp \ - ../lib/qhelpsearchindexreader_clucene.cpp \ - ../lib/qhelpsearchindexreader_default.cpp \ - ../lib/qhelpsearchindexwriter_clucene.cpp \ - ../lib/qhelpsearchindexwriter_default.cpp \ - ../lib/qhelpsearchindex_default.cpp \ - ../lib/qhelpsearchquerywidget.cpp \ - ../lib/qhelpsearchresultwidget.cpp - -HEADERS += ../lib/qhelpcollectionhandler_p.h \ - ../lib/qhelpcontentwidget.h \ - ../lib/qhelpdatainterface_p.h \ - ../lib/qhelpdbreader_p.h \ - ../lib/qhelpengine.h \ - ../lib/qhelpenginecore.h \ - ../lib/qhelpengine_p.h \ - ../lib/qhelpgenerator_p.h \ - ../lib/qhelpindexwidget.h \ - ../lib/qhelpprojectdata_p.h \ - ../lib/qhelpsearchengine.h \ - ../lib/qhelpsearchindexreader_clucene_p.h \ - ../lib/qhelpsearchindexreader_default_p.h \ - ../lib/qhelpsearchindexwriter_clucene_p.h \ - ../lib/qhelpsearchindexwriter_default_p.h \ - ../lib/qhelpsearchindex_default_p.h \ - ../lib/qhelpsearchquerywidget.h \ - ../lib/qhelpsearchresultwidget.h \ - ../lib/qhelp_global.h - - -TR_DIR = $$PWD/../../../translations -TRANSLATIONS = \ - $$TR_DIR/qt_help_cs.ts \ - $$TR_DIR/qt_help_da.ts \ - $$TR_DIR/qt_help_de.ts \ - $$TR_DIR/qt_help_hu.ts \ - $$TR_DIR/qt_help_ja.ts \ - $$TR_DIR/qt_help_pl.ts \ - $$TR_DIR/qt_help_ru.ts \ - $$TR_DIR/qt_help_zh_CN.ts \ - $$TR_DIR/qt_help_zh_TW.ts \ - $$TR_DIR/qt_help_fr.ts diff --git a/tools/assistant/translations/translations.pro b/tools/assistant/translations/translations.pro deleted file mode 100644 index c692262..0000000 --- a/tools/assistant/translations/translations.pro +++ /dev/null @@ -1,54 +0,0 @@ -# Include those manually as they do not contain any directory specification - -FORMS += ../tools/assistant/filternamedialog.ui \ - ../tools/assistant/installdialog.ui \ - ../tools/assistant/preferencesdialog.ui \ - ../tools/assistant/topicchooser.ui \ - ../tools/assistant/bookmarkdialog.ui - -SOURCES += ../tools/assistant/aboutdialog.cpp \ - ../tools/assistant/bookmarkmanager.cpp \ - ../tools/assistant/centralwidget.cpp \ - ../tools/assistant/cmdlineparser.cpp \ - ../tools/assistant/contentwindow.cpp \ - ../tools/assistant/filternamedialog.cpp \ - ../tools/assistant/helpviewer.cpp \ - ../tools/assistant/indexwindow.cpp \ - ../tools/assistant/installdialog.cpp \ - ../tools/assistant/main.cpp \ - ../tools/assistant/mainwindow.cpp \ - ../tools/assistant/preferencesdialog.cpp \ - ../tools/assistant/remotecontrol.cpp \ - ../tools/assistant/searchwidget.cpp \ - ../tools/assistant/topicchooser.cpp \ - -SOURCES += ../../shared/fontpanel/fontpanel.cpp - -HEADERS += ../tools/assistant/aboutdialog.h \ - ../tools/assistant/bookmarkmanager.h \ - ../tools/assistant/centralwidget.h \ - ../tools/assistant/cmdlineparser.h \ - ../tools/assistant/contentwindow.h \ - ../tools/assistant/filternamedialog.h \ - ../tools/assistant/helpviewer.h \ - ../tools/assistant/indexwindow.h \ - ../tools/assistant/installdialog.h \ - ../tools/assistant/mainwindow.h \ - ../tools/assistant/preferencesdialog.h \ - ../tools/assistant/remotecontrol.h \ - ../tools/assistant/remotecontrol_win.h \ - ../tools/assistant/searchwidget.h \ - ../tools/assistant/topicchooser.h \ - -TR_DIR = $$PWD/../../../translations -TRANSLATIONS = \ - $$TR_DIR/assistant_cs.ts \ - $$TR_DIR/assistant_da.ts \ - $$TR_DIR/assistant_de.ts \ - $$TR_DIR/assistant_fr.ts \ - $$TR_DIR/assistant_hu.ts \ - $$TR_DIR/assistant_ja.ts \ - $$TR_DIR/assistant_pl.ts \ - $$TR_DIR/assistant_ru.ts \ - $$TR_DIR/assistant_zh_CN.ts \ - $$TR_DIR/assistant_zh_TW.ts diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 952d4e0..7f2d53b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2439,7 +2439,9 @@ void Configure::generateOutputVars() qmakeFormatPlugins += "gif"; if (dictionary[ "TIFF" ] == "no") - qtConfig += "no-tiff"; + qtConfig += "no-tiff"; + else if (dictionary[ "TIFF" ] == "yes") + qtConfig += "tiff"; else if (dictionary[ "TIFF" ] == "plugin") qmakeFormatPlugins += "tiff"; if (dictionary[ "LIBTIFF" ] == "system") @@ -2447,6 +2449,8 @@ void Configure::generateOutputVars() if (dictionary[ "JPEG" ] == "no") qtConfig += "no-jpeg"; + else if (dictionary[ "JPEG" ] == "yes") + qtConfig += "jpeg"; else if (dictionary[ "JPEG" ] == "plugin") qmakeFormatPlugins += "jpeg"; if (dictionary[ "LIBJPEG" ] == "system") @@ -3160,16 +3164,6 @@ void Configure::generateConfigfiles() QFile::remove(outName); tmpFile.copy(outName); tmpFile.close(); - - if (!QFile::exists(buildPath + "/include/QtCore/qconfig.h")) { - if (!writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n", - buildPath + "/include/QtCore/qconfig.h") - || !writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n", - buildPath + "/include/Qt/qconfig.h")) { - dictionary["DONE"] = "error"; - return; - } - } } // Copy configured mkspec to default directory, but remove the old one first, if there is any diff --git a/tools/designer/designer.pro b/tools/designer/designer.pro index 721c4fc..31c8622 100644 --- a/tools/designer/designer.pro +++ b/tools/designer/designer.pro @@ -3,3 +3,16 @@ TEMPLATE = subdirs CONFIG += qt SUBDIRS = src + +TR_DIR = $$PWD/../../translations +TRANSLATIONS = \ + $$TR_DIR/designer_cs.ts \ + $$TR_DIR/designer_de.ts \ + $$TR_DIR/designer_fr.ts \ + $$TR_DIR/designer_hu.ts \ + $$TR_DIR/designer_ja.ts \ + $$TR_DIR/designer_pl.ts \ + $$TR_DIR/designer_ru.ts \ + $$TR_DIR/designer_sl.ts \ + $$TR_DIR/designer_zh_CN.ts \ + $$TR_DIR/designer_zh_TW.ts diff --git a/tools/designer/src/components/lib/lib.pro b/tools/designer/src/components/lib/lib.pro index 8d0e692..0ada845 100644 --- a/tools/designer/src/components/lib/lib.pro +++ b/tools/designer/src/components/lib/lib.pro @@ -44,11 +44,11 @@ SOURCES += qdesigner_components.cpp } INCLUDEPATH += . .. \ - $$QT_SOURCE_TREE/tools/designer/src/lib/components \ - $$QT_SOURCE_TREE/tools/designer/src/lib/sdk \ - $$QT_SOURCE_TREE/tools/designer/src/lib/extension \ - $$QT_SOURCE_TREE/tools/designer/src/lib/uilib \ - $$QT_SOURCE_TREE/tools/designer/src/lib/shared + $$PWD/../../lib/components \ + $$PWD/../../lib/sdk \ + $$PWD/../../lib/extension \ + $$PWD/../../lib/uilib \ + $$PWD/../../lib/shared include(../propertyeditor/propertyeditor.pri) include(../objectinspector/objectinspector.pri) diff --git a/tools/designer/src/components/objectinspector/objectinspector.pri b/tools/designer/src/components/objectinspector/objectinspector.pri index 733c4b3..565f78b 100644 --- a/tools/designer/src/components/objectinspector/objectinspector.pri +++ b/tools/designer/src/components/objectinspector/objectinspector.pri @@ -3,7 +3,7 @@ contains(CONFIG, static) { INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/findwidget } else { - include($$QT_SOURCE_TREE/tools/shared/findwidget/findwidget.pri) + include(../../../../shared/findwidget/findwidget.pri) } INCLUDEPATH += $$PWD diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.pri b/tools/designer/src/components/propertyeditor/propertyeditor.pri index a8ed37e..7d2e7cb 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.pri +++ b/tools/designer/src/components/propertyeditor/propertyeditor.pri @@ -10,8 +10,8 @@ contains(CONFIG, static) { INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtpropertybrowser INCLUDEPATH *= $$QT_SOURCE_TREE/tools/shared/qtgradienteditor } else { - include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri) - include($$QT_SOURCE_TREE/tools/shared/qtgradienteditor/qtcolorbutton.pri) + include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri) + include(../../../../shared/qtgradienteditor/qtcolorbutton.pri) } FORMS += $$PWD/paletteeditor.ui \ diff --git a/tools/designer/src/designer/designer.pro b/tools/designer/src/designer/designer.pro index 8590c7b..8564e96 100644 --- a/tools/designer/src/designer/designer.pro +++ b/tools/designer/src/designer/designer.pro @@ -25,8 +25,8 @@ contains(CONFIG, static) { TARGET = designer -include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri) -include($$QT_SOURCE_TREE/tools/shared/qttoolbardialog/qttoolbardialog.pri) +include(../../../shared/fontpanel/fontpanel.pri) +include(../../../shared/qttoolbardialog/qttoolbardialog.pri) HEADERS += \ qdesigner.h \ @@ -88,4 +88,3 @@ INSTALLS += target include(../sharedcomponents.pri) unix:!mac:LIBS += -lm -TRANSLATIONS = designer_de.ts diff --git a/tools/designer/src/lib/shared/shared.pri b/tools/designer/src/lib/shared/shared.pri index 570b208..8286360 100644 --- a/tools/designer/src/lib/shared/shared.pri +++ b/tools/designer/src/lib/shared/shared.pri @@ -2,11 +2,11 @@ INCLUDEPATH += $$PWD contains(QT_CONFIG, script): QT += script -include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri) -include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri) -include($$QT_SOURCE_TREE/src/tools/rcc/rcc.pri) -include($$QT_SOURCE_TREE/tools/shared/findwidget/findwidget.pri) -include($$QT_SOURCE_TREE/tools/shared/qtgradienteditor/qtgradienteditor.pri) +include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri) +include(../../../../shared/deviceskin/deviceskin.pri) +include(../../../../../src/tools/rcc/rcc.pri) +include(../../../../shared/findwidget/findwidget.pri) +include(../../../../shared/qtgradienteditor/qtgradienteditor.pri) # Input FORMS += $$PWD/addlinkdialog.ui \ diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro deleted file mode 100644 index 103c1fe..0000000 --- a/tools/designer/translations/translations.pro +++ /dev/null @@ -1,141 +0,0 @@ -include(../src/components/buddyeditor/buddyeditor.pri) -include(../src/components/component.pri) -include(../src/components/formeditor/formeditor.pri) -include(../src/components/objectinspector/objectinspector.pri) -include(../src/components/propertyeditor/propertyeditor.pri) -include(../src/components/signalsloteditor/signalsloteditor.pri) -include(../src/components/tabordereditor/tabordereditor.pri) -include(../src/components/taskmenu/taskmenu.pri) -include(../src/components/widgetbox/widgetbox.pri) -include(../src/lib/extension/extension.pri) -include(../src/lib/sdk/sdk.pri) -include(../src/lib/shared/shared.pri) -include(../src/lib/uilib/uilib.pri) -include(../../shared/qttoolbardialog/qttoolbardialog.pri) -include(../../shared/qtpropertybrowser/qtpropertybrowser.pri) -include(../../shared/qtgradienteditor/qtgradienteditor.pri) - -# Include ActiveQt plugin -SOURCES += ../src/plugins/activeqt/qaxwidgetextrainfo.cpp \ - ../src/plugins/activeqt/qaxwidgetplugin.cpp \ - ../src/plugins/activeqt/qaxwidgetpropertysheet.cpp \ - ../src/plugins/activeqt/qaxwidgettaskmenu.cpp \ - ../src/plugins/activeqt/qdesigneraxwidget.cpp - -HEADERS += ../src/plugins/activeqt/qaxwidgetextrainfo.h \ - ../src/plugins/activeqt/qaxwidgetplugin.h \ - ../src/plugins/activeqt/qaxwidgetpropertysheet.h \ - ../src/plugins/activeqt/qaxwidgettaskmenu.h \ - ../src/plugins/activeqt/qdesigneraxwidget.h \ - ../../../src/activeqt/shared/qaxtypes.h - - -# Include Qt3Support plugin - -SOURCES += ../src/plugins/widgets/qt3supportwidgets.cpp -HEADERS += ../src/plugins/widgets/q3iconview/q3iconview_extrainfo.h \ - ../src/plugins/widgets/q3iconview/q3iconview_plugin.h \ - ../src/plugins/widgets/q3listview/q3listview_extrainfo.h \ - ../src/plugins/widgets/q3listview/q3listview_plugin.h \ - ../src/plugins/widgets/q3mainwindow/q3mainwindow_container.h \ - ../src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h \ - ../src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h \ - ../src/plugins/widgets/q3toolbar/q3toolbar_plugin.h \ - ../src/plugins/widgets/q3widgetstack/q3widgetstack_container.h \ - ../src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h \ - ../src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack_p.h \ - ../src/plugins/widgets/q3wizard/q3wizard_container.h \ - ../src/plugins/widgets/q3wizard/q3wizard_plugin.h \ - ../src/plugins/widgets/q3listbox/q3listbox_extrainfo.h \ - ../src/plugins/widgets/q3listbox/q3listbox_plugin.h \ - ../src/plugins/widgets/q3table/q3table_extrainfo.h \ - ../src/plugins/widgets/q3table/q3table_plugin.h \ - ../src/plugins/widgets/q3textedit/q3textedit_extrainfo.h \ - ../src/plugins/widgets/q3textedit/q3textedit_plugin.h \ - ../src/plugins/widgets/q3widgets/q3widget_plugins.h - -SOURCES += ../src/plugins/widgets/q3iconview/q3iconview_extrainfo.cpp \ - ../src/plugins/widgets/q3iconview/q3iconview_plugin.cpp \ - ../src/plugins/widgets/q3listview/q3listview_extrainfo.cpp \ - ../src/plugins/widgets/q3listview/q3listview_plugin.cpp \ - ../src/plugins/widgets/q3mainwindow/q3mainwindow_container.cpp \ - ../src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.cpp \ - ../src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.cpp \ - ../src/plugins/widgets/q3toolbar/q3toolbar_plugin.cpp \ - ../src/plugins/widgets/q3widgetstack/q3widgetstack_container.cpp \ - ../src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.cpp \ - ../src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack.cpp \ - ../src/plugins/widgets/q3wizard/q3wizard_container.cpp \ - ../src/plugins/widgets/q3wizard/q3wizard_plugin.cpp \ - ../src/plugins/widgets/q3listbox/q3listbox_extrainfo.cpp \ - ../src/plugins/widgets/q3listbox/q3listbox_plugin.cpp \ - ../src/plugins/widgets/q3table/q3table_extrainfo.cpp \ - ../src/plugins/widgets/q3table/q3table_plugin.cpp \ - ../src/plugins/widgets/q3textedit/q3textedit_extrainfo.cpp \ - ../src/plugins/widgets/q3textedit/q3textedit_plugin.cpp \ - ../src/plugins/widgets/q3widgets/q3widget_plugins.cpp - -# Include those manually as they do not contain any directory specification -APP_DIR=../src/designer -SOURCES += $$APP_DIR/appfontdialog.cpp \ - $$APP_DIR/assistantclient.cpp \ - $$APP_DIR/main.cpp \ - $$APP_DIR/mainwindow.cpp \ - $$APP_DIR/newform.cpp \ - $$APP_DIR/preferencesdialog.cpp \ - $$APP_DIR/qdesigner_actions.cpp \ - $$APP_DIR/qdesigner_appearanceoptions.cpp \ - $$APP_DIR/qdesigner.cpp \ - $$APP_DIR/qdesigner_formwindow.cpp \ - $$APP_DIR/qdesigner_server.cpp \ - $$APP_DIR/qdesigner_settings.cpp \ - $$APP_DIR/qdesigner_toolwindow.cpp \ - $$APP_DIR/qdesigner_workbench.cpp \ - $$APP_DIR/saveformastemplate.cpp \ - $$APP_DIR/versiondialog.cpp - -HEADERS+= $$APP_DIR/appfontdialog.h \ - $$APP_DIR/assistantclient.h \ - $$APP_DIR/designer_enums.h \ - $$APP_DIR/mainwindow.h \ - $$APP_DIR/newform.h \ - $$APP_DIR/preferencesdialog.h \ - $$APP_DIR/qdesigner_actions.h \ - $$APP_DIR/qdesigner_appearanceoptions.h \ - $$APP_DIR/qdesigner_formwindow.h \ - $$APP_DIR/qdesigner.h \ - $$APP_DIR/qdesigner_pch.h \ - $$APP_DIR/qdesigner_server.h \ - $$APP_DIR/qdesigner_settings.h \ - $$APP_DIR/qdesigner_toolwindow.h \ - $$APP_DIR/qdesigner_workbench.h \ - $$APP_DIR/saveformastemplate.h \ - $$APP_DIR/versiondialog.h - -FORMS += $$APP_DIR/preferencesdialog.ui \ - $$APP_DIR/qdesigner_appearanceoptions.ui \ - $$APP_DIR/saveformastemplate.ui - -# Shared solutions -SOURCES += ../../shared/fontpanel/fontpanel.cpp \ - ../../shared/deviceskin/deviceskin.cpp \ - ../../shared/findwidget/abstractfindwidget.cpp \ - ../../shared/findwidget/itemviewfindwidget.cpp \ - ../../shared/findwidget/texteditfindwidget.cpp \ - -HEADERS += ../../shared/findwidget/abstractfindwidget.h \ - ../../shared/findwidget/itemviewfindwidget.h \ - ../../shared/findwidget/texteditfindwidget.h - -TR_DIR = $$PWD/../../../translations -TRANSLATIONS = \ - $$TR_DIR/designer_cs.ts \ - $$TR_DIR/designer_de.ts \ - $$TR_DIR/designer_fr.ts \ - $$TR_DIR/designer_hu.ts \ - $$TR_DIR/designer_ja.ts \ - $$TR_DIR/designer_pl.ts \ - $$TR_DIR/designer_ru.ts \ - $$TR_DIR/designer_sl.ts \ - $$TR_DIR/designer_zh_CN.ts \ - $$TR_DIR/designer_zh_TW.ts diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 609bd3d..bc9bb26 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -1686,9 +1686,14 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) HashString ns = HashString(text); yyTok = getToken(); if (yyTok == Tok_LeftBrace) { + yyTok = getToken(); namespaceDepths.push(namespaces.count()); enterNamespace(&namespaces, ns); - yyTok = getToken(); + + functionContext = namespaces; + functionContextUnresolved.clear(); + prospectiveContext.clear(); + pendingContext.clear(); } else if (yyTok == Tok_Equals) { // e.g. namespace Is = OuterSpace::InnerSpace; QList<HashString> fullName; diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index 33ceaf5..7130d61 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -630,4 +630,12 @@ QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle ) } #endif +const Node* CodeMarker::resolveTarget(const QString& , + const Tree* , + const Node* , + const Node* ) +{ + return 0; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index aab8a9c..53ad4a8 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -155,10 +155,11 @@ class CodeMarker virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style); #endif - virtual const Node *resolveTarget(const QString& target, - const Tree *tree, - const Node *relative) = 0; - virtual QStringList macRefsForNode(const Node *node); + virtual const Node* resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0); + virtual QStringList macRefsForNode(const Node* node); static void initialize(const Config& config); static void terminate(); diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index c29becc..af58a3f 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -143,6 +143,7 @@ class Config #define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_ONLINE "online" +#define CONFIG_CREATOR "creator" #define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTENCODING "outputencoding" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index c4ee054..562e92b 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -825,9 +825,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, return sections; } -const Node *CppCodeMarker::resolveTarget(const QString &target, - const Tree *tree, - const Node *relative) +const Node *CppCodeMarker::resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self) { if (target.endsWith("()")) { const FunctionNode *func; @@ -869,11 +870,13 @@ const Node *CppCodeMarker::resolveTarget(const QString &target, else { QStringList path = target.split("::"); const Node *node; + int flags = Tree::SearchBaseClasses | + Tree::SearchEnumValues | + Tree::NonFunction; if ((node = tree->findNode(path, relative, - Tree::SearchBaseClasses | - Tree::SearchEnumValues | - Tree::NonFunction))) + flags, + self))) return node; } return 0; diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 2dcf400..eca3936 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -81,9 +81,10 @@ class CppCodeMarker : public CodeMarker Status status); QList<Section> qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style); - const Node *resolveTarget(const QString& target, - const Tree *tree, - const Node *relative); + const Node* resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0); private: QString addMarkUp(const QString& protectedCode, diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index e4870e3..d5108fd 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -728,23 +728,12 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, if (n) classNode = static_cast<const ClassNode*>(n); } - if (names[0].startsWith("Q")) + if (names[0].startsWith("Qt")) return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode); else return new QmlClassNode(tre->root(), names[0], classNode); } else if (command == COMMAND_QMLBASICTYPE) { -#if 0 - QStringList parts = arg.split(" "); - qDebug() << command << parts; - if (parts.size() > 1) { - FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake)); - if (pageNode) { - qDebug() << "FOUND"; - return new QmlBasicTypeNode(pageNode, parts[0]); - } - } -#endif return new QmlBasicTypeNode(tre->root(), arg); } else if ((command == COMMAND_QMLSIGNAL) || @@ -755,7 +744,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, QString type; QmlClassNode* qmlClass = 0; if (splitQmlMethodArg(doc,arg,type,element)) { - if (element.startsWith(QLatin1String("Q"))) + if (element.startsWith(QLatin1String("Qt"))) element = QLatin1String("QML:") + element; Node* n = tre->findNode(QStringList(element),Node::Fake); if (n && n->subType() == Node::QmlClass) { diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 89b1e98..f281fd4 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -63,6 +63,12 @@ QT_BEGIN_NAMESPACE int HtmlGenerator::id = 0; bool HtmlGenerator::debugging_on = false; +#if 0 +QString HtmlGenerator::divNavTop = "<div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>"; +#endif + +QString HtmlGenerator::divNavTop = ""; + QString HtmlGenerator::sinceTitles[] = { " New Namespaces", @@ -214,6 +220,7 @@ HtmlGenerator::HtmlGenerator() numTableRows(0), threeColumnEnumValueTable(true), offlineDocs(true), + creatorDocs(true), funcLeftParen("\\S(\\()"), myTree(0), slow(false), @@ -276,6 +283,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) project = config.getString(CONFIG_PROJECT); offlineDocs = !config.getBool(CONFIG_ONLINE); + creatorDocs = false; //!config.getBool(CONFIG_CREATOR); projectDescription = config.getString(CONFIG_DESCRIPTION); if (projectDescription.isEmpty() && !project.isEmpty()) projectDescription = project + " Reference Documentation"; @@ -346,17 +354,6 @@ QString HtmlGenerator::format() */ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) { -#if 0 - // Copy the stylesheets from the directory containing the qdocconf file. - // ### This should be changed to use a special directory in doc/src. - QStringList::ConstIterator styleIter = stylesheets.begin(); - QDir configPath = QDir::current(); - while (styleIter != stylesheets.end()) { - QString filePath = configPath.absoluteFilePath(*styleIter); - Config::copyFile(Location(), filePath, filePath, outputDir()); - ++styleIter; - } -#endif myTree = tree; nonCompatClasses.clear(); mainClasses.clear(); @@ -371,9 +368,6 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllFunctions(tree->root()); findAllLegaleseTexts(tree->root()); findAllNamespaces(tree->root()); -#ifdef ZZZ_QDOC_QML - findAllQmlClasses(tree->root()); -#endif findAllSince(tree->root()); PageGenerator::generateTree(tree, marker); @@ -923,13 +917,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, else out() << "<tr class=\"even\">"; - out() << "<tr><th>Constant</th>" - << "<th>Value</th>" - << "<th>Description</th></tr>\n"; + out() << "<tr><th class=\"tblConst\">Constant</th>" + << "<th class=\"tblval\">Value</th>" + << "<th class=\"tbldscr\">Description</th></tr>\n"; } else { out() << "<table class=\"valuelist\">" - << "<tr><th>Constant</th><th>Value</th></tr>\n"; + << "<tr><th class=\"tblConst\">Constant</th><th class=\"tblVal\">Value</th></tr>\n"; } } else { @@ -1067,11 +1061,11 @@ int HtmlGenerator::generateAtom(const Atom *atom, } sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); } - out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a>" << divNavTop << "\n"; } #else out() << "<a name=\"" << Doc::canonicalTitle(Text::sectionHeading(atom).toString()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; #endif break; case Atom::SectionRight: @@ -1143,9 +1137,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, case Atom::TableItemLeft: { if (inTableHeader) - out() << "<th"; + out() << "<th "; else - out() << "<td"; + out() << "<td "; QStringList spans = atom->string().split(","); if (spans.size() == 2) { @@ -1259,30 +1253,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" << Atom(Atom::LineBreak); -#if 0 - // No longer used because the modeule name is a breadcrumb. - QString fixedModule = inner->moduleName(); - if (fixedModule == "Qt3SupportLight") - fixedModule = "Qt3Support"; - if (!fixedModule.isEmpty()) - subtitleText << "[" << Atom(Atom::AutoLink, fixedModule) << " module]"; - - if (fixedModule.isEmpty()) { - QMultiMap<QString, QString> publicGroups = myTree->publicGroups(); - QList<QString> groupNames = publicGroups.values(inner->name()); - if (!groupNames.isEmpty()) { - qSort(groupNames.begin(), groupNames.end()); - subtitleText << "["; - for (int j=0; j<groupNames.count(); j++) { - subtitleText << Atom(Atom::AutoLink, groupNames[j]); - if (j<groupNames.count()-1) - subtitleText <<", "; - } - subtitleText << "]"; - } - } -#endif - generateHeader(title, inner, marker); sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); generateTableOfContents(inner,marker,§ions); @@ -1343,7 +1313,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, // out() << "<hr />\n"; out() << "<a name=\"" << registerRef((*s).name.toLower()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateSection(s->members, inner, marker, CodeMarker::Summary); } @@ -1352,7 +1322,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, // out() << "<hr />\n"; out() << "<a name=\"" << registerRef(name.toLower()) - << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc(name) << "</h2>\n"; generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); } @@ -1379,11 +1349,11 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, out() << "</ul>\n"; } - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; if (!inner->doc().isEmpty()) { //out() << "<hr />\n" - out() << "<div class=\"descr\"/>\n" // QTBUG-9504 + out() << "<div class=\"descr\">\n" // QTBUG-9504 << "<h2>" << "Detailed Description" << "</h2>\n"; generateBody(inner, marker); out() << "</div>\n"; // QTBUG-9504 @@ -1395,7 +1365,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, while (s != sections.end()) { //out() << "<hr />\n"; if (!(*s).divClass.isEmpty()) - out() << "<div class=\"" << (*s).divClass << "\"/>\n"; // QTBUG-9504 + out() << "<div class=\"" << (*s).divClass << "\">\n"; // QTBUG-9504 out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; NodeList::ConstIterator m = (*s).members.begin(); @@ -1519,12 +1489,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateStatus(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { - out() << "<a name=\"" << registerRef("namespaces") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n"; out() << "<h2>Namespaces</h2>\n"; generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); } if (moduleClassMap.contains(fake->name())) { - out() << "<a name=\"" << registerRef("classes") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("classes") << "\"></a>" << divNavTop << "\n"; out() << "<h2>Classes</h2>\n"; generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); } @@ -1587,13 +1557,13 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) sections = marker->qmlSections(qml_cn,CodeMarker::Summary); s = sections.begin(); while (s != sections.end()) { - out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateQmlSummary(*s,fake,marker); ++s; } - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << "Detailed Description" << "</h2>\n"; generateBody(fake, marker); if (cn) @@ -1623,7 +1593,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { - out() << "<a name=\"" << registerRef((*s).name) << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "<a name=\"" << registerRef((*s).name) << "\"></a>" << divNavTop << "\n"; out() << "<h2>" << protectEnc((*s).name) << "</h2>\n"; generateSectionList(*s, fake, marker, CodeMarker::Summary); ++s; @@ -1631,12 +1601,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) Text brief = fake->doc().briefText(); if (fake->subType() == Node::Module && !brief.isEmpty()) { - out() << "<a name=\"" << registerRef("details") << "\"></a><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; - out() << "<div class=\"descr\"/>\n"; // QTBUG-9504 + out() << "<a name=\"" << registerRef("details") << "\"></a>" << divNavTop << "\n"; + out() << "<div class=\"descr\">\n"; // QTBUG-9504 out() << "<h2>" << "Detailed Description" << "</h2>\n"; } else - out() << "<div class=\"descr\"/>\n"; // QTBUG-9504 + out() << "<div class=\"descr\">\n"; // QTBUG-9504 generateBody(fake, marker); out() << "</div>\n"; // QTBUG-9504 @@ -1738,8 +1708,9 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, } } else if (node->subType() == Node::Page) { - if (fn->name() == QString("examples.html")) { - out() << " <li>Examples</li>"; + if (fn->name() == QString("qdeclarativeexamples.html")) { + out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; + out() << " <li>QML Examples & Demos</li>"; } else if (fn->name().startsWith("examples-")) { out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; @@ -1759,10 +1730,14 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, else if (node->subType() == Node::Example) { out() << " <li><a href=\"all-examples.html\">Examples</a></li>"; QStringList sl = fn->name().split('/'); - QString name = "examples-" + sl.at(0) + ".html"; - QString t = CodeParser::titleFromName(name); - out() << " <li><a href=\"" << name << "\">" - << t << "</a></li>"; + if (sl.contains("declarative")) + out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>"; + else { + QString name = "examples-" + sl.at(0) + ".html"; + QString t = CodeParser::titleFromName(name); + out() << " <li><a href=\"" << name << "\">" + << t << "</a></li>"; + } out() << " <li>" << title << "</li>"; } } @@ -1795,21 +1770,38 @@ void HtmlGenerator::generateHeader(const QString& title, else shortVersion = "Qt " + shortVersion + ": "; } - + // Generating page title out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n"; - - //out() << " <title>Qt Reference Documentation</title>"; - + // Adding style sheet + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; + // Adding jquery and functions - providing online tools and search features + out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; + out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; + // Adding style and js for small windows + out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />"; + out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />"; + + // Adding syntax highlighter // future release + + // Setting assistant configuration if (offlineDocs) { - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; // Only for Qt Creator out() << "</head>\n"; - out() << "<body class=\"offline narrow\" >\n"; // narrow mainly for Creator - out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; + out() << "<body class=\"offline \">\n"; // offline for Assistant } + if (creatorDocs) + { + out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />"; // Only for Qt Creator + out() << "</head>\n"; + out() << "<body class=\"offline narrow creator\">\n"; // offline for Creator + } + // Setting online doc configuration else { - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"\n />"; + // Browser spec styles out() << " <!--[if IE]>\n"; out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n"; out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n"; @@ -1823,25 +1815,9 @@ void HtmlGenerator::generateHeader(const QString& title, out() << "<!--[if IE 8]>\n"; out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n"; out() << "<![endif]-->\n"; - // jquery functions - out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; - out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; - // menus and small docs js and css - out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n"; - out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />"; - - // syntax highlighter js and css - // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shCore.css\"/>\n"; - // out() << " <link type=\"text/css\" rel=\"stylesheet\" href=\"style/shThemeDefault.css\"/>\n"; - // out() << " <script type=\"text/javascript\" src=\"scripts/shCore.js\"></script>\n"; - // out() << " <script type=\"text/javascript\" src=\"scripts/shBrushCpp.js\"></script>\n"; - // out() << " <script type=\"text/javascript\">\n"; - // out() << " SyntaxHighlighter.all();\n"; - // out() << " </script>\n"; out() << "</head>\n"; + // CheckEmptyAndLoadList activating search out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"; } @@ -1853,7 +1829,7 @@ void HtmlGenerator::generateHeader(const QString& title, generateBreadCrumbs(title,node,marker); out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); -#if 0 // Removed for new docf format. MWS +#if 0 // Removed for new doc format. MWS if (node && !node->links().empty()) out() << "<p>\n" << navigationLinks << "</p>\n"; #endif @@ -1890,6 +1866,10 @@ void HtmlGenerator::generateFooter(const Node *node) { out() << "</body>\n"; } + if (creatorDocs) + { + out() << "</body>\n"; + } else { out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; @@ -2072,7 +2052,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node, } } } - else if (sections && (node->type() == Node::Class)) { + else if (sections && ((node->type() == Node::Class) || + (node->type() == Node::Namespace))) { QList<Section>::ConstIterator s = sections->begin(); while (s != sections->end()) { if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { @@ -2333,20 +2314,20 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, out() << "<tr class=\"odd topAlign\">"; else out() << "<tr class=\"even topAlign\">"; - out() << "<td><p>"; + out() << "<td class=\"tblName\"><p>"; generateFullName(node, relative, marker); out() << "</p></td>"; if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - out() << "<td><p>"; + out() << "<td class=\"tblDescr\"><p>"; generateText(brief, node, marker); out() << "</p></td>"; } } else { - out() << "<td><p>"; + out() << "<td class=\"tblDescr\"><p>"; out() << protectEnc(node->doc().briefText().toString()); out() << "</p></td>"; } @@ -2665,19 +2646,7 @@ void HtmlGenerator::generateQmlItem(const Node *node, marked.replace("<@type>", ""); marked.replace("</@type>", ""); } - if (node->type() == Node::QmlProperty) { - const QmlPropertyNode* qpn = static_cast<const QmlPropertyNode*>(node); - if (!summary && qpn->name() == "color" && qpn->dataType() == "color") { - if (relative && relative->name() == "GradientStop") { - qDebug() << "color : color"; - debugging_on = true; - qDebug() << " " << relative->name() << relative->type() << relative->subType(); - qDebug() << marked; - } - } - } - out() << highlightedCode(marked, marker, relative); - debugging_on = false; + out() << highlightedCode(marked, marker, relative, false, node); } #endif @@ -2988,7 +2957,8 @@ void HtmlGenerator::generateSynopsis(const Node *node, QString HtmlGenerator::highlightedCode(const QString& markedCode, CodeMarker* marker, const Node* relative, - bool alignNames) + bool alignNames, + const Node* self) { QString src = markedCode; QString html; @@ -3002,7 +2972,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, static const QString headerTag("headerfile"); static const QString funcTag("func"); static const QString linkTag("link"); - + // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)" bool done = false; for (int i = 0, srcSize = src.size(); i < srcSize;) { @@ -3067,13 +3037,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, bool handled = false; if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) { par1 = QStringRef(); - const Node* n = marker->resolveTarget(arg.toString(), myTree, relative); - if (HtmlGenerator::debugging_on) { - if (n) { - qDebug() << " " << n->name() << n->type() << n->subType(); - qDebug() << " " << relative->name() << relative->type() << relative->subType(); - } - } + const Node* n = marker->resolveTarget(arg.toString(), myTree, relative, self); addLink(linkForNode(n,relative), arg, &html); handled = true; } @@ -3523,7 +3487,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, out() << "<h3 class=\"fn\">"; out() << "<a name=\"" + refForNode(node) + "\"></a>"; generateSynopsis(node, relative, marker, CodeMarker::Detailed); - out() << "</h3><div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>\n"; + out() << "</h3>" << divNavTop << "\n"; } generateStatus(node, marker); @@ -3679,13 +3643,6 @@ void HtmlGenerator::findAllSince(const InnerNode *node) } } -#if 0 - const QRegExp versionSeparator("[\\-\\.]"); - const int minorIndex = version.indexOf(versionSeparator); - const int patchIndex = version.indexOf(versionSeparator, minorIndex+1); - version = version.left(patchIndex); -#endif - void HtmlGenerator::findAllFunctions(const InnerNode *node) { NodeList::ConstIterator c = node->childNodes().begin(); @@ -3749,29 +3706,6 @@ void HtmlGenerator::findAllNamespaces(const InnerNode *node) } } -#ifdef ZZZ_QDOC_QML -/*! - This function finds all the qml element nodes and - stores them in a map for later use. - */ -void HtmlGenerator::findAllQmlClasses(const InnerNode *node) -{ - NodeList::const_iterator c = node->childNodes().constBegin(); - while (c != node->childNodes().constEnd()) { - if ((*c)->type() == Node::Fake) { - const FakeNode* fakeNode = static_cast<const FakeNode *>(*c); - if (fakeNode->subType() == Node::QmlClass) { - const QmlClassNode* qmlNode = - static_cast<const QmlClassNode*>(fakeNode); - const Node* n = qmlNode->classNode(); - } - qmlClasses.insert(fakeNode->name(),*c); - } - ++c; - } -} -#endif - int HtmlGenerator::hOffset(const Node *node) { switch (node->type()) { @@ -3780,12 +3714,6 @@ int HtmlGenerator::hOffset(const Node *node) return 2; case Node::Fake: return 1; -#if 0 - if (node->doc().briefText().isEmpty()) - return 1; - else - return 2; -#endif case Node::Enum: case Node::Typedef: case Node::Function: @@ -4163,7 +4091,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlPropNode\"><p>"; out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; if (!qpn->isWritable()) @@ -4187,7 +4115,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<tr class=\"odd\">"; else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlFuncNode\"><p>"; out() << "<a name=\"" + refForNode(qsn) + "\"></a>"; generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); //generateQmlItem(qsn,relative,marker,false); @@ -4204,7 +4132,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << "<tr class=\"odd\">"; else out() << "<tr class=\"even\">"; - out() << "<td><p>"; + out() << "<td class=\"tblQmlFuncNode\"><p>"; out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); out() << "</p></td></tr>"; @@ -4288,7 +4216,10 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); - text << Atom(Atom::String, qcn->name()); + QString name = qcn->name(); + if (name.startsWith(QLatin1String("QML:"))) + name = name.mid(4); // remove the "QML:" prefix + text << Atom(Atom::String, name); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); text << " instantiates the C++ class "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); @@ -4459,138 +4390,4 @@ void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marke #endif -#if 0 // fossil removed for new doc format MWS 19/04/2010 - out() << "<!DOCTYPE html\n" - " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"DTD/xhtml1-strict.dtd\">\n"; - out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage); - - QString shortVersion; - if ((project != "Qtopia") && (project != "Qt Extended")) { - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "<!-- " << node->doc().location().fileName() << " -->\n"; - - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - } - - out() << "<head>\n" - " <title>" << shortVersion << protectEnc(title) << "</title>\n"; - out() << QString("<meta http-equiv=\"Content-type\" content=\"text/html; charset=%1\" />").arg(outputEncoding); - - if (!style.isEmpty()) - out() << " <style type=\"text/css\">" << style << "</style>\n"; - - const QMap<QString, QString> &metaMap = node->doc().metaTagMap(); - if (!metaMap.isEmpty()) { - QMapIterator<QString, QString> i(metaMap); - while (i.hasNext()) { - i.next(); - out() << " <meta name=\"" << protectEnc(i.key()) << "\" contents=\"" - << protectEnc(i.value()) << "\" />\n"; - } - } - - navigationLinks.clear(); - - if (node && !node->links().empty()) { - QPair<QString,QString> linkPair; - QPair<QString,QString> anchorPair; - const Node *linkNode; - - if (node->links().contains(Node::PreviousLink)) { - linkPair = node->links()[Node::PreviousLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " <link rel=\"prev\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[Previous: <a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::ContentsLink)) { - linkPair = node->links()[Node::ContentsLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " <link rel=\"contents\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[<a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::NextLink)) { - linkPair = node->links()[Node::NextLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " <link rel=\"next\" href=\"" - << anchorPair.first << "\" />\n"; - - navigationLinks += "[Next: <a href=\"" + anchorPair.first + "\">"; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "</a>]\n"; - } - if (node->links().contains(Node::IndexLink)) { - linkPair = node->links()[Node::IndexLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " <link rel=\"index\" href=\"" - << anchorPair.first << "\" />\n"; - } - if (node->links().contains(Node::StartLink)) { - linkPair = node->links()[Node::StartLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " <link rel=\"start\" href=\"" - << anchorPair.first << "\" />\n"; - } - } - - foreach (const QString &stylesheet, stylesheets) { - out() << " <link href=\"" << stylesheet << "\" rel=\"stylesheet\" " - << "type=\"text/css\" />\n"; - } - - foreach (const QString &customHeadElement, customHeadElements) { - out() << " " << customHeadElement << "\n"; - } - - out() << "</head>\n" - #endif - QT_END_NAMESPACE diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 80341de..54032d3 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -210,9 +210,10 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker); QString highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative, - bool alignNames = false); + CodeMarker* marker, + const Node* relative, + bool alignNames = false, + const Node* self = 0); void generateFullName(const Node *apparentNode, const Node *relative, @@ -236,9 +237,6 @@ class HtmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); -#ifdef ZZZ_QDOC_QML - void findAllQmlClasses(const InnerNode *node); -#endif void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); @@ -290,6 +288,7 @@ class HtmlGenerator : public PageGenerator int numTableRows; bool threeColumnEnumValueTable; bool offlineDocs; + bool creatorDocs; QString link; QStringList sectionNumber; QRegExp funcLeftParen; @@ -316,9 +315,6 @@ class HtmlGenerator : public PageGenerator NodeMap obsoleteClasses; NodeMap namespaceIndex; NodeMap serviceClasses; -#ifdef QDOC_QML - NodeMap qmlClasses; -#endif QMap<QString, NodeMap > funcIndex; QMap<Text, const Node *> legaleseTexts; NewSinceMaps newSinceMaps; @@ -328,6 +324,7 @@ class HtmlGenerator : public PageGenerator static int id; public: static bool debugging_on; + static QString divNavTop; }; #define HTMLGENERATOR_ADDRESS "address" diff --git a/tools/qdoc3/javacodemarker.cpp b/tools/qdoc3/javacodemarker.cpp index 1918cd8..c9a8f60 100644 --- a/tools/qdoc3/javacodemarker.cpp +++ b/tools/qdoc3/javacodemarker.cpp @@ -155,8 +155,10 @@ QList<Section> JavaCodeMarker::sections(const InnerNode * /* inner */, SynopsisS return QList<Section>(); } -const Node *JavaCodeMarker::resolveTarget(const QString &target, const Tree *tree, - const Node *relative) +const Node *JavaCodeMarker::resolveTarget(const QString &target, + const Tree *tree, + const Node *relative, + const Node* /* self */) { if (target.endsWith("()")) { const FunctionNode *func; diff --git a/tools/qdoc3/javacodemarker.h b/tools/qdoc3/javacodemarker.h index a2d04dd..c2aabc0 100644 --- a/tools/qdoc3/javacodemarker.h +++ b/tools/qdoc3/javacodemarker.h @@ -72,7 +72,10 @@ public: QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); - const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative ); + const Node* resolveTarget( const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0 ); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index b077074..da62e29 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -299,7 +299,7 @@ InnerNode::~InnerNode() Node *InnerNode::findNode(const QString& name) { Node *node = childMap.value(name); - if (node) + if (node && node->subType() != QmlPropertyGroup) return node; if ((type() == Fake) && (subType() == QmlClass)) { for (int i=0; i<children.size(); ++i) { diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp index 4abfd2b..d825c13 100644 --- a/tools/qdoc3/plaincodemarker.cpp +++ b/tools/qdoc3/plaincodemarker.cpp @@ -129,11 +129,4 @@ QList<Section> PlainCodeMarker::sections(const InnerNode * /* innerNode */, return QList<Section>(); } -const Node *PlainCodeMarker::resolveTarget( const QString& /* target */, - const Tree * /* tree */, - const Node * /* relative */ ) -{ - return 0; -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h index e9cc40d..7afb88e 100644 --- a/tools/qdoc3/plaincodemarker.h +++ b/tools/qdoc3/plaincodemarker.h @@ -71,7 +71,6 @@ public: QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); - const Node *resolveTarget(const QString &target, const Tree *tree, const Node *relative); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodemarker.cpp b/tools/qdoc3/qscodemarker.cpp index d4b8e80..2ee5d99 100644 --- a/tools/qdoc3/qscodemarker.cpp +++ b/tools/qdoc3/qscodemarker.cpp @@ -375,11 +375,4 @@ QList<Section> QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle sty return sections; } -const Node *QsCodeMarker::resolveTarget( const QString& /* target */, - const Tree * /* tree */, - const Node * /* relative */ ) -{ - return 0; -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodemarker.h b/tools/qdoc3/qscodemarker.h index 1590009..c6a177f 100644 --- a/tools/qdoc3/qscodemarker.h +++ b/tools/qdoc3/qscodemarker.h @@ -72,7 +72,6 @@ public: QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); QString functionBeginRegExp( const QString& funcName ); QString functionEndRegExp( const QString& funcName ); - const Node *resolveTarget( const QString& target, const Tree *tree, const Node *relative ); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 4b52992..8d5fa89 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -17,7 +17,10 @@ qhp.Assistant.namespace = com.trolltech.assistant.470 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = images/bg_l.png \ - images/bg_l_blank.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -25,24 +28,27 @@ qhp.Assistant.extraFiles = images/bg_l.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/OfflineStyle.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 140b81f..4ac4f47 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -24,6 +24,9 @@ qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.extraFiles = index.html \ images/bg_l.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ images/bg_r.png \ images/box_bg.png \ images/breadcrumb.png \ @@ -31,12 +34,12 @@ qhp.Qt.extraFiles = index.html \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ + images/arrow_down.png \ images/feedbackground.png \ images/horBar.png \ images/page.png \ images/page_bg.png \ images/sprites-combined.png \ - images/arrow-down.png \ images/spinner.gif \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ @@ -44,17 +47,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index dcf33dc..8cc4fd9 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -90,4 +90,5 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \ __attribute__ \ K_DECLARE_PRIVATE \ PHONON_OBJECT \ - PHONON_HEIR + PHONON_HEIR \ + Q_PRIVATE_PROPERTY diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 31c9d5a..b428a90 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -17,12 +17,11 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <div id=\"nav-topright\">\n" \ " <ul>\n" \ " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \ - " <li class=\"nav-topright-dev\"><a href=\"http://qt.nokia.com/developer\">DEV</a></li>\n" \ + " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \ " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \ " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \ " DOC</a></li>\n" \ " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \ - " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \ " </ul>\n" \ " </div>\n" \ " <div id=\"shortCut\">\n" \ @@ -113,7 +112,6 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \ - " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \ " </ul> \n" \ " </div>\n" \ " </div>\n" \ @@ -160,8 +158,8 @@ HTML.footer = " <!-- /div -->\n" \ " <div id=\"feedbackBox\">\n" \ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \ - " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related the page. For more general bugs and \n" \ - " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a></div></p>\n" \ + " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \ + " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</div></p>\n" \ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \ " </form>\n" \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index d132771..5575b7b 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -51,17 +51,10 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - scripts/shBrushCpp.js \ - scripts/shCore.js \ - scripts/shLegacy.js \ scripts/narrow.js \ scripts/superfish.js \ - style/shCore.css \ - style/shThemeDefault.css \ style/narrow.css \ style/superfish.css \ - style/superfish_skin.css \ - style/OfflineStyle.css \ style/style_ie6.css \ style/style_ie7.css \ style/style_ie8.css \ diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 70b998f..d22a09a 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -125,18 +125,20 @@ Tree::~Tree() /*! */ -Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags) +Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags, const Node* self) { return const_cast<Node*>(const_cast<const Tree*>(this)->findNode(path, relative, - findFlags)); + findFlags, + self)); } /*! */ const Node* Tree::findNode(const QStringList &path, const Node* start, - int findFlags) const + int findFlags, + const Node* self) const { const Node* current = start; if (!current) @@ -171,9 +173,11 @@ const Node* Tree::findNode(const QStringList &path, } if (node && i == path.size() && (!(findFlags & NonFunction) || node->type() != Node::Function - || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) - if ((node != start) && (node->subType() != Node::QmlPropertyGroup)) + || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) { + if ((node != self) && (node->subType() != Node::QmlPropertyGroup)) { return node; + } + } current = current->parent(); } while (current); diff --git a/tools/qdoc3/tree.h b/tools/qdoc3/tree.h index 0865847..b34c3a8 100644 --- a/tools/qdoc3/tree.h +++ b/tools/qdoc3/tree.h @@ -65,10 +65,13 @@ class Tree Tree(); ~Tree(); - Node *findNode(const QStringList &path, Node *relative=0, int findFlags=0); - Node *findNode(const QStringList &path, + Node* findNode(const QStringList &path, + Node* relative=0, + int findFlags=0, + const Node* self=0); + Node* findNode(const QStringList &path, Node::Type type, - Node *relative = 0, + Node* relative = 0, int findFlags = 0); FunctionNode *findFunctionNode(const QStringList &path, Node *relative = 0, @@ -98,12 +101,13 @@ class Tree NamespaceNode *root() { return &roo; } QString version() const { return vers; } - const Node *findNode(const QStringList &path, - const Node *relative = 0, - int findFlags = 0) const; - const Node *findNode(const QStringList &path, + const Node* findNode(const QStringList &path, + const Node* relative = 0, + int findFlags = 0, + const Node* self=0) const; + const Node* findNode(const QStringList &path, Node::Type type, const - Node *relative = 0, + Node* relative = 0, int findFlags = 0) const; const FunctionNode *findFunctionNode(const QStringList &path, const Node *relative = 0, diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index fcd0c33..80afb45 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -17,16 +17,16 @@ SOURCES += $$PWD/qmlruntime.cpp \ $$PWD/loggerwidget.cpp RESOURCES = $$PWD/qmlruntime.qrc -maemo5 { +symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { + SOURCES += $$PWD/deviceorientation_symbian.cpp + FORMS = $$PWD/recopts.ui \ + $$PWD/proxysettings.ui +} else:maemo5 { QT += dbus HEADERS += $$PWD/texteditautoresizer_maemo5.h SOURCES += $$PWD/deviceorientation_maemo5.cpp FORMS = $$PWD/recopts_maemo5.ui \ $$PWD/proxysettings_maemo5.ui -} symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - SOURCES += $$PWD/deviceorientation_symbian.cpp - FORMS = $$PWD/recopts.ui \ - $$PWD/proxysettings.ui } else { SOURCES += $$PWD/deviceorientation.cpp FORMS = $$PWD/recopts.ui \ diff --git a/tools/qtconfig/qtconfig.pro b/tools/qtconfig/qtconfig.pro index d1fd320..3a24e85 100644 --- a/tools/qtconfig/qtconfig.pro +++ b/tools/qtconfig/qtconfig.pro @@ -29,3 +29,11 @@ target.path=$$[QT_INSTALL_BINS] INSTALLS += target INCLUDEPATH += . DBFILE = qtconfig.db + +TR_DIR = $$PWD/../../translations +TRANSLATIONS = \ + $$TR_DIR/qtconfig_hu.ts \ + $$TR_DIR/qtconfig_pl.ts \ + $$TR_DIR/qtconfig_ru.ts \ + $$TR_DIR/qtconfig_zh_CN.ts \ + $$TR_DIR/qtconfig_zh_TW.ts diff --git a/tools/qtconfig/translations/translations.pro b/tools/qtconfig/translations/translations.pro deleted file mode 100644 index 5d35b6a..0000000 --- a/tools/qtconfig/translations/translations.pro +++ /dev/null @@ -1,16 +0,0 @@ -# Include those manually as they do not contain any directory specification - -SOURCES += ../colorbutton.cpp ../main.cpp ../previewframe.cpp ../previewwidget.cpp ../mainwindow.cpp ../paletteeditoradvanced.cpp \ - ../mainwindowbase.cpp ../paletteeditoradvancedbase.cpp ../previewwidgetbase.cpp -HEADERS += ../colorbutton.h ../previewframe.h ../previewwidget.h ../mainwindow.h ../paletteeditoradvanced.h \ - ../mainwindowbase.h ../paletteeditoradvancedbase.h ../previewwidgetbase.h - -FORMS = ../mainwindowbase.ui ../paletteeditoradvancedbase.ui ../previewwidgetbase.ui - -TR_DIR = $$PWD/../../../translations -TRANSLATIONS = \ - $$TR_DIR/qtconfig_hu.ts \ - $$TR_DIR/qtconfig_pl.ts \ - $$TR_DIR/qtconfig_ru.ts \ - $$TR_DIR/qtconfig_zh_CN.ts \ - $$TR_DIR/qtconfig_zh_TW.ts diff --git a/tools/qvfb/qvfb.pro b/tools/qvfb/qvfb.pro index dde7e8d..df69817 100644 --- a/tools/qvfb/qvfb.pro +++ b/tools/qvfb/qvfb.pro @@ -35,7 +35,7 @@ SOURCES = qvfb.cpp \ ../../src/gui/embedded/qlock.cpp \ ../../src/gui/embedded/qwssignalhandler.cpp -include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri) +include(../shared/deviceskin/deviceskin.pri) contains(QT_CONFIG, opengl) { QT += opengl @@ -62,3 +62,11 @@ unix:x11 { } RESOURCES += qvfb.qrc + +TR_DIR = $$PWD/../../translations +TRANSLATIONS = \ + $$TR_DIR/qvfb_hu.ts \ + $$TR_DIR/qvfb_pl.ts \ + $$TR_DIR/qvfb_ru.ts \ + $$TR_DIR/qvfb_zh_CN.ts \ + $$TR_DIR/qvfb_zh_TW.ts diff --git a/tools/qvfb/translations/translations.pro b/tools/qvfb/translations/translations.pro deleted file mode 100644 index b0b1af4..0000000 --- a/tools/qvfb/translations/translations.pro +++ /dev/null @@ -1,35 +0,0 @@ -# Include those manually as they do not contain any directory specification - -FORMS = ../config.ui -HEADERS = ../qvfb.h \ - ../qvfbview.h \ - ../qvfbratedlg.h \ - ../qanimationwriter.h \ - ../gammaview.h \ - ../qvfbprotocol.h \ - ../qvfbshmem.h \ - ../qvfbmmap.h \ - ../../../src/gui/embedded/qvfbhdr.h \ - ../../../src/gui/embedded/qlock_p.h \ - ../../../src/gui/embedded/qwssignalhandler_p.h \ - ../../shared/deviceskin/deviceskin.h - -SOURCES = ../qvfb.cpp \ - ../qvfbview.cpp \ - ../qvfbratedlg.cpp \ - ../main.cpp \ - ../qanimationwriter.cpp \ - ../qvfbprotocol.cpp \ - ../qvfbshmem.cpp \ - ../qvfbmmap.cpp \ - ../../../src/gui/embedded/qlock.cpp \ - ../../../src/gui/embedded/qwssignalhandler.cpp \ - ../../shared/deviceskin/deviceskin.cpp - -TR_DIR = $$PWD/../../../translations -TRANSLATIONS = \ - $$TR_DIR/qvfb_hu.ts \ - $$TR_DIR/qvfb_pl.ts \ - $$TR_DIR/qvfb_ru.ts \ - $$TR_DIR/qvfb_zh_CN.ts \ - $$TR_DIR/qvfb_zh_TW.ts diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 7d32ead..74bd048 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -2024,6 +2024,11 @@ nach <translation>Signalnamen dürfen nicht mit einem Großbuchstaben beginnen</translation> </message> <message> + <location line="+2"/> + <source>Illegal signal name</source> + <translation>Ungültiger Name für Signal</translation> + </message> + <message> <location line="+6"/> <source>Duplicate method name</source> <translation>Mehrfaches Auftreten eines Methodennamens</translation> @@ -2034,6 +2039,11 @@ nach <translation>Methodennamen dürfen nicht mit einem Großbuchstaben beginnen</translation> </message> <message> + <location line="+2"/> + <source>Illegal method name</source> + <translation>Ungültiger Name für Methode</translation> + </message> + <message> <location line="+21"/> <source>Property value set multiple times</source> <translation>Mehrfache Zuweisung eines Wertes an eine Eigenschaft</translation> @@ -7713,21 +7723,53 @@ Bitte wählen Sie einen anderen Dateinamen.</translation> <translation>Kontext4</translation> </message> <message> - <location line="+1"/> + <location line="+2"/> <source>Call</source> + <extracomment>Button to start a call (note: a separate button is used to end the call)</extracomment> <translation>Anruf</translation> </message> <message> - <location line="+1"/> + <location line="+2"/> <source>Hangup</source> + <extracomment>Button to end a call (note: a separate button is used to start the call)</extracomment> <translation>Auflegen</translation> </message> <message> + <location line="+2"/> + <source>Toggle Call/Hangup</source> + <extracomment>Button that will hang up if we're in call, or make a call if we're not.</extracomment> + <translation>Anrufen/Aufhängen</translation> + </message> + <message> <location line="+1"/> <source>Flip</source> <translation>Umdrehen</translation> </message> <message> + <location line="+2"/> + <source>Voice Dial</source> + <extracomment>Button to trigger voice dialling</extracomment> + <translation>Sprachwahl</translation> + </message> + <message> + <location line="+2"/> + <source>Last Number Redial</source> + <extracomment>Button to redial the last number called</extracomment> + <translation>Wahlwiederholung</translation> + </message> + <message> + <location line="+2"/> + <source>Camera Shutter</source> + <extracomment>Button to trigger the camera shutter (take a picture)</extracomment> + <translation>Auslöser</translation> + </message> + <message> + <location line="+2"/> + <source>Camera Focus</source> + <extracomment>Button to focus the camera</extracomment> + <translation>Scharfstellen</translation> + </message> + <message> <location line="+4"/> <source>Kanji</source> <translation>Kanji</translation> diff --git a/translations/translations.pri b/translations/translations.pri index 9ab72fc..f5e54ca 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -40,7 +40,7 @@ ts-qt.depends = sub-tools ###### Designer ts-designer.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ - ../tools/designer/translations/translations.pro) + ../tools/designer/designer.pro) ts-designer.depends = sub-tools ###### Linguist @@ -52,21 +52,21 @@ ts-linguist.depends = sub-tools ###### Assistant ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ - ../tools/assistant/translations/translations.pro \ + ../tools/assistant/tools/assistant/assistant.pro \ && $$LUPDATE \ - ../tools/assistant/translations/qt_help.pro) + ../tools/assistant/lib/lib.pro) ts-assistant.depends = sub-tools ###### Qtconfig ts-qtconfig.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ - ../tools/qtconfig/translations/translations.pro) + ../tools/qtconfig/qtconfig.pro) ts-qtconfig.depends = sub-tools ###### Qvfp ts-qvfb.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ - ../tools/qvfb/translations/translations.pro) + ../tools/qvfb/qvfb.pro) ts-qvfb.depends = sub-tools ###### Overall Rules |