summaryrefslogtreecommitdiffstats
path: root/kioslaves/mbox
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kioslaves/mbox
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves/mbox')
-rw-r--r--kioslaves/mbox/mbox.cc16
-rw-r--r--kioslaves/mbox/mbox.h4
-rw-r--r--kioslaves/mbox/readmbox.cc28
-rw-r--r--kioslaves/mbox/readmbox.h18
-rw-r--r--kioslaves/mbox/stat.cc10
-rw-r--r--kioslaves/mbox/stat.h2
-rw-r--r--kioslaves/mbox/urlinfo.cc26
-rw-r--r--kioslaves/mbox/urlinfo.h12
8 files changed, 58 insertions, 58 deletions
diff --git a/kioslaves/mbox/mbox.cc b/kioslaves/mbox/mbox.cc
index 8ad8d09ab..1828401b6 100644
--- a/kioslaves/mbox/mbox.cc
+++ b/kioslaves/mbox/mbox.cc
@@ -22,8 +22,8 @@
#include "stat.h"
#include "urlinfo.h"
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,7 +58,7 @@ int kdemain( int argc, char * argv[] )
return 0;
}
-MBoxProtocol::MBoxProtocol( const QCString& arg1, const QCString& arg2 )
+MBoxProtocol::MBoxProtocol( const TQCString& arg1, const TQCString& arg2 )
: KIO::SlaveBase( "mbox2", arg1, arg2 ),
m_errorState( true )
{
@@ -74,8 +74,8 @@ void MBoxProtocol::get( const KURL& url )
m_errorState = false;
UrlInfo info( url, UrlInfo::message );
- QString line;
- QByteArray ba_line;
+ TQString line;
+ TQByteArray ba_line;
if( info.type() == UrlInfo::invalid && !m_errorState )
{
@@ -89,7 +89,7 @@ void MBoxProtocol::get( const KURL& url )
{
line = mbox.currentLine();
line += '\n';
- ba_line = QCString( line.utf8() );
+ ba_line = TQCString( line.utf8() );
ba_line.truncate( ba_line.size() - 1 ); //Removing training '\0'
data( ba_line );
mbox.nextLine();
@@ -97,7 +97,7 @@ void MBoxProtocol::get( const KURL& url )
if( !m_errorState )
{
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
}
@@ -160,7 +160,7 @@ void MBoxProtocol::mimetype( const KURL& url )
finished();
}
-void MBoxProtocol::emitError( int errno, const QString& arg )
+void MBoxProtocol::emitError( int errno, const TQString& arg )
{
m_errorState = true;
error( errno, arg );
diff --git a/kioslaves/mbox/mbox.h b/kioslaves/mbox/mbox.h
index 4d3768bd4..c8741bf2b 100644
--- a/kioslaves/mbox/mbox.h
+++ b/kioslaves/mbox/mbox.h
@@ -34,7 +34,7 @@ public:
/**
* Constructor, for the parameters, See KIO::SlaveBase
*/
- MBoxProtocol( const QCString&, const QCString& );
+ MBoxProtocol( const TQCString&, const TQCString& );
/**
* Empty destructor
*/
@@ -72,7 +72,7 @@ public:
* @param errno The error number to be thrown
* @param arg The argument of the error message of the error number.
*/
- void emitError( int errno, const QString& arg );
+ void emitError( int errno, const TQString& arg );
private:
bool m_errorState;
};
diff --git a/kioslaves/mbox/readmbox.cc b/kioslaves/mbox/readmbox.cc
index c7513c6eb..35b24db45 100644
--- a/kioslaves/mbox/readmbox.cc
+++ b/kioslaves/mbox/readmbox.cc
@@ -26,10 +26,10 @@
#include <kdebug.h>
#include <kio/global.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -41,8 +41,8 @@ ReadMBox::ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew, boo
: MBoxFile( info, parent ),
m_file( 0 ),
m_stream( 0 ),
- m_current_line( new QString( QString::null ) ),
- m_current_id( new QString( QString::null ) ),
+ m_current_line( new TQString( TQString::null ) ),
+ m_current_id( new TQString( TQString::null ) ),
m_atend( true ),
m_prev_time( 0 ),
m_only_new( onlynew ),
@@ -69,12 +69,12 @@ ReadMBox::~ReadMBox()
close();
}
-QString ReadMBox::currentLine() const
+TQString ReadMBox::currentLine() const
{
return *m_current_line;
}
-QString ReadMBox::currentID() const
+TQString ReadMBox::currentID() const
{
return *m_current_id;
}
@@ -88,7 +88,7 @@ bool ReadMBox::nextLine()
m_atend = m_current_line->isNull();
if( m_atend ) // Cursor was at EOF
{
- *m_current_id = QString::null;
+ *m_current_id = TQString::null;
m_prev_status = m_status;
return true;
}
@@ -116,7 +116,7 @@ bool ReadMBox::nextLine()
return false;
}
-bool ReadMBox::searchMessage( const QString& id )
+bool ReadMBox::searchMessage( const TQString& id )
{
if( !m_stream )
return false;
@@ -166,7 +166,7 @@ bool ReadMBox::open( bool savetime )
{
if( savetime )
{
- QFileInfo info( m_info->filename() );
+ TQFileInfo info( m_info->filename() );
m_prev_time = new utimbuf;
m_prev_time->actime = info.lastRead().toTime_t();
@@ -176,14 +176,14 @@ bool ReadMBox::open( bool savetime )
if( m_file )
return false; //File already open
- m_file = new QFile( m_info->filename() );
+ m_file = new TQFile( m_info->filename() );
if( !m_file->open( IO_ReadOnly ) )
{
delete m_file;
m_file = 0;
return false;
}
- m_stream = new QTextStream( m_file );
+ m_stream = new TQTextStream( m_file );
skipMessage();
return true;
@@ -199,6 +199,6 @@ void ReadMBox::close()
delete m_file; m_file = 0;
if( m_prev_time )
- utime( QFile::encodeName( m_info->filename() ), m_prev_time );
+ utime( TQFile::encodeName( m_info->filename() ), m_prev_time );
}
diff --git a/kioslaves/mbox/readmbox.h b/kioslaves/mbox/readmbox.h
index 01b813df7..6fb7394cb 100644
--- a/kioslaves/mbox/readmbox.h
+++ b/kioslaves/mbox/readmbox.h
@@ -53,16 +53,16 @@ public:
/**
* This functions return the current line
- * @return The line last read, or QString::null if there wasn't such last line
+ * @return The line last read, or TQString::null if there wasn't such last line
*/
- QString currentLine() const;
+ TQString currentLine() const;
/**
* This function returns the current id. The id is the first line of an email,
* and is used in filenaming. The id normally starts with "From ".
- * @return The current ID, or QString::null if no id was found yet.
+ * @return The current ID, or TQString::null if no id was found yet.
*/
- QString currentID() const;
+ TQString currentID() const;
/**
* This function reads the next line. The next line can be read by the currentLine()
@@ -78,7 +78,7 @@ public:
* @param id The id of the message to be found.
* @return true if the message was found, false otherwise.
*/
- bool searchMessage( const QString& id );
+ bool searchMessage( const TQString& id );
/**
* Skips all lines which belongs to the current message. The cursor is on the first line
@@ -117,10 +117,10 @@ private:
void close();
private:
- QFile* m_file;
- QTextStream* m_stream;
- QString* m_current_line;
- QString* m_current_id;
+ TQFile* m_file;
+ TQTextStream* m_stream;
+ TQString* m_current_line;
+ TQString* m_current_id;
bool m_atend;
struct utimbuf* m_prev_time;
diff --git a/kioslaves/mbox/stat.cc b/kioslaves/mbox/stat.cc
index e3418cbbd..c34f0bceb 100644
--- a/kioslaves/mbox/stat.cc
+++ b/kioslaves/mbox/stat.cc
@@ -40,7 +40,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
{
kdDebug() << "Stat::stat()" << endl;
KIO::UDSEntry entry;
- QString url;
+ TQString url;
if( info.type() == UrlInfo::invalid )
return entry;
@@ -50,7 +50,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
Stat::addAtom( entry, KIO::UDS_MIME_TYPE, "message/rfc822" );
- url = QString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
+ url = TQString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
Stat::addAtom( entry, KIO::UDS_URL, url );
if( mbox.currentID().isEmpty() )
Stat::addAtom( entry, KIO::UDS_NAME, "foobar" );
@@ -79,7 +79,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
{
kdDebug() << "statMessage( " << info.url() << " )" << endl;
KIO::UDSEntry entry;
- QString url = QString( "mbox:%1" ).arg( info.url() );
+ TQString url = TQString( "mbox:%1" ).arg( info.url() );
//Specific things for a message
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
@@ -92,7 +92,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
return entry;
}
-void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const QString& str )
+void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const TQString& str )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
@@ -107,7 +107,7 @@ void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, long lng )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = lng;
entry.append( atom );
diff --git a/kioslaves/mbox/stat.h b/kioslaves/mbox/stat.h
index f26f4338d..c7474d82a 100644
--- a/kioslaves/mbox/stat.h
+++ b/kioslaves/mbox/stat.h
@@ -75,7 +75,7 @@ public:
*/
static KIO::UDSEntry statMessage( const UrlInfo& info );
private:
- static void addAtom( KIO::UDSEntry& entry, unsigned int key, const QString& value );
+ static void addAtom( KIO::UDSEntry& entry, unsigned int key, const TQString& value );
static void addAtom( KIO::UDSEntry& entry, unsigned int key, const long value );
};
diff --git a/kioslaves/mbox/urlinfo.cc b/kioslaves/mbox/urlinfo.cc
index 710dc6f0c..2153afb13 100644
--- a/kioslaves/mbox/urlinfo.cc
+++ b/kioslaves/mbox/urlinfo.cc
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <kurl.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
UrlInfo::UrlInfo( const KURL& url, const UrlType type )
: m_type( invalid ),
- m_filename( new QString ),
- m_id( new QString )
+ m_filename( new TQString ),
+ m_id( new TQString )
{
calculateInfo( url, type );
}
@@ -38,7 +38,7 @@ UrlInfo::~UrlInfo()
delete m_id;
}
-QString UrlInfo::mimetype() const
+TQString UrlInfo::mimetype() const
{
switch( m_type )
{
@@ -52,17 +52,17 @@ QString UrlInfo::mimetype() const
}
}
-QString UrlInfo::filename() const
+TQString UrlInfo::filename() const
{
return *m_filename;
}
-QString UrlInfo::id() const
+TQString UrlInfo::id() const
{
return *m_id;
}
-QString UrlInfo::url() const
+TQString UrlInfo::url() const
{
return *m_filename + "/" + *m_id;
}
@@ -87,8 +87,8 @@ void UrlInfo::calculateInfo( const KURL& url, const UrlType type )
bool UrlInfo::isDirectory( const KURL& url )
{
//Check is url is in the form mbox://{filename}
- QString filename = url.path();
- QFileInfo info;
+ TQString filename = url.path();
+ TQFileInfo info;
//Remove ending /
while( filename.length() > 1 && filename.right( 1 ) == "/" )
@@ -101,7 +101,7 @@ bool UrlInfo::isDirectory( const KURL& url )
//Setting paramaters
*m_filename = filename;
- *m_id = QString::null;
+ *m_id = TQString::null;
m_type = directory;
kdDebug() << "urlInfo::isDirectory( " << url << " )" << endl;
return true;
@@ -109,8 +109,8 @@ bool UrlInfo::isDirectory( const KURL& url )
bool UrlInfo::isMessage( const KURL& url )
{
- QString path = url.path();
- QFileInfo info;
+ TQString path = url.path();
+ TQFileInfo info;
int cutindex = path.findRev( '/' );
//Does it contain at least one /?
diff --git a/kioslaves/mbox/urlinfo.h b/kioslaves/mbox/urlinfo.h
index c3177db5e..feebd689c 100644
--- a/kioslaves/mbox/urlinfo.h
+++ b/kioslaves/mbox/urlinfo.h
@@ -52,21 +52,21 @@ public:
/**
* @return the mimetype of the url
*/
- QString mimetype() const;
+ TQString mimetype() const;
/**
* @return The location of the mbox-file
*/
- QString filename() const;
+ TQString filename() const;
/**
* @return The id given in the url.
*/
- QString id() const;
+ TQString id() const;
/**
* @return the while url as QString
*/
- QString url() const;
+ TQString url() const;
private:
void calculateInfo( const KURL& url, const UrlType type );
@@ -75,8 +75,8 @@ private:
private:
UrlType m_type;
- QString *m_filename;
- QString *m_id;
+ TQString *m_filename;
+ TQString *m_id;
};
#endif