Index: trunk/src/gui/widgets/qdatetimeedit.cpp
===================================================================
--- trunk/src/gui/widgets/qdatetimeedit.cpp	(revision 5)
+++ trunk/src/gui/widgets/qdatetimeedit.cpp	(revision 561)
@@ -1,6 +1,7 @@
-/****************************************************************************)
+/****************************************************************************
 **
 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
 **
 ** This file is part of the QtGui module of the Qt Toolkit.
@@ -21,8 +22,7 @@
 ** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** 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.
 **
 ** GNU General Public License Usage
@@ -34,6 +34,6 @@
 ** met: http://www.gnu.org/copyleft/gpl.html.
 **
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
 ** $QT_END_LICENSE$
 **
@@ -76,5 +76,5 @@
 
   \ingroup basicwidgets
-  \mainclass
+
 
   QDateTimeEdit allows the user to edit dates by using the keyboard or
@@ -221,4 +221,7 @@
   \brief the QDateTime that is set in the QDateTimeEdit
 
+  When setting this property the timespec of the QDateTimeEdit remains the same
+  and the timespec of the new QDateTime is ignored.
+
   By default, this property contains a date that refers to January 1,
   2000 and a time of 00:00:00 and 0 milliseconds.
@@ -240,5 +243,5 @@
         if (!(d->sections & DateSections_Mask))
             setDateRange(datetime.date(), datetime.date());
-        d->setValue(QVariant(datetime), EmitIfChanged);
+        d->setValue(QDateTime(datetime.date(), datetime.time(), d->spec), EmitIfChanged);
     }
 }
@@ -933,7 +936,4 @@
     \brief the current timespec used by the date time edit.
     \since 4.4
-
-    All dates/passed to the date time edit will be converted to this
-    timespec.
 */
 
@@ -1087,8 +1087,5 @@
                 //hide cursor
                 d->edit->d_func()->setCursorVisible(false);
-                if (d->edit->d_func()->cursorTimer > 0)
-                    killTimer(d->edit->d_func()->cursorTimer);
-                d->edit->d_func()->cursorTimer = 0;
-
+                d->edit->d_func()->control->setCursorBlinkPeriod(0);
                 d->setSelected(0);
             }
@@ -1111,8 +1108,5 @@
             //hide cursor
             d->edit->d_func()->setCursorVisible(false);
-            if (d->edit->d_func()->cursorTimer > 0)
-                killTimer(d->edit->d_func()->cursorTimer);
-            d->edit->d_func()->cursorTimer = 0;
-
+            d->edit->d_func()->control->setCursorBlinkPeriod(0);
             d->setSelected(0);
             oldCurrent = 0;
@@ -1127,21 +1121,23 @@
     case Qt::Key_Right:
         if (event->key() == Qt::Key_Left || event->key() == Qt::Key_Right) {
+            if (
 #ifdef QT_KEYPAD_NAVIGATION
-            if (!QApplication::keypadNavigationEnabled() || !hasEditFocus()) {
-                select = false;
-                break;
-            }
-#else
-            if (!(event->modifiers() & Qt::ControlModifier)) {
+                QApplication::keypadNavigationEnabled() && !hasEditFocus()
+                || !QApplication::keypadNavigationEnabled() &&
+#endif
+                !(event->modifiers() & Qt::ControlModifier)) {
                 select = false;
                 break;
             }
 #ifdef Q_WS_MAC
-            else {
+            else
+#ifdef QT_KEYPAD_NAVIGATION
+                if (!QApplication::keypadNavigationEnabled())
+#endif
+            {
                 select = (event->modifiers() & Qt::ShiftModifier);
                 break;
             }
 #endif
-#endif // QT_KEYPAD_NAVIGATION
         }
         // else fall through
@@ -1511,5 +1507,5 @@
 
   \ingroup basicwidgets
-  \mainclass
+
 
   Many of the properties and functions provided by QTimeEdit are implemented in
@@ -1573,5 +1569,5 @@
 
   \ingroup basicwidgets
-  \mainclass
+
 
   Many of the properties and functions provided by QDateEdit are implemented in
@@ -1648,5 +1644,4 @@
     currentSectionIndex = FirstSectionIndex;
 
-    layoutDirection = QApplication::layoutDirection();
     first.type = FirstSection;
     last.type = LastSection;
@@ -1935,5 +1930,4 @@
 /*!
   \internal
-  \reimp
 */
 
@@ -1946,5 +1940,4 @@
 /*!
   \internal
-  \reimp
 
   This function's name is slightly confusing; it is not to be confused
@@ -2104,5 +2097,4 @@
 /*!
   \internal
-  \reimp
 */
 
@@ -2134,5 +2126,4 @@
 /*!
   \internal
-  \reimp
 */
 
@@ -2279,4 +2270,5 @@
     optCombo.init(this);
     optCombo.editable = true;
+	optCombo.frame = opt.frame;
     optCombo.subControls = opt.subControls;
     optCombo.activeSubControls = opt.activeSubControls;
@@ -2391,4 +2383,5 @@
 #endif
     updateTimeSpec();
+    q->setInputMethodHints(Qt::ImhPreferNumbers);
     setLayoutItemMargins(QStyle::SE_DateTimeEditLayoutItem);
 }
