summaryrefslogtreecommitdiffstats
path: root/kresources/carddav
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 /kresources/carddav
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 'kresources/carddav')
-rw-r--r--kresources/carddav/config.cpp32
-rw-r--r--kresources/carddav/config.h12
-rw-r--r--kresources/carddav/configwidgets.cpp106
-rw-r--r--kresources/carddav/configwidgets.h6
-rw-r--r--kresources/carddav/job.cpp12
-rw-r--r--kresources/carddav/job.h30
-rw-r--r--kresources/carddav/preferences.cpp32
-rw-r--r--kresources/carddav/preferences.h28
-rw-r--r--kresources/carddav/reader.h16
-rw-r--r--kresources/carddav/resource.cpp88
-rw-r--r--kresources/carddav/resource.h30
-rw-r--r--kresources/carddav/writer.h20
12 files changed, 206 insertions, 206 deletions
diff --git a/kresources/carddav/config.cpp b/kresources/carddav/config.cpp
index 2fd583837..fb1ade761 100644
--- a/kresources/carddav/config.cpp
+++ b/kresources/carddav/config.cpp
@@ -25,9 +25,9 @@
#include <klistview.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
/*=========================================================================
| NAMESPACE
@@ -69,7 +69,7 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) {
| CONSTRUCTOR / DESTRUCTOR
========================================================================*/
-ResourceCardDavConfig::ResourceCardDavConfig( QWidget *parent )
+ResourceCardDavConfig::ResourceCardDavConfig( TQWidget *parent )
: KRES::ConfigWidget( parent )
{
setupUI();
@@ -112,38 +112,38 @@ void ResourceCardDavConfig::saveSettings( KRES::Resource *resource ) {
}
void ResourceCardDavConfig::setupUI() {
- QVBoxLayout *vertical = new QVBoxLayout(this);
+ TQVBoxLayout *vertical = new TQVBoxLayout(this);
- QGridLayout *mainLayout = new QGridLayout( this );
+ TQGridLayout *mainLayout = new TQGridLayout( this );
// URL
- QLabel *label = new QLabel( i18n( "URL:" ), this );
- mUrl = new QLineEdit( this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
+ mUrl = new TQLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUrl, 1, 1 );
// Username
- label = new QLabel( i18n( "Username:" ), this );
- mUsername = new QLineEdit( this );
+ label = new TQLabel( i18n( "Username:" ), this );
+ mUsername = new TQLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUsername, 2, 1 );
// Password
- label = new QLabel( i18n( "Password:" ), this );
- mPassword = new QLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ label = new TQLabel( i18n( "Password:" ), this );
+ mPassword = new TQLineEdit( this );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
// Remember password checkbox
- mRememberPassword = new QCheckBox( i18n("Remember password"), this );
+ mRememberPassword = new TQCheckBox( i18n("Remember password"), this );
mainLayout->addWidget(mRememberPassword, 4, 1);
- mUseUriNotUID = new QCheckBox( i18n( "Use URI instead of UID when modifying existing contacts" ), this );
+ mUseUriNotUID = new TQCheckBox( i18n( "Use URI instead of UID when modifying existing contacts" ), this );
mainLayout->addWidget( mUseUriNotUID, 5, 1 );
// configs
- QHBoxLayout* horizontal = new QHBoxLayout(this);
+ TQHBoxLayout* horizontal = new TQHBoxLayout(this);
// Reload config
mReloadConfig = new CardDavReloadConfig(this);
diff --git a/kresources/carddav/config.h b/kresources/carddav/config.h
index f74cb07f9..05b190f4f 100644
--- a/kresources/carddav/config.h
+++ b/kresources/carddav/config.h
@@ -42,7 +42,7 @@ class KDE_EXPORT ResourceCardDavConfig : public KRES::ConfigWidget
public:
- ResourceCardDavConfig(QWidget *parent = 0);
+ ResourceCardDavConfig(TQWidget *parent = 0);
public slots:
@@ -55,11 +55,11 @@ protected:
private:
- QLineEdit *mUrl;
- QLineEdit *mUsername;
- QLineEdit *mPassword;
- QCheckBox *mRememberPassword;
- QCheckBox *mUseUriNotUID;
+ TQLineEdit *mUrl;
+ TQLineEdit *mUsername;
+ TQLineEdit *mPassword;
+ TQCheckBox *mRememberPassword;
+ TQCheckBox *mUseUriNotUID;
CardDavReloadConfig* mReloadConfig;
CardDavSaveConfig* mSaveConfig;
diff --git a/kresources/carddav/configwidgets.cpp b/kresources/carddav/configwidgets.cpp
index e97a0a88d..baa70b403 100644
--- a/kresources/carddav/configwidgets.cpp
+++ b/kresources/carddav/configwidgets.cpp
@@ -39,14 +39,14 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
using namespace KABC;
@@ -58,8 +58,8 @@ class CardDavConfigPrivate
: mGroup( 0 ),
mIntervalSpin( 0 ) {}
- QButtonGroup *mGroup;
- QSpinBox *mIntervalSpin;
+ TQButtonGroup *mGroup;
+ TQSpinBox *mIntervalSpin;
};
class CardDavReloadConfig::Private
@@ -73,47 +73,47 @@ class CardDavSaveConfig::Private
};
//@endcond
-CardDavReloadConfig::CardDavReloadConfig( QWidget *parent )
- : QWidget( parent ), d( new KABC::CardDavReloadConfig::Private() )
+CardDavReloadConfig::CardDavReloadConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KABC::CardDavReloadConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Reload" ), this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Reload" ), this );
topLayout->addWidget( groupBox );
- QRadioButton *noAutomaticReload =
- new QRadioButton(
+ TQRadioButton *noAutomaticReload =
+ new TQRadioButton(
//i18nc( "@option:radio never reload the cache", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *automaticReloadOnStartup =
- new QRadioButton(
+ TQRadioButton *automaticReloadOnStartup =
+ new TQRadioButton(
//i18nc( "@option:radio reload the cache on startup", "Only on startup" ), groupBox );
i18n( "Only on startup" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
// i18nc( "@option:radio reload the cache at regular intervals",
// "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( intervalRadio, 2 );
d->mGroup->insert( automaticReloadOnStartup, 1 );
d->mGroup->insert( noAutomaticReload, 0 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(intervalRadio);
vbox->addWidget(intervalBox);
vbox->addWidget(automaticReloadOnStartup);
@@ -152,54 +152,54 @@ void CardDavReloadConfig::slotIntervalToggled( bool checked )
}
}
-CardDavSaveConfig::CardDavSaveConfig( QWidget *parent )
- : QWidget( parent ), d( new KABC::CardDavSaveConfig::Private() )
+CardDavSaveConfig::CardDavSaveConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KABC::CardDavSaveConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Save" ), this );
- d->mGroup = new QButtonGroup( this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Save" ), this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
topLayout->addWidget( groupBox );
- QRadioButton *never =
- new QRadioButton(
+ TQRadioButton *never =
+ new TQRadioButton(
//i18nc( "@option:radio never save the cache automatically", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *onExit =
- new QRadioButton(
+ TQRadioButton *onExit =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache on exit", "Only on exit" ), groupBox );
i18n( "Only on exit" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache at regular intervals", "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( never, 0 );
d->mGroup->insert( onExit, 1 );
d->mGroup->insert( intervalRadio, 2 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
- QRadioButton *delay =
- new QRadioButton(
+ TQRadioButton *delay =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after some delay",
// "Delayed after changes" ), groupBox );
i18n( "Delayed after changes" ), groupBox );
- QRadioButton *every =
- new QRadioButton(
+ TQRadioButton *every =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after every modification",
// "Immediately after changes" ), groupBox );
i18n( "Immediately after changes" ), groupBox );
@@ -211,7 +211,7 @@ CardDavSaveConfig::CardDavSaveConfig( QWidget *parent )
intervalBox->hide();
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(delay);
vbox->addWidget(every);
vbox->addWidget(intervalRadio);
diff --git a/kresources/carddav/configwidgets.h b/kresources/carddav/configwidgets.h
index 3cfd8a699..f50c58dd5 100644
--- a/kresources/carddav/configwidgets.h
+++ b/kresources/carddav/configwidgets.h
@@ -34,7 +34,7 @@
#ifndef KCARDDAV_AUTOWIDGETS_H
#define KCARDDAV_AUTOWIDGETS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdemacros.h>
namespace KABC {
@@ -50,7 +50,7 @@ class KDE_EXPORT CardDavReloadConfig : public QWidget
{
Q_OBJECT
public:
- explicit CardDavReloadConfig( QWidget *parent = 0 );
+ explicit CardDavReloadConfig( TQWidget *parent = 0 );
~CardDavReloadConfig();
public slots:
void loadSettings( ResourceCached *resource );
@@ -76,7 +76,7 @@ class KDE_EXPORT CardDavSaveConfig : public QWidget
{
Q_OBJECT
public:
- explicit CardDavSaveConfig( QWidget *parent = 0 );
+ explicit CardDavSaveConfig( TQWidget *parent = 0 );
~CardDavSaveConfig();
public slots:
diff --git a/kresources/carddav/job.cpp b/kresources/carddav/job.cpp
index ce5141f06..994964afb 100644
--- a/kresources/carddav/job.cpp
+++ b/kresources/carddav/job.cpp
@@ -17,7 +17,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qmutex.h>
+#include <tqmutex.h>
#define log(s) kdDebug() << s;
@@ -35,7 +35,7 @@ using namespace KABC;
| CONSTRUCTOR AND DESTRUCTOR
========================================================================*/
-CardDavJob::CardDavJob(const QString& url) : mUseURI(false) {
+CardDavJob::CardDavJob(const TQString& url) : mUseURI(false) {
cleanJob();
setUrl(url);
}
@@ -55,14 +55,14 @@ void CardDavJob::enableCarddavDebug(runtime_info* rt) {
}
}
-void CardDavJob::setErrorString(const QString& err, const long number) {
+void CardDavJob::setErrorString(const TQString& err, const long number) {
mError = true;
mErrorString = err;
mErrorNumber = number;
}
void CardDavJob::processError(const carddav_error* err) {
- QString error_string;
+ TQString error_string;
long code = err->code;
@@ -103,8 +103,8 @@ void CardDavJob::run() {
// Signal done
// 1000 is read, 1001 is write
- if (type() == 0) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1000) ) );
- if (type() == 1) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1001) ) );
+ if (type() == 0) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1000) ) );
+ if (type() == 1) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1001) ) );
}
// EOF ========================================================================
diff --git a/kresources/carddav/job.h b/kresources/carddav/job.h
index 79e12f828..75626abf3 100644
--- a/kresources/carddav/job.h
+++ b/kresources/carddav/job.h
@@ -16,10 +16,10 @@
#ifndef KABCDAV_JOB_H
#define KABCDAV_JOB_H
-#include <qthread.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qapplication.h>
+#include <tqthread.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
extern "C" {
#include <libcarddav/carddav.h>
@@ -34,21 +34,21 @@ namespace KABC {
/**
* Calendar job.
*/
-class CardDavJob : public QThread {
+class CardDavJob : public TQThread {
public:
/**
* @param url URL to load.
*/
- CardDavJob(const QString& url = QString());
+ CardDavJob(const TQString& url = TQString());
virtual ~CardDavJob();
/**
* Sets a new URL to load.
*/
- virtual void setUrl(const QString& s) {
+ virtual void setUrl(const TQString& s) {
mUrl = s;
}
@@ -62,7 +62,7 @@ public:
/**
* Sets the parent qobject.
*/
- virtual void setParent(QObject *s) {
+ virtual void setParent(TQObject *s) {
mParent = s;
}
@@ -76,7 +76,7 @@ public:
/**
* @return URL to load.
*/
- virtual QString url() const {
+ virtual TQString url() const {
return mUrl;
}
@@ -90,7 +90,7 @@ public:
/**
* @return parent object
*/
- virtual QObject *parent() {
+ virtual TQObject *parent() {
return mParent;
}
@@ -111,7 +111,7 @@ public:
/**
* @return an error string.
*/
- virtual QString errorString() const {
+ virtual TQString errorString() const {
return mErrorString;
}
@@ -147,7 +147,7 @@ protected:
/**
* Sets an error string to @p err. Also sets an error flag.
*/
- void setErrorString(const QString& str, const long number);
+ void setErrorString(const TQString& str, const long number);
/**
* Process an error.
@@ -159,11 +159,11 @@ protected:
private:
- QString mUrl;
+ TQString mUrl;
bool mError;
- QString mErrorString;
+ TQString mErrorString;
long mErrorNumber;
- QObject *mParent;
+ TQObject *mParent;
int mType;
bool mUseURI;
diff --git a/kresources/carddav/preferences.cpp b/kresources/carddav/preferences.cpp
index e95041195..cf2cdbc5a 100644
--- a/kresources/carddav/preferences.cpp
+++ b/kresources/carddav/preferences.cpp
@@ -16,8 +16,8 @@
#include "preferences.h"
#include <kwallet.h>
-#include <qstring.h>
-#include <qurl.h>
+#include <tqstring.h>
+#include <tqurl.h>
#include <kdebug.h>
/*=========================================================================
@@ -31,15 +31,15 @@ using namespace KWallet;
| CONSTANTS
========================================================================*/
-const QString CardDavPrefs::NO_PASSWORD = "";
-const QString CardDavPrefs::WALLET_FOLDER = "CardDAV resource";
-const QString CardDavPrefs::WALLET_PWD_SUFFIX = ":carddav_password";
+const TQString CardDavPrefs::NO_PASSWORD = "";
+const TQString CardDavPrefs::WALLET_FOLDER = "CardDAV resource";
+const TQString CardDavPrefs::WALLET_PWD_SUFFIX = ":carddav_password";
/*=========================================================================
| METHODS
========================================================================*/
-bool CardDavPrefs::setWalletFolder(const QString& folder) {
+bool CardDavPrefs::setWalletFolder(const TQString& folder) {
bool ret = true;
if (!mNoWallet && NULL != mWallet) {
@@ -97,7 +97,7 @@ void CardDavPrefs::removeWallet(bool noWallet) {
mNoWallet = noWallet;
}
-void CardDavPrefs::addPrefix(const QString& prefix) {
+void CardDavPrefs::addPrefix(const TQString& prefix) {
KConfigSkeletonItem::List itemList = items();
KConfigSkeletonItem::List::Iterator it;
@@ -106,7 +106,7 @@ void CardDavPrefs::addPrefix(const QString& prefix) {
}
}
-bool CardDavPrefs::writePasswordToWallet(const QString& password) {
+bool CardDavPrefs::writePasswordToWallet(const TQString& password) {
Wallet* w = getWallet();
@@ -123,12 +123,12 @@ bool CardDavPrefs::writePasswordToWallet(const QString& password) {
return ret;
}
-bool CardDavPrefs::readPasswordFromWallet(QString& password) {
+bool CardDavPrefs::readPasswordFromWallet(TQString& password) {
Wallet* w = getWallet();
bool ret = false;
if (NULL != w) {
- QString p;
+ TQString p;
int rc = w->readPassword(mPrefix + WALLET_PWD_SUFFIX, p);
if (0 == rc) {
//CardDavPrefsSkel::setPassword(p);
@@ -160,7 +160,7 @@ bool CardDavPrefs::removePasswordFromWallet() {
return ret;
}
-void CardDavPrefs::setPassword(const QString& p) {
+void CardDavPrefs::setPassword(const TQString& p) {
mPassword = p;
@@ -169,14 +169,14 @@ void CardDavPrefs::setPassword(const QString& p) {
}
}
-QString CardDavPrefs::password() {
+TQString CardDavPrefs::password() {
if (NO_PASSWORD == mPassword) {
readPasswordFromWallet(mPassword);
}
return mPassword;
}
-QString CardDavPrefs::getusername() {
+TQString CardDavPrefs::getusername() {
return username();
}
@@ -210,10 +210,10 @@ bool CardDavPrefs::getUseURI() {
return useURI();
}
-QString CardDavPrefs::getFullUrl() {
+TQString CardDavPrefs::getFullUrl() {
- QUrl t(url());
- QString safeURL;
+ TQUrl t(url());
+ TQString safeURL;
int firstAt;
t.setUser(username());
diff --git a/kresources/carddav/preferences.h b/kresources/carddav/preferences.h
index 6035efe2d..a01ee041b 100644
--- a/kresources/carddav/preferences.h
+++ b/kresources/carddav/preferences.h
@@ -43,7 +43,7 @@ public:
/**
* @param prefix Unique prefix of the resource instance (use identifier() method).
*/
- CardDavPrefs(const QString& prefix)
+ CardDavPrefs(const TQString& prefix)
: mWallet(NULL)
, mNoWallet(false)
, mPrefix(prefix)
@@ -66,25 +66,25 @@ public:
* to be properly saved, call this method after ensuring the remember flag
* is set.
*/
- void setPassword(const QString& p);
+ void setPassword(const TQString& p);
/**
* Returns password. The password is taken from the wallet.
* May return an empty string, if there is no password available.
*/
- QString password();
+ TQString password();
/**
* Returns the username.
*/
- QString getusername();
+ TQString getusername();
void setRememberPassword(bool v);
/**
* @return A full URL to connect to CardDAV server (including username and password).
*/
- QString getFullUrl();
+ TQString getFullUrl();
bool getUseURI();
@@ -95,7 +95,7 @@ protected:
* can use the same config file.
* @param prefix Unique prefix of the resource instance.
*/
- void addPrefix(const QString& prefix);
+ void addPrefix(const TQString& prefix);
/**
* Returns the wallet or NULL, if the wallet can't be obtained.
@@ -107,7 +107,7 @@ protected:
* @param folder the wallet working folder
* @return true, if the folder has been set, and false otherwise.
*/
- bool setWalletFolder(const QString& folder);
+ bool setWalletFolder(const TQString& folder);
/**
* Removes the wallet. If @p noWallet is set, the wallet has been marked inaccessible, so that subsequent
@@ -120,14 +120,14 @@ protected:
* @param password password to write
* @return true on success, false on failure
*/
- bool writePasswordToWallet(const QString& password);
+ bool writePasswordToWallet(const TQString& password);
/**
* Extracts password from the wallet.
* @param password a variable to save read password to.
* @return true on success, false on failure
*/
- bool readPasswordFromWallet(QString& password);
+ bool readPasswordFromWallet(TQString& password);
/**
* Clears password in the wallet.
@@ -137,15 +137,15 @@ protected:
private:
- static const QString NO_PASSWORD;
- static const QString WALLET_FOLDER;
- static const QString WALLET_PWD_SUFFIX;
+ static const TQString NO_PASSWORD;
+ static const TQString WALLET_FOLDER;
+ static const TQString WALLET_PWD_SUFFIX;
KWallet::Wallet* mWallet;
bool mNoWallet;
- QString mPrefix;
- QString mPassword;
+ TQString mPrefix;
+ TQString mPassword;
};
} // namespace KABC
diff --git a/kresources/carddav/reader.h b/kresources/carddav/reader.h
index f4c1eb84d..181d4eb6a 100644
--- a/kresources/carddav/reader.h
+++ b/kresources/carddav/reader.h
@@ -18,8 +18,8 @@
#include "job.h"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KABC {
@@ -37,7 +37,7 @@ public:
/**
* @param url URL to load.
*/
- CardDavReader(const QString& url = QString()) :
+ CardDavReader(const TQString& url = TQString()) :
CardDavJob(url)
, mGetAll(true)
{
@@ -48,7 +48,7 @@ public:
* This method call disables the effect of setGetAll() call.
* setGetAll() call disables the effect of this method.
*/
- void setRange(const QDateTime& start, const QDateTime& end) {
+ void setRange(const TQDateTime& start, const TQDateTime& end) {
mGetAll = false;
mTimeStart = start;
mTimeEnd = end;
@@ -66,7 +66,7 @@ public:
/**
* @return downloaded calendar data in iCal format.
*/
- QString data() const {
+ TQString data() const {
return mData;
}
@@ -78,10 +78,10 @@ protected:
private:
- QString mData;
+ TQString mData;
bool mGetAll;
- QDateTime mTimeStart;
- QDateTime mTimeEnd;
+ TQDateTime mTimeStart;
+ TQDateTime mTimeEnd;
};
diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp
index f79d82235..315b6270d 100644
--- a/kresources/carddav/resource.cpp
+++ b/kresources/carddav/resource.cpp
@@ -15,10 +15,10 @@
#include <string.h>
-#include <qurl.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqurl.h>
+#include <tqmessagebox.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
@@ -26,13 +26,13 @@
#include <klocale.h>
#include <kpassdlg.h>
-#include <qdatetime.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqtimer.h>
#ifdef KCARDDAV_DEBUG
- #include <qfile.h>
+ #include <tqfile.h>
#endif
#include "resource.h"
@@ -105,7 +105,7 @@ ResourceCardDav::~ResourceCardDav() {
while ((mWriter->running() == true) || (mWritingQueue.isEmpty() == false) || !mWritingQueueReady) {
readLockout = true;
sleep(1);
- qApp->processEvents(QEventLoop::ExcludeUserInput);
+ qApp->processEvents(TQEventLoop::ExcludeUserInput);
}
if (mWriter) {
@@ -144,7 +144,7 @@ bool ResourceCardDav::load() {
return true; // Silently fail; the user has obviously not responded to a dialog and we don't need to pop up more of them!
}
- log(QString("doLoad(%1)").arg(syncCache));
+ log(TQString("doLoad(%1)").arg(syncCache));
// FIXME KABC
//clearCache();
@@ -166,7 +166,7 @@ bool ResourceCardDav::load() {
bool ResourceCardDav::doSave() {
bool syncCache = true;
- log(QString("doSave(%1)").arg(syncCache));
+ log(TQString("doSave(%1)").arg(syncCache));
if (!hasChanges()) {
log("no changes");
@@ -194,7 +194,7 @@ bool ResourceCardDav::doSave() {
clearChanges();
if (mWriteRetryTimer != NULL) {
if (mWriteRetryTimer->isActive() == false) {
- disconnect( mWriteRetryTimer, SIGNAL(timeout()), this, SLOT(doSave()) );
+ disconnect( mWriteRetryTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doSave()) );
delete mWriteRetryTimer;
mWriteRetryTimer = NULL;
}
@@ -253,8 +253,8 @@ void ResourceCardDav::init() {
// creating jobs
// Qt4 handles this quite differently, as shown below,
// whereas Qt3 needs events (see ::event())
-// connect(mLoader, SIGNAL(finished()), this, SLOT(loadFinished()));
-// connect(mWriter, SIGNAL(finished()), this, SLOT(writingFinished()));
+// connect(mLoader, TQT_SIGNAL(finished()), this, TQT_SLOT(loadFinished()));
+// connect(mWriter, TQT_SIGNAL(finished()), this, TQT_SLOT(writingFinished()));
setType("ResourceCardDav");
}
@@ -338,14 +338,14 @@ void ResourceCardDav::loadingQueuePop() {
mLoader->setType(0);
mLoader->setUseURI(mPrefs->getUseURI());
- //QDateTime dt(QDate::currentDate());
+ //TQDateTime dt(TQDate::currentDate());
//mLoader->setRange(dt.addDays(-CACHE_DAYS), dt.addDays(CACHE_DAYS));
//mLoader->setGetAll();
mLoadingQueueReady = false;
log("starting actual download job");
- mLoader->start(QThread::LowestPriority);
+ mLoader->start(TQThread::LowestPriority);
// if all ok, removing the task from the queue
mLoadingQueue.dequeue();
@@ -354,7 +354,7 @@ void ResourceCardDav::loadingQueuePop() {
delete t;
}
-void ResourceCardDav::startLoading(const QString& url) {
+void ResourceCardDav::startLoading(const TQString& url) {
LoadingTask *t = new LoadingTask;
t->url = url;
loadingQueuePush(t);
@@ -373,29 +373,29 @@ void ResourceCardDav::loadFinished() {
if (loader->error()) {
if (loader->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startLoading(mPrefs->getFullUrl());
}
}
else {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
}
else {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
} else {
log("successful load");
- QString data = loader->data();
+ TQString data = loader->data();
if (!data.isNull() && !data.isEmpty()) {
data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line
@@ -422,7 +422,7 @@ void ResourceCardDav::loadFinished() {
loadingQueuePop();
}
-bool ResourceCardDav::checkData(const QString& data) {
+bool ResourceCardDav::checkData(const TQString& data) {
log("checking the data");
KABC::VCardConverter converter;
@@ -436,7 +436,7 @@ bool ResourceCardDav::checkData(const QString& data) {
return ret;
}
-bool ResourceCardDav::parseData(const QString& data) {
+bool ResourceCardDav::parseData(const TQString& data) {
log("parseData()");
bool ret = true;
@@ -471,11 +471,11 @@ bool ResourceCardDav::parseData(const QString& data) {
// debug code here -------------------------------------------------------
#ifdef KCARDDAV_DEBUG
- const QString fout_path = "/tmp/kcarddav_download_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcarddav_download_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << data << "\n";
fout.close();
@@ -553,11 +553,11 @@ void ResourceCardDav::writingQueuePop() {
mWriter->setUseURI(mPrefs->getUseURI());
#ifdef KCARDDAV_DEBUG
- const QString fout_path = "/tmp/kcarddav_upload_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcarddav_upload_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << "================== Added:\n" << t->added << "\n";
sout << "================== Changed:\n" << t->changed << "\n";
@@ -575,7 +575,7 @@ void ResourceCardDav::writingQueuePop() {
mWritingQueueReady = false;
log("starting actual write job");
- mWriter->start(QThread::LowestPriority);
+ mWriter->start(TQThread::LowestPriority);
// if all ok, remove the task from the queue
mWritingQueue.dequeue();
@@ -584,7 +584,7 @@ void ResourceCardDav::writingQueuePop() {
delete t;
}
-bool ResourceCardDav::event ( QEvent * e ) {
+bool ResourceCardDav::event ( TQEvent * e ) {
if (e->type() == 1000) {
// Read done
loadFinished();
@@ -598,7 +598,7 @@ bool ResourceCardDav::event ( QEvent * e ) {
else return FALSE;
}
-bool ResourceCardDav::startWriting(const QString& url) {
+bool ResourceCardDav::startWriting(const TQString& url) {
log("startWriting: url = " + url);
WritingTask *t = new WritingTask;
@@ -609,8 +609,8 @@ bool ResourceCardDav::startWriting(const QString& url) {
// Before these calls are made any existing read (and maybe write) threads should be finished
if ((mLoader->running() == true) || (mLoadingQueue.isEmpty() == false) || (mWriter->running() == true) || (mWritingQueue.isEmpty() == false)) {
if (mWriteRetryTimer == NULL) {
- mWriteRetryTimer = new QTimer(this);
- connect( mWriteRetryTimer, SIGNAL(timeout()), SLOT(doSave()) );
+ mWriteRetryTimer = new TQTimer(this);
+ connect( mWriteRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doSave()) );
}
mWriteRetryTimer->start(1000, TRUE);
return false;
@@ -642,25 +642,25 @@ void ResourceCardDav::writingFinished() {
if (mWriter->error() && (abs(mWriter->errorNumber()) != 207)) {
if (mWriter->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startWriting(mPrefs->getFullUrl());
}
}
else {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
}
else {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
} else {
log("success");
diff --git a/kresources/carddav/resource.h b/kresources/carddav/resource.h
index d855f6529..b23008132 100644
--- a/kresources/carddav/resource.h
+++ b/kresources/carddav/resource.h
@@ -17,8 +17,8 @@
#define KABC_RESOURCECARDDAV_H
#include "preferences.h"
-#include <qthread.h>
-#include <qptrqueue.h>
+#include <tqthread.h>
+#include <tqptrqueue.h>
#include <kabcresourcecached.h>
#include <libkdepim/progressmanager.h>
@@ -84,14 +84,14 @@ protected slots:
protected:
struct LoadingTask {
- QString url;
+ TQString url;
};
struct WritingTask {
- QString url;
- QString added;
- QString changed;
- QString deleted;
+ TQString url;
+ TQString added;
+ TQString changed;
+ TQString deleted;
};
@@ -126,28 +126,28 @@ protected:
* Initiates calendar loading process.
* @param url URL to load calendar data from.
*/
- void startLoading(const QString& url);
+ void startLoading(const TQString& url);
/**
* Checks if the data is correct and can be parsed.
* @param data ical string to check.
* @return true if the data is correct, false otherwise.
*/
- bool checkData(const QString& data);
+ bool checkData(const TQString& data);
/**
* Parses the data and adds events to the calendar.
* @param data calendar data.
* @return true on success, false on fail.
*/
- bool parseData(const QString& data);
+ bool parseData(const TQString& data);
/**
* Initiates calendar writing process.
* @param url URL to save calendar data to.
* @return true if write was queued successfully, false if not
*/
- bool startWriting(const QString& url);
+ bool startWriting(const TQString& url);
/**
* Ensures incidences' read-only states are the same as the calendar's read-only state.
@@ -178,7 +178,7 @@ protected:
*/
void writingQueuePush(const WritingTask *task);
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private:
@@ -209,12 +209,12 @@ private:
KPIM::ProgressItem *mProgress;
bool mLoadingQueueReady;
- QPtrQueue<LoadingTask> mLoadingQueue;
+ TQPtrQueue<LoadingTask> mLoadingQueue;
bool mWritingQueueReady;
- QPtrQueue<WritingTask> mWritingQueue;
+ TQPtrQueue<WritingTask> mWritingQueue;
- QTimer *mWriteRetryTimer;
+ TQTimer *mWriteRetryTimer;
};
diff --git a/kresources/carddav/writer.h b/kresources/carddav/writer.h
index c35e185a8..4af3fe36b 100644
--- a/kresources/carddav/writer.h
+++ b/kresources/carddav/writer.h
@@ -19,8 +19,8 @@
#include "job.h"
#include <string>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KABC {
@@ -38,7 +38,7 @@ public:
/**
* @param url URL to load.
*/
- CardDavWriter(const QString& url = QString()) :
+ CardDavWriter(const TQString& url = TQString()) :
CardDavJob(url)
{
clearObjects();
@@ -49,7 +49,7 @@ public:
* @param s icalendar-formatted string consists of all added incidences plus necessary calendar info.
* May be an empty string, which means there is no added incidences to send.
*/
- void setAddedObjects(const QString& s) {
+ void setAddedObjects(const TQString& s) {
mAdded = s;
}
@@ -58,7 +58,7 @@ public:
* @param s icalendar-formatted string consists of all changed incidences plus necessary calendar info.
* May be an empty string, which means there is no changed incidences to send.
*/
- void setChangedObjects(const QString& s) {
+ void setChangedObjects(const TQString& s) {
mChanged = s;
}
@@ -67,7 +67,7 @@ public:
* @param s icalendar-formatted string consists of all deleted incidences plus necessary calendar info.
* May be an empty string, which means there is no deleted incidences to send.
*/
- void setDeletedObjects(const QString& s) {
+ void setDeletedObjects(const TQString& s) {
mDeleted = s;
}
@@ -88,7 +88,7 @@ protected:
/// Just a wrapper above libcaldav functions.
template<typename Operation>
- int pushObjects(const QString& data, Operation op, int okCode, runtime_info* RT) {
+ int pushObjects(const TQString& data, Operation op, int okCode, runtime_info* RT) {
int r = okCode;
if (!data.isNull() && !data.isEmpty()) {
r = op(std::string(data.ascii()).c_str(), std::string(url().ascii()).c_str(), RT);
@@ -98,9 +98,9 @@ protected:
private:
- QString mAdded;
- QString mChanged;
- QString mDeleted;
+ TQString mAdded;
+ TQString mChanged;
+ TQString mDeleted;
};
} // namespace KABC