summaryrefslogtreecommitdiffstats
path: root/libkcal/tests/testresource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcal/tests/testresource.cpp')
-rw-r--r--libkcal/tests/testresource.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/libkcal/tests/testresource.cpp b/libkcal/tests/testresource.cpp
index 25f6539d3..cd5174e2c 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() ) );