summaryrefslogtreecommitdiffstats
path: root/kmail/kmkernel.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:37:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:37:21 -0600
commit86d8364ac704bdc8ad2dfcf52307d9626cfac567 (patch)
tree97d3ac2c2f60780d9a1de4f82caac7cb27534501 /kmail/kmkernel.cpp
parenta9bde819f2b421dcc44741156e75eca4bb5fb4f4 (diff)
downloadtdepim-86d8364ac704bdc8ad2dfcf52307d9626cfac567.tar.gz
tdepim-86d8364ac704bdc8ad2dfcf52307d9626cfac567.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kmail/kmkernel.cpp')
-rw-r--r--kmail/kmkernel.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index 11e291ef2..e5dd7072a 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -173,10 +173,10 @@ KMKernel::KMKernel (TQObject *parent, const char *name) :
KMKernel::~KMKernel ()
{
- TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.begin();
+ TQMap<TDEIO::Job*, putData>::Iterator it = mPutJobs.begin();
while ( it != mPutJobs.end() )
{
- KIO::Job *job = it.key();
+ TDEIO::Job *job = it.key();
mPutJobs.remove( it );
job->kill();
it = mPutJobs.begin();
@@ -528,7 +528,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
bool iCalAutoSend = false;
bool noWordWrap = false;
bool isICalInvitation = false;
- KConfigGroup options( config(), "Groupware" );
+ TDEConfigGroup options( config(), "Groupware" );
if ( !attachData.isEmpty() ) {
isICalInvitation = attachName == "cal.ics" &&
attachType == "text" &&
@@ -566,7 +566,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc,
msgPart->setCharset( attachCharset );
}
// Don't show the composer window, if the automatic sending is checked
- KConfigGroup options( config(), "Groupware" );
+ TDEConfigGroup options( config(), "Groupware" );
iCalAutoSend = options.readBoolEntry( "AutomaticSending", true );
}
}
@@ -1411,7 +1411,7 @@ void KMKernel::recoverDeadLetters()
}
//-----------------------------------------------------------------------------
-void KMKernel::initFolders(KConfig* cfg)
+void KMKernel::initFolders(TDEConfig* cfg)
{
TQString name;
@@ -1498,11 +1498,11 @@ void KMKernel::init()
the_shuttingDown = false;
the_server_is_ready = false;
- KConfig* cfg = KMKernel::config();
+ TDEConfig* cfg = KMKernel::config();
TQDir dir;
- KConfigGroupSaver saver(cfg, "General");
+ TDEConfigGroupSaver saver(cfg, "General");
the_firstStart = cfg->readBoolEntry("first-start", true);
cfg->writeEntry("first-start", false);
the_previousVersion = cfg->readEntry("previous-version");
@@ -1547,7 +1547,7 @@ void KMKernel::init()
the_server_is_ready = true;
imProxy()->initialize();
{ // area for config group "Composer"
- KConfigGroupSaver saver(cfg, "Composer");
+ TDEConfigGroupSaver saver(cfg, "Composer");
if (cfg->readListEntry("pref-charsets").isEmpty())
{
cfg->writeEntry("pref-charsets", "us-ascii,iso-8859-1,locale,utf-8");
@@ -1780,8 +1780,8 @@ void KMKernel::cleanup(void)
the_weaver = 0;
#endif
- KConfig* config = KMKernel::config();
- KConfigGroupSaver saver(config, "General");
+ TDEConfig* config = KMKernel::config();
+ TDEConfigGroupSaver saver(config, "General");
if (the_trashFolder) {
@@ -1872,7 +1872,7 @@ bool KMKernel::transferMail( TQString & destinationDir )
// disabled for now since moving fails in certain cases (e.g. if symbolic links are involved)
const TQString kmailName = kapp->aboutData()->programName();
TQString msg;
- if ( KIO::NetAccess::exists( destinationDir, true, 0 ) ) {
+ if ( TDEIO::NetAccess::exists( destinationDir, true, 0 ) ) {
// if destinationDir exists, we need to warn about possible
// overwriting of files. otherwise, we don't have to
msg = i18n( "%1-%3 is the application name, %4-%7 are folder path",
@@ -1906,10 +1906,10 @@ bool KMKernel::transferMail( TQString & destinationDir )
return true;
}
- if ( !KIO::NetAccess::move( dir, destinationDir ) ) {
- kdDebug(5006) << k_funcinfo << "Moving " << dir << " to " << destinationDir << " failed: " << KIO::NetAccess::lastErrorString() << endl;
+ if ( !TDEIO::NetAccess::move( dir, destinationDir ) ) {
+ kdDebug(5006) << k_funcinfo << "Moving " << dir << " to " << destinationDir << " failed: " << TDEIO::NetAccess::lastErrorString() << endl;
kdDebug(5006) << k_funcinfo << "Deleting " << destinationDir << endl;
- KIO::NetAccess::del( destinationDir, 0 );
+ TDEIO::NetAccess::del( destinationDir, 0 );
destinationDir = dir;
return false;
}
@@ -2002,21 +2002,21 @@ void KMKernel::action(bool mailto, bool check, const TQString &to,
void KMKernel::byteArrayToRemoteFile(const TQByteArray &aData, const KURL &aURL,
bool overwrite)
{
- // ## when KDE 3.3 is out: use KIO::storedPut to remove slotDataReq altogether
- KIO::Job *job = KIO::put(aURL, -1, overwrite, false);
+ // ## when KDE 3.3 is out: use TDEIO::storedPut to remove slotDataReq altogether
+ TDEIO::Job *job = TDEIO::put(aURL, -1, overwrite, false);
putData pd; pd.url = aURL; pd.data = aData; pd.offset = 0;
mPutJobs.insert(job, pd);
- connect(job, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)),
- TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&)));
- connect(job, TQT_SIGNAL(result(KIO::Job*)),
- TQT_SLOT(slotResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(dataReq(TDEIO::Job*,TQByteArray&)),
+ TQT_SLOT(slotDataReq(TDEIO::Job*,TQByteArray&)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
+ TQT_SLOT(slotResult(TDEIO::Job*)));
}
-void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data)
+void KMKernel::slotDataReq(TDEIO::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<TDEIO::Job*, putData>::Iterator it = mPutJobs.find(job);
assert(it != mPutJobs.end());
int remainingBytes = (*it).data.size() - (*it).offset;
if( remainingBytes > MAX_CHUNK_SIZE )
@@ -2037,13 +2037,13 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data)
}
}
-void KMKernel::slotResult(KIO::Job *job)
+void KMKernel::slotResult(TDEIO::Job *job)
{
- TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
+ TQMap<TDEIO::Job*, putData>::Iterator it = mPutJobs.find(job);
assert(it != mPutJobs.end());
if (job->error())
{
- if (job->error() == KIO::ERR_FILE_ALREADY_EXIST)
+ if (job->error() == TDEIO::ERR_FILE_ALREADY_EXIST)
{
if (KMessageBox::warningContinueCancel(0,
i18n("File %1 exists.\nDo you want to replace it?")
@@ -2286,7 +2286,7 @@ void KMKernel::slotEmptyTrash()
}
}
-KConfig* KMKernel::config()
+TDEConfig* KMKernel::config()
{
assert(mySelf);
if (!mySelf->mConfig)
@@ -2352,9 +2352,9 @@ KMMainWidget *KMKernel::getKMMainWidget()
void KMKernel::slotRunBackgroundTasks() // called regularly by timer
{
- // Hidden KConfig keys. Not meant to be used, but a nice fallback in case
+ // Hidden TDEConfig keys. Not meant to be used, but a nice fallback in case
// a stable kmail release goes out with a nasty bug in CompactionJob...
- KConfigGroup generalGroup( config(), "General" );
+ TDEConfigGroup generalGroup( config(), "General" );
if ( generalGroup.readBoolEntry( "auto-expiring", true ) ) {
the_folderMgr->expireAllFolders( false /*scheduled, not immediate*/ );