Commit 89fed2af authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Byebye Q3CString

svn path=/trunk/KDE/kdebase/kioslave/; revision=476625
parent 28c9706a
......@@ -29,7 +29,7 @@
using namespace KIO;
AboutProtocol::AboutProtocol(const Q3CString &pool_socket, const Q3CString &app_socket)
AboutProtocol::AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket)
: SlaveBase("about", pool_socket, app_socket)
{
}
......
......@@ -29,7 +29,7 @@
class AboutProtocol : public KIO::SlaveBase
{
public:
AboutProtocol(const Q3CString &pool_socket, const Q3CString &app_socket);
AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~AboutProtocol();
virtual void get(const KURL& url);
......
......@@ -20,8 +20,6 @@
#include <qdir.h>
#include <qregexp.h>
//Added by qt3to4:
#include <Q3CString>
#include <kdebug.h>
#include <kprocess.h>
......@@ -34,7 +32,7 @@
using namespace KIO;
CgiProtocol::CgiProtocol( const Q3CString &pool, const Q3CString &app )
CgiProtocol::CgiProtocol( const QByteArray &pool, const QByteArray &app )
: SlaveBase( "cgi", pool, app )
{
kdDebug(7124) << "CgiProtocol::CgiProtocol" << endl;
......@@ -59,13 +57,13 @@ void CgiProtocol::get( const KURL& url )
kdDebug(7124) << " Protocol: " << url.protocol() << endl;
kdDebug(7124) << " Filename: " << url.filename() << endl;
#endif
Q3CString protocol = "SERVER_PROTOCOL=HTTP";
QByteArray protocol = "SERVER_PROTOCOL=HTTP";
putenv( protocol.data() );
Q3CString requestMethod = "REQUEST_METHOD=GET";
QByteArray requestMethod = "REQUEST_METHOD=GET";
putenv( requestMethod.data() );
Q3CString query = url.query().mid( 1 ).toLocal8Bit();
QByteArray query = url.query().mid( 1 ).toLocal8Bit();
query.prepend( "QUERY_STRING=" );
putenv( query.data() );
......@@ -100,7 +98,7 @@ void CgiProtocol::get( const KURL& url )
if ( forwardFile ) {
kdDebug(7124) << "Forwarding to '" << path << "'" << endl;
Q3CString filepath = QFile::encodeName( path );
QByteArray filepath = QFile::encodeName( path );
fd = fopen( filepath.data(), "r" );
......@@ -141,7 +139,7 @@ void CgiProtocol::get( const KURL& url )
buffer[n] = 0;
if ( stripHeader ) {
Q3CString output = buffer; // this assumes buffer is text and not binary
QByteArray output = buffer; // this assumes buffer is text and not binary
int colon = output.find( ':' );
int newline = output.find( '\n' );
int semicolon = output.lastIndexOf( ';', newline );
......@@ -156,7 +154,7 @@ void CgiProtocol::get( const KURL& url )
kdDebug(7124) << " end: " << end << endl;
#endif
Q3CString contentType = output.mid( colon + 1, end - colon - 1 );
QByteArray contentType = output.mid( colon + 1, end - colon - 1 );
contentType = contentType.trimmed();
......
......@@ -19,8 +19,6 @@
#define KIO_CGI_H
#include <qobject.h>
//Added by qt3to4:
#include <Q3CString>
#include <kio/slavebase.h>
......@@ -33,7 +31,7 @@ class KProcess;
class CgiProtocol : public KIO::SlaveBase
{
public:
CgiProtocol( const Q3CString &pool, const Q3CString &app );
CgiProtocol( const QByteArray &pool, const QByteArray &app );
virtual ~CgiProtocol();
virtual void get( const KURL& url );
......
......@@ -55,7 +55,7 @@ int kdemain( int argc, char ** argv)
return 0;
}
FilterProtocol::FilterProtocol( const Q3CString & protocol, const Q3CString &pool, const Q3CString &app )
FilterProtocol::FilterProtocol( const QByteArray & protocol, const QByteArray &pool, const QByteArray &app )
: KIO::SlaveBase( protocol, pool, app )
{
QString mimetype = QString::fromLatin1("application/x-") + QString::fromLatin1(protocol);
......
......@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
class FilterProtocol : public QObject, public KIO::SlaveBase
{
public:
FilterProtocol( const Q3CString & protocol, const Q3CString &pool, const Q3CString &app );
FilterProtocol( const QByteArray & protocol, const QByteArray &pool, const QByteArray &app );
virtual void get( const KURL &url );
virtual void put( const KURL &url, int _mode, bool _overwrite,
......
......@@ -67,7 +67,7 @@ extern "C"
/* ---------------------------------------------------------------------------------- */
FingerProtocol::FingerProtocol(const Q3CString &pool_socket, const Q3CString &app_socket)
FingerProtocol::FingerProtocol(const QByteArray &pool_socket, const QByteArray &app_socket)
: QObject(), SlaveBase("finger", pool_socket, app_socket)
{
myStdStream = new QString();
......
......@@ -34,7 +34,7 @@ class FingerProtocol : public QObject, public KIO::SlaveBase
public:
FingerProtocol(const Q3CString &pool_socket, const Q3CString &app_socket);
FingerProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~FingerProtocol();
virtual void mimetype(const KURL& url);
......
......@@ -235,7 +235,7 @@ const struct fishProtocol::fish_info fishProtocol::fishInfo[] = {
0 }
};
fishProtocol::fishProtocol(const Q3CString &pool_socket, const Q3CString &app_socket)
fishProtocol::fishProtocol(const QByteArray &pool_socket, const QByteArray &app_socket)
: SlaveBase("fish", pool_socket, app_socket), mimeBuffer(1024),
mimeTypeSent(false)
{
......
......@@ -17,7 +17,6 @@
#define __fish_h__
#include <qstring.h>
#include <q3cstring.h>
//Added by qt3to4:
#include <Q3ValueList>
......@@ -34,7 +33,7 @@
class fishProtocol : public KIO::SlaveBase
{
public:
fishProtocol(const Q3CString &pool_socket, const Q3CString &app_socket);
fishProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~fishProtocol();
/**
......
......@@ -82,7 +82,7 @@ void getDriveAndPath(const QString& path, QString& drive, QString& rest)
}
}
FloppyProtocol::FloppyProtocol (const Q3CString &pool, const Q3CString &app )
FloppyProtocol::FloppyProtocol (const QByteArray &pool, const QByteArray &app )
:SlaveBase( "floppy", pool, app )
,m_mtool(0)
,m_stdoutBuffer(0)
......
......@@ -43,7 +43,7 @@ struct StatInfo
class FloppyProtocol : public KIO::SlaveBase
{
public:
FloppyProtocol (const Q3CString &pool, const Q3CString &app );
FloppyProtocol (const QByteArray &pool, const QByteArray &app );
virtual ~FloppyProtocol();
virtual void listDir( const KURL& url);
......
......@@ -20,7 +20,7 @@
using namespace KIO;
InfoProtocol::InfoProtocol( const Q3CString &pool, const Q3CString &app )
InfoProtocol::InfoProtocol( const QByteArray &pool, const QByteArray &app )
: SlaveBase( "info", pool, app )
, m_page( "" )
, m_node( "" )
......
......@@ -2,8 +2,6 @@
#define __info_h__
#include <qobject.h>
//Added by qt3to4:
#include <Q3CString>
#include <kio/slavebase.h>
......@@ -13,7 +11,7 @@ class InfoProtocol : public KIO::SlaveBase
{
public:
InfoProtocol( const Q3CString &pool, const Q3CString &app );
InfoProtocol( const QByteArray &pool, const QByteArray &app );
virtual ~InfoProtocol();
virtual void get( const KURL& url );
......
......@@ -23,8 +23,6 @@
#include <kabc/ldif.h>
#include "kio_ldap.h"
//Added by qt3to4:
#include <Q3CString>
using namespace KIO;
using namespace KABC;
......@@ -56,8 +54,8 @@ int kdemain( int argc, char **argv )
/**
* Initialize the ldap slave
*/
LDAPProtocol::LDAPProtocol( const Q3CString &protocol, const Q3CString &pool,
const Q3CString &app ) : SlaveBase( protocol, pool, app )
LDAPProtocol::LDAPProtocol( const QByteArray &protocol, const QByteArray &pool,
const QByteArray &app ) : SlaveBase( protocol, pool, app )
{
mLDAP = 0; mTLS = 0; mVer = 3; mAuthSASL = false;
mRealm = ""; mBindName = "";
......
......@@ -3,8 +3,6 @@
#include <qstring.h>
#include <q3valuelist.h>
//Added by qt3to4:
#include <Q3CString>
#include <kio/slavebase.h>
#include <kio/authinfo.h>
......@@ -17,7 +15,7 @@
class LDAPProtocol : public KIO::SlaveBase
{
public:
LDAPProtocol( const Q3CString &protocol, const Q3CString &pool, const Q3CString &app );
LDAPProtocol( const QByteArray &protocol, const QByteArray &pool, const QByteArray &app );
virtual ~LDAPProtocol();
virtual void setHost( const QString& host, int port,
......
......@@ -46,7 +46,7 @@ extern "C" {
}
}
MacProtocol::MacProtocol(const Q3CString &pool, const Q3CString &app)
MacProtocol::MacProtocol(const QByteArray &pool, const QByteArray &app)
: QObject(), SlaveBase("mac", pool, app) {
/* logFile = new QFile("/home/jr/logfile");
logFile->open(IO_ReadWrite | IO_Append);
......
......@@ -22,7 +22,6 @@
#include <kprocess.h>
#include <qstring.h>
#include <q3cstring.h>
#include <qfile.h>
#include <qtextstream.h>
//Added by qt3to4:
......@@ -32,7 +31,7 @@ class MacProtocol : public QObject, public KIO::SlaveBase
{
Q_OBJECT
public:
MacProtocol(const Q3CString &pool, const Q3CString &app);
MacProtocol(const QByteArray &pool, const QByteArray &app);
~MacProtocol();
virtual void get(const KURL& url );
virtual void listDir(const KURL& url);
......
......@@ -111,7 +111,7 @@ bool parseUrl(const QString& _url, QString &title, QString &section)
}
MANProtocol::MANProtocol(const Q3CString &pool_socket, const Q3CString &app_socket)
MANProtocol::MANProtocol(const QByteArray &pool_socket, const QByteArray &app_socket)
: QObject(), SlaveBase("man", pool_socket, app_socket)
{
assert(!_self);
......
......@@ -22,7 +22,6 @@
#include <qstring.h>
#include <q3cstring.h>
#include <qstringlist.h>
#include <q3dict.h>
#include <qbuffer.h>
......@@ -40,7 +39,7 @@ class MANProtocol : public QObject, public KIO::SlaveBase
public:
MANProtocol(const Q3CString &pool_socket, const Q3CString &app_socket);
MANProtocol(const QByteArray &pool_socket, const QByteArray &app_socket);
virtual ~MANProtocol();
virtual void get(const KURL& url);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment