summaryrefslogtreecommitdiffstats
path: root/kmail/kmkernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmkernel.cpp')
-rw-r--r--kmail/kmkernel.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index b464913b6..0eb1a1166 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -11,7 +11,7 @@
#include "globalsettings.h"
#include "broadcaststatus.h"
-using KPIM::BroadcasStatus;
+using KPIM::BroadcastqStatus;
#include "kmstartup.h"
#include "index.h"
#include "kmmainwin.h"
@@ -98,8 +98,8 @@ static bool s_askingToGoOnline = false;
/********************************************************************/
/* Constructor and destructor */
/********************************************************************/
-KMKernel::KMKernel (TQObject *parent, const char *name) :
- DCOPObject("KMailIface"), TQObject(parent, name),
+KMKernel::KMKernel (TQObject *tqparent, const char *name) :
+ DCOPObject("KMailIface"), TQObject(tqparent, name),
mIdentityManager(0), mConfigureDialog(0),
mContextMenuShown( false ), mWallet( 0 )
{
@@ -146,11 +146,11 @@ KMKernel::KMKernel (TQObject *parent, const char *name) :
new Kpgp::Module();
- // register our own (libkdenetwork) utf-7 codec as long as Qt
+ // register our own (libkdenetwork) utf-7 codec as long as TQt
// doesn't have it's own:
if ( !TQTextCodec::codecForName("utf-7") ) {
- kdDebug(5006) << "No Qt-native utf-7 codec found; registering QUtf7Codec from libkdenetwork" << endl;
- (void) new QUtf7Codec();
+ kdDebug(5006) << "No TQt-native utf-7 codec found; registering TQUtf7Codec from libkdenetwork" << endl;
+ (void) new TQUtf7Codec();
}
// In the case of Japan. Japanese locale name is "eucjp" but
@@ -214,11 +214,11 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
// that the user wants to send a message with subject "ession" but
// (most likely) that the user clicked on KMail's system tray applet
// which results in KMKernel::raise() calling "kmail kmail newInstance"
- // via dcop which apparently executes the application with the original
+ // via dcop which aptqparently executes the application with the original
// command line arguments and those include "-session ..." if
// kmail/kontact was restored by session management
if ( subj == "ession" ) {
- subj = TQString::null;
+ subj = TQString();
calledWithSession = true;
}
else
@@ -375,7 +375,7 @@ void KMKernel::openReader( bool onlyCheck )
if ( activate ) {
// Activate window - doing this instead of KWin::activateWindow(mWin->winId());
// so that it also works when called from KMailApplication::newInstance()
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
KStartupInfo::setNewStartupId( mWin, kapp->startupId() );
#endif
}
@@ -425,7 +425,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
for ( QCStringList::ConstIterator it = customHeaders.begin() ; it != customHeaders.end() ; ++it )
if ( !(*it).isEmpty() )
{
- const int pos = (*it).find( ':' );
+ const int pos = (*it).tqfind( ':' );
if ( pos > 0 )
{
TQCString header, value;
@@ -445,7 +445,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
cWin->show();
// Activate window - doing this instead of KWin::activateWindow(cWin->winId());
// so that it also works when called from KMailApplication::newInstance()
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
KStartupInfo::setNewStartupId( cWin, kapp->startupId() );
#endif
}
@@ -592,7 +592,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
cWin->show();
// Activate window - doing this instead of KWin::activateWindow(cWin->winId());
// so that it also works when called from KMailApplication::newInstance()
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
KStartupInfo::setNewStartupId( cWin, kapp->startupId() );
#endif
} else {
@@ -606,7 +606,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
void KMKernel::setDefaultTransport( const TQString & transport )
{
TQStringList availTransports = KMail::TransportManager::transportNames();
- TQStringList::const_iterator it = availTransports.find( transport );
+ TQStringList::const_iterator it = availTransports.tqfind( transport );
if ( it == availTransports.end() ) {
kdWarning() << "The transport you entered is not available" << endl;
return;
@@ -638,7 +638,7 @@ DCOPRef KMKernel::openComposer(const TQString &to, const TQString &cc,
cWin->show();
// Activate window - doing this instead of KWin::activateWindow(cWin->winId());
// so that it also works when called from KMailApplication::newInstance()
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_TQTONLY
KStartupInfo::setNewStartupId( cWin, kapp->startupId() );
#endif
}
@@ -732,9 +732,9 @@ int KMKernel::sendCertificate( const TQString& to, const TQByteArray& certData )
return 1;
}
-KMMsgStatus KMKernel::strToStatus(const TQString &flags)
+KMMsgtqStatus KMKernel::strTotqStatus(const TQString &flags)
{
- KMMsgStatus status = 0;
+ KMMsgtqStatus status = 0;
if (!flags.isEmpty()) {
for (uint n = 0; n < flags.length() ; n++) {
switch (flags[n]) {
@@ -938,7 +938,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl,
}
int k = mAddMessageMsgIds.findIndex( msgId );
- //fprintf(stderr,"find %s = %d\n",(const char *) msgId,k);
+ //fprintf(stderr,"tqfind %s = %d\n",(const char *) msgId,k);
if ( k == -1 ) {
if ( !msgId.isEmpty() ) {
@@ -946,8 +946,8 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl,
}
if ( !MsgStatusFlags.isEmpty() ) {
- KMMsgStatus status = strToStatus(MsgStatusFlags);
- if (status) msg->seStatus(status);
+ KMMsgtqStatus status = strTotqStatus(MsgStatusFlags);
+ if (status) msg->setqStatus(status);
}
int index;
@@ -1059,8 +1059,8 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername,
int index;
if( !MsgStatusFlags.isEmpty() ) {
- KMMsgStatus status = strToStatus(MsgStatusFlags);
- if (status) msg->seStatus(status);
+ KMMsgtqStatus status = strTotqStatus(MsgStatusFlags);
+ if (status) msg->setqStatus(status);
}
if ( mAddMsgCurrentFolder->addMsg( msg, &index ) == 0 ) {
@@ -1156,7 +1156,7 @@ bool KMKernel::showMail( TQ_UINT32 serialNumber, TQString /* messageId */ )
KMReaderMainWin *win = new KMReaderMainWin( false, false );
KMMessage *newMessage = new KMMessage( *msg );
- newMessage->setParent( msg->parent() );
+ newMessage->setParent( msg->tqparent() );
newMessage->setMsgSerNum( msg->getMsgSerNum() );
newMessage->setReadyToShow( true );
win->showMsg( GlobalSettings::self()->overrideCharacterEncoding(), newMessage );
@@ -1176,11 +1176,11 @@ TQString KMKernel::getFrom( TQ_UINT32 serialNumber )
KMFolder *folder = 0;
KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx);
if (!folder || (idx == -1))
- return TQString::null;
+ return TQString();
KMFolderOpener openFolder(folder, "getFrom");
KMMsgBase *msgBase = folder->getMsgBase(idx);
if (!msgBase)
- return TQString::null;
+ return TQString();
bool unGet = !msgBase->isMessage();
KMMessage *msg = folder->getMsg(idx);
TQString result = msg->from();
@@ -1243,7 +1243,7 @@ void KMKernel::stopNetworkJobs()
return;
GlobalSettings::setNetworkState( GlobalSettings::EnumNetworkState::Offline );
- BroadcasStatus::instance()->seStatusMsg( i18n("KMail is set to be offline; all network jobs are suspended"));
+ BroadcastqStatus::instance()->seStatusMsg( i18n("KMail is set to be offline; all network jobs are suspended"));
emit onlineStatusChanged( (GlobalSettings::EnumNetworkState::type)GlobalSettings::networkState() );
}
@@ -1253,7 +1253,7 @@ void KMKernel::resumeNetworkJobs()
return;
GlobalSettings::setNetworkState( GlobalSettings::EnumNetworkState::Online );
- BroadcasStatus::instance()->seStatusMsg( i18n("KMail is set to be online; all network jobs resumed"));
+ BroadcastqStatus::instance()->seStatusMsg( i18n("KMail is set to be online; all network jobs resumed"));
emit onlineStatusChanged( (GlobalSettings::EnumNetworkState::type)GlobalSettings::networkState() );
if ( kmkernel->msgSender()->sendImmediate() ) {
@@ -1431,7 +1431,7 @@ void KMKernel::initFolders(KConfig* cfg)
the_inboxFolder->setSystemFolder(true);
if ( the_inboxFolder->userWhoField().isEmpty() )
- the_inboxFolder->setUserWhoField( TQString::null );
+ the_inboxFolder->setUserWhoField( TQString() );
// inboxFolder->open();
the_outboxFolder = the_folderMgr->findOrCreate(cfg->readEntry("outboxFolder", I18N_NOOP("outbox")));
@@ -1442,7 +1442,7 @@ void KMKernel::initFolders(KConfig* cfg)
the_outboxFolder->setSystemFolder(true);
if ( the_outboxFolder->userWhoField().isEmpty() )
- the_outboxFolder->setUserWhoField( TQString::null );
+ the_outboxFolder->setUserWhoField( TQString() );
/* Nuke the oubox's index file, to make sure that no ghost messages are in
* it from a previous crash. Ghost messages happen in the outbox because it
* the only folder where messages enter and leave within 5 seconds, which is
@@ -1459,7 +1459,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_sentFolder->setSystemFolder(true);
if ( the_sentFolder->userWhoField().isEmpty() )
- the_sentFolder->setUserWhoField( TQString::null );
+ the_sentFolder->setUserWhoField( TQString() );
// the_sentFolder->open();
the_trashFolder = the_folderMgr->findOrCreate(cfg->readEntry("trashFolder", I18N_NOOP("trash")));
@@ -1468,7 +1468,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_trashFolder->setSystemFolder( true );
if ( the_trashFolder->userWhoField().isEmpty() )
- the_trashFolder->setUserWhoField( TQString::null );
+ the_trashFolder->setUserWhoField( TQString() );
// the_trashFolder->open();
the_draftsFolder = the_folderMgr->findOrCreate(cfg->readEntry("draftsFolder", I18N_NOOP("drafts")));
@@ -1477,7 +1477,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_draftsFolder->setSystemFolder( true );
if ( the_draftsFolder->userWhoField().isEmpty() )
- the_draftsFolder->setUserWhoField( TQString::null );
+ the_draftsFolder->setUserWhoField( TQString() );
the_draftsFolder->open("kmkernel");
the_templatesFolder =
@@ -1488,7 +1488,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_templatesFolder->setSystemFolder( true );
if ( the_templatesFolder->userWhoField().isEmpty() )
- the_templatesFolder->setUserWhoField( TQString::null );
+ the_templatesFolder->setUserWhoField( TQString() );
the_templatesFolder->open("kmkernel");
}
@@ -1528,7 +1528,7 @@ void KMKernel::init()
recreateCorruptIndexFiles();
the_searchFolderMgr = new KMFolderMgr(locateLocal("data","kmail/search"), KMSearchDir);
- KMFolder *lsf = the_searchFolderMgr->find( i18n("Last Search") );
+ KMFolder *lsf = the_searchFolderMgr->tqfind( i18n("Last Search") );
if (lsf)
the_searchFolderMgr->remove( lsf );
@@ -1613,7 +1613,7 @@ void KMKernel::cleanupImapFolders()
KMFolderNode *node = the_imapFolderMgr->dir().first();
while (node)
{
- if (node->isDir() || ((acct = the_acctMgr->find(node->id()))
+ if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id()))
&& ( acct->type() == "imap" )) )
{
node = the_imapFolderMgr->dir().next();
@@ -1629,7 +1629,7 @@ void KMKernel::cleanupImapFolders()
node = the_dimapFolderMgr->dir().first();
while (node)
{
- if (node->isDir() || ((acct = the_acctMgr->find(node->id()))
+ if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id()))
&& ( acct->type() == "cachedimap" )) )
{
node = the_dimapFolderMgr->dir().next();
@@ -1665,7 +1665,7 @@ void KMKernel::cleanupImapFolders()
if (acct->type() != "cachedimap" ) continue;
- KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id()));
+ KMFolder* fld = the_dimapFolderMgr->tqfind(TQString::number(acct->id()));
if( fld )
cfld = static_cast<KMFolderCachedImap*>( fld->storage() );
if (cfld == 0) {
@@ -1702,7 +1702,7 @@ void KMKernel::recreateCorruptIndexFiles()
if ( !folder || folder->isDir() || folder->isOpened() )
continue;
KMFolderIndex * const index = dynamic_cast<KMFolderIndex*>( folder->storage() );
- if ( index && index->indexStatus() != KMFolderIndex::IndexOk ) {
+ if ( index && index->indextqStatus() != KMFolderIndex::IndexOk ) {
foldersWithBrokenIndex.append( index );
}
}
@@ -1880,7 +1880,7 @@ bool KMKernel::transferMail( TQString & destinationDir )
"%1 now uses the <i>%5</i> folder for "
"its messages.<p>"
"%2 can move the contents of <i>%6<i> into this folder for "
- "you, though this may tqreplace any existing files with "
+ "you, though this may replace any existing files with "
"the same name in <i>%7</i>.<p>"
"<strong>Would you like %3 to move the mail "
"files now?</strong></qt>" )
@@ -1933,7 +1933,7 @@ void KMKernel::ungrabPtrKb(void)
// Message handler
-void KMKernel::kmailMsgHandler(QtMsgType aType, const char* aMsg)
+void KMKernel::kmailMsgHandler(TQtMsgType aType, const char* aMsg)
{
static int recurse=-1;
@@ -2016,7 +2016,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data)
{
// send the data in 64 KB chunks
const int MAX_CHUNK_SIZE = 64*1024;
- TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
+ TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job);
assert(it != mPutJobs.end());
int remainingBytes = (*it).data.size() - (*it).offset;
if( remainingBytes > MAX_CHUNK_SIZE )
@@ -2039,14 +2039,14 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data)
void KMKernel::slotResult(KIO::Job *job)
{
- TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
+ TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job);
assert(it != mPutJobs.end());
if (job->error())
{
if (job->error() == KIO::ERR_FILE_ALREADY_EXIST)
{
if (KMessageBox::warningContinueCancel(0,
- i18n("File %1 exists.\nDo you want to tqreplace it?")
+ i18n("File %1 exists.\nDo you want to replace it?")
.arg((*it).url.prettyURL()), i18n("Save to File"), i18n("&Replace"))
== KMessageBox::Continue)
byteArrayToRemoteFile((*it).data, (*it).url, true);
@@ -2119,7 +2119,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet )
bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet )
{
TQValueList<const KSystemTray*>::iterator it =
- systemTrayApplets.find( applet );
+ systemTrayApplets.tqfind( applet );
if ( it != systemTrayApplets.end() ) {
systemTrayApplets.remove( it );
return true;
@@ -2464,7 +2464,7 @@ Wallet *KMKernel::wallet() {
if ( !Wallet::isEnabled() || walletOpenFailed )
return 0;
- // find an appropriate parent window for the wallet dialog
+ // find an appropriate tqparent window for the wallet dialog
WId window = 0;
if ( tqApp->activeWindow() )
window = tqApp->activeWindow()->winId();