diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /certmanager/lib/tests | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'certmanager/lib/tests')
-rw-r--r-- | certmanager/lib/tests/gnupgviewer.h | 13 | ||||
-rw-r--r-- | certmanager/lib/tests/test.data | 4 | ||||
-rw-r--r-- | certmanager/lib/tests/test_cryptoconfig.cpp | 8 | ||||
-rw-r--r-- | certmanager/lib/tests/test_gnupgprocessbase.cpp | 18 | ||||
-rw-r--r-- | certmanager/lib/tests/test_jobs.cpp | 6 | ||||
-rw-r--r-- | certmanager/lib/tests/test_keygen.cpp | 10 | ||||
-rw-r--r-- | certmanager/lib/tests/test_keygen.h | 9 | ||||
-rw-r--r-- | certmanager/lib/tests/test_keylister.cpp | 14 | ||||
-rw-r--r-- | certmanager/lib/tests/test_keylister.h | 9 | ||||
-rw-r--r-- | certmanager/lib/tests/test_keyselectiondialog.cpp | 6 | ||||
-rw-r--r-- | certmanager/lib/tests/test_verify.cpp | 6 |
11 files changed, 53 insertions, 50 deletions
diff --git a/certmanager/lib/tests/gnupgviewer.h b/certmanager/lib/tests/gnupgviewer.h index bd6af17e8..9d2efd16b 100644 --- a/certmanager/lib/tests/gnupgviewer.h +++ b/certmanager/lib/tests/gnupgviewer.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -44,8 +44,9 @@ class TQStringList; class GnuPGViewer : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - GnuPGViewer( TQWidget * parent=0, const char * name=0 ); + GnuPGViewer( TQWidget * tqparent=0, const char * name=0 ); ~GnuPGViewer(); void setProcess( Kleo::GnuPGProcessBase * process ); @@ -53,12 +54,12 @@ public: private slots: void slotStdout( KProcess *, char *, int ); void slotStderr( KProcess *, char *, int ); - void sloStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); + void slotqStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); void slotProcessExited( KProcess * ); private: Kleo::GnuPGProcessBase * mProcess; - TQString mLastStdout, mLastStderr, mLasStatus; + TQString mLastStdout, mLastStderr, mLastqStatus; }; #endif // __KLEO_TESTS_GNUPGVIEWER_H__ diff --git a/certmanager/lib/tests/test.data b/certmanager/lib/tests/test.data index b4bce1a93..f09481ba5 100644 --- a/certmanager/lib/tests/test.data +++ b/certmanager/lib/tests/test.data @@ -116,7 +116,7 @@ static int status( void * void_ctx, const char * line ) { static int inquire( void * void_ctx, const char * keyword ) { assuan_context_t ctx = (assuan_context_t)void_ctx; assert( ctx ); - const std::map<std::string,std::string>::const_iterator it = inquireData.find( keyword ); + const std::map<std::string,std::string>::const_iterator it = inquireData.tqfind( keyword ); if ( it == inquireData.end() ) return gpg_error( GPG_ERR_UNKNOWN_COMMAND ); @@ -179,7 +179,7 @@ int main( int argc, char * argv[] ) { options.push_back( argv[++optind] ); } else if ( qstrcmp( arg, "--inquire" ) == 0 ) { const std::string inqval = argv[++optind]; - const size_t pos = inqval.find( '=' ); + const size_t pos = inqval.tqfind( '=' ); // ### implement indirection with "@file"... inquireData[inqval.substr( 0, pos )] = inqval.substr( pos+1 ); } else { diff --git a/certmanager/lib/tests/test_cryptoconfig.cpp b/certmanager/lib/tests/test_cryptoconfig.cpp index 964674838..6a8720703 100644 --- a/certmanager/lib/tests/test_cryptoconfig.cpp +++ b/certmanager/lib/tests/test_cryptoconfig.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -312,7 +312,7 @@ int main( int argc, char** argv ) { // Test with query containing a litteral ':' (KURL supports this) // and a ' ' (KURL will escape it, see issue119) lst << KURL( "ldap://foo:389/?a:b c" ); - lst << KURL( "ldap://server:389/?a%3db,c=DE" ); // the query tqcontains a litteral ',' + lst << KURL( "ldap://server:389/?a%3db,c=DE" ); // the query contains a litteral ',' //cout << " trying to set: " << lst.toStringList().join(", ").local8Bit() << endl; assert( lst[0].query() == "?b" ); assert( lst[1].query() == "?a:b%20c" ); // see, the space got escaped diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp index daccda6de..c3ec0c33b 100644 --- a/certmanager/lib/tests/test_gnupgprocessbase.cpp +++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -46,8 +46,8 @@ #include <tqstringlist.h> -GnuPGViewer::GnuPGViewer( TQWidget * parent, const char * name ) - : TQTextEdit( parent, name ), mProcess( 0 ) +GnuPGViewer::GnuPGViewer( TQWidget * tqparent, const char * name ) + : TQTextEdit( tqparent, name ), mProcess( 0 ) { setTextFormat( LogText ); setMaxLogLines( 10000 ); @@ -69,7 +69,7 @@ void GnuPGViewer::setProcess( Kleo::GnuPGProcessBase * process ) { connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotStderr(KProcess*,char*,int)) ); connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), - TQT_SLOT(sloStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); + TQT_SLOT(slotqStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); } static TQStringList split( char * buffer, int buflen, TQString & old ) { @@ -79,7 +79,7 @@ static TQStringList split( char * buffer, int buflen, TQString & old ) { if ( l.empty() ) return l; if ( str.endsWith( "\n" ) ) { - old = TQString::null; + old = TQString(); } else { old = l.back(); l.pop_back(); @@ -102,14 +102,14 @@ void GnuPGViewer::slotStderr( KProcess *, char * buffer, int buflen ) { for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) append( "<b>stderr: " + escape( *it ) + "</b>" ); } -void GnuPGViewer::sloStatus( Kleo::GnuPGProcessBase *, const TQString & type, const TQStringList & args ) { +void GnuPGViewer::slotqStatus( Kleo::GnuPGProcessBase *, const TQString & type, const TQStringList & args ) { append( "<b><font color=\"red\">status: " + escape( type + ' ' + args.join( " " ) ) + "</font></b>" ); } void GnuPGViewer::slotProcessExited( KProcess * proc ) { if ( !proc ) return; if ( proc->normalExit() ) - append( TQString( "<b>Process exit: return code %1</b>" ).arg ( proc->exiStatus() ) ); + append( TQString( "<b>Process exit: return code %1</b>" ).arg ( proc->exitqStatus() ) ); else append( "<b>Process exit: killed</b>" ); } diff --git a/certmanager/lib/tests/test_jobs.cpp b/certmanager/lib/tests/test_jobs.cpp index dfa17a450..95b8dcc97 100644 --- a/certmanager/lib/tests/test_jobs.cpp +++ b/certmanager/lib/tests/test_jobs.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. diff --git a/certmanager/lib/tests/test_keygen.cpp b/certmanager/lib/tests/test_keygen.cpp index 7a751bc1d..090c3f3ae 100644 --- a/certmanager/lib/tests/test_keygen.cpp +++ b/certmanager/lib/tests/test_keygen.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -69,8 +69,8 @@ static const int numKeyParams = sizeof keyParams / sizeof *keyParams; static const char * protocol = 0; -KeyGenerator::KeyGenerator( TQWidget * parent, const char * name, WFlags ) - : KDialogBase( parent, name, true, "KeyGenerationJob test", +KeyGenerator::KeyGenerator( TQWidget * tqparent, const char * name, WFlags ) + : KDialogBase( tqparent, name, true, "KeyGenerationJob test", Close|User1, User1, true, KGuiItem( "Create" ) ) { TQWidget * w = new TQWidget( this ); diff --git a/certmanager/lib/tests/test_keygen.h b/certmanager/lib/tests/test_keygen.h index f066756c5..44c075803 100644 --- a/certmanager/lib/tests/test_keygen.h +++ b/certmanager/lib/tests/test_keygen.h @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -45,8 +45,9 @@ class TQLineEdit; class KeyGenerator : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KeyGenerator( TQWidget * parent=0, const char * name=0, WFlags f=0 ); + KeyGenerator( TQWidget * tqparent=0, const char * name=0, WFlags f=0 ); ~KeyGenerator(); public slots: diff --git a/certmanager/lib/tests/test_keylister.cpp b/certmanager/lib/tests/test_keylister.cpp index 1f032bb17..212d0228f 100644 --- a/certmanager/lib/tests/test_keylister.cpp +++ b/certmanager/lib/tests/test_keylister.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -68,7 +68,7 @@ namespace { case 3: return "Serial"; case 4: return "Protocol"; case 5: return "Validity"; - default: return TQString::null; + default: return TQString(); } } @@ -86,13 +86,13 @@ namespace { case 3: return key.issuerSerial(); case 4: return key.protocolAsString(); case 5: return TQChar( key.userID(0).validityAsString() ); - default: return TQString::null; + default: return TQString(); } } } -CertListView::CertListView( TQWidget * parent, const char * name, WFlags f ) - : Kleo::KeyListView( new TestColumnStrategy(), 0, parent, name, f ) +CertListView::CertListView( TQWidget * tqparent, const char * name, WFlags f ) + : Kleo::KeyListView( new TestColumnStrategy(), 0, tqparent, name, f ) { setHierarchical( true ); setRootIsDecorated( true ); diff --git a/certmanager/lib/tests/test_keylister.h b/certmanager/lib/tests/test_keylister.h index 23cd99e3e..6af935f92 100644 --- a/certmanager/lib/tests/test_keylister.h +++ b/certmanager/lib/tests/test_keylister.h @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -41,8 +41,9 @@ namespace GpgME { class CertListView : public Kleo::KeyListView { Q_OBJECT + TQ_OBJECT public: - CertListView( TQWidget * parent=0, const char * name=0, WFlags f=0 ); + CertListView( TQWidget * tqparent=0, const char * name=0, WFlags f=0 ); public slots: void slotResult( const GpgME::KeyListResult & result ); diff --git a/certmanager/lib/tests/test_keyselectiondialog.cpp b/certmanager/lib/tests/test_keyselectiondialog.cpp index 1e3794bc6..f4c574da5 100644 --- a/certmanager/lib/tests/test_keyselectiondialog.cpp +++ b/certmanager/lib/tests/test_keyselectiondialog.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. diff --git a/certmanager/lib/tests/test_verify.cpp b/certmanager/lib/tests/test_verify.cpp index cb5db396a..153c62b0a 100644 --- a/certmanager/lib/tests/test_verify.cpp +++ b/certmanager/lib/tests/test_verify.cpp @@ -18,11 +18,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. |