summaryrefslogtreecommitdiffstats
path: root/kresources/scalix/knotes/resourcescalix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/scalix/knotes/resourcescalix.cpp')
-rw-r--r--kresources/scalix/knotes/resourcescalix.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kresources/scalix/knotes/resourcescalix.cpp b/kresources/scalix/knotes/resourcescalix.cpp
index e43a9a912..2b7895282 100644
--- a/kresources/scalix/knotes/resourcescalix.cpp
+++ b/kresources/scalix/knotes/resourcescalix.cpp
@@ -49,7 +49,7 @@ static const char* inlineMimeType = "text/calendar";
ResourceScalix::ResourceScalix( const KConfig *config )
: ResourceNotes( config ), ResourceScalixBase( "ResourceScalix-KNotes" ),
- mCalendar( QString::fromLatin1("UTC") )
+ mCalendar( TQString::fromLatin1("UTC") )
{
setType( "scalix" );
}
@@ -64,15 +64,15 @@ bool ResourceScalix::doOpen()
config.setGroup( configGroupName );
// Get the list of Notes folders from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, kmailContentsType ) )
return false;
// Make the resource map from the folder list
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
mSubResources.clear();
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
- const QString subResource = (*it).location;
+ const TQString subResource = (*it).location;
const bool active = config.readBoolEntry( subResource, true );
mSubResources[ subResource ] = Scalix::SubResource( active, (*it).writable, (*it).label );
}
@@ -89,8 +89,8 @@ void ResourceScalix::doClose()
config.writeEntry( it.key(), it.data().active() );
}
-bool ResourceScalix::loadSubResource( const QString& subResource,
- const QString &mimetype )
+bool ResourceScalix::loadSubResource( const TQString& subResource,
+ const TQString &mimetype )
{
// Get the list of journals
int count = 0;
@@ -99,7 +99,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
return false;
}
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if( !kmailIncidences( lst, mimetype, subResource, 0, count ) ) {
kdError(5500) << "Communication problem in "
<< "ResourceScalix::getIncidenceList()\n";
@@ -111,7 +111,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QMap<Q_UINT32, QString>::Iterator it;
+ TQMap<Q_UINT32, TQString>::Iterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), subResource, it.key(), mimetype );
if ( !journal )
@@ -137,7 +137,7 @@ bool ResourceScalix::load()
// This subResource is disabled
continue;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
rc &= loadSubResource( itR.key(), mimetype );
mimetype = attachmentMimeType;
rc &= loadSubResource( itR.key(), mimetype );
@@ -154,11 +154,11 @@ bool ResourceScalix::save()
bool ResourceScalix::addNote( KCal::Journal* journal )
{
- return addNote( journal, QString::null, 0 );
+ return addNote( journal, TQString::null, 0 );
}
-KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString& )
+KCal::Journal* ResourceScalix::addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString& )
{
KCal::Journal* journal = 0;
// FIXME: This does not take into account the time zone!
@@ -175,7 +175,7 @@ KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subr
}
bool ResourceScalix::addNote( KCal::Journal* journal,
- const QString& subresource, Q_UINT32 sernum )
+ const TQString& subresource, Q_UINT32 sernum )
{
kdDebug(5500) << "ResourceScalix::addNote( KCal::Journal*, '" << subresource << "', " << sernum << " )\n";
@@ -185,14 +185,14 @@ bool ResourceScalix::addNote( KCal::Journal* journal,
bool newNote = subresource.isEmpty();
mCalendar.addJournal( journal );
- QString resource =
+ TQString resource =
newNote ? findWritableResource( mSubResources ) : subresource;
if ( resource.isEmpty() ) // canceled
return false;
if ( !mSilent ) {
KCal::ICalFormat formatter;
- const QString xml = formatter.toString( journal );
+ const TQString xml = formatter.toString( journal );
kdDebug(5500) << k_funcinfo << "XML string:\n" << xml << endl;
if( !kmailUpdate( resource, sernum, xml, attachmentMimeType, journal->uid() ) ) {
@@ -211,7 +211,7 @@ bool ResourceScalix::addNote( KCal::Journal* journal,
bool ResourceScalix::deleteNote( KCal::Journal* journal )
{
- const QString uid = journal->uid();
+ const TQString uid = journal->uid();
if ( !mUidMap.contains( uid ) )
// Odd
return false;
@@ -226,20 +226,20 @@ bool ResourceScalix::deleteNote( KCal::Journal* journal )
return true;
}
-KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceScalix::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
@@ -251,7 +251,7 @@ KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime
void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
{
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.contains( i->uid() ) ) {
subResource = mUidMap[ i->uid() ].resource();
@@ -265,7 +265,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
KCal::Journal* journal = dynamic_cast<KCal::Journal*>( i );
KCal::ICalFormat formatter;
- const QString xml = formatter.toString( journal );
+ const TQString xml = formatter.toString( journal );
if( !xml.isEmpty() && kmailUpdate( subResource, sernum, xml, attachmentMimeType, journal->uid() ) )
mUidMap[ i->uid() ] = StorageReference( subResource, sernum );
}
@@ -274,18 +274,18 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool ResourceScalix::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceScalix::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int,
- const QString& note )
+ const TQString& note )
{
// Check if this is a note
if( type != kmailContentsType ) return false;
const bool silent = mSilent;
mSilent = true;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
KCal::Journal* journal = addNote( note, subResource, sernum, mimetype );
if ( journal )
manager()->registerNote( this, journal );
@@ -293,9 +293,9 @@ bool ResourceScalix::fromKMailAddIncidence( const QString& type,
return true;
}
-void ResourceScalix::fromKMailDelIncidence( const QString& type,
- const QString& /*subResource*/,
- const QString& uid )
+void ResourceScalix::fromKMailDelIncidence( const TQString& type,
+ const TQString& /*subResource*/,
+ const TQString& uid )
{
// Check if this is a note
if( type != kmailContentsType ) return;
@@ -311,16 +311,16 @@ void ResourceScalix::fromKMailDelIncidence( const QString& type,
mSilent = silent;
}
-void ResourceScalix::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceScalix::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
if ( type == kmailContentsType )
load(); // ### should call loadSubResource(subResource) probably
}
-void ResourceScalix::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& mimetype,
+void ResourceScalix::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& mimetype,
bool writable )
{
if ( type != kmailContentsType )
@@ -340,8 +340,8 @@ void ResourceScalix::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void ResourceScalix::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceScalix::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if ( type != configGroupName )
// Not ours
@@ -361,7 +361,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Scalix::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -371,7 +371,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
if ( !uids.isEmpty() ) {
const bool silent = mSilent;
mSilent = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KCal::Journal* j = mCalendar.journal( *it );
if( j )
@@ -383,17 +383,17 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceScalix::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
// We are only interested in notes
if ( ( type != attachmentMimeType ) && ( type != inlineMimeType ) ) return;
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QString mimetype = inlineMimeType;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ TQString mimetype = inlineMimeType;
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), folder, it.key(), mimetype );
if ( !journal )
kdDebug(5500) << "loading note " << it.key() << " failed" << endl;
@@ -404,12 +404,12 @@ void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& ma
}
-QStringList ResourceScalix::subresources() const
+TQStringList ResourceScalix::subresources() const
{
return mSubResources.keys();
}
-bool ResourceScalix::subresourceActive( const QString& res ) const
+bool ResourceScalix::subresourceActive( const TQString& res ) const
{
if ( mSubResources.contains( res ) ) {
return mSubResources[ res ].active();