From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/carddav/config.cpp | 4 ++-- kresources/carddav/config.h | 3 ++- kresources/carddav/configwidgets.cpp | 12 ++++++------ kresources/carddav/configwidgets.h | 14 ++++++++------ kresources/carddav/job.cpp | 4 ++-- kresources/carddav/job.h | 6 +++--- kresources/carddav/preferences.cpp | 6 +++--- kresources/carddav/resource.cpp | 4 ++-- kresources/carddav/resource.h | 1 + kresources/carddav/writer.cpp | 4 ++-- 10 files changed, 31 insertions(+), 27 deletions(-) (limited to 'kresources/carddav') diff --git a/kresources/carddav/config.cpp b/kresources/carddav/config.cpp index 337a4cdab..a33519c9d 100644 --- a/kresources/carddav/config.cpp +++ b/kresources/carddav/config.cpp @@ -69,8 +69,8 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) { | CONSTRUCTOR / DESTRUCTOR ========================================================================*/ -ResourceCardDavConfig::ResourceCardDavConfig( TQWidget *parent ) - : KRES::ConfigWidget( parent ) +ResourceCardDavConfig::ResourceCardDavConfig( TQWidget *tqparent ) + : KRES::ConfigWidget( tqparent ) { setupUI(); } diff --git a/kresources/carddav/config.h b/kresources/carddav/config.h index 7ea95aa96..4fd95511d 100644 --- a/kresources/carddav/config.h +++ b/kresources/carddav/config.h @@ -39,10 +39,11 @@ class CardDavSaveConfig; class KDE_EXPORT ResourceCardDavConfig : public KRES::ConfigWidget { Q_OBJECT + TQ_OBJECT public: - ResourceCardDavConfig(TQWidget *parent = 0); + ResourceCardDavConfig(TQWidget *tqparent = 0); public slots: diff --git a/kresources/carddav/configwidgets.cpp b/kresources/carddav/configwidgets.cpp index b159a0211..84d97938d 100644 --- a/kresources/carddav/configwidgets.cpp +++ b/kresources/carddav/configwidgets.cpp @@ -73,8 +73,8 @@ class CardDavSaveConfig::Private }; //@endcond -CardDavReloadConfig::CardDavReloadConfig( TQWidget *parent ) - : TQWidget( parent ), d( new KABC::CardDavReloadConfig::Private() ) +CardDavReloadConfig::CardDavReloadConfig( TQWidget *tqparent ) + : TQWidget( tqparent ), d( new KABC::CardDavReloadConfig::Private() ) { TQBoxLayout *topLayout = new TQVBoxLayout( this ); @@ -112,7 +112,7 @@ CardDavReloadConfig::CardDavReloadConfig( TQWidget *parent ) d->mIntervalSpin->setRange( 1, 900 ); d->mIntervalSpin->setEnabled( false ); - groupBox->setColumnLayout(1, Qt::Vertical); + groupBox->setColumnLayout(1, TQt::Vertical); TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->tqlayout()); vbox->addWidget(intervalRadio); vbox->addWidget(intervalBox); @@ -147,8 +147,8 @@ void CardDavReloadConfig::slotIntervalToggled( bool checked ) } } -CardDavSaveConfig::CardDavSaveConfig( TQWidget *parent ) - : TQWidget( parent ), d( new KABC::CardDavSaveConfig::Private() ) +CardDavSaveConfig::CardDavSaveConfig( TQWidget *tqparent ) + : TQWidget( tqparent ), d( new KABC::CardDavSaveConfig::Private() ) { TQBoxLayout *topLayout = new TQVBoxLayout( this ); @@ -205,7 +205,7 @@ CardDavSaveConfig::CardDavSaveConfig( TQWidget *parent ) intervalRadio->hide(); intervalBox->hide(); - groupBox->setColumnLayout(1, Qt::Vertical); + groupBox->setColumnLayout(1, TQt::Vertical); TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->tqlayout()); vbox->addWidget(delay); vbox->addWidget(every); diff --git a/kresources/carddav/configwidgets.h b/kresources/carddav/configwidgets.h index f50c58dd5..47b92bfaf 100644 --- a/kresources/carddav/configwidgets.h +++ b/kresources/carddav/configwidgets.h @@ -46,11 +46,12 @@ class ResourceCached; @see ResourceCached */ -class KDE_EXPORT CardDavReloadConfig : public QWidget +class KDE_EXPORT CardDavReloadConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - explicit CardDavReloadConfig( TQWidget *parent = 0 ); + explicit CardDavReloadConfig( TQWidget *tqparent = 0 ); ~CardDavReloadConfig(); public slots: void loadSettings( ResourceCached *resource ); @@ -61,7 +62,7 @@ class KDE_EXPORT CardDavReloadConfig : public QWidget private: //@cond PRIVATE - //Q_DISABLE_COPY( CardDavReloadConfig ) + //TQ_DISABLE_COPY( CardDavReloadConfig ) class Private; Private *const d; //@endcond @@ -72,11 +73,12 @@ class KDE_EXPORT CardDavReloadConfig : public QWidget @see ResourceCached */ -class KDE_EXPORT CardDavSaveConfig : public QWidget +class KDE_EXPORT CardDavSaveConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - explicit CardDavSaveConfig( TQWidget *parent = 0 ); + explicit CardDavSaveConfig( TQWidget *tqparent = 0 ); ~CardDavSaveConfig(); public slots: @@ -88,7 +90,7 @@ class KDE_EXPORT CardDavSaveConfig : public QWidget private: //@cond PRIVATE - //Q_DISABLE_COPY( CardDavSaveConfig ) + //TQ_DISABLE_COPY( CardDavSaveConfig ) class Private; Private *const d; //@endcond diff --git a/kresources/carddav/job.cpp b/kresources/carddav/job.cpp index 994964afb..d2795d68b 100644 --- a/kresources/carddav/job.cpp +++ b/kresources/carddav/job.cpp @@ -103,8 +103,8 @@ void CardDavJob::run() { // Signal done // 1000 is read, 1001 is write - if (type() == 0) TQApplication::postEvent ( parent(), new TQEvent( static_cast(1000) ) ); - if (type() == 1) TQApplication::postEvent ( parent(), new TQEvent( static_cast(1001) ) ); + if (type() == 0) TQApplication::postEvent ( tqparent(), new TQEvent( static_cast(1000) ) ); + if (type() == 1) TQApplication::postEvent ( tqparent(), new TQEvent( static_cast(1001) ) ); } // EOF ======================================================================== diff --git a/kresources/carddav/job.h b/kresources/carddav/job.h index 52a04bc7a..e40604b9f 100644 --- a/kresources/carddav/job.h +++ b/kresources/carddav/job.h @@ -60,7 +60,7 @@ public: } /** - * Sets the parent qobject. + * Sets the tqparent qobject. */ virtual void setParent(TQObject *s) { mParent = s; @@ -88,9 +88,9 @@ public: } /** - * @return parent object + * @return tqparent object */ - virtual TQObject *parent() { + virtual TQObject *tqparent() { return mParent; } diff --git a/kresources/carddav/preferences.cpp b/kresources/carddav/preferences.cpp index 61d17e30d..6511cfcb6 100644 --- a/kresources/carddav/preferences.cpp +++ b/kresources/carddav/preferences.cpp @@ -221,9 +221,9 @@ TQString CardDavPrefs::getFullUrl() { safeURL = t.toString(); - firstAt = safeURL.find("@") + 1; - while (safeURL.find("@", firstAt) != -1) { - safeURL.tqreplace(safeURL.find("@", firstAt), 1, "%40"); + firstAt = safeURL.tqfind("@") + 1; + while (safeURL.tqfind("@", firstAt) != -1) { + safeURL.tqreplace(safeURL.tqfind("@", firstAt), 1, "%40"); } // Unencode the username, as Zimbra stupidly rejects the %40 diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp index b8a2525ed..5cd95c3f5 100644 --- a/kresources/carddav/resource.cpp +++ b/kresources/carddav/resource.cpp @@ -251,8 +251,8 @@ void ResourceCardDav::init() { mWriter = new CardDavWriter; // creating jobs - // Qt4 handles this quite differently, as shown below, - // whereas Qt3 needs events (see ::event()) + // TQt4 handles this quite differently, as shown below, + // whereas TQt3 needs events (see ::event()) // connect(mLoader, TQT_SIGNAL(finished()), this, TQT_SLOT(loadFinished())); // connect(mWriter, TQT_SIGNAL(finished()), this, TQT_SLOT(writingFinished())); diff --git a/kresources/carddav/resource.h b/kresources/carddav/resource.h index b23008132..fca215aa2 100644 --- a/kresources/carddav/resource.h +++ b/kresources/carddav/resource.h @@ -43,6 +43,7 @@ class CardDavWriter; class KDE_EXPORT ResourceCardDav : public ResourceCached { Q_OBJECT + TQ_OBJECT public: diff --git a/kresources/carddav/writer.cpp b/kresources/carddav/writer.cpp index 837fca663..aed9ddb66 100644 --- a/kresources/carddav/writer.cpp +++ b/kresources/carddav/writer.cpp @@ -59,7 +59,7 @@ int CardDavWriter::runJob(runtime_info* RT) { if (OK == res) { kdDebug() << "pushing deleted objects"; while (mDeleted.tqcontains("BEGIN:VCARD", TRUE) > 0) { - int endLocation = mDeleted.find("END:VCARD", 0, TRUE); + int endLocation = mDeleted.tqfind("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); mDeleted = mDeleted.remove(0, endLocation+9); if (getUseURI() == false) @@ -83,7 +83,7 @@ int CardDavWriter::runJob(runtime_info* RT) { if (OK == res) { kdDebug() << "pushing deleted objects"; while (mDeleted.tqcontains("BEGIN:VCARD", TRUE) > 0) { - int endLocation = mDeleted.find("END:VCARD", 0, TRUE); + int endLocation = mDeleted.tqfind("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); mDeleted = mDeleted.remove(0, endLocation+9); if (getUseURI() == false) -- cgit v1.2.1