From 726a8b16c52fe4608c89d740b47361a2b073ce01 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 21 Oct 2010 18:18:37 +0200 Subject: Doc: Corrected the name property as it was incorrectly declared. --- src/declarative/util/qdeclarativestateoperations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 8cb813c..d1d7822 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -648,7 +648,7 @@ void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s) } /*! - \qmlproperty script StateChangeScript::script + \qmlproperty string StateChangeScript::name This property holds the name of the script. This name can be used by a ScriptAction to target a specific script. -- cgit v0.12 From 2a17ec1b2ef7164a9a5f4bd9b7e5854ed5884376 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 21 Oct 2010 18:22:09 +0200 Subject: Doc: Moved QFileSystemModel example code to the class documentation. Previously, the code showed how to use QDirModel and was included in the QDirModel class documentation, but it has since been changed to use QFileSystemModel instead. --- src/gui/dialogs/qfilesystemmodel.cpp | 45 +++++++++++++++++++++++++++--------- src/gui/itemviews/qdirmodel.cpp | 19 --------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 8a6190f..8a9f8ae 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -80,11 +80,43 @@ QT_BEGIN_NAMESPACE directories. In the simplest case, it can be used with a suitable display widget as part of a browser or filter. - QFileSystemModel will not fetch any files or directories until setRootPath + QFileSystemModel can be accessed using the standard interface provided by + QAbstractItemModel, but it also provides some convenience functions that are + specific to a directory model. + The fileInfo(), isDir(), name(), and path() functions provide information + about the underlying files and directories related to items in the model. + Directories can be created and removed using mkdir(), rmdir(). + + \note QFileSystemModel requires an instance of a GUI application. + + \section1 Example Usage + + A directory model that displays the contents of a default directory + is usually constructed with a parent object: + + \snippet doc/src/snippets/shareddirmodel/main.cpp 2 + + A tree view can be used to display the contents of the model + + \snippet doc/src/snippets/shareddirmodel/main.cpp 4 + + and the contents of a particular directory can be displayed by + setting the tree view's root index: + + \snippet doc/src/snippets/shareddirmodel/main.cpp 7 + + The view's root index can be used to control how much of a + hierarchical model is displayed. QDirModel provides a convenience + function that returns a suitable model index for a path to a + directory within the model. + + \section1 Caching and Performance + + QFileSystemModel will not fetch any files or directories until setRootPath() is called. This will prevent any unnecessary querying on the file system until that point such as listing the drives on Windows. - Unlike the QDirModel, QFileSystemModel uses a separate thread to populate + Unlike QDirModel, QFileSystemModel uses a separate thread to populate itself so it will not cause the main thread to hang as the file system is being queried. Calls to rowCount() will return 0 until the model populates a directory. @@ -92,15 +124,6 @@ QT_BEGIN_NAMESPACE QFileSystemModel keeps a cache with file information. The cache is automatically kept up to date using the QFileSystemWatcher. - QFileSystemModel can be accessed using the standard interface provided by - QAbstractItemModel, but it also provides some convenience functions that are - specific to a directory model. - The fileInfo(), isDir(), name(), and path() functions provide information - about the underlying files and directories related to items in the model. - Directories can be created and removed using mkdir(), rmdir(). - - \note QFileSystemModel requires an instance of a GUI application. - \sa {Model Classes} */ diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp index 48599bc..cb6f81e 100644 --- a/src/gui/itemviews/qdirmodel.cpp +++ b/src/gui/itemviews/qdirmodel.cpp @@ -201,25 +201,6 @@ void QDirModelPrivate::invalidate() QDirModel keeps a cache with file information. The cache needs to be updated with refresh(). - A directory model that displays the contents of a default directory - is usually constructed with a parent object: - - \snippet doc/src/snippets/shareddirmodel/main.cpp 2 - - A tree view can be used to display the contents of the model - - \snippet doc/src/snippets/shareddirmodel/main.cpp 4 - - and the contents of a particular directory can be displayed by - setting the tree view's root index: - - \snippet doc/src/snippets/shareddirmodel/main.cpp 7 - - The view's root index can be used to control how much of a - hierarchical model is displayed. QDirModel provides a convenience - function that returns a suitable model index for a path to a - directory within the model. - QDirModel can be accessed using the standard interface provided by QAbstractItemModel, but it also provides some convenience functions that are specific to a directory model. The fileInfo() and isDir() -- cgit v0.12 From c29bc376c957867b57a6dd32549db6ae67be4f60 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 22 Oct 2010 15:56:23 +0200 Subject: Doc: Updated the Java trademark information. Checked with Legal. --- doc/src/legal/trademarks.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/legal/trademarks.qdoc b/doc/src/legal/trademarks.qdoc index 42cb7a9..e69d57c 100644 --- a/doc/src/legal/trademarks.qdoc +++ b/doc/src/legal/trademarks.qdoc @@ -33,13 +33,13 @@ \brief Information about trademarks owned by Nokia and other organisations. Nokia, the Nokia logo, Qt, and the Qt logo are trademarks of Nokia -  Corporation and/or its subsidiaries in Finland and other countries. + Corporation and/or its subsidiaries in Finland and other countries. \list \o Intel, Intel Inside (logos), MMX and Pentium are \reg trademarks of Intel Corporation in the United States, other countries, or both. - \o Java and all Java-based trademarks are trademarks of Sun Microsystems, - Inc. in the United States, other countries, or both. + \o Oracle and Java are registered trademarks of Oracle and/or its affiliates. + Other names may be trademarks of their respective owners. \o Linux is a \reg trademark of Linus Torvalds in the United States, other countries or both. \o Mac, Mac OS and Macintosh are \reg trademarks of Apple Computer, Inc., -- cgit v0.12 From 928387618011af72e0011287e1002a9b51a6e51f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 22 Oct 2010 15:57:36 +0200 Subject: Doc: Added Windows Vista to the trademark list. --- doc/src/legal/trademarks.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/legal/trademarks.qdoc b/doc/src/legal/trademarks.qdoc index e69d57c..3bf783f 100644 --- a/doc/src/legal/trademarks.qdoc +++ b/doc/src/legal/trademarks.qdoc @@ -44,9 +44,9 @@ countries or both. \o Mac, Mac OS and Macintosh are \reg trademarks of Apple Computer, Inc., registered in the U.S. and other countries. - \o Microsoft, Windows, Windows NT, XP, Visual Studio and the Windows logo - are \reg trademarks of Microsoft Corporation in the United States, other - countries, or both. + \o Microsoft, Windows, Windows NT, XP, Windows Vista, Visual Studio and the + Windows logo are \reg trademarks of Microsoft Corporation in the United + States, other countries, or both. \o Motif is a registered trademark of The Open Group in the United States, other countries, or both. \o OpenGL is a \reg trademark of Silicon Graphics, Inc. in the United States -- cgit v0.12 From 9680a442876867ab779023e59e1092268eea74e4 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 29 Oct 2010 14:04:54 +0200 Subject: Doc: Fixed basic language. --- doc/src/index.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index e42dfca..57fc18a 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -45,7 +45,7 @@
  • How to learn Qt
  • Tutorials
  • Examples
  • -
  • Whats new in Qt 4.7
  • +
  • What's new in Qt 4.7
  • -- cgit v0.12 From 6c796c75bfde7e79ec0802e0b7245283fc46d46e Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Mon, 1 Nov 2010 14:43:14 +0100 Subject: Doc: Fixing bug in sorting script for search results. Reviewed-by: Geir Vattekar --- doc/src/template/scripts/functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index 47539d2..62bc535 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -105,17 +105,17 @@ function processNokiaData(response){ /* start a new list element */ full_li_element = ' Date: Mon, 1 Nov 2010 16:25:01 +0100 Subject: fix qdoc doc generation as a side effect, the target is now named html-docs instead of docs to be consistent with the qt docs. --- tools/qdoc3/qdoc3.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index ae0bf25..d47e066 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -120,9 +120,9 @@ SOURCES += apigenerator.cpp \ qtPrepareTool(QDOC, qdoc3) -docs.commands = $$QDOC qdoc-manual.qdocconf +html-docs.commands = cd \"$$PWD/doc\" && $$QDOC qdoc-manual.qdocconf -QMAKE_EXTRA_TARGETS += docs +QMAKE_EXTRA_TARGETS += html-docs target.path = $$[QT_INSTALL_BINS] INSTALLS += target -- cgit v0.12 From f70c495803f1bb42894e69ee2d390f613ebd93b6 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 2 Nov 2010 12:18:54 +0100 Subject: Doc: fixing style for search display and slim fit menus --- doc/src/template/style/style.css | 76 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 536b3c8..1e5c071 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -660,13 +660,31 @@ -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + font-size: 11px; + } + + #resultdialog a + { + color: #00732f; } #resultdialog.active { display: block; - width:30%; } + .narrow #resultdialog { + width: 60%; + _width: 360px; + } + + .narrow #resultdialog.active { + right: 10px; + *left: auto; + _left: auto; + _right: -20px; + } + + #resultdialog #resultclose { float: right; } @@ -775,10 +793,11 @@ { float: left; text-indent: -10px; - margin-top: -5px; + /* margin-top: -5px;*/ margin-right: 15px; font-weight: bold; color: #B0ADAB; + font: 10px/1.2 Verdana; } .toolbuttons #print @@ -892,7 +911,6 @@ } .wrap .content h2 { - border-bottom:1px solid #DDDDDD; font:600 16px/1.2 Arial; margin-top:15px; width:100%; @@ -1658,6 +1676,58 @@ } /* end of creator spec*/ + .item { + float: left; + position: relative; + width: 100%; + overflow: hidden; + } + + + .item .primary { + margin-right: 220px; + position: relative; + } + + .item hr { + margin-left: -220px; + } + + .item .secondary { + float: right; + width: 200px; + position: relative; + } + + .item .cols { + clear: both; + display: block; + } + + .item .cols .col { + float: left; + margin-left: 1.5%; + } + + .item .cols .col.first { + margin-left: 0; + } + + .item .cols.two .col { + width: 45%; + } + + .item .box { + margin: 0 0 10px 0; + } + + .item .box h3 { + margin: 0 0 10px 0; + } + + .cols.unclear { + clear:none; + } } /* end of screen media */ -- cgit v0.12 From 1bf0fa453fa65c6d29696c0b56ebdcb99c384ad4 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 2 Nov 2010 12:39:37 +0100 Subject: Doc: fixing bugs in style --- doc/src/template/style/narrow.css | 1 + doc/src/template/style/style.css | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/src/template/style/narrow.css b/doc/src/template/style/narrow.css index c1e3f61..fbb0752 100644 --- a/doc/src/template/style/narrow.css +++ b/doc/src/template/style/narrow.css @@ -223,6 +223,7 @@ float: right; margin: 15px 40px 0 0; font-size: 11px; + position: relative; } .narrow #narrowmenu { diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 1e5c071..17665c0 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -101,7 +101,7 @@ } a { - color: #00732f; + color: #44a51c; text-decoration: none; } hr @@ -1297,6 +1297,10 @@ background-color: #E6E7E8; margin: 0; } + .small + { + font: normal 9px/1 Verdana; + } /* end footer elements */ @@ -1471,7 +1475,7 @@ } - .creator .header, .footer, .wrapper + .creator .header, .creator .footer, .creator .wrapper { max-width: 1500px; margin: 0px; -- cgit v0.12 From 12120c47133642a0704799208701fd9164bf0ebf Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Tue, 2 Nov 2010 12:45:09 +0100 Subject: german translation: minor additions + fixes Merge-request: 902 Reviewed-by: Oswald Buddenhagen --- translations/assistant_de.ts | 37 ++++++++++++++++++++++++++++++++----- translations/qt_de.ts | 4 ++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/translations/assistant_de.ts b/translations/assistant_de.ts index 95fabaf..3648fdd 100644 --- a/translations/assistant_de.ts +++ b/translations/assistant_de.ts @@ -67,7 +67,7 @@ Grund: Error reading collection file '%1': %2. - Fehler beim Lesen der Katalogdatei '%1': %2 + Fehler beim Lesen der Katalogdatei '%1': %2. Error creating collection file '%1': %2. @@ -741,7 +741,7 @@ Grund: Input File - Eingabedatei: + Datei eingeben Specify the .adp or .dcf file you want to convert to the new Qt help project format and/or collection format. @@ -989,7 +989,7 @@ Grund: <center><h3>%1</h3><p>Version %2</p></center><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> - + <center><h3>%1</h3><p>Version %2</p></center><p>Copyright (C) 2010 Nokia Corporation und/oder ihre Tochtergesellschaft(en).</p> Could not register file '%1': %2 @@ -1354,7 +1354,19 @@ qcollectiongenerator <collection-config-file> [options] qcollectiongenerator. - + +Aufruf: + +qcollectiongenerator <collection-Konfigurationsdatei> [Optionen] + + -o <collection-Datei> Erstellt eine Collection-Datei mit + dem Namen <collection-Datei>. Wenn + diese Option nicht angegeben ist, wird + der Standardname verwendet. + -v Zeigt die Versionsnummer von + qcollectiongenerator an. + + Could not open %1. @@ -1435,7 +1447,22 @@ qhelpgenerator <help-project-file> [options] qhelpgenerator. - + +Aufruf: + +qhelpgenerator <Hilfe-Projektdatei> [Optionen] + -o <komprimierte-Datei> Erstellt eine komprimierte + Qt-Hilfedatei mit dem Namen + <komprimierte-Datei>. Wenn diese + Option nicht angegeben ist, wird + ein Standardname verwendet. + -c Prüft, ob alle Verknüpfungen in + HTML-Dateien auf Dateien in diesem + Hilfeprojekt verweisen. + -v Zeigt die Versionsnummer von + qhelpgenerator an. + + Could not open %1. diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 3b9bbb0..d167434 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -3700,7 +3700,7 @@ Möchten Sie die Datei trotzdem löschen? <h3>About Qt</h3><p>This program uses Qt version %1.</p> - + <h3>Über Qt</h3><p>Dieses Programm verwendet Qt Version %1.</p> <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> @@ -5186,7 +5186,7 @@ Bitte wählen Sie einen anderen Dateinamen. Find &Previous - Vorhergehende Fundstelle + &Vorhergehende Fundstelle Shift+F3 -- cgit v0.12 From 576a2e2181a9615b8aa1984a924442622fa6922d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 2 Nov 2010 15:33:41 +0100 Subject: Fixed destination path for the S60 feedback plugin. Reviewed-by: axis --- src/plugins/s60/feedback/feedback.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/s60/feedback/feedback.pro b/src/plugins/s60/feedback/feedback.pro index 32ddf6f..1069220 100644 --- a/src/plugins/s60/feedback/feedback.pro +++ b/src/plugins/s60/feedback/feedback.pro @@ -2,6 +2,8 @@ include(../../qpluginbase.pri) TARGET = qtactilefeedback$${QT_LIBINFIX} +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60/feedback + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE contains(S60_VERSION, 5.0)|contains(S60_VERSION, symbian3) { -- cgit v0.12 From 7c8edecd486b71ff84cfaf278d9b1295e24766b9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Nov 2010 16:09:18 +0100 Subject: make the dtd reflect reality --- tools/linguist/shared/ts.dtd | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/tools/linguist/shared/ts.dtd b/tools/linguist/shared/ts.dtd index 4d2cdeb..12d3562 100644 --- a/tools/linguist/shared/ts.dtd +++ b/tools/linguist/shared/ts.dtd @@ -4,8 +4,6 @@ ! ! The location element is set as optional since it was introduced first in Qt 4.2. ! The userdata element is set as optional since it was introduced first in Qt 4.4. - ! The source and translation elements are optional starting with version 3.0 - ! (Qt 4.6) to support S60 blank messages. ! --> - + - - @@ -53,12 +48,13 @@ variants (yes|no) "no"> - - - -- cgit v0.12 From 67dcf89760af14e65e2c62ebba513c987086b355 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Nov 2010 18:53:17 +0100 Subject: simplify recursive symlinking the jira issue itself has been already fixed, but in a somewhat arcane way. this one is better maintainable. Reviewed-by: joerg Task-number: QTBUG-14955 --- configure | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 0152c8e..1b2abf4 100755 --- a/configure +++ b/configure @@ -2429,14 +2429,8 @@ if [ "$OPT_SHADOW" = "yes" ]; then ShadowMkspecs() { rm -rf "$outpath/mkspecs/$1" - if [ "$UNAME_SYSTEM" = "Linux" ]; then - # This works with GNU coreutils, and is needed for ScratchBox - cp -rs "$relpath/mkspecs/$1" "$outpath/mkspecs/$1" - else - # A simple "cp -rs" doesn't work on Mac. :( - find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p - find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" - fi + find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p + find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done } # Special case for mkspecs/features directory. -- cgit v0.12 From 6382a038d6394135a4dc2d8e1e47133d9ea0b659 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 3 Nov 2010 09:40:16 +0200 Subject: Qt/Symbian: QInputDialog layout and size are wrong The QInputDialog with anything but QLineEdit as the input widget, will show up as minimal size on device/emulator. Also, the dialog looks bad since the widgets are deployed very close to the dialog borders. As a fix, layout will not get the size policy set on Symbian, but the dialog itself is stretched to occupy screen width and thus, layout grows to occupy the available size. Additionally, style will set layout pixel metrics for dialogs larger than for other widgets, to avoid the layout from putting widgets very close to dialog border. Task-number: QTBUG-14331 Reviewed-by: Janne Anttila --- src/gui/dialogs/qdialog.cpp | 2 +- src/gui/dialogs/qinputdialog.cpp | 3 +++ src/gui/styles/qs60style.cpp | 22 ++++++++++++++++++++-- src/gui/styles/qs60style_p.h | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 9e0437c..b7a0026 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -1111,7 +1111,7 @@ QSize QDialog::sizeHint() const // if size is not fixed, try to adjust it according to S60 layoutting if (minimumSize() != maximumSize()) { // In S60, dialogs are always the width of screen (in portrait, regardless of current layout) - return QSize(qMax(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height()); + return QSize(qMin(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height()); } else { return QWidget::sizeHint(); } diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 700b234..abaaa49 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -231,7 +231,10 @@ void QInputDialogPrivate::ensureLayout() QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject())); mainLayout = new QVBoxLayout(q); + //we want to let the input dialog grow to available size on Symbian. +#ifndef Q_OS_SYMBIAN mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); +#endif mainLayout->addWidget(label); mainLayout->addWidget(inputWidget); mainLayout->addWidget(buttonBox); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index d39a2ba..53ca28c 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -112,6 +112,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** End of generated data *** }; +QSet *QS60StylePrivate::m_autoFillDisabledWidgets = 0; + const short *QS60StylePrivate::m_pmPointer = QS60StylePrivate::data[0]; // theme background texture @@ -152,6 +154,8 @@ const double KTabFontMul = 0.72; QS60StylePrivate::~QS60StylePrivate() { + delete m_autoFillDisabledWidgets; + m_autoFillDisabledWidgets = 0; clearCaches(); //deletes also background image deleteThemePalette(); #ifdef Q_WS_S60 @@ -2521,9 +2525,9 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const metricValue = QS60StylePrivate::pixelMetric(PM_LayoutLeftMargin); } - if (widget && (metric == PM_LayoutTopMargin)) + if (widget && (metric == PM_LayoutTopMargin || metric == PM_LayoutLeftMargin || metric == PM_LayoutRightMargin)) if (widget->windowType() == Qt::Dialog) - //double the top layout margin for dialogs, it is very close to real value + //double the layout margins (except bottom) for dialogs, it is very close to real value //without having to define custom pixel metric metricValue *= 2; @@ -3184,6 +3188,13 @@ void QS60Style::polish(QWidget *widget) } d->setThemePalette(widget); d->setFont(widget); + + if (widget->autoFillBackground()) { + if (!d->m_autoFillDisabledWidgets) + d->m_autoFillDisabledWidgets = new QSet; + widget->setAutoFillBackground(false); + d->m_autoFillDisabledWidgets->insert(widget); + } } /*! @@ -3218,6 +3229,13 @@ void QS60Style::unpolish(QWidget *widget) if (widget) widget->setPalette(QPalette()); + + if (d->m_autoFillDisabledWidgets && + !d->m_autoFillDisabledWidgets->isEmpty() && + d->m_autoFillDisabledWidgets->contains(widget)) { + widget->setAutoFillBackground(true); + d->m_autoFillDisabledWidgets->remove(widget); + } #if defined(Q_WS_S60) && !defined(QT_NO_PROGRESSBAR) if (QProgressBar *bar = qobject_cast(widget)) { diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index b46f75e..3d66c40 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -625,6 +625,7 @@ private: static qint64 m_webPaletteKey; static QPointer m_pressedWidget; + static QSet *m_autoFillDisabledWidgets; #ifdef Q_WS_S60 //list of progress bars having animation running -- cgit v0.12 From 663cef92a8ee7cf7675c235cafdb4c1aab7e0ef3 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 3 Nov 2010 10:17:55 +0100 Subject: Doc: Fixing columns to display all elements in lists - css3 --- doc/src/template/style/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 17665c0..faf17c8 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -101,7 +101,7 @@ } a { - color: #44a51c; + color: #00732F; text-decoration: none; } hr @@ -1008,7 +1008,7 @@ /*display:inline-block;*/ margin-left:10px; min-width:250px; - line-height: 1.2; + line-height: 1.5; min-width:100%; min-height:15px; } -- cgit v0.12 From 56d8cf4eb5385aa2d8ad3730c7ffa779a47622d8 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 3 Nov 2010 10:33:20 +0100 Subject: Doc: updating the template to support search feature better. --- tools/qdoc3/test/qt-html-templates.qdocconf | 34 ++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 47b1e5f..30a63c8 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -9,6 +9,7 @@ HTML.postheader = "
    \n" \ "
    \n" \ " Home
    \n" \ " Qt Reference Documentation\n" \ + "
    \n" \ "
    \n" \ "
      \n" \ "
    • Qt HOME
    • \n" \ @@ -26,6 +27,37 @@ HTML.postheader = "
      \n" \ " \n" \ "
    \n" \ "
    \n" \ + " \n" \ "
    \n" \ " \n" \ "
    \n" \ @@ -36,7 +68,7 @@ HTML.postheader = "
    \n" \ "
    \n" \ "
    \n" \ " Search index:
    \n" \ - "
    \n" \ + "
    \n" \ "
    \n" \ "
    \n" \ " \n" \ -- cgit v0.12 From 42ac542a913c78abbb18196b27dfbeee93c6a66f Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 3 Nov 2010 11:16:33 +0100 Subject: Doc: fixing style - tool buttons to bold. --- doc/src/template/style/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index faf17c8..783178d 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -797,7 +797,7 @@ margin-right: 15px; font-weight: bold; color: #B0ADAB; - font: 10px/1.2 Verdana; + font: bold 10px/1.2 Verdana; } .toolbuttons #print -- cgit v0.12 From f23ec770df72e456a227f43a7d984bdb747f9043 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 3 Nov 2010 11:24:41 +0100 Subject: Doc: style tuning --- doc/src/template/style/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 783178d..16bc9ed 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -793,7 +793,7 @@ { float: left; text-indent: -10px; - /* margin-top: -5px;*/ + margin-top: -5px; margin-right: 15px; font-weight: bold; color: #B0ADAB; -- cgit v0.12 From 18b6067fa99004d1572e3d6b8fbc181729ad96be Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 3 Nov 2010 12:27:32 +0100 Subject: qdoc: Added next and previous links to top of pages. Task-number: QTBUG-14979 --- tools/qdoc3/htmlgenerator.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 7b719c8..fb04175 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1929,10 +1929,8 @@ void HtmlGenerator::generateHeader(const QString& title, } } -#if 0 // Removed for new doc format. MWS if (node && !node->links().empty()) - out() << "

    \n" << navigationLinks << "

    \n"; -#endif + out() << "

    \n" << navigationLinks << "

    \n"; } void HtmlGenerator::generateTitle(const QString& title, -- cgit v0.12 From 3970bd54380a9438ce4765b0bb9a72d2b8bf2662 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Nov 2010 19:59:21 +0100 Subject: more elegant treatment of qconfig.h special case instead of injecting it only if it is not there yet, exclude it if it is already there and then unconditionally inject it. this makes things more deterministic. Reviewed-by: joerg --- bin/syncqt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index c73d119..0f64517 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -695,10 +695,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; -# Force generation of forwarding header for qconfig.h if (and only if) we can't -# find the header by normal means. -%inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ) unless (-e "$basedir/src/corelib/global/qconfig.h"); +my %inject_headers = ( "$basedir/src/corelib/global" => ( "qconfig.h" ) ); # all from build dir foreach my $lib (@modules_to_sync) { #iteration info @@ -800,7 +797,12 @@ foreach my $lib (@modules_to_sync) { #calc files and "copy" them foreach my $subdir (@subdirs) { my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0); - push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir}); + if (defined $inject_headers{$subdir}) { + foreach my $if ($inject_headers{$subdir}) { + @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously + push @headers, "*".$if; + } + } foreach my $header (@headers) { my $shadow = ($header =~ s/^\*//); $header = 0 if($header =~ /^ui_.*.h/); -- cgit v0.12 From e890821c3c1042f425643facbbbb0e036f5304b6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Nov 2010 10:06:23 +0100 Subject: exclude headers in builddir from -copy option Reviewed-by: joerg --- bin/syncqt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/syncqt b/bin/syncqt index 0f64517..6c5729a 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -880,7 +880,7 @@ foreach my $lib (@modules_to_sync) { @headers = ( "$out_basedir/include/$lib/private/$header" ); } foreach(@headers) { #sync them - $header_copies++ if(syncHeader($_, $iheader, $copy_headers, $ts)); + $header_copies++ if(syncHeader($_, $iheader, $copy_headers && !$shadow, $ts)); } if($public_header) { -- cgit v0.12 From fc60eb64d38289b448f73889139c94895b74db1a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Nov 2010 11:47:17 +0100 Subject: msvc: enable unreferenced code elimination in release with debuginfo builds that linker optimization is on by default in release builds, so override /DEBUG implicitly turning it off. as it happens, this implicitly disables incremental linking, so that option can go away now. Reviewed-by: joerg Task-number: QTBUG-14007 --- mkspecs/win32-msvc2003/qmake.conf | 2 +- mkspecs/win32-msvc2005/qmake.conf | 2 +- mkspecs/win32-msvc2008/qmake.conf | 2 +- mkspecs/win32-msvc2010/qmake.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf index 63d1ffd..a573a4d 100644 --- a/mkspecs/win32-msvc2003/qmake.conf +++ b/mkspecs/win32-msvc2003/qmake.conf @@ -53,7 +53,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 265d028..aa58e30 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -55,7 +55,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 1432645..ee7b99a 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 84086e2..44e460e 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" -- cgit v0.12 From fbe7375ad3dde9ce10202141ea7ffe78643088a6 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Nov 2010 16:46:24 +0100 Subject: QNAM: Reset authenticator state properly between requests Reset authenticator and fix operator=(...) of QAuthenticator. Task-number: QTBUG-6792 Reviewed-by: ogoffart --- src/network/access/qhttpnetworkconnection.cpp | 7 +++++++ src/network/kernel/qauthenticator.cpp | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 89f9b03..4d27531 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -373,6 +373,13 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket // - If withCredentials has been set to false (e.g. by QtWebKit for a cross-origin XMLHttpRequest) then // we need to bail out if authentication is required. if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) { + // Reset authenticator so the next request on that channel does not get messed up + auth = 0; + if (isProxy) + channels[i].proxyAuthenticator = QAuthenticator(); + else + channels[i].authenticator = QAuthenticator(); + // authentication is cancelled, send the current contents to the user. emit channels[i].reply->headerChanged(); emit channels[i].reply->readyRead(); diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 220f7da..73f6b94 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -164,9 +164,13 @@ QAuthenticator &QAuthenticator::operator=(const QAuthenticator &other) { if (d == other.d) return *this; - detach(); - d->user = other.d->user; - d->password = other.d->password; + + if (d && !d->ref.deref()) + delete d; + + d = other.d; + if (d) + d->ref.ref(); return *this; } -- cgit v0.12 From 5a20a7b87220dd33792b5c25ea809a0e5f93a93b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Nov 2010 17:17:47 +0100 Subject: tst_qnetworkreply: Add testcase for unknown authentication method Task-number: QTBUG-4121 Reviewed-by: ogoffart --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 5196ed2..8850e6e 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -295,6 +295,8 @@ private Q_SLOTS: void getFromUnreachableIp(); + void qtbug4121unknownAuthentication(); + // NOTE: This test must be last! void parentingRepliesToTheApp(); }; @@ -4598,6 +4600,7 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply() QCOMPARE(reply->error(), QNetworkReply::NoError); } +// TODO add similar test for FTP void tst_QNetworkReply::getFromUnreachableIp() { QNetworkAccessManager manager; @@ -4612,6 +4615,35 @@ void tst_QNetworkReply::getFromUnreachableIp() QVERIFY(reply->error() != QNetworkReply::NoError); } +void tst_QNetworkReply::qtbug4121unknownAuthentication() +{ + MiniHttpServer server(QByteArray("HTTP/1.1 401 bla\r\nWWW-Authenticate: crap\r\nContent-Length: 0\r\n\r\n")); + server.doClose = false; + + QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); + QNetworkAccessManager manager; + QNetworkReplyPtr reply = manager.get(request); + + qRegisterMetaType("QNetworkReply*"); + qRegisterMetaType("QAuthenticator*"); + QSignalSpy authSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); + QSignalSpy finishedSpy(&manager, SIGNAL(finished(QNetworkReply*))); + qRegisterMetaType("QNetworkReply::NetworkError"); + QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError))); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(10); + QVERIFY(!QTestEventLoop::instance().timeout()); + + QCOMPARE(authSpy.count(), 0); + QCOMPARE(finishedSpy.count(), 1); + QCOMPARE(errorSpy.count(), 1); + + QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError); +} + + + // NOTE: This test must be last testcase in tst_qnetworkreply! void tst_QNetworkReply::parentingRepliesToTheApp() { -- cgit v0.12 From 4c400ec8e397b4da9898f96c50a702eaa362293d Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 25 Oct 2010 22:28:31 +0200 Subject: PinchGesture: lastRotationAngle should start at 0. Reviewed-by: Zeno Albisser --- src/gui/kernel/qstandardgestures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 1821c3d..7336c84 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -224,7 +224,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, startAngle -= 360; const qreal rotationAngle = startAngle - angle; if (d->isNewSequence) - d->lastRotationAngle = rotationAngle; + d->lastRotationAngle = 0.0; else d->lastRotationAngle = d->rotationAngle; d->rotationAngle = rotationAngle; -- cgit v0.12 From b37fa034257673a43783a54bb66328c82a0c7ef1 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 25 Oct 2010 23:28:37 +0200 Subject: The lastCenterPoint should be equal to centerPoint for new gestures. Reviewed-by: Zeno Albisser --- src/gui/kernel/qstandardgestures.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 7336c84..48b7ac1 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -194,13 +194,15 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, d->hotSpot = p1.screenPos(); d->isHotSpotSet = true; + QPointF centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0; if (d->isNewSequence) { d->startPosition[0] = p1.screenPos(); d->startPosition[1] = p2.screenPos(); + d->lastCenterPoint = centerPoint; + } else { + d->lastCenterPoint = d->centerPoint; } - - d->lastCenterPoint = d->centerPoint; - d->centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0; + d->centerPoint = centerPoint; d->changeFlags |= QPinchGesture::CenterPointChanged; -- cgit v0.12