Check-in Number:
|
3848 | |
Date: |
2002-Dec-06 16:40:50 (local)
2002-Dec-06 15:40:50 (UTC) |
User: | ms |
Branch: | |
Comment: |
Strip trailing whitespace from remark field on save operations. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/TODO 1.34 -> 1.35
--- TODO 2002/12/05 18:03:53 1.34
+++ TODO 2002/12/06 15:40:50 1.35
@@ -35,6 +35,7 @@
Remove extremely stupid as_uuid logic in favor of built in QUuid class!
Krass date block data shading keyed to sort function
Does resetting data clean make sense after closeEvent?
+Change default config location to homedir, with --confgen option
Beim Editmodus
---------------
|
|
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;
|
|