summaryrefslogtreecommitdiffstats
path: root/lib/store/tests/storage_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/store/tests/storage_test.cpp')
-rw-r--r--lib/store/tests/storage_test.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/store/tests/storage_test.cpp b/lib/store/tests/storage_test.cpp
index 6fd03bf3e..1c7269ad0 100644
--- a/lib/store/tests/storage_test.cpp
+++ b/lib/store/tests/storage_test.cpp
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
@@ -44,21 +44,21 @@ namespace {
const char* const unableToRead = "Couldn't read stream back!";
}
-int cleanUp( KoStore* store, const QString& testFile, const char* error )
+int cleanUp( KoStore* store, const TQString& testFile, const char* error )
{
- QFile::remove( testFile );
+ TQFile::remove( testFile );
delete store;
kdDebug() << error << endl;
return 1;
}
-int test( const char* testName, KoStore::Backend backend, const QString& testFile )
+int test( const char* testName, KoStore::Backend backend, const TQString& testFile )
{
- if ( QFile::exists( testFile ) )
- QFile::remove( testFile );
- QDir dirTest( testFile );
+ if ( TQFile::exists( testFile ) )
+ TQFile::remove( testFile );
+ TQDir dirTest( testFile );
if ( dirTest.exists() ) {
- system( QCString( "rm -rf " ) + QFile::encodeName( testFile ) ); // QDir::rmdir isn't recursive!
+ system( TQCString( "rm -rf " ) + TQFile::encodeName( testFile ) ); // TQDir::rmdir isn't recursive!
}
kdDebug() << "======================="<<testName<<"====================================" << endl;
@@ -75,7 +75,7 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
return cleanUp( store, testFile, unableToOpen );
store->enterDirectory( testDir );
- if ( store->currentPath() != QString( testDirResult ) )
+ if ( store->currentPath() != TQString( testDirResult ) )
return cleanUp( store, testFile, brokenPath );
if ( store->open( "test2/with/a/relative/dir.txt" ) ) {
@@ -94,7 +94,7 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
return cleanUp( store, testFile, unableToOpen );
store->enterDirectory( testDir2 );
- if ( store->currentPath() != QString( testDir2Result ) )
+ if ( store->currentPath() != TQString( testDir2Result ) )
return cleanUp( store, testFile, brokenPath );
if ( store->open( "root" ) ) {
@@ -115,7 +115,7 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
return cleanUp( store, testFile, badStorage );
if ( store->open( "test1/with/a/relative/dir.txt" ) ) {
- QIODevice* dev = store->device();
+ TQIODevice* dev = store->device();
int i = 0, lim = strlen( test1 ), count = 0;
while ( static_cast<char>( dev->getch() ) == test1[i++] ) {
if ( i == lim ) {
@@ -131,11 +131,11 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
return cleanUp( store, testFile, unableToOpen );
store->enterDirectory( testDir );
- if ( store->currentPath() != QString( testDirResult ) )
+ if ( store->currentPath() != TQString( testDirResult ) )
return cleanUp( store, testFile, brokenPath );
if ( store->open( "test2/with/a/relative/dir.txt" ) ) {
- QIODevice* dev = store->device();
+ TQIODevice* dev = store->device();
int i = 0, lim = strlen( test2 ), count = 0;
while ( static_cast<char>( dev->getch() ) == test2[i++] ) {
if ( i == lim ) {
@@ -155,12 +155,12 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
while ( store->leaveDirectory() );
store->enterDirectory( testDir );
- if ( store->currentPath() != QString( testDirResult ) )
+ if ( store->currentPath() != TQString( testDirResult ) )
return cleanUp( store, testFile, brokenPath );
if ( store->open( "root" ) ) {
if ( store->size() == 22 ) {
- QIODevice* dev = store->device();
+ TQIODevice* dev = store->device();
unsigned int i = 0;
while ( static_cast<char>( dev->getch() ) == test3[i++] );
store->close();
@@ -180,7 +180,7 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
}
store->popDirectory();
- if ( store->currentPath() != QString( testDir2Result ) )
+ if ( store->currentPath() != TQString( testDir2Result ) )
return cleanUp( store, testFile, brokenPath );
if ( store->open( "root" ) ) {
@@ -197,7 +197,7 @@ int test( const char* testName, KoStore::Backend backend, const QString& testFil
if ( store->isOpen() )
store->close();
delete store;
- QFile::remove( testFile );
+ TQFile::remove( testFile );
kdDebug() << "===========================================================" << endl;
return 0;
@@ -210,7 +210,7 @@ int main( int argc, char **argv )
// KZip (due to KSaveFile) doesn't support relative filenames
// So use $PWD as base for the paths explicitely.
- const QString testDir = QDir::currentDirPath();
+ const TQString testDir = TQDir::currentDirPath();
if ( test( "Tar", KoStore::Tar, testDir+"test.tgz" ) != 0 )
return 1;
if ( test( "Directory", KoStore::Directory, testDir+"testdir/maindoc.xml" ) != 0 )