summaryrefslogtreecommitdiffstats
path: root/kdecore/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore/tests')
-rw-r--r--kdecore/tests/KIDLTest.cpp6
-rw-r--r--kdecore/tests/KIDLTest.h4
-rw-r--r--kdecore/tests/KIDLTestClient.cpp2
-rw-r--r--kdecore/tests/cplusplustest.cpp8
-rw-r--r--kdecore/tests/dcopkonqtest.cpp8
-rw-r--r--kdecore/tests/kcalendartest.cpp16
-rw-r--r--kdecore/tests/kcharsetstest.cpp4
-rw-r--r--kdecore/tests/kcmdlineargstest.cpp2
-rw-r--r--kdecore/tests/kconfigtest.cpp32
-rw-r--r--kdecore/tests/kconfigtestgui.cpp70
-rw-r--r--kdecore/tests/kconfigtestgui.h40
-rw-r--r--kdecore/tests/kdebugtest.cpp52
-rw-r--r--kdecore/tests/kglobaltest.cpp6
-rw-r--r--kdecore/tests/kiconloadertest.cpp8
-rw-r--r--kdecore/tests/kipctest.cpp16
-rw-r--r--kdecore/tests/kipctest.h2
-rw-r--r--kdecore/tests/klocaletest.cpp70
-rw-r--r--kdecore/tests/klocaletest.h8
-rw-r--r--kdecore/tests/kmacroexpandertest.cpp24
-rw-r--r--kdecore/tests/kmdcodectest.cpp26
-rw-r--r--kdecore/tests/kprocesstest.cpp32
-rw-r--r--kdecore/tests/kprocesstest.h2
-rw-r--r--kdecore/tests/kprociotest.cpp4
-rw-r--r--kdecore/tests/kprociotest.h4
-rw-r--r--kdecore/tests/krandomsequencetest.cpp26
-rw-r--r--kdecore/tests/kresolvertest.cpp20
-rw-r--r--kdecore/tests/krfcdatetest.cpp8
-rw-r--r--kdecore/tests/kshelltest.cpp4
-rw-r--r--kdecore/tests/ksocktest.cpp14
-rw-r--r--kdecore/tests/ksortablevaluelisttest.cpp6
-rw-r--r--kdecore/tests/kstdacceltest.cpp6
-rw-r--r--kdecore/tests/kstddirstest.cpp16
-rw-r--r--kdecore/tests/kstringhandlertest.cpp6
-rw-r--r--kdecore/tests/ktempfiletest.cpp8
-rw-r--r--kdecore/tests/ktimezonestest.cpp16
-rw-r--r--kdecore/tests/kurltest.cpp128
-rw-r--r--kdecore/tests/kxerrorhandlertest.cpp2
-rw-r--r--kdecore/tests/startserviceby.cpp6
-rw-r--r--kdecore/tests/testqtargs.cpp2
39 files changed, 357 insertions, 357 deletions
diff --git a/kdecore/tests/KIDLTest.cpp b/kdecore/tests/KIDLTest.cpp
index 89e2142fc..a763f85c8 100644
--- a/kdecore/tests/KIDLTest.cpp
+++ b/kdecore/tests/KIDLTest.cpp
@@ -3,17 +3,17 @@
#include <kapplication.h>
#include <dcopclient.h>
-KIDLTest::KIDLTest( const QCString& id )
+KIDLTest::KIDLTest( const TQCString& id )
: DCOPObject( id )
{
}
-QString KIDLTest::hello( const QString& name )
+TQString KIDLTest::hello( const TQString& name )
{
qDebug("Du heter %s", name.latin1() );
qDebug("Ha det %s", name.latin1() );
- return QString("Jeg heter KIDLTest");
+ return TQString("Jeg heter KIDLTest");
}
int main( int argc, char** argv )
diff --git a/kdecore/tests/KIDLTest.h b/kdecore/tests/KIDLTest.h
index f0c4aaefd..6955bb6ca 100644
--- a/kdecore/tests/KIDLTest.h
+++ b/kdecore/tests/KIDLTest.h
@@ -7,10 +7,10 @@ class KIDLTest : virtual public DCOPObject
{
K_DCOP
public:
- KIDLTest( const QCString& id );
+ KIDLTest( const TQCString& id );
k_dcop:
- virtual QString hello( const QString& name );
+ virtual TQString hello( const TQString& name );
};
#endif
diff --git a/kdecore/tests/KIDLTestClient.cpp b/kdecore/tests/KIDLTestClient.cpp
index 0b9e45768..21125bff5 100644
--- a/kdecore/tests/KIDLTestClient.cpp
+++ b/kdecore/tests/KIDLTestClient.cpp
@@ -12,6 +12,6 @@ int main( int argc, char** argv )
KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" );
- QString ret = t->hello("Torben");
+ TQString ret = t->hello("Torben");
qDebug("Server says: %s", ret.latin1() );
}
diff --git a/kdecore/tests/cplusplustest.cpp b/kdecore/tests/cplusplustest.cpp
index 387dac014..1f789fea7 100644
--- a/kdecore/tests/cplusplustest.cpp
+++ b/kdecore/tests/cplusplustest.cpp
@@ -16,15 +16,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqdict.h>
class A { int foo; };
class B { int bar; };
class C : public A, public B { int foobar; };
-QDict<A> dictA;
-QDict<B> dictB;
+TQDict<A> dictA;
+TQDict<B> dictB;
int main(int , char *[])
{
diff --git a/kdecore/tests/dcopkonqtest.cpp b/kdecore/tests/dcopkonqtest.cpp
index 95dd726e3..8830d34c7 100644
--- a/kdecore/tests/dcopkonqtest.cpp
+++ b/kdecore/tests/dcopkonqtest.cpp
@@ -9,12 +9,12 @@ int main( int argc, char** argv )
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
- QByteArray data;
+ TQByteArray data;
kdDebug() << "sending reparseConfiguration to object KonquerorIface in konqueror" << endl;
- QByteArray snd;
- QByteArray rcv;
- QCString _type_;
+ TQByteArray snd;
+ TQByteArray rcv;
+ TQCString _type_;
kapp->dcopClient()->call( "konqueror", "KonquerorIface", "reparseConfiguration()", snd, _type_, rcv );
kdDebug() << _type_ << endl;
if( _type_ != "void" ) kdDebug() << "void expected, " << _type_.data() << " returned" << endl;
diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp
index 18b4fc297..51a40b892 100644
--- a/kdecore/tests/kcalendartest.cpp
+++ b/kdecore/tests/kcalendartest.cpp
@@ -5,7 +5,7 @@
#include "kcalendarsystemfactory.h"
#include "kcalendarsystem.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -16,7 +16,7 @@
class KLocale;
-void test(QDate & date);
+void test(TQDate & date);
static const char description[] = "KCalendarTest";
@@ -29,8 +29,8 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv) {
- QDate date;
- QString calType, option;
+ TQDate date;
+ TQString calType, option;
KAboutData aboutData( "kcalendartest", "KCalendarTest" ,
"0.1", description, KAboutData::License_GPL,
@@ -46,9 +46,9 @@ int main(int argc, char **argv) {
KApplication app(false, false);
- QStringList lst = KCalendarSystemFactory::calendarSystems();
+ TQStringList lst = KCalendarSystemFactory::calendarSystems();
kdDebug() << "Supported calendar types: " << endl;
- for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
+ for (TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
kdDebug() << *it << endl;
kdDebug() << endl;
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
option = args->getOption("date");
date = KGlobal::locale()->readDate(option);
} else
- date = QDate::currentDate();
+ date = TQDate::currentDate();
args->clear(); // Free up some memory.
@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
}
-void test(QDate & date) {
+void test(TQDate & date) {
kdDebug() << "(KLocale) readDate" << endl;
diff --git a/kdecore/tests/kcharsetstest.cpp b/kdecore/tests/kcharsetstest.cpp
index de281d3d9..09b9486c0 100644
--- a/kdecore/tests/kcharsetstest.cpp
+++ b/kdecore/tests/kcharsetstest.cpp
@@ -5,8 +5,8 @@
int main()
{
- QString input( "&lt;Hello &amp;World&gt;" );
- QString output = KCharsets::resolveEntities( input );
+ TQString input( "&lt;Hello &amp;World&gt;" );
+ TQString output = KCharsets::resolveEntities( input );
assert( output == "<Hello &World>" );
return 0;
}
diff --git a/kdecore/tests/kcmdlineargstest.cpp b/kdecore/tests/kcmdlineargstest.cpp
index 2d6c7ecd2..0ad9807c9 100644
--- a/kdecore/tests/kcmdlineargstest.cpp
+++ b/kdecore/tests/kcmdlineargstest.cpp
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
}
// Read the value of an option.
- QCString baudrate = args->getOption("baud"); // 9600 is the default value.
+ TQCString baudrate = args->getOption("baud"); // 9600 is the default value.
printf("Baudrate = %s\n", baudrate.data());
diff --git a/kdecore/tests/kconfigtest.cpp b/kdecore/tests/kconfigtest.cpp
index 5ec4c309f..1842b5036 100644
--- a/kdecore/tests/kconfigtest.cpp
+++ b/kdecore/tests/kconfigtest.cpp
@@ -44,11 +44,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
#define STRINGENTRY5 " "
#define STRINGENTRY6 ""
#define LOCAL8BITENTRY "Hello äöü"
-#define POINTENTRY QPoint( 4351, 1235 )
-#define SIZEENTRY QSize( 10, 20 )
-#define RECTENTRY QRect( 10, 23, 5321, 13 )
-#define DATETIMEENTRY QDateTime( QDate( 2002, 06, 23 ), QTime( 12, 55, 40 ) )
-#define STRINGLISTENTRY QStringList( "Hello," )
+#define POINTENTRY TQPoint( 4351, 1235 )
+#define SIZEENTRY TQSize( 10, 20 )
+#define RECTENTRY TQRect( 10, 23, 5321, 13 )
+#define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) )
+#define STRINGLISTENTRY TQStringList( "Hello," )
void KConfigTest::writeConfigFile()
{
@@ -62,7 +62,7 @@ void KConfigTest::writeConfigFile()
sc.writeEntry( "boolEntry1", BOOLENTRY1 );
sc.writeEntry( "boolEntry2", BOOLENTRY2 );
- sc.writeEntry( "Test", QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ sc.writeEntry( "Test", TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
sc.writeEntry( "Test2", "");
sc.writeEntry( "stringEntry1", STRINGENTRY1 );
sc.writeEntry( "stringEntry2", STRINGENTRY2 );
@@ -119,29 +119,29 @@ void KConfigTest::allTests()
sc2.setGroup("AAA");
CHECK( sc2.hasKey( "stringEntry1" ), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
CHECK( sc2.entryIsImmutable("stringEntry1"), bImmutable );
CHECK( sc2.hasKey( "stringEntry2" ), false );
- CHECK( sc2.readEntry( "stringEntry2", "bla" ), QString( "bla" ) );
+ CHECK( sc2.readEntry( "stringEntry2", "bla" ), TQString( "bla" ) );
CHECK( sc2.hasDefault( "stringEntry1" ), false );
sc2.setGroup("Hello");
- CHECK( sc2.readEntry( "Test" ), QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ CHECK( sc2.readEntry( "Test" ), TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
CHECK( sc2.readEntry("Test2", "Fietsbel").isEmpty(), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
- CHECK( sc2.readEntry( "stringEntry2" ), QString( STRINGENTRY2 ) );
- CHECK( sc2.readEntry( "stringEntry3" ), QString( STRINGENTRY3 ) );
- CHECK( sc2.readEntry( "stringEntry4" ), QString( STRINGENTRY4 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry2" ), TQString( STRINGENTRY2 ) );
+ CHECK( sc2.readEntry( "stringEntry3" ), TQString( STRINGENTRY3 ) );
+ CHECK( sc2.readEntry( "stringEntry4" ), TQString( STRINGENTRY4 ) );
CHECK( sc2.hasKey( "stringEntry5" ), false);
- CHECK( sc2.readEntry( "stringEntry5", "test" ), QString( "test" ) );
+ CHECK( sc2.readEntry( "stringEntry5", "test" ), TQString( "test" ) );
CHECK( sc2.hasKey( "stringEntry6" ), false);
- CHECK( sc2.readEntry( "stringEntry6", "foo" ), QString( "foo" ) );
+ CHECK( sc2.readEntry( "stringEntry6", "foo" ), TQString( "foo" ) );
CHECK( sc2.readBoolEntry( "boolEntry1" ), BOOLENTRY1 );
CHECK( sc2.readBoolEntry( "boolEntry2" ), BOOLENTRY2 );
#if 0
- QString s;
+ TQString s;
s = sc2.readEntry( "keywith=equalsign" );
fprintf(stderr, "comparing keywith=equalsign %s with %s -> ", STRINGENTRY1, s.latin1());
if (s == STRINGENTRY1)
diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp
index 6dbf98e52..abd476396 100644
--- a/kdecore/tests/kconfigtestgui.cpp
+++ b/kdecore/tests/kconfigtestgui.cpp
@@ -30,19 +30,19 @@
#include <unistd.h>
#include <stdlib.h>
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
#include <config.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kconfig.h>
@@ -59,8 +59,8 @@
// Construct the KConfigTestView with buttons
//
-KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
- : QDialog( parent, name ),
+KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
+ : TQDialog( parent, name ),
pConfig( 0L ),
pFile( 0L ),
pStream( 0L )
@@ -70,61 +70,61 @@ KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
setCaption( "KConfig test" );
// Label and edit for the app config file
- pAppFileLabel = new QLabel( this, "appconfiglabel" );
+ pAppFileLabel = new TQLabel( this, "appconfiglabel" );
pAppFileLabel->setText( "Application config file:" );
pAppFileLabel->setGeometry( 20, 20, 200, 20 );
- pAppFileEdit = new QLineEdit( this, "appconfigedit" );
+ pAppFileEdit = new TQLineEdit( this, "appconfigedit" );
pAppFileEdit->setGeometry( 240, 20, 160, 20 );
- connect( pAppFileEdit, SIGNAL(returnPressed()),
- SLOT(appConfigEditReturnPressed()));
+ connect( pAppFileEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(appConfigEditReturnPressed()));
// Label and edit for the group
- pGroupLabel = new QLabel( this, "grouplabel" );
+ pGroupLabel = new TQLabel( this, "grouplabel" );
pGroupLabel->setText( "Group:" );
pGroupLabel->setGeometry( 20, 60, 80, 20 );
- pGroupEdit = new QLineEdit( this, "groupedit" );
+ pGroupEdit = new TQLineEdit( this, "groupedit" );
pGroupEdit->setGeometry( 120, 60, 100, 20 );
- connect( pGroupEdit, SIGNAL(returnPressed()),
- SLOT(groupEditReturnPressed()));
+ connect( pGroupEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(groupEditReturnPressed()));
// Edit and label for the key/value pair
- pKeyEdit = new QLineEdit( this, "keyedit" );
+ pKeyEdit = new TQLineEdit( this, "keyedit" );
pKeyEdit->setGeometry( 20, 100, 80, 20 );
- connect( pKeyEdit, SIGNAL( returnPressed()),
- SLOT(keyEditReturnPressed()));
+ connect( pKeyEdit, TQT_SIGNAL( returnPressed()),
+ TQT_SLOT(keyEditReturnPressed()));
- pEqualsLabel = new QLabel( this, "equalslabel" );
+ pEqualsLabel = new TQLabel( this, "equalslabel" );
pEqualsLabel->setGeometry( 105, 100, 20, 20 );
pEqualsLabel->setText( "=" );
- pValueEdit = new QLineEdit( this, "valueedit" );
+ pValueEdit = new TQLineEdit( this, "valueedit" );
pValueEdit->setGeometry( 120, 100, 100, 20 );
pValueEdit->setText( "---" );
- pWriteButton = new QPushButton( this, "writebutton" );
+ pWriteButton = new TQPushButton( this, "writebutton" );
pWriteButton->setGeometry( 20,140, 80, 20 );
pWriteButton->setText( "Write entry" );
- connect( pWriteButton, SIGNAL(clicked()), SLOT( writeButtonClicked() ) );
+ connect( pWriteButton, TQT_SIGNAL(clicked()), TQT_SLOT( writeButtonClicked() ) );
// Labels for the info line
- pInfoLabel1 = new QLabel( this, "infolabel1" );
+ pInfoLabel1 = new TQLabel( this, "infolabel1" );
pInfoLabel1->setGeometry( 20, 200, 60, 20 );
pInfoLabel1->setText( "Info:" );
- pInfoLabel2 = new QLabel( this, "infolabel2" );
+ pInfoLabel2 = new TQLabel( this, "infolabel2" );
pInfoLabel2->setGeometry( 100, 200, 300, 20 );
- pInfoLabel2->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ pInfoLabel2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// Quit button
- pQuitButton = new QPushButton( this, "quitbutton" );
+ pQuitButton = new TQPushButton( this, "quitbutton" );
pQuitButton->setText( "Quit" );
pQuitButton->setGeometry( 340, 60, 60, 60 );
- connect( pQuitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
+ connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) );
// create a default KConfig object in order to be able to start right away
- pConfig = new KConfig( QString::null );
+ pConfig = new KConfig( TQString::null );
}
KConfigTestView::~KConfigTestView()
@@ -156,15 +156,15 @@ void KConfigTestView::groupEditReturnPressed()
pConfig->setGroup( pGroupEdit->text() );
// according to the Qt doc, this is begging for trouble, but for a
// test program this will do
- QString aText;
- aText.sprintf( "Group set to %s", QString( pConfig->group() ).isEmpty() ?
- QString("<default>").ascii() : pConfig->group().ascii() );
+ TQString aText;
+ aText.sprintf( "Group set to %s", TQString( pConfig->group() ).isEmpty() ?
+ TQString("<default>").ascii() : pConfig->group().ascii() );
pInfoLabel2->setText( aText );
}
void KConfigTestView::keyEditReturnPressed()
{
- QString aValue = pConfig->readEntry( pKeyEdit->text() );
+ TQString aValue = pConfig->readEntry( pKeyEdit->text() );
// just checking aValue.isNull() would be easier here, but this is
// to demonstrate the HasKey()-method. Besides, it is better data
// encapsulation because we do not make any assumption about coding
@@ -183,7 +183,7 @@ void KConfigTestView::keyEditReturnPressed()
void KConfigTestView::writeButtonClicked()
{
- pConfig->writeEntry( pKeyEdit->text(), QString( pValueEdit->text() ) );
+ pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) );
pInfoLabel2->setText( "Entry written" );
kdDebug() << "Entry written: " << 27 << endl;
diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h
index e293000f5..8311952b5 100644
--- a/kdecore/tests/kconfigtestgui.h
+++ b/kdecore/tests/kconfigtestgui.h
@@ -20,18 +20,18 @@
#define _KCONFIG_TEST_H
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
@@ -43,7 +43,7 @@ class KConfigTestView : public QDialog
{
Q_OBJECT
public:
- KConfigTestView( QWidget *parent=0, const char *name=0 );
+ KConfigTestView( TQWidget *parent=0, const char *name=0 );
~KConfigTestView();
private slots:
@@ -53,20 +53,20 @@ private slots:
void writeButtonClicked();
private:
- QLabel* pAppFileLabel;
- QLineEdit* pAppFileEdit;
- QLabel* pGroupLabel;
- QLineEdit* pGroupEdit;
- QLineEdit* pKeyEdit;
- QLabel* pEqualsLabel;
- QLineEdit* pValueEdit;
- QPushButton* pWriteButton;
- QLabel* pInfoLabel1, *pInfoLabel2;
- QPushButton* pQuitButton;
+ TQLabel* pAppFileLabel;
+ TQLineEdit* pAppFileEdit;
+ TQLabel* pGroupLabel;
+ TQLineEdit* pGroupEdit;
+ TQLineEdit* pKeyEdit;
+ TQLabel* pEqualsLabel;
+ TQLineEdit* pValueEdit;
+ TQPushButton* pWriteButton;
+ TQLabel* pInfoLabel1, *pInfoLabel2;
+ TQPushButton* pQuitButton;
KConfig* pConfig;
- QFile* pFile;
- QTextStream* pStream;
+ TQFile* pFile;
+ TQTextStream* pStream;
};
#endif
diff --git a/kdecore/tests/kdebugtest.cpp b/kdecore/tests/kdebugtest.cpp
index d97fb671b..ee49127ea 100644
--- a/kdecore/tests/kdebugtest.cpp
+++ b/kdecore/tests/kdebugtest.cpp
@@ -1,27 +1,27 @@
#include "kdebug.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kinstance.h>
#include <iostream>
-#include <qapplication.h>
-#include <qpen.h>
-#include <qvariant.h>
+#include <tqapplication.h>
+#include <tqpen.h>
+#include <tqvariant.h>
class TestWidget : public QWidget
{
public:
- TestWidget(QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TestWidget(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
kdDebug().form("mytest %s", "hello") << endl;
- QString test = "%20C this is a string";
+ TQString test = "%20C this is a string";
kdDebug(150) << test << endl;
- QCString cstr = test.latin1();
+ TQCString cstr = test.latin1();
kdDebug(150) << test << endl;
- QChar ch = 'a';
- kdDebug() << "QChar a: " << ch << endl;
+ TQChar ch = 'a';
+ kdDebug() << "TQChar a: " << ch << endl;
ch = '\r';
- kdDebug() << "QChar \\r: " << ch << endl;
+ kdDebug() << "TQChar \\r: " << ch << endl;
kdDebug() << k_lineinfo << "error on this line" << endl;
kdDebug(2 == 2) << "this is right " << perror << endl;
kdDebug() << "Before instance creation" << endl;
@@ -32,42 +32,42 @@ public:
// kdDebug() << "This number should come out as appname " << 5 << " " << "test" << endl;
kdWarning() << "1+1 = " << 1+1+1 << endl;
kdError(1+1 != 2) << "there is something really odd!" << endl;
- QString s = "mystring";
+ TQString s = "mystring";
kdDebug() << s << endl;
kdError(1202) << "Error !!!" << endl;
kdError() << "Error with no area" << endl;
- kdDebug() << "Printing a null QWidget pointer: " << (QWidget*)0 << endl;
+ kdDebug() << "Printing a null TQWidget pointer: " << (TQWidget*)0 << endl;
kdDebug() << "char " << '^' << " " << char(26) << endl;
- QPoint p(0,9);
+ TQPoint p(0,9);
kdDebug() << p << endl;
- QRect r(9,12,58,234);
+ TQRect r(9,12,58,234);
kdDebug() << r << endl;
- QRegion reg(r);
- reg += QRect(1,60,200,59);
+ TQRegion reg(r);
+ reg += TQRect(1,60,200,59);
kdDebug() << reg << endl;
- QStringList sl;
+ TQStringList sl;
sl << "hi" << "this" << "list" << "is" << "short";
kdDebug() << sl << endl;
- QValueList<int> il;
- kdDebug() << "Empty QValueList<int>: " << il << endl;
+ TQValueList<int> il;
+ kdDebug() << "Empty TQValueList<int>: " << il << endl;
il << 1 << 2 << 3 << 4 << 5;
- kdDebug() << "QValueList<int> filled: " << il << endl;
+ kdDebug() << "TQValueList<int> filled: " << il << endl;
Q_LLONG big = 65536LL*65536*500;
kdDebug() << big << endl;
- QVariant v( 0.12345 );
+ TQVariant v( 0.12345 );
kdDebug() << "Variant: " << v << endl;
- v = QPen( Qt::red );
+ v = TQPen( Qt::red );
kdDebug() << "Variant: " << v << endl;
- QByteArray data( 6 );
+ TQByteArray data( 6 );
data[0] = 42;
data[1] = 'H';
data[2] = 'e';
@@ -79,7 +79,7 @@ public:
data.fill( 42 );
kdDebug() << data << endl;
}
- void resizeEvent(QResizeEvent*)
+ void resizeEvent(TQResizeEvent*)
{
kdDebug() << this << endl;
}
@@ -87,7 +87,7 @@ public:
int main(int argc, char** argv)
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
TestWidget widget(0, "NoNameWidget");
widget.setGeometry(45, 54, 120, 80);
widget.show();
diff --git a/kdecore/tests/kglobaltest.cpp b/kdecore/tests/kglobaltest.cpp
index 90332e3e6..d03be209e 100644
--- a/kdecore/tests/kglobaltest.cpp
+++ b/kdecore/tests/kglobaltest.cpp
@@ -8,12 +8,12 @@
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kiconloadertest.cpp b/kdecore/tests/kiconloadertest.cpp
index 77930218c..96a7a6813 100644
--- a/kdecore/tests/kiconloadertest.cpp
+++ b/kdecore/tests/kiconloadertest.cpp
@@ -1,5 +1,5 @@
#include <kiconloader.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#include <kapplication.h>
#include <stdlib.h>
@@ -11,16 +11,16 @@ int main(int argc, char *argv[])
KIconLoader * mpLoader = KGlobal::iconLoader();
KIcon::Context mContext = KIcon::Application;
- QTime dt;
+ TQTime dt;
dt.start();
int count = 0;
for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
{
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
- QStringList filelist=mpLoader->queryIcons(mGroup, mContext);
+ TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
kdDebug() << " -> found " << filelist.count() << " icons." << endl;
int i=0;
- for(QStringList::Iterator it = filelist.begin();
+ for(TQStringList::Iterator it = filelist.begin();
it != filelist.end() /*&& i<10*/;
++it, ++i )
{
diff --git a/kdecore/tests/kipctest.cpp b/kdecore/tests/kipctest.cpp
index 15daa24d9..136aa6d70 100644
--- a/kdecore/tests/kipctest.cpp
+++ b/kdecore/tests/kipctest.cpp
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kapplication.h>
#include <kipc.h>
#include "kipctest.h"
MyObject::MyObject()
- : QObject(0L, "testobj")
+ : TQObject(0L, "testobj")
{
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(slotPaletteChanged()));
- connect(kapp, SIGNAL(kdisplayFontChanged()), SLOT(slotFontChanged()));
- connect(kapp, SIGNAL(kdisplayStyleChanged()), SLOT(slotStyleChanged()));
- connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)));
- connect(kapp, SIGNAL(appearanceChanged()), SLOT(slotAppearanceChanged()));
- connect(kapp, SIGNAL(kipcMessage(int,int)), SLOT(slotMessage(int,int)));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(slotFontChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
+ connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotAppearanceChanged()));
+ connect(kapp, TQT_SIGNAL(kipcMessage(int,int)), TQT_SLOT(slotMessage(int,int)));
}
int main(int argc, char **argv)
diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h
index 5a9a18467..a8abd2e76 100644
--- a/kdecore/tests/kipctest.h
+++ b/kdecore/tests/kipctest.h
@@ -1,7 +1,7 @@
#ifndef __blah__h__
#define __blah__h__
-#include <qobject.h>
+#include <tqobject.h>
class MyObject: public QObject
{
diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp
index acec373de..a980359b0 100644
--- a/kdecore/tests/klocaletest.cpp
+++ b/kdecore/tests/klocaletest.cpp
@@ -8,8 +8,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qdatetime.h>
-#include <qlabel.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
#include <kglobal.h>
#include <kglobalsettings.h>
@@ -20,12 +20,12 @@
#include "klocaletest.h"
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -36,7 +36,7 @@ bool check(QString txt, QString a, QString b)
return true;
}
-bool checkDate(QString txt, QDate a, QDate b)
+bool checkDate(TQString txt, TQDate a, TQDate b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a.toString() << "' against expected value '" << b.toString() << "'... " << "ok" << endl;
@@ -48,12 +48,12 @@ bool checkDate(QString txt, QDate a, QDate b)
return true;
}
-Test::Test( QWidget *parent, const char *name )
- : QWidget( parent, name )
+Test::Test( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setCaption("Testing KLocale");
- QWidget *d = qApp->desktop();
+ TQWidget *d = qApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
createFields();
@@ -67,7 +67,7 @@ Test::~Test()
void Test::createFields()
{
- QString string;
+ TQString string;
string+="Selected languages: ";
string+=KGlobal::locale()->languages()+"\n";
@@ -77,21 +77,21 @@ void Test::createFields()
string+="Used language: ";
string+=KGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=QString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
string+="\nLocalized monetary numbers: ";
string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
- string+=QString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
- string+=QString::fromLatin1("No = ")+i18n("No")+"\n";
- string+=QString::fromLatin1("Help = ")+i18n("Help")+"\n";
- string+=QString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
+ string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
+ string+=TQString::fromLatin1("No = ")+i18n("No")+"\n";
+ string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n";
+ string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
- label=new QLabel(string,this,"Label");
+ label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
label->setFont(KGlobalSettings::generalFont());
label->show();
@@ -102,11 +102,11 @@ int main( int argc, char ** argv )
KLocale::setMainCatalogue("kdelibs");
KApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(QString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(QString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(QString::fromLatin1(","));
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
+ KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
+ KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
- QString formatted;
+ TQString formatted;
formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
@@ -139,7 +139,7 @@ int main( int argc, char ** argv )
num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
- qDebug( "%s", QString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
+ qDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
KLocale locale(*KGlobal::locale());
@@ -149,18 +149,18 @@ int main( int argc, char ** argv )
num = locale.readMoney("-1,234,567.89$$", &ok);
check("readMoney(-1,234,567.89$$)",ok?"yes":"no","yes");
- QDate date;
+ TQDate date;
date.setYMD( 2002, 5, 3 );
checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- date = QDate::currentDate();
- checkDate("readDate( QDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ date = TQDate::currentDate();
+ checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- QTime time;
+ TQTime time;
time = KGlobal::locale()->readTime( "11:22:33", &ok );
- check("readTime(\"11:22:33\")", (ok && time == QTime(11, 22, 33)) ?
+ check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "11:22", &ok );
- check("readTime(\"11:22\")", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "foo", &ok );
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
@@ -170,23 +170,23 @@ int main( int argc, char ** argv )
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
- check("readTime(\"11:22\", WithoutSeconds)", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
KGlobal::locale()->setTimeFormat( "%H:%M %p" );
- time = QTime( 0, 22, 33 );
- QString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
+ time = TQTime( 0, 22, 33 );
+ TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" );
timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("C"));
- kdDebug() << "C: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("de"));
- kdDebug() << "de: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
Test m;
diff --git a/kdecore/tests/klocaletest.h b/kdecore/tests/klocaletest.h
index 7b6cb328e..ad24a75cd 100644
--- a/kdecore/tests/klocaletest.h
+++ b/kdecore/tests/klocaletest.h
@@ -3,7 +3,7 @@
#ifndef KLOCALETEST_H
#define KLOCALETEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
@@ -18,15 +18,15 @@ public:
//@{
/** Constructor
*/
- Test( QWidget *parent=0, const char *name=0 );
+ Test( TQWidget *parent=0, const char *name=0 );
/** Destructor
*/
~Test();
private:
- QString showLocale(QString cat);
+ TQString showLocale(TQString cat);
void createFields();
- QLabel *label;
+ TQLabel *label;
};
#endif // TEST_H
diff --git a/kdecore/tests/kmacroexpandertest.cpp b/kdecore/tests/kmacroexpandertest.cpp
index 6c92ba935..0c41a309b 100644
--- a/kdecore/tests/kmacroexpandertest.cpp
+++ b/kdecore/tests/kmacroexpandertest.cpp
@@ -6,12 +6,12 @@
#include <stdlib.h>
-bool check(QString txt, QString s, QString a, QString b)
+bool check(TQString txt, TQString s, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b)
kdDebug() << txt << " (" << s << ") : '" << a << "' - ok" << endl;
else {
@@ -25,10 +25,10 @@ class MyCExpander : public KCharMacroExpander {
public:
MyCExpander() : KCharMacroExpander() {}
protected:
- bool expandMacro(QChar chr, QStringList &ret)
+ bool expandMacro(TQChar chr, TQStringList &ret)
{
if (chr == 'm') {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -39,10 +39,10 @@ class MyWExpander : public KWordMacroExpander {
public:
MyWExpander() : KWordMacroExpander() {}
protected:
- bool expandMacro(const QString &str, QStringList &ret)
+ bool expandMacro(const TQString &str, TQStringList &ret)
{
if (str == "macro") {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -53,11 +53,11 @@ int main(int argc, char *argv[])
{
KCmdLineArgs::init(argc, argv, ":", "", "", "");
KApplication app(false,false);
- QString s, s2;
+ TQString s, s2;
- QMap<QChar,QStringList> map1;
+ TQMap<TQChar,TQStringList> map1;
map1.insert('n', "Restaurant \"Chew It\"");
- QStringList li;
+ TQStringList li;
li << "element1" << "'element2'";
map1.insert('l', li);
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
s = "text \"%l %n\" text";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map1), "text \"element1 'element2' Restaurant \\\"Chew It\\\"\" text");
- QMap<QChar,QString> map;
+ TQMap<TQChar,TQString> map;
map.insert('a', "%n");
map.insert('f', "filename.txt");
map.insert('u', "http://www.kde.org/index.html");
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
s = "kedit --caption \"`echo %n`\" %f";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"$( echo 'Restaurant `echo hello`')\" 'filename.txt'");
- QMap<QString,QString> smap;
+ TQMap<TQString,TQString> smap;
smap.insert("foo", "%n");
smap.insert("file", "filename.txt");
smap.insert("url", "http://www.kde.org/index.html");
diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp
index 1156f03f2..243d0d289 100644
--- a/kdecore/tests/kmdcodectest.cpp
+++ b/kdecore/tests/kmdcodectest.cpp
@@ -23,8 +23,8 @@
#include <iostream>
-#include <qbuffer.h>
-#include <qfile.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
@@ -57,7 +57,7 @@ void MD5_verify (const char*, const char*, bool);
void MD5_file (const char * , bool rawOutput = false);
void MD5_string (const char *, const char *expected = 0, bool rawOutput = false);
-long readContent (const QFile& f, long count, QByteArray& buf)
+long readContent (const TQFile& f, long count, TQByteArray& buf)
{
long result;
int old_size;
@@ -85,14 +85,14 @@ long readContent (const QFile& f, long count, QByteArray& buf)
void testCodec (const char* msg, Codec type, bool isFile)
{
- QByteArray output;
+ TQByteArray output;
if ( isFile )
{
int count;
- QByteArray data;
+ TQByteArray data;
- QFile f (QFile::encodeName(msg));
+ TQFile f (TQFile::encodeName(msg));
if (!f.exists())
{
@@ -147,12 +147,12 @@ void testCodec (const char* msg, Codec type, bool isFile)
break;
}
- QCString result (output.data(), output.size()+1);
+ TQCString result (output.data(), output.size()+1);
cout << "Result: " << endl << result << endl;
}
else
{
- QCString result;
+ TQCString result;
const size_t len = strlen(msg);
output.resize(len);
@@ -246,13 +246,13 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
if ( !isFile )
{
- context.update (QCString(input));
+ context.update (TQCString(input));
result = context.verify( digest );
cout << "Input string: " << input << endl;
}
else
{
- QFile f (input);
+ TQFile f (input);
if (!f.open (IO_ReadOnly))
{
@@ -273,7 +273,7 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
void MD5_file (const char *filename, bool rawOutput )
{
- QFile f (QFile::encodeName(filename));
+ TQFile f (TQFile::encodeName(filename));
if (!f.open(IO_ReadOnly))
{
@@ -296,7 +296,7 @@ void MD5_file (const char *filename, bool rawOutput )
void MD5_string (const char *input, const char* expected, bool rawOutput )
{
KMD5 context;
- context.update (QCString(input));
+ context.update (TQCString(input));
cout << "Checking MD5 for: " << input << endl;
@@ -372,7 +372,7 @@ int main (int argc, char *argv[])
{
const char* opt = args->getOption( "c" ).data();
for ( int i=0 ; i < count; i++ )
- MD5_verify ( QCString(args->arg(i)), opt, (isString || !isFile) );
+ MD5_verify ( TQCString(args->arg(i)), opt, (isString || !isFile) );
}
else
{
diff --git a/kdecore/tests/kprocesstest.cpp b/kdecore/tests/kprocesstest.cpp
index 79769a90d..af04cd421 100644
--- a/kdecore/tests/kprocesstest.cpp
+++ b/kdecore/tests/kprocesstest.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
//
p1 << "kghostview";
- QObject::connect(&p1, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
printf("starting kghostview blocking (close to continue)\n");
p1.start(KProcess::Block);
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
printf("Starting konsole with /bin/tcsh as shell (close to continue)\n");
p2 << "konsole" << "-e" << "/bin/tcsh";
p2.setWorkingDirectory("/tmp");
- QObject::connect(&p2, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p2, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
p2.start(KProcess::Block);
//
@@ -70,13 +70,13 @@ int main(int argc, char *argv[])
//
p3 << "ls" << "-l";
- QObject::connect(&p3, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p3, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p3, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
p3.start(KProcess::NotifyOnExit, KProcess::AllOutput);
@@ -93,16 +93,16 @@ int main(int argc, char *argv[])
//
p4 << "sort";
- QObject::connect(&p4, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p4, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(wroteStdin(KProcess *)),
- &dummy, SLOT(outputDone(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(KProcess *)),
+ &dummy, TQT_SLOT(outputDone(KProcess *)));
p4.start(KProcess::NotifyOnExit, KProcess::All);
printf("after p4.start");
diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h
index 193895510..3e5d989ec 100644
--- a/kdecore/tests/kprocesstest.h
+++ b/kdecore/tests/kprocesstest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocess.h"
class Dummy : public QObject
diff --git a/kdecore/tests/kprociotest.cpp b/kdecore/tests/kprociotest.cpp
index 7585b7657..446dacb30 100644
--- a/kdecore/tests/kprociotest.cpp
+++ b/kdecore/tests/kprociotest.cpp
@@ -41,8 +41,8 @@ int main(int argc, char *argv[])
p << "rev";
- p.connect(&p, SIGNAL(processExited(KProcess*)), &dummy, SLOT(printMessage(KProcess*)));
- p.connect(&p, SIGNAL(readReady(KProcIO*)), &dummy, SLOT(gotOutput(KProcIO*)));
+ p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*)));
+ p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*)));
bool b;
diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h
index a7bb36f0f..6392fc708 100644
--- a/kdecore/tests/kprociotest.h
+++ b/kdecore/tests/kprociotest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocio.h"
class Dummy : public QObject
@@ -27,7 +27,7 @@ class Dummy : public QObject
void gotOutput(KProcIO*proc)
{
- QString line;
+ TQString line;
while(true) {
int result = proc->readln(line);
if (result == -1) return;
diff --git a/kdecore/tests/krandomsequencetest.cpp b/kdecore/tests/krandomsequencetest.cpp
index 215349a05..8f337c2f1 100644
--- a/kdecore/tests/krandomsequencetest.cpp
+++ b/kdecore/tests/krandomsequencetest.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "krandomsequence.h"
#include "kapplication.h"
@@ -56,34 +56,34 @@ main(int argc, char *argv[])
seq.setSeed(kapp->random());
- QPtrList<QString> list;
- list.append(new QString("A"));
- list.append(new QString("B"));
- list.append(new QString("C"));
- list.append(new QString("D"));
- list.append(new QString("E"));
- list.append(new QString("F"));
- list.append(new QString("G"));
+ TQPtrList<TQString> list;
+ list.append(new TQString("A"));
+ list.append(new TQString("B"));
+ list.append(new TQString("C"));
+ list.append(new TQString("D"));
+ list.append(new TQString("E"));
+ list.append(new TQString("F"));
+ list.append(new TQString("G"));
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp
index 30003265a..f1d3c11f9 100644
--- a/kdecore/tests/kresolvertest.cpp
+++ b/kdecore/tests/kresolvertest.cpp
@@ -33,8 +33,8 @@
#include <sys/socket.h>
#include <unistd.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kuniqueapplication.h>
#include <ksocks.h>
@@ -69,17 +69,17 @@ public:
KUniqueApplication()
{ }
- int newInstance(QValueList<QCString> params);
+ int newInstance(TQValueList<TQCString> params);
};
bool tryLookup(const char* node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -138,11 +138,11 @@ bool try_pton()
bool tryLookup6(const char *node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -403,7 +403,7 @@ void go()
printf("\n\nTest finished\n");
}
-int TestApp::newInstance(QValueList<QCString> /*params*/)
+int TestApp::newInstance(TQValueList<TQCString> /*params*/)
{
go();
}
diff --git a/kdecore/tests/krfcdatetest.cpp b/kdecore/tests/krfcdatetest.cpp
index 1c1957b54..368a1106f 100644
--- a/kdecore/tests/krfcdatetest.cpp
+++ b/kdecore/tests/krfcdatetest.cpp
@@ -4,10 +4,10 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <krfcdate.h>
-bool check(QString txt, time_t a, time_t b)
+bool check(TQString txt, time_t a, time_t b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -71,9 +71,9 @@ int main(int argc, char *argv[])
// empty/null strings
- check("parseDateISO8601(QString())", KRFCDate::parseDateISO8601(QString()), b);
+ check("parseDateISO8601(TQString())", KRFCDate::parseDateISO8601(TQString()), b);
check("parseDateISO8601(\"\")", KRFCDate::parseDateISO8601(""), b);
- check("parseDate(QString())", KRFCDate::parseDate(QString()), b);
+ check("parseDate(TQString())", KRFCDate::parseDate(TQString()), b);
check("parseDate(\"\")", KRFCDate::parseDate(""), b);
printf("\nTest OK !\n");
diff --git a/kdecore/tests/kshelltest.cpp b/kdecore/tests/kshelltest.cpp
index eaca1fcbe..394394e28 100644
--- a/kdecore/tests/kshelltest.cpp
+++ b/kdecore/tests/kshelltest.cpp
@@ -3,7 +3,7 @@
#include <iostream>
static QCString
-ps(const QString &s)
+ps(const TQString &s)
{
if (s.isNull())
return "(null)";
@@ -34,7 +34,7 @@ int main()
tx("~sulli");
#endif
#if 1
- QStringList lst;
+ TQStringList lst;
lst << "this" << "is" << "text";
std::cout << KShell::joinArgs(lst).latin1() << std::endl;
#endif
diff --git a/kdecore/tests/ksocktest.cpp b/kdecore/tests/ksocktest.cpp
index 89b59c62a..042701c93 100644
--- a/kdecore/tests/ksocktest.cpp
+++ b/kdecore/tests/ksocktest.cpp
@@ -37,12 +37,12 @@
#include <arpa/inet.h>
#include <netdb.h>
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
KApplication app;
- QString host, port;
+ TQString host, port;
KInetSocketAddress host_address("213.203.58.36", 80);
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
printf( "resolve result: %d\n", result );
check("KExtendedSocket::resolve() host=", host, "www.kde.org");
// check("KExtendedSocket::resolve() port=", port, "http");
- QPtrList<KAddressInfo> list;
+ TQPtrList<KAddressInfo> list;
list = KExtendedSocket::lookup("www.kde.org", "http", KExtendedSocket::inetSocket);
for(KAddressInfo *info = list.first(); info; info = list.next())
{
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
int err;
- QPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
+ TQPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
for (KAddressInfo *x = cns.first(); x; x = cns.next()) {
const char *canon = x->canonname();
qWarning( "Lookup: %s", canon ? canon : "<Null>");
@@ -96,7 +96,7 @@ main(int argc, char *argv[])
check("KExtendedSocket::lookup() canonical", cns.first()->canonname(), "www.kde.org");
KExtendedSocket * sock2 = new KExtendedSocket( "www.kde.org", 80 );
- check( "KExtendedSocket ctor / connect", QString::number( sock2->connect() ), "0" );
+ check( "KExtendedSocket ctor / connect", TQString::number( sock2->connect() ), "0" );
printf("FD %d\n", sock2->fd());
diff --git a/kdecore/tests/ksortablevaluelisttest.cpp b/kdecore/tests/ksortablevaluelisttest.cpp
index de937c797..301054045 100644
--- a/kdecore/tests/ksortablevaluelisttest.cpp
+++ b/kdecore/tests/ksortablevaluelisttest.cpp
@@ -1,9 +1,9 @@
-#include <qstring.h>
+#include <tqstring.h>
#include <ksortablevaluelist.h>
int main( int argc, char **argv )
{
- KSortableValueList<QString> list;
+ KSortableValueList<TQString> list;
list.insert( 1, "FOO (1)" );
list.insert( 2, "Test (2)" );
list.insert( 1, "Huba! (1)" );
@@ -12,7 +12,7 @@ int main( int argc, char **argv )
list.insert( 2, "I was here :) (2)" );
list.insert( 4, "Yeehaa... (4)" );
- QValueListIterator<KSortableItem<QString> > it = list.begin();
+ TQValueListIterator<KSortableItem<TQString> > it = list.begin();
qDebug("Insertion order:");
qDebug("================");
diff --git a/kdecore/tests/kstdacceltest.cpp b/kdecore/tests/kstdacceltest.cpp
index 71eff30cd..ff8842139 100644
--- a/kdecore/tests/kstdacceltest.cpp
+++ b/kdecore/tests/kstdacceltest.cpp
@@ -5,12 +5,12 @@
#include <kstdaccel.h>
#include <stdlib.h> // for exit
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kstddirstest.cpp b/kdecore/tests/kstddirstest.cpp
index 23c0f0a1c..fa797d665 100644
--- a/kdecore/tests/kstddirstest.cpp
+++ b/kdecore/tests/kstddirstest.cpp
@@ -10,8 +10,8 @@ int main(int argc, char **argv)
KStandardDirs t;
KConfig config; // to add custom entries - a bit tricky :/
- QStringList list;
- QString s;
+ TQStringList list;
+ TQString s;
t.saveLocation("icon");
@@ -19,32 +19,32 @@ int main(int argc, char **argv)
if (!s.isNull()) kdDebug() << s << endl;
list = t.findAllResources("data", "kfind/toolbar", true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "data " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc", false, true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config2 " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "en/*/index.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "*/*/*.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findDirs("data", "kwin");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "kwin dirs " << (*it).ascii() << endl;
}
diff --git a/kdecore/tests/kstringhandlertest.cpp b/kdecore/tests/kstringhandlertest.cpp
index 75695309d..2efdc96fc 100644
--- a/kdecore/tests/kstringhandlertest.cpp
+++ b/kdecore/tests/kstringhandlertest.cpp
@@ -3,7 +3,7 @@
using std::cout;
using std::endl;
-bool check(const QString &txt, const QString &a, const QString &b)
+bool check(const TQString &txt, const TQString &a, const TQString &b)
{
if ( a != b ) {
cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
@@ -17,7 +17,7 @@ bool check(const QString &txt, const QString &a, const QString &b)
int main(int argc, char *argv[])
{
- QString test = "The quick brown fox jumped over the lazy bridge. ";
+ TQString test = "The quick brown fox jumped over the lazy bridge. ";
check("word(test, 3)",
KStringHandler::word(test, 2),
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
check("reverse(test)",
KStringHandler::reverse(test),
" bridge. lazy the over jumped fox brown quick The");
- QString result;
+ TQString result;
result = KStringHandler::ljust(test, 70);
if (result.length() != 70)
{
diff --git a/kdecore/tests/ktempfiletest.cpp b/kdecore/tests/ktempfiletest.cpp
index aacf30255..60404f03a 100644
--- a/kdecore/tests/ktempfiletest.cpp
+++ b/kdecore/tests/ktempfiletest.cpp
@@ -19,7 +19,7 @@
#include "ktempfile.h"
#include "kapplication.h"
#include "kstandarddirs.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <unistd.h>
#include <stdio.h>
@@ -34,14 +34,14 @@ main(int argc, char *argv[])
printf("Filename = %s\n", f4.name().ascii());
printf("Making tempfile with \".ps\" extension.\n");
- KTempFile f2(QString::null, ".ps");
+ KTempFile f2(TQString::null, ".ps");
printf("Filename = %s\n", f2.name().ascii());
printf("Making tempfile in home directory.\n");
- KTempFile f3(QString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
+ KTempFile f3(TQString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
printf("Filename = %s\n", f3.name().ascii());
- QString name = locateLocal("socket", "test");
+ TQString name = locateLocal("socket", "test");
printf("Socket Filename = %s\n", name.ascii());
printf("Done.\n");
diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp
index 7be8bd621..650cc0512 100644
--- a/kdecore/tests/ktimezonestest.cpp
+++ b/kdecore/tests/ktimezonestest.cpp
@@ -17,13 +17,13 @@ int main(int argc, char *argv[])
// Find the current offset of the UTC timezone.
timezone = timezones.zone("UTC");
- printf( "UTC timezone offset should be 0: %d\n", timezone->offset(QDateTime::currentDateTime()) );
+ printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) );
// Find some offsets for Europe/London.
char *london = "Europe/London";
timezone = timezones.zone(london);
- QDateTime winter(QDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
- QDateTime summer(QDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
+ TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
+ TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
printf( "%s winter timezone offset should be 0: %d\n", london, timezone->offset(winter) );
printf( "%s summer timezone offset should be 3600: %d\n", london, timezone->offset(summer) );
@@ -33,14 +33,14 @@ int main(int argc, char *argv[])
char *bstAfterPdt = "2005-05-01T00:00:00";
char *gmtBeforePst = "2005-10-30T01:00:00";
char *gmtAfterPst = "2005-12-01T00:00:00";
- QString result;
- result = timezone->convert(losAngeles, QDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
+ TQString result;
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST before PDT, %s should be 2005-03-27T15:00:00: %s\n", bstBeforePdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST and PDT, %s should be 2005-04-30T16:00:00: %s\n", bstAfterPdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT before PST, %s should be 2005-10-29T17:00:00: %s\n", gmtBeforePst, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT and PST, %s should be 2005-11-30T16:00:00: %s\n", gmtAfterPst, result.latin1() );
printf( "Latitude 89 should be valid: %svalid\n", KTimezone::isValidLatitude(89.0) ? "" : "in");
printf( "Latitude 91 should be invalid: %svalid\n", KTimezone::isValidLatitude(91.0) ? "" : "in");
diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp
index 60e8ace09..e80561d2c 100644
--- a/kdecore/tests/kurltest.cpp
+++ b/kdecore/tests/kurltest.cpp
@@ -7,17 +7,17 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qdatastream.h>
+#include <tqtextcodec.h>
+#include <tqdatastream.h>
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -64,11 +64,11 @@ void testAdjustPath()
// Equivalent tests written by the KDirLister maintainer :)
- KURL u3( QCString("ftp://brade@ftp.kde.org///") );
+ KURL u3( TQCString("ftp://brade@ftp.kde.org///") );
u3.adjustPath(-1);
check("KURL::adjustPath()", u3.url(), "ftp://brade@ftp.kde.org/");
- KURL u4( QCString("ftp://brade@ftp.kde.org/kde///") );
+ KURL u4( TQCString("ftp://brade@ftp.kde.org/kde///") );
u4.adjustPath(-1);
check("KURL::adjustPath()", u4.url(), "ftp://brade@ftp.kde.org/kde");
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
KURL url2( baseURL, "../../////kdebase/konqueror" );
check( "KURL::url()", url2.url(), "file:///usr/local/src/kde2/////kdebase/konqueror" );
- QString u1 = "file:/home/dfaure/my#myref";
+ TQString u1 = "file:/home/dfaure/my#myref";
url1 = u1;
check("KURL::url()", url1.url(), "file:///home/dfaure/my#myref");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
@@ -167,11 +167,11 @@ int main(int argc, char *argv[])
KURL dxOffEagle( KURL("http://something/other.html"), "newpage.html?[{\"foo: bar\"}]" );
check("isValid", dxOffEagle.isValid() ? "OK" : "KO", "OK");
- check("url", dxOffEagle.url(), QString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
+ check("url", dxOffEagle.url(), TQString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
KURL javascript( KURL("javascript:window.location+\"__flashplugin_unique__\"") );
check("isValid", javascript.isValid() ? "OK" : "KO", "OK");
- check("url", javascript.url(), QString("javascript:window.location+\"__flashplugin_unique__\"") );
+ check("url", javascript.url(), TQString("javascript:window.location+\"__flashplugin_unique__\"") );
u1 = "file:///home/dfaure/my#myref";
@@ -192,16 +192,16 @@ int main(int argc, char *argv[])
url1= "$HOME/.kde/share/config";
check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "FALSE" );
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- url1 = KURL( QCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
+ url1 = KURL( TQCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
check("query", url1.query(), "?foo=bar" );
url1.setQuery( "toto=titi&kde=rocks" );
check("query", url1.query(), "?toto=titi&kde=rocks" );
@@ -211,24 +211,24 @@ int main(int argc, char *argv[])
check("setQuery(\"?\") -> query", url1.query(), "?" );
url1.setQuery( "" );
check("setQuery(\"\") -> query", url1.query(), "?" );
- url1.setQuery( QString::null );
- check("setQuery(QString::null) -> query", url1.query(), QString::null );
+ url1.setQuery( TQString::null );
+ check("setQuery(TQString::null) -> query", url1.query(), TQString::null );
- u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject:connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject:connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
KURL udir;
printf("\n* Empty URL\n");
- check("KURL::url()", udir.url(), QString::null);
+ check("KURL::url()", udir.url(), TQString::null);
check("KURL::isEmpty()", udir.isEmpty() ? "ok" : "ko", "ok");
check("KURL::isValid()", udir.isValid() ? "ok" : "ko", "ko");
udir = udir.upURL();
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
check("KURL::directory(false,false)", udir.directory(false,false), "/home/dfaure/");
check("KURL::directory(true,false)", udir.directory(true,false), "/home/dfaure");
- KURL u2( QCString("/home/dfaure/") );
+ KURL u2( TQCString("/home/dfaure/") );
printf("\n* URL is %s\n",u2.url().ascii());
// not ignoring trailing slash
check("KURL::directory(false,false)", u2.directory(false,false), "/home/dfaure/");
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
u2.setFileName( "myotherfile.txt" );
check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt");
// more tricky, renaming a directory (kpropsdlg.cc, line ~ 238)
- QString tmpurl = "file:/home/dfaure/myolddir/";
+ TQString tmpurl = "file:/home/dfaure/myolddir/";
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -425,15 +425,15 @@ int main(int argc, char *argv[])
check("KURL::split()", lst.first().url(), "ftp://host/dir1/dir2/myfile.txt");
// cdUp code
KURL lastUrl = lst.last();
- QString dir = lastUrl.directory( true, true );
+ TQString dir = lastUrl.directory( true, true );
check( "KURL::directory(true,true)", dir, "/dir1/dir2");
/// Comparisons
- QString ucmp1 = "ftp://ftp.de.kde.org/dir";
- QString ucmp2 = "ftp://ftp.de.kde.org/dir/";
+ TQString ucmp1 = "ftp://ftp.de.kde.org/dir";
+ TQString ucmp2 = "ftp://ftp.de.kde.org/dir/";
check("urlcmp(only slash difference)", urlcmp(ucmp1,ucmp2)?"ko":"ok","ok");
check("urlcmp(only slash difference, ignore_trailing)", urlcmp(ucmp1,ucmp2,true,false)?"ok":"ko","ok");
- QString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
+ TQString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
check("urlcmp(only hash difference)", urlcmp(ucmp2,ucmp3)?"ko":"ok","ok");
check("urlcmp(only hash difference, ignore_ref)", urlcmp(ucmp2,ucmp3,false,true)?"ok":"ko","ok");
check("urlcmp(slash and hash difference, ignore_trailing, ignore_ref)", urlcmp(ucmp2,ucmp3,true,true)?"ok":"ko","ok");
@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
KURL ftpUrl ( "ftp://ftp.de.kde.org" );
printf("\n* URL is %s\n",ftpUrl.url().latin1());
- check("KURL::path()", ftpUrl.path(), QString::null);
+ check("KURL::path()", ftpUrl.path(), TQString::null);
ftpUrl = "ftp://ftp.de.kde.org/";
check("KURL::isParentOf()", ftpUrl.isParentOf( "ftp://ftp.de.kde.org/host/subdir/") ? "yes" : "no", "yes");
ftpUrl = "ftp://ftp/host/subdir/";
@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
check("http: Set user", waba1.url(), "http://waldo@www.website.com/directory/filename?bla#blub");
waba1.setUser("waldo/bastian");
check("http: Set user with slash in it", waba1.url(), "http://waldo%2Fbastian@www.website.com/directory/filename?bla#blub");
- waba1.setRef( QString::null );
+ waba1.setRef( TQString::null );
waba1.setPass( "pass" );
waba1.setDirectory( "/foo" );
waba1.setProtocol( "https" );
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
"http://www.kde.org/cgi/test.cgi#");
check("hasRef()", waba1.hasRef()?"true":"false","true");
check("hasHTMLRef()", waba1.hasHTMLRef()?"true":"false","true");
- check("encodedHtmlRef()", waba1.encodedHtmlRef(),QString::null);
+ check("encodedHtmlRef()", waba1.encodedHtmlRef(),TQString::null);
// URLs who forgot to encode spaces in the query.
waba1 = "http://www.kde.org/cgi/test.cgi?hello=My Value";
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389?b=c";
check( "http: URL with port, query, and empty path; url", waba1.url(), "http://a:389?b=c" );
check( "http: URL with port, query, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, query, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, query, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, query, and empty path; path", waba1.path(), "" );
check( "http: URL with port, query, and empty path; query", waba1.query(), "?b=c" );
@@ -635,7 +635,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389#b=c";
check( "http: URL with port, ref, and empty path; url", waba1.url(), "http://a:389#b=c" );
check( "http: URL with port, ref, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, ref, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, ref, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, ref, and empty path; path", waba1.path(), "" );
check( "http: URL with port, ref, and empty path; ref", waba1.ref(), "b=c" );
check( "http: URL with port, ref, and empty path; query", waba1.query(), "" );
@@ -644,7 +644,7 @@ int main(int argc, char *argv[])
waba1 = "http://[::FFFF:129.144.52.38]:81/index.html";
check("http: IPV6 host", waba1.host(),
"::ffff:129.144.52.38");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -655,7 +655,7 @@ int main(int argc, char *argv[])
"waba");
check("http: IPV6 host", waba1.pass(),
"pass");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -684,27 +684,27 @@ int main(int argc, char *argv[])
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81?query");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; query", waba1.query(), "?query");
waba1 = "http://[::ffff:129.144.52.38]:81#ref";
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81#ref");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; ref", waba1.ref(), "ref");
// Streaming operators
KURL origURL( "http://www.website.com/directory/?#ref" );
waba1 = "http://[::ffff:129.144.52.38]:81?query";
- QByteArray buffer;
+ TQByteArray buffer;
{
- QDataStream stream( buffer, IO_WriteOnly );
+ TQDataStream stream( buffer, IO_WriteOnly );
stream << origURL
<< KURL( "file:" ) // an invalid one
<< waba1; // the IPv6 one
}
{
- QDataStream stream( buffer, IO_ReadOnly );
+ TQDataStream stream( buffer, IO_ReadOnly );
KURL restoredURL;
stream >> restoredURL;
check( "Streaming valid URL", origURL.url(), restoredURL.url() );
@@ -742,7 +742,7 @@ int main(int argc, char *argv[])
check("Broken stuff #3 directory(true, false)", waba1.directory(true, false), "");
check("Broken stuff #3 directory(false, true)", waba1.directory(true, true), "");
KURL broken;
- broken.setPath( QString::null );
+ broken.setPath( TQString::null );
check("Broken stuff #4 empty", broken.isEmpty()?"EMPTY":"NOT", "NOT");
// It's valid: because isValid refers to parsing, not to what happens afterwards.
check("Broken stuff #4 valid", broken.isValid()?"VALID":"MALFORMED", "VALID");
@@ -819,9 +819,9 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#endif
- QString raw = "data:text/html,%00%2540%00";
+ TQString raw = "data:text/html,%00%2540%00";
check("data URL: encode-decode of %00", KURL(raw).url(), raw );
// UTF8 tests
@@ -864,10 +864,10 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
#endif
baseURL = "file:/home/coolo";
- KURL russian = baseURL.directory(false, true) + QString::fromLocal8Bit( "ÆÇÎ7" );
+ KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ÆÇÎ7" );
check( "russian", russian.url(), "file:///home/%C6%C7%CE7" );
KURL tobi1("http://some.host.net/path/to/file#fragmentPrecedes?theQuery");
@@ -895,27 +895,27 @@ int main(int argc, char *argv[])
check("queryItem (first item)", theKow.queryItem("q"), "frerich");
check("queryItem (middle item)", theKow.queryItem("hl"), "de");
check("queryItem (last item)", theKow.queryItem("lr"), "lang de");
- check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), QString::null);
+ check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), TQString::null);
check("queryItem (empty item)", theKow.queryItem("empty"), "");
check("queryItem (item with encoded chars)", theKow.queryItem("test"), "+ :%");
check("encodedPathAndQuery", theKow.encodedPathAndQuery(), "/search?q=frerich&hlx=xx&hl=de&empty=&lr=lang+de&test=%2B%20%3A%25");
- // checks for queryItems(), which returns a QMap<QString,QString>:
+ // checks for queryItems(), which returns a TQMap<TQString,TQString>:
KURL queryUrl( "mailto:Marc%20Mutz%20%3cmutz@kde.org%3E?"
"Subject=subscribe+me&"
"body=subscribe+mutz%40kde.org&"
"Cc=majordomo%40lists.kde.org" );
check("queryItems (c.s. keys)",
- QStringList(queryUrl.queryItems().keys()).join(", "),
+ TQStringList(queryUrl.queryItems().keys()).join(", "),
"Cc, Subject, body" );
check("queryItems (c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
"body, cc, subject" );
check("queryItems (values; c.s. keys)",
- QStringList(queryUrl.queryItems().values()).join(", "),
+ TQStringList(queryUrl.queryItems().values()).join(", "),
"majordomo@lists.kde.org, subscribe me, subscribe mutz@kde.org" );
check("queryItems (values; c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
"subscribe mutz@kde.org, majordomo@lists.kde.org, subscribe me" );
KURL umlaut1("http://www.clever-tanken.de/liste.asp?ort=N%FCrnberg&typ=Diesel");
@@ -940,12 +940,12 @@ int main(int argc, char *argv[])
check("amantia.url()", amantia.url(), "http://?.foo.de"); // why not
#endif
- KURL thiago( QString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
+ KURL thiago( TQString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
check("thiago.isValid()", thiago.isValid() ? "true" : "false", "true");
#ifdef HAVE_IDNA_H
check("thiago.url()", thiago.url(), "http://xn--4ca.de"); // Non-ascii is allowed in IDN domain names.
#else
- check("thiago.url()", thiago.url(), QString::fromUtf8( "http://\303\244.de" ) );
+ check("thiago.url()", thiago.url(), TQString::fromUtf8( "http://\303\244.de" ) );
#endif
@@ -1003,16 +1003,16 @@ int main(int argc, char *argv[])
check("com2.url()", com2.url(), "http://server.com/dir/blubb/blah/");
KURL utf8_1("audiocd:/By%20Name/15%20Geantra%C3%AE.wav", 106);
- check("utf8_1.fileName()", utf8_1.fileName(), QString::fromLatin1("15 Geantraî.wav"));
+ check("utf8_1.fileName()", utf8_1.fileName(), TQString::fromLatin1("15 Geantraî.wav"));
KURL utf8_2("audiocd:/By%20Name/15%2fGeantra%C3%AE.wav", 106);
- check("utf8_2.fileName()", utf8_2.fileName(), QString::fromLatin1("15/Geantraî.wav"));
+ check("utf8_2.fileName()", utf8_2.fileName(), TQString::fromLatin1("15/Geantraî.wav"));
KURL url_newline_1("http://www.foo.bar/foo/bar\ngnork");
- check("url_newline_1.url()", url_newline_1.url(), QString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
+ check("url_newline_1.url()", url_newline_1.url(), TQString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
KURL url_newline_2("http://www.foo.bar/foo?bar\ngnork");
- check("url_newline_2.url()", url_newline_2.url(), QString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
+ check("url_newline_2.url()", url_newline_2.url(), TQString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
KURL local_file_1("file://localhost/my/file");
check("local_file_1.isLocalFile()", local_file_1.isLocalFile() ? "true" : "false", "true");
@@ -1033,7 +1033,7 @@ int main(int argc, char *argv[])
local_file_5.setPath("/foo?bar");
check("local_file_5.url()", local_file_5.url(), "file:///foo%3Fbar");
- QString basePath = "/home/bastian";
+ TQString basePath = "/home/bastian";
check("relativePath(\"/home/bastian\", \"/home/bastian\")", KURL::relativePath(basePath, "/home/bastian"), "./");
bool b;
@@ -1064,7 +1064,7 @@ int main(int argc, char *argv[])
baseURL = "http://mlc:80/";
check("isValid()?", baseURL.isValid() ? "true" : "false", "true");
- check("port()?", QString::number(baseURL.port()), "80");
+ check("port()?", TQString::number(baseURL.port()), "80");
check("path()?", baseURL.path(), "/");
baseURL = "ptal://mlc:usb@PC_970"; // User=mlc, password=usb, host=PC_970
@@ -1085,7 +1085,7 @@ int main(int argc, char *argv[])
KURL ldap = "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)";
check("host()?", ldap.host(), "host.com");
- check("port()?", QString("%1").arg(ldap.port()), "6666");
+ check("port()?", TQString("%1").arg(ldap.port()), "6666");
check("path()?", ldap.path(), "/o=University of Michigan,c=US");
check("query()?", ldap.query(), "??sub?(cn=Babs%20Jensen)");
check("url()?", ldap.url(), "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)");
@@ -1101,13 +1101,13 @@ int main(int argc, char *argv[])
// URI Mode tests
url1 = "http://www.foobar.com/";
- check("KURL(\"http://www.foobar.com/\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::URL));
+ check("KURL(\"http://www.foobar.com/\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::URL));
url1 = "mailto:user@host.com";
- check("KURL(\"mailto:user@host.com\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::Mailto));
+ check("KURL(\"mailto:user@host.com\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::Mailto));
check("KURL(\"mailto:user@host.com\").url()", url1.url(), "mailto:user@host.com");
check("KURL(\"mailto:user@host.com\").url(0, 106)", url1.url(0, 106), "mailto:user@host.com");
url1 = "data:text/plain,foobar?gazonk=flarp";
- check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::RawURI));
+ check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::RawURI));
check("KURL(\"data:text/plain,foobar?gazonk=flarp\").path()", url1.path(), "text/plain,foobar?gazonk=flarp");
url1 = "mailto:User@Host.COM?subject=Hello";
check("KURL(\"mailto:User@Host.COM?subject=Hello\").path()", url1.path(), "User@host.com");
diff --git a/kdecore/tests/kxerrorhandlertest.cpp b/kdecore/tests/kxerrorhandlertest.cpp
index cb97be170..c2efc7443 100644
--- a/kdecore/tests/kxerrorhandlertest.cpp
+++ b/kdecore/tests/kxerrorhandlertest.cpp
@@ -1,4 +1,4 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Xlib.h>
#include <iostream>
using namespace std;
diff --git a/kdecore/tests/startserviceby.cpp b/kdecore/tests/startserviceby.cpp
index 4411eed53..93e6716ef 100644
--- a/kdecore/tests/startserviceby.cpp
+++ b/kdecore/tests/startserviceby.cpp
@@ -32,10 +32,10 @@ main(int argc, char *argv[])
KApplication a;
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int pid;
- a.startServiceByDesktopName( "kaddressbook", QString::null, &error, &dcopService, &pid );
+ a.startServiceByDesktopName( "kaddressbook", TQString::null, &error, &dcopService, &pid );
kdDebug() << "Started. error=" << error << " dcopService=" << dcopService << " pid=" << pid << endl;
a.exec();
}
diff --git a/kdecore/tests/testqtargs.cpp b/kdecore/tests/testqtargs.cpp
index 918b07735..2b3606a59 100644
--- a/kdecore/tests/testqtargs.cpp
+++ b/kdecore/tests/testqtargs.cpp
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
}
args->clear();
- QWidget *w = new QWidget();
+ TQWidget *w = new TQWidget();
app.setMainWidget(w);
w->show();