summaryrefslogtreecommitdiffstats
path: root/libkcal/resourcelocaldir.cpp
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/resourcelocaldir.cpp
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/resourcelocaldir.cpp')
-rw-r--r--libkcal/resourcelocaldir.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/libkcal/resourcelocaldir.cpp b/libkcal/resourcelocaldir.cpp
index 5e6528e8..1d5c9caa 100644
--- a/libkcal/resourcelocaldir.cpp
+++ b/libkcal/resourcelocaldir.cpp
@@ -22,10 +22,10 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -62,7 +62,7 @@ ResourceLocalDir::ResourceLocalDir( const KConfig* config )
init();
}
-ResourceLocalDir::ResourceLocalDir( const QString& dirName )
+ResourceLocalDir::ResourceLocalDir( const TQString& dirName )
: ResourceCached( 0 )
{
mURL = KURL( dirName );
@@ -73,7 +73,7 @@ ResourceLocalDir::ResourceLocalDir( const QString& dirName )
void ResourceLocalDir::readConfig( const KConfig *config )
{
- QString url = config->readPathEntry( "CalendarURL" );
+ TQString url = config->readPathEntry( "CalendarURL" );
mURL = KURL( url );
}
@@ -92,12 +92,12 @@ void ResourceLocalDir::init()
setSavePolicy( SaveDelayed );
- connect( &mDirWatch, SIGNAL( dirty( const QString & ) ),
- SLOT( reload( const QString & ) ) );
- connect( &mDirWatch, SIGNAL( created( const QString & ) ),
- SLOT( reload( const QString & ) ) );
- connect( &mDirWatch, SIGNAL( deleted( const QString & ) ),
- SLOT( reload( const QString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( created( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
mLock = new KABC::Lock( mURL.path() );
@@ -115,7 +115,7 @@ ResourceLocalDir::~ResourceLocalDir()
bool ResourceLocalDir::doOpen()
{
- QFileInfo dirInfo( mURL.path() );
+ TQFileInfo dirInfo( mURL.path() );
return dirInfo.isDir() && dirInfo.isReadable() &&
( dirInfo.isWritable() || readOnly() );
}
@@ -125,7 +125,7 @@ bool ResourceLocalDir::doLoad()
kdDebug(5800) << "ResourceLocalDir::load()" << endl;
mCalendar.close();
- QString dirName = mURL.path();
+ TQString dirName = mURL.path();
if ( !( KStandardDirs::exists( dirName ) || KStandardDirs::exists( dirName + "/") ) ) {
kdDebug(5800) << "ResourceLocalDir::load(): Directory '" << dirName
@@ -138,21 +138,21 @@ bool ResourceLocalDir::doLoad()
// The directory exists. Now try to open (the files in) it.
kdDebug(5800) << "ResourceLocalDir::load(): '" << dirName << "'" << endl;
- QFileInfo dirInfo( dirName );
+ TQFileInfo dirInfo( dirName );
if ( !( dirInfo.isDir() && dirInfo.isReadable() &&
( dirInfo.isWritable() || readOnly() ) ) )
return false;
- QDir dir( dirName );
- QStringList entries = dir.entryList( QDir::Files | QDir::Readable );
+ TQDir dir( dirName );
+ TQStringList entries = dir.entryList( TQDir::Files | TQDir::Readable );
bool success = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = entries.constBegin(); it != entries.constEnd(); ++it ) {
if ( (*it).endsWith( "~" ) ) // is backup file, ignore it
continue;
- QString fileName = dirName + "/" + *it;
+ TQString fileName = dirName + "/" + *it;
kdDebug(5800) << " read '" << fileName << "'" << endl;
CalendarLocal cal( mCalendar.timeZoneId() );
if ( !doFileLoad( cal, fileName ) ) {
@@ -163,7 +163,7 @@ bool ResourceLocalDir::doLoad()
return success;
}
-bool ResourceLocalDir::doFileLoad( CalendarLocal &cal, const QString &fileName )
+bool ResourceLocalDir::doFileLoad( CalendarLocal &cal, const TQString &fileName )
{
if ( !cal.load( fileName ) )
return false;
@@ -195,7 +195,7 @@ bool ResourceLocalDir::doSave( Incidence *incidence )
{
mDirWatch.stopScan(); // do prohibit the dirty() signal and a following reload()
- QString fileName = mURL.path() + "/" + incidence->uid();
+ TQString fileName = mURL.path() + "/" + incidence->uid();
kdDebug(5800) << "writing '" << fileName << "'" << endl;
CalendarLocal cal( mCalendar.timeZoneId() );
@@ -212,7 +212,7 @@ KABC::Lock *ResourceLocalDir::lock()
return mLock;
}
-void ResourceLocalDir::reload( const QString &file )
+void ResourceLocalDir::reload( const TQString &file )
{
kdDebug(5800) << "ResourceLocalDir::reload()" << endl;
@@ -264,7 +264,7 @@ void ResourceLocalDir::dump() const
bool ResourceLocalDir::deleteIncidenceFile(Incidence *incidence)
{
- QFile file( mURL.path() + "/" + incidence->uid() );
+ TQFile file( mURL.path() + "/" + incidence->uid() );
if ( !file.exists() )
return true;