[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/kleopatra/crypto
From:       Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date:       2008-05-06 16:15:04
Message-ID: 1210090504.503533.14110.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 804620 by osterfeld:

do not kleo_assert in overview(), as the error is caught earlier now and the \
exception was not caught anyway assert in the ctors

 M  +7 -9      signencryptfilestask.cpp  


--- trunk/KDE/kdepim/kleopatra/crypto/signencryptfilestask.cpp #804619:804620
@@ -96,12 +96,16 @@
     public:
         SignEncryptFilesResult( const SigningResult & sr, const QString & input, \
                const QString & output, bool inputRemoved, bool outputCreated )
             : Task::Result(), m_sresult( sr ), m_inputLabel( input ), m_outputLabel( \
                output ), m_inputRemoved( inputRemoved ), m_outputCreated( \
                outputCreated ) {
-            
+            assert( !m_sresult.isNull() );
         }
         SignEncryptFilesResult( const EncryptionResult & er, const QString & input, \
                const QString & output, bool inputRemoved, bool outputCreated  )
-            : Task::Result(), m_eresult( er ), m_inputLabel( input ), m_outputLabel( \
output ), m_inputRemoved( inputRemoved ), m_outputCreated( outputCreated ) {} +       \
: Task::Result(), m_eresult( er ), m_inputLabel( input ), m_outputLabel( output ), \
m_inputRemoved( inputRemoved ), m_outputCreated( outputCreated ) { +            \
assert( !m_eresult.isNull() ); +        }
         SignEncryptFilesResult( const SigningResult & sr, const EncryptionResult & \
er, const QString & input, const QString & output, bool inputRemoved, bool \
                outputCreated )
-            : Task::Result(), m_sresult( sr ), m_eresult( er ), m_inputLabel( input \
), m_outputLabel( output ), m_inputRemoved( inputRemoved ), m_outputCreated( \
outputCreated ) {} +            : Task::Result(), m_sresult( sr ), m_eresult( er ), \
m_inputLabel( input ), m_outputLabel( output ), m_inputRemoved( inputRemoved ), \
m_outputCreated( outputCreated ) { +            assert( !m_sresult.isNull() || \
!m_eresult.isNull() ); +        }
 
         /* reimp */ QString overview() const;
         /* reimp */ QString details() const;
@@ -473,13 +477,7 @@
 }
 
 QString SignEncryptFilesResult::overview() const {
-    const bool sign = !m_sresult.isNull();
-    const bool encrypt = !m_eresult.isNull();
- 
-    kleo_assert( !m_sresult.isNull() || !m_eresult.isNull() );
-
     const QString files = formatInputOutputLabel( m_inputLabel, m_outputLabel, \
                m_inputRemoved, !m_outputCreated );
-
     return files + ": " + makeOverview( makeResultOverview( m_sresult, m_eresult ) \
);  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic