summaryrefslogtreecommitdiffstats
path: root/kmail/accountdialog.cpp
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 /kmail/accountdialog.cpp
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 'kmail/accountdialog.cpp')
-rw-r--r--kmail/accountdialog.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp
index 51c729772..4dab221bc 100644
--- a/kmail/accountdialog.cpp
+++ b/kmail/accountdialog.cpp
@@ -85,7 +85,7 @@ namespace KMail {
class ProcmailRCParser
{
public:
- ProcmailRCParser(TQString fileName = TQString::null);
+ ProcmailRCParser(TQString fileName = TQString());
~ProcmailRCParser();
TQStringList getLockFilesList() const { return mLockFiles; }
@@ -133,7 +133,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname)
int commentPos = -1;
- if( (commentPos = s.find('#')) > -1 ) {
+ if( (commentPos = s.tqfind('#')) > -1 ) {
// get rid of trailing comment
s.truncate(commentPos);
s = s.stripWhiteSpace();
@@ -143,7 +143,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname)
processGlobalLock(s);
} else if( lockFileLocal.search(s) != -1 ) {
processLocalLock(s);
- } else if( int i = s.find('=') ) {
+ } else if( int i = s.tqfind('=') ) {
processVariableSetting(s,i);
}
}
@@ -172,7 +172,7 @@ ProcmailRCParser::~ProcmailRCParser()
void
ProcmailRCParser::processGlobalLock(const TQString &s)
{
- TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace());
+ TQString val = expandVars(s.mid(s.tqfind('=') + 1).stripWhiteSpace());
if ( !mLockFiles.tqcontains(val) )
mLockFiles << val;
}
@@ -190,7 +190,7 @@ ProcmailRCParser::processLocalLock(const TQString &s)
// user specified a lockfile, so process it
//
val = expandVars(val);
- if( val[0] != '/' && mVars.find("MAILDIR") )
+ if( val[0] != '/' && mVars.tqfind("MAILDIR") )
val.insert(0, *(mVars["MAILDIR"]) + '/');
} // else we'll deduce the lockfile name one we
// get the spoolfile name
@@ -211,7 +211,7 @@ ProcmailRCParser::processLocalLock(const TQString &s)
line = expandVars(line);
// prepend default MAILDIR if needed
- if( line[0] != '/' && mVars.find("MAILDIR") )
+ if( line[0] != '/' && mVars.tqfind("MAILDIR") )
line.insert(0, *(mVars["MAILDIR"]) + '/');
// now we have the spoolfile name
@@ -224,7 +224,7 @@ ProcmailRCParser::processLocalLock(const TQString &s)
val = line;
// append lock extension
- if( mVars.find("LOCKEXT") )
+ if( mVars.tqfind("LOCKEXT") )
val += *(mVars["LOCKEXT"]);
else
val += ".lock";
@@ -248,7 +248,7 @@ ProcmailRCParser::processVariableSetting(const TQString &s, int eqPos)
mVars.insert(varName.latin1(), new TQString(varValue));
}
-QString
+TQString
ProcmailRCParser::expandVars(const TQString &s)
{
if( s.isEmpty()) return s;
@@ -268,8 +268,8 @@ ProcmailRCParser::expandVars(const TQString &s)
AccountDialog::AccountDialog( const TQString & caption, KMAccount *account,
- TQWidget *parent, const char *name, bool modal )
- : KDialogBase( parent, name, modal, caption, Ok|Cancel|Help, Ok, true ),
+ TQWidget *tqparent, const char *name, bool modal )
+ : KDialogBase( tqparent, name, modal, caption, Ok|Cancel|Help, Ok, true ),
mAccount( account ),
mServerTest( 0 ),
mCurCapa( AllCapa ),
@@ -357,11 +357,11 @@ void AccountDialog::makeLocalAccountPage()
topLayout->addWidget( choose, 3, 2 );
TQButtonGroup *group = new TQButtonGroup(i18n("Locking Method"), page );
- group->setColumnLayout(0, Qt::Horizontal);
+ group->setColumnLayout(0, TQt::Horizontal);
group->tqlayout()->setSpacing( 0 );
group->tqlayout()->setMargin( 0 );
TQGridLayout *groupLayout = new TQGridLayout( group->tqlayout() );
- groupLayout->tqsetAlignment( Qt::AlignTop );
+ groupLayout->tqsetAlignment( TQt::AlignTop );
groupLayout->setSpacing( 6 );
groupLayout->setMargin( 11 );
@@ -778,7 +778,7 @@ void AccountDialog::makePopAccountPage()
vlay->addSpacing( KDialog::spacingHint() );
- mPop.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal,
+ mPop.encryptionGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Encryption"), page2 );
mPop.encryptionNone =
new TQRadioButton( i18n("&None"), mPop.encryptionGroup );
@@ -792,7 +792,7 @@ void AccountDialog::makePopAccountPage()
TQT_SLOT(slotPopEncryptionChanged(int)));
vlay->addWidget( mPop.encryptionGroup );
- mPop.authGroup = new TQButtonGroup( 1, Qt::Horizontal,
+ mPop.authGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Authentication Method"), page2 );
mPop.authUser = new TQRadioButton( i18n("Clear te&xt") , mPop.authGroup,
"auth clear text" );
@@ -1093,7 +1093,7 @@ void AccountDialog::makeImapAccountPage( bool connected )
vlay->addSpacing( KDialog::spacingHint() );
- mImap.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal,
+ mImap.encryptionGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Encryption"), page2 );
mImap.encryptionNone =
new TQRadioButton( i18n("&None"), mImap.encryptionGroup );
@@ -1107,7 +1107,7 @@ void AccountDialog::makeImapAccountPage( bool connected )
TQT_SLOT(slotImapEncryptionChanged(int)));
vlay->addWidget( mImap.encryptionGroup );
- mImap.authGroup = new TQButtonGroup( 1, Qt::Horizontal,
+ mImap.authGroup = new TQButtonGroup( 1, TQt::Horizontal,
i18n("Authentication Method"), page2 );
mImap.authUser = new TQRadioButton( i18n("Clear te&xt"), mImap.authGroup );
mImap.authLogin = new TQRadioButton( i18n("Please translate this "
@@ -1490,7 +1490,7 @@ void AccountDialog::slotPipeliningClicked()
"Supports\" button at the bottom of the dialog;\n"
"if your server does not announce it, but you want more speed, then "
"you should do some testing first by sending yourself a batch "
- "of mail and downloading it."), TQString::null,
+ "of mail and downloading it."), TQString(),
"pipelining");
}
@@ -1764,7 +1764,7 @@ void AccountDialog::checkHighest( TQButtonGroup *btnGroup )
{
kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl;
for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) {
- TQButton * btn = btnGroup->find( i );
+ TQButton * btn = btnGroup->tqfind( i );
if ( btn && btn->isEnabled() ) {
btn->animateClick();
return;
@@ -1972,7 +1972,7 @@ void AccountDialog::saveSettings()
// get the new account and register the new destination folder
// this is the target folder for local or pop accounts and the root folder
// of the account for (d)imap
- KMAccount* newAcct = kmkernel->acctMgr()->find(mAccount->id());
+ KMAccount* newAcct = kmkernel->acctMgr()->tqfind(mAccount->id());
if (newAcct)
{
if( accountType == "local" ) {
@@ -1994,7 +1994,7 @@ void AccountDialog::slotLocationChooser()
{
static TQString directory( "/" );
- KFileDialog dialog( directory, TQString::null, this, 0, true );
+ KFileDialog dialog( directory, TQString(), this, 0, true );
dialog.setCaption( i18n("Choose Location") );
bool result = dialog.exec();
@@ -2117,8 +2117,8 @@ void AccountDialog::slotReloadNamespaces()
{
initAccountForConnect();
mImap.personalNS->setText( i18n("Fetching Namespaces...") );
- mImap.otherUsersNS->setText( TQString::null );
- mImap.sharedNS->setText( TQString::null );
+ mImap.otherUsersNS->setText( TQString() );
+ mImap.sharedNS->setText( TQString() );
ImapAccountBase* ai = static_cast<ImapAccountBase*>( mAccount );
connect( ai, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
@@ -2136,16 +2136,16 @@ void AccountDialog::slotConnectionResult( int errorCode, const TQString& )
this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
disconnect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ),
this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
- mImap.personalNS->setText( TQString::null );
+ mImap.personalNS->setText( TQString() );
}
}
void AccountDialog::slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map )
{
disconnect( this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
- mImap.personalNS->setText( TQString::null );
- mImap.otherUsersNS->setText( TQString::null );
- mImap.sharedNS->setText( TQString::null );
+ mImap.personalNS->setText( TQString() );
+ mImap.otherUsersNS->setText( TQString() );
+ mImap.sharedNS->setText( TQString() );
mImap.nsMap = map;
ImapAccountBase::namespaceDelim ns = map[ImapAccountBase::PersonalNS];
@@ -2267,8 +2267,8 @@ void AccountDialog::slotEditSharedNamespace()
}
}
-NamespaceLineEdit::NamespaceLineEdit( TQWidget* parent )
- : KLineEdit( parent )
+NamespaceLineEdit::NamespaceLineEdit( TQWidget* tqparent )
+ : KLineEdit( tqparent )
{
}
@@ -2278,9 +2278,9 @@ void NamespaceLineEdit::setText( const TQString& text )
KLineEdit::setText( text );
}
-NamespaceEditDialog::NamespaceEditDialog( TQWidget *parent,
+NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent,
ImapAccountBase::imapNamespace type, ImapAccountBase::nsDelimMap* map )
- : KDialogBase( parent, "edit_namespace", false, TQString::null,
+ : KDialogBase( tqparent, "edit_namespace", false, TQString(),
Ok|Cancel, Ok, true ), mType( type ), mNamespaceMap( map )
{
TQVBox *page = makeVBoxMainWidget();
@@ -2298,7 +2298,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *parent,
mBg = new TQButtonGroup( 0 );
connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) );
- mDelimMap = mNamespaceMap->find( mType ).data();
+ mDelimMap = mNamespaceMap->tqfind( mType ).data();
ImapAccountBase::namespaceDelim::Iterator it;
for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) {
NamespaceLineEdit* edit = new NamespaceLineEdit( grid );
@@ -2325,9 +2325,9 @@ void NamespaceEditDialog::slotRemoveEntry( int id )
mLineEditMap.remove( id );
delete edit;
}
- if ( mBg->find( id ) ) {
+ if ( mBg->tqfind( id ) ) {
// delete the button
- delete mBg->find( id );
+ delete mBg->tqfind( id );
}
adjustSize();
}