summaryrefslogtreecommitdiffstats
path: root/libkpimidentities
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkpimidentities
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-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 'libkpimidentities')
-rw-r--r--libkpimidentities/identity.cpp20
-rw-r--r--libkpimidentities/identity.h10
-rw-r--r--libkpimidentities/identitycombo.cpp16
-rw-r--r--libkpimidentities/identitycombo.h9
-rw-r--r--libkpimidentities/identitymanager.cpp22
-rw-r--r--libkpimidentities/identitymanager.h13
6 files changed, 46 insertions, 44 deletions
diff --git a/libkpimidentities/identity.cpp b/libkpimidentities/identity.cpp
index 62eeba756..0855f8c37 100644
--- a/libkpimidentities/identity.cpp
+++ b/libkpimidentities/identity.cpp
@@ -63,7 +63,7 @@ TQString Signature::rawText( bool * ok ) const
switch ( mType ) {
case Disabled:
if ( ok ) *ok = true;
- return TQString::null;
+ return TQString();
case Inlined:
if ( ok ) *ok = true;
return mText;
@@ -73,7 +73,7 @@ TQString Signature::rawText( bool * ok ) const
return textFromCommand( ok );
};
kdFatal( 5006 ) << "Signature::type() returned unknown value!" << endl;
- return TQString::null; // make compiler happy
+ return TQString(); // make compiler happy
}
TQString Signature::textFromCommand( bool * ok ) const
@@ -83,7 +83,7 @@ TQString Signature::textFromCommand( bool * ok ) const
// handle pathological cases:
if ( mUrl.isEmpty() ) {
if ( ok ) *ok = true;
- return TQString::null;
+ return TQString();
}
// create a shell process:
@@ -104,7 +104,7 @@ TQString Signature::textFromCommand( bool * ok ) const
TQString wmsg = i18n("<qt>Failed to execute signature script<br><b>%1</b>:<br>%2</qt>")
.arg( mUrl ).arg( strerror(rc) );
KMessageBox::error(0, wmsg);
- return TQString::null;
+ return TQString();
}
// no errors:
@@ -126,7 +126,7 @@ TQString Signature::textFromFile( bool * ok ) const
&& TQFileInfo(mUrl).exists()) ) {
kdDebug( 5006 ) << "Signature::textFromFile: non-local URLs are unsupported" << endl;
if ( ok ) *ok = false;
- return TQString::null;
+ return TQString();
}
if ( ok ) *ok = true;
// ### hmm, should we allow other encodings, too?
@@ -139,14 +139,14 @@ TQString Signature::withSeparator( bool * ok ) const
TQString signature = rawText( &internalOK );
if ( !internalOK ) {
if ( ok ) *ok = false;
- return TQString::null;
+ return TQString();
}
if ( ok ) *ok = true;
if ( signature.isEmpty() ) return signature; // don't add a separator in this case
if ( signature.startsWith( TQString::tqfromLatin1("-- \n") ) )
// already have signature separator at start of sig:
return TQString::tqfromLatin1("\n") += signature;
- else if ( signature.find( TQString::tqfromLatin1("\n-- \n") ) != -1 )
+ else if ( signature.tqfind( TQString::tqfromLatin1("\n-- \n") ) != -1 )
// already have signature separator inside sig; don't prepend '\n'
// to improve abusing signatures as templates:
return signature;
@@ -528,7 +528,7 @@ TQString Identity::fullEmailAddr(void) const
TQString result;
- // add DQUOTE's if necessary:
+ // add DTQUOTE's if necessary:
bool needsQuotes=false;
for (unsigned int i=0; i < mFullName.length(); i++) {
if ( specials.tqcontains( mFullName[i] ) )
@@ -643,7 +643,7 @@ TQString Identity::signatureText( bool * ok ) const
// Signature::withSeparator() failed, so we should probably fix the
// cause:
if ( ok ) *ok = false;
- return TQString::null;
+ return TQString();
#if 0 // ### FIXME: error handling
if (mSignatureFile.endsWith("|"))
@@ -654,5 +654,5 @@ TQString Identity::signatureText( bool * ok ) const
}
#endif
- return TQString::null;
+ return TQString();
}
diff --git a/libkpimidentities/identity.h b/libkpimidentities/identity.h
index 9baba4fac..e4d289c2a 100644
--- a/libkpimidentities/identity.h
+++ b/libkpimidentities/identity.h
@@ -125,11 +125,11 @@ public:
}
/** Constructor */
- explicit Identity( const TQString & id=TQString::null,
- const TQString & realName=TQString::null,
- const TQString & emailAddr=TQString::null,
- const TQString & organization=TQString::null,
- const TQString & replyToAddress=TQString::null );
+ explicit Identity( const TQString & id=TQString(),
+ const TQString & realName=TQString(),
+ const TQString & emailAddr=TQString(),
+ const TQString & organization=TQString(),
+ const TQString & replyToAddress=TQString() );
/** Destructor */
~Identity();
diff --git a/libkpimidentities/identitycombo.cpp b/libkpimidentities/identitycombo.cpp
index 55c78e2a6..e1ae08b30 100644
--- a/libkpimidentities/identitycombo.cpp
+++ b/libkpimidentities/identitycombo.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.
@@ -43,8 +43,8 @@
using namespace KPIM;
-IdentityCombo::IdentityCombo( IdentityManager* manager, TQWidget * parent, const char * name )
- : TQComboBox( false, parent, name ), mIdentityManager( manager )
+IdentityCombo::IdentityCombo( IdentityManager* manager, TQWidget * tqparent, const char * name )
+ : TQComboBox( false, tqparent, name ), mIdentityManager( manager )
{
reloadCombo();
reloadUoidList();
@@ -70,7 +70,7 @@ void IdentityCombo::setCurrentIdentity( const TQString & name ) {
if ( idx < 0 ) return;
if ( idx == currentItem() ) return;
- blockSignals( true ); // just in case Qt gets fixed to emit activated() here
+ blockSignals( true ); // just in case TQt gets fixed to emit activated() here
setCurrentItem( idx );
blockSignals( false );
@@ -82,7 +82,7 @@ void IdentityCombo::setCurrentIdentity( uint uoid ) {
if ( idx < 0 ) return;
if ( idx == currentItem() ) return;
- blockSignals( true ); // just in case Qt gets fixed to emit activated() here
+ blockSignals( true ); // just in case TQt gets fixed to emit activated() here
setCurrentItem( idx );
blockSignals( false );
@@ -117,7 +117,7 @@ void IdentityCombo::slotIdentityManagerChanged() {
blockSignals( false );
if ( idx < 0 )
- // apparently our oldIdentity got deleted:
+ // aptqparently our oldIdentity got deleted:
slotEmitChanged( currentItem() );
}
diff --git a/libkpimidentities/identitycombo.h b/libkpimidentities/identitycombo.h
index 0d1985211..b76c6cc89 100644
--- a/libkpimidentities/identitycombo.h
+++ b/libkpimidentities/identitycombo.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.
@@ -50,8 +50,9 @@ class Identity;
class KDE_EXPORT IdentityCombo : public TQComboBox {
Q_OBJECT
+ TQ_OBJECT
public:
- IdentityCombo( IdentityManager* manager, TQWidget * parent=0, const char * name=0 );
+ IdentityCombo( IdentityManager* manager, TQWidget * tqparent=0, const char * name=0 );
TQString currentIdentityName() const;
uint currentIdentity() const;
diff --git a/libkpimidentities/identitymanager.cpp b/libkpimidentities/identitymanager.cpp
index 939cb7042..dd8479d85 100644
--- a/libkpimidentities/identitymanager.cpp
+++ b/libkpimidentities/identitymanager.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.
@@ -66,8 +66,8 @@ static TQCString newDCOPObjectName()
return name;
}
-IdentityManager::IdentityManager( bool readonly, TQObject * parent, const char * name )
- : ConfigManager( parent, name ), DCOPObject( newDCOPObjectName() )
+IdentityManager::IdentityManager( bool readonly, TQObject * tqparent, const char * name )
+ : ConfigManager( tqparent, name ), DCOPObject( newDCOPObjectName() )
{
mReadOnly = readonly;
mConfig = new KConfig( "emailidentities", readonly );
@@ -117,7 +117,7 @@ void IdentityManager::commit()
// find added and changed identities:
for ( TQValueList<Identity>::ConstIterator it = mShadowIdentities.begin() ;
it != mShadowIdentities.end() ; ++it ) {
- TQValueList<uint>::Iterator uoid = seenUOIDs.find( (*it).uoid() );
+ TQValueList<uint>::Iterator uoid = seenUOIDs.tqfind( (*it).uoid() );
if ( uoid != seenUOIDs.end() ) {
const Identity & orig = identityForUoid( *uoid ); // look it up in mIdentities
if ( *it != orig ) {
@@ -326,7 +326,7 @@ Identity & IdentityManager::modifyIdentityForName( const TQString & name )
{
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
if ( (*it).identityName() == name ) return (*it);
- kdWarning( 5006 ) << "IdentityManager::identityForName() used as newFromScratch() tqreplacement!"
+ kdWarning( 5006 ) << "IdentityManager::identityForName() used as newFromScratch() replacement!"
<< "\n name == \"" << name << "\"" << endl;
return newFromScratch( name );
}
@@ -335,7 +335,7 @@ Identity & IdentityManager::modifyIdentityForUoid( uint uoid )
{
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
if ( (*it).uoid() == uoid ) return (*it);
- kdWarning( 5006 ) << "IdentityManager::identityForUoid() used as newFromScratch() tqreplacement!"
+ kdWarning( 5006 ) << "IdentityManager::identityForUoid() used as newFromScratch() replacement!"
<< "\n uoid == \"" << uoid << "\"" << endl;
return newFromScratch( i18n("Unnamed") );
}
@@ -351,7 +351,7 @@ const Identity & IdentityManager::defaultIdentity() const {
bool IdentityManager::setAsDefault( const TQString & name ) {
// First, check if the identity actually exists:
TQStringList names = shadowIdentities();
- if ( names.find( name ) == names.end() ) return false;
+ if ( names.tqfind( name ) == names.end() ) return false;
// Then, change the default as requested:
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
(*it).setIsDefault( (*it).identityName() == name );
@@ -448,7 +448,7 @@ void IdentityManager::createDefaultIdentity() {
emailAddress += '@' + defaultdomain;
}
else {
- emailAddress = TQString::null;
+ emailAddress = TQString();
}
}
}
@@ -488,7 +488,7 @@ int IdentityManager::newUoid()
do {
uoid = kapp->random();
- } while ( usedUOIDs.find( uoid ) != usedUOIDs.end() );
+ } while ( usedUOIDs.tqfind( uoid ) != usedUOIDs.end() );
return uoid;
}
diff --git a/libkpimidentities/identitymanager.h b/libkpimidentities/identitymanager.h
index 4c8587be3..f02cca901 100644
--- a/libkpimidentities/identitymanager.h
+++ b/libkpimidentities/identitymanager.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.
@@ -55,6 +55,7 @@ class IdentityManager : public ConfigManager, public DCOPObject
#undef IdentityManager
{
Q_OBJECT
+// TQ_OBJECT
K_DCOP
public:
@@ -65,7 +66,7 @@ public:
* This means in particular that if there is no identity configured,
* the default identity created here will not be saved.
*/
- IdentityManager( bool readonly = false, TQObject * parent=0, const char * name=0 );
+ IdentityManager( bool readonly = false, TQObject * tqparent=0, const char * name=0 );
virtual ~IdentityManager();
public:
@@ -101,7 +102,7 @@ public:
**/
const Identity & identityForAddress( const TQString & addresses ) const;
- /** @return true if @p addressList tqcontains any of our addresses,
+ /** @return true if @p addressList contains any of our addresses,
false otherwise.
@see #identityForAddress
**/
@@ -177,7 +178,7 @@ public:
Identity & newFromScratch( const TQString & name );
Identity & newFromControlCenter( const TQString & name );
Identity & newFromExisting( const Identity & other,
- const TQString & name=TQString::null );
+ const TQString & name=TQString() );
/** Returns the list of all email addresses (only name@host) from all identities */
TQStringList allEmails() const;