From 2b7e46886d7a77257b64823e959bd8d8a007380d Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 09:38:20 +0100
Subject: doc:	Removed some erroneous text.

Task: QTBUG-7965
---
 src/gui/graphicsview/qgraphicsitem.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 2f208b7..d19a102 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -414,12 +414,6 @@
 /*!
     \enum QGraphicsItem::GraphicsItemChange
 
-        ItemVisibleHasChanged,
-        ItemEnabledHasChanged,
-        ItemSelectedHasChanged,
-        ItemParentHasChanged,
-        ItemSceneHasChanged
-
     This enum describes the state changes that are notified by
     QGraphicsItem::itemChange(). The notifications are sent as the state
     changes, and in some cases, adjustments can be made (see the documentation
-- 
cgit v0.12


From 1ef21425463204ff60defb9ca97813ff07db2149 Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 09:53:22 +0100
Subject: doc:	Added \since 4.6 to the properties.

Task: QTBUG-8333
---
 src/svg/qgraphicssvgitem.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp
index 7e80e50..69ff7a3 100644
--- a/src/svg/qgraphicssvgitem.cpp
+++ b/src/svg/qgraphicssvgitem.cpp
@@ -267,6 +267,7 @@ int QGraphicsSvgItem::type() const
 
 /*!
   \property QGraphicsSvgItem::maximumCacheSize
+  \since 4.6
 
   This property holds the maximum size of the device coordinate cache
   for this item.
@@ -312,7 +313,8 @@ QSize QGraphicsSvgItem::maximumCacheSize() const
 
 /*!
   \property QGraphicsSvgItem::elementId
-
+  \since 4.6
+  
   This property holds the element's XML ID.
  */
 
-- 
cgit v0.12


From 0a1a01ea6e6496d79a59cd9b5f845d56fa1e53d6 Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 10:28:39 +0100
Subject: doc:	Added \obsolete.

Task: QTBUG-8083
---
 src/corelib/io/qdir.cpp      | 8 ++++----
 src/corelib/io/qresource.cpp | 9 ++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index dc7f17e..69b3af4 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -993,15 +993,15 @@ void QDir::setNameFilters(const QStringList &nameFilters)
 
 /*!
     \obsolete
+
+    Use QDir::addSearchPath() with a prefix instead.
+
     Adds \a path to the search paths searched in to find resources
     that are not specified with an absolute path. The default search
     path is to search only in the root (\c{:/}).
 
-    Use QDir::addSearchPath() with a prefix instead.
-
-    \sa {The Qt Resource System}, QResource::addSearchPath()
+    \sa {The Qt Resource System}
 */
-
 void QDir::addResourceSearchPath(const QString &path)
 {
 #ifdef QT_BUILD_CORE_LIB
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index adfbb15..6d33c8b 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -555,16 +555,15 @@ QStringList QResource::children() const
 /*!
   \obsolete
 
+  Use QDir::addSearchPath() with a prefix instead.
+
   Adds \a path to the search paths searched in to find resources that are
   not specified with an absolute path. The \a path must be an absolute
   path (start with \c{/}).
 
   The default search path is to search only in the root (\c{:/}). The last
   path added will be consulted first upon next QResource creation.
-
-  Use QDir::addSearchPath() with a prefix instead.
 */
-
 void
 QResource::addSearchPath(const QString &path)
 {
@@ -578,6 +577,10 @@ QResource::addSearchPath(const QString &path)
 }
 
 /*!
+  \obsolete
+
+  Use QDir::searchPaths() instead.
+  
   Returns the current search path list. This list is consulted when
   creating a relative resource.
 
-- 
cgit v0.12


From 48a1b43743481a646ad0ebef116f249f891e4e10 Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 10:40:12 +0100
Subject: doc:	Removed bad grammar.

Task: QTBUG-8033
---
 doc/src/examples/scribble.qdoc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc
index 3c6d136..5c66410 100644
--- a/doc/src/examples/scribble.qdoc
+++ b/doc/src/examples/scribble.qdoc
@@ -74,9 +74,8 @@
     \o \c MainWindow provides a menu above the \c ScribbleArea.
     \endlist
 
-    We will start by reviewing the \c ScribbleArea class, which
-    contains the interesting, then we will take a look at the \c
-    MainWindow class that uses it.
+    We will start by reviewing the \c ScribbleArea class. Then we will
+    review the \c MainWindow class, which uses \c ScribbleArea.
 
     \section1 ScribbleArea Class Definition
 
-- 
cgit v0.12


From 9629681e7b3d69456bd6c5905c267b3d08b6243f Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 11:38:23 +0100
Subject: doc:	Corrected typo.

Task: QTBUG-8450
---
 src/corelib/io/qiodevice.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 4e14ba8..662100a 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1003,8 +1003,8 @@ QByteArray QIODevice::readAll()
     to a maximum of \a maxSize - 1 bytes, stores the characters in \a
     data, and returns the number of bytes read. If a line could not be
     read but no error ocurred, this function returns 0. If an error
-    occurs, this function returns what it could the length of what
-    could be read, or -1 if nothing was read.
+    occurs, this function returns the length of what could be read, or
+    -1 if nothing was read.
 
     A terminating '\0' byte is always appended to \a data, so \a
     maxSize must be larger than 1.
-- 
cgit v0.12


From 12b1dbb1a0911d421d9e19129291dcd8151c3f50 Mon Sep 17 00:00:00 2001
From: Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com>
Date: Tue, 23 Feb 2010 12:28:17 +0100
Subject: QColorDialog::open() freezes the app the *second* time it is used on
 Mac

The problem here is caused by a boolean flag used to prevent recursion.
The flag was set and never reset. This patch resets the flag the moment
open is called.

Task-number: QTBUG-7825
Reviewed-by: Richard Moe Gustavsen
---
 src/gui/dialogs/qcolordialog_mac.mm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index bdcb872..8af0d2b 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -96,6 +96,7 @@ QT_USE_NAMESPACE
 - (void)finishOffWithCode:(NSInteger)result;
 - (void)showColorPanel;
 - (void)exec;
+- (void)setResultSet:(BOOL)result;
 @end
 
 @implementation QCocoaColorPanelDelegate
@@ -158,6 +159,11 @@ QT_USE_NAMESPACE
     [super dealloc];
 }
 
+- (void)setResultSet:(BOOL)result
+{
+    mResultSet = result;
+}
+
 - (BOOL)windowShouldClose:(id)window
 {
     Q_UNUSED(window);
@@ -320,7 +326,7 @@ QT_USE_NAMESPACE
             } else {
                 mPriv->colorDialog()->accept();
             }
-        }
+        } 
     }
 }
 
@@ -433,7 +439,7 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
             priv:this];
         [colorPanel setDelegate:static_cast<QCocoaColorPanelDelegate *>(delegate)];
     }
-
+    [delegate setResultSet:false];
     setCocoaPanelColor(initial);
     [static_cast<QCocoaColorPanelDelegate *>(delegate) showColorPanel];
 }
-- 
cgit v0.12


From 57f716aab87ad517ccd6a36bdd5ca8178c561572 Mon Sep 17 00:00:00 2001
From: Kent Hansen <kent.hansen@nokia.com>
Date: Tue, 23 Feb 2010 12:31:10 +0100
Subject: Improve test coverage of QScriptString::toArrayIndex()

Test decimals and scientific notation.
"0.0" is not a valid array index even though it can be converted
to a whole integer, because the number converted back to a string
again is "0", which is different from "0.0". (See ECMA 15.4)
---
 tests/auto/qscriptstring/tst_qscriptstring.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/auto/qscriptstring/tst_qscriptstring.cpp b/tests/auto/qscriptstring/tst_qscriptstring.cpp
index 808b643..ea4a92b 100644
--- a/tests/auto/qscriptstring/tst_qscriptstring.cpp
+++ b/tests/auto/qscriptstring/tst_qscriptstring.cpp
@@ -177,6 +177,12 @@ void tst_QScriptString::toArrayIndex_data()
     QTest::newRow("101a") << QString::fromLatin1("101a") << false << quint32(0xffffffff);
     QTest::newRow("4294967294") << QString::fromLatin1("4294967294") << true << quint32(0xfffffffe);
     QTest::newRow("4294967295") << QString::fromLatin1("4294967295") << false << quint32(0xffffffff);
+    QTest::newRow("0.0") << QString::fromLatin1("0.0") << false << quint32(0xffffffff);
+    QTest::newRow("1.0") << QString::fromLatin1("1.0") << false << quint32(0xffffffff);
+    QTest::newRow("1.5") << QString::fromLatin1("1.5") << false << quint32(0xffffffff);
+    QTest::newRow("1.") << QString::fromLatin1("1.") << false << quint32(0xffffffff);
+    QTest::newRow(".1") << QString::fromLatin1(".1") << false << quint32(0xffffffff);
+    QTest::newRow("1e0") << QString::fromLatin1("1e0") << false << quint32(0xffffffff);
 }
 
 void tst_QScriptString::toArrayIndex()
-- 
cgit v0.12


From 28e3d3516ebe88f7353fde44194aba5b7d1d8710 Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 13:43:50 +0100
Subject: doc:	Added QScopedArrayPointer and corrected QScopedPointer
 snippet.

Task: QTBUG-7766
---
 .../code/src_corelib_tools_qscopedpointer.cpp      |  2 +-
 src/corelib/tools/qscopedpointer.cpp               | 55 ++++++++++++++++++++++
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
index c068ba9..4158388 100644
--- a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp
@@ -128,7 +128,7 @@ private:
 QScopedPointer<int, QScopedPointerArrayDeleter<int> > arrayPointer(new int[42]);
 
 // this QScopedPointer frees its data using free():
-QScopedPointer<int, QScopedPointerPodDeleter<int> > podPointer(reinterpret_cast<int *>(malloc(42)));
+QScopedPointer<int, QScopedPointerPodDeleter> podPointer(reinterpret_cast<int *>(malloc(42)));
 
 // this struct calls "myCustomDeallocator" to delete the pointer
 struct ScopedPointerCustomDeleter
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 12badf0..e7dd769 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -225,4 +225,59 @@ QT_BEGIN_NAMESPACE
   Swap this pointer with \a other.
  */
 
+/*!
+  \class QScopedArrayPointer
+  
+  \brief The QScopedArrayPointer class stores a pointer to a
+  dynamically allocated array of objects, and deletes it upon
+  destruction.
+
+  \since 4.6
+  \reentrant
+  \ingroup misc
+
+  A QScopedArrayPointer is a QScopedPointer that defaults to
+  deleting the object it is pointing to with the delete[] operator. It
+  also features operator[] for convenience, so we can write:
+
+  \code
+    void foo()
+    {
+        QScopedArrayPointer<int> i(new int[10]);
+        i[2] = 42;
+        ...
+        return; // our integer array is now deleted using delete[]
+    }
+  \endcode
+*/
+
+/*!
+    \fn QScopedArrayPointer::QScopedArrayPointer(T *p = 0)
+
+    Constructs this QScopedArrayPointer instance and sets its pointer
+    to \a p.
+*/
+
+/*!
+    \fn T *QScopedArrayPointer::operator[](int i)
+
+    Provides access to entry \a i of the scoped pointer's array of
+    objects.
+
+    If the contained pointer is \c null, behavior is undefined.
+
+    \sa isNull()
+*/
+
+/*!
+    \fn T *QScopedArrayPointer::operator[](int i) const
+
+    Provides access to entry \a i of the scoped pointer's array of
+    objects.
+
+    If the contained pointer is \c null, behavior is undefined.
+
+    \sa isNull()
+*/
+
 QT_END_NAMESPACE
-- 
cgit v0.12


From f6ea3f09eac800109a3a60ea96f7fcbd5d5aa0d4 Mon Sep 17 00:00:00 2001
From: Martin Smith <msmith@trolltech.com>
Date: Tue, 23 Feb 2010 14:57:41 +0100
Subject: doc:	Added indication of default modality value for panels.

Task: QTBUG-7970
---
 src/gui/graphicsview/qgraphicsitem.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index d19a102..bd214e1 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -641,9 +641,16 @@
     are children of a modal panel are not blocked.
 
     The values are:
-    \value NonModal   The panel is not modal and does not block input to other panels.
-    \value PanelModal The panel is modal to a single item hierarchy and blocks input to its parent pane, all grandparent panels, and all siblings of its parent and grandparent panels.
-    \value SceneModal The window is modal to the entire scene and blocks input to all panels.
+    
+    \value NonModal The panel is not modal and does not block input to
+    other panels. This is the default value for panels.
+    
+    \value PanelModal The panel is modal to a single item hierarchy
+    and blocks input to its parent pane, all grandparent panels, and
+    all siblings of its parent and grandparent panels.
+
+    \value SceneModal The window is modal to the entire scene and
+    blocks input to all panels.
 
     \sa QGraphicsItem::setPanelModality(), QGraphicsItem::panelModality(), QGraphicsItem::ItemIsPanel
 */
-- 
cgit v0.12


From 5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a Mon Sep 17 00:00:00 2001
From: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Date: Tue, 23 Feb 2010 14:21:53 +0100
Subject: QLineEdit shows leftovers of edit cursor after clear()

The commit 0568fb9f428a84a344baaa5c53395db4b99f082c introduced this
regression. Make sure that we have text in the lineedit before showing
the cursor.

Task-number: QTBUG-7826
Reviewed-by: Olivier Goffart
---
 src/gui/widgets/qlineedit_p.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp
index 1aa7a2b..2c76a5c 100644
--- a/src/gui/widgets/qlineedit_p.cpp
+++ b/src/gui/widgets/qlineedit_p.cpp
@@ -129,7 +129,7 @@ void QLineEditPrivate::_q_editFocusChange(bool e)
 void QLineEditPrivate::_q_selectionChanged()
 {
     Q_Q(QLineEdit);
-    if (control->preeditAreaText().isEmpty()) {
+    if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) {
         QStyleOptionFrameV2 opt;
         q->initStyleOption(&opt);
         bool showCursor = control->hasSelectedText() ?
-- 
cgit v0.12