ossp-pkg/as/as-gui/as_dataop.cpp 1.15 -> 1.16
--- as_dataop.cpp 2002/12/05 12:37:18 1.15
+++ as_dataop.cpp 2002/12/06 15:40:50 1.16
@@ -170,8 +170,10 @@
void Titraqform::saveData(QTextStream &Tstream)
{
const int nRows = m_pMaintable->numRows(); // Max rows used in loop
- QString Tempfield; // Current field string
bool bValid = true; // Warn on invalid data
+ QString Tempfield; // Current field string
+ QString Strsearch; // String to strip search
+ QRegExp Stripper("\\s*$"); // Pattern to strip off
// Linewise save from the main table date, time, account, and others
for (int nIter = 0; nIter < nRows; nIter++) {
@@ -209,8 +211,12 @@
bValid = false;
Tempfield = m_pMaintable->text(nIter, 5); // Load remark field text
- if (Tempfield != NULL)
+ if (Tempfield != NULL) {
+ Strsearch = QRegExp::escape(Tempfield); // Incoming string escaped
+ Stripper.search(Strsearch);
+ Tempfield.truncate(Stripper.pos());
Tstream << trUtf8(" ") << Tempfield; // Save remark field text
+ }
else
bValid = false;
|
|