summaryrefslogtreecommitdiffstats
path: root/knode/knnetaccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/knnetaccess.cpp')
-rw-r--r--knode/knnetaccess.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/knode/knnetaccess.cpp b/knode/knnetaccess.cpp
index 65b43e7a5..7fc6fd371 100644
--- a/knode/knnetaccess.cpp
+++ b/knode/knnetaccess.cpp
@@ -15,7 +15,7 @@
#include <unistd.h>
#include <fcntl.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -37,8 +37,8 @@
using KPIM::ProgressManager;
-KNNetAccess::KNNetAccess(QObject *parent, const char *name )
- : QObject(parent,name), currentNntpJob(0), currentSmtpJob(0)
+KNNetAccess::KNNetAccess(TQObject *parent, const char *name )
+ : TQObject(parent,name), currentNntpJob(0), currentSmtpJob(0)
{
if ( pipe(nntpInPipe) == -1 || pipe(nntpOutPipe) == -1 ) {
KMessageBox::error(knGlobals.topWidget, i18n("Internal error:\nFailed to open pipes for internal communication."));
@@ -50,8 +50,8 @@ KNNetAccess::KNNetAccess(QObject *parent, const char *name )
kapp->exit(1);
}
- nntpNotifier=new QSocketNotifier(nntpInPipe[0], QSocketNotifier::Read);
- connect(nntpNotifier, SIGNAL(activated(int)), this, SLOT(slotThreadSignal(int)));
+ nntpNotifier=new TQSocketNotifier(nntpInPipe[0], TQSocketNotifier::Read);
+ connect(nntpNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotThreadSignal(int)));
// initialize the KSocks stuff in the main thread, otherwise we get
// strange effects on FreeBSD
@@ -60,14 +60,14 @@ KNNetAccess::KNNetAccess(QObject *parent, const char *name )
nntpClient=new KNNntpClient(nntpOutPipe[0],nntpInPipe[1],nntp_Mutex);
nntpClient->start();
- connect( knGlobals.accountManager(), SIGNAL(passwordsChanged()), SLOT(slotPasswordsChanged()) );
+ connect( knGlobals.accountManager(), TQT_SIGNAL(passwordsChanged()), TQT_SLOT(slotPasswordsChanged()) );
}
KNNetAccess::~KNNetAccess()
{
- disconnect(nntpNotifier, SIGNAL(activated(int)), this, SLOT(slotThreadSignal(int)));
+ disconnect(nntpNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotThreadSignal(int)));
nntpClient->terminateClient();
triggerAsyncThread(nntpOutPipe[1]);
@@ -95,7 +95,7 @@ void KNNetAccess::addJob(KNJobData *job)
}
job->createProgressItem();
- connect( job->progressItem(), SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotCancelJob(KPIM::ProgressItem*)) );
+ connect( job->progressItem(), TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), TQT_SLOT(slotCancelJob(KPIM::ProgressItem*)) );
emit netActive( true );
// put jobs which are waiting for the wallet into an extra queue
@@ -120,7 +120,7 @@ void KNNetAccess::addJob(KNJobData *job)
// avoid duplicate fetchNewHeader jobs...
bool duplicate = false;
if ( job->type() == KNJobData::JTfetchNewHeaders || job->type() == KNJobData::JTsilentFetchNewHeaders ) {
- QValueList<KNJobData*>::ConstIterator it;
+ TQValueList<KNJobData*>::ConstIterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end(); ++it ) {
if ( ( (*it)->type() == KNJobData::JTfetchNewHeaders || (*it)->type() == KNJobData::JTsilentFetchNewHeaders )
&& (*it)->data() == job->data() ) // job works on the same group...
@@ -159,7 +159,7 @@ void KNNetAccess::stopJobsNntp( int type )
{
cancelCurrentNntpJob( type );
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
tmp = *it;
if ( type == 0 || tmp->type() == type ) {
@@ -197,7 +197,7 @@ void KNNetAccess::stopJobsSmtp( int type )
{
cancelCurrentSmtpJob( type );
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = smtpJobQueue.begin(); it != smtpJobQueue.end();) {
tmp = *it;
if ( type == 0 || tmp->type() == type ) {
@@ -253,9 +253,9 @@ void KNNetAccess::startJobSmtp()
if (currentSmtpJob->success()) {
KNLocalArticle *art = static_cast<KNLocalArticle*>( currentSmtpJob->data() );
// create url query part
- QString query("headers=0&from=");
+ TQString query("headers=0&from=");
query += KURL::encode_string( art->from()->email() );
- QStrList emails;
+ TQStrList emails;
art->to()->emails( &emails );
for ( char *e = emails.first(); e; e = emails.next() ) {
query += "&to=" + KURL::encode_string( e );
@@ -275,8 +275,8 @@ void KNNetAccess::startJobSmtp()
destination.setPass( account->pass() );
}
KIO::Job* job = KIO::storedPut( art->encodedContent(true), destination, -1, false, false, false );
- connect( job, SIGNAL( result(KIO::Job*) ),
- SLOT( slotJobResult(KIO::Job*) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job*) ),
+ TQT_SLOT( slotJobResult(KIO::Job*) ) );
if ( account->encryption() == KNServerInfo::TLS )
job->addMetaData( "tls", "on" );
else
@@ -307,8 +307,8 @@ void KNNetAccess::threadDoneNntp()
kdDebug(5003) << "KNNetAccess::threadDoneNntp(): authentication error" << endl;
KNServerInfo *info = tmp->account();
if (info) {
- QString user = info->user();
- QString pass = info->pass();
+ TQString user = info->user();
+ TQString pass = info->pass();
bool keep=false;
if (KDialog::Accepted == KIO::PasswordDialog::getNameAndPassword(user, pass, &keep,
i18n("You need to supply a username and a\npassword to access this server"), false,
@@ -317,7 +317,7 @@ void KNNetAccess::threadDoneNntp()
info->setUser(user);
info->setPass(pass);
tmp->setAuthError(false);
- tmp->setErrorString(QString::null);
+ tmp->setErrorString(TQString::null);
kdDebug(5003) << "KNNetAccess::threadDoneNntp(): trying again with authentication data" << endl;
@@ -331,7 +331,7 @@ void KNNetAccess::threadDoneNntp()
nntpClient->removeJob();
currentNntpJob = 0L;
- currMsg = QString::null;
+ currMsg = TQString::null;
knGlobals.setStatusMsg();
tmp->setComplete();
@@ -358,7 +358,7 @@ void KNNetAccess::threadDoneSmtp()
tmp = currentSmtpJob;
currentSmtpJob = 0L;
if (!currentNntpJob) {
- currMsg = QString::null;
+ currMsg = TQString::null;
knGlobals.setStatusMsg();
}
tmp->setComplete();
@@ -383,7 +383,7 @@ void KNNetAccess::cancelAllJobs()
void KNNetAccess::slotThreadSignal(int i)
{
int signal;
- QString tmp;
+ TQString tmp;
//kdDebug(5003) << "KNNetAccess::slotThreadSignal() : signal received from net thread" << endl;
if(read(i, &signal, sizeof(int))==-1) {
@@ -475,7 +475,7 @@ void KNNetAccess::slotJobResult( KIO::Job *job )
void KNNetAccess::slotPasswordsChanged()
{
- QValueList<KNJobData*>::ConstIterator it;
+ TQValueList<KNJobData*>::ConstIterator it;
for ( it = mWalletQueue.begin(); it != mWalletQueue.end(); ++it ) {
(*it)->setStatus( i18n("Waiting...") );
if ( (*it)->type() == KNJobData::JTmail )
@@ -494,7 +494,7 @@ void KNNetAccess::slotPasswordsChanged()
void KNNetAccess::slotCancelJob( KPIM::ProgressItem *item )
{
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
tmp = *it;
if ( tmp->progressItem() == item ) {