summaryrefslogtreecommitdiffstats
path: root/kmail/kmkernel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
commit1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch)
treef2defe163a805a9e34a2142dfde4cdb5e49241e7 /kmail/kmkernel.cpp
parent67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff)
downloadtdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz
tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmkernel.cpp')
-rw-r--r--kmail/kmkernel.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index 0eb1a1166..1d302c261 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -207,7 +207,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
// process args:
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- if (args->getOption("subject"))
+ if (!args->getOption("subject").isNull())
{
subj = TQString::fromLocal8Bit(args->getOption("subject"));
// if kmail is called with 'kmail -session abc' then this doesn't mean
@@ -225,25 +225,25 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
mailto = true;
}
- if (args->getOption("cc"))
+ if (!args->getOption("cc").isNull())
{
mailto = true;
cc = TQString::fromLocal8Bit(args->getOption("cc"));
}
- if (args->getOption("bcc"))
+ if (!args->getOption("bcc").isNull())
{
mailto = true;
bcc = TQString::fromLocal8Bit(args->getOption("bcc"));
}
- if (args->getOption("msg"))
+ if (!args->getOption("msg").isNull())
{
mailto = true;
messageFile.setPath( TQString::fromLocal8Bit(args->getOption("msg")) );
}
- if (args->getOption("body"))
+ if (!args->getOption("body").isNull())
{
mailto = true;
body = TQString::fromLocal8Bit(args->getOption("body"));
@@ -266,7 +266,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
if (args->isSet("check"))
checkMail = true;
- if ( args->getOption( "view" ) ) {
+ if ( !args->getOption( "view" ).isNull() ) {
viewOnly = true;
const TQString filename =
TQString::fromLocal8Bit( args->getOption( "view" ) );
@@ -404,7 +404,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
if (!messageFile.isEmpty() && messageFile.isLocalFile()) {
TQCString str = KPIM::kFileToString( messageFile.path(), true, false );
if( !str.isEmpty() ) {
- msg->setBody( TQString::fromLocal8Bit( str ).utf8() );
+ msg->setBody( TQString(TQString::fromLocal8Bit( str )).utf8() );
} else {
TemplateParser parser( msg, TemplateParser::NewMessage );
parser.process( NULL, NULL );
@@ -937,7 +937,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl,
msgId += msg->dateStr();
}
- int k = mAddMessageMsgIds.findIndex( msgId );
+ int k = mAddMessageMsgIds.tqfindIndex( msgId );
//fprintf(stderr,"tqfind %s = %d\n",(const char *) msgId,k);
if ( k == -1 ) {
@@ -1211,9 +1211,9 @@ TQString KMKernel::debugSernum( TQ_UINT32 serialNumber )
msg = folder->getMsgBase( idx );
if (msg) {
res.append( TQString( " subject %s,\n sender %s,\n date %s.\n" )
- .arg( msg->subject() )
- .arg( msg->fromStrip() )
- .arg( msg->dateStr() ) );
+ .tqarg( msg->subject() )
+ .tqarg( msg->fromStrip() )
+ .tqarg( msg->dateStr() ) );
} else {
res.append( TQString( "Invalid serial number." ) );
}
@@ -1360,7 +1360,7 @@ void KMKernel::testDir(const char *_name)
KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n"
"please make sure that you can view and "
"modify the content of the folder '%2'.")
- .arg( foldersPath ).arg( TQDir::homeDirPath() ) );
+ .tqarg( foldersPath ).tqarg( TQDir::homeDirPath() ) );
::exit(-1);
}
}
@@ -1369,7 +1369,7 @@ void KMKernel::testDir(const char *_name)
"incorrect;\n"
"please make sure that you can view and modify "
"the content of this folder.")
- .arg( foldersPath ) );
+ .tqarg( foldersPath ) );
::exit(-1);
}
}
@@ -1673,7 +1673,7 @@ void KMKernel::cleanupImapFolders()
cfld = static_cast<KMFolderCachedImap*>(the_dimapFolderMgr->createFolder(TQString::number(acct->id()),
false, KMFolderTypeCachedImap)->storage());
if (!cfld) {
- KMessageBox::error(0,(i18n("Cannot create file `%1' in %2.\nKMail cannot start without it.").arg(acct->name()).arg(the_dimapFolderMgr->basePath())));
+ KMessageBox::error(0,(i18n("Cannot create file `%1' in %2.\nKMail cannot start without it.").tqarg(acct->name()).tqarg(the_dimapFolderMgr->basePath())));
exit(-1);
}
cfld->folder()->setId( acct->id() );
@@ -1884,8 +1884,8 @@ bool KMKernel::transferMail( TQString & destinationDir )
"the same name in <i>%7</i>.<p>"
"<strong>Would you like %3 to move the mail "
"files now?</strong></qt>" )
- .arg( kmailName, kmailName, kmailName )
- .arg( dir, destinationDir, dir, destinationDir );
+ .tqarg( kmailName, kmailName, kmailName )
+ .tqarg( dir, destinationDir, dir, destinationDir );
} else {
msg = i18n( "%1-%3 is the application name, %4-%6 are folder path",
"<qt>The <i>%4</i> folder exists. "
@@ -1894,8 +1894,8 @@ bool KMKernel::transferMail( TQString & destinationDir )
"this folder for you.<p>"
"<strong>Would you like %3 to move the mail "
"files now?</strong></qt>" )
- .arg( kmailName, kmailName, kmailName )
- .arg( dir, destinationDir, dir );
+ .tqarg( kmailName, kmailName, kmailName )
+ .tqarg( dir, destinationDir, dir );
}
TQString title = i18n( "Migrate Mail Files?" );
TQString buttonText = i18n( "Move" );
@@ -1968,7 +1968,7 @@ void KMKernel::dumpDeadLetters()
return;
for ( TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList) ; it.current() != 0; ++it ) {
- if ( KMail::Composer * win = ::qt_cast<KMail::Composer*>( it.current() ) ) {
+ if ( KMail::Composer * win = ::tqqt_cast<KMail::Composer*>( it.current() ) ) {
win->autoSaveMessage();
// saving the message has to be finished right here, we are called from a dtor,
// therefore we have no chance to finish this later
@@ -2047,7 +2047,7 @@ void KMKernel::slotResult(KIO::Job *job)
{
if (KMessageBox::warningContinueCancel(0,
i18n("File %1 exists.\nDo you want to replace it?")
- .arg((*it).url.prettyURL()), i18n("Save to File"), i18n("&Replace"))
+ .tqarg((*it).url.prettyURL()), i18n("Save to File"), i18n("&Replace"))
== KMessageBox::Continue)
byteArrayToRemoteFile((*it).data, (*it).url, true);
}
@@ -2108,7 +2108,7 @@ bool KMKernel::haveSystemTrayApplet()
bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet )
{
- if ( systemTrayApplets.findIndex( applet ) == -1 ) {
+ if ( systemTrayApplets.tqfindIndex( applet ) == -1 ) {
systemTrayApplets.append( applet );
return true;
}
@@ -2135,7 +2135,7 @@ void KMKernel::emergencyExit( const TQString& reason )
mesg = i18n("KMail encountered a fatal error and will terminate now");
} else {
mesg = i18n("KMail encountered a fatal error and will "
- "terminate now.\nThe error was:\n%1").arg( reason );
+ "terminate now.\nThe error was:\n%1").tqarg( reason );
}
kdWarning() << mesg << endl;