Correct NULL pointer test to allow to properly build line data.

Mon, 15 Dec 2008 15:31:10 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 15 Dec 2008 15:31:10 +0100
changeset 11
d926203bd2a8
parent 10
579d467531cc
child 12
ceb4ba3d2d00

Correct NULL pointer test to allow to properly build line data.

as_dataop.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/as_dataop.cpp	Mon Dec 15 15:16:37 2008 +0100
     1.2 +++ b/as_dataop.cpp	Mon Dec 15 15:31:10 2008 +0100
     1.3 @@ -397,45 +397,45 @@
     1.4      // Linewise save from the main table date, time, account, and others
     1.5      for (int nIter = 0; nIter < nRows; nIter++) {
     1.6          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXUSER);      // Load user field text
     1.7 -        if (Tempfield.isNull())
     1.8 +        if (!Tempfield.isNull())
     1.9              Tstream << Tempfield;                                   // Save user field text
    1.10  
    1.11          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXGUID);      // Load GUID field text
    1.12 -        if (Tempfield.isNull())
    1.13 +        if (!Tempfield.isNull())
    1.14              Tstream << trUtf8(" ") << Tempfield;                    // Save GUID field text
    1.15  
    1.16          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXCRC);       // Load CRC field text
    1.17          Tempfield.remove("0x");
    1.18 -        if (Tempfield.isNull())
    1.19 +        if (!Tempfield.isNull())
    1.20              Tstream << trUtf8(" ") << Tempfield;                    // Save CRC field text
    1.21  
    1.22          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREV);       // Load rev field text
    1.23 -        if (Tempfield.isNull())
    1.24 +        if (!Tempfield.isNull())
    1.25              Tstream << trUtf8(" ") << Tempfield;                    // Save rev field text
    1.26  
    1.27          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXDATE);      // Load date field text
    1.28 -        if (Tempfield.isNull())
    1.29 +        if (!Tempfield.isNull())
    1.30              Tstream << trUtf8(" ") << Tempfield;                    // Save date field text
    1.31  
    1.32          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXSTART);     // Load start field text
    1.33 -        if (Tempfield.isNull())
    1.34 +        if (!Tempfield.isNull())
    1.35              Tstream << trUtf8(" ") << Tempfield;                    // Save start field text
    1.36  
    1.37          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXFINISH);    // Load end field text
    1.38 -        if (Tempfield.isNull())
    1.39 +        if (!Tempfield.isNull())
    1.40              Tstream << trUtf8(" ") << Tempfield;                    // Save end field text
    1.41  
    1.42          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXAMOUNT);    // Load amount field text
    1.43 -        if (Tempfield.isNull())
    1.44 +        if (!Tempfield.isNull())
    1.45              Tstream << trUtf8(" ") << Tempfield;                    // Save amount
    1.46  
    1.47          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXTASK);      // Load acct field text
    1.48 -        if (Tempfield.isNull())
    1.49 +        if (!Tempfield.isNull())
    1.50              Tstream << trUtf8(" ") << Tempfield;                    // Save acct field text
    1.51  
    1.52          Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXREMARK);    // Load remark field text
    1.53          Tstream << trUtf8(" \"");                                   // Save beginning double quote
    1.54 -        if (Tempfield.isNull()) {
    1.55 +        if (!Tempfield.isNull()) {
    1.56              Strsearch = QRegExp::escape(Tempfield);                 // Incoming string escaped
    1.57              Stripper.search(Strsearch);
    1.58              Tempfield.truncate(Stripper.pos());                     // Cut off whitespace

mercurial