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 /kode/kodemain.cpp | |
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 'kode/kodemain.cpp')
-rw-r--r-- | kode/kodemain.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kode/kodemain.cpp b/kode/kodemain.cpp index 6542c2881..5d01cefa6 100644 --- a/kode/kodemain.cpp +++ b/kode/kodemain.cpp @@ -66,7 +66,7 @@ static const KCmdLineOptions options[] = { "filename <name>", I18N_NOOP("Name of file"), 0 }, { "namespace <name>", I18N_NOOP("Namespace"), 0 }, { "warning", I18N_NOOP("Create warning about code generation"), 0 }, - { "qt-exception", I18N_NOOP("Add Qt exception to GPL"), 0 }, + { "qt-exception", I18N_NOOP("Add TQt exception to GPL"), 0 }, { "singleton", I18N_NOOP("Create a singleton class"), 0 }, { "protocol", I18N_NOOP("kioslave protocol"), 0 }, { "+[filename]", I18N_NOOP("Source code file name"), 0 }, @@ -167,17 +167,17 @@ int addProperty( KCmdLineArgs *args ) // out += line + "\n"; switch( state ) { case FindClass: -// if ( line.find( TQRegExp( className ) ) >= 0 ) { - if ( line.find( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { +// if ( line.tqfind( TQRegExp( className ) ) >= 0 ) { + if ( line.tqfind( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { kdDebug() << " FOUND CLASS" << endl; state = FindConstructor; } break; case FindConstructor: - if ( line.find( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { + if ( line.tqfind( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { kdDebug() << " FOUND CONSTRUCTOR" << endl; out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); state = FindProperties; } break; @@ -190,7 +190,7 @@ int addProperty( KCmdLineArgs *args ) kdDebug() << "Function: " << function << endl; if ( function == className || function == "~" + className ) { out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); } else { if ( function.startsWith( "set" ) ) { mutator = function.mid( 3 ); @@ -200,7 +200,7 @@ int addProperty( KCmdLineArgs *args ) accessor = function; kdDebug() << "ACCESSOR: " << accessor << endl; out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); } else { kdDebug() << "CREATE PROPERTY" << endl; out += readAheadPrevious; @@ -212,13 +212,13 @@ int addProperty( KCmdLineArgs *args ) } } } - } else if ( line.find( TQRegExp( "\\s*protected" ) ) >= 0 ) { + } else if ( line.tqfind( TQRegExp( "\\s*protected" ) ) >= 0 ) { state = FindPrivate; - } else if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { + } else if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { addPropertyFunctions( out, type, name ); out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); addPropertyVariable( out, type, name ); state = Finish; } else { @@ -227,7 +227,7 @@ int addProperty( KCmdLineArgs *args ) addPropertyFunctions( out, type, name ); out += "\n"; out += line + "\n"; - readAhead = TQString::null; + readAhead = TQString(); } state = FindVariables; } @@ -235,10 +235,10 @@ int addProperty( KCmdLineArgs *args ) } break; case FindPrivate: - if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { + if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); addPropertyVariable( out, type, name ); state = Finish; } else { @@ -248,9 +248,9 @@ int addProperty( KCmdLineArgs *args ) break; case FindVariables: { - if ( line.find( "m" + accessor.lower(), 0, false ) >= 0 ) { + if ( line.tqfind( "m" + accessor.lower(), 0, false ) >= 0 ) { out += readAhead; - readAhead = TQString::null; + readAhead = TQString(); addPropertyVariable( out, type, name ); state = Finish; } @@ -372,9 +372,9 @@ int create( KCmdLineArgs *args ) authorEmail = a.preferredEmail(); } else { KABC::Addressee::List as = - KABC::StdAddressBook::self()->tqfindByEmail( authorEmail ); + KABC::StdAddressBook::self()->findByEmail( authorEmail ); if ( as.isEmpty() ) { - kdDebug() << "Unable to find '" << authorEmail << "' in address book." + kdDebug() << "Unable to tqfind '" << authorEmail << "' in address book." << endl; } else { a = as.first(); @@ -390,7 +390,7 @@ int create( KCmdLineArgs *args ) KODE::License l; if ( args->isSet( "gpl" ) ) l = KODE::License( KODE::License::GPL ); if ( args->isSet( "lgpl" ) ) l = KODE::License( KODE::License::LGPL ); - l.setQtException( args->isSet( "qt-exception" ) ); + l.setTQtException( args->isSet( "qt-exception" ) ); file.setLicense( l ); file.setNameSpace( args->getOption( "namespace" ) ); @@ -587,7 +587,7 @@ int create( KCmdLineArgs *args ) TQFileInfo fi( protocolFilename ); protocolFilename = fi.absFilePath(); - KSaveFile::backupFile( protocolFilename, TQString::null, ".backup" ); + KSaveFile::backupFile( protocolFilename, TQString(), ".backup" ); TQFile::remove( protocolFilename ); |