OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.116 and 1.117
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.116 -> 1.117

--- as_slot.cpp  2003/02/08 18:10:09     1.116
+++ as_slot.cpp  2003/02/11 14:19:57     1.117
@@ -871,7 +871,6 @@
 //        QRegExp Shorten("/(\\w+)$");    // For stripping prefix off the current task
 //        Texttask.remove(0, Shorten.search(Texttask) + 1); // Strip leading slash
 
-        m_pAmount->setText(Textamount);
         m_pRemark->setText(Textremark);
         m_pTasks->setCurrentText(Texttask);
 
@@ -902,12 +901,12 @@
         // Amount time not suitable for empty string text
         if (Textamount == ".") {
             int nDifference = m_pStarttime->time().secsTo(m_pEndtime->time());
-            m_pAmount->setText(QTime(0, 0).addSecs(nDifference).toString("hh:mm"));
+            m_pAmount->setTime(QTime(0, 0).addSecs(nDifference));
         }
         else if (Textamount.isEmpty())
-            m_pAmount->setText(QString("00:00"));
+            m_pAmount->setTime(QTime::QTime(0, 0));
         else
-            m_pAmount->setText(Textamount);
+            m_pAmount->setTime(QTime::fromString(Textamount, Qt::ISODate));
     }
 }
 
@@ -1055,10 +1054,9 @@
 //
 // Update the current amount column item
 //
-void Titraqform::updateAmount(const QString &Amountup)
+void Titraqform::updateAmount(const QTime &Amountup)
 {
-    // Ignore incoming data and use widget managed data because its easier
-    m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->text());
+    m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, Amountup.toString("hh:mm"));
 }
 
 //
@@ -1094,7 +1092,7 @@
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, m_pDateedit->date().toString(Qt::ISODate));
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXSTART, m_pStarttime->time().toString(Qt::ISODate));
     m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXFINISH, m_pEndtime->time().toString(Qt::ISODate));
-    m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->text());
+    m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXAMOUNT, m_pAmount->time().toString(Qt::ISODate));
 
     // Specially handle task fields
     pTask = static_cast<RtTableItem *>(m_pMaintable->item(m_pMaintable->currentRow(), TITRAQ_IDXTASK));

CVSTrac 2.0.1