summaryrefslogtreecommitdiffstats
path: root/korganizer/freebusymanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/freebusymanager.cpp')
-rw-r--r--korganizer/freebusymanager.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/korganizer/freebusymanager.cpp b/korganizer/freebusymanager.cpp
index 65f945bad..187e1082e 100644
--- a/korganizer/freebusymanager.cpp
+++ b/korganizer/freebusymanager.cpp
@@ -80,7 +80,7 @@ FreeBusyDownloadJob::FreeBusyDownloadJob( const TQString &email, const KURL &url
KIO::TransferJob *job = KIO::get( url, false, false );
//pass the mainwindow to the job so any prompts are active
KOrg::MainWindow *korg = ActionManager::findInstance( KURL() );
- job->setWindow( korg->topLevelWidget() );
+ job->setWindow( korg->tqtopLevelWidget() );
connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
TQT_SLOT( slotResult( KIO::Job * ) ) );
@@ -140,7 +140,7 @@ void FreeBusyManager::setCalendar( KCal::Calendar *c )
KCal::FreeBusy *FreeBusyManager::ownerFreeBusy()
{
- TQDateTime start = TQDateTime::currentDateTime();
+ TQDateTime start = TQDateTime::tqcurrentDateTime();
TQDateTime end = start.addDays( KOPrefs::instance()->mFreeBusyPublishDays );
FreeBusy *freebusy = new FreeBusy( mCalendar, start, end );
@@ -176,13 +176,13 @@ void FreeBusyManager::slotPerhapsUploadFB()
// A timer is already running, so we don't need to do anything
return;
- int now = static_cast<int>( TQDateTime::currentDateTime().toTime_t() );
+ int now = static_cast<int>( TQDateTime::tqcurrentDateTime().toTime_t() );
int eta = static_cast<int>( mNextUploadTime.toTime_t() ) - now;
if( !mUploadingFreeBusy ) {
// Not currently uploading
if( mNextUploadTime.isNull() ||
- TQDateTime::currentDateTime() > mNextUploadTime ) {
+ TQDateTime::tqcurrentDateTime() > mNextUploadTime ) {
// No uploading have been done in this session, or delay time is over
publishFreeBusy();
return;
@@ -256,8 +256,8 @@ void FreeBusyManager::publishFreeBusy()
// if (emailpos != -1) {
// const TQString emailName = defaultEmail.left( emailpos );
// const TQString emailHost = defaultEmail.mid( emailpos + 1 );
-// targetURL = targetURL.url().replace("%25u", emailName, true);
-// targetURL = targetURL.url().replace("%25d", emailHost, true);
+// targetURL = targetURL.url().tqreplace("%25u", emailName, true);
+// targetURL = targetURL.url().tqreplace("%25d", emailHost, true);
// }
targetURL.setUser( KOPrefs::instance()->mFreeBusyPublishUser );
targetURL.setPass( KOPrefs::instance()->mFreeBusyPublishPassword );
@@ -271,7 +271,7 @@ void FreeBusyManager::publishFreeBusy()
}
// Save the time of the next free/busy uploading
- mNextUploadTime = TQDateTime::currentDateTime();
+ mNextUploadTime = TQDateTime::tqcurrentDateTime();
if( KOPrefs::instance()->mFreeBusyPublishDelay > 0 )
mNextUploadTime = mNextUploadTime.addSecs(
KOPrefs::instance()->mFreeBusyPublishDelay * 60 );
@@ -280,7 +280,7 @@ void FreeBusyManager::publishFreeBusy()
// We need to massage the list a bit so that Outlook understands
// it.
- messageText = messageText.replace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ),
+ messageText = messageText.tqreplace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ),
"ORGANIZER:" );
// Create a local temp file and save the message to it
@@ -318,7 +318,7 @@ void FreeBusyManager::publishFreeBusy()
targetURL.setPass( KOPrefs::instance()->mPublishPassword );
} else {
// we use something else
- targetURL = KOPrefs::instance()->mPublishAnyURL.replace( "%SERVER%",
+ targetURL = KOPrefs::instance()->mPublishAnyURL.tqreplace( "%SERVER%",
emailHost );
targetURL.setUser( KOPrefs::instance()->mPublishUserName );
targetURL.setPass( KOPrefs::instance()->mPublishPassword );
@@ -337,7 +337,7 @@ void FreeBusyManager::publishFreeBusy()
false /*don't show progress info*/ );
//pass the mainwindow to the job so any prompts are active
KOrg::MainWindow *korg = ActionManager::findInstance( KURL() );
- job->setWindow( korg->topLevelWidget() );
+ job->setWindow( korg->tqtopLevelWidget() );
connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
TQT_SLOT( slotUploadFreeBusyResult( KIO::Job * ) ) );
@@ -438,7 +438,7 @@ void FreeBusyManager::cancelRetrieval()
mRetrieveQueue.clear();
}
-KURL replaceVariablesURL( const KURL &url, const TQString &email )
+KURL tqreplaceVariablesURL( const KURL &url, const TQString &email )
{
TQString emailName, emailHost;
int emailpos = email.find( '@' );
@@ -448,9 +448,9 @@ KURL replaceVariablesURL( const KURL &url, const TQString &email )
}
TQString saveStr = url.path();
- saveStr.replace( TQRegExp( "%[Ee][Mm][Aa][Ii][Ll]%" ), email );
- saveStr.replace( TQRegExp( "%[Nn][Aa][Mm][Ee]%" ), emailName );
- saveStr.replace( TQRegExp( "%[Ss][Ee][Rr][Vv][Ee][Rr]%" ), emailHost );
+ saveStr.tqreplace( TQRegExp( "%[Ee][Mm][Aa][Ii][Ll]%" ), email );
+ saveStr.tqreplace( TQRegExp( "%[Nn][Aa][Mm][Ee]%" ), emailName );
+ saveStr.tqreplace( TQRegExp( "%[Ss][Ee][Rr][Vv][Ee][Rr]%" ), emailHost );
KURL retUrl( url );
retUrl.setPath( saveStr );
@@ -468,7 +468,7 @@ bool fbExists( const KURL &url )
TQByteArray data;
if ( KIO::NetAccess::synchronousRun( job, 0, &data ) ) {
TQString dataStr ( data );
- if ( dataStr.contains( "BEGIN:VCALENDAR" ) ) {
+ if ( dataStr.tqcontains( "BEGIN:VCALENDAR" ) ) {
return true;
}
}
@@ -492,11 +492,11 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email )
cachedURL.setUser( KOPrefs::instance()->mFreeBusyRetrieveUser );
cachedURL.setPass( KOPrefs::instance()->mFreeBusyRetrievePassword );
}
- return replaceVariablesURL( cachedURL, email );
+ return tqreplaceVariablesURL( cachedURL, email );
}
// Try with the url configurated by preferred email in kaddressbook
- KABC::Addressee::List list= KABC::StdAddressBook::self( true )->findByEmail( email );
+ KABC::Addressee::List list= KABC::StdAddressBook::self( true )->tqfindByEmail( email );
KABC::Addressee::List::Iterator it;
TQString pref;
for ( it = list.begin(); it != list.end(); ++it ) {
@@ -509,7 +509,7 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email )
if ( !url.isEmpty() ) {
kdDebug(5850) << "FreeBusyManager::freeBusyUrl():"
<< "Taken url from preferred email:" << url << endl;
- return replaceVariablesURL( KURL( url ), email );
+ return tqreplaceVariablesURL( KURL( url ), email );
}
}
}
@@ -548,19 +548,19 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email )
}
}
- if ( sourceURL.url().contains( TQRegExp( "\\.[xiv]fb$" ) ) ) { // user specified a fullpath
- // do variable string replacements to the URL (MS Outlook style)
- KURL fullpathURL = replaceVariablesURL( sourceURL, email );
+ if ( sourceURL.url().tqcontains( TQRegExp( "\\.[xiv]fb$" ) ) ) { // user specified a fullpath
+ // do variable string tqreplacements to the URL (MS Outlook style)
+ KURL fullpathURL = tqreplaceVariablesURL( sourceURL, email );
// This should work with anything thrown at it, not just Kolab
// Notice that Kolab URLs are just entered as the base address, e.g. http://server.com/mykolab/
// This means that if the trailing slash is not entered, we can treat this as a custom, non-Kolab URL!
// In that case, just pass it on through with substitution for %u and %d
// TODO: May want an explicit configuration option in kogroupwareprefspage.ui for this
- if ((fullpathURL.url().endsWith("/", true) == false) || (fullpathURL.url().contains("%25u", true)) || (fullpathURL.url().contains("%25d", true))) {
+ if ((fullpathURL.url().endsWith("/", true) == false) || (fullpathURL.url().tqcontains("%25u", true)) || (fullpathURL.url().tqcontains("%25d", true))) {
// A generic URL, substitute %u and %d
- fullpathURL = fullpathURL.url().replace("%25u", emailName, true);
- fullpathURL = fullpathURL.url().replace("%25d", emailHost, true);
+ fullpathURL = fullpathURL.url().tqreplace("%25u", emailName, true);
+ fullpathURL = fullpathURL.url().tqreplace("%25d", emailHost, true);
}
else {
// This is (probably) a Kolab URL!
@@ -584,7 +584,7 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email )
for ( ext = extensions.constBegin(); ext != extensions.constEnd(); ++ext ) {
// build a url for this extension
sourceURL = KOPrefs::instance()->mFreeBusyRetrieveUrl;
- KURL dirURL = replaceVariablesURL( sourceURL, email );
+ KURL dirURL = tqreplaceVariablesURL( sourceURL, email );
if ( KOPrefs::instance()->mFreeBusyFullDomainRetrieval ) {
dirURL.addPath( email + '.' + (*ext) );
} else {