From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/compatibility/knewstuff/downloaddialog.cpp | 52 ++++++++++++------------ lib/compatibility/knewstuff/downloaddialog.h | 25 ++++++------ lib/compatibility/knewstuff/engine.cpp | 18 ++++---- lib/compatibility/knewstuff/engine.h | 19 +++++---- lib/compatibility/knewstuff/entry.cpp | 24 +++++------ lib/compatibility/knewstuff/entry.h | 22 +++++----- lib/compatibility/knewstuff/knewstuff.cpp | 18 ++++---- lib/compatibility/knewstuff/knewstuff.h | 14 +++---- lib/compatibility/knewstuff/knewstuffgeneric.cpp | 16 ++++---- lib/compatibility/knewstuff/knewstuffgeneric.h | 4 +- lib/compatibility/knewstuff/knewstuffsecure.cpp | 26 ++++++------ lib/compatibility/knewstuff/knewstuffsecure.h | 7 ++-- lib/compatibility/knewstuff/provider.cpp | 8 ++-- lib/compatibility/knewstuff/provider.h | 11 ++--- lib/compatibility/knewstuff/providerdialog.cpp | 8 ++-- lib/compatibility/knewstuff/providerdialog.h | 5 ++- lib/compatibility/knewstuff/security.cpp | 12 +++--- lib/compatibility/knewstuff/security.h | 3 +- lib/compatibility/knewstuff/uploaddialog.cpp | 6 +-- lib/compatibility/knewstuff/uploaddialog.h | 5 ++- 20 files changed, 155 insertions(+), 148 deletions(-) (limited to 'lib/compatibility/knewstuff') diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp index b14ff38b..a4cfca68 100644 --- a/lib/compatibility/knewstuff/downloaddialog.cpp +++ b/lib/compatibility/knewstuff/downloaddialog.cpp @@ -49,8 +49,8 @@ using namespace KNS; class NumSortListViewItem : public KListViewItem { public: - NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : - KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) + NumSortListViewItem( TQListView * tqparent, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString(), TQString label7 = TQString(), TQString label8 = TQString() ) : + KListViewItem( tqparent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } @@ -287,7 +287,7 @@ void DownloadDialog::slotResult(KIO::Job *job) kdDebug() << "got data: " << m_data[job] << endl; - kapp->config()->setGroup("KNewStuffStatus"); + kapp->config()->setGroup("KNewStufftqStatus"); dom.setContent(m_data[job]); knewstuff = dom.documentElement(); @@ -321,13 +321,13 @@ void DownloadDialog::slotResult(KIO::Job *job) m_data[job] = ""; } -int DownloadDialog::installStatus(Entry *entry) +int DownloadDialog::installtqStatus(Entry *entry) { TQDate date; TQString datestring; int installed; - kapp->config()->setGroup("KNewStuffStatus"); + kapp->config()->setGroup("KNewStufftqStatus"); datestring = kapp->config()->readEntry(entry->name()); if(datestring.isNull()) installed = 0; else @@ -357,16 +357,16 @@ void DownloadDialog::addEntry(Entry *entry) slotPage(m_frame); } }*/ - installed = installStatus(entry); + installed = installtqStatus(entry); if(installed > 0) pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small); else if(installed < 0) pix = KGlobal::iconLoader()->loadIcon("history", KIcon::Small); else pix = TQPixmap(); KListViewItem *tmp_r = new KListViewItem(lv_r, - entry->name(), entry->version(), TQString("%1").arg(entry->rating())); + entry->name(), entry->version(), TQString("%1").tqarg(entry->rating())); KListViewItem *tmp_d = new NumSortListViewItem(lv_d, - entry->name(), entry->version(), TQString("%1").arg(entry->downloads())); + entry->name(), entry->version(), TQString("%1").tqarg(entry->downloads())); KListViewItem *tmp_l = new KListViewItem(lv_l, entry->name(), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate())); @@ -403,23 +403,23 @@ void DownloadDialog::slotDetails() "Downloads: %7\n" "Release date: %8\n" "Summary: %9\n" - ).arg(e->name() - ).arg(e->author() - ).arg(e->license() - ).arg(e->version() - ).arg(e->release() - ).arg(e->rating() - ).arg(e->downloads() - ).arg(KGlobal::locale()->formatDate(e->releaseDate()) - ).arg(e->summary(lang) + ).tqarg(e->name() + ).tqarg(e->author() + ).tqarg(e->license() + ).tqarg(e->version() + ).tqarg(e->release() + ).tqarg(e->rating() + ).tqarg(e->downloads() + ).tqarg(KGlobal::locale()->formatDate(e->releaseDate()) + ).tqarg(e->summary(lang) ); info.append(i18n ( "Preview: %1\n" "Payload: %2\n" - ).arg(e->preview().url() - ).arg(e->payload().url() + ).tqarg(e->preview().url() + ).tqarg(e->payload().url() )); KMessageBox::information(this, info, i18n("Details")); @@ -453,7 +453,7 @@ void DownloadDialog::slotInstall() void DownloadDialog::install(Entry *e) { - kapp->config()->setGroup("KNewStuffStatus"); + kapp->config()->setGroup("KNewStufftqStatus"); kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate)); kapp->config()->sync(); @@ -514,17 +514,17 @@ void DownloadDialog::slotSelected() { if(!e->preview(lang).isValid()) { - m_rt->setText(TQString("%1
%2
%3

%4
(%5)").arg( - e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(e->summary(lang)).arg(e->license())); + m_rt->setText(TQString("%1
%2
%3

%4
(%5)").tqarg( + e->name()).tqarg(e->author()).tqarg(KGlobal::locale()->formatDate(e->releaseDate())).tqarg(e->summary(lang)).tqarg(e->license())); } else { KIO::NetAccess::download(e->preview(lang), tmp, this); - m_rt->setText(TQString("%1
%2
%3


%5
(%6)").arg( - e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license())); + m_rt->setText(TQString("%1
%2
%3


%5
(%6)").tqarg( + e->name()).tqarg(e->author()).tqarg(KGlobal::locale()->formatDate(e->releaseDate())).tqarg(tmp).tqarg(e->summary(lang)).tqarg(e->license())); } - if(installStatus(e) == 1) enabled = false; + if(installtqStatus(e) == 1) enabled = false; else enabled = true; TQPushButton *de, *in; @@ -558,7 +558,7 @@ void DownloadDialog::slotPage(TQWidget *w) kdDebug() << "changed widget!!!" << endl; - if(m_map.find(w) == m_map.end()) return; + if(m_map.tqfind(w) == m_map.end()) return; m_page = w; diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h index 75fafae4..eea67f6e 100644 --- a/lib/compatibility/knewstuff/downloaddialog.h +++ b/lib/compatibility/knewstuff/downloaddialog.h @@ -57,25 +57,26 @@ class Engine; class KDE_EXPORT DownloadDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** Constructor. @param engine a pre-built engine object, or NULL if the download dialog should create an engine on its own - @param parent the parent window + @param tqparent the tqparent window @param caption the dialog caption */ - DownloadDialog(Engine *engine, TQWidget *parent, const TQString& caption); + DownloadDialog(Engine *engine, TQWidget *tqparent, const TQString& caption); /** Alternative constructor. Always uses an internal engine. - @param parent the parent window + @param tqparent the tqparent window @param caption the dialog caption */ - DownloadDialog(TQWidget *parent, const TQString& caption); + DownloadDialog(TQWidget *tqparent, const TQString& caption); /** Destructor. @@ -154,19 +155,19 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param engine a pre-built engine object, or NULL if the download dialog should create an engine on its own - @param parent the parent window + @param tqparent the tqparent window */ - DownloadDialog(Engine *engine, TQWidget *parent = 0); - // ### KDE 4.0: remove and make caption/parent argument optional + DownloadDialog(Engine *engine, TQWidget *tqparent = 0); + // ### KDE 4.0: remove and make caption/tqparent argument optional /** Alternative constructor. Always uses an internal engine. - @param parent the parent window + @param tqparent the tqparent window */ - DownloadDialog(TQWidget *parent = 0); - // ### KDE 4.0: remove and make caption/parent argument optional + DownloadDialog(TQWidget *tqparent = 0); + // ### KDE 4.0: remove and make caption/tqparent argument optional /** Opens the download dialog. @@ -177,7 +178,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param type a data type such as "korganizer/calendar" */ static void open(TQString type); - // ### KDE 4.0: remove and make caption/parent argument optional + // ### KDE 4.0: remove and make caption/tqparent argument optional public slots: /** @@ -207,7 +208,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase Entry *getEntry(); void loadProvider(Provider *p); void install(Entry *e); - int installStatus(Entry *e); + int installtqStatus(Entry *e); ProviderLoader *m_loader; TQString m_entryname; diff --git a/lib/compatibility/knewstuff/engine.cpp b/lib/compatibility/knewstuff/engine.cpp index ace0b75e..eaa810c3 100644 --- a/lib/compatibility/knewstuff/engine.cpp +++ b/lib/compatibility/knewstuff/engine.cpp @@ -40,8 +40,8 @@ using namespace KNS; Engine::Engine( KNewStuff *newStuff, const TQString &type, - TQWidget *parentWidget ) : - mParentWidget( parentWidget ), mDownloadDialog( 0 ), + TQWidget *tqparentWidget ) : + mParentWidget( tqparentWidget ), mDownloadDialog( 0 ), mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ), mNewStuff( newStuff ), mType( type ) { @@ -51,8 +51,8 @@ Engine::Engine( KNewStuff *newStuff, const TQString &type, } Engine::Engine( KNewStuff *newStuff, const TQString &type, - const TQString &providerList, TQWidget *parentWidget ) : - mParentWidget( parentWidget ), + const TQString &providerList, TQWidget *tqparentWidget ) : + mParentWidget( tqparentWidget ), mDownloadDialog( 0 ), mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ), mProviderList( providerList ), mNewStuff( newStuff ), @@ -283,11 +283,11 @@ void Engine::upload( Entry *entry ) } TQString text = i18n("The files to be uploaded have been created at:\n"); - text.append( i18n("Data file: %1\n").arg( mUploadFile) ); + text.append( i18n("Data file: %1\n").tqarg( mUploadFile) ); if (!mPreviewFile.isEmpty()) { - text.append( i18n("Preview image: %1\n").arg( mPreviewFile) ); + text.append( i18n("Preview image: %1\n").tqarg( mPreviewFile) ); } - text.append( i18n("Content information: %1\n").arg( mUploadMetaFile) ); + text.append( i18n("Content information: %1\n").tqarg( mUploadMetaFile) ); text.append( i18n("Those files can now be uploaded.\n") ); text.append( i18n("Beware that any people might have access to them at any time.") ); @@ -343,7 +343,7 @@ bool Engine::createMetaFile( Entry *entry ) TQFile f( mUploadMetaFile ); if ( !f.open( IO_WriteOnly ) ) { - mUploadMetaFile = TQString::null; + mUploadMetaFile = TQString(); return false; } @@ -401,7 +401,7 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job ) void Engine::slotUploadMetaJobResult( KIO::Job *job ) { - mUploadMetaFile = TQString::null; + mUploadMetaFile = TQString(); if ( job->error() ) { kdDebug(5850) << "Error uploading new stuff metadata." << endl; job->showErrorDialog( mParentWidget ); diff --git a/lib/compatibility/knewstuff/engine.h b/lib/compatibility/knewstuff/engine.h index 42f86e64..a6624d55 100644 --- a/lib/compatibility/knewstuff/engine.h +++ b/lib/compatibility/knewstuff/engine.h @@ -48,27 +48,28 @@ class ProviderDialog; * \par Maintainer: * Josef Spillner (spillner@kde.org) */ -class Engine : public QObject +class Engine : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Constructor. @param newStuff a KNewStuff object @param type the Hotstuff data type such as "korganizer/calendar" - @param parentWidget the parent window + @param tqparentWidget the tqparent window */ - Engine( KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 ); + Engine( KNewStuff *newStuff, const TQString &type, TQWidget *tqparentWidget = 0 ); /** Constructor. @param newStuff a KNewStuff object @param type the Hotstuff data type such as "korganizer/calendar" @param providerList the URL of the provider list - @param parentWidget the parent window + @param tqparentWidget the tqparent window */ - Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 ); + Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *tqparentWidget = 0 ); /** Destructor. @@ -83,11 +84,11 @@ class Engine : public QObject TQString type() const { return mType; } /** - Returns the previously set parent widget. + Returns the previously set tqparent widget. - @return parent widget + @return tqparent widget */ - TQWidget *parentWidget() const { return mParentWidget; } + TQWidget *tqparentWidget() const { return mParentWidget; } /** Initiates the download process, retrieving provider lists and invoking @@ -102,7 +103,7 @@ class Engine : public QObject @param fileName name of the payload data file @param previewName name of the preview image file */ - void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null ); + void upload( const TQString &fileName = TQString(), const TQString &previewName = TQString() ); /** Downloads the specified data file. diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp index ef9d3a88..eb953b0e 100644 --- a/lib/compatibility/knewstuff/entry.cpp +++ b/lib/compatibility/knewstuff/entry.cpp @@ -26,7 +26,7 @@ using namespace KNS; Entry::Entry() : - mRelease( 0 ), mReleaseDate( TQDate::currentDate() ), mRating( 0 ), + mRelease( 0 ), mReleaseDate( TQDate::tqcurrentDate() ), mRating( 0 ), mDownloads( 0 ) { } @@ -89,12 +89,12 @@ void Entry::setSummary( const TQString &text, const TQString &lang ) { mSummaryMap.insert( lang, text ); - if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); } TQString Entry::summary( const TQString &lang ) const { - if ( mSummaryMap.isEmpty() ) return TQString::null; + if ( mSummaryMap.isEmpty() ) return TQString(); if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ]; else { @@ -102,7 +102,7 @@ TQString Entry::summary( const TQString &lang ) const for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it) if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ]; } - if ( !mSummaryMap[ TQString::null ].isEmpty() ) return mSummaryMap[ TQString::null ]; + if ( !mSummaryMap[ TQString() ].isEmpty() ) return mSummaryMap[ TQString() ]; else return *(mSummaryMap.begin()); } @@ -144,7 +144,7 @@ void Entry::setPayload( const KURL &url, const TQString &lang ) { mPayloadMap.insert( lang, url ); - if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::payload( const TQString &lang ) const @@ -155,7 +155,7 @@ KURL Entry::payload( const TQString &lang ) const for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it) if( !mPayloadMap[ *it ].isEmpty() ) return mPayloadMap[ *it ]; } - if ( payload.isEmpty() ) payload = mPayloadMap [ TQString::null ]; + if ( payload.isEmpty() ) payload = mPayloadMap [ TQString() ]; if ( payload.isEmpty() && !mPayloadMap.isEmpty() ) { payload = *(mPayloadMap.begin()); } @@ -167,7 +167,7 @@ void Entry::setPreview( const KURL &url, const TQString &lang ) { mPreviewMap.insert( lang, url ); - if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::preview( const TQString &lang ) const @@ -178,7 +178,7 @@ KURL Entry::preview( const TQString &lang ) const for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it) if( !mPreviewMap[ *it ].isEmpty() ) return mPreviewMap[ *it ]; } - if ( preview.isEmpty() ) preview = mPreviewMap [ TQString::null ]; + if ( preview.isEmpty() ) preview = mPreviewMap [ TQString() ]; if ( preview.isEmpty() && !mPreviewMap.isEmpty() ) { preview = *(mPreviewMap.begin()); } @@ -252,11 +252,11 @@ void Entry::parseDomElement( const TQDomElement &element ) } TQDomElement Entry::createDomElement( TQDomDocument &doc, - TQDomElement &parent ) + TQDomElement &tqparent ) { TQDomElement entry = doc.createElement( "stuff" ); entry.setAttribute("type", mType); - parent.appendChild( entry ); + tqparent.appendChild( entry ); addElement( doc, entry, "name", name() ); addElement( doc, entry, "author", author() ); @@ -283,12 +283,12 @@ TQDomElement Entry::createDomElement( TQDomDocument &doc, return entry; } -TQDomElement Entry::addElement( TQDomDocument &doc, TQDomElement &parent, +TQDomElement Entry::addElement( TQDomDocument &doc, TQDomElement &tqparent, const TQString &tag, const TQString &value ) { TQDomElement n = doc.createElement( tag ); n.appendChild( doc.createTextNode( value ) ); - parent.appendChild( n ); + tqparent.appendChild( n ); return n; } diff --git a/lib/compatibility/knewstuff/entry.h b/lib/compatibility/knewstuff/entry.h index a3c816a1..3de9982c 100644 --- a/lib/compatibility/knewstuff/entry.h +++ b/lib/compatibility/knewstuff/entry.h @@ -106,15 +106,15 @@ class KDE_EXPORT Entry /** * Sets a short description on what the object is all about. */ - void setSummary( const TQString &, const TQString &lang = TQString::null ); + void setSummary( const TQString &, const TQString &lang = TQString() ); /** * Retrieve a short description about the object. * - * @param lang preferred language, or TQString::null for KDE default + * @param lang preferred language, or TQString() for KDE default * @return object description */ - TQString summary( const TQString &lang = TQString::null ) const; + TQString summary( const TQString &lang = TQString() ) const; /** * Sets the version number. @@ -156,29 +156,29 @@ class KDE_EXPORT Entry /** * Sets the object's file. */ - void setPayload( const KURL &, const TQString &lang = TQString::null ); + void setPayload( const KURL &, const TQString &lang = TQString() ); /** * Retrieve the file name of the object. * - * @param lang preferred language, or TQString::null for KDE default + * @param lang preferred language, or TQString() for KDE default * @return object filename */ - KURL payload( const TQString &lang = TQString::null ) const; + KURL payload( const TQString &lang = TQString() ) const; /** * Sets the object's preview file, if available. This should be a * picture file. */ - void setPreview( const KURL &, const TQString &lang = TQString::null ); + void setPreview( const KURL &, const TQString &lang = TQString() ); /** * Retrieve the file name of an image containing a preview of the object. * - * @param lang preferred language, or TQString::null for KDE default + * @param lang preferred language, or TQString() for KDE default * @return object preview filename */ - KURL preview( const TQString &lang = TQString::null ) const; + KURL preview( const TQString &lang = TQString() ) const; /** * Sets the rating between 0 (worst) and 10 (best). @@ -229,10 +229,10 @@ class KDE_EXPORT Entry /** * @internal */ - TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent ); + TQDomElement createDomElement( TQDomDocument &, TQDomElement &tqparent ); protected: - TQDomElement addElement( TQDomDocument &doc, TQDomElement &parent, + TQDomElement addElement( TQDomDocument &doc, TQDomElement &tqparent, const TQString &tag, const TQString &value ); private: diff --git a/lib/compatibility/knewstuff/knewstuff.cpp b/lib/compatibility/knewstuff/knewstuff.cpp index 6a37aa61..8e35c741 100644 --- a/lib/compatibility/knewstuff/knewstuff.cpp +++ b/lib/compatibility/knewstuff/knewstuff.cpp @@ -32,21 +32,21 @@ using namespace KNS; KAction* KNS::standardAction(const TQString& what, const TQObject *recvr, - const char *slot, KActionCollection* parent, + const char *slot, KActionCollection* tqparent, const char *name) { - return new KAction(i18n("Download New %1").arg(what), "knewstuff", - 0, recvr, slot, parent, name); + return new KAction(i18n("Download New %1").tqarg(what), "knewstuff", + 0, recvr, slot, tqparent, name); } -KNewStuff::KNewStuff( const TQString &type, TQWidget *parentWidget ) +KNewStuff::KNewStuff( const TQString &type, TQWidget *tqparentWidget ) { - mEngine = new Engine( this, type, parentWidget ); + mEngine = new Engine( this, type, tqparentWidget ); } -KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget ) +KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *tqparentWidget ) { - mEngine = new Engine( this, type, providerList, parentWidget ); + mEngine = new Engine( this, type, providerList, tqparentWidget ); } TQString KNewStuff::type() const @@ -54,9 +54,9 @@ TQString KNewStuff::type() const return mEngine->type(); } -TQWidget *KNewStuff::parentWidget() const +TQWidget *KNewStuff::tqparentWidget() const { - return mEngine->parentWidget(); + return mEngine->tqparentWidget(); } KNewStuff::~KNewStuff() diff --git a/lib/compatibility/knewstuff/knewstuff.h b/lib/compatibility/knewstuff/knewstuff.h index 455063a3..646b58d9 100644 --- a/lib/compatibility/knewstuff/knewstuff.h +++ b/lib/compatibility/knewstuff/knewstuff.h @@ -36,7 +36,7 @@ class Entry; KAction* standardAction(const TQString& what, const TQObject *recvr, const char *slot, - KActionCollection* parent, + KActionCollection* tqparent, const char *name = 0); } @@ -74,10 +74,10 @@ class KDE_EXPORT KNewStuff @param type type of data to be handled, should be something like korganizer/calendar, kword/template, kdesktop/wallpaper - @param parentWidget parent widget of dialogs opened by the KNewStuff + @param tqparentWidget tqparent widget of dialogs opened by the KNewStuff engine */ - KNewStuff( const TQString &type, TQWidget *parentWidget = 0 ); + KNewStuff( const TQString &type, TQWidget *tqparentWidget = 0 ); /** Constructor. @@ -85,10 +85,10 @@ class KDE_EXPORT KNewStuff @param type type of data to be handled, should be something like korganizer/calendar, kword/template, kdesktop/wallpaper @param providerList the URL of the provider list - @param parentWidget parent widget of dialogs opened by the KNewStuff + @param tqparentWidget tqparent widget of dialogs opened by the KNewStuff engine */ - KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 ); + KNewStuff( const TQString &type, const TQString &providerList, TQWidget *tqparentWidget = 0 ); virtual ~KNewStuff(); /** @@ -97,9 +97,9 @@ class KDE_EXPORT KNewStuff TQString type() const; /** - Return parent widget. + Return tqparent widget. */ - TQWidget *parentWidget() const; + TQWidget *tqparentWidget() const; /** Start download process. diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp index 51305f62..5b085a32 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp +++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp @@ -37,8 +37,8 @@ using namespace std; -KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent ) - : KNewStuff( type, parent ) +KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *tqparent ) + : KNewStuff( type, tqparent ) { mConfig = KGlobal::config(); } @@ -70,7 +70,7 @@ bool KNewStuffGeneric::install( const TQString &fileName ) kdDebug(5850) << "InstallationCommand: " << cmd << endl; list = TQStringList::split( " ", cmd ); for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it) { - list2 << (*it).replace("%f", fileName); + list2 << (*it).tqreplace("%f", fileName); } KProcess proc; proc << list2; @@ -110,7 +110,7 @@ TQString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) } if ( res.isEmpty() && path.isEmpty() ) { - if ( !entry ) return TQString::null; + if ( !entry ) return TQString(); else return KNewStuff::downloadDestination( entry ); } @@ -129,11 +129,11 @@ TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry ) TQString file = destinationPath(entry); if ( KStandardDirs::exists( file ) ) { - int result = KMessageBox::warningContinueCancel( parentWidget(), + int result = KMessageBox::warningContinueCancel( tqparentWidget(), i18n("The file '%1' already exists. Do you want to override it?") - .arg( file ), - TQString::null, i18n("Overwrite") ); - if ( result == KMessageBox::Cancel ) return TQString::null; + .tqarg( file ), + TQString(), i18n("Overwrite") ); + if ( result == KMessageBox::Cancel ) return TQString(); } return file; diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.h b/lib/compatibility/knewstuff/knewstuffgeneric.h index 6347bf53..fb75323f 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.h +++ b/lib/compatibility/knewstuff/knewstuffgeneric.h @@ -46,9 +46,9 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff Constructor. @param type a Hotstuff data type such as "korganizer/calendar" - @param parent the parent window. + @param tqparent the tqparent window. */ - KNewStuffGeneric( const TQString &type, TQWidget *parent = 0 ); + KNewStuffGeneric( const TQString &type, TQWidget *tqparent = 0 ); ~KNewStuffGeneric(); /** diff --git a/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp index f68be7ae..3a23c40d 100644 --- a/lib/compatibility/knewstuff/knewstuffsecure.cpp +++ b/lib/compatibility/knewstuff/knewstuffsecure.cpp @@ -33,8 +33,8 @@ using namespace KNS; -KNewStuffSecure::KNewStuffSecure(const TQString &type, TQWidget *parentWidget) - : KNewStuff(type, parentWidget) +KNewStuffSecure::KNewStuffSecure(const TQString &type, TQWidget *tqparentWidget) + : KNewStuff(type, tqparentWidget) { m_tempDir = 0L; connect(engine(), TQT_SIGNAL(uploadFinished(bool)), TQT_SLOT(slotUploadFinished(bool))); @@ -80,7 +80,7 @@ bool KNewStuffSecure::install(const TQString &fileName) } else ok = false; if (!ok) - KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded resource tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Resource Installation Error")); + KMessageBox::error(tqparentWidget(), i18n("There was an error with the downloaded resource tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Resource Installation Error")); return ok; } @@ -128,16 +128,16 @@ void KNewStuffSecure::slotValidated(int result) valid = false; } else { - signatureStr = i18n("The resource was signed with key 0x%1, belonging to %2 <%3>.").arg(key.id.right(8)).arg(key.name).arg(key.mail); + signatureStr = i18n("The resource was signed with key 0x%1, belonging to %2 <%3>.").tqarg(key.id.right(8)).tqarg(key.name).tqarg(key.mail); } } if (!valid) { signatureStr.prepend( "
"); - if (KMessageBox::warningContinueCancel(parentWidget(), i18n("There is a problem with the resource file you have downloaded. The errors are :%1
%2

Installation of the resource is not recommended.

Do you want to proceed with the installation?
").arg(errorString).arg(signatureStr), i18n("Problematic Resource File")) == KMessageBox::Continue) + if (KMessageBox::warningContinueCancel(tqparentWidget(), i18n("There is a problem with the resource file you have downloaded. The errors are :%1
%2

Installation of the resource is not recommended.

Do you want to proceed with the installation?
").tqarg(errorString).tqarg(signatureStr), i18n("Problematic Resource File")) == KMessageBox::Continue) valid = true; } else - KMessageBox::information(parentWidget(), i18n("%1

Press OK to install it.
").arg(signatureStr), i18n("Valid Resource"), "Show Valid Signature Information"); + KMessageBox::information(tqparentWidget(), i18n("%1

Press OK to install it.
").tqarg(signatureStr), i18n("Valid Resource"), "Show Valid Signature Information"); if (valid) { installResource(); @@ -145,8 +145,8 @@ void KNewStuffSecure::slotValidated(int result) } else { KConfig *cfg = KGlobal::config(); - cfg->deleteGroup("KNewStuffStatus"); - cfg->setGroup("KNewStuffStatus"); + cfg->deleteGroup("KNewStufftqStatus"); + cfg->setGroup("KNewStufftqStatus"); for (TQMap::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it) { cfg->writeEntry(it.key(), it.data()); @@ -160,7 +160,7 @@ void KNewStuffSecure::slotValidated(int result) void KNewStuffSecure::downloadResource() { KConfig *cfg = KGlobal::config(); - m_installedResources = cfg->entryMap("KNewStuffStatus"); + m_installedResources = cfg->entryMap("KNewStufftqStatus"); engine()->ignoreInstallResult(true); KNewStuff::download(); } @@ -187,12 +187,12 @@ void KNewStuffSecure::slotFileSigned(int result) { if (result == 0) { - KMessageBox::error(parentWidget(), i18n("The signing failed for unknown reason.")); + KMessageBox::error(tqparentWidget(), i18n("The signing failed for unknown reason.")); } else { if (result & Security::BAD_PASSPHRASE) { - if (KMessageBox::warningContinueCancel(parentWidget(), i18n("There are no keys usable for signing or you did not entered the correct passphrase.\nProceed without signing the resource?")) == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(tqparentWidget(), i18n("There are no keys usable for signing or you did not entered the correct passphrase.\nProceed without signing the resource?")) == KMessageBox::Cancel) { disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); removeTempDirectory(); @@ -216,7 +216,7 @@ void KNewStuffSecure::slotFileSigned(int result) } tar.close(); KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true); - KNewStuff::upload(m_signedFileName, TQString::null); + KNewStuff::upload(m_signedFileName, TQString()); disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); } } @@ -231,7 +231,7 @@ void KNewStuffSecure::removeTempDirectory() { if (m_tempDir) { - KIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget()); + KIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), tqparentWidget()); delete m_tempDir; m_tempDir = 0L; } diff --git a/lib/compatibility/knewstuff/knewstuffsecure.h b/lib/compatibility/knewstuff/knewstuffsecure.h index 1a6bc44a..f648b579 100644 --- a/lib/compatibility/knewstuff/knewstuffsecure.h +++ b/lib/compatibility/knewstuff/knewstuffsecure.h @@ -40,16 +40,17 @@ to the standard KNewStuff class. class KDE_EXPORT KNewStuffSecure : public TQObject, public KNewStuff { Q_OBJECT + TQ_OBJECT public: /** Constructor. @param type type of data to be handled, should be something like korganizer/calendar, kword/template, kdesktop/wallpaper - @param parentWidget parent widget of dialogs opened by the KNewStuff + @param tqparentWidget tqparent widget of dialogs opened by the KNewStuff engine */ - KNewStuffSecure(const TQString &type, TQWidget *parentWidget=0); + KNewStuffSecure(const TQString &type, TQWidget *tqparentWidget=0); virtual ~KNewStuffSecure(); /** Installs the downloaded resource. Do not call or reimplement directly. @@ -78,7 +79,7 @@ private slots: /** Called when the upload has finished. @param result the result of the upload Be careful if you reimplement it, as it deletes the temporary directory - m_tempDir used for upload. You must also delete it (call the parent's method) + m_tempDir used for upload. You must also delete it (call the tqparent's method) if you reimplement it. */ void slotUploadFinished(bool result); diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp index ca7767e0..2224887f 100644 --- a/lib/compatibility/knewstuff/provider.cpp +++ b/lib/compatibility/knewstuff/provider.cpp @@ -128,10 +128,10 @@ void Provider::parseDomElement( const TQDomElement &element ) } } -TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &parent ) +TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &tqparent ) { TQDomElement entry = doc.createElement( "stuff" ); - parent.appendChild( entry ); + tqparent.appendChild( entry ); TQDomElement n = doc.createElement( "name" ); n.appendChild( doc.createTextNode( name() ) ); @@ -141,8 +141,8 @@ TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &paren } -ProviderLoader::ProviderLoader( TQWidget *parentWidget ) : - mParentWidget( parentWidget ) +ProviderLoader::ProviderLoader( TQWidget *tqparentWidget ) : + mParentWidget( tqparentWidget ) { mProviders.setAutoDelete( true ); } diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h index f878175a..43ff5fc2 100644 --- a/lib/compatibility/knewstuff/provider.h +++ b/lib/compatibility/knewstuff/provider.h @@ -144,7 +144,7 @@ class Provider protected: void parseDomElement( const TQDomElement & ); - TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent ); + TQDomElement createDomElement( TQDomDocument &, TQDomElement &tqparent ); private: TQString mName; @@ -161,16 +161,17 @@ class Provider * the main provider database for this specific application. * It should probably not be used directly by the application. */ -class ProviderLoader : public QObject +class ProviderLoader : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Constructor. * - * @param parentWidget the parent widget + * @param tqparentWidget the tqparent widget */ - ProviderLoader( TQWidget *parentWidget ); + ProviderLoader( TQWidget *tqparentWidget ); /** * Starts asynchronously loading the list of providers of the @@ -181,7 +182,7 @@ class ProviderLoader : public QObject * we first try the ProvidersUrl from KGlobal::config, then we * fall back to a hardcoded value. */ - void load( const TQString &type, const TQString &providerList = TQString::null ); + void load( const TQString &type, const TQString &providerList = TQString() ); signals: /** diff --git a/lib/compatibility/knewstuff/providerdialog.cpp b/lib/compatibility/knewstuff/providerdialog.cpp index a6625870..97694a34 100644 --- a/lib/compatibility/knewstuff/providerdialog.cpp +++ b/lib/compatibility/knewstuff/providerdialog.cpp @@ -37,8 +37,8 @@ using namespace KNS; class ProviderItem : public KListViewItem { public: - ProviderItem( KListView *parent, Provider *provider ) : - KListViewItem( parent ), mProvider( provider ) + ProviderItem( KListView *tqparent, Provider *provider ) : + KListViewItem( tqparent ), mProvider( provider ) { setText( 0, provider->name() ); } @@ -49,9 +49,9 @@ class ProviderItem : public KListViewItem Provider *mProvider; }; -ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) : +ProviderDialog::ProviderDialog( Engine *engine, TQWidget *tqparent ) : KDialogBase( Plain, i18n("Hot New Stuff Providers"), Ok | Cancel, Cancel, - parent, 0, false, true ), + tqparent, 0, false, true ), mEngine( engine ) { TQFrame *topPage = plainPage(); diff --git a/lib/compatibility/knewstuff/providerdialog.h b/lib/compatibility/knewstuff/providerdialog.h index 3e02e30a..7a9f8884 100644 --- a/lib/compatibility/knewstuff/providerdialog.h +++ b/lib/compatibility/knewstuff/providerdialog.h @@ -43,14 +43,15 @@ class Engine; class ProviderDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** Constructor. @param engine a KNewStuff engine object - @param parent the parent window + @param tqparent the tqparent window */ - ProviderDialog( Engine *engine, TQWidget *parent ); + ProviderDialog( Engine *engine, TQWidget *tqparent ); /** Clears the list of providers. diff --git a/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp index 8ef377b7..3e135e1f 100644 --- a/lib/compatibility/knewstuff/security.cpp +++ b/lib/compatibility/knewstuff/security.cpp @@ -125,7 +125,7 @@ void Security::slotDataArrived(KProcIO *procIO) key.mail=data.section('<', -1, -1); key.mail.truncate(key.mail.length() - 1); key.name=data.section('<',0,0); - if (key.name.find("(")!=-1) + if (key.name.tqfind("(")!=-1) key.name=key.name.section('(',0,0); m_keys[shortId] = key; } @@ -137,7 +137,7 @@ void Security::slotDataArrived(KProcIO *procIO) m_result &= SIGNED_BAD_CLEAR; m_result |= SIGNED_OK; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.contains(id)) + if (!m_keys.tqcontains(id)) { m_result |= UNKNOWN; } else @@ -154,7 +154,7 @@ void Security::slotDataArrived(KProcIO *procIO) { m_result |= SIGNED_BAD; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.contains(id)) + if (!m_keys.tqcontains(id)) { m_result |= UNKNOWN; } else @@ -170,11 +170,11 @@ void Security::slotDataArrived(KProcIO *procIO) break; case Sign: - if (data.find("passphrase.enter") != -1) + if (data.tqfind("passphrase.enter") != -1) { TQCString password; KeyStruct key = m_keys[m_secretKey]; - int result = KPasswordDialog::getPassword(password, i18n("Enter passphrase for key 0x%1, belonging to
%2<%3>:
").arg(m_secretKey).arg(key.name).arg(key.mail)); + int result = KPasswordDialog::getPassword(password, i18n("Enter passphrase for key 0x%1, belonging to
%2<%3>:
").tqarg(m_secretKey).tqarg(key.name).tqarg(key.mail)); if (result == KPasswordDialog::Accepted) { procIO->writeStdin(password, true); @@ -187,7 +187,7 @@ void Security::slotDataArrived(KProcIO *procIO) return; } } else - if (data.find("BAD_PASSPHRASE") != -1) + if (data.tqfind("BAD_PASSPHRASE") != -1) { m_result |= BAD_PASSPHRASE; } diff --git a/lib/compatibility/knewstuff/security.h b/lib/compatibility/knewstuff/security.h index d5e9299c..1e9f2254 100644 --- a/lib/compatibility/knewstuff/security.h +++ b/lib/compatibility/knewstuff/security.h @@ -41,9 +41,10 @@ It is a private class, not meant to be used by third party applications. namespace KNS { -class Security : public QObject +class Security : public TQObject { Q_OBJECT + TQ_OBJECT public: static Security* const ref() { diff --git a/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp index 163ed4ba..9e63386b 100644 --- a/lib/compatibility/knewstuff/uploaddialog.cpp +++ b/lib/compatibility/knewstuff/uploaddialog.cpp @@ -42,9 +42,9 @@ using namespace KNS; -UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) : +UploadDialog::UploadDialog( Engine *engine, TQWidget *tqparent ) : KDialogBase( Plain, i18n("Share Hot New Stuff"), Ok | Cancel, Cancel, - parent, 0, false, true ), + tqparent, 0, false, true ), mEngine( engine ) { mEntryList.setAutoDelete( true ); @@ -113,7 +113,7 @@ UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) : if(!name.isNull()) { - int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), TQString::null, i18n("Fill Out Fields"), i18n("Do Not Fill Out")); + int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), TQString(), i18n("Fill Out Fields"), i18n("Do Not Fill Out")); if(prefill == KMessageBox::Yes) { mNameEdit->setText(name); diff --git a/lib/compatibility/knewstuff/uploaddialog.h b/lib/compatibility/knewstuff/uploaddialog.h index cd14cbca..5d7f0e68 100644 --- a/lib/compatibility/knewstuff/uploaddialog.h +++ b/lib/compatibility/knewstuff/uploaddialog.h @@ -47,14 +47,15 @@ class Entry; class UploadDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** Constructor. @param engine a KNewStuff engine object to be used for uploads - @param parent the parent window + @param tqparent the tqparent window */ - UploadDialog( Engine *engine, TQWidget *parent ); + UploadDialog( Engine *engine, TQWidget *tqparent ); /** Destructor. -- cgit v1.2.1