summaryrefslogtreecommitdiffstats
path: root/kdat/BackupProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/BackupProfile.cpp')
-rw-r--r--kdat/BackupProfile.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kdat/BackupProfile.cpp b/kdat/BackupProfile.cpp
index 2116005..72506d4 100644
--- a/kdat/BackupProfile.cpp
+++ b/kdat/BackupProfile.cpp
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
@@ -32,7 +32,7 @@ BackupProfile::BackupProfile()
{
}
-BackupProfile::BackupProfile( const QString & name )
+BackupProfile::BackupProfile( const TQString & name )
: _name( name ),
_lastSavedName( name )
{
@@ -45,9 +45,9 @@ BackupProfile::~BackupProfile()
void BackupProfile::load()
{
- QString filename = locateLocal( "appdata", _lastSavedName + ".bp");
+ TQString filename = locateLocal( "appdata", _lastSavedName + ".bp");
- FILE* fptr = fopen( QFile::encodeName(filename), "r" );
+ FILE* fptr = fopen( TQFile::encodeName(filename), "r" );
if ( !fptr ) {
return;
}
@@ -76,7 +76,7 @@ void BackupProfile::load()
sscanf( buf, "%d", &filecount );
for ( int i = 0; i < filecount; i++ ) {
fgets( buf, 4096, fptr );
- QString filename = buf;
+ TQString filename = buf;
filename.truncate( filename.length() - 1 );
_absoluteFiles.append( filename );
}
@@ -105,7 +105,7 @@ void BackupProfile::load()
void BackupProfile::save()
{
- QString filename = locateLocal( "appdata", _lastSavedName + ".bp");
+ TQString filename = locateLocal( "appdata", _lastSavedName + ".bp");
bool null_name_p = _lastSavedName.isEmpty();
_lastSavedName = _name.copy();
@@ -114,9 +114,9 @@ void BackupProfile::save()
return;
}
- unlink( QFile::encodeName(filename) );
+ unlink( TQFile::encodeName(filename) );
- FILE* fptr = fopen( QFile::encodeName(filename), "w" );
+ FILE* fptr = fopen( TQFile::encodeName(filename), "w" );
if ( !fptr ) {
return;
}
@@ -126,7 +126,7 @@ void BackupProfile::save()
fprintf( fptr, "%s\n", _archiveName.utf8().data() );
fprintf( fptr, "%s\n", _workingDirectory.utf8().data() );
fprintf( fptr, "%d\n", _absoluteFiles.count() );
- for ( QStringList::Iterator it = _absoluteFiles.begin();
+ for ( TQStringList::Iterator it = _absoluteFiles.begin();
it != _absoluteFiles.end();
++it )
fprintf( fptr, "%s\n", (*it).utf8().data() );
@@ -138,17 +138,17 @@ void BackupProfile::save()
fclose( fptr );
}
-QString BackupProfile::getName()
+TQString BackupProfile::getName()
{
return _name;
}
-QString BackupProfile::getArchiveName()
+TQString BackupProfile::getArchiveName()
{
return _archiveName;
}
-QString BackupProfile::getWorkingDirectory()
+TQString BackupProfile::getWorkingDirectory()
{
return _workingDirectory;
@@ -162,12 +162,12 @@ QString BackupProfile::getWorkingDirectory()
#endif
}
-const QStringList& BackupProfile::getRelativeFiles()
+const TQStringList& BackupProfile::getRelativeFiles()
{
return _relativeFiles;
}
-const QStringList& BackupProfile::getAbsoluteFiles()
+const TQStringList& BackupProfile::getAbsoluteFiles()
{
return _absoluteFiles;
}
@@ -182,7 +182,7 @@ bool BackupProfile::isIncremental()
return _incremental;
}
-QString BackupProfile::getSnapshotFile()
+TQString BackupProfile::getSnapshotFile()
{
return _snapshotFile;
}
@@ -192,21 +192,21 @@ bool BackupProfile::getRemoveSnapshot()
return _removeSnapshot;
}
-void BackupProfile::setName( const QString & name )
+void BackupProfile::setName( const TQString & name )
{
_name = name;
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setArchiveName( const QString & archiveName )
+void BackupProfile::setArchiveName( const TQString & archiveName )
{
_archiveName = archiveName;
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setWorkingDirectory( const QString & workingDirectory )
+void BackupProfile::setWorkingDirectory( const TQString & workingDirectory )
{
_workingDirectory = workingDirectory;
@@ -216,12 +216,12 @@ void BackupProfile::setWorkingDirectory( const QString & workingDirectory )
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setAbsoluteFiles( const QStringList& files )
+void BackupProfile::setAbsoluteFiles( const TQStringList& files )
{
_absoluteFiles = files;
// Make sure working directory is still valid.
- QStringList::Iterator it = _absoluteFiles.begin();
+ TQStringList::Iterator it = _absoluteFiles.begin();
for ( ;
it != _absoluteFiles.end();
++it )
@@ -257,7 +257,7 @@ void BackupProfile::setIncremental( bool incremental )
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setSnapshotFile( const QString & snapshotFile )
+void BackupProfile::setSnapshotFile( const TQString & snapshotFile )
{
_snapshotFile = snapshotFile;
@@ -279,11 +279,11 @@ void BackupProfile::calcRelativeFiles()
remove++;
}
- for ( QStringList::Iterator it = _absoluteFiles.begin();
+ for ( TQStringList::Iterator it = _absoluteFiles.begin();
it != _absoluteFiles.end();
++it )
{
- QString fn = *it;
+ TQString fn = *it;
fn.remove( 0, remove );
if ( fn.isEmpty() ) {
fn = ".";