OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_dataop.cpp 1.19 -> 1.20

--- as_dataop.cpp        2002/12/12 18:48:16     1.19
+++ as_dataop.cpp        2002/12/13 11:46:38     1.20
@@ -42,6 +42,8 @@
 #include "as_gfx/staterr.xpm"   // static const char *s_kpcStaterror_xpm[]
 #include "as_gfx/statwrn.xpm"   // static const char *s_kpcStatwarn_xpm[]
 
+#include <iostream>
+
 //
 // Convenience method to load accounting data from a file
 //
@@ -71,6 +73,10 @@
     QString Line;       // Used for linewise editing and whitespace eating
     QString Bitbucket;  // Used for null device until we find a better way
 
+    QPixmap Statokay(s_kpcStatokay_xpm);
+    QPixmap Statwarn(s_kpcStatwarn_xpm);
+    QPixmap Staterror(s_kpcStaterror_xpm);
+
     // Strip out extra line feeds at stream start
     while (Line.isEmpty() && !Tstream.atEnd())
         Line = Tstream.readLine();
@@ -157,13 +163,19 @@
 
         Asline.skipWhiteSpace();    // Remove whitespaces
         Remark = Asline.read();     // Copy the remark field
+
+        // Get rid of surrounding double quotes
+        QRegExp Quoted("\"(.*)\"$");
+        Quoted.search(Remark);
+        Remark = Quoted.cap(Quoted.numCaptures());
+
         if (!Remark.isEmpty())
             m_pMaintable->setText(nIter, TITRAQ_IDXREMARK, Remark);
 
         if (bValid) // Show a bitmap to signal valid or error state
-            m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStatokay_xpm));
+            m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Statokay);
         else
-            m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, QPixmap(s_kpcStaterror_xpm));
+            m_pMaintable->setPixmap(nIter, TITRAQ_IDXSTATUS, Staterror);
 
         // Insert a line number dynamically
         m_pMaintable->setText(nIter, TITRAQ_IDXLINE, (QString::number(nIter)).rightJustify(4, QChar('0')));
@@ -259,7 +271,7 @@
             Strsearch = QRegExp::escape(Tempfield);                 // Incoming string escaped
             Stripper.search(Strsearch);
             Tempfield.truncate(Stripper.pos());
-            Tstream << trUtf8(" ") << Tempfield;                    // Save remark field text
+            Tstream << trUtf8(" \"") << Tempfield << trUtf8("\"");  // Save remark field text
         }
 
         Tstream << endl;                                            // Append a newline

CVSTrac 2.0.1