summaryrefslogtreecommitdiffstats
path: root/libkcal/tests
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkcal/tests
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/tests')
-rw-r--r--libkcal/tests/fbrecurring.cpp20
-rw-r--r--libkcal/tests/readandwrite.cpp14
-rw-r--r--libkcal/tests/testcalendar.cpp2
-rw-r--r--libkcal/tests/testfb.cpp4
-rw-r--r--libkcal/tests/testfields.cpp20
-rw-r--r--libkcal/tests/testincidence.cpp8
-rw-r--r--libkcal/tests/testrecurprevious.cpp22
-rw-r--r--libkcal/tests/testrecurrence.cpp18
-rw-r--r--libkcal/tests/testrecurrencetype.cpp18
-rw-r--r--libkcal/tests/testrecurson.cpp20
-rw-r--r--libkcal/tests/testresource.cpp36
-rw-r--r--libkcal/tests/testresource.h8
-rw-r--r--libkcal/tests/testtostring.cpp2
-rw-r--r--libkcal/tests/testvcalexport.cpp14
14 files changed, 103 insertions, 103 deletions
diff --git a/libkcal/tests/fbrecurring.cpp b/libkcal/tests/fbrecurring.cpp
index 3ea9a03a..be70a7c8 100644
--- a/libkcal/tests/fbrecurring.cpp
+++ b/libkcal/tests/fbrecurring.cpp
@@ -13,39 +13,39 @@ int main()
{
ICalFormat f;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
Event *event1 = new Event;
event1->setSummary("A");
- event1->setDtStart( QDateTime(QDate(2006,1,1), QTime(12,0,0)) );
+ event1->setDtStart( TQDateTime(TQDate(2006,1,1), TQTime(12,0,0)) );
//event1->setDuration(60*60);
- event1->setDtEnd( QDateTime(QDate(2006,1,1), QTime(13,0,0)) );
+ event1->setDtEnd( TQDateTime(TQDate(2006,1,1), TQTime(13,0,0)) );
event1->setFloats(FALSE);
event1->recurrence()->setDaily( 1 );
//event1->recurrence()->setDuration( 2 );
- event1->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,3), QTime(13,0,0)) );
+ event1->recurrence()->setEndDateTime( TQDateTime(TQDate(2006,1,3), TQTime(13,0,0)) );
cout << f.toICalString(event1).latin1() << endl;
cal.addEvent(event1);
Event *event2 = new Event;
event2->setSummary("B");
- event2->setDtStart( QDateTime(QDate(2006,1,1), QTime(13,0,0)) );
+ event2->setDtStart( TQDateTime(TQDate(2006,1,1), TQTime(13,0,0)) );
//event2->setDuration(60*60);
- event2->setDtEnd( QDateTime(QDate(2006,1,1), QTime(14,0,0)) );
+ event2->setDtEnd( TQDateTime(TQDate(2006,1,1), TQTime(14,0,0)) );
event2->setFloats(FALSE);
event2->recurrence()->setDaily( 1 );
//event2->recurrence()->setDuration( 3 );
- event2->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,4), QTime(13,0,0)) );
+ event2->recurrence()->setEndDateTime( TQDateTime(TQDate(2006,1,4), TQTime(13,0,0)) );
cout << f.toICalString(event2).latin1() << endl;
cal.addEvent(event2);
Calendar *c = &cal;
- QDateTime start = QDateTime(QDate(2006,1,2), QTime(0,0,0));
- QDateTime end = QDateTime(QDate(2006,1,3), QTime(0,0,0));
+ TQDateTime start = TQDateTime(TQDate(2006,1,2), TQTime(0,0,0));
+ TQDateTime end = TQDateTime(TQDate(2006,1,3), TQTime(0,0,0));
FreeBusy *freebusy = new FreeBusy( c, start, end );
- QString result = f.createScheduleMessage( freebusy, Scheduler::Publish );
+ TQString result = f.createScheduleMessage( freebusy, Scheduler::Publish );
cout << result.latin1() << endl;
return 0;
diff --git a/libkcal/tests/readandwrite.cpp b/libkcal/tests/readandwrite.cpp
index 8922080a..076f55cb 100644
--- a/libkcal/tests/readandwrite.cpp
+++ b/libkcal/tests/readandwrite.cpp
@@ -31,8 +31,8 @@ extern "C" {
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
using namespace KCal;
@@ -61,20 +61,20 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
- QString output = QFile::decodeName( args->arg( 1 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
+ TQString output = TQFile::decodeName( args->arg( 1 ) );
- QFileInfo outputFileInfo( output );
+ TQFileInfo outputFileInfo( output );
output = outputFileInfo.absFilePath();
kdDebug(5800) << "Input file: " << input << endl;
kdDebug(5800) << "Output file: " << output << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
diff --git a/libkcal/tests/testcalendar.cpp b/libkcal/tests/testcalendar.cpp
index fe3c0d66..7d781fc5 100644
--- a/libkcal/tests/testcalendar.cpp
+++ b/libkcal/tests/testcalendar.cpp
@@ -48,7 +48,7 @@ int main(int argc,char **argv)
Q_UNUSED( args );
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
cal.save("mycal");
}
diff --git a/libkcal/tests/testfb.cpp b/libkcal/tests/testfb.cpp
index 9b44ebb7..c72d0071 100644
--- a/libkcal/tests/testfb.cpp
+++ b/libkcal/tests/testfb.cpp
@@ -30,7 +30,7 @@ using namespace KCal;
int main( int, char ** )
{
- const QString fbString =
+ const TQString fbString =
"BEGIN:VCALENDAR\n"
"PRODID:-//proko2//freebusy 1.0//EN\n"
"METHOD:PUBLISH\n"
@@ -57,7 +57,7 @@ int main( int, char ** )
for ( PeriodList::ConstIterator it = l.begin(); it != l.end(); ++it )
kdDebug() << (*it).start() << " " << (*it).end() << "+ " << (*it).summary() << ":" << (*it).location() << endl;
- typedef QMap<QCString, QString> FooMap;
+ typedef TQMap<TQCString, TQString> FooMap;
const FooMap props = fb->customProperties();
for ( FooMap::ConstIterator it = props.begin(); it != props.end(); ++it )
kdDebug() << it.key() << ": " << it.data() << endl;
diff --git a/libkcal/tests/testfields.cpp b/libkcal/tests/testfields.cpp
index d0bcf0be..6e63faa9 100644
--- a/libkcal/tests/testfields.cpp
+++ b/libkcal/tests/testfields.cpp
@@ -27,7 +27,7 @@
#include "calendarlocal.h"
-#include <qfile.h>
+#include <tqfile.h>
using namespace KCal;
@@ -50,9 +50,9 @@ int main(int argc,char **argv)
Q_UNUSED(args)
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
- QString file = QString::fromLatin1( INPUT );
+ TQString file = TQString::fromLatin1( INPUT );
if (!cal.load( file ) ) {
kdError() << "Can't load " << file << endl;
return 1;
@@ -60,8 +60,8 @@ int main(int argc,char **argv)
// 2 tests... first uid should result in a syncStatus of 0. second uid
// should have a new summary and a 1 for syncStatus.
- QString uid1 = QString::fromLatin1("KOrganizer-1345486115.965");
- QString uid2 = QString::fromLatin1("KOrganizer-1345486115.967");
+ TQString uid1 = TQString::fromLatin1("KOrganizer-1345486115.965");
+ TQString uid2 = TQString::fromLatin1("KOrganizer-1345486115.967");
Event *e = cal.event( uid1 );
if (!e) {
@@ -72,7 +72,7 @@ int main(int argc,char **argv)
kdDebug() << "Event description " << e->summary() << endl;
if (e->hasEndDate()) {
- QDateTime d = e->dtEnd();
+ TQDateTime d = e->dtEnd();
kdDebug() << "Event ends " << d << endl;
}
@@ -88,7 +88,7 @@ int main(int argc,char **argv)
e->setSyncStatus(KCal::Incidence::SYNCNONE);
- QString newSummary = QString::fromLatin1("Mooo summary");
+ TQString newSummary = TQString::fromLatin1("Mooo summary");
Event *f = new Event(*e);
@@ -102,7 +102,7 @@ int main(int argc,char **argv)
- QString filew = file +".out";
+ TQString filew = file +".out";
// weird, yes, I know, but we have a bug right now with saving the file
// twice which is corrupting X-PILOTSTAT
if ( !cal.save( filew ) || !cal.save( filew ) ) {
@@ -112,13 +112,13 @@ int main(int argc,char **argv)
// now try to read the file back in and see if our changes made it
- CalendarLocal cal2( QString::fromLatin1("UTC") );
+ CalendarLocal cal2( TQString::fromLatin1("UTC") );
if (!cal2.load( filew ) ) {
kdError() << "Can't load " << filew << endl;
return 1;
}
- QFile::remove( filew );
+ TQFile::remove( filew );
// check for uid1--should have syncStatus of 0
e = cal2.event( uid1 );
diff --git a/libkcal/tests/testincidence.cpp b/libkcal/tests/testincidence.cpp
index 1dd8c737..9f84cc28 100644
--- a/libkcal/tests/testincidence.cpp
+++ b/libkcal/tests/testincidence.cpp
@@ -57,13 +57,13 @@ int main(int argc,char **argv)
event1->recurrence()->setDaily( 2 );
event1->recurrence()->setDuration( 3 );
- QString eventString1 = f.toString( event1 );
+ TQString eventString1 = f.toString( event1 );
if ( verbose )
kdDebug(5800) << "EVENT1 START:" << eventString1 << "EVENT1 END" << endl;
Incidence *event2 = event1->clone();
- QString eventString2 = f.toString( event2 );
+ TQString eventString2 = f.toString( event2 );
if( verbose )
kdDebug(5800) << "EVENT2 START:" << eventString2 << "EVENT2 END" << endl;
@@ -75,12 +75,12 @@ int main(int argc,char **argv)
Todo *todo1 = new Todo;
todo1->setSummary("Test todo");
- QString todoString1 = f.toString( todo1 );
+ TQString todoString1 = f.toString( todo1 );
if( verbose )
kdDebug(5800) << "todo1 START:" << todoString1 << "todo1 END" << endl;
Incidence *todo2 = todo1->clone();
- QString todoString2 = f.toString( todo2 );
+ TQString todoString2 = f.toString( todo2 );
if( verbose )
kdDebug(5800) << "todo2 START:" << todoString2 << "todo2 END" << endl;
diff --git a/libkcal/tests/testrecurprevious.cpp b/libkcal/tests/testrecurprevious.cpp
index c0a90b8b..2d127d49 100644
--- a/libkcal/tests/testrecurprevious.cpp
+++ b/libkcal/tests/testrecurprevious.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,10 +97,10 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->recurrence()->endDateTime() );
+ TQDateTime dt( incidence->recurrence()->endDateTime() );
int i=0;
if ( outstream ) {
- if ( !dt.isValid() ) dt = QDateTime( QDate( 2011, 1, 1 ), QTime( 0, 0, 1 ) );
+ if ( !dt.isValid() ) dt = TQDateTime( TQDate( 2011, 1, 1 ), TQTime( 0, 0, 1 ) );
else dt = dt.addYears( 2 );
kdDebug(5800) << "-------------------------------------------" << endl;
kdDebug(5800) << " *~*~*~*~ Starting with date: " << dt << endl;
@@ -112,7 +112,7 @@ int main( int argc, char **argv )
(*outstream) << dt.toString( Qt::ISODate ) << endl;
}
} else {
- if ( !dt.isValid() ) dt = QDateTime( QDate( 2005, 7, 31 ), QTime( 23, 59, 59 ) );
+ if ( !dt.isValid() ) dt = TQDateTime( TQDate( 2005, 7, 31 ), TQTime( 23, 59, 59 ) );
else dt = dt.addYears( 2 );
incidence->recurrence()->dump();
kdDebug(5800) << "-------------------------------------------" << endl;
diff --git a/libkcal/tests/testrecurrence.cpp b/libkcal/tests/testrecurrence.cpp
index c997e9a6..8fc1c527 100644
--- a/libkcal/tests/testrecurrence.cpp
+++ b/libkcal/tests/testrecurrence.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->dtStart().addSecs(-2) );
+ TQDateTime dt( incidence->dtStart().addSecs(-2) );
int i=0;
if ( outstream ) {
// Output to file for testing purposes
diff --git a/libkcal/tests/testrecurrencetype.cpp b/libkcal/tests/testrecurrencetype.cpp
index c997e9a6..8fc1c527 100644
--- a/libkcal/tests/testrecurrencetype.cpp
+++ b/libkcal/tests/testrecurrencetype.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->dtStart().addSecs(-2) );
+ TQDateTime dt( incidence->dtStart().addSecs(-2) );
int i=0;
if ( outstream ) {
// Output to file for testing purposes
diff --git a/libkcal/tests/testrecurson.cpp b/libkcal/tests/testrecurson.cpp
index 154cbe67..01dfb5f7 100644
--- a/libkcal/tests/testrecurson.cpp
+++ b/libkcal/tests/testrecurson.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDate dt( 1996, 7, 1 );
+ TQDate dt( 1996, 7, 1 );
if ( outstream ) {
// Output to file for testing purposes
while ( dt.year() <= 2010 ) {
@@ -106,7 +106,7 @@ int main( int argc, char **argv )
dt = dt.addDays( 1 );
}
} else {
- dt = QDate( 2005, 1, 1 );
+ dt = TQDate( 2005, 1, 1 );
while ( dt.year() < 2007 ) {
if ( incidence->recursOn( dt ) )
kdDebug(5800) << dt.toString( Qt::ISODate ) << endl;
diff --git a/libkcal/tests/testresource.cpp b/libkcal/tests/testresource.cpp
index 25f6539d..cd5174e2 100644
--- a/libkcal/tests/testresource.cpp
+++ b/libkcal/tests/testresource.cpp
@@ -31,9 +31,9 @@
#include <kinputdialog.h>
#include <kresources/factory.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <stdio.h>
#include <stdlib.h>
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
{
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testresource" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testresource" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KApplication::disableAutoDcopRegistration();
@@ -65,9 +65,9 @@ int main(int argc, char *argv[])
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString type = QString::null;
+ TQString type = TQString::null;
if ( args->getOption( "resource" ) )
- type = QString::fromLocal8Bit( args->getOption( "resource" ) );
+ type = TQString::fromLocal8Bit( args->getOption( "resource" ) );
KConfig *config = 0;
if ( args->getOption( "configfile" ) )
config = new KConfig( KURL( args->getOption( "configfile" ) ).url() );
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
namespace KCal {
-TestResource::TestResource( const QString &type, KConfig *config )
+TestResource::TestResource( const TQString &type, KConfig *config )
:m_resource_type( type ), m_config( config ), m_res( 0 )
{}
@@ -91,11 +91,11 @@ void TestResource::setup()
CalendarResourceManager *manager = new CalendarResourceManager( "calendar" );
manager->readConfig();
- QStringList resources = manager->resourceTypeNames();
+ TQStringList resources = manager->resourceTypeNames();
if ( m_resource_type.isNull() ) {
- const QString & chosen = KInputDialog::getItem( "Select Resource",
+ const TQString & chosen = KInputDialog::getItem( "Select Resource",
"Select the resource you wish to test. Test data will be used.",
resources );
@@ -130,12 +130,12 @@ void TestResource::runAll()
m_res->close();
}
-bool TestResource::check(const QString& txt, QString a, QString b)
+bool TestResource::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;
}
@@ -190,11 +190,11 @@ void TestResource::testEventAddRemove()
int oldcount = m_res->rawIncidences().count();
Event *event = makeTestEvent();
- const QString origString = f.toString( event );
+ const TQString origString = f.toString( event );
m_res->addEvent( event );
Event *fromRes = m_res->event( event->uid() );
assert( fromRes == event );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteEvent( event );
assert( !m_res->event( event->uid() ) );
@@ -210,11 +210,11 @@ void TestResource::testTodoAddRemove()
int oldcount = m_res->rawIncidences().count();
Todo *todo = makeTestTodo();
- const QString origString = f.toString( todo );
+ const TQString origString = f.toString( todo );
m_res->addTodo( todo );
Todo *fromRes = m_res->todo( todo->uid() );
assert( fromRes == todo );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteTodo( todo );
assert( !m_res->todo( todo->uid() ) );
@@ -230,11 +230,11 @@ void TestResource::testJournalAddRemove()
int oldcount = m_res->rawIncidences().count();
Journal *journal = makeTestJournal();
- const QString origString = f.toString( journal );
+ const TQString origString = f.toString( journal );
m_res->addJournal( journal );
Journal *fromRes = m_res->journal( journal->uid() );
assert( fromRes == journal );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteJournal( journal );
assert( !m_res->journal( journal->uid() ) );
diff --git a/libkcal/tests/testresource.h b/libkcal/tests/testresource.h
index ae452dd2..30e61aeb 100644
--- a/libkcal/tests/testresource.h
+++ b/libkcal/tests/testresource.h
@@ -19,7 +19,7 @@
#ifndef TESTRESOURCE_H
#define TESTRESOURCE_H
-#include <qobject.h>
+#include <tqobject.h>
class KConfig;
namespace KCal {
@@ -31,7 +31,7 @@ class TestResource : public QObject
Q_OBJECT
public:
- TestResource( const QString& type, KConfig *config );
+ TestResource( const TQString& type, KConfig *config );
void setup();
void runAll();
void cleanup();
@@ -46,8 +46,8 @@ public:
void testJournalAddRemove();
private:
- bool check(const QString& txt, QString a, QString b);
- QString m_resource_type;
+ bool check(const TQString& txt, TQString a, TQString b);
+ TQString m_resource_type;
KConfig *m_config;
ResourceCalendar *m_res;
};
diff --git a/libkcal/tests/testtostring.cpp b/libkcal/tests/testtostring.cpp
index 673b487a..766bc064 100644
--- a/libkcal/tests/testtostring.cpp
+++ b/libkcal/tests/testtostring.cpp
@@ -34,7 +34,7 @@ int main( int, char ** )
Event *ev = new Event;
ev->setSummary("Griazi");
ICalFormat iformat;
- QString icalstr = iformat.toICalString(ev);
+ TQString icalstr = iformat.toICalString(ev);
kdDebug(5800) << icalstr << endl;
Incidence *ev2 = iformat.fromString(icalstr);
kdDebug(5800) << "Event reread!" << endl ;
diff --git a/libkcal/tests/testvcalexport.cpp b/libkcal/tests/testvcalexport.cpp
index a6ca1cfd..7f8b61c0 100644
--- a/libkcal/tests/testvcalexport.cpp
+++ b/libkcal/tests/testvcalexport.cpp
@@ -35,8 +35,8 @@ extern "C" {
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
using namespace KCal;
@@ -65,20 +65,20 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
- QString output = QFile::decodeName( args->arg( 1 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
+ TQString output = TQFile::decodeName( args->arg( 1 ) );
- QFileInfo outputFileInfo( output );
+ TQFileInfo outputFileInfo( output );
output = outputFileInfo.absFilePath();
kdDebug(5800) << "Input file: " << input << endl;
kdDebug(5800) << "Output file: " << output << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}