summaryrefslogtreecommitdiffstats
path: root/kioslave/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/cgi')
-rw-r--r--kioslave/cgi/cgi.cpp46
-rw-r--r--kioslave/cgi/cgi.h8
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.cpp42
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.h12
4 files changed, 54 insertions, 54 deletions
diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp
index 011760e0b..5f57c3fe8 100644
--- a/kioslave/cgi/cgi.cpp
+++ b/kioslave/cgi/cgi.cpp
@@ -19,8 +19,8 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -33,7 +33,7 @@
using namespace KIO;
-CgiProtocol::CgiProtocol( const QCString &pool, const QCString &app )
+CgiProtocol::CgiProtocol( const TQCString &pool, const TQCString &app )
: SlaveBase( "cgi", pool, app )
{
kdDebug(7124) << "CgiProtocol::CgiProtocol" << endl;
@@ -49,10 +49,10 @@ CgiProtocol::~CgiProtocol()
}
/**
- * Search in reverse order through a QByteArray for a given character. The position
+ * Search in reverse order through a TQByteArray for a given character. The position
* of the character is returned, or -1 if it was not found.
*/
-static int qByteArrayFindRev( const QByteArray &ba, char c, int startIndex )
+static int qByteArrayFindRev( const TQByteArray &ba, char c, int startIndex )
{
for ( int i = startIndex; i >= 0; --i )
if ( ba[i] == c ) return i;
@@ -62,29 +62,29 @@ static int qByteArrayFindRev( const QByteArray &ba, char c, int startIndex )
/**
* Extract data in ba from start, including no more than len characters from ba.
- * Should be exactly comparable to QCString::mid()
+ * Should be exactly comparable to TQCString::mid()
*/
-static QCString extractQCString( const QByteArray &ba, uint start, uint len = 0xffffffff )
+static TQCString extractQCString( const TQByteArray &ba, uint start, uint len = 0xffffffff )
{
uint realLen = len;
if ( ( ba.size() - start ) < len )
realLen = ba.size() - start;
- return QCString( &ba[ start ], realLen + 1 );
+ return TQCString( &ba[ start ], realLen + 1 );
}
/**
- * Search through a QByteArray for a given string. The position of the string
+ * Search through a TQByteArray for a given string. The position of the string
* is returned, or -1 if it was not found.
*/
-static int qByteArrayFindStr( const QByteArray &ba, const char *str )
+static int qByteArrayFindStr( const TQByteArray &ba, const char *str )
{
int strLen = qstrlen( str );
int searchLen = ba.size() - strLen;
for ( int i = 0; i <= searchLen; ++i ) {
- QCString temp = extractQCString( ba, i, strLen );
+ TQCString temp = extractQCString( ba, i, strLen );
if ( temp == str )
return i;
}
@@ -102,30 +102,30 @@ void CgiProtocol::get( const KURL& url )
kdDebug(7124) << " Protocol: " << url.protocol() << endl;
kdDebug(7124) << " Filename: " << url.filename() << endl;
#endif
- QCString protocol = "SERVER_PROTOCOL=HTTP";
+ TQCString protocol = "SERVER_PROTOCOL=HTTP";
putenv( protocol.data() );
- QCString requestMethod = "REQUEST_METHOD=GET";
+ TQCString requestMethod = "REQUEST_METHOD=GET";
putenv( requestMethod.data() );
- QCString query = url.query().mid( 1 ).local8Bit();
+ TQCString query = url.query().mid( 1 ).local8Bit();
query.prepend( "QUERY_STRING=" );
putenv( query.data() );
- QString path = url.path();
+ TQString path = url.path();
- QString file;
+ TQString file;
int pos = path.findRev('/');
if ( pos >= 0 ) file = path.mid( pos + 1 );
else file = path;
- QString cmd;
+ TQString cmd;
bool stripHeader = false;
bool forwardFile = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mCgiPaths.begin(); it != mCgiPaths.end(); ++it ) {
cmd = *it;
if ( !(*it).endsWith("/") )
@@ -143,7 +143,7 @@ void CgiProtocol::get( const KURL& url )
if ( forwardFile ) {
kdDebug(7124) << "Forwarding to '" << path << "'" << endl;
- QCString filepath = QFile::encodeName( path );
+ TQCString filepath = TQFile::encodeName( path );
fd = fopen( filepath.data(), "r" );
@@ -155,7 +155,7 @@ void CgiProtocol::get( const KURL& url )
} else {
kdDebug(7124) << "Cmd: " << cmd << endl;
- fd = popen( QFile::encodeName(KProcess::quote( cmd )).data(), "r" );
+ fd = popen( TQFile::encodeName(KProcess::quote( cmd )).data(), "r" );
if ( !fd ) {
kdDebug(7124) << "Error running '" << cmd << "'" << endl;
@@ -184,7 +184,7 @@ void CgiProtocol::get( const KURL& url )
buffer[n] = 0;
if ( stripHeader ) {
- QByteArray output;
+ TQByteArray output;
// Access the buffer in-place by using setRawData()
output.setRawData( buffer, n );
@@ -203,7 +203,7 @@ void CgiProtocol::get( const KURL& url )
kdDebug(7124) << " end: " << end << endl;
#endif
- QCString contentType = extractQCString( output, colon + 1, end - colon - 1 );
+ TQCString contentType = extractQCString( output, colon + 1, end - colon - 1 );
contentType = contentType.stripWhiteSpace();
@@ -231,7 +231,7 @@ void CgiProtocol::get( const KURL& url )
stripHeader = false;
} else {
- QByteArray array;
+ TQByteArray array;
array.setRawData( buffer, n );
data( array );
array.resetRawData( buffer, n );
diff --git a/kioslave/cgi/cgi.h b/kioslave/cgi/cgi.h
index fec90aa59..fbfba7a91 100644
--- a/kioslave/cgi/cgi.h
+++ b/kioslave/cgi/cgi.h
@@ -18,7 +18,7 @@
#ifndef KIO_CGI_H
#define KIO_CGI_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/slavebase.h>
@@ -31,7 +31,7 @@ class KProcess;
class CgiProtocol : public KIO::SlaveBase
{
public:
- CgiProtocol( const QCString &pool, const QCString &app );
+ CgiProtocol( const TQCString &pool, const TQCString &app );
virtual ~CgiProtocol();
virtual void get( const KURL& url );
@@ -39,10 +39,10 @@ class CgiProtocol : public KIO::SlaveBase
// virtual void mimetype( const KURL& url );
protected:
-// QCString errorMessage();
+// TQCString errorMessage();
private:
- QStringList mCgiPaths;
+ TQStringList mCgiPaths;
};
#endif
diff --git a/kioslave/cgi/kcmcgi/kcmcgi.cpp b/kioslave/cgi/kcmcgi/kcmcgi.cpp
index 18436e8d9..521c0fd95 100644
--- a/kioslave/cgi/kcmcgi/kcmcgi.cpp
+++ b/kioslave/cgi/kcmcgi/kcmcgi.cpp
@@ -22,18 +22,18 @@
#include <kaboutdata.h>
#include <kfiledialog.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
#include "kcmcgi.h"
#include "kcmcgi.moc"
extern "C"
{
- KDE_EXPORT KCModule *create_cgi( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_cgi( TQWidget *parent, const char * )
{
KGlobal::locale()->insertCatalogue("kcmcgi");
return new KCMCgi( parent, "kcmcgi" );
@@ -41,27 +41,27 @@ extern "C"
}
-KCMCgi::KCMCgi(QWidget *parent, const char *name)
+KCMCgi::KCMCgi(TQWidget *parent, const char *name)
: KCModule(parent, name)
{
setButtons(Default|Apply);
- QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this );
+ TQGroupBox *topBox = new TQGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this );
topLayout->addWidget( topBox );
- mListBox = new QListBox( topBox );
+ mListBox = new TQListBox( topBox );
- QHBox *buttonBox = new QHBox( topBox );
+ TQHBox *buttonBox = new TQHBox( topBox );
buttonBox->setSpacing( KDialog::spacingHint() );
- mAddButton = new QPushButton( i18n("Add..."), buttonBox );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addPath() ) );
+ mAddButton = new TQPushButton( i18n("Add..."), buttonBox );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addPath() ) );
- mRemoveButton = new QPushButton( i18n("Remove"), buttonBox );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removePath() ) );
- connect( mListBox, SIGNAL( clicked ( QListBoxItem * )),this, SLOT( slotItemSelected( QListBoxItem *)));
+ mRemoveButton = new TQPushButton( i18n("Remove"), buttonBox );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removePath() ) );
+ connect( mListBox, TQT_SIGNAL( clicked ( TQListBoxItem * )),this, TQT_SLOT( slotItemSelected( TQListBoxItem *)));
mConfig = new KConfig("kcmcgirc");
@@ -82,7 +82,7 @@ KCMCgi::~KCMCgi()
delete mConfig;
}
-void KCMCgi::slotItemSelected( QListBoxItem * )
+void KCMCgi::slotItemSelected( TQListBoxItem * )
{
updateButton();
}
@@ -100,7 +100,7 @@ void KCMCgi::defaults()
void KCMCgi::save()
{
- QStringList paths;
+ TQStringList paths;
uint i;
for( i = 0; i < mListBox->count(); ++i ) {
@@ -116,14 +116,14 @@ void KCMCgi::save()
void KCMCgi::load()
{
mConfig->setGroup( "General" );
- QStringList paths = mConfig->readListEntry( "Paths" );
+ TQStringList paths = mConfig->readListEntry( "Paths" );
mListBox->insertStringList( paths );
}
void KCMCgi::addPath()
{
- QString path = KFileDialog::getExistingDirectory( QString::null, this );
+ TQString path = KFileDialog::getExistingDirectory( TQString::null, this );
if ( !path.isEmpty() ) {
mListBox->insertItem( path );
@@ -142,7 +142,7 @@ void KCMCgi::removePath()
updateButton();
}
-QString KCMCgi::quickHelp() const
+TQString KCMCgi::quickHelp() const
{
return i18n("<h1>CGI Scripts</h1> The CGI KIO slave lets you execute "
"local CGI programs without the need to run a web server. "
diff --git a/kioslave/cgi/kcmcgi/kcmcgi.h b/kioslave/cgi/kcmcgi/kcmcgi.h
index 10e4e3385..344a27b4d 100644
--- a/kioslave/cgi/kcmcgi/kcmcgi.h
+++ b/kioslave/cgi/kcmcgi/kcmcgi.h
@@ -29,25 +29,25 @@ class KCMCgi : public KCModule
{
Q_OBJECT
public:
- KCMCgi( QWidget *parent = 0, const char *name = 0 );
+ KCMCgi( TQWidget *parent = 0, const char *name = 0 );
~KCMCgi();
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
public slots:
protected slots:
void addPath();
void removePath();
- void slotItemSelected( QListBoxItem * item );
+ void slotItemSelected( TQListBoxItem * item );
private:
void updateButton();
- QListBox *mListBox;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
+ TQListBox *mListBox;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
KConfig *mConfig;
};