summaryrefslogtreecommitdiffstats
path: root/kpilot/conduits/memofileconduit
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/conduits/memofileconduit')
-rw-r--r--kpilot/conduits/memofileconduit/memofile-conduit.cc22
-rw-r--r--kpilot/conduits/memofileconduit/memofile-conduit.h4
-rw-r--r--kpilot/conduits/memofileconduit/memofile-factory.cc18
-rw-r--r--kpilot/conduits/memofileconduit/memofile.cc22
-rw-r--r--kpilot/conduits/memofileconduit/memofile.h38
-rw-r--r--kpilot/conduits/memofileconduit/memofiles.cc114
-rw-r--r--kpilot/conduits/memofileconduit/memofiles.h32
7 files changed, 125 insertions, 125 deletions
diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.cc b/kpilot/conduits/memofileconduit/memofile-conduit.cc
index 1dc5fe386..7c2402eaf 100644
--- a/kpilot/conduits/memofileconduit/memofile-conduit.cc
+++ b/kpilot/conduits/memofileconduit/memofile-conduit.cc
@@ -41,9 +41,9 @@
#include "pilotMemo.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextcodec.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -60,9 +60,9 @@
*/
MemofileConduit::MemofileConduit(KPilotLink *d,
const char *n,
- const QStringList &l) :
+ const TQStringList &l) :
ConduitAction(d,n,l),
- _DEFAULT_MEMODIR(QDir::homeDirPath() + CSL1("/MyMemos")),
+ _DEFAULT_MEMODIR(TQDir::homeDirPath() + CSL1("/MyMemos")),
fMemoAppInfo(0L),
_memofiles(0L)
{
@@ -145,7 +145,7 @@ bool MemofileConduit::readConfig()
{
FUNCTIONSETUP;
- QString dir(MemofileConduitSettings::directory());
+ TQString dir(MemofileConduitSettings::directory());
if (dir.isEmpty()) {
dir = _DEFAULT_MEMODIR;
@@ -235,7 +235,7 @@ bool MemofileConduit::loadPilotCategories()
fCategories.clear();
- QString _category_name;
+ TQString _category_name;
int _category_id=0;
int _category_num=0;
@@ -378,7 +378,7 @@ void MemofileConduit::listPilotMemos()
PilotMemo *memo;
for ( memo = fMemoList.first(); memo; memo = fMemoList.next() ) {
- QString _category_name = fCategories[memo->category()];
+ TQString _category_name = fCategories[memo->category()];
DEBUGKPILOT << fConduitName
<< ": listing record id: [" << memo->id()
@@ -421,7 +421,7 @@ bool MemofileConduit::copyPCToHH()
_memofiles->load(true);
- QPtrList<Memofile> memofiles = _memofiles->getAll();
+ TQPtrList<Memofile> memofiles = _memofiles->getAll();
Memofile * memofile;
@@ -484,7 +484,7 @@ int MemofileConduit::writeToPilot(Memofile * memofile)
memofile->setID(newid);
- QString status;
+ TQString status;
if (oldid <=0) {
fCtrHH->created();
status = "new to pilot";
@@ -534,7 +534,7 @@ bool MemofileConduit::sync()
_memofiles->addModifiedMemo(memo);
}
- QPtrList<Memofile> memofiles = _memofiles->getModified();
+ TQPtrList<Memofile> memofiles = _memofiles->getModified();
Memofile *memofile;
for ( memofile = memofiles.first(); memofile; memofile = memofiles.next() ) {
diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.h b/kpilot/conduits/memofileconduit/memofile-conduit.h
index 08fdbd0f7..c79506611 100644
--- a/kpilot/conduits/memofileconduit/memofile-conduit.h
+++ b/kpilot/conduits/memofileconduit/memofile-conduit.h
@@ -40,7 +40,7 @@ Q_OBJECT
public:
MemofileConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~MemofileConduit();
protected:
@@ -57,7 +57,7 @@ private:
bool _sync_private;
PilotMemoInfo *fMemoAppInfo;
- QPtrList<PilotMemo> fMemoList;
+ TQPtrList<PilotMemo> fMemoList;
// our categories
MemoCategoryMap fCategories;
diff --git a/kpilot/conduits/memofileconduit/memofile-factory.cc b/kpilot/conduits/memofileconduit/memofile-factory.cc
index e373a0185..795edc33d 100644
--- a/kpilot/conduits/memofileconduit/memofile-factory.cc
+++ b/kpilot/conduits/memofileconduit/memofile-factory.cc
@@ -28,9 +28,9 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kinstance.h>
@@ -46,14 +46,14 @@
class MemofileConduitConfig : public ConduitConfigBase
{
public:
- MemofileConduitConfig(QWidget *parent=0L, const char *n=0L);
+ MemofileConduitConfig(TQWidget *parent=0L, const char *n=0L);
virtual void commit();
virtual void load();
protected:
MemofileWidget *fConfigWidget;
} ;
-MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) :
+MemofileConduitConfig::MemofileConduitConfig(TQWidget *p, const char *n) :
ConduitConfigBase(p,n),
fConfigWidget(new MemofileWidget(p))
{
@@ -72,10 +72,10 @@ MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,about);
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fDirectory,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fSyncPrivate,SIGNAL(toggled(bool)),
- this,SLOT(modified()));
+ TQObject::connect(fConfigWidget->fDirectory,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fSyncPrivate,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(modified()));
}
diff --git a/kpilot/conduits/memofileconduit/memofile.cc b/kpilot/conduits/memofileconduit/memofile.cc
index 1428c487d..3a7ff6c3a 100644
--- a/kpilot/conduits/memofileconduit/memofile.cc
+++ b/kpilot/conduits/memofileconduit/memofile.cc
@@ -27,7 +27,7 @@
#include "memofile.h"
-Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory) :
+Memofile::Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(memo,memo->text()), _categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory)
{
_lastModified = 0;
@@ -36,7 +36,7 @@ Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QSt
}
Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size,
- QString categoryName, QString fileName, QString baseDirectory) :
+ TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(), _categoryName(categoryName),
_filename(fileName),_baseDirectory(baseDirectory)
{
@@ -47,7 +47,7 @@ Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size
_modified = _modifiedByPalm = false;
}
-Memofile::Memofile(int category, QString categoryName, QString fileName, QString baseDirectory) :
+Memofile::Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(),
_categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory)
{
@@ -70,7 +70,7 @@ bool Memofile::load()
return false;
}
- QFile f( filenameAbs() );
+ TQFile f( filenameAbs() );
if ( !f.open( IO_ReadOnly ) ) {
DEBUGKPILOT << fname
<< ": Couldn't open file: [" << filenameAbs() << "] to read. "
@@ -78,9 +78,9 @@ bool Memofile::load()
return false;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
- QString text,title,body;
+ TQString text,title,body;
title = filename();
body = ts.read();
@@ -136,7 +136,7 @@ bool Memofile::deleteFile()
FUNCTIONSETUP;
DEBUGKPILOT << fname
<< ": deleting file: [" << filenameAbs() << "]." << endl;
- return QFile::remove(filenameAbs());
+ return TQFile::remove(filenameAbs());
}
@@ -156,7 +156,7 @@ bool Memofile::saveFile()
<< filenameAbs() << "]" << endl;
- QFile f( filenameAbs() );
+ TQFile f( filenameAbs() );
if ( !f.open( IO_WriteOnly ) ) {
DEBUGKPILOT << fname
<< ": Couldn't open file: [" << filenameAbs() << "] to write your memo to. "
@@ -164,7 +164,7 @@ bool Memofile::saveFile()
return false;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << text() << endl;
f.close();
@@ -226,14 +226,14 @@ bool Memofile::isModifiedBySize()
uint Memofile::getFileLastModified()
{
- QFileInfo f = QFileInfo(filenameAbs());
+ TQFileInfo f = TQFileInfo(filenameAbs());
uint lastModifiedTime = f.lastModified().toTime_t();
return lastModifiedTime;
}
uint Memofile::getFileSize()
{
- QFileInfo f = QFileInfo(filenameAbs());
+ TQFileInfo f = TQFileInfo(filenameAbs());
uint size = f.size();
return size;
}
diff --git a/kpilot/conduits/memofileconduit/memofile.h b/kpilot/conduits/memofileconduit/memofile.h
index 27931cdfe..4bd5fb776 100644
--- a/kpilot/conduits/memofileconduit/memofile.h
+++ b/kpilot/conduits/memofileconduit/memofile.h
@@ -40,10 +40,10 @@
#include <pi-memo.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
#include "pilotMemo.h"
@@ -55,9 +55,9 @@
class Memofile : public PilotMemo
{
public:
- Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory);
- Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, QString categoryName, QString filename, QString baseDirectory);
- Memofile(int category, QString categoryName, QString fileName, QString baseDirectory);
+ Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory);
+ Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, TQString categoryName, TQString filename, TQString baseDirectory);
+ Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory);
uint lastModified() const { return _lastModified; } ;
uint size() const { return _size; } ;
@@ -72,30 +72,30 @@ class Memofile : public PilotMemo
bool load();
- bool fileExists() { return QFile::exists(filenameAbs()); } ;
+ bool fileExists() { return TQFile::exists(filenameAbs()); } ;
void setID(recordid_t id);
bool save();
bool deleteFile();
- QString toString() {
- return CSL1("id: [") + QString::number(id())
+ TQString toString() {
+ return CSL1("id: [") + TQString::number(id())
+ CSL1("], category:[") + _categoryName
+ CSL1("], filename: [") + _filename + CSL1("]");
} ;
- const QString & getCategoryName() { return _categoryName; } ;
- const QString & getFilename() { return _filename; } ;
- const QString & filename() { return _filename; } ;
+ const TQString & getCategoryName() { return _categoryName; } ;
+ const TQString & getFilename() { return _filename; } ;
+ const TQString & filename() { return _filename; } ;
private:
bool saveFile();
bool isModifiedByTimestamp();
bool isModifiedBySize();
- QString filenameAbs() { return dirName() + filename(); } ;
- QString dirName() { return _baseDirectory + QDir::separator() + _categoryName + QDir::separator(); } ;
- bool setCategory(const QString &label);
+ TQString filenameAbs() { return dirName() + filename(); } ;
+ TQString dirName() { return _baseDirectory + TQDir::separator() + _categoryName + TQDir::separator(); } ;
+ bool setCategory(const TQString &label);
uint getFileLastModified();
uint getFileSize();
@@ -105,9 +105,9 @@ class Memofile : public PilotMemo
uint _lastModified;
uint _size;
- QString _categoryName;
- QString _filename;
- QString _baseDirectory;
+ TQString _categoryName;
+ TQString _filename;
+ TQString _baseDirectory;
} ;
#endif
diff --git a/kpilot/conduits/memofileconduit/memofiles.cc b/kpilot/conduits/memofileconduit/memofiles.cc
index 2846d448b..db3d8cacc 100644
--- a/kpilot/conduits/memofileconduit/memofiles.cc
+++ b/kpilot/conduits/memofileconduit/memofiles.cc
@@ -30,17 +30,17 @@
#include "memofiles.h"
#include "memofile.h"
-QString Memofiles::FIELD_SEP = CSL1("\t");
+TQString Memofiles::FIELD_SEP = CSL1("\t");
Memofiles::Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo,
- QString & baseDirectory, CUDCounter &fCtrPC) :
+ TQString & baseDirectory, CUDCounter &fCtrPC) :
_categories(categories), _memoAppInfo(appInfo),
_baseDirectory(baseDirectory), _cudCounter(fCtrPC)
{
FUNCTIONSETUP;
_memofiles.clear();
- _memoMetadataFile = _baseDirectory + QDir::separator() + CSL1(".ids");
- _categoryMetadataFile = _baseDirectory + QDir::separator() + CSL1(".categories");
+ _memoMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".ids");
+ _categoryMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".categories");
_memofiles.setAutoDelete(true);
_ready = ensureDirectoryReady();
@@ -67,10 +67,10 @@ void Memofiles::load (bool loadAll)
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
int category = it.key();
- QString categoryName = it.data();
- QString categoryDirname = _baseDirectory + QDir::separator() + categoryName;
+ TQString categoryName = it.data();
+ TQString categoryDirname = _baseDirectory + TQDir::separator() + categoryName;
- QDir dir = QDir(categoryDirname);
+ TQDir dir = TQDir(categoryDirname);
if (! dir.exists() ) {
DEBUGKPILOT << fname
<< ": category directory: [" << categoryDirname
@@ -79,11 +79,11 @@ void Memofiles::load (bool loadAll)
}
- QStringList entries = dir.entryList(QDir::Files);
- QString file;
- for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries = dir.entryList(TQDir::Files);
+ TQString file;
+ for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
file = *it;
- QFileInfo info(dir, file);
+ TQFileInfo info(dir, file);
if(info.isFile() && info.isReadable()) {
// DEBUGKPILOT << fname
@@ -151,13 +151,13 @@ bool Memofiles::ensureDirectoryReady()
int failures = 0;
// now make sure that a directory for each category exists.
- QString _category_name;
- QString dir;
+ TQString _category_name;
+ TQString dir;
MemoCategoryMap::Iterator it;
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
_category_name = it.data();
- dir = _baseDirectory + QDir::separator() + _category_name;
+ dir = _baseDirectory + TQDir::separator() + _category_name;
DEBUGKPILOT << fname
<< ": checking directory: [" << dir << "]" << endl;
@@ -169,12 +169,12 @@ bool Memofiles::ensureDirectoryReady()
return failures == 0;
}
-bool Memofiles::checkDirectory(QString & dir)
+bool Memofiles::checkDirectory(TQString & dir)
{
FUNCTIONSETUP;
// make sure that the directory we're asked to write to exists
- QDir d(dir);
- QFileInfo fid( dir );
+ TQDir d(dir);
+ TQFileInfo fid( dir );
if ( ! fid.isDir() ) {
@@ -212,15 +212,15 @@ void Memofiles::eraseLocalMemos ()
MemoCategoryMap::Iterator it;
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
- QString dir = _baseDirectory + QDir::separator() + it.data();
+ TQString dir = _baseDirectory + TQDir::separator() + it.data();
- if (!folderRemove(QDir(dir))) {
+ if (!folderRemove(TQDir(dir))) {
DEBUGKPILOT << fname
<< ": couldn't erase all local memos from: ["
<< dir << "]." << endl;
}
}
- QDir d(_baseDirectory);
+ TQDir d(_baseDirectory);
d.remove(_memoMetadataFile);
ensureDirectoryReady();
@@ -228,7 +228,7 @@ void Memofiles::eraseLocalMemos ()
_memofiles.clear();
}
-void Memofiles::setPilotMemos (QPtrList<PilotMemo> & memos)
+void Memofiles::setPilotMemos (TQPtrList<PilotMemo> & memos)
{
FUNCTIONSETUP;
@@ -252,7 +252,7 @@ bool Memofiles::loadFromMetadata ()
_memofiles.clear();
- QFile f( _memoMetadataFile );
+ TQFile f( _memoMetadataFile );
if ( !f.open( IO_ReadOnly ) ) {
DEBUGKPILOT << fname
<< ": ooh, bad. couldn't open your memo-id file for reading."
@@ -260,15 +260,15 @@ bool Memofiles::loadFromMetadata ()
return false;
}
- QTextStream t( &f );
+ TQTextStream t( &f );
Memofile * memofile;
while ( !t.atEnd() ) {
- QString data = t.readLine();
+ TQString data = t.readLine();
int errors = 0;
bool ok;
- QStringList fields = QStringList::split( FIELD_SEP, data );
+ TQStringList fields = TQStringList::split( FIELD_SEP, data );
if ( fields.count() >= 4 ) {
int id = fields[0].toInt( &ok );
if ( !ok )
@@ -282,7 +282,7 @@ bool Memofiles::loadFromMetadata ()
uint size = fields[3].toInt( &ok );
if ( !ok )
errors++;
- QString filename = fields[4];
+ TQString filename = fields[4];
if ( filename.isEmpty() )
errors++;
@@ -331,7 +331,7 @@ Memofile * Memofiles::find (recordid_t id)
}
-Memofile * Memofiles::find (const QString & category, const QString & filename)
+Memofile * Memofiles::find (const TQString & category, const TQString & filename)
{
Memofile * memofile;
@@ -371,8 +371,8 @@ void Memofiles::addModifiedMemo (PilotMemo * memo)
return;
}
- QString debug = CSL1(": adding a PilotMemo. id: [")
- + QString::number(memo->id()) + CSL1("], title: [")
+ TQString debug = CSL1(": adding a PilotMemo. id: [")
+ + TQString::number(memo->id()) + CSL1("], title: [")
+ memo->getTitle() + CSL1("]. ");
Memofile * memofile = find(memo->id());
@@ -400,11 +400,11 @@ void Memofiles::addModifiedMemo (PilotMemo * memo)
}
-QPtrList<Memofile> Memofiles::getModified ()
+TQPtrList<Memofile> Memofiles::getModified ()
{
FUNCTIONSETUP;
- QPtrList<Memofile> modList;
+ TQPtrList<Memofile> modList;
modList.clear();
Memofile * memofile;
@@ -441,8 +441,8 @@ bool Memofiles::saveMemoMetadata()
<< ": saving memo metadata to file: ["
<< _memoMetadataFile << "]" << endl;
- QFile f( _memoMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _memoMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_WriteOnly) ) {
DEBUGKPILOT << fname
@@ -484,8 +484,8 @@ MemoCategoryMap Memofiles::readCategoryMetadata()
MemoCategoryMap map;
map.clear();
- QFile f( _categoryMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _categoryMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_ReadOnly) ) {
DEBUGKPILOT << fname
@@ -496,16 +496,16 @@ MemoCategoryMap Memofiles::readCategoryMetadata()
while ( !stream.atEnd() ) {
- QString data = stream.readLine();
+ TQString data = stream.readLine();
int errors = 0;
bool ok;
- QStringList fields = QStringList::split( FIELD_SEP, data );
+ TQStringList fields = TQStringList::split( FIELD_SEP, data );
if ( fields.count() >= 2 ) {
int id = fields[0].toInt( &ok );
if ( !ok )
errors++;
- QString categoryName = fields[1];
+ TQString categoryName = fields[1];
if ( categoryName.isEmpty() )
errors++;
@@ -541,8 +541,8 @@ bool Memofiles::saveCategoryMetadata()
<< ": saving categories to file: ["
<< _categoryMetadataFile << "]" << endl;
- QFile f( _categoryMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _categoryMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_WriteOnly) ) {
DEBUGKPILOT << fname
@@ -601,8 +601,8 @@ bool Memofiles::saveMemos()
bool Memofiles::isFirstSync()
{
FUNCTIONSETUP;
- bool metadataExists = QFile::exists(_memoMetadataFile) &&
- QFile::exists(_categoryMetadataFile);
+ bool metadataExists = TQFile::exists(_memoMetadataFile) &&
+ TQFile::exists(_categoryMetadataFile);
bool valid = metadataExists && _metadataLoaded;
@@ -615,19 +615,19 @@ bool Memofiles::isFirstSync()
-bool Memofiles::folderRemove(const QDir &_d)
+bool Memofiles::folderRemove(const TQDir &_d)
{
FUNCTIONSETUP;
- QDir d = _d;
+ TQDir d = _d;
- QStringList entries = d.entryList();
- for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries = d.entryList();
+ for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(*it == CSL1(".") || *it == CSL1(".."))
continue;
- QFileInfo info(d, *it);
+ TQFileInfo info(d, *it);
if(info.isDir()) {
- if(!folderRemove(QDir(info.filePath())))
+ if(!folderRemove(TQDir(info.filePath())))
return FALSE;
} else {
DEBUGKPILOT << fname
@@ -635,7 +635,7 @@ bool Memofiles::folderRemove(const QDir &_d)
d.remove(info.filePath());
}
}
- QString name = d.dirName();
+ TQString name = d.dirName();
if(!d.cdUp())
return FALSE;
DEBUGKPILOT << fname
@@ -645,14 +645,14 @@ bool Memofiles::folderRemove(const QDir &_d)
return TRUE;
}
-QString Memofiles::filename(PilotMemo * memo)
+TQString Memofiles::filename(PilotMemo * memo)
{
FUNCTIONSETUP;
- QString filename = memo->getTitle();
+ TQString filename = memo->getTitle();
if (filename.isEmpty()) {
- QString text = memo->text();
+ TQString text = memo->text();
int i = text.find(CSL1("\n"));
if (i > 1) {
filename = text.left(i);
@@ -664,7 +664,7 @@ QString Memofiles::filename(PilotMemo * memo)
filename = sanitizeName(filename);
- QString category = _categories[memo->category()];
+ TQString category = _categories[memo->category()];
Memofile * memofile = find(category, filename);
@@ -676,22 +676,22 @@ QString Memofiles::filename(PilotMemo * memo)
}
int uniq = 2;
- QString newfilename;
+ TQString newfilename;
// try to find a good filename, but only do this 20 times at the most.
// if our user has 20 memos with the same filename, he/she is asking
// for trouble.
while (NULL != memofile && uniq <=20) {
- newfilename = QString(filename + CSL1(".") + QString::number(uniq++) );
+ newfilename = TQString(filename + CSL1(".") + TQString::number(uniq++) );
memofile = find(category, newfilename);
}
return newfilename;
}
-QString Memofiles::sanitizeName(QString name)
+TQString Memofiles::sanitizeName(TQString name)
{
- QString clean = name;
+ TQString clean = name;
// safety net. we can't save a
// filesystem separator as part of a filename, now can we?
clean.replace('/', CSL1("-"));
diff --git a/kpilot/conduits/memofileconduit/memofiles.h b/kpilot/conduits/memofileconduit/memofiles.h
index ec0497d5b..72b6ed4a9 100644
--- a/kpilot/conduits/memofileconduit/memofiles.h
+++ b/kpilot/conduits/memofileconduit/memofiles.h
@@ -27,11 +27,11 @@
*/
#include "plugin.h"
-#include <qmap.h>
+#include <tqmap.h>
#include "memofile.h"
-typedef QMap<int, QString> MemoCategoryMap;
+typedef TQMap<int, TQString> MemoCategoryMap;
class Memofile;
@@ -40,29 +40,29 @@ class Memofiles {
public:
Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo,
- QString & baseDirectory, CUDCounter &fCtrHH);
+ TQString & baseDirectory, CUDCounter &fCtrHH);
~Memofiles();
void load(bool loadAll);
void save();
void eraseLocalMemos();
- void setPilotMemos (QPtrList<PilotMemo> & memos);
+ void setPilotMemos (TQPtrList<PilotMemo> & memos);
void addModifiedMemo (PilotMemo * memo);
void deleteMemo (PilotMemo * memo);
bool isFirstSync();
bool isReady() { return _ready; };
- QPtrList<Memofile> getModified();
- QPtrList<Memofile> getAll() { return _memofiles; } ;
- Memofile * find (const QString & category, const QString & filename);
+ TQPtrList<Memofile> getModified();
+ TQPtrList<Memofile> getAll() { return _memofiles; } ;
+ Memofile * find (const TQString & category, const TQString & filename);
Memofile * find (recordid_t id);
MemoCategoryMap readCategoryMetadata();
void setCategories(MemoCategoryMap map) { _categories = map; } ;
- static QString FIELD_SEP;
- static QString sanitizeName(QString name);
+ static TQString FIELD_SEP;
+ static TQString sanitizeName(TQString name);
int count() { return _memofiles.count(); }
@@ -70,23 +70,23 @@ private:
MemoCategoryMap _categories;
PilotMemoInfo &_memoAppInfo;
- QString & _baseDirectory;
+ TQString & _baseDirectory;
CUDCounter &_cudCounter;
- QPtrList<Memofile> _memofiles;
+ TQPtrList<Memofile> _memofiles;
bool loadFromMetadata();
bool ensureDirectoryReady();
- bool checkDirectory(QString & dir);
+ bool checkDirectory(TQString & dir);
bool saveMemoMetadata();
bool saveCategoryMetadata();
bool saveMemos();
- bool folderRemove(const QDir & dir);
+ bool folderRemove(const TQDir & dir);
- QString filename(PilotMemo * memo);
+ TQString filename(PilotMemo * memo);
- QString _categoryMetadataFile;
- QString _memoMetadataFile;
+ TQString _categoryMetadataFile;
+ TQString _memoMetadataFile;
bool _metadataLoaded;
bool _ready;