diff options
623 files changed, 6007 insertions, 6007 deletions
diff --git a/KDE2PORTING.html b/KDE2PORTING.html index 41b9f5379..f23a2443b 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -31,7 +31,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> <LI><A HREF="#khtmlw">khtmlw</A></LI> <LI><A HREF="#KIntegerLine">KIntegerLine, KIntLineEdit</A></LI> <LI><A HREF="#KDNDIcon">KDNDIcon, KDNDDropZone, KDNDWidget, tdecore/drag.h</A></LI> -<LI><A HREF="#KConfigBase">KConfigBase, KConfig, KSimpleConfig</A></LI> +<LI><A HREF="#TDEConfigBase">TDEConfigBase, TDEConfig, KSimpleConfig</A></LI> <LI><A HREF="#libkfm">libkfm</A></LI> <LI><A HREF="#KDialog">KDialog</A></LI> <LI><A HREF="#kcharsets">kcharsets</A></LI> @@ -205,7 +205,7 @@ must have created a TDEApplication object before the methods can be used.<P> <TD COLSPAN="2"> <PRE> #include <kglobal.h> - #include <kconfig.h> // Needed to use KConfig + #include <kconfig.h> // Needed to use TDEConfig #include <klocale.h> // Needed to use KLocale #include <kiconloader.h> // Needed to use KIconLoader </PRE> @@ -215,7 +215,7 @@ must have created a TDEApplication object before the methods can be used.<P> <TD> <PRE> ... - KConfig *appcfg = TDEGlobal::config(); + TDEConfig *appcfg = TDEGlobal::config(); TQString mystr = i18n( "This is a string" ); @@ -469,17 +469,17 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="KConfigBase">KConfigBase, KConfig, KSimpleConfig</A></H3> +<H3><A NAME="TDEConfigBase">TDEConfigBase, TDEConfig, KSimpleConfig</A></H3> These classes have been largely re-implemented. The external API remains mostly the same, with the single notable change that the groupIterator and entryIterator methods have been removed and instead replaced by groupList (which returns a TQStringList of groups) and entryMap(const TQString &group) (which returns a TQMap of entries - in the specified group). This is due to internal changes in KConfig + in the specified group). This is due to internal changes in TDEConfig which would make providing iterators possibly rather difficult.<P> - Much more extensive documentation on the KConfig and friends API can + Much more extensive documentation on the TDEConfig and friends API can be found in the kdoc generated documentation from the header files, and in tdecore/KCONFIG_DESIGN.<P> @@ -505,16 +505,16 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P> <STRONG> Replacement table :</STRONG><P> <TABLE BORDER="1"> -<TR><TD>KFM::download </TD><TD>-> KIO::NetAccess::download (tdelibs/kio/netaccess.h)</TD></TR> -<TR><TD>KFM::removeTempFile </TD><TD>-> KIO::NetAccess::removeTempFile</TD></TR> +<TR><TD>KFM::download </TD><TD>-> TDEIO::NetAccess::download (tdelibs/kio/netaccess.h)</TD></TR> +<TR><TD>KFM::removeTempFile </TD><TD>-> TDEIO::NetAccess::removeTempFile</TD></TR> <TR><TD COLSPAN="2" ROWSPAN="0">refreshDesktop, sortDesktop, selectRootIcons : removed; kdesktop handles it</TD></TR> <TR><TD>KFM::configure </TD><TD>-> see konqueror DCOP interface</TD></TR> <TR><TD>KFM::openURL </TD><TD>-> "(void) new KRun (url)" (tdelibs/kio/krun.h)</TD></TR> <TR><TD>KFM::refreshDirectory </TD><TD>-> not needed anymore since konqy/kdesktop use KDirWatch</TD></TR> <TR><TD>KFM::openProperties </TD><TD>-> "(void) new KPropertiesDialog (url)" (tdelibs/kfile/kpropsdlg.h)</TD></TR> <TR><TD>KFM::exec </TD><TD>-> "(void) new KRun (url)" (tdelibs/kio/krun.h)</TD></TR> -<TR><TD>KFM::copy, KFM::move </TD><TD>-> KIO::Job (async, see kio/job.h)<BR> - or KIO::NetAccess (sync, see kio/netaccess.h)</TD></TR> +<TR><TD>KFM::copy, KFM::move </TD><TD>-> TDEIO::Job (async, see kio/job.h)<BR> + or TDEIO::NetAccess (sync, see kio/netaccess.h)</TD></TR> <TR><TD>DlgLocation </TD><TD>-> Use KLineEditDlg (tdeui/klineeditdlg.h) instead</TD></TR> </TABLE> diff --git a/KDE3PORTING.html b/KDE3PORTING.html index 1c96f6ecb..aa16c489a 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -391,7 +391,7 @@ TQString&) is not a slot anymore. <li>setMaxCacheAge( int ) <li>setUseCache( bool ) <li>setMaxCacheSize( int ) -<li>setCacheControl( KIO::CacheControl ) +<li>setCacheControl( TDEIO::CacheControl ) <li>setUseProxy( bool ) <li>setUseReverseProxy( bool ) <li>setProxyType( ProxyType ) @@ -406,7 +406,7 @@ TQString&) is not a slot anymore. <li>In order to support files > 4Gb, the file size / file-offset argument in the signals totalSize, processedSize and canResume, which are used by the io-slaves and passed along to jobs, has been changed from - <b>unsigned long</b> to <b>KIO::filesize_t</b>. + <b>unsigned long</b> to <b>TDEIO::filesize_t</b>. Make sure to check if you use these signals since your compiler will typically not generate a compile-time error for these changes, instead you might get a run-time error when you try to connect to @@ -568,7 +568,7 @@ sorting is utilized by letting its view-items provide a TQString key() method. T KFileView offers the two methods <ul> <li>TQString sortingKey( const TQString& value, bool isDir, int sortSpec )</li> -<li>TQString sortingKey( KIO::filesize_t value, bool isDir, int sortSpec )</li> +<li>TQString sortingKey( TDEIO::filesize_t value, bool isDir, int sortSpec )</li> </ul> which the view-classes can use to generate the string for the key() method. The KFile::SortMode enum has been removed, as TQDir::SortSpec is used entirely. @@ -577,8 +577,8 @@ enum has been removed, as TQDir::SortSpec is used entirely. Further changes: <table> <tr><th>Old:</th><th>New:</th></tr> -<tr><td>not existant</td><td>virtual void readConfig( KConfig *, const TQString& group = TQString::null )</td></tr> -<tr><td>not existant</td><td>void writeConfig( KConfig *, const TQString& group = TQString::null)</td></tr> +<tr><td>not existant</td><td>virtual void readConfig( TDEConfig *, const TQString& group = TQString::null )</td></tr> +<tr><td>not existant</td><td>void writeConfig( TDEConfig *, const TQString& group = TQString::null)</td></tr> <tr><td>virtual void setCurrentItem( const TQString& filename, KFileViewItem * )</td><td>Replaced with the two methods below.</td></tr> <tr><td> </td><td>void setCurrentItem( const TQString& filename );</td></tr> <tr><td> </td><td>virtual void setCurrentItem( const KFileViewItem * ) = 0;</td></tr> @@ -3,7 +3,7 @@ that we would like to make for the next binary incompatible release. - Check for forked classes in kde pim and other modules -- There is no reason why KConfigBase should inherit from QObject, get rid of that. +- There is no reason why TDEConfigBase should inherit from QObject, get rid of that. - Change all FooPrivate *d; -> Private * const d; and place initialization in the constructor (for classes that would benefit from this). To help catch silly @@ -24,7 +24,7 @@ that we would like to make for the next binary incompatible release. See: http://groups.google.com/groups?selm=4ognb0%243cd%40linda.teleport.com&oe=UTF-8&output=gplain Also free the client from the requirement to inherit from KShared. -- Remove all KSocket, KServerSocket, KSocks and KExtendedSocket references +- Remove all TDESocket, TDEServerSocket, KSocks and KExtendedSocket references throughout KDE in favor of KNetwork's socket implementations. Also, revise the namespace usage. thiago.macieira@kdemail.net @@ -88,7 +88,7 @@ that we would like to make for the next binary incompatible release. - Other ideas in this thread: http://lists.kde.org/?l=kde-core-devel&m=107608067302571&w=2 (Contributors to that thread, please add specific items here.) -- KConfigBase: For all the read*Entry methods that take a QFont *, QPoint *, QSize *, etc. +- TDEConfigBase: For all the read*Entry methods that take a QFont *, QPoint *, QSize *, etc. for the default value, add overloads that use a const reference, so that one can write resize( config->readSizeEntry( "Bleh", size() ); for example. Constructing a null QFont/QPoint/QSize is cheap enough to justify a consistent and usable API (IMHO) . @@ -110,7 +110,7 @@ that we would like to make for the next binary incompatible release. calls (readBoolEntry()). Although not technicaly a binary incompatiblity... just something to bring up for possible change (for the better) - Use KConfigXT instead! /FransE + Use TDEConfigXT instead! /FransE - Is it really necessary to bother people using the KCM APIs with withFallback? I have never heard of it failing and when would you not like to have that fallback? I think @@ -118,7 +118,7 @@ that we would like to make for the next binary incompatible release. - Do we need to have factory arguments in the KCM API? (who would use it anyway?) -- KCModuleInfo should use d-pointer. Perhaps there is more classes. +- TDECModuleInfo should use d-pointer. Perhaps there is more classes. - The config options in kdeglobals needs to be cleaned up a little. Perhaps I'm being picky.. * They should be named properly, for example "enableIcons" instead of "EnableIcons". Or atleast @@ -212,7 +212,7 @@ an alternative help->contents action) - KListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between "dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail). Unless Qt4 does it all :) -- Move KIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint, +- Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint, to merge that code. - Refactor the kio/bookmarks code so we don't need to use the static d-pointer trick anymore. diff --git a/arts/kde/kartsserver.cpp b/arts/kde/kartsserver.cpp index 50a2ae462..cd97d0cc5 100644 --- a/arts/kde/kartsserver.cpp +++ b/arts/kde/kartsserver.cpp @@ -59,7 +59,7 @@ Arts::SoundServerV2 KArtsServer::server(void) // aRts seems not to be running, let's try to run it // First, let's read the configuration as in kcmarts - KConfig config("kcmartsrc", false /*bReadOnly*/, false /*bUseKDEGlobals*/); + TDEConfig config("kcmartsrc", false /*bReadOnly*/, false /*bUseKDEGlobals*/); TDEProcess proc; config.setGroup("Arts"); diff --git a/arts/kde/kioinputstream_impl.cpp b/arts/kde/kioinputstream_impl.cpp index 8c131bfd1..ab215a585 100644 --- a/arts/kde/kioinputstream_impl.cpp +++ b/arts/kde/kioinputstream_impl.cpp @@ -75,19 +75,19 @@ void KIOInputStream_impl::streamStart() if(m_job != 0) m_job->kill(); - m_job = KIO::get(m_url, false, false); + m_job = TDEIO::get(m_url, false, false); m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg"); m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION)); - TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); - TQObject::connect(m_job, TQT_SIGNAL(result(KIO::Job *)), - this, TQT_SLOT(slotResult(KIO::Job *))); - TQObject::connect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)), - this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &))); - TQObject::connect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), - this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + TQObject::connect(m_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); + TQObject::connect(m_job, TQT_SIGNAL(result(TDEIO::Job *)), + this, TQT_SLOT(slotResult(TDEIO::Job *))); + TQObject::connect(m_job, TQT_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), + this, TQT_SLOT(slotScanMimeType(TDEIO::Job *, const TQString &))); + TQObject::connect(m_job, TQT_SIGNAL(totalSize( TDEIO::Job *, TDEIO::filesize_t)), + this, TQT_SLOT(slotTotalSize(TDEIO::Job *, TDEIO::filesize_t))); m_streamStarted = true; } @@ -98,14 +98,14 @@ void KIOInputStream_impl::streamEnd() if(m_job != 0) { - TQObject::disconnect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); - TQObject::disconnect(m_job, TQT_SIGNAL(result(KIO::Job *)), - this, TQT_SLOT(slotResult(KIO::Job *))); - TQObject::disconnect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)), - this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &))); - TQObject::disconnect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), - this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + TQObject::disconnect(m_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); + TQObject::disconnect(m_job, TQT_SIGNAL(result(TDEIO::Job *)), + this, TQT_SLOT(slotResult(TDEIO::Job *))); + TQObject::disconnect(m_job, TQT_SIGNAL(mimetype(TDEIO::Job *, const TQString &)), + this, TQT_SLOT(slotScanMimeType(TDEIO::Job *, const TQString &))); + TQObject::disconnect(m_job, TQT_SIGNAL(totalSize( TDEIO::Job *, TDEIO::filesize_t)), + this, TQT_SLOT(slotTotalSize(TDEIO::Job *, TDEIO::filesize_t))); if ( m_streamPulled ) outdata.endPull(); @@ -124,7 +124,7 @@ bool KIOInputStream_impl::openURL(const std::string& url) return true; } -void KIOInputStream_impl::slotData(KIO::Job *, const TQByteArray &data) +void KIOInputStream_impl::slotData(TDEIO::Job *, const TQByteArray &data) { if(m_finished) m_finished = false; @@ -136,7 +136,7 @@ void KIOInputStream_impl::slotData(KIO::Job *, const TQByteArray &data) processQueue(); } -void KIOInputStream_impl::slotResult(KIO::Job *job) +void KIOInputStream_impl::slotResult(TDEIO::Job *job) { // jobs delete themselves after emitting their result m_finished = true; @@ -151,13 +151,13 @@ void KIOInputStream_impl::slotResult(KIO::Job *job) } } -void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const TQString &mimetype) +void KIOInputStream_impl::slotScanMimeType(TDEIO::Job *, const TQString &mimetype) { kdDebug( 400 ) << "got mimetype: " << mimetype << endl; emit mimeTypeFound(mimetype); } -void KIOInputStream_impl::slotTotalSize(KIO::Job *, KIO::filesize_t size) +void KIOInputStream_impl::slotTotalSize(TDEIO::Job *, TDEIO::filesize_t size) { m_size = size; } diff --git a/arts/kde/kioinputstream_impl.h b/arts/kde/kioinputstream_impl.h index 5377fc808..06052e04b 100644 --- a/arts/kde/kioinputstream_impl.h +++ b/arts/kde/kioinputstream_impl.h @@ -62,14 +62,14 @@ signals: void mimeTypeFound(const TQString & mimetype); private slots: - void slotData(KIO::Job *, const TQByteArray &); - void slotResult(KIO::Job *); - void slotScanMimeType(KIO::Job *, const TQString &mimetype); - void slotTotalSize(KIO::Job *, KIO::filesize_t size); + void slotData(TDEIO::Job *, const TQByteArray &); + void slotResult(TDEIO::Job *); + void slotScanMimeType(TDEIO::Job *, const TQString &mimetype); + void slotTotalSize(TDEIO::Job *, TDEIO::filesize_t size); private: KURL m_url; - KIO::TransferJob *m_job; + TDEIO::TransferJob *m_job; TQByteArray m_data; bool m_finished; bool m_firstBuffer; @@ -79,7 +79,7 @@ private: unsigned int m_packetBuffer; const unsigned int m_packetSize; - KIO::filesize_t m_size; + TDEIO::filesize_t m_size; static const unsigned int PACKET_COUNT; }; diff --git a/arts/kde/kplayobjectfactory.cc b/arts/kde/kplayobjectfactory.cc index 29ee20e3d..c09692946 100644 --- a/arts/kde/kplayobjectfactory.cc +++ b/arts/kde/kplayobjectfactory.cc @@ -69,7 +69,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const TQStri // I hate it // It sucks // kio_media please die - KURL url = KIO::NetAccess::mostLocalURL(_url, 0); + KURL url = TDEIO::NetAccess::mostLocalURL(_url, 0); if(!m_server.isNull()) { @@ -140,7 +140,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons // I hate it // It sucks // kio_media please die - KURL url = KIO::NetAccess::mostLocalURL(_url, 0); + KURL url = TDEIO::NetAccess::mostLocalURL(_url, 0); // return a NULL playobject if the server is NULL if ( d->server.isNull() || url.isEmpty() ) diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 5ff633516..b8c1642f9 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -73,10 +73,10 @@ class KNotifyPrivate { public: - KConfig* globalEvents; - KConfig* globalConfig; - TQMap<TQString, KConfig*> events; - TQMap<TQString, KConfig*> configs; + TDEConfig* globalEvents; + TDEConfig* globalConfig; + TQMap<TQString, TDEConfig*> events; + TQMap<TQString, TDEConfig*> configs; TQString externalPlayer; TDEProcess *externalPlayerProc; @@ -136,8 +136,8 @@ KDE_EXPORT int kdemain(int argc, char **argv) // abort this. #ifndef WITHOUT_ARTS - KConfigGroup config( TDEGlobal::config(), "StartProgress" ); - KConfig artsKCMConfig( "kcmartsrc" ); + TDEConfigGroup config( TDEGlobal::config(), "StartProgress" ); + TDEConfig artsKCMConfig( "kcmartsrc" ); artsKCMConfig.setGroup( "Arts" ); bool useArts = artsKCMConfig.readBoolEntry( "StartServer", true ); if (useArts) @@ -245,8 +245,8 @@ KNotify::KNotify( bool useArts ) : TQObject(), DCOPObject("Notify") { d = new KNotifyPrivate; - d->globalEvents = new KConfig("knotify/eventsrc", true, false, "data"); - d->globalConfig = new KConfig("knotify.eventsrc", true, false); + d->globalEvents = new TDEConfig("knotify/eventsrc", true, false, "data"); + d->globalConfig = new TDEConfig("knotify.eventsrc", true, false); d->externalPlayerProc = 0; d->useArts = useArts; d->inStartup = true; @@ -285,7 +285,7 @@ KNotify::~KNotify() void KNotify::loadConfig() { // load external player settings - KConfig *kc = TDEGlobal::config(); + TDEConfig *kc = TDEGlobal::config(); kc->setGroup("Misc"); d->useExternal = kc->readBoolEntry( "Use external player", false ); d->externalPlayer = kc->readPathEntry("External player"); @@ -313,7 +313,7 @@ void KNotify::reconfigure() // clear loaded config files d->globalConfig->reparseConfiguration(); - for ( TQMapIterator<TQString,KConfig*> it = d->configs.begin(); it != d->configs.end(); ++it ) + for ( TQMapIterator<TQString,TDEConfig*> it = d->configs.begin(); it != d->configs.end(); ++it ) delete it.data(); d->configs.clear(); } @@ -344,8 +344,8 @@ void KNotify::notify(const TQString &event, const TQString &fromApp, } TQString commandline; - KConfig *eventsFile = NULL; - KConfig *configFile = NULL; + TDEConfig *eventsFile = NULL; + TDEConfig *configFile = NULL; // check for valid events if ( !event.isEmpty() ) { @@ -354,13 +354,13 @@ void KNotify::notify(const TQString &event, const TQString &fromApp, if ( d->events.contains( fromApp ) ) { eventsFile = d->events[fromApp]; } else { - eventsFile=new KConfig(locate("data", fromApp+"/eventsrc"),true,false); + eventsFile=new TDEConfig(locate("data", fromApp+"/eventsrc"),true,false); d->events.insert( fromApp, eventsFile ); } if ( d->configs.contains( fromApp) ) { configFile = d->configs[fromApp]; } else { - configFile=new KConfig(fromApp+".eventsrc",true,false); + configFile=new TDEConfig(fromApp+".eventsrc",true,false); d->configs.insert( fromApp, configFile ); } @@ -588,12 +588,12 @@ bool KNotify::notifyByMessagebox(const TQString &text, int level, WId winId) bool KNotify::notifyByPassivePopup( const TQString &text, const TQString &appName, - KConfig* eventsFile, + TDEConfig* eventsFile, WId senderWinId ) { KIconLoader iconLoader( appName ); if ( eventsFile != NULL ) { - KConfigGroup config( eventsFile, "!Global!" ); + TDEConfigGroup config( eventsFile, "!Global!" ); TQString iconName = config.readEntry( "IconName", appName ); TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); TQString title = config.readEntry( "Comment", appName ); diff --git a/arts/knotify/knotify.h b/arts/knotify/knotify.h index a6fec6747..410821af8 100644 --- a/arts/knotify/knotify.h +++ b/arts/knotify/knotify.h @@ -26,7 +26,7 @@ class KNotifyPrivate; class TDEProcess; -class KConfig; +class TDEConfig; class KNotify : public TQObject, public DCOPObject { @@ -75,7 +75,7 @@ private: bool notifyByLogfile(const TQString &text, const TQString &file); bool notifyByStderr(const TQString &text); bool notifyByPassivePopup(const TQString &text, const TQString &appName, - KConfig* eventsFile, WId winId ); + TDEConfig* eventsFile, WId winId ); bool notifyByExecute(const TQString &command, const TQString& event, const TQString& fromApp, diff --git a/dcop/dcopidl/dcopidl_test.h b/dcop/dcopidl/dcopidl_test.h index 2e896fb52..6f39cab99 100644 --- a/dcop/dcopidl/dcopidl_test.h +++ b/dcop/dcopidl/dcopidl_test.h @@ -14,7 +14,7 @@ class Test2; // this has to work too #include <tqstring.h> -typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap; +typedef TQMap<TDEIO::Job *, KIODownload> KIODownloadMap; class Test3; // Those namespaces are opened and closed, so they should be just ignored @@ -78,7 +78,7 @@ private: Test3 *doc(); struct KIODownload; - typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap; + typedef TQMap<TDEIO::Job *, KIODownload> KIODownloadMap; }; class Test2 : public DCOPObject diff --git a/dnssd/settings.kcfgc b/dnssd/settings.kcfgc index df47ad3a5..63764fc57 100644 --- a/dnssd/settings.kcfgc +++ b/dnssd/settings.kcfgc @@ -1,7 +1,7 @@ ClassName=Configuration File=kcm_kdnssd.kcfg GlobalEnums=false -Inherits=KConfigSkeleton +Inherits=TDEConfigSkeleton ItemAccessors=false MemberVariables=private Mutators=true diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp index 9acfe00d6..e8118b8bc 100644 --- a/interfaces/kimproxy/library/kimproxy.cpp +++ b/interfaces/kimproxy/library/kimproxy.cpp @@ -643,7 +643,7 @@ KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol) TQString KIMProxy::preferredApp() { - KConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE ); + TDEConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE ); store->setGroup( IM_CLIENT_PREFERENCES_SECTION ); TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY ); //kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl; diff --git a/interfaces/kio/http.h b/interfaces/kio/http.h index 15803209c..6a07e9971 100644 --- a/interfaces/kio/http.h +++ b/interfaces/kio/http.h @@ -21,7 +21,7 @@ #define KIOSLAVE_HTTP_H_ -namespace KIO { +namespace TDEIO { /** HTTP / DAV method **/ enum HTTP_METHOD {HTTP_GET, HTTP_PUT, HTTP_POST, HTTP_HEAD, HTTP_DELETE, diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp index 061f8405d..2998af9f5 100644 --- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp +++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp @@ -91,14 +91,14 @@ KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name ) } m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box ); - KConfigGroup config( TDEGlobal::config(), ConfigGroup ); + TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) ); connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) ); } KFileAudioPreview::~KFileAudioPreview() { - KConfigGroup config( TDEGlobal::config(), ConfigGroup ); + TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() ); delete d; diff --git a/interfaces/ktexteditor/configinterface.h b/interfaces/ktexteditor/configinterface.h index cb8538465..4879fa66b 100644 --- a/interfaces/ktexteditor/configinterface.h +++ b/interfaces/ktexteditor/configinterface.h @@ -22,7 +22,7 @@ #include <tdelibs_export.h> class TQCString; -class KConfig; +class TDEConfig; namespace KTextEditor { @@ -60,14 +60,14 @@ class KTEXTEDITOR_EXPORT ConfigInterface Read/Write the config of the part to a given kconfig object to store the settings in a different place than the standard */ - virtual void readConfig (KConfig *) = 0; - virtual void writeConfig (KConfig *) = 0; + virtual void readConfig (TDEConfig *) = 0; + virtual void writeConfig (TDEConfig *) = 0; /** Read/Write session config of only this document/view/plugin */ - virtual void readSessionConfig (KConfig *) = 0; - virtual void writeSessionConfig (KConfig *) = 0; + virtual void readSessionConfig (TDEConfig *) = 0; + virtual void writeSessionConfig (TDEConfig *) = 0; /** Shows a config dialog for the part, changes will be applied diff --git a/interfaces/ktexteditor/editorchooser.cpp b/interfaces/ktexteditor/editorchooser.cpp index 85466f55d..807d342d0 100644 --- a/interfaces/ktexteditor/editorchooser.cpp +++ b/interfaces/ktexteditor/editorchooser.cpp @@ -47,7 +47,7 @@ EditorChooser::EditorChooser(TQWidget *parent,const char *name) : KTrader::OfferList offers = KTrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes"); - KConfig *config=new KConfig("default_components"); + TDEConfig *config=new TDEConfig("default_components"); config->setGroup("KTextEditor"); TQString editor = config->readPathEntry("embeddedEditor"); @@ -75,7 +75,7 @@ EditorChooser:: ~EditorChooser(){ } void EditorChooser::readAppSetting(const TQString& postfix){ - KConfig *cfg=kapp->config(); + TDEConfig *cfg=kapp->config(); TQString previousGroup=cfg->group(); cfg->setGroup("KTEXTEDITOR:"+postfix); TQString editor=cfg->readPathEntry("editor"); @@ -90,7 +90,7 @@ void EditorChooser::readAppSetting(const TQString& postfix){ } void EditorChooser::writeAppSetting(const TQString& postfix){ - KConfig *cfg=kapp->config(); + TDEConfig *cfg=kapp->config(); TQString previousGroup=cfg->group(); cfg->setGroup("KTEXTEDITOR:"+postfix); cfg->writeEntry("DEVELOPER_INFO","NEVER TRY TO USE VALUES FROM THAT GROUP, THEY ARE SUBJECT TO CHANGES"); @@ -105,14 +105,14 @@ KTextEditor::Document *EditorChooser::createDocument(TQObject *parent,const char KTextEditor::Document *tmpDoc=0; - KConfig *cfg=kapp->config(); + TDEConfig *cfg=kapp->config(); TQString previousGroup=cfg->group(); cfg->setGroup("KTEXTEDITOR:"+postfix); TQString editor=cfg->readPathEntry("editor"); cfg->setGroup(previousGroup); if (editor.isEmpty()) { - KConfig *config=new KConfig("default_components"); + TDEConfig *config=new TDEConfig("default_components"); config->setGroup("KTextEditor"); editor = config->readPathEntry("embeddedEditor", "katepart"); delete config; @@ -135,14 +135,14 @@ KTextEditor::Editor *EditorChooser::createEditor(TQWidget *parentWidget,TQObject KTextEditor::Editor *tmpEd=0; - KConfig *cfg=kapp->config(); + TDEConfig *cfg=kapp->config(); TQString previousGroup=cfg->group(); cfg->setGroup("KTEXTEDITOR:"+postfix); TQString editor=cfg->readPathEntry("editor"); cfg->setGroup(previousGroup); if (editor.isEmpty()) { - KConfig *config=new KConfig("default_components"); + TDEConfig *config=new TDEConfig("default_components"); config->setGroup("KTextEditor"); editor = config->readPathEntry("embeddedEditor", "katepart"); delete config; diff --git a/interfaces/ktexteditor/editorchooser.h b/interfaces/ktexteditor/editorchooser.h index 0010dd3a8..d56e8d8e5 100644 --- a/interfaces/ktexteditor/editorchooser.h +++ b/interfaces/ktexteditor/editorchooser.h @@ -6,7 +6,7 @@ #include <tqwidget.h> -class KConfig; +class TDEConfig; class TQString; namespace KTextEditor @@ -45,8 +45,8 @@ public: virtual const TQStringList &choices(); virtual void saveSettings(); - void readAppSetting(KConfig *cfg,const TQString& postfix); - void writeAppSetting(KConfig *cfg,const TQString& postfix); + void readAppSetting(TDEConfig *cfg,const TQString& postfix); + void writeAppSetting(TDEConfig *cfg,const TQString& postfix); public slots: virtual void madeChoice(int pos,const TQString &choice); diff --git a/interfaces/ktexteditor/sessionconfiginterface.h b/interfaces/ktexteditor/sessionconfiginterface.h index c79de0011..b4fb52233 100644 --- a/interfaces/ktexteditor/sessionconfiginterface.h +++ b/interfaces/ktexteditor/sessionconfiginterface.h @@ -22,7 +22,7 @@ #include <tdelibs_export.h> class TQCString; -class KConfig; +class TDEConfig; namespace KTextEditor { @@ -53,8 +53,8 @@ class KTEXTEDITOR_EXPORT SessionConfigInterface * In case of the document, that means for example it should reload the file, * restore all marks, ... */ - virtual void readSessionConfig (KConfig *) = 0; - virtual void writeSessionConfig (KConfig *) = 0; + virtual void readSessionConfig (TDEConfig *) = 0; + virtual void writeSessionConfig (TDEConfig *) = 0; private: class PrivateSessionConfigInterface *d; diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 45d4f10e3..b31df2b73 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -41,7 +41,7 @@ struct AddressBook::AddressBookData { Field::List mAllFields; ErrorHandler *mErrorHandler; - KConfig *mConfig; + TDEConfig *mConfig; KRES::Manager<Resource> *mManager; TQPtrList<Resource> mPendingLoadResources; TQPtrList<Resource> mPendingSaveResources; @@ -318,7 +318,7 @@ AddressBook::AddressBook( const TQString &config ) if ( config.isEmpty() ) d->mConfig = 0; else - d->mConfig = new KConfig( config ); + d->mConfig = new TDEConfig( config ); d->mManager = new KRES::Manager<Resource>( "contact" ); d->mManager->readConfig( d->mConfig ); d->end.d->mResources = TQValueList<Resource*>(); diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp index f04adc95f..908795869 100644 --- a/kabc/addresseehelper.cpp +++ b/kabc/addresseehelper.cpp @@ -81,7 +81,7 @@ void AddresseeHelper::initSettings() mPrefixes.insert( "von" ); mPrefixes.insert( "de" ); - KConfig config( "kabcrc", true, false ); // readonly, no kdeglobals + TDEConfig config( "kabcrc", true, false ); // readonly, no kdeglobals config.setGroup( "General" ); addToSet( config.readListEntry( "Prefixes" ), mTitles ); diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 6f056a404..76d99f634 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -61,13 +61,13 @@ TQTimer* AddressLineEdit::s_LDAPTimer = 0L; LdapSearch* AddressLineEdit::s_LDAPSearch = 0L; TQString* AddressLineEdit::s_LDAPText = 0L; AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L; -KConfig *AddressLineEdit::s_config = 0L; +TDEConfig *AddressLineEdit::s_config = 0L; static KStaticDeleter<KCompletion> completionDeleter; static KStaticDeleter<TQTimer> ldapTimerDeleter; static KStaticDeleter<LdapSearch> ldapSearchDeleter; static KStaticDeleter<TQString> ldapTextDeleter; -static KStaticDeleter<KConfig> configDeleter; +static KStaticDeleter<TDEConfig> configDeleter; AddressLineEdit::AddressLineEdit(TQWidget* parent, bool useCompletion, @@ -136,10 +136,10 @@ AddressLineEdit::~AddressLineEdit() //----------------------------------------------------------------------------- -KConfig* AddressLineEdit::config() +TDEConfig* AddressLineEdit::config() { if ( !s_config ) - configDeleter.setObject( s_config, new KConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals + configDeleter.setObject( s_config, new TDEConfig( "kabldaprc", false, false ) ); // Open read-write, no kdeglobals return s_config; } diff --git a/kabc/addresslineedit.h b/kabc/addresslineedit.h index 093acf97b..0cbd5dd43 100644 --- a/kabc/addresslineedit.h +++ b/kabc/addresslineedit.h @@ -30,7 +30,7 @@ #include "klineedit.h" #include "kcompletion.h" -class KConfig; +class TDEConfig; namespace KABC { @@ -61,7 +61,7 @@ public: */ virtual void setFont( const TQFont& ); - static KConfig *config(); + static TDEConfig *config(); public slots: /** @@ -112,7 +112,7 @@ private: static LdapSearch *s_LDAPSearch; static TQString *s_LDAPText; static AddressLineEdit *s_LDAPLineEdit; - static KConfig *s_config; + static TDEConfig *s_config; private: class AddressLineEditPrivate* d; diff --git a/kabc/field.h b/kabc/field.h index 7a622b90f..118ce2d51 100644 --- a/kabc/field.h +++ b/kabc/field.h @@ -26,7 +26,7 @@ #include "addressee.h" -class KConfig; +class TDEConfig; namespace KABC { @@ -134,7 +134,7 @@ public: * @param identifier The unique identifier * @param fields The list of the fields */ - static void saveFields( KConfig *cfg, const TQString &identifier, + static void saveFields( TDEConfig *cfg, const TQString &identifier, const Field::List &fields ); /** * This is the same as above, with the difference, that @@ -149,7 +149,7 @@ public: * @param cfg The config file object * @param identifier The unique identifier */ - static Field::List restoreFields( KConfig *cfg, const TQString &identifier ); + static Field::List restoreFields( TDEConfig *cfg, const TQString &identifier ); /** * This is the same as above, with the difference, that diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index 2447229da..11b80639a 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -123,7 +123,7 @@ void importKMailAddressBook( KABC::AddressBook *ab ) TQString fileName = locateLocal( "data", "kmail/addressbook" ); TQString kmailConfigName = locate( "config", "kmailrc" ); if ( !kmailConfigName.isEmpty() ) { - KConfig cfg( kmailConfigName ); + TDEConfig cfg( kmailConfigName ); cfg.setGroup( "Addressbook" ); fileName = cfg.readPathEntry( "default", fileName ); } @@ -458,7 +458,7 @@ int main( int argc, char **argv ) if ( args->isSet( "disable-autostart" ) ) { kdDebug() << "Disable autostart." << endl; - KConfig *config = app.config(); + TDEConfig *config = app.config(); config->setGroup( "Startup" ); config->writeEntry( "EnableAutostart", false ); } diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 39e4c504f..568408ba2 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -137,12 +137,12 @@ void LdapClient::startQuery( const TQString& filter ) startParseLDIF(); mActive = true; - mJob = KIO::get( url, false, false ); - connect( mJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); - connect( mJob, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), - this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) ); - connect( mJob, TQT_SIGNAL( result( KIO::Job* ) ), + mJob = TDEIO::get( url, false, false ); + connect( mJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( mJob, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString& ) ) ); + connect( mJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotDone() ) ); } @@ -156,7 +156,7 @@ void LdapClient::cancelQuery() mActive = false; } -void LdapClient::slotData( KIO::Job*, const TQByteArray& data ) +void LdapClient::slotData( TDEIO::Job*, const TQByteArray& data ) { #ifndef NDEBUG // don't create the QString // TQString str( data ); @@ -165,7 +165,7 @@ void LdapClient::slotData( KIO::Job*, const TQByteArray& data ) parseLDIF( data ); } -void LdapClient::slotInfoMessage( KIO::Job*, const TQString & ) +void LdapClient::slotInfoMessage( TDEIO::Job*, const TQString & ) { //tqDebug("Job said \"%s\"", info.latin1()); } @@ -180,8 +180,8 @@ void LdapClient::slotDone() } #endif int err = mJob->error(); - if ( err && err != KIO::ERR_USER_CANCELED ) { - emit error( KIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); + if ( err && err != TDEIO::ERR_USER_CANCELED ) { + emit error( TDEIO::buildErrorString( err, TQString("%1:%2").arg( mHost ).arg( mPort ) ) ); } emit done(); } @@ -251,7 +251,7 @@ LdapSearch::LdapSearch() } // stolen from KAddressBook - KConfig config( "kabldaprc", true ); + TDEConfig config( "kabldaprc", true ); config.setGroup( "LDAP" ); int numHosts = config.readUnsignedNumEntry( "NumSelectedHosts"); if ( !numHosts ) { diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h index 2054b1302..5f8513599 100644 --- a/kabc/ldapclient.h +++ b/kabc/ldapclient.h @@ -157,8 +157,8 @@ class KABC_EXPORT LdapClient : public TQObject void cancelQuery(); protected slots: - void slotData( KIO::Job*, const TQByteArray &data ); - void slotInfoMessage( KIO::Job*, const TQString &info ); + void slotData( TDEIO::Job*, const TQByteArray &data ); + void slotInfoMessage( TDEIO::Job*, const TQString &info ); void slotDone(); protected: @@ -172,7 +172,7 @@ class KABC_EXPORT LdapClient : public TQObject TQString mScope; TQStringList mAttrs; - TQGuardedPtr<KIO::SimpleJob> mJob; + TQGuardedPtr<TDEIO::SimpleJob> mJob; bool mActive; LdapObject mCurrentObject; diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp index b0a899d8c..eff79a73a 100644 --- a/kabc/ldapconfigwidget.cpp +++ b/kabc/ldapconfigwidget.cpp @@ -243,7 +243,7 @@ void LdapConfigWidget::initWidget() } -void LdapConfigWidget::loadData( KIO::Job*, const TQByteArray& d ) +void LdapConfigWidget::loadData( TDEIO::Job*, const TQByteArray& d ) { LDIF::ParseVal ret; @@ -261,10 +261,10 @@ void LdapConfigWidget::loadData( KIO::Job*, const TQByteArray& d ) } while ( ret != LDIF::MoreData ); } -void LdapConfigWidget::loadResult( KIO::Job* job) +void LdapConfigWidget::loadResult( TDEIO::Job* job) { int error = job->error(); - if ( error && error != KIO::ERR_USER_CANCELED ) + if ( error && error != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; @@ -291,12 +291,12 @@ void LdapConfigWidget::sendQuery() kdDebug(5700) << "sendQuery url: " << _url.prettyURL() << endl; mLdif.startParsing(); - KIO::Job *job = KIO::get( _url, true, false ); + TDEIO::Job *job = TDEIO::get( _url, true, false ); job->addMetaData("no-auth-prompt","true"); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( loadData( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( loadResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( loadData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadResult( TDEIO::Job* ) ) ); if ( mProg == NULL ) mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h index c4144b027..0fd0dd7e5 100644 --- a/kabc/ldapconfigwidget.h +++ b/kabc/ldapconfigwidget.h @@ -44,7 +44,7 @@ namespace KABC { @short LDAP Configuration widget This class can be used to query the user for LDAP connection parameters. - It's KConfigXT compatible, using widget names starting with kcfg_ + It's TDEConfigXT compatible, using widget names starting with kcfg_ */ class KABC_EXPORT LdapConfigWidget : public TQWidget @@ -223,23 +223,23 @@ namespace KABC { /** * Sets the size limit. - * KConfig widget name: kcfg_ldapsizelimit + * TDEConfig widget name: kcfg_ldapsizelimit */ void setSizeLimit( int sizelimit ); /** * Returns the size limit. - * KConfig widget name: kcfg_ldapsizelimit + * TDEConfig widget name: kcfg_ldapsizelimit */ int sizeLimit() const; /** * Sets the time limit. - * KConfig widget name: kcfg_ldaptimelimit + * TDEConfig widget name: kcfg_ldaptimelimit */ void setTimeLimit( int timelimit ); /** * Returns the time limit. - * KConfig widget name: kcfg_ldaptimelimit + * TDEConfig widget name: kcfg_ldaptimelimit */ int timeLimit() const; @@ -262,8 +262,8 @@ namespace KABC { void setSASL( int state ); void mQueryDNClicked(); void mQueryMechClicked(); - void loadData( KIO::Job*, const TQByteArray& ); - void loadResult( KIO::Job* ); + void loadData( TDEIO::Job*, const TQByteArray& ); + void loadResult( TDEIO::Job* ); private: int mFlags; diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 0897c9cee..0dfd0352a 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -56,7 +56,7 @@ extern "C" } -ResourceDir::ResourceDir( const KConfig *config ) +ResourceDir::ResourceDir( const TDEConfig *config ) : Resource( config ), mAsynchronous( false ) { if ( config ) { @@ -100,7 +100,7 @@ ResourceDir::~ResourceDir() mFormat = 0; } -void ResourceDir::writeConfig( KConfig *config ) +void ResourceDir::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h index 96c894e2e..a7b041643 100644 --- a/kabc/plugins/dir/resourcedir.h +++ b/kabc/plugins/dir/resourcedir.h @@ -43,11 +43,11 @@ class KABC_EXPORT ResourceDir : public Resource Q_OBJECT public: - ResourceDir( const KConfig* ); + ResourceDir( const TDEConfig* ); ResourceDir( const TQString &path, const TQString &type = "vcard" ); ~ResourceDir(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp index 9a44b2adb..415e9928a 100644 --- a/kabc/plugins/evolution/resourceevo.cpp +++ b/kabc/plugins/evolution/resourceevo.cpp @@ -17,7 +17,7 @@ using namespace KABC; class EvolutionFactory : public KRES::PluginFactoryBase { public: - KRES::Resource *resource( const KConfig *config ) + KRES::Resource *resource( const TDEConfig *config ) { return new ResourceEvolution( config ); } @@ -36,7 +36,7 @@ extern "C" } } -ResourceEvolution::ResourceEvolution( const KConfig* conf ) +ResourceEvolution::ResourceEvolution( const TDEConfig* conf ) : Resource( conf ), mWrap(0l) { m_isOpen = false; diff --git a/kabc/plugins/evolution/resourceevo.h b/kabc/plugins/evolution/resourceevo.h index 0f5b3a0d2..29e163e1c 100644 --- a/kabc/plugins/evolution/resourceevo.h +++ b/kabc/plugins/evolution/resourceevo.h @@ -7,7 +7,7 @@ namespace Evolution { namespace KABC { class ResourceEvolution : public Resource { public: - ResourceEvolution( const KConfig* config ); + ResourceEvolution( const TDEConfig* config ); ~ResourceEvolution(); bool doOpen(); diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index b391dffa5..3e5b1fa8f 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -46,7 +46,7 @@ using namespace KABC; -ResourceFile::ResourceFile( const KConfig *config ) +ResourceFile::ResourceFile( const TDEConfig *config ) : Resource( config ), mFormat( 0 ), mAsynchronous( false ) { @@ -98,7 +98,7 @@ ResourceFile::~ResourceFile() mFormat = 0; } -void ResourceFile::writeConfig( KConfig *config ) +void ResourceFile::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index b44c22ec1..494c43ea6 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h @@ -47,7 +47,7 @@ class KABC_EXPORT ResourceFile : public Resource @param cfg The config object where custom resource settings are stored. */ - ResourceFile( const KConfig *cfg ); + ResourceFile( const TDEConfig *cfg ); /** Construct file resource on file @arg fileName using format @arg formatName. @@ -62,7 +62,7 @@ class KABC_EXPORT ResourceFile : public Resource /** Writes the config back. */ - virtual void writeConfig( KConfig *cfg ); + virtual void writeConfig( TDEConfig *cfg ); /** Tries to open the file and checks for the proper format. diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp index e8da1b6aa..03a49e819 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -47,7 +47,7 @@ using namespace KABC; void tqt_enter_modal( TQWidget *widget ); void tqt_leave_modal( TQWidget *widget ); -class ResourceLDAPKIO::ResourceLDAPKIOPrivate +class ResourceLDAPTDEIO::ResourceLDAPKIOPrivate { public: LDIF mLdif; @@ -69,7 +69,7 @@ class ResourceLDAPKIO::ResourceLDAPKIOPrivate KTempFile *mTmp; }; -ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config ) +ResourceLDAPTDEIO::ResourceLDAPKIO( const TDEConfig *config ) : Resource( config ) { d = new ResourceLDAPKIOPrivate; @@ -115,12 +115,12 @@ ResourceLDAPKIO::ResourceLDAPKIO( const KConfig *config ) init(); } -ResourceLDAPKIO::~ResourceLDAPKIO() +ResourceLDAPTDEIO::~ResourceLDAPKIO() { delete d; } -void ResourceLDAPKIO::enter_loop() +void ResourceLDAPTDEIO::enter_loop() { TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); dummy.setFocusPolicy( TQ_NoFocus ); @@ -129,14 +129,14 @@ void ResourceLDAPKIO::enter_loop() tqt_leave_modal(&dummy); } -void ResourceLDAPKIO::entries( KIO::Job*, const KIO::UDSEntryList & list ) +void ResourceLDAPTDEIO::entries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) { - KIO::UDSEntryListConstIterator it = list.begin(); - KIO::UDSEntryListConstIterator end = list.end(); + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); for (; it != end; ++it) { - KIO::UDSEntry::ConstIterator it2 = (*it).begin(); + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); for( ; it2 != (*it).end(); it2++ ) { - if ( (*it2).m_uds == KIO::UDS_URL ) { + if ( (*it2).m_uds == TDEIO::UDS_URL ) { KURL tmpurl( (*it2).m_str ); d->mResultDn = tmpurl.path(); kdDebug(7125) << "findUid(): " << d->mResultDn << endl; @@ -147,20 +147,20 @@ void ResourceLDAPKIO::entries( KIO::Job*, const KIO::UDSEntryList & list ) } } -void ResourceLDAPKIO::listResult( KIO::Job *job) +void ResourceLDAPTDEIO::listResult( TDEIO::Job *job) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; tqApp->exit_loop(); } -TQString ResourceLDAPKIO::findUid( const TQString &uid ) +TQString ResourceLDAPTDEIO::findUid( const TQString &uid ) { LDAPUrl url( d->mLDAPUrl ); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; mErrorMsg = d->mResultDn = ""; @@ -168,21 +168,21 @@ TQString ResourceLDAPKIO::findUid( const TQString &uid ) url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); url.setExtension( "x-dir", "one" ); - kdDebug(7125) << "ResourceLDAPKIO::findUid() uid: " << uid << " url " << + kdDebug(7125) << "ResourceLDAPTDEIO::findUid() uid: " << uid << " url " << url.prettyURL() << endl; - KIO::ListJob * listJob = KIO::listDir( url, false /* no GUI */ ); + TDEIO::ListJob * listJob = TDEIO::listDir( url, false /* no GUI */ ); connect( listJob, - TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ), - TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); - connect( listJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( listResult( KIO::Job* ) ) ); + TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList& ) ), + TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); + connect( listJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( listResult( TDEIO::Job* ) ) ); enter_loop(); return d->mResultDn; } -TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value, bool mod ) +TQCString ResourceLDAPTDEIO::addEntry( const TQString &attr, const TQString &value, bool mod ) { TQCString tmp; if ( !attr.isEmpty() ) { @@ -193,7 +193,7 @@ TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value return ( tmp ); } -bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, +bool ResourceLDAPTDEIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, const TQString &olddn ) { TQCString tmp; @@ -313,14 +313,14 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, return true; } -void ResourceLDAPKIO::setReadOnly( bool value ) +void ResourceLDAPTDEIO::setReadOnly( bool value ) { //save the original readonly flag, because offline using disables writing d->mReadOnly = true; Resource::setReadOnly( value ); } -void ResourceLDAPKIO::init() +void ResourceLDAPTDEIO::init() { if ( mPort == 0 ) mPort = 389; @@ -417,7 +417,7 @@ void ResourceLDAPKIO::init() kdDebug(7125) << "resource_ldapkio url: " << d->mLDAPUrl.prettyURL() << endl; } -void ResourceLDAPKIO::writeConfig( KConfig *config ) +void ResourceLDAPTDEIO::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); @@ -450,7 +450,7 @@ void ResourceLDAPKIO::writeConfig( KConfig *config ) config->writeEntry( "LdapAttributes", attributes ); } -Ticket *ResourceLDAPKIO::requestSaveTicket() +Ticket *ResourceLDAPTDEIO::requestSaveTicket() { if ( !addressBook() ) { kdDebug(7125) << "no addressbook" << endl; @@ -460,21 +460,21 @@ Ticket *ResourceLDAPKIO::requestSaveTicket() return createTicket( this ); } -void ResourceLDAPKIO::releaseSaveTicket( Ticket *ticket ) +void ResourceLDAPTDEIO::releaseSaveTicket( Ticket *ticket ) { delete ticket; } -bool ResourceLDAPKIO::doOpen() +bool ResourceLDAPTDEIO::doOpen() { return true; } -void ResourceLDAPKIO::doClose() +void ResourceLDAPTDEIO::doClose() { } -void ResourceLDAPKIO::createCache() +void ResourceLDAPTDEIO::createCache() { d->mTmp = NULL; if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) { @@ -483,7 +483,7 @@ void ResourceLDAPKIO::createCache() } } -void ResourceLDAPKIO::activateCache() +void ResourceLDAPTDEIO::activateCache() { if ( d->mTmp && d->mError == 0 ) { d->mTmp->close(); @@ -495,12 +495,12 @@ void ResourceLDAPKIO::activateCache() } } -KIO::Job *ResourceLDAPKIO::loadFromCache() +TDEIO::Job *ResourceLDAPTDEIO::loadFromCache() { - KIO::Job *job = NULL; + TDEIO::Job *job = NULL; if ( d->mCachePolicy == Cache_Always || ( d->mCachePolicy == Cache_NoConnection && - d->mError == KIO::ERR_COULD_NOT_CONNECT ) ) { + d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) { d->mAddr = Addressee(); d->mAd = Address( Address::Home ); @@ -510,17 +510,17 @@ KIO::Job *ResourceLDAPKIO::loadFromCache() Resource::setReadOnly( true ); KURL url( d->mCacheDst ); - job = KIO::get( url, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); + job = TDEIO::get( url, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); } return job; } -bool ResourceLDAPKIO::load() +bool ResourceLDAPTDEIO::load() { - kdDebug(7125) << "ResourceLDAPKIO::load()" << endl; - KIO::Job *job; + kdDebug(7125) << "ResourceLDAPTDEIO::load()" << endl; + TDEIO::Job *job; clear(); //clear the addressee @@ -534,18 +534,18 @@ bool ResourceLDAPKIO::load() createCache(); if ( d->mCachePolicy != Cache_Always ) { - job = KIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); } job = loadFromCache(); if ( job ) { - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); } if ( mErrorMsg.isEmpty() ) { @@ -558,7 +558,7 @@ bool ResourceLDAPKIO::load() } } -bool ResourceLDAPKIO::asyncLoad() +bool ResourceLDAPTDEIO::asyncLoad() { clear(); //clear the addressee @@ -571,18 +571,18 @@ bool ResourceLDAPKIO::asyncLoad() createCache(); if ( d->mCachePolicy != Cache_Always ) { - KIO::Job *job = KIO::get( d->mLDAPUrl, true, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( result( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::get( d->mLDAPUrl, true, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( result( TDEIO::Job* ) ) ); } else { result( NULL ); } return true; } -void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data ) +void ResourceLDAPTDEIO::data( TDEIO::Job *, const TQByteArray &data ) { if ( data.size() ) { d->mLdif.setLDIF( data ); @@ -685,11 +685,11 @@ void ResourceLDAPKIO::data( KIO::Job *, const TQByteArray &data ) } while ( ret != LDIF::MoreData ); } -void ResourceLDAPKIO::loadCacheResult( KIO::Job *job ) +void ResourceLDAPTDEIO::loadCacheResult( TDEIO::Job *job ) { mErrorMsg = ""; d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) { + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { mErrorMsg = job->errorString(); } if ( !mErrorMsg.isEmpty() ) @@ -698,12 +698,12 @@ void ResourceLDAPKIO::loadCacheResult( KIO::Job *job ) emit loadingFinished( this ); } -void ResourceLDAPKIO::result( KIO::Job *job ) +void ResourceLDAPTDEIO::result( TDEIO::Job *job ) { mErrorMsg = ""; if ( job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) { + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) { mErrorMsg = job->errorString(); } } else { @@ -711,11 +711,11 @@ void ResourceLDAPKIO::result( KIO::Job *job ) } activateCache(); - KIO::Job *cjob; + TDEIO::Job *cjob; cjob = loadFromCache(); if ( cjob ) { - connect( cjob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( loadCacheResult( KIO::Job* ) ) ); + connect( cjob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( loadCacheResult( TDEIO::Job* ) ) ); } else { if ( !mErrorMsg.isEmpty() ) emit loadingError( this, mErrorMsg ); @@ -724,16 +724,16 @@ void ResourceLDAPKIO::result( KIO::Job *job ) } } -bool ResourceLDAPKIO::save( Ticket* ) +bool ResourceLDAPTDEIO::save( Ticket* ) { kdDebug(7125) << "ResourceLDAPKIO save" << endl; d->mSaveIt = begin(); - KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( syncLoadSaveResult( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( syncLoadSaveResult( TDEIO::Job* ) ) ); enter_loop(); if ( mErrorMsg.isEmpty() ) { kdDebug(7125) << "ResourceLDAPKIO save ok!" << endl; @@ -745,22 +745,22 @@ bool ResourceLDAPKIO::save( Ticket* ) } } -bool ResourceLDAPKIO::asyncSave( Ticket* ) +bool ResourceLDAPTDEIO::asyncSave( Ticket* ) { kdDebug(7125) << "ResourceLDAPKIO asyncSave" << endl; d->mSaveIt = begin(); - KIO::Job *job = KIO::put( d->mLDAPUrl, -1, true, false, false ); - connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), - this, TQT_SLOT( saveData( KIO::Job*, TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( saveResult( KIO::Job* ) ) ); + TDEIO::Job *job = TDEIO::put( d->mLDAPUrl, -1, true, false, false ); + connect( job, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( saveData( TDEIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( saveResult( TDEIO::Job* ) ) ); return true; } -void ResourceLDAPKIO::syncLoadSaveResult( KIO::Job *job ) +void ResourceLDAPTDEIO::syncLoadSaveResult( TDEIO::Job *job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) mErrorMsg = job->errorString(); else mErrorMsg = ""; @@ -769,16 +769,16 @@ void ResourceLDAPKIO::syncLoadSaveResult( KIO::Job *job ) tqApp->exit_loop(); } -void ResourceLDAPKIO::saveResult( KIO::Job *job ) +void ResourceLDAPTDEIO::saveResult( TDEIO::Job *job ) { d->mError = job->error(); - if ( d->mError && d->mError != KIO::ERR_USER_CANCELED ) + if ( d->mError && d->mError != TDEIO::ERR_USER_CANCELED ) emit savingError( this, job->errorString() ); else emit savingFinished( this ); } -void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) +void ResourceLDAPTDEIO::saveData( TDEIO::Job*, TQByteArray& data ) { while ( d->mSaveIt != end() && !(*d->mSaveIt).changed() ) d->mSaveIt++; @@ -799,7 +799,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) d->mSaveIt++; } -void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) +void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr ) { TQString dn = findUid( addr.uid() ); @@ -815,7 +815,7 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) url.setPath( "/" + dn ); url.setExtension( "x-dir", "base" ); url.setScope( LDAPUrl::Base ); - if ( KIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); + if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() ); } else { //maybe it's not saved yet mAddrMap.erase( addr.uid() ); @@ -823,216 +823,216 @@ void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) } -void ResourceLDAPKIO::setUser( const TQString &user ) +void ResourceLDAPTDEIO::setUser( const TQString &user ) { mUser = user; } -TQString ResourceLDAPKIO::user() const +TQString ResourceLDAPTDEIO::user() const { return mUser; } -void ResourceLDAPKIO::setPassword( const TQString &password ) +void ResourceLDAPTDEIO::setPassword( const TQString &password ) { mPassword = password; } -TQString ResourceLDAPKIO::password() const +TQString ResourceLDAPTDEIO::password() const { return mPassword; } -void ResourceLDAPKIO::setDn( const TQString &dn ) +void ResourceLDAPTDEIO::setDn( const TQString &dn ) { mDn = dn; } -TQString ResourceLDAPKIO::dn() const +TQString ResourceLDAPTDEIO::dn() const { return mDn; } -void ResourceLDAPKIO::setHost( const TQString &host ) +void ResourceLDAPTDEIO::setHost( const TQString &host ) { mHost = host; } -TQString ResourceLDAPKIO::host() const +TQString ResourceLDAPTDEIO::host() const { return mHost; } -void ResourceLDAPKIO::setPort( int port ) +void ResourceLDAPTDEIO::setPort( int port ) { mPort = port; } -int ResourceLDAPKIO::port() const +int ResourceLDAPTDEIO::port() const { return mPort; } -void ResourceLDAPKIO::setVer( int ver ) +void ResourceLDAPTDEIO::setVer( int ver ) { d->mVer = ver; } -int ResourceLDAPKIO::ver() const +int ResourceLDAPTDEIO::ver() const { return d->mVer; } -void ResourceLDAPKIO::setSizeLimit( int sizelimit ) +void ResourceLDAPTDEIO::setSizeLimit( int sizelimit ) { d->mSizeLimit = sizelimit; } -int ResourceLDAPKIO::sizeLimit() +int ResourceLDAPTDEIO::sizeLimit() { return d->mSizeLimit; } -void ResourceLDAPKIO::setTimeLimit( int timelimit ) +void ResourceLDAPTDEIO::setTimeLimit( int timelimit ) { d->mTimeLimit = timelimit; } -int ResourceLDAPKIO::timeLimit() +int ResourceLDAPTDEIO::timeLimit() { return d->mTimeLimit; } -void ResourceLDAPKIO::setFilter( const TQString &filter ) +void ResourceLDAPTDEIO::setFilter( const TQString &filter ) { mFilter = filter; } -TQString ResourceLDAPKIO::filter() const +TQString ResourceLDAPTDEIO::filter() const { return mFilter; } -void ResourceLDAPKIO::setIsAnonymous( bool value ) +void ResourceLDAPTDEIO::setIsAnonymous( bool value ) { mAnonymous = value; } -bool ResourceLDAPKIO::isAnonymous() const +bool ResourceLDAPTDEIO::isAnonymous() const { return mAnonymous; } -void ResourceLDAPKIO::setIsTLS( bool value ) +void ResourceLDAPTDEIO::setIsTLS( bool value ) { d->mTLS = value; } -bool ResourceLDAPKIO::isTLS() const +bool ResourceLDAPTDEIO::isTLS() const { return d->mTLS; } -void ResourceLDAPKIO::setIsSSL( bool value ) +void ResourceLDAPTDEIO::setIsSSL( bool value ) { d->mSSL = value; } -bool ResourceLDAPKIO::isSSL() const +bool ResourceLDAPTDEIO::isSSL() const { return d->mSSL; } -void ResourceLDAPKIO::setIsSubTree( bool value ) +void ResourceLDAPTDEIO::setIsSubTree( bool value ) { d->mSubTree = value; } -bool ResourceLDAPKIO::isSubTree() const +bool ResourceLDAPTDEIO::isSubTree() const { return d->mSubTree; } -void ResourceLDAPKIO::setAttributes( const TQMap<TQString, TQString> &attributes ) +void ResourceLDAPTDEIO::setAttributes( const TQMap<TQString, TQString> &attributes ) { mAttributes = attributes; } -TQMap<TQString, TQString> ResourceLDAPKIO::attributes() const +TQMap<TQString, TQString> ResourceLDAPTDEIO::attributes() const { return mAttributes; } -void ResourceLDAPKIO::setRDNPrefix( int value ) +void ResourceLDAPTDEIO::setRDNPrefix( int value ) { d->mRDNPrefix = value; } -int ResourceLDAPKIO::RDNPrefix() const +int ResourceLDAPTDEIO::RDNPrefix() const { return d->mRDNPrefix; } -void ResourceLDAPKIO::setIsSASL( bool value ) +void ResourceLDAPTDEIO::setIsSASL( bool value ) { d->mSASL = value; } -bool ResourceLDAPKIO::isSASL() const +bool ResourceLDAPTDEIO::isSASL() const { return d->mSASL; } -void ResourceLDAPKIO::setMech( const TQString &mech ) +void ResourceLDAPTDEIO::setMech( const TQString &mech ) { d->mMech = mech; } -TQString ResourceLDAPKIO::mech() const +TQString ResourceLDAPTDEIO::mech() const { return d->mMech; } -void ResourceLDAPKIO::setRealm( const TQString &realm ) +void ResourceLDAPTDEIO::setRealm( const TQString &realm ) { d->mRealm = realm; } -TQString ResourceLDAPKIO::realm() const +TQString ResourceLDAPTDEIO::realm() const { return d->mRealm; } -void ResourceLDAPKIO::setBindDN( const TQString &binddn ) +void ResourceLDAPTDEIO::setBindDN( const TQString &binddn ) { d->mBindDN = binddn; } -TQString ResourceLDAPKIO::bindDN() const +TQString ResourceLDAPTDEIO::bindDN() const { return d->mBindDN; } -void ResourceLDAPKIO::setCachePolicy( int pol ) +void ResourceLDAPTDEIO::setCachePolicy( int pol ) { d->mCachePolicy = pol; } -int ResourceLDAPKIO::cachePolicy() const +int ResourceLDAPTDEIO::cachePolicy() const { return d->mCachePolicy; } -void ResourceLDAPKIO::setAutoCache( bool value ) +void ResourceLDAPTDEIO::setAutoCache( bool value ) { d->mAutoCache = value; } -bool ResourceLDAPKIO::autoCache() +bool ResourceLDAPTDEIO::autoCache() { return d->mAutoCache; } -TQString ResourceLDAPKIO::cacheDst() const +TQString ResourceLDAPTDEIO::cacheDst() const { return d->mCacheDst; } diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h index 2b5685fdc..8519955da 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.h +++ b/kabc/plugins/ldapkio/resourceldapkio.h @@ -26,7 +26,7 @@ #include <kabc/ldif.h> #include <kio/job.h> -class KConfig; +class TDEConfig; namespace KABC { @@ -37,14 +37,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource public: enum CachePolicy{ Cache_No, Cache_NoConnection, Cache_Always }; - ResourceLDAPKIO( const KConfig* ); + ResourceLDAPKIO( const TDEConfig* ); virtual ~ResourceLDAPKIO(); /** * Call this after you used one of the set... methods */ virtual void init(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); @@ -128,14 +128,14 @@ class KABC_EXPORT ResourceLDAPKIO : public Resource TQString cacheDst() const; protected slots: - void entries( KIO::Job*, const KIO::UDSEntryList& ); - void data( KIO::Job*, const TQByteArray& ); - void result( KIO::Job* ); - void listResult( KIO::Job* ); - void syncLoadSaveResult( KIO::Job* ); - void saveResult( KIO::Job* ); - void saveData( KIO::Job*, TQByteArray& ); - void loadCacheResult( KIO::Job* ); + void entries( TDEIO::Job*, const TDEIO::UDSEntryList& ); + void data( TDEIO::Job*, const TQByteArray& ); + void result( TDEIO::Job* ); + void listResult( TDEIO::Job* ); + void syncLoadSaveResult( TDEIO::Job* ); + void saveResult( TDEIO::Job* ); + void saveData( TDEIO::Job*, TQByteArray& ); + void loadCacheResult( TDEIO::Job* ); private: TQString mUser; @@ -151,9 +151,9 @@ protected slots: int mGetCounter; //KDE 4: remove bool mErrorOccured; //KDE 4: remove TQString mErrorMsg; - TQMap<KIO::Job*, TQByteArray> mJobMap; //KDE 4: remove + TQMap<TDEIO::Job*, TQByteArray> mJobMap; //KDE 4: remove - KIO::Job *loadFromCache(); + TDEIO::Job *loadFromCache(); void createCache(); void activateCache(); void enter_loop(); diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 271328525..7ecd14554 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -378,7 +378,7 @@ int OfflineDialog::cachePolicy() const void OfflineDialog::loadCache() { - if ( KIO::NetAccess::download( mSrc, mDst, this ) ) { + if ( TDEIO::NetAccess::download( mSrc, mDst, this ) ) { KMessageBox::information( this, i18n("Successfully downloaded directory server contents!") ); } else { diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp index 914885877..78fb16256 100644 --- a/kabc/plugins/net/resourcenet.cpp +++ b/kabc/plugins/net/resourcenet.cpp @@ -40,16 +40,16 @@ using namespace KABC; class ResourceNet::ResourceNetPrivate { public: - KIO::Job *mLoadJob; + TDEIO::Job *mLoadJob; bool mIsLoading; - KIO::Job *mSaveJob; + TDEIO::Job *mSaveJob; bool mIsSaving; TQString mLastErrorString; }; -ResourceNet::ResourceNet( const KConfig *config ) +ResourceNet::ResourceNet( const TDEConfig *config ) : Resource( config ), mFormat( 0 ), mTempFile( 0 ), d( new ResourceNetPrivate ) @@ -104,7 +104,7 @@ ResourceNet::~ResourceNet() deleteLocalTempFile(); } -void ResourceNet::writeConfig( KConfig *config ) +void ResourceNet::writeConfig( TDEConfig *config ) { Resource::writeConfig( config ); @@ -137,7 +137,7 @@ bool ResourceNet::load() { TQString tempFile; - if ( !KIO::NetAccess::download( mUrl, tempFile, 0 ) ) { + if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) { addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) ); return false; } @@ -145,7 +145,7 @@ bool ResourceNet::load() TQFile file( tempFile ); if ( !file.open( IO_ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( tempFile ) ); - KIO::NetAccess::removeTempFile( tempFile ); + TDEIO::NetAccess::removeTempFile( tempFile ); return false; } @@ -153,7 +153,7 @@ bool ResourceNet::load() if ( !result ) addressBook()->error( i18n( "Problems during parsing file '%1'." ).arg( tempFile ) ); - KIO::NetAccess::removeTempFile( tempFile ); + TDEIO::NetAccess::removeTempFile( tempFile ); return result; } @@ -189,11 +189,11 @@ bool ResourceNet::asyncLoad() KURL dest; dest.setPath( mTempFile->name() ); - KIO::Scheduler::checkSlaveOnHold( true ); - d->mLoadJob = KIO::file_copy( mUrl, dest, -1, true, false, false ); + TDEIO::Scheduler::checkSlaveOnHold( true ); + d->mLoadJob = TDEIO::file_copy( mUrl, dest, -1, true, false, false ); d->mIsLoading = true; - connect( d->mLoadJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( downloadFinished( KIO::Job* ) ) ); + connect( d->mLoadJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( downloadFinished( TDEIO::Job* ) ) ); return true; } @@ -247,7 +247,7 @@ bool ResourceNet::save( Ticket* ) return false; } - ok = KIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); + ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 ); if ( !ok ) addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) ); @@ -283,11 +283,11 @@ bool ResourceNet::asyncSave( Ticket* ) KURL src; src.setPath( mTempFile->name() ); - KIO::Scheduler::checkSlaveOnHold( true ); + TDEIO::Scheduler::checkSlaveOnHold( true ); d->mIsSaving = true; - d->mSaveJob = KIO::file_copy( src, mUrl, -1, true, false, false ); - connect( d->mSaveJob, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( uploadFinished( KIO::Job* ) ) ); + d->mSaveJob = TDEIO::file_copy( src, mUrl, -1, true, false, false ); + connect( d->mSaveJob, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( uploadFinished( TDEIO::Job* ) ) ); return true; } @@ -344,7 +344,7 @@ TQString ResourceNet::format() const return mFormatName; } -void ResourceNet::downloadFinished( KIO::Job* ) +void ResourceNet::downloadFinished( TDEIO::Job* ) { kdDebug(5700) << "ResourceNet::downloadFinished()" << endl; @@ -370,7 +370,7 @@ void ResourceNet::downloadFinished( KIO::Job* ) deleteLocalTempFile(); } -void ResourceNet::uploadFinished( KIO::Job *job ) +void ResourceNet::uploadFinished( TDEIO::Job *job ) { kdDebug(5700) << "ResourceFile::uploadFinished()" << endl; diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h index 326c3780b..a13bfa175 100644 --- a/kabc/plugins/net/resourcenet.h +++ b/kabc/plugins/net/resourcenet.h @@ -31,7 +31,7 @@ class TQFile; class TQTimer; class KTempFile; -namespace KIO { +namespace TDEIO { class Job; } @@ -47,11 +47,11 @@ class KABC_EXPORT ResourceNet : public Resource Q_OBJECT public: - ResourceNet( const KConfig* ); + ResourceNet( const TDEConfig* ); ResourceNet( const KURL &url, const TQString &format ); ~ResourceNet(); - virtual void writeConfig( KConfig* ); + virtual void writeConfig( TDEConfig* ); virtual bool doOpen(); virtual void doClose(); @@ -88,8 +88,8 @@ class KABC_EXPORT ResourceNet : public Resource void init( const KURL &url, const TQString &format ); private slots: - void downloadFinished( KIO::Job* ); - void uploadFinished( KIO::Job* ); + void downloadFinished( TDEIO::Job* ); + void uploadFinished( TDEIO::Job* ); void signalError(); private: diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp index 55f02bae7..150fe54eb 100644 --- a/kabc/plugins/sql/resourcesql.cpp +++ b/kabc/plugins/sql/resourcesql.cpp @@ -39,7 +39,7 @@ extern "C" } } -ResourceSql::ResourceSql( AddressBook *ab, const KConfig *config ) +ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config ) : Resource( ab ), mDb( 0 ) { TQString user, password, db, host; diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h index 80ebf9e7a..9f1201844 100644 --- a/kabc/plugins/sql/resourcesql.h +++ b/kabc/plugins/sql/resourcesql.h @@ -35,7 +35,7 @@ class ResourceSql : public Resource public: ResourceSql( AddressBook *ab, const TQString &user, const TQString &password, const TQString &db, const TQString &host ); - ResourceSql( AddressBook *ab, const KConfig * ); + ResourceSql( AddressBook *ab, const TDEConfig * ); bool open(); void close(); diff --git a/kabc/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp index ef1651cde..f62890c3d 100644 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ b/kabc/plugins/sql/resourcesqlconfig.cpp @@ -74,7 +74,7 @@ ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) mainLayout->addWidget( mDbName, 4, 1 ); } -void ResourceSqlConfig::loadSettings( KConfig *config ) +void ResourceSqlConfig::loadSettings( TDEConfig *config ) { mUser->setText( config->readEntry( "SqlUser" ) ); mPassword->setText( KABC::Resource::cryptStr( config->readEntry( "SqlPassword" ) ) ); @@ -83,7 +83,7 @@ void ResourceSqlConfig::loadSettings( KConfig *config ) mPort->setValue( config->readNumEntry( "SqlPort" ) ); } -void ResourceSqlConfig::saveSettings( KConfig *config ) +void ResourceSqlConfig::saveSettings( TDEConfig *config ) { config->writeEntry( "SqlUser", mUser->text() ); config->writeEntry( "SqlPassword", KABC::Resource::cryptStr( mPassword->text() ) ); diff --git a/kabc/plugins/sql/resourcesqlconfig.h b/kabc/plugins/sql/resourcesqlconfig.h index 7bd27d969..ae2de7d6d 100644 --- a/kabc/plugins/sql/resourcesqlconfig.h +++ b/kabc/plugins/sql/resourcesqlconfig.h @@ -36,8 +36,8 @@ public: ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 ); public slots: - void loadSettings( KConfig *config ); - void saveSettings( KConfig *config ); + void loadSettings( TDEConfig *config ); + void saveSettings( TDEConfig *config ); private: KLineEdit* mUser; diff --git a/kabc/resource.cpp b/kabc/resource.cpp index d43c68320..57c8588e8 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp @@ -197,7 +197,7 @@ bool Resource::ConstIterator::operator!=( const ConstIterator &it ) } -Resource::Resource( const KConfig *config ) +Resource::Resource( const TDEConfig *config ) : KRES::Resource( config ), mAddressBook( 0 ) { } @@ -236,7 +236,7 @@ Resource::ConstIterator Resource::end() const return it; } -void Resource::writeConfig( KConfig *config ) +void Resource::writeConfig( TDEConfig *config ) { KRES::Resource::writeConfig( config ); } diff --git a/kabc/resource.h b/kabc/resource.h index 0412a22b1..4824ffda8 100644 --- a/kabc/resource.h +++ b/kabc/resource.h @@ -118,7 +118,7 @@ class KABC_EXPORT Resource : public KRES::Resource @param config The config object where the derived classes can read out their settings. */ - Resource( const KConfig *config ); + Resource( const TDEConfig *config ); /** Destructor. @@ -157,7 +157,7 @@ class KABC_EXPORT Resource : public KRES::Resource /** Writes the resource specific config to file. */ - virtual void writeConfig( KConfig *config ); + virtual void writeConfig( TDEConfig *config ); /** Request a ticket, you have to pass through save() to diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp index b0704e393..6362d223c 100644 --- a/kabc/scripts/field.src.cpp +++ b/kabc/scripts/field.src.cpp @@ -428,13 +428,13 @@ void Field::deleteFields() void Field::saveFields( const TQString &identifier, const Field::List &fields ) { - KConfig *cfg = TDEGlobal::config(); - KConfigGroupSaver( cfg, "KABCFields" ); + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); saveFields( cfg, identifier, fields ); } -void Field::saveFields( KConfig *cfg, const TQString &identifier, +void Field::saveFields( TDEConfig *cfg, const TQString &identifier, const Field::List &fields ) { TQValueList<int> fieldIds; @@ -458,13 +458,13 @@ void Field::saveFields( KConfig *cfg, const TQString &identifier, Field::List Field::restoreFields( const TQString &identifier ) { - KConfig *cfg = TDEGlobal::config(); - KConfigGroupSaver( cfg, "KABCFields" ); + TDEConfig *cfg = TDEGlobal::config(); + TDEConfigGroupSaver( cfg, "KABCFields" ); return restoreFields( cfg, identifier ); } -Field::List Field::restoreFields( KConfig *cfg, const TQString &identifier ) +Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier ) { const TQValueList<int> fieldIds = cfg->readIntListEntry( identifier ); diff --git a/kabc/sound.h b/kabc/sound.h index 133c0facb..98dcf320b 100644 --- a/kabc/sound.h +++ b/kabc/sound.h @@ -40,10 +40,10 @@ namespace KABC { * KAudioPlayer::play( tmp.name() ); * } else if(!sound.url().isEmpty()) { * TQString tmpFile; - * if(!KIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) + * if(!TDEIO::NetAccess::download(KURL(themeURL.url()), tmpFile, NULL)) * { * KMessageBox::error(0L, - * KIO::NetAccess::lastErrorString(), + * TDEIO::NetAccess::lastErrorString(), * i18n("Failed to download sound file"), * KMessageBox::Notify * ); diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index 6b574d86f..1cf436455 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp @@ -188,7 +188,7 @@ bool StdAddressBook::automaticSave() // should get const for 4.X Addressee StdAddressBook::whoAmI() { - KConfig config( "kabcrc" ); + TDEConfig config( "kabcrc" ); config.setGroup( "General" ); return findByUid( config.readEntry( "WhoAmI" ) ); @@ -196,7 +196,7 @@ Addressee StdAddressBook::whoAmI() void StdAddressBook::setWhoAmI( const Addressee &addr ) { - KConfig config( "kabcrc" ); + TDEConfig config( "kabcrc" ); config.setGroup( "General" ); config.writeEntry( "WhoAmI", addr.uid() ); diff --git a/kate/interfaces/view.h b/kate/interfaces/view.h index 90c61d5ac..20bcdf531 100644 --- a/kate/interfaces/view.h +++ b/kate/interfaces/view.h @@ -28,7 +28,7 @@ #include <ktexteditor/codecompletioninterface.h> #include <ktexteditor/dynwordwrapinterface.h> -class KConfig; +class TDEConfig; namespace Kate { @@ -189,14 +189,14 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi public: /** - Reads session config out of the KConfig object. This also includes + Reads session config out of the TDEConfig object. This also includes the actual cursor position and the bookmarks. */ - virtual void readSessionConfig(KConfig *) { ; }; + virtual void readSessionConfig(TDEConfig *) { ; }; /** - Writes session config into the KConfig object. + Writes session config into the TDEConfig object. */ - virtual void writeSessionConfig(KConfig *) { ; }; + virtual void writeSessionConfig(TDEConfig *) { ; }; public slots: /** diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp index ef6da69c1..81b001c3c 100644 --- a/kate/part/kateconfig.cpp +++ b/kate/part/kateconfig.cpp @@ -114,7 +114,7 @@ KateDocumentConfig::KateDocumentConfig () m_pluginsSet.fill (true); // init with defaults from config or really hardcoded ones - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("Kate Document Defaults"); readConfig (config); } @@ -149,7 +149,7 @@ KateDocumentConfig::~KateDocumentConfig () { } -void KateDocumentConfig::readConfig (KConfig *config) +void KateDocumentConfig::readConfig (TDEConfig *config) { configStart (); @@ -191,7 +191,7 @@ void KateDocumentConfig::readConfig (KConfig *config) configEnd (); } -void KateDocumentConfig::writeConfig (KConfig *config) +void KateDocumentConfig::writeConfig (TDEConfig *config) { config->writeEntry("Tab Width", tabWidth()); @@ -631,7 +631,7 @@ KateViewConfig::KateViewConfig () s_global = this; // init with defaults from config or really hardcoded ones - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("Kate View Defaults"); readConfig (config); } @@ -660,7 +660,7 @@ KateViewConfig::~KateViewConfig () { } -void KateViewConfig::readConfig (KConfig *config) +void KateViewConfig::readConfig (TDEConfig *config) { configStart (); @@ -693,7 +693,7 @@ void KateViewConfig::readConfig (KConfig *config) configEnd (); } -void KateViewConfig::writeConfig (KConfig *config) +void KateViewConfig::writeConfig (TDEConfig *config) { config->writeEntry( "Dynamic Word Wrap", dynWordWrap() ); config->writeEntry( "Dynamic Word Wrap Indicators", dynWordWrapIndicators() ); @@ -1022,7 +1022,7 @@ KateRendererConfig::KateRendererConfig () s_global = this; // init with defaults from config or really hardcoded ones - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("Kate Renderer Defaults"); readConfig (config); } @@ -1054,7 +1054,7 @@ KateRendererConfig::~KateRendererConfig () delete m_font; } -void KateRendererConfig::readConfig (KConfig *config) +void KateRendererConfig::readConfig (TDEConfig *config) { configStart (); @@ -1067,7 +1067,7 @@ void KateRendererConfig::readConfig (KConfig *config) configEnd (); } -void KateRendererConfig::writeConfig (KConfig *config) +void KateRendererConfig::writeConfig (TDEConfig *config) { config->writeEntry ("Schema", KateFactory::self()->schemaManager()->name(schema())); @@ -1125,7 +1125,7 @@ void KateRendererConfig::setSchemaInternal( int schema ) m_schemaSet = true; m_schema = schema; - KConfig *config (KateFactory::self()->schemaManager()->schema(schema)); + TDEConfig *config (KateFactory::self()->schemaManager()->schema(schema)); TQColor tmp0 (TDEGlobalSettings::baseColor()); TQColor tmp1 (TDEGlobalSettings::highlightColor()); diff --git a/kate/part/kateconfig.h b/kate/part/kateconfig.h index 56d094cd0..4c1f7294a 100644 --- a/kate/part/kateconfig.h +++ b/kate/part/kateconfig.h @@ -32,7 +32,7 @@ class KateRenderer; class KateFontStruct; class KateFontMetrics; -class KConfig; +class TDEConfig; class TQFont; class TQTextCodec; @@ -115,12 +115,12 @@ class KateDocumentConfig : public KateConfig /** * Read config from object */ - void readConfig (KConfig *config); + void readConfig (TDEConfig *config); /** * Write config to object */ - void writeConfig (KConfig *config); + void writeConfig (TDEConfig *config); protected: void updateConfig (); @@ -304,12 +304,12 @@ class KateViewConfig : public KateConfig /** * Read config from object */ - void readConfig (KConfig *config); + void readConfig (TDEConfig *config); /** * Write config to object */ - void writeConfig (KConfig *config); + void writeConfig (TDEConfig *config); protected: void updateConfig (); @@ -432,12 +432,12 @@ class KateRendererConfig : public KateConfig /** * Read config from object */ - void readConfig (KConfig *config); + void readConfig (TDEConfig *config); /** * Write config to object */ - void writeConfig (KConfig *config); + void writeConfig (TDEConfig *config); protected: void updateConfig (); diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 1ae416264..aa122a7b1 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1369,7 +1369,7 @@ void KateHlConfigPage::apply () for ( TQIntDictIterator<KateHlData> it( hlDataDict ); it.current(); ++it ) KateHlManager::self()->getHl( it.currentKey() )->setData( it.current() ); - KateHlManager::self()->getKConfig()->sync (); + KateHlManager::self()->getTDEConfig()->sync (); } void KateHlConfigPage::reload () @@ -1453,20 +1453,20 @@ KateHlDownloadDialog::KateHlDownloadDialog(TQWidget *parent, const char *name, b new TQLabel(i18n("<b>Note:</b> New versions are selected automatically."), vbox); actionButton (User1)->setIconSet(SmallIconSet("ok")); - transferJob = KIO::get( + transferJob = TDEIO::get( KURL(TQString(HLDOWNLOADPATH) + TQString("update-") + TQString(KATEPART_VERSION) + TQString(".xml")), true, true ); - connect(transferJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - this, TQT_SLOT(listDataReceived(KIO::Job *, const TQByteArray &))); -// void data( KIO::Job *, const TQByteArray &data); + connect(transferJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + this, TQT_SLOT(listDataReceived(TDEIO::Job *, const TQByteArray &))); +// void data( TDEIO::Job *, const TQByteArray &data); resize(450, 400); } KateHlDownloadDialog::~KateHlDownloadDialog(){} -void KateHlDownloadDialog::listDataReceived(KIO::Job *, const TQByteArray &data) +void KateHlDownloadDialog::listDataReceived(TDEIO::Job *, const TQByteArray &data) { if (!transferJob || transferJob->isErrorPage()) { @@ -1538,7 +1538,7 @@ void KateHlDownloadDialog::slotUser1() TQString filename=src.fileName(false); TQString dest = destdir+filename; - KIO::NetAccess::download(src,dest, this); + TDEIO::NetAccess::download(src,dest, this); } } diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h index 169ffaffc..fc9fa0a1a 100644 --- a/kate/part/katedialogs.h +++ b/kate/part/katedialogs.h @@ -46,7 +46,7 @@ struct syntaxContextData; class KateDocument; class KateView; -namespace KIO +namespace TDEIO { class Job; class TransferJob; @@ -350,10 +350,10 @@ class KateHlDownloadDialog: public KDialogBase private: class TQListView *list; class TQString listData; - KIO::TransferJob *transferJob; + TDEIO::TransferJob *transferJob; private slots: - void listDataReceived(KIO::Job *, const TQByteArray &data); + void listDataReceived(TDEIO::Job *, const TQByteArray &data); public slots: void slotUser1(); diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index b264e6533..f8f190c14 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -1879,7 +1879,7 @@ void KateDocument::setDontChangeHlOnSave() //END //BEGIN KTextEditor::ConfigInterface stuff -void KateDocument::readConfig(KConfig *config) +void KateDocument::readConfig(TDEConfig *config) { config->setGroup("Kate Document Defaults"); @@ -1895,7 +1895,7 @@ void KateDocument::readConfig(KConfig *config) KateRendererConfig::global()->readConfig (config); } -void KateDocument::writeConfig(KConfig *config) +void KateDocument::writeConfig(TDEConfig *config) { config->setGroup("Kate Document Defaults"); @@ -1913,18 +1913,18 @@ void KateDocument::writeConfig(KConfig *config) void KateDocument::readConfig() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); readConfig (config); } void KateDocument::writeConfig() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); writeConfig (config); config->sync(); } -void KateDocument::readSessionConfig(KConfig *kconfig) +void KateDocument::readSessionConfig(TDEConfig *kconfig) { // restore the url KURL url (kconfig->readEntry("URL")); @@ -1953,7 +1953,7 @@ void KateDocument::readSessionConfig(KConfig *kconfig) addMark( marks[i], KateDocument::markType01 ); } -void KateDocument::writeSessionConfig(KConfig *kconfig) +void KateDocument::writeSessionConfig(TDEConfig *kconfig) { if ( m_url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", m_url.path()).startsWith("/")) return; @@ -2302,14 +2302,14 @@ bool KateDocument::openURL( const KURL &url ) m_tempFile = new KTempFile (); m_file = m_tempFile->name(); - m_job = KIO::get ( url, false, isProgressInfoEnabled() ); + m_job = TDEIO::get ( url, false, isProgressInfoEnabled() ); // connect to slots - connect( m_job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - TQT_SLOT( slotDataKate( KIO::Job*, const TQByteArray& ) ) ); + connect( m_job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + TQT_SLOT( slotDataKate( TDEIO::Job*, const TQByteArray& ) ) ); - connect( m_job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinishedKate( KIO::Job* ) ) ); + connect( m_job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinishedKate( TDEIO::Job* ) ) ); TQWidget *w = widget (); if (!w && !m_views.isEmpty ()) @@ -2324,7 +2324,7 @@ bool KateDocument::openURL( const KURL &url ) } } -void KateDocument::slotDataKate ( KIO::Job *, const TQByteArray &data ) +void KateDocument::slotDataKate ( TDEIO::Job *, const TQByteArray &data ) { // kdDebug(13020) << "KateDocument::slotData" << endl; @@ -2334,7 +2334,7 @@ void KateDocument::slotDataKate ( KIO::Job *, const TQByteArray &data ) m_tempFile->file()->writeBlock (data); } -void KateDocument::slotFinishedKate ( KIO::Job * job ) +void KateDocument::slotFinishedKate ( TDEIO::Job * job ) { // kdDebug(13020) << "KateDocument::slotJobFinished" << endl; @@ -2373,7 +2373,7 @@ bool KateDocument::openFile() return openFile (0); } -bool KateDocument::openFile(KIO::Job * job) +bool KateDocument::openFile(TDEIO::Job * job) { m_loading = true; // add new m_file to dirwatch @@ -2520,8 +2520,8 @@ bool KateDocument::save() // get the right permissions, start with safe default mode_t perms = 0600; - KIO::UDSEntry fentry; - if (KIO::NetAccess::stat (url(), fentry, kapp->mainWidget())) + TDEIO::UDSEntry fentry; + if (TDEIO::NetAccess::stat (url(), fentry, kapp->mainWidget())) { kdDebug () << "stating succesfull: " << url() << endl; KFileItem item (fentry, url()); @@ -2530,8 +2530,8 @@ bool KateDocument::save() // first del existing file if any, than copy over the file we have // failure if a: the existing file could not be deleted, b: the file could not be copied - if ( (!KIO::NetAccess::exists( u, false, kapp->mainWidget() ) || KIO::NetAccess::del( u, kapp->mainWidget() )) - && KIO::NetAccess::file_copy( url(), u, perms, true, false, kapp->mainWidget() ) ) + if ( (!TDEIO::NetAccess::exists( u, false, kapp->mainWidget() ) || TDEIO::NetAccess::del( u, kapp->mainWidget() )) + && TDEIO::NetAccess::file_copy( url(), u, perms, true, false, kapp->mainWidget() ) ) { kdDebug(13020)<<"backing up successfull ("<<url().prettyURL()<<" -> "<<u.prettyURL()<<")"<<endl; } diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h index d967a25ab..fec6983e4 100644 --- a/kate/part/katedocument.h +++ b/kate/part/katedocument.h @@ -46,7 +46,7 @@ namespace KTextEditor { class Plugin; } -namespace KIO { class TransferJob; } +namespace TDEIO { class TransferJob; } class KateUndoGroup; class KateCmd; @@ -439,10 +439,10 @@ class KateDocument : public Kate::Document, public slots: void readConfig (); void writeConfig (); - void readConfig (KConfig *); - void writeConfig (KConfig *); - void readSessionConfig (KConfig *); - void writeSessionConfig (KConfig *); + void readConfig (TDEConfig *); + void writeConfig (TDEConfig *); + void readSessionConfig (TDEConfig *); + void writeSessionConfig (TDEConfig *); void configDialog (); // @@ -555,7 +555,7 @@ class KateDocument : public Kate::Document, /* Anders: Reimplemented to do kate specific stuff */ bool saveAs( const KURL &url ); - bool openFile (KIO::Job * job); + bool openFile (TDEIO::Job * job); bool openFile (); bool saveFile (); @@ -565,8 +565,8 @@ class KateDocument : public Kate::Document, void setModified( bool m ); private slots: - void slotDataKate ( KIO::Job* kio_job, const TQByteArray &data ); - void slotFinishedKate ( KIO::Job * job ); + void slotDataKate ( TDEIO::Job* kio_job, const TQByteArray &data ); + void slotFinishedKate ( TDEIO::Job * job ); private: void abortLoadKate(); @@ -1004,7 +1004,7 @@ class KateDocument : public Kate::Document, static TQRegExp kvLineMime; static TQRegExp kvVar; - KIO::TransferJob *m_job; + TDEIO::TransferJob *m_job; KTempFile *m_tempFile; // TemplateInterface diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index 11d5e9a46..a00d39bfb 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -72,7 +72,7 @@ KateFileTypeManager::~KateFileTypeManager () // void KateFileTypeManager::update () { - KConfig config ("katefiletyperc", false, false); + TDEConfig config ("katefiletyperc", false, false); TQStringList g (config.groupList()); g.sort (); @@ -101,7 +101,7 @@ void KateFileTypeManager::update () // void KateFileTypeManager::save (TQPtrList<KateFileType> *v) { - KConfig config ("katefiletyperc", false, false); + TDEConfig config ("katefiletyperc", false, false); TQStringList newg; for (uint z=0; z < v->count(); z++) diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index ca1276a6b..08da7e97f 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -1599,7 +1599,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine, void KateHighlighting::loadWildcards() { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName); TQString extensionString = config->readEntry("Wildcards", iWildcards); @@ -1636,7 +1636,7 @@ TQStringList& KateHighlighting::getPlainExtensions() TQString KateHighlighting::getMimetypes() { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName); return config->readEntry("Mimetypes", iMimetypes); @@ -1644,7 +1644,7 @@ TQString KateHighlighting::getMimetypes() int KateHighlighting::priority() { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName); return config->readNumEntry("Priority", m_priority); @@ -1652,7 +1652,7 @@ int KateHighlighting::priority() KateHlData *KateHighlighting::getData() { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName); KateHlData *hlData = new KateHlData( @@ -1666,7 +1666,7 @@ KateHlData *KateHighlighting::getData() void KateHighlighting::setData(KateHlData *hlData) { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName); config->writeEntry("Wildcards",hlData->wildcards); @@ -1676,7 +1676,7 @@ void KateHighlighting::setData(KateHlData *hlData) void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &list) { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName + " - Schema " + KateFactory::self()->schemaManager()->name(schema)); list.clear(); @@ -1729,7 +1729,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l */ void KateHighlighting::setKateHlItemDataList(uint schema, KateHlItemDataList &list) { - KConfig *config = KateHlManager::self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->getTDEConfig(); config->setGroup("Highlighting " + iName + " - Schema " + KateFactory::self()->schemaManager()->name(schema)); @@ -3264,7 +3264,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list) error->setSelectedTextColor(Qt::red); list.append(error); - KConfig *config = KateHlManager::self()->self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->self()->getTDEConfig(); config->setGroup("Default Item Styles - Schema " + KateFactory::self()->schemaManager()->name(schema)); for (uint z = 0; z < defaultStyles(); z++) @@ -3317,7 +3317,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list) void KateHlManager::setDefaults(uint schema, KateAttributeList &list) { - KConfig *config = KateHlManager::self()->self()->getKConfig(); + TDEConfig *config = KateHlManager::self()->self()->getTDEConfig(); config->setGroup("Default Item Styles - Schema " + KateFactory::self()->schemaManager()->name(schema)); for (uint z = 0; z < defaultStyles(); z++) diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h index e312e4a01..1b71e454a 100644 --- a/kate/part/katehighlight.h +++ b/kate/part/katehighlight.h @@ -350,7 +350,7 @@ class KateHlManager : public TQObject static KateHlManager *self(); - inline KConfig *getKConfig() { return &m_config; }; + inline TDEConfig *getTDEConfig() { return &m_config; }; KateHighlighting *getHl(int n); int nameFind(const TQString &name); @@ -396,7 +396,7 @@ class KateHlManager : public TQObject static KateHlManager *s_self; - KConfig m_config; + TDEConfig m_config; TQStringList commonSuffixes; KateSyntaxDocument *syntax; diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index d33f26947..b7703ccdf 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -642,7 +642,7 @@ void KateJScriptManager::collectScripts (bool force) return; // We'll store the scripts list in this config - KConfig config("katepartjscriptrc", false, false); + TDEConfig config("katepartjscriptrc", false, false); // figure out if the kate install is too new config.setGroup ("General"); @@ -685,7 +685,7 @@ void KateJScriptManager::collectScripts (bool force) if (dfi.exists()) { - KConfig df (desktopFile, true, false); + TDEConfig df (desktopFile, true, false); df.setDesktopGroup (); // get cmdname, fallback to baseName, if it is empty, therefor not use the kconfig fallback @@ -778,7 +778,7 @@ bool KateJScriptManager::help( Kate::View *, const TQString &cmd, TQString &msg if (!m_scripts[cmd] || !m_scripts[cmd]->desktopFileExists) return false; - KConfig df (m_scripts[cmd]->desktopFilename(), true, false); + TDEConfig df (m_scripts[cmd]->desktopFilename(), true, false); df.setDesktopGroup (); msg = df.readEntry ("X-Kate-Help"); @@ -1016,7 +1016,7 @@ void KateIndentJScriptManager::collectScripts (bool force) // We'll store the scripts list in this config - KConfig config("katepartindentjscriptrc", false, false); + TDEConfig config("katepartindentjscriptrc", false, false); #if 0 // figure out if the kate install is too new config.setGroup ("General"); diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp index 178831f69..c06f3864e 100644 --- a/kate/part/kateluaindentscript.cpp +++ b/kate/part/kateluaindentscript.cpp @@ -371,7 +371,7 @@ void KateLUAIndentScriptManager::collectScripts (bool force) <<"================================================="<<endl; // We'll store the scripts list in this config - KConfig config("katepartluaindentscriptrc", false, false); + TDEConfig config("katepartluaindentscriptrc", false, false); #if 0 // figure out if the kate install is too new config.setGroup ("General"); diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index bb3aa2866..fa8b21f64 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -194,7 +194,7 @@ void KateSchemaManager::update (bool readfromfile) // get the right group // special handling of the default schemas ;) // -KConfig *KateSchemaManager::schema (uint number) +TDEConfig *KateSchemaManager::schema (uint number) { if ((number>1) && (number < m_schemas.count())) m_config.setGroup (m_schemas[number]); @@ -440,7 +440,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema ) mark[6] = Qt::red; SchemaColors c; - KConfig *config = KateFactory::self()->schemaManager()->schema(newSchema); + TDEConfig *config = KateFactory::self()->schemaManager()->schema(newSchema); c.back= config->readColorEntry("Color Background", &tmp0); c.selected = config->readColorEntry("Color Selection", &tmp1); @@ -493,7 +493,7 @@ void KateSchemaConfigColorTab::apply () for ( it = m_schemas.begin(); it != m_schemas.end(); ++it ) { kdDebug(13030)<<"APPLY scheme = "<<it.key()<<endl; - KConfig *config = KateFactory::self()->schemaManager()->schema( it.key() ); + TDEConfig *config = KateFactory::self()->schemaManager()->schema( it.key() ); kdDebug(13030)<<"Using config group "<<config->group()<<endl; SchemaColors c = it.data(); @@ -759,7 +759,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) // Set listview colors // We do that now, because we can now get the "normal text" color. - // TODO this reads of the KConfig object, which should be changed when + // TODO this reads of the TDEConfig object, which should be changed when // the color tab is fixed. TQPalette p ( m_styles->palette() ); TQColor _c ( TDEGlobalSettings::baseColor() ); @@ -905,7 +905,7 @@ void KateSchemaConfigPage::apply() KateRendererConfig::global()->reloadSchema(); // sync the hl config for real - KateHlManager::self()->getKConfig()->sync (); + KateHlManager::self()->getTDEConfig()->sync (); } void KateSchemaConfigPage::reload() diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h index 566b6ea27..f6eb8ef60 100644 --- a/kate/part/kateschema.h +++ b/kate/part/kateschema.h @@ -55,7 +55,7 @@ class KateSchemaManager /** * return kconfig with right group set or set to Normal if not there */ - KConfig *schema (uint number); + TDEConfig *schema (uint number); void addSchema (const TQString &t); @@ -85,7 +85,7 @@ class KateSchemaManager static TQString printingSchema (); private: - KConfig m_config; + TDEConfig m_config; TQStringList m_schemas; }; @@ -216,7 +216,7 @@ class KateSchemaConfigFontTab : public TQWidget ~KateSchemaConfigFontTab(); public: - void readConfig (KConfig *config); + void readConfig (TDEConfig *config); public slots: void apply(); diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp index 34f44bf66..4093f8722 100644 --- a/kate/part/katesyntaxdocument.cpp +++ b/kate/part/katesyntaxdocument.cpp @@ -335,7 +335,7 @@ void KateSyntaxDocument::setupModeList (bool force) return; // We'll store the ModeList in katesyntaxhighlightingrc - KConfig config("katesyntaxhighlightingrc", false, false); + TDEConfig config("katesyntaxhighlightingrc", false, false); // figure our if the kate install is too new config.setGroup ("General"); diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 50f186c8c..ca457acaa 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -930,12 +930,12 @@ void KateView::joinLines() m_doc->joinLines( first, last ); } -void KateView::readSessionConfig(KConfig *config) +void KateView::readSessionConfig(TDEConfig *config) { setCursorPositionInternal (config->readNumEntry("CursorLine"), config->readNumEntry("CursorColumn"), 1); } -void KateView::writeSessionConfig(KConfig *config) +void KateView::writeSessionConfig(TDEConfig *config) { config->writeEntry("CursorLine",m_viewInternal->cursor.line()); config->writeEntry("CursorColumn",m_viewInternal->cursor.col()); @@ -1839,7 +1839,7 @@ void KateView::exportAsHTML () if ( url.isLocalFile() ) return; - KIO::NetAccess::upload( filename, url, 0 ); + TDEIO::NetAccess::upload( filename, url, 0 ); } //END diff --git a/kate/part/kateview.h b/kate/part/kateview.h index aa428096d..f4ec54801 100644 --- a/kate/part/kateview.h +++ b/kate/part/kateview.h @@ -370,8 +370,8 @@ class KateView : public Kate::View, // config file / session management functions public: - void readSessionConfig(KConfig *); - void writeSessionConfig(KConfig *); + void readSessionConfig(TDEConfig *); + void writeSessionConfig(TDEConfig *); public slots: int getEol(); diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index a7a88b945..eca6716c4 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -1151,7 +1151,7 @@ void KateIconBorder::showMarkMenu( uint line, const TQPoint& pos ) { KateViewConfig::global()->setDefaultMarkType (vec[result-100]); // flush config, otherwise it isn't nessecarily done - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("Kate View Defaults"); KateViewConfig::global()->writeConfig( config ); } diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index c996b216e..109a3c8b1 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -650,7 +650,7 @@ int main(int argc, char *argv[]) RegressionTest *RegressionTest::curr = 0; -RegressionTest::RegressionTest(KateDocument *part, KConfig *baseConfig, +RegressionTest::RegressionTest(KateDocument *part, TDEConfig *baseConfig, const TQString &baseDir, const TQString &outputDir, bool _genOutput) : TQObject(part) @@ -723,14 +723,14 @@ RegressionTest::~RegressionTest() delete m_failureSave; } -void RegressionTest::setFailureSnapshotConfig(KConfig *cfg, const TQString &sname) +void RegressionTest::setFailureSnapshotConfig(TDEConfig *cfg, const TQString &sname) { Q_ASSERT(cfg); m_failureComp = cfg; m_failureComp->setGroup(sname); } -void RegressionTest::setFailureSnapshotSaver(KConfig *cfg, const TQString &sname) +void RegressionTest::setFailureSnapshotSaver(TDEConfig *cfg, const TQString &sname) { Q_ASSERT(cfg); m_failureSave = cfg; diff --git a/kate/part/test_regression.h b/kate/part/test_regression.h index 0bc717714..2128ce25d 100644 --- a/kate/part/test_regression.h +++ b/kate/part/test_regression.h @@ -165,7 +165,7 @@ class RegressionTest : public TQObject Q_OBJECT public: - RegressionTest(KateDocument *part, KConfig *baseConfig, + RegressionTest(KateDocument *part, TDEConfig *baseConfig, const TQString &baseDir, const TQString &outputDir, bool _genOutput); ~RegressionTest(); @@ -181,21 +181,21 @@ public: void rereadConfig(); static void createMissingDirs(const TQString &path); - void setFailureSnapshotConfig(KConfig *cfg, const TQString &snapshotname); - void setFailureSnapshotSaver(KConfig *cfg, const TQString &snapshotname); + void setFailureSnapshotConfig(TDEConfig *cfg, const TQString &snapshotname); + void setFailureSnapshotSaver(TDEConfig *cfg, const TQString &snapshotname); void createLink( const TQString& test, int failures ); void doFailureReport( const TQString& test, int failures ); KateDocument *m_part; KateView *m_view; - KConfig *m_baseConfig; + TDEConfig *m_baseConfig; TQString m_baseDir; TQString m_outputDir; bool m_genOutput; TQString m_currentBase; - KConfig *m_failureComp; - KConfig *m_failureSave; + TDEConfig *m_failureComp; + TDEConfig *m_failureSave; TQString m_currentOutput; TQString m_currentCategory; diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index a0e61f3d0..2a7a6de45 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -199,7 +199,7 @@ void ABGlobal::readConfig() m_ents = new ABEntityList; else m_ents->clear(); - KConfig *config = new KConfig("ktexteditor_autobookmarkerrc"); + TDEConfig *config = new TDEConfig("ktexteditor_autobookmarkerrc"); uint n( 0 ); while ( config->hasGroup( TQString("autobookmark%1").arg( n ) ) ) @@ -225,7 +225,7 @@ void ABGlobal::readConfig() void ABGlobal::writeConfig() { - KConfig *config = new KConfig("ktexteditor_autobookmarkerrc"); + TDEConfig *config = new TDEConfig("ktexteditor_autobookmarkerrc"); // clean the config object TQStringList l = config->groupList(); diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index 6a350831f..082c0ffc9 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -103,12 +103,12 @@ void InsertFilePluginView::slotInsertFile() KURL destURL; destURL.setPath( _tmpfile ); - _job = KIO::file_copy( _file, destURL, 0600, true, false, true ); - connect( _job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished ( KIO::Job * ) ) ); + _job = TDEIO::file_copy( _file, destURL, 0600, true, false, true ); + connect( _job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotFinished ( TDEIO::Job * ) ) ); } } -void InsertFilePluginView::slotFinished( KIO::Job *job ) +void InsertFilePluginView::slotFinished( TDEIO::Job *job ) { assert( job == _job ); _job = 0; diff --git a/kate/plugins/insertfile/insertfileplugin.h b/kate/plugins/insertfile/insertfileplugin.h index 9331f8100..d6751f0d1 100644 --- a/kate/plugins/insertfile/insertfileplugin.h +++ b/kate/plugins/insertfile/insertfileplugin.h @@ -58,13 +58,13 @@ class InsertFilePluginView : public TQObject, public KXMLGUIClient /* display a file dialog, and insert the chosen file */ void slotInsertFile(); private slots: - void slotFinished( KIO::Job *job ); - //slotAborted( KIO::Job *job ); + void slotFinished( TDEIO::Job *job ); + //slotAborted( TDEIO::Job *job ); private: void insertFile(); KURL _file; TQString _tmpfile; - KIO::FileCopyJob *_job; + TDEIO::FileCopyJob *_job; }; #endif // _INSERT_FILE_PLUGIN_H_ diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index 249abf9f2..27d0b138d 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -170,12 +170,12 @@ void ISearchPluginView::setView( KTextEditor::View* view ) void ISearchPluginView::readConfig() { - // KConfig* config = instance()->config(); + // TDEConfig* config = instance()->config(); } void ISearchPluginView::writeConfig() { - // KConfig* config = instance()->config(); + // TDEConfig* config = instance()->config(); } void ISearchPluginView::setCaseSensitive( bool caseSensitive ) diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index 37da55224..2c2bbcb23 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -68,7 +68,7 @@ DocWordCompletionPlugin::DocWordCompletionPlugin( TQObject *parent, void DocWordCompletionPlugin::readConfig() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup( "DocWordCompletion Plugin" ); m_treshold = config->readNumEntry( "treshold", 3 ); m_autopopup = config->readBoolEntry( "autopopup", true ); @@ -76,7 +76,7 @@ void DocWordCompletionPlugin::readConfig() void DocWordCompletionPlugin::writeConfig() { - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); config->setGroup("DocWordCompletion Plugin"); config->writeEntry("autopopup", m_autopopup ); config->writeEntry("treshold", m_treshold ); diff --git a/kcert/kcertpart.cc b/kcert/kcertpart.cc index 5b31c8166..ca5912206 100644 --- a/kcert/kcertpart.cc +++ b/kcert/kcertpart.cc @@ -740,7 +740,7 @@ void KCertPart::slotImport() { if (!_silentImport) KMessageBox::information(_frame, i18n("Certificate has been successfully imported into TDE.\nYou can manage your certificate settings from the TDE Control Center."), i18n("Certificate Import")); } else if (_ca) { - KConfig cfg("ksslcalist", true, false); + TDEConfig cfg("ksslcalist", true, false); if (cfg.hasGroup(_ca->getSubject())) { TQString msg = _curName + "\n" + i18n("A certificate with that name already exists. Are you sure that you wish to replace it?"); int rc= KMessageBox::warningContinueCancel(_frame, msg, i18n("Certificate Import"),i18n("Replace")); diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp index 2ef0ac781..5d71fbaa7 100644 --- a/kcmshell/main.cpp +++ b/kcmshell/main.cpp @@ -106,7 +106,7 @@ static KService::Ptr locateModule(const TQCString& module) if ( module.left( 4 ) != "kde-" && service->library().isEmpty() ) return locateModule( "kde-" + module ); - if(!KCModuleLoader::testModule( module )) + if(!TDECModuleLoader::testModule( module )) { kdDebug(780) << "According to \"" << module << "\"'s test function, it should Not be loaded." << endl; return 0; @@ -301,7 +301,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[]) id = args->getOption( "embed-proxy" ).toInt(&idValid); if( idValid ) { - KCModuleProxy *module = new KCModuleProxy( modules.first()->desktopEntryName() ); + TDECModuleProxy *module = new TDECModuleProxy( modules.first()->desktopEntryName() ); module->realModule(); QXEmbed::embedClientIntoWindow( module, id); app.exec(); @@ -318,7 +318,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[]) i18n("Configure - %1").arg(kapp->caption()), 0, "", true ); for (KService::List::ConstIterator it = modules.begin(); it != modules.end(); ++it) - dlg->addModule(KCModuleInfo(*it)); + dlg->addModule(TDECModuleInfo(*it)); if ( args->isSet( "embed" )) { @@ -339,7 +339,7 @@ extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[]) if (kapp->iconName() != kapp->name()) setIcon(dlg, kapp->iconName()); else if ( modules.count() == 1 ) - setIcon(dlg, KCModuleInfo( modules.first()).icon()); + setIcon(dlg, TDECModuleInfo( modules.first()).icon()); dlg->exec(); delete dlg; diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp index 15a963678..daf66ca9b 100644 --- a/kconf_update/kconf_update.cpp +++ b/kconf_update/kconf_update.cpp @@ -73,11 +73,11 @@ public: void gotScriptArguments(const TQString &_arguments); void resetOptions(); - void copyGroup(KConfigBase *cfg1, const TQString &grp1, - KConfigBase *cfg2, const TQString &grp2); + void copyGroup(TDEConfigBase *cfg1, const TQString &grp1, + TDEConfigBase *cfg2, const TQString &grp2); protected: - KConfig *config; + TDEConfig *config; TQString currentFilename; bool skip; bool debug; @@ -86,9 +86,9 @@ protected: TQString oldFile; TQString newFile; TQString newFileName; - KConfig *oldConfig1; // Config to read keys from. - KConfig *oldConfig2; // Config to delete keys from. - KConfig *newConfig; + TDEConfig *oldConfig1; // Config to read keys from. + TDEConfig *oldConfig2; // Config to delete keys from. + TDEConfig *newConfig; TQString oldGroup; TQString newGroup; @@ -113,7 +113,7 @@ KonfUpdate::KonfUpdate() oldConfig2 = 0; newConfig = 0; - config = new KConfig("kconf_updaterc"); + config = new TDEConfig("kconf_updaterc"); TQStringList updateFiles; TDECmdLineArgs *args=TDECmdLineArgs::parsedArgs(); @@ -501,7 +501,7 @@ void KonfUpdate::gotFile(const TQString &_file) if (!oldFile.isEmpty()) { - oldConfig2 = new KConfig(oldFile, false, false); + oldConfig2 = new TDEConfig(oldFile, false, false); TQString cfg_id = currentFilename + ":" + id; oldConfig2->setGroup("$Version"); TQStringList ids = oldConfig2->readListEntry("update_info"); @@ -514,7 +514,7 @@ void KonfUpdate::gotFile(const TQString &_file) if (!newFile.isEmpty()) { - newConfig = new KConfig(newFile, false, false); + newConfig = new TDEConfig(newFile, false, false); newConfig->setGroup("$Version"); ids = newConfig->readListEntry("update_info"); if (ids.contains(cfg_id)) @@ -528,7 +528,7 @@ void KonfUpdate::gotFile(const TQString &_file) newConfig = oldConfig2; } - oldConfig1 = new KConfig(oldFile, true, false); + oldConfig1 = new TDEConfig(oldFile, true, false); } else { @@ -703,8 +703,8 @@ void KonfUpdate::gotOptions(const TQString &_options) } } -void KonfUpdate::copyGroup(KConfigBase *cfg1, const TQString &grp1, - KConfigBase *cfg2, const TQString &grp2) +void KonfUpdate::copyGroup(TDEConfigBase *cfg1, const TQString &grp1, + TDEConfigBase *cfg2, const TQString &grp2) { cfg1->setGroup(grp1); cfg2->setGroup(grp2); @@ -905,10 +905,10 @@ void KonfUpdate::gotScript(const TQString &_script) // Merging in new entries. m_bCopy = true; { - KConfig *saveOldConfig1 = oldConfig1; + TDEConfig *saveOldConfig1 = oldConfig1; TQString saveOldGroup = oldGroup; TQString saveNewGroup = newGroup; - oldConfig1 = new KConfig(tmp2.name(), true, false); + oldConfig1 = new TDEConfig(tmp2.name(), true, false); // For all groups... TQStringList grpList = oldConfig1->groupList(); diff --git a/kded/kded.cpp b/kded/kded.cpp index efbde0011..d06c44c38 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -155,7 +155,7 @@ bool Kded::process(const TQCString &obj, const TQCString &fun, void Kded::initModules() { m_dontLoad.clear(); - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); bool kde_running = !( getenv( "TDE_FULL_SESSION" ) == NULL || getenv( "TDE_FULL_SESSION" )[ 0 ] == '\0' ); // not the same user like the one running the session (most likely we're run via sudo or something) if( getenv( "TDE_SESSION_UID" ) != NULL && uid_t( atoi( getenv( "TDE_SESSION_UID" ))) != getuid()) @@ -225,7 +225,7 @@ void Kded::initModules() void Kded::loadSecondPhase() { kdDebug(7020) << "Loading second phase autoload" << endl; - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); KService::List kdedModules = KServiceType::offers("KDEDModule"); for(KService::List::ConstIterator it = kdedModules.begin(); it != kdedModules.end(); ++it) { @@ -905,7 +905,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) } TDEInstance *instance = new TDEInstance(&aboutData); - KConfig *config = instance->config(); // Enable translations. + TDEConfig *config = instance->config(); // Enable translations. if (args->isSet("check")) { diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets index 8ca72586d..0a4bf6229 100644 --- a/kdewidgets/kde.widgets +++ b/kdewidgets/kde.widgets @@ -26,7 +26,7 @@ Group=Graphics (KDE) ToolTip=Combo Box (KDE) Group=Input (KDE) -[KCModule] +[TDECModule] ToolTip=KControl Center Module (KDE) IsContainer=true Group=Container (KDE) diff --git a/kdewidgets/makekdewidgets.cpp b/kdewidgets/makekdewidgets.cpp index bec6988b3..8e2856c53 100644 --- a/kdewidgets/makekdewidgets.cpp +++ b/kdewidgets/makekdewidgets.cpp @@ -117,11 +117,11 @@ static KCmdLineOptions options[] = KCmdLineLastOption }; -static TQString buildWidgetDef( const TQString &name, KConfig &input, const TQString &group ); -static TQString buildWidgetCreate( const TQString &name, KConfig &input ); -static TQString buildWidgetInclude( const TQString &name, KConfig &input ); +static TQString buildWidgetDef( const TQString &name, TDEConfig &input, const TQString &group ); +static TQString buildWidgetCreate( const TQString &name, TDEConfig &input ); +static TQString buildWidgetInclude( const TQString &name, TDEConfig &input ); static void buildFile( TQTextStream &stream, const TQString& group, const TQString& fileName, const TQString& pluginName, const TQString& iconPath ); -static TQString buildPixmap( const TQString &name, KConfig &input, const TQString &iconPath ); +static TQString buildPixmap( const TQString &name, TDEConfig &input, const TQString &iconPath ); int main( int argc, char **argv ) { new TDEInstance( "makekdewidgets" ); @@ -160,7 +160,7 @@ int main( int argc, char **argv ) { } void buildFile( TQTextStream &ts, const TQString& group, const TQString& fileName, const TQString& pluginName, const TQString& iconPath ) { - KConfig input( fileName, true, false ); + TDEConfig input( fileName, true, false ); input.setGroup( "Global" ); TQMap<TQString, TQString> MainMap; MainMap.insert( "PluginName", input.readEntry( "PluginName", pluginName ) ); @@ -195,7 +195,7 @@ void buildFile( TQTextStream &ts, const TQString& group, const TQString& fileNam } -TQString buildWidgetDef( const TQString &name, KConfig &input, const TQString &group ) { +TQString buildWidgetDef( const TQString &name, TDEConfig &input, const TQString &group ) { input.setGroup( name ); TQMap<TQString, TQString> defMap; defMap.insert( "Group", input.readEntry( "Group", group ).replace( "\"", "\\\"" ) ); @@ -209,7 +209,7 @@ TQString buildWidgetDef( const TQString &name, KConfig &input, const TQString &g return KMacroExpander::expandMacros( widgetDef, defMap ); } -TQString buildWidgetCreate( const TQString &name, KConfig &input ) { +TQString buildWidgetCreate( const TQString &name, TDEConfig &input ) { input.setGroup( name ); TQMap<TQString, TQString> createMap; createMap.insert( "ImplClass", input.readEntry( "ImplClass", name ) ); @@ -218,12 +218,12 @@ TQString buildWidgetCreate( const TQString &name, KConfig &input ) { return KMacroExpander::expandMacros( widgetCreate, createMap ); } -TQString buildWidgetInclude( const TQString &name, KConfig &input ) { +TQString buildWidgetInclude( const TQString &name, TDEConfig &input ) { input.setGroup( name ); return "#include <" + input.readEntry( "IncludeFile", name.lower() + ".h" ) + ">"; } -TQString buildPixmap( const TQString &name, KConfig &input, const TQString &iconPath ) { +TQString buildPixmap( const TQString &name, TDEConfig &input, const TQString &iconPath ) { input.setGroup( name ); TQString cleanName = name.lower().replace( ":", "_" ); TQString iconName = input.readEntry( "IconSet", cleanName + ".png" ); diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets index d375f0add..ed320bc64 100644 --- a/kdewidgets/tests/test.widgets +++ b/kdewidgets/tests/test.widgets @@ -26,7 +26,7 @@ Group=Graphics (KDE) ToolTip=Combo Box (KDE) Group=Input (KDE) -[KCModule] +[TDECModule] ToolTip=KControl Center Module (KDE) IsContainer=true Group=Container (KDE) diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp index dda8fa324..19712f826 100644 --- a/kdoctools/kio_help.cpp +++ b/kdoctools/kio_help.cpp @@ -35,7 +35,7 @@ #include <libxslt/transform.h> #include "xslt.h" -using namespace KIO; +using namespace TDEIO; TQString HelpProtocol::langLookup(const TQString& fname) { @@ -169,7 +169,7 @@ void HelpProtocol::get( const KURL& url ) if (doc.isEmpty()) { - error( KIO::ERR_DOES_NOT_EXIST, url.url() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.url() ); return; } @@ -345,24 +345,24 @@ void HelpProtocol::get_file( const KURL& url ) struct stat buff; if ( ::stat( _path.data(), &buff ) == -1 ) { if ( errno == EACCES ) - error( KIO::ERR_ACCESS_DENIED, url.path() ); + error( TDEIO::ERR_ACCESS_DENIED, url.path() ); else - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } if ( S_ISDIR( buff.st_mode ) ) { - error( KIO::ERR_IS_DIRECTORY, url.path() ); + error( TDEIO::ERR_IS_DIRECTORY, url.path() ); return; } if ( S_ISFIFO( buff.st_mode ) || S_ISSOCK ( buff.st_mode ) ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); return; } int fd = open( _path.data(), O_RDONLY); if ( fd < 0 ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); return; } @@ -379,7 +379,7 @@ void HelpProtocol::get_file( const KURL& url ) { if (errno == EINTR) continue; - error( KIO::ERR_COULD_NOT_READ, url.path()); + error( TDEIO::ERR_COULD_NOT_READ, url.path()); close(fd); return; } diff --git a/kdoctools/kio_help.h b/kdoctools/kio_help.h index 13c198af1..957a0e2e5 100644 --- a/kdoctools/kio_help.h +++ b/kdoctools/kio_help.h @@ -18,7 +18,7 @@ #include <kio/global.h> #include <kio/slavebase.h> -class HelpProtocol : public KIO::SlaveBase +class HelpProtocol : public TDEIO::SlaveBase { public: diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index 6559a2b9e..3f4a8cd26 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -2076,7 +2076,7 @@ static TQColor colorForCSSValue( int css_value ) else if ( css_value == CSS_VAL_INFOTEXT ) return TQToolTip::palette().inactive().foreground(); else if ( css_value == CSS_VAL_BACKGROUND ) { - KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support + TDEConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support bckgrConfig.setGroup("Desktop0"); // Desktop background. return bckgrConfig.readColorEntry("Color1", &tqApp->palette().disabled().background()); @@ -2089,7 +2089,7 @@ static TQColor colorForCSSValue( int css_value ) TQColor c = pal.color( uicol->group, uicol->role ); #ifndef APPLE_CHANGES if ( uicol->configEntry ) { - KConfig *globalConfig = TDEGlobal::config(); + TDEConfig *globalConfig = TDEGlobal::config(); globalConfig->setGroup( uicol->configGroup ); c = globalConfig->readColorEntry( uicol->configEntry, &c ); } diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp index 674a3f3c6..73a55cf94 100644 --- a/khtml/ecma/kjs_debugwin.cpp +++ b/khtml/ecma/kjs_debugwin.cpp @@ -860,8 +860,8 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch } if (dontShowAgain) { - KConfig *config = kapp->config(); - KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings")); + TDEConfig *config = kapp->config(); + TDEConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings")); config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0)); config->sync(); TQByteArray data; diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp index 426c68343..9bd99ada7 100644 --- a/khtml/ecma/kjs_navigator.cpp +++ b/khtml/ecma/kjs_navigator.cpp @@ -306,7 +306,7 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo) continue; } // read configuration - KConfig kc( locate ("data", pluginsinfo.toString()) ); + TDEConfig kc( locate ("data", pluginsinfo.toString()) ); unsigned num = (unsigned int) kc.readNumEntry("number"); for ( unsigned n = 0; n < num; n++ ) { kc.setGroup( TQString::number(n) ); diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp index 08ba07519..8a8a86c16 100644 --- a/khtml/ecma/xmlhttprequest.cpp +++ b/khtml/ecma/xmlhttprequest.cpp @@ -42,7 +42,7 @@ #include "KWQLoader.h" #else #include <kio/netaccess.h> -using KIO::NetAccess; +using TDEIO::NetAccess; #endif #define BANNED_HTTP_HEADERS "authorization,proxy-authorization,"\ @@ -81,23 +81,23 @@ XMLHttpRequestQObject::XMLHttpRequestQObject(XMLHttpRequest *_jsObject) } #ifdef APPLE_CHANGES -void XMLHttpRequestQObject::slotData( KIO::Job* job, const char *data, int size ) +void XMLHttpRequestQObject::slotData( TDEIO::Job* job, const char *data, int size ) { jsObject->slotData(job, data, size); } #else -void XMLHttpRequestQObject::slotData( KIO::Job* job, const TQByteArray &data ) +void XMLHttpRequestQObject::slotData( TDEIO::Job* job, const TQByteArray &data ) { jsObject->slotData(job, data); } #endif -void XMLHttpRequestQObject::slotFinished( KIO::Job* job ) +void XMLHttpRequestQObject::slotFinished( TDEIO::Job* job ) { jsObject->slotFinished(job); } -void XMLHttpRequestQObject::slotRedirection( KIO::Job* job, const KURL& url) +void XMLHttpRequestQObject::slotRedirection( TDEIO::Job* job, const KURL& url) { jsObject->slotRedirection( job, url ); } @@ -344,7 +344,7 @@ void XMLHttpRequest::send(const TQString& _body) const TQString protocol = url.protocol().lower(); // Abandon the request when the protocol is other than "http", - // instead of blindly doing a KIO::get on other protocols like file:/. + // instead of blindly doing a TDEIO::get on other protocols like file:/. if (!protocol.startsWith("http") && !protocol.startsWith("webdav")) { abort(); @@ -359,14 +359,14 @@ void XMLHttpRequest::send(const TQString& _body) TQCString str = _body.utf8(); buf.duplicate(str.data(), str.size() - 1); - job = KIO::http_post( url, buf, false ); + job = TDEIO::http_post( url, buf, false ); if(contentType.isNull()) job->addMetaData( "content-type", "Content-type: text/plain" ); else job->addMetaData( "content-type", contentType ); } else { - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); } if (!requestHeaders.isEmpty()) { @@ -421,22 +421,22 @@ void XMLHttpRequest::send(const TQString& _body) return; } - qObject->connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); + qObject->connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); #ifdef APPLE_CHANGES - qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const char*, int ) ), - TQT_SLOT( slotData( KIO::Job*, const char*, int ) ) ); + qObject->connect( job, TQT_SIGNAL( data( TDEIO::Job*, const char*, int ) ), + TQT_SLOT( slotData( TDEIO::Job*, const char*, int ) ) ); #else - qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); + qObject->connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); #endif - qObject->connect( job, TQT_SIGNAL(redirection(KIO::Job*, const KURL& ) ), - TQT_SLOT( slotRedirection(KIO::Job*, const KURL&) ) ); + qObject->connect( job, TQT_SIGNAL(redirection(TDEIO::Job*, const KURL& ) ), + TQT_SLOT( slotRedirection(TDEIO::Job*, const KURL&) ) ); #ifdef APPLE_CHANGES KWQServeRequest(khtml::Cache::loader(), doc->docLoader(), job); #else - KIO::Scheduler::scheduleJob( job ); + TDEIO::Scheduler::scheduleJob( job ); #endif } @@ -610,7 +610,7 @@ void XMLHttpRequest::processSyncLoadResults(const TQByteArray &data, const KURL slotFinished(0); } -void XMLHttpRequest::slotFinished(KIO::Job *) +void XMLHttpRequest::slotFinished(TDEIO::Job *) { if (decoder) { response += decoder->flush(); @@ -625,7 +625,7 @@ void XMLHttpRequest::slotFinished(KIO::Job *) decoder = 0; } -void XMLHttpRequest::slotRedirection(KIO::Job*, const KURL& url) +void XMLHttpRequest::slotRedirection(TDEIO::Job*, const KURL& url) { if (!urlMatchesDocumentDomain(url)) { abort(); @@ -633,9 +633,9 @@ void XMLHttpRequest::slotRedirection(KIO::Job*, const KURL& url) } #ifdef APPLE_CHANGES -void XMLHttpRequest::slotData( KIO::Job*, const char *data, int len ) +void XMLHttpRequest::slotData( TDEIO::Job*, const char *data, int len ) #else -void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data) +void XMLHttpRequest::slotData(TDEIO::Job*, const TQByteArray &_data) #endif { if (state < Loaded ) { diff --git a/khtml/ecma/xmlhttprequest.h b/khtml/ecma/xmlhttprequest.h index 2c646708e..93420453e 100644 --- a/khtml/ecma/xmlhttprequest.h +++ b/khtml/ecma/xmlhttprequest.h @@ -75,12 +75,12 @@ namespace KJS { XMLHttpRequestQObject *qObject; #ifdef APPLE_CHANGES - void slotData( KIO::Job* job, const char *data, int size ); + void slotData( TDEIO::Job* job, const char *data, int size ); #else - void slotData( KIO::Job* job, const TQByteArray &data ); + void slotData( TDEIO::Job* job, const TQByteArray &data ); #endif - void slotFinished( KIO::Job* ); - void slotRedirection( KIO::Job*, const KURL& ); + void slotFinished( TDEIO::Job* ); + void slotRedirection( TDEIO::Job*, const KURL& ); void processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers); @@ -103,7 +103,7 @@ namespace KJS { TQString m_mimeTypeOverride; TQString contentType; - KIO::TransferJob * job; + TDEIO::TransferJob * job; XMLHttpRequestState state; JSEventListener *onReadyStateChangeListener; @@ -129,9 +129,9 @@ namespace KJS { XMLHttpRequestQObject(XMLHttpRequest *_jsObject); public slots: - void slotData( KIO::Job* job, const TQByteArray &data ); - void slotFinished( KIO::Job* job ); - void slotRedirection( KIO::Job* job, const KURL& url); + void slotData( TDEIO::Job* job, const TQByteArray &data ); + void slotFinished( TDEIO::Job* job ); + void slotRedirection( TDEIO::Job* job, const KURL& url); private: XMLHttpRequest *jsObject; diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp index 7477679bc..c7c232dc9 100644 --- a/khtml/html/html_formimpl.cpp +++ b/khtml/html/html_formimpl.cpp @@ -1615,16 +1615,16 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis fileurl = KURL::fromPathOrURL(val); } - KIO::UDSEntry filestat; + TDEIO::UDSEntry filestat; // can't submit file in www-url-form encoded TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget(); if (multipart) { TQCString filearray( "" ); - if ( KIO::NetAccess::stat(fileurl, filestat, toplevel)) { + if ( TDEIO::NetAccess::stat(fileurl, filestat, toplevel)) { const KFileItem fileitem(filestat, fileurl, true, false); if ( fileitem.isFile() && - KIO::NetAccess::download(fileurl, local, toplevel) ) { + TDEIO::NetAccess::download(fileurl, local, toplevel) ) { TQFile file(local); filearray.resize(file.size()+1); if ( file.open( IO_ReadOnly ) ) { @@ -1633,7 +1633,7 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis filearray[readbytes] = '\0'; file.close(); } - KIO::NetAccess::removeTempFile( local ); + TDEIO::NetAccess::removeTempFile( local ); } } encoding += filearray; diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp index 56e056a62..a82a80a0e 100644 --- a/khtml/java/kjavaappletserver.cpp +++ b/khtml/java/kjavaappletserver.cpp @@ -193,7 +193,7 @@ void KJavaAppletServer::freeJavaServer() //instead of immediately quitting here, set a timer to kill us //if there are still no servers- give us one minute //this is to prevent repeated loading and unloading of the jvm - KConfig config( "konquerorrc", true ); + TDEConfig config( "konquerorrc", true ); config.setGroup( "Java/JavaScript Settings" ); if( config.readBoolEntry( "ShutdownAppletServer", true ) ) { @@ -214,7 +214,7 @@ void KJavaAppletServer::checkShutdown() void KJavaAppletServer::setupJava( KJavaProcess *p ) { - KConfig config ( "konquerorrc", true ); + TDEConfig config ( "konquerorrc", true ); config.setGroup( "Java/JavaScript Settings" ); TQString jvm_path = "java"; diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp index 05c2eb7d0..979403df4 100644 --- a/khtml/java/kjavaappletviewer.cpp +++ b/khtml/java/kjavaappletviewer.cpp @@ -315,12 +315,12 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, if (!server->usingKIO ()) { /* if this page needs authentication */ - KIO::AuthInfo info; + TDEIO::AuthInfo info; TQString errorMsg; TQCString replyType; TQByteArray params; TQByteArray reply; - KIO::AuthInfo authResult; + TDEIO::AuthInfo authResult; //(void) dcopClient(); // Make sure to have a dcop client. info.url = baseurl; @@ -329,9 +329,9 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, TQDataStream stream(params, IO_WriteOnly); stream << info << m_view->topLevelWidget()->winId(); - if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) { + if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(TDEIO::AuthInfo, long int)", params, replyType, reply ) ) { kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl; - } else if ( replyType == "KIO::AuthInfo" ) { + } else if ( replyType == "TDEIO::AuthInfo" ) { TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> authResult; applet->setUser (authResult.username); diff --git a/khtml/java/kjavaappletviewer.h b/khtml/java/kjavaappletviewer.h index b76f20363..cf2c20721 100644 --- a/khtml/java/kjavaappletviewer.h +++ b/khtml/java/kjavaappletviewer.h @@ -41,7 +41,7 @@ class KJavaProcess; class KJavaAppletViewer; class TDEAboutData; class TDEInstance; -class KConfig; +class TDEConfig; class CoverWidget; class KJavaAppletViewerBrowserExtension : public KParts::BrowserExtension { @@ -107,7 +107,7 @@ private slots: void delayedCreateTimeOut (); private: TQGuardedPtr <CoverWidget> m_view; - KConfig * m_config; + TDEConfig * m_config; KJavaProcess * process; KJavaAppletViewerBrowserExtension * m_browserextension; KJavaAppletViewerLiveConnectExtension * m_liveconnect; diff --git a/khtml/java/kjavadownloader.cpp b/khtml/java/kjavadownloader.cpp index 60334cbf0..a12b585b7 100644 --- a/khtml/java/kjavadownloader.cpp +++ b/khtml/java/kjavadownloader.cpp @@ -58,13 +58,13 @@ public: ~KJavaDownloaderPrivate() { delete url; - if (job) job->kill(); // KIO::Job::kill deletes itself + if (job) job->kill(); // TDEIO::Job::kill deletes itself } private: int loaderID; KURL* url; TQByteArray file; - KIO::TransferJob* job; + TDEIO::TransferJob* job; int responseCode; bool isfirstdata; }; @@ -79,16 +79,16 @@ KJavaDownloader::KJavaDownloader( int ID, const TQString& url ) d->loaderID = ID; d->url = new KURL( url ); - d->job = KIO::get( *d->url, false, false ); + d->job = TDEIO::get( *d->url, false, false ); d->job->addMetaData("PropagateHttpHeader", "true"); - connect( d->job, TQT_SIGNAL(data( KIO::Job*, const TQByteArray& )), - this, TQT_SLOT(slotData( KIO::Job*, const TQByteArray& )) ); - connect( d->job, TQT_SIGNAL(connected(KIO::Job*)), - this, TQT_SLOT(slotConnected(KIO::Job*))); - connect( d->job, TQT_SIGNAL(mimetype(KIO::Job*, const TQString&)), - this, TQT_SLOT(slotMimetype(KIO::Job*, const TQString&))); - connect( d->job, TQT_SIGNAL(result(KIO::Job*)), - this, TQT_SLOT(slotResult(KIO::Job*)) ); + connect( d->job, TQT_SIGNAL(data( TDEIO::Job*, const TQByteArray& )), + this, TQT_SLOT(slotData( TDEIO::Job*, const TQByteArray& )) ); + connect( d->job, TQT_SIGNAL(connected(TDEIO::Job*)), + this, TQT_SLOT(slotConnected(TDEIO::Job*))); + connect( d->job, TQT_SIGNAL(mimetype(TDEIO::Job*, const TQString&)), + this, TQT_SLOT(slotMimetype(TDEIO::Job*, const TQString&))); + connect( d->job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotResult(TDEIO::Job*)) ); } KJavaDownloader::~KJavaDownloader() @@ -96,7 +96,7 @@ KJavaDownloader::~KJavaDownloader() delete d; } -void KJavaDownloader::slotData( KIO::Job*, const TQByteArray& qb ) +void KJavaDownloader::slotData( TDEIO::Job*, const TQByteArray& qb ) { //kdDebug(6100) << "slotData(" << d->loaderID << ")" << endl; @@ -116,17 +116,17 @@ void KJavaDownloader::slotData( KIO::Job*, const TQByteArray& qb ) KJavaAppletServer::freeJavaServer(); } -void KJavaDownloader::slotConnected(KIO::Job*) +void KJavaDownloader::slotConnected(TDEIO::Job*) { kdDebug(6100) << "slave connected" << endl; d->responseCode = d->job->error(); } -void KJavaDownloader::slotMimetype(KIO::Job*, const TQString & type) { +void KJavaDownloader::slotMimetype(TDEIO::Job*, const TQString & type) { kdDebug(6100) << "slave mimetype " << type << endl; } -void KJavaDownloader::slotResult( KIO::Job* ) +void KJavaDownloader::slotResult( TDEIO::Job* ) { kdDebug(6100) << "slotResult(" << d->loaderID << ")" << endl; @@ -149,7 +149,7 @@ void KJavaDownloader::slotResult( KIO::Job* ) { server->sendURLData( d->loaderID, FINISHED, d->file ); } - d->job = 0L; // signal KIO::Job::result deletes itself + d->job = 0L; // signal TDEIO::Job::result deletes itself server->removeDataJob( d->loaderID ); // will delete this KJavaAppletServer::freeJavaServer(); } @@ -161,7 +161,7 @@ void KJavaDownloader::jobCommand( int cmd ) case KJAS_STOP: { kdDebug(6100) << "jobCommand(" << d->loaderID << ") stop" << endl; d->job->kill(); - d->job = 0L; // KIO::Job::kill deletes itself + d->job = 0L; // TDEIO::Job::kill deletes itself KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); server->removeDataJob( d->loaderID ); // will delete this KJavaAppletServer::freeJavaServer(); @@ -187,12 +187,12 @@ public: ~KJavaUploaderPrivate() { delete url; - if (job) job->kill(); // KIO::Job::kill deletes itself + if (job) job->kill(); // TDEIO::Job::kill deletes itself } int loaderID; KURL* url; TQByteArray file; - KIO::TransferJob* job; + TDEIO::TransferJob* job; bool finished; }; @@ -213,12 +213,12 @@ void KJavaUploader::start() kdDebug(6100) << "KJavaUploader::start(" << d->loaderID << ")" << endl; KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); // create a suspended job - d->job = KIO::put( *d->url, -1, false, false, false ); + d->job = TDEIO::put( *d->url, -1, false, false, false ); d->job->suspend(); - connect( d->job, TQT_SIGNAL(dataReq( KIO::Job*, TQByteArray& )), - this, TQT_SLOT(slotDataRequest( KIO::Job*, TQByteArray& )) ); - connect( d->job, TQT_SIGNAL(result(KIO::Job*)), - this, TQT_SLOT(slotResult(KIO::Job*)) ); + connect( d->job, TQT_SIGNAL(dataReq( TDEIO::Job*, TQByteArray& )), + this, TQT_SLOT(slotDataRequest( TDEIO::Job*, TQByteArray& )) ); + connect( d->job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotResult(TDEIO::Job*)) ); server->sendURLData( d->loaderID, CONNECTED, d->file ); KJavaAppletServer::freeJavaServer(); } @@ -228,7 +228,7 @@ KJavaUploader::~KJavaUploader() delete d; } -void KJavaUploader::slotDataRequest( KIO::Job*, TQByteArray& qb ) +void KJavaUploader::slotDataRequest( TDEIO::Job*, TQByteArray& qb ) { // send our data and suspend kdDebug(6100) << "slotDataRequest(" << d->loaderID << ") finished:" << d->finished << endl; @@ -256,7 +256,7 @@ void KJavaUploader::data( const TQByteArray& qb ) d->job->resume(); } -void KJavaUploader::slotResult( KIO::Job* ) +void KJavaUploader::slotResult( TDEIO::Job* ) { kdDebug(6100) << "slotResult(" << d->loaderID << ") job:" << d->job << endl; @@ -276,7 +276,7 @@ void KJavaUploader::slotResult( KIO::Job* ) } else // shouldn't come here kdError(6100) << "slotResult(" << d->loaderID << ") job:" << d->job << endl; - d->job = 0L; // signal KIO::Job::result deletes itself + d->job = 0L; // signal TDEIO::Job::result deletes itself server->removeDataJob( d->loaderID ); // will delete this KJavaAppletServer::freeJavaServer(); } diff --git a/khtml/java/kjavadownloader.h b/khtml/java/kjavadownloader.h index f9514304c..ab6553398 100644 --- a/khtml/java/kjavadownloader.h +++ b/khtml/java/kjavadownloader.h @@ -27,13 +27,13 @@ /** * @short A class for handling downloads from KIO * - * This class handles a KIO::get job and passes the data + * This class handles a TDEIO::get job and passes the data * back to the AppletServer. * * @author Wynn Wilkes, wynnw@calderasystems.com */ -namespace KIO { +namespace TDEIO { class Job; } @@ -59,10 +59,10 @@ public: virtual void jobCommand( int cmd ); protected slots: - void slotData( KIO::Job*, const TQByteArray& ); - void slotConnected( KIO::Job* ); - void slotMimetype( KIO::Job*, const TQString& ); - void slotResult( KIO::Job* ); + void slotData( TDEIO::Job*, const TQByteArray& ); + void slotConnected( TDEIO::Job* ); + void slotMimetype( TDEIO::Job*, const TQString& ); + void slotResult( TDEIO::Job* ); private: KJavaDownloaderPrivate* d; @@ -81,8 +81,8 @@ public: virtual void data( const TQByteArray& qb ); void start(); protected slots: - void slotDataRequest( KIO::Job*, TQByteArray& ); - void slotResult( KIO::Job* ); + void slotDataRequest( TDEIO::Job*, TQByteArray& ); + void slotResult( TDEIO::Job* ); private: KJavaUploaderPrivate* d; diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp index 44c060b61..2e4660f2d 100644 --- a/khtml/khtml_ext.cpp +++ b/khtml/khtml_ext.cpp @@ -437,7 +437,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const TQString &doc, // Fill search provider entries - KConfig config("kuriikwsfilterrc"); + TDEConfig config("kuriikwsfilterrc"); config.setGroup("General"); const TQString defaultEngine = config.readEntry("DefaultSearchEngine", "google"); const char keywordDelimiter = config.readNumEntry("KeywordDelimiter", ':'); @@ -648,7 +648,7 @@ KHTMLPopupGUIClient::~KHTMLPopupGUIClient() void KHTMLPopupGUIClient::slotSaveLinkAs() { - KIO::MetaData metaData; + TDEIO::MetaData metaData; metaData["referrer"] = d->m_khtml->referrer(); saveURL( d->m_khtml->widget(), i18n( "Save Link As" ), d->m_url, metaData ); } @@ -668,7 +668,7 @@ void KHTMLPopupGUIClient::slotSendImage() void KHTMLPopupGUIClient::slotSaveImageAs() { - KIO::MetaData metaData; + TDEIO::MetaData metaData; metaData["referrer"] = d->m_khtml->referrer(); saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL, metaData, TQString::null, 0, d->m_suggestedFilename ); } @@ -824,7 +824,7 @@ void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption, { TQFileInfo info( destURL.path() ); if( info.exists() ) { - // TODO: use KIO::RenameDlg (shows more information) + // TODO: use TDEIO::RenameDlg (shows more information) query = KMessageBox::warningContinueCancel( parent, i18n( "A file named \"%1\" already exists. " "Are you sure you want to overwrite it?" ).arg( info.fileName() ), i18n( "Overwrite File?" ), i18n( "Overwrite" ) ); } } @@ -862,7 +862,7 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, destFile.close(); KURL url2 = KURL(); url2.setPath(destFile.name()); - KIO::file_move(url2, destURL, -1, true /*overwrite*/); + TDEIO::file_move(url2, destURL, -1, true /*overwrite*/); saved = true; } } @@ -876,7 +876,7 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, bool downloadViaKIO = true; if ( !url.isLocalFile() ) { - KConfig cfg("konquerorrc", false, false); + TDEConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); TQString downloadManger = cfg.readPathEntry("DownloadManager"); if (!downloadManger.isEmpty()) @@ -907,7 +907,7 @@ void KHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL, if ( downloadViaKIO ) { - KIO::Job *job = KIO::file_copy( url, destURL, -1, true /*overwrite*/ ); + TDEIO::Job *job = TDEIO::file_copy( url, destURL, -1, true /*overwrite*/ ); job->setMetaData(metadata); job->addMetaData("MaxCacheSize", "0"); // Don't store in http cache. job->addMetaData("cache", "cache"); // Use entry from cache if available. diff --git a/khtml/khtml_ext.h b/khtml/khtml_ext.h index 47ab97228..4878c0ac4 100644 --- a/khtml/khtml_ext.h +++ b/khtml/khtml_ext.h @@ -120,12 +120,12 @@ public: virtual ~KHTMLPopupGUIClient(); static void saveURL( TQWidget *parent, const TQString &caption, const KURL &url, - const TQMap<TQString, TQString> &metaData = KIO::MetaData(), + const TQMap<TQString, TQString> &metaData = TDEIO::MetaData(), const TQString &filter = TQString::null, long cacheId = 0, const TQString &suggestedFilename = TQString::null ); static void saveURL( const KURL &url, const KURL &destination, - const TQMap<TQString, TQString> &metaData = KIO::MetaData(), + const TQMap<TQString, TQString> &metaData = TDEIO::MetaData(), long cacheId = 0 ); private slots: void slotSaveLinkAs(); diff --git a/khtml/khtml_factory.cpp b/khtml/khtml_factory.cpp index 6b5662882..63e44025f 100644 --- a/khtml/khtml_factory.cpp +++ b/khtml/khtml_factory.cpp @@ -120,7 +120,7 @@ void KHTMLFactory::ref() // that the factory gets deleted from within a qPostRoutine, called // from the TQApplication destructor. That however is too late, because // we want to destruct a TDEInstance object, which involves destructing - // a KConfig object, which might call TDEGlobal::dirs() (in sync()) which + // a TDEConfig object, which might call TDEGlobal::dirs() (in sync()) which // probably is not going to work ;-) // well, perhaps I'm wrong here, but as I'm unsure I try to stay on the // safe side ;-) -> let's use a simple reference counting scheme diff --git a/khtml/khtml_iface.cc b/khtml/khtml_iface.cc index 2746ba0d2..9576379ec 100644 --- a/khtml/khtml_iface.cc +++ b/khtml/khtml_iface.cc @@ -191,7 +191,7 @@ void KHTMLPartIface::saveBackground(const TQString &destination) if (back.isEmpty()) return; - KIO::MetaData metaData; + TDEIO::MetaData metaData; metaData["referrer"] = part->referrer(); KHTMLPopupGUIClient::saveURL( back, KURL( destination ), metaData ); } @@ -203,7 +203,7 @@ void KHTMLPartIface::saveDocument(const TQString &destination) if ( srcURL.fileName(false).isEmpty() ) srcURL.setFileName( "index.html" ); - KIO::MetaData metaData; + TDEIO::MetaData metaData; // Referrer unknown? KHTMLPopupGUIClient::saveURL( srcURL, KURL( destination ), metaData, part->cacheId() ); } diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp index bf4566c86..c0733c990 100644 --- a/khtml/khtml_part.cpp +++ b/khtml/khtml_part.cpp @@ -306,7 +306,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) d->m_paSetEncoding->insert( d->m_manualDetection ); - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if ( config->hasGroup( "HTML Settings" ) ) { config->setGroup( "HTML Settings" ); khtml::Decoder::AutoDetectLanguage language; @@ -434,7 +434,7 @@ void KHTMLPart::init( KHTMLView *view, GUIProfile prof ) this, TQT_SLOT( updateActions() ) ); connect( this, TQT_SIGNAL( completed( bool ) ), this, TQT_SLOT( updateActions() ) ); - connect( this, TQT_SIGNAL( started( KIO::Job * ) ), + connect( this, TQT_SIGNAL( started( TDEIO::Job * ) ), this, TQT_SLOT( updateActions() ) ); d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "khtml/khtml_popupmenu.rc", KHTMLFactory::instance() ) ); @@ -469,7 +469,7 @@ KHTMLPart::~KHTMLPart() { //kdDebug(6050) << "KHTMLPart::~KHTMLPart " << this << endl; - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup( "HTML Settings" ); config->writeEntry( "AutomaticDetectionLanguage", d->m_autoDetectLanguage ); @@ -590,7 +590,7 @@ bool KHTMLPart::openURL( const KURL &url ) KURL mainURL = urls.first(); int error = mainURL.queryItem( "error" ).toInt(); // error=0 isn't a valid error code, so 0 means it's missing from the URL - if ( error == 0 ) error = KIO::ERR_UNKNOWN; + if ( error == 0 ) error = TDEIO::ERR_UNKNOWN; TQString errorText = mainURL.queryItem( "errText", HINT_UTF8 ); urls.pop_front(); d->m_workingURL = KURL::join( urls ); @@ -698,36 +698,36 @@ bool KHTMLPart::openURL( const KURL &url ) if (d->m_restored) { args.metaData().insert("referrer", d->m_pageReferrer); - d->m_cachePolicy = KIO::CC_Cache; + d->m_cachePolicy = TDEIO::CC_Cache; } else if (args.reload) - d->m_cachePolicy = KIO::CC_Reload; + d->m_cachePolicy = TDEIO::CC_Reload; else d->m_cachePolicy = KProtocolManager::cacheControl(); if ( args.doPost() && (m_url.protocol().startsWith("http")) ) { - d->m_job = KIO::http_post( m_url, args.postData, false ); + d->m_job = TDEIO::http_post( m_url, args.postData, false ); d->m_job->addMetaData("content-type", args.contentType() ); } else { - d->m_job = KIO::get( m_url, false, false ); - d->m_job->addMetaData("cache", KIO::getCacheControlString(d->m_cachePolicy)); + d->m_job = TDEIO::get( m_url, false, false ); + d->m_job->addMetaData("cache", TDEIO::getCacheControlString(d->m_cachePolicy)); } if (widget()) d->m_job->setWindow(widget()->topLevelWidget()); d->m_job->addMetaData(args.metaData()); - connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); - connect( d->m_job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); - connect ( d->m_job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), - TQT_SLOT( slotInfoMessage(KIO::Job*, const TQString& ) ) ); - connect( d->m_job, TQT_SIGNAL(redirection(KIO::Job*, const KURL& ) ), - TQT_SLOT( slotRedirection(KIO::Job*, const KURL&) ) ); + connect( d->m_job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); + connect( d->m_job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect ( d->m_job, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString& ) ), + TQT_SLOT( slotInfoMessage(TDEIO::Job*, const TQString& ) ) ); + connect( d->m_job, TQT_SIGNAL(redirection(TDEIO::Job*, const KURL& ) ), + TQT_SLOT( slotRedirection(TDEIO::Job*, const KURL&) ) ); d->m_bComplete = false; d->m_bLoadEventEmitted = false; @@ -743,14 +743,14 @@ bool KHTMLPart::openURL( const KURL &url ) d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host()); - connect( d->m_job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ), - this, TQT_SLOT( slotJobSpeed( KIO::Job*, unsigned long ) ) ); + connect( d->m_job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), + this, TQT_SLOT( slotJobSpeed( TDEIO::Job*, unsigned long ) ) ); - connect( d->m_job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), - this, TQT_SLOT( slotJobPercent( KIO::Job*, unsigned long ) ) ); + connect( d->m_job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), + this, TQT_SLOT( slotJobPercent( TDEIO::Job*, unsigned long ) ) ); - connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( slotJobDone( KIO::Job* ) ) ); + connect( d->m_job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( slotJobDone( TDEIO::Job* ) ) ); d->m_jobspeed = 0; @@ -758,9 +758,9 @@ bool KHTMLPart::openURL( const KURL &url ) // do a stat to see whether the stylesheet was changed in the meanwhile. if ( args.reload && !settings()->userStyleSheet().isEmpty() ) { KURL url( settings()->userStyleSheet() ); - KIO::StatJob *job = KIO::stat( url, false /* don't show progress */ ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - this, TQT_SLOT( slotUserSheetStatDone( KIO::Job * ) ) ); + TDEIO::StatJob *job = TDEIO::stat( url, false /* don't show progress */ ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + this, TQT_SLOT( slotUserSheetStatDone( TDEIO::Job * ) ) ); } emit started( 0L ); @@ -876,7 +876,7 @@ TQString KHTMLPart::documentSource() const } else { TQString tmpFile; - if( KIO::NetAccess::download( m_url, tmpFile, NULL ) ) + if( TDEIO::NetAccess::download( m_url, tmpFile, NULL ) ) { TQFile f( tmpFile ); if ( f.open( IO_ReadOnly ) ) @@ -886,7 +886,7 @@ TQString KHTMLPart::documentSource() const sourceStr = stream.read(); f.close(); } - KIO::NetAccess::removeTempFile( tmpFile ); + TDEIO::NetAccess::removeTempFile( tmpFile ); } } @@ -1511,7 +1511,7 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const return 0; } -void KHTMLPart::slotInfoMessage(KIO::Job* kio_job, const TQString& msg) +void KHTMLPart::slotInfoMessage(TDEIO::Job* kio_job, const TQString& msg) { assert(d->m_job == kio_job); @@ -1562,7 +1562,7 @@ void KHTMLPart::setPageSecurity( PageSecurity sec ) d->m_statusBarIconLabel->setPixmap( SmallIcon( iconName, instance() ) ); } -void KHTMLPart::slotData( KIO::Job* kio_job, const TQByteArray &data ) +void KHTMLPart::slotData( TDEIO::Job* kio_job, const TQByteArray &data ) { assert ( d->m_job == kio_job ); @@ -1579,8 +1579,8 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const TQByteArray &data ) begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset ); d->m_job->resume(); - if (d->m_cachePolicy == KIO::CC_Refresh) - d->m_doc->docLoader()->setCachePolicy(KIO::CC_Verify); + if (d->m_cachePolicy == TDEIO::CC_Refresh) + d->m_doc->docLoader()->setCachePolicy(TDEIO::CC_Verify); else d->m_doc->docLoader()->setCachePolicy(d->m_cachePolicy); @@ -1696,12 +1696,12 @@ void KHTMLPart::slotRestoreData(const TQByteArray &data ) } } -void KHTMLPart::showError( KIO::Job* job ) +void KHTMLPart::showError( TDEIO::Job* job ) { kdDebug(6050) << "KHTMLPart::showError d->m_bParsing=" << (d->m_doc && d->m_doc->parsing()) << " d->m_bComplete=" << d->m_bComplete << " d->m_bCleared=" << d->m_bCleared << endl; - if (job->error() == KIO::ERR_NO_CONTENT) + if (job->error() == TDEIO::ERR_NO_CONTENT) return; if ( (d->m_doc && d->m_doc->parsing()) || d->m_workingURL.isEmpty() ) // if we got any data already @@ -1728,7 +1728,7 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU errText += TQString::fromLatin1( "</TITLE></HEAD><BODY><P>" ); errText += i18n( "An error occurred while loading <B>%1</B>:" ).arg( reqUrl.htmlURL() ); errText += TQString::fromLatin1( "</P>" ); - errText += TQStyleSheet::convertFromPlainText( KIO::buildErrorString( errorCode, text ) ); + errText += TQStyleSheet::convertFromPlainText( TDEIO::buildErrorString( errorCode, text ) ); errText += TQString::fromLatin1( "</BODY></HTML>" ); write(errText); end(); @@ -1749,7 +1749,7 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU TQString errorName, techName, description; TQStringList causes, solutions; - TQByteArray raw = KIO::rawErrorDetail( errorCode, text, &reqUrl ); + TQByteArray raw = TDEIO::rawErrorDetail( errorCode, text, &reqUrl ); TQDataStream stream(raw, IO_ReadOnly); stream >> errorName >> techName >> description >> causes >> solutions; @@ -1812,7 +1812,7 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU end(); } -void KHTMLPart::slotFinished( KIO::Job * job ) +void KHTMLPart::slotFinished( TDEIO::Job * job ) { d->m_job = 0L; d->m_jobspeed = 0L; @@ -1826,7 +1826,7 @@ void KHTMLPart::slotFinished( KIO::Job * job ) // KIO cannot change a redirection request from GET to LISTDIR, // we have to take care of it here once we know for sure it is // a directory... - if (job->error() == KIO::ERR_IS_DIRECTORY) + if (job->error() == TDEIO::ERR_IS_DIRECTORY) { KParts::URLArgs args; emit d->m_extension->openURLRequest( d->m_workingURL, args ); @@ -1841,7 +1841,7 @@ void KHTMLPart::slotFinished( KIO::Job * job ) return; } - KIO::TransferJob *tjob = ::tqqt_cast<KIO::TransferJob*>(job); + TDEIO::TransferJob *tjob = ::tqqt_cast<TDEIO::TransferJob*>(job); if (tjob && tjob->isErrorPage()) { khtml::RenderPart *renderPart = d->m_frame ? static_cast<khtml::RenderPart *>(d->m_frame->m_frame) : 0; if (renderPart) { @@ -1861,7 +1861,7 @@ void KHTMLPart::slotFinished( KIO::Job * job ) d->m_frame->m_jscript->dataReceived(); if ( d->m_doc && d->m_doc->docLoader()->expireDate() && m_url.protocol().lower().startsWith("http")) - KIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate()); + TDEIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate()); d->m_workingURL = KURL(); @@ -2140,14 +2140,14 @@ void KHTMLPart::slotProgressUpdate() emit d->m_extension->loadingProgress( percent ); } -void KHTMLPart::slotJobSpeed( KIO::Job* /*job*/, unsigned long speed ) +void KHTMLPart::slotJobSpeed( TDEIO::Job* /*job*/, unsigned long speed ) { d->m_jobspeed = speed; if (!parentPart()) setStatusBarText(jsStatusBarText(), BarOverrideText); } -void KHTMLPart::slotJobPercent( KIO::Job* /*job*/, unsigned long percent ) +void KHTMLPart::slotJobPercent( TDEIO::Job* /*job*/, unsigned long percent ) { d->m_jobPercent = percent; @@ -2155,7 +2155,7 @@ void KHTMLPart::slotJobPercent( KIO::Job* /*job*/, unsigned long percent ) d->m_progressUpdateTimer.start( 0, true ); } -void KHTMLPart::slotJobDone( KIO::Job* /*job*/ ) +void KHTMLPart::slotJobDone( TDEIO::Job* /*job*/ ) { d->m_jobPercent = 100; @@ -2163,16 +2163,16 @@ void KHTMLPart::slotJobDone( KIO::Job* /*job*/ ) d->m_progressUpdateTimer.start( 0, true ); } -void KHTMLPart::slotUserSheetStatDone( KIO::Job *_job ) +void KHTMLPart::slotUserSheetStatDone( TDEIO::Job *_job ) { - using namespace KIO; + using namespace TDEIO; if ( _job->error() ) { showError( _job ); return; } - const UDSEntry entry = dynamic_cast<KIO::StatJob *>( _job )->statResult(); + const UDSEntry entry = dynamic_cast<TDEIO::StatJob *>( _job )->statResult(); UDSEntry::ConstIterator it = entry.begin(); const UDSEntry::ConstIterator end = entry.end(); for ( ; it != end; ++it ) { @@ -2453,7 +2453,7 @@ void KHTMLPart::slotRedirect() emit completed(); } -void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url) +void KHTMLPart::slotRedirection(TDEIO::Job*, const KURL& url) { // the slave told us that we got redirected //kdDebug( 6050 ) << "redirection by KIO to " << url.url() << endl; @@ -3757,7 +3757,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi if ( u.isLocalFile() ) { - // TODO : use KIO::stat() and create a KFileItem out of its result, + // TODO : use TDEIO::stat() and create a KFileItem out of its result, // to use KFileItem::statusBarText() TQCString path = TQFile::encodeName( u.path() ); @@ -3932,7 +3932,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c if ( button == Qt::LeftButton && ( state & ShiftButton ) ) { - KIO::MetaData metaData; + TDEIO::MetaData metaData; metaData["referrer"] = d->m_referrer; KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), cURL, metaData ); return false; @@ -4124,7 +4124,7 @@ KURL KHTMLPart::backgroundURL() const void KHTMLPart::slotSaveBackground() { - KIO::MetaData metaData; + TDEIO::MetaData metaData; metaData["referrer"] = d->m_referrer; KHTMLPopupGUIClient::saveURL( d->m_view, i18n("Save Background Image As"), backgroundURL(), metaData ); } @@ -4136,7 +4136,7 @@ void KHTMLPart::slotSaveDocument() if ( srcURL.fileName(false).isEmpty() ) srcURL.setFileName( "index" + defaultExtension() ); - KIO::MetaData metaData; + TDEIO::MetaData metaData; // Referre unknown? KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As" ), srcURL, metaData, "text/html", d->m_cacheId ); } @@ -4211,7 +4211,7 @@ void KHTMLPart::slotSaveFrame() if ( srcURL.fileName(false).isEmpty() ) srcURL.setFileName( "index" + defaultExtension() ); - KIO::MetaData metaData; + TDEIO::MetaData metaData; // Referrer unknown? KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save Frame As" ), srcURL, metaData, "text/html" ); } @@ -4391,7 +4391,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const args.serviceType = child->m_serviceType; child->m_args = args; - child->m_args.reload = (d->m_cachePolicy == KIO::CC_Reload); + child->m_args.reload = (d->m_cachePolicy == TDEIO::CC_Reload); child->m_serviceName = TQString(); if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" )) child->m_args.metaData()["referrer"] = d->m_referrer; @@ -4518,8 +4518,8 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url if (sb) sb->setStatusBar( d->m_statusBarExtension->statusBar() ); - connect( part, TQT_SIGNAL( started( KIO::Job *) ), - this, TQT_SLOT( slotChildStarted( KIO::Job *) ) ); + connect( part, TQT_SIGNAL( started( TDEIO::Job *) ), + this, TQT_SLOT( slotChildStarted( TDEIO::Job *) ) ); connect( part, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotChildCompleted() ) ); connect( part, TQT_SIGNAL( completed(bool) ), @@ -4594,7 +4594,7 @@ bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url return true; } - child->m_args.reload = (d->m_cachePolicy == KIO::CC_Reload); + child->m_args.reload = (d->m_cachePolicy == TDEIO::CC_Reload); // make sure the part has a way to find out about the mimetype. // we actually set it in child->m_args in requestObject already, @@ -4776,9 +4776,9 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt KGuiItem(i18n("&Send Unencrypted")), "WarnOnUnencryptedForm"); // Move this setting into KSSL instead - KConfig *config = kapp->config(); + TDEConfig *config = kapp->config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); if (!config->readBoolEntry("WarnOnUnencryptedForm", true)) { config->deleteEntry("WarnOnUnencryptedForm"); @@ -5028,7 +5028,7 @@ void KHTMLPart::slotParentCompleted() } } -void KHTMLPart::slotChildStarted( KIO::Job *job ) +void KHTMLPart::slotChildStarted( TDEIO::Job *job ) { khtml::ChildFrame *child = frame( TQT_TQOBJECT_CONST(sender()) ); @@ -5773,7 +5773,7 @@ void KHTMLPart::setStatusBarText( const TQString& text, StatusBarPriority p) if (!tobe.isEmpty() && d->m_jobspeed) tobe += " "; if (d->m_jobspeed) - tobe += i18n( "(%1/s)" ).arg( KIO::convertSize( d->m_jobspeed ) ); + tobe += i18n( "(%1/s)" ).arg( TDEIO::convertSize( d->m_jobspeed ) ); } tobe = "<qt>"+tobe; diff --git a/khtml/khtml_part.h b/khtml/khtml_part.h index e65a41c11..d84296f04 100644 --- a/khtml/khtml_part.h +++ b/khtml/khtml_part.h @@ -274,7 +274,7 @@ public: * verbose error description a as page, depending on the users configuration. * @p job is the job that signaled the error situation */ - virtual void showError( KIO::Job* job ); + virtual void showError( TDEIO::Job* job ); /** * Returns a reference to the DOM HTML document (for non-HTML documents, returns null) @@ -1118,7 +1118,7 @@ protected: /** * presents a detailed error message to the user. - * @p errorCode kio error code, eg KIO::ERR_SERVER_TIMEOUT. + * @p errorCode kio error code, eg TDEIO::ERR_SERVER_TIMEOUT. * @p text kio additional information text. * @p url the url that triggered the error. */ @@ -1288,11 +1288,11 @@ private slots: /** * @internal */ - void slotData( KIO::Job*, const TQByteArray &data ); + void slotData( TDEIO::Job*, const TQByteArray &data ); /** * @internal */ - void slotInfoMessage( KIO::Job*, const TQString& msg ); + void slotInfoMessage( TDEIO::Job*, const TQString& msg ); /** * @internal */ @@ -1300,7 +1300,7 @@ private slots: /** * @internal */ - void slotFinished( KIO::Job* ); + void slotFinished( TDEIO::Job* ); /** * @internal */ @@ -1312,7 +1312,7 @@ private slots: /** * @internal */ - void slotRedirection( KIO::Job*, const KURL& ); + void slotRedirection( TDEIO::Job*, const KURL& ); /** * @internal */ @@ -1405,7 +1405,7 @@ private slots: /** * @internal */ - void slotChildStarted( KIO::Job *job ); + void slotChildStarted( TDEIO::Job *job ); /** * @internal */ @@ -1451,22 +1451,22 @@ private slots: /* * @internal */ - void slotJobPercent( KIO::Job*, unsigned long ); + void slotJobPercent( TDEIO::Job*, unsigned long ); /* * @internal */ - void slotJobDone( KIO::Job* ); + void slotJobDone( TDEIO::Job* ); /* * @internal */ - void slotUserSheetStatDone( KIO::Job* ); + void slotUserSheetStatDone( TDEIO::Job* ); /* * @internal */ - void slotJobSpeed( KIO::Job*, unsigned long ); + void slotJobSpeed( TDEIO::Job*, unsigned long ); /** * @internal diff --git a/khtml/khtml_run.cpp b/khtml/khtml_run.cpp index 90770d38f..c999562b4 100644 --- a/khtml/khtml_run.cpp +++ b/khtml/khtml_run.cpp @@ -84,7 +84,7 @@ void KHTMLRun::save( const KURL & url, const TQString & suggestedFilename ) } // KDE4: remove -void KHTMLRun::handleError( KIO::Job *job ) +void KHTMLRun::handleError( TDEIO::Job *job ) { KParts::BrowserRun::handleError( job ); } diff --git a/khtml/khtml_run.h b/khtml/khtml_run.h index e1be45fd1..0420e91af 100644 --- a/khtml/khtml_run.h +++ b/khtml/khtml_run.h @@ -47,7 +47,7 @@ public: //KHTMLPart *htmlPart() const; protected: - virtual void handleError( KIO::Job * job ); + virtual void handleError( TDEIO::Job * job ); virtual void save( const KURL & url, const TQString & suggestedFilename ); bool askSave( const KURL & url, KService::Ptr offer, const TQString & mimeType, const TQString & suggestedFilename ); diff --git a/khtml/khtml_settings.cc b/khtml/khtml_settings.cc index 5c5db7341..430271877 100644 --- a/khtml/khtml_settings.cc +++ b/khtml/khtml_settings.cc @@ -186,7 +186,7 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai } } -void KHTMLSettings::readDomainSettings(KConfig *config, bool reset, +void KHTMLSettings::readDomainSettings(TDEConfig *config, bool reset, bool global, KPerDomainSettings &pd_settings) { TQString jsPrefix = global ? TQString::null : TQString::fromLatin1("javascript."); @@ -289,17 +289,17 @@ bool KHTMLSettings::hoverLink() const void KHTMLSettings::init() { - KConfig global( "khtmlrc", true, false ); + TDEConfig global( "khtmlrc", true, false ); init( &global, true ); - KConfig *local = TDEGlobal::config(); + TDEConfig *local = TDEGlobal::config(); if ( !local ) return; init( local, false ); } -void KHTMLSettings::init( KConfig * config, bool reset ) +void KHTMLSettings::init( TDEConfig * config, bool reset ) { TQString group_save = config->group(); if (reset || config->hasGroup("MainView Settings")) @@ -741,7 +741,7 @@ bool KHTMLSettings::isAdFiltered( const TQString &url ) const void KHTMLSettings::addAdFilter( const TQString &url ) { - KConfig config( "khtmlrc", false, false ); + TDEConfig config( "khtmlrc", false, false ); config.setGroup( "Filter Settings" ); TQRegExp rx; @@ -1027,7 +1027,7 @@ void KHTMLSettings::setJSErrorsEnabled(bool enabled) { d->m_jsErrorsEnabled = enabled; // save it - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("HTML Settings"); config->writeEntry("ReportJSErrors", enabled); config->sync(); @@ -1052,7 +1052,7 @@ void KHTMLSettings::setJSPopupBlockerPassivePopup(bool enabled) { d->m_jsPopupBlockerPassivePopup = enabled; // save it - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("Java/JavaScript Settings"); config->writeEntry("PopupBlockerPassivePopup", enabled); config->sync(); diff --git a/khtml/khtml_settings.h b/khtml/khtml_settings.h index bb089e5a8..4d68845f7 100644 --- a/khtml/khtml_settings.h +++ b/khtml/khtml_settings.h @@ -20,7 +20,7 @@ #ifndef __konq_htmlsettings_h__ #define __konq_htmlsettings_h__ -class KConfig; +class TDEConfig; #include <tqcolor.h> #include <tqstring.h> #include <tqstringlist.h> @@ -108,11 +108,11 @@ public: void init(); /** Read settings from @p config. - * @param config is a pointer to KConfig object. + * @param config is a pointer to TDEConfig object. * @param reset if true, settings are always set; if false, * settings are only set if the config file has a corresponding key. */ - void init( KConfig * config, bool reset = true ); + void init( TDEConfig * config, bool reset = true ); /** * Destructor. Don't delete any instance by yourself. @@ -193,13 +193,13 @@ public: /** reads from @p config's current group, forcing initialization * if @p reset is true. - * @param config is a pointer to KConfig object. + * @param config is a pointer to TDEConfig object. * @param reset true if initialization is to be forced. * @param global true if the global domain is to be read. * @param pd_settings will be initialised with the computed (inherited) * settings. */ - void readDomainSettings(KConfig *config, bool reset, + void readDomainSettings(TDEConfig *config, bool reset, bool global, KPerDomainSettings &pd_settings); TQString settingsToCSS() const; diff --git a/khtml/khtmlimage.cpp b/khtml/khtmlimage.cpp index 4cb4bb3f1..f9593e504 100644 --- a/khtml/khtmlimage.cpp +++ b/khtml/khtmlimage.cpp @@ -158,7 +158,7 @@ bool KHTMLImage::openURL( const KURL &url ) DOM::DocumentImpl *impl = dynamic_cast<DOM::DocumentImpl *>( m_khtml->document().handle() ); // ### hack ;-) if (!impl) return false; if ( m_ext->urlArgs().reload ) - impl->docLoader()->setCachePolicy( KIO::CC_Reload ); + impl->docLoader()->setCachePolicy( TDEIO::CC_Reload ); khtml::DocLoader *dl = impl->docLoader(); m_image = dl->requestImage( m_url.url() ); @@ -232,7 +232,7 @@ void KHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e ) } /* -void KHTMLImage::slotImageJobFinished( KIO::Job *job ) +void KHTMLImage::slotImageJobFinished( TDEIO::Job *job ) { if ( job->error() ) { diff --git a/khtml/khtmlimage.h b/khtml/khtmlimage.h index 6db0cbf5f..5f165bd8d 100644 --- a/khtml/khtmlimage.h +++ b/khtml/khtmlimage.h @@ -81,7 +81,7 @@ protected: private slots: void restoreScrollPosition(); -// void slotImageJobFinished( KIO::Job *job ); +// void slotImageJobFinished( TDEIO::Job *job ); // void updateWindowCaption(); diff --git a/khtml/khtmlpart_p.h b/khtml/khtmlpart_p.h index cebee9455..f914ef296 100644 --- a/khtml/khtmlpart_p.h +++ b/khtml/khtmlpart_p.h @@ -60,7 +60,7 @@ class KURLLabel; class KJavaAppletContext; class KJSErrorDlg; -namespace KIO +namespace TDEIO { class Job; class TransferJob; @@ -198,7 +198,7 @@ public: m_job = 0L; m_bComplete = true; m_bLoadEventEmitted = true; - m_cachePolicy = KIO::CC_Verify; + m_cachePolicy = TDEIO::CC_Verify; m_manager = 0L; m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings()); m_bClearing = false; @@ -356,7 +356,7 @@ public: KHTMLSettings *m_settings; - KIO::TransferJob * m_job; + TDEIO::TransferJob * m_job; TQString m_statusBarText[3]; unsigned long m_jobspeed; @@ -387,7 +387,7 @@ public: KURL m_workingURL; - KIO::CacheControl m_cachePolicy; + TDEIO::CacheControl m_cachePolicy; TQTimer m_redirectionTimer; TQTime m_parsetime; int m_delayRedirect; diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp index 411d03f2e..4a5c7cf2d 100644 --- a/khtml/khtmlview.cpp +++ b/khtml/khtmlview.cpp @@ -994,8 +994,8 @@ void KHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse ) bool hasHorBar = visibleWidth() < contentsWidth(); bool hasVerBar = visibleHeight() < contentsHeight(); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "HTML Settings" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "HTML Settings" ); if ( config->readBoolEntry( "ShowMouseScrollIndicator", true ) ) { d->m_mouseScrollIndicator->show(); d->m_mouseScrollIndicator->unsetCursor(); @@ -4517,7 +4517,7 @@ static const int SCROLL_TICK = 20; void KHTMLView::scrollBy(int dx, int dy) { - KConfigGroup cfg( TDEGlobal::config(), "KDE" ); + TDEConfigGroup cfg( TDEGlobal::config(), "KDE" ); if( !cfg.readBoolEntry( "SmoothScrolling", false )) { TQScrollView::scrollBy( dx, dy ); return; diff --git a/khtml/kmultipart/kmultipart.cpp b/khtml/kmultipart/kmultipart.cpp index 65be07e83..32c514f1b 100644 --- a/khtml/kmultipart/kmultipart.cpp +++ b/khtml/kmultipart/kmultipart.cpp @@ -163,14 +163,14 @@ bool KMultiPart::openURL( const KURL &url ) // Hmm, args.reload is set to true when reloading, but this doesn't seem to be enough... // I get "HOLD: Reusing held slave for <url>", and the old data - m_job = KIO::get( url, args.reload, false ); + m_job = TDEIO::get( url, args.reload, false ); emit started( 0 /*m_job*/ ); // don't pass the job, it would interfer with our own infoMessage - connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ), - this, TQT_SLOT( slotJobFinished( KIO::Job * ) ) ); - connect( m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); + connect( m_job, TQT_SIGNAL( result( TDEIO::Job * ) ), + this, TQT_SLOT( slotJobFinished( TDEIO::Job * ) ) ); + connect( m_job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( slotData( TDEIO::Job *, const TQByteArray & ) ) ); m_numberOfFrames = 0; m_numberOfFramesSkipped = 0; @@ -184,7 +184,7 @@ bool KMultiPart::openURL( const KURL &url ) // Yes, libtdenetwork's has such a parser already (MultiPart), // but it works on the complete string, expecting the whole data to be available.... // The version here is asynchronous. -void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data ) +void KMultiPart::slotData( TDEIO::Job *job, const TQByteArray &data ) { if (m_boundary.isNull()) { @@ -533,7 +533,7 @@ void KMultiPart::guiActivateEvent( KParts::GUIActivateEvent * ) // m_part->guiActivateEvent( e ); } -void KMultiPart::slotJobFinished( KIO::Job *job ) +void KMultiPart::slotJobFinished( TDEIO::Job *job ) { if ( job->error() ) { diff --git a/khtml/kmultipart/kmultipart.h b/khtml/kmultipart/kmultipart.h index 7ba5ba2fe..1e6f83620 100644 --- a/khtml/kmultipart/kmultipart.h +++ b/khtml/kmultipart/kmultipart.h @@ -62,8 +62,8 @@ protected: private slots: void reallySendData( const TQByteArray& line ); //void slotPopupMenu( KXMLGUIClient *cl, const TQPoint &pos, const KURL &u, const TQString &mime, mode_t mode ); - void slotJobFinished( KIO::Job *job ); - void slotData( KIO::Job *, const TQByteArray & ); + void slotJobFinished( TDEIO::Job *job ); + void slotData( TDEIO::Job *, const TQByteArray & ); //void updateWindowCaption(); void slotPartCompleted(); @@ -77,7 +77,7 @@ private: TQGuardedPtr<KParts::ReadOnlyPart> m_part; bool m_isHTMLPart; bool m_partIsLoading; - KIO::Job* m_job; + TDEIO::Job* m_job; TQCString m_boundary; int m_boundaryLength; TQString m_mimeType; // the one handled by m_part - store the kservice instead? diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp index f155008ee..b953f34fb 100644 --- a/khtml/misc/knsplugininstaller.cpp +++ b/khtml/misc/knsplugininstaller.cpp @@ -102,7 +102,7 @@ bool KNSPluginInstallEngine::isActive() { // check if we have a configuration key in the kde registry TQString pluginsListFile; - KConfig cfg("kcmnspluginrc", true); + TDEConfig cfg("kcmnspluginrc", true); cfg.setGroup("Misc"); pluginsListFile = cfg.readPathEntry("PluginsListFile"); return !pluginsListFile.isEmpty(); @@ -117,7 +117,7 @@ const TQValueList<KNSPluginInfo>& KNSPluginInstallEngine::pluginList() const bool KNSPluginInstallEngine::loadConfig() { TQString pluginsListFile; - KConfig cfg("kcmnspluginrc", true); + TDEConfig cfg("kcmnspluginrc", true); cfg.setGroup("Misc"); pluginsListFile = cfg.readPathEntry("PluginsListFile"); if(!pluginsListFile.isEmpty()) @@ -136,7 +136,7 @@ bool KNSPluginInstallEngine::loadXmlConfig() if(m_pluginsXmlConfig.isEmpty()) { TQString tmpFile; - if(KIO::NetAccess::download(m_pluginsListFileURL, tmpFile, NULL)) { + if(TDEIO::NetAccess::download(m_pluginsListFileURL, tmpFile, NULL)) { TQFile f(tmpFile); if(!f.open(IO_ReadOnly)) return false; @@ -144,7 +144,7 @@ bool KNSPluginInstallEngine::loadXmlConfig() stream.setEncoding(TQTextStream::UnicodeUTF8); m_pluginsXmlConfig = stream.read(); f.close(); - KIO::NetAccess::removeTempFile(tmpFile); + TDEIO::NetAccess::removeTempFile(tmpFile); } else return false; } @@ -232,20 +232,20 @@ void KNSPluginInstallEngine::startInstall(KNSPluginInfo info) tempFile.unlink(); tempFile.close(); // start the download job - m_downloadJob = KIO::copy(info.pluginURL(), "file://"+m_tmpPluginFileName, false ); + m_downloadJob = TDEIO::copy(info.pluginURL(), "file://"+m_tmpPluginFileName, false ); // connect signals - connect(m_downloadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotDownLoadProgress(KIO::Job *, unsigned long))); - connect(m_downloadJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDownloadResult(KIO::Job *)) ); + connect(m_downloadJob, TQT_SIGNAL(percent (TDEIO::Job *, unsigned long)), this , TQT_SLOT(slotDownLoadProgress(TDEIO::Job *, unsigned long))); + connect(m_downloadJob, TQT_SIGNAL(result(TDEIO::Job *)), this, TQT_SLOT(slotDownloadResult(TDEIO::Job *)) ); kdDebug(DEBUG_NUMBER) << "download plugin " << m_tmpPluginFileName << endl; } -void KNSPluginInstallEngine::slotDownLoadProgress(KIO::Job *, unsigned long percent) +void KNSPluginInstallEngine::slotDownLoadProgress(TDEIO::Job *, unsigned long percent) { // propagate the download progression emit installProgress( ((int)percent)/3 ); } -void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job) +void KNSPluginInstallEngine::slotDownloadResult(TDEIO::Job *job) { // test if the download job suceed if(job->error()) { @@ -279,9 +279,9 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job) for( it = pluginFileList.begin(); it != pluginFileList.end(); ++it ) { urlList.append( KURL("tar://"+m_tmpPluginFileName+"/"+(*it)) ); } - m_installFileJob = KIO::copy(urlList , destURL, false ); - connect(m_installFileJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), this , TQT_SLOT(slotCopyProgress(KIO::Job *, unsigned long))); - connect(m_installFileJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotCopyResult(KIO::Job *)) ); + m_installFileJob = TDEIO::copy(urlList , destURL, false ); + connect(m_installFileJob, TQT_SIGNAL(percent (TDEIO::Job *, unsigned long)), this , TQT_SLOT(slotCopyProgress(TDEIO::Job *, unsigned long))); + connect(m_installFileJob, TQT_SIGNAL(result(TDEIO::Job *)), this, TQT_SLOT(slotCopyResult(TDEIO::Job *)) ); } kdDebug(DEBUG_NUMBER) << "COPY FILE " << m_tmpPluginFileName << endl; @@ -289,13 +289,13 @@ void KNSPluginInstallEngine::slotDownloadResult(KIO::Job *job) m_downloadJob = NULL; } -void KNSPluginInstallEngine::slotCopyProgress(KIO::Job *, unsigned long percent) +void KNSPluginInstallEngine::slotCopyProgress(TDEIO::Job *, unsigned long percent) { // propagate the download progression emit installProgress( ((int)percent)/3 + 33 ); } -void KNSPluginInstallEngine::slotCopyResult(KIO::Job *job) +void KNSPluginInstallEngine::slotCopyResult(TDEIO::Job *job) { // test if the download job suceed if(job->error()) { @@ -501,14 +501,14 @@ void KNSPluginWizard::showPage(TQWidget *page) TQString tmpFile; if(info.licenceURL().isValid()) // retrieve the licence if we have an url - if(KIO::NetAccess::download(info.licenceURL(), tmpFile, NULL)) { + if(TDEIO::NetAccess::download(info.licenceURL(), tmpFile, NULL)) { TQFile f(tmpFile); if(f.open(IO_ReadOnly)) { TQTextStream stream(&f); stream.setEncoding(TQTextStream::UnicodeUTF8); licence = stream.read(); f.close(); - KIO::NetAccess::removeTempFile(tmpFile); + TDEIO::NetAccess::removeTempFile(tmpFile); } } // else display the licence found in the xml config diff --git a/khtml/misc/knsplugininstaller.h b/khtml/misc/knsplugininstaller.h index 0910a685b..240202468 100644 --- a/khtml/misc/knsplugininstaller.h +++ b/khtml/misc/knsplugininstaller.h @@ -138,8 +138,8 @@ private: KMimeType::Ptr m_mime; KURL m_pluginsListFileURL; TQString m_tmpPluginFileName; - KIO::CopyJob *m_downloadJob; - KIO::CopyJob *m_installFileJob; + TDEIO::CopyJob *m_downloadJob; + TDEIO::CopyJob *m_installFileJob; KNSPluginInfo m_toInstallPluginInfo; TQProcess *m_scanProc; @@ -151,12 +151,12 @@ signals: private slots: // Used to monitor the plugin downloading - void slotDownLoadProgress(KIO::Job *job, unsigned long percent); - void slotDownloadResult(KIO::Job *job); + void slotDownLoadProgress(TDEIO::Job *job, unsigned long percent); + void slotDownloadResult(TDEIO::Job *job); // Used to monitor the plugin installation - void slotCopyProgress(KIO::Job *job, unsigned long percent); - void slotCopyResult(KIO::Job *job); + void slotCopyProgress(TDEIO::Job *job, unsigned long percent); + void slotCopyResult(TDEIO::Job *job); // Used to monitor the plugins scan void readScanProcFromStdout(); diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp index b9400f229..79a8c2148 100644 --- a/khtml/misc/loader.cpp +++ b/khtml/misc/loader.cpp @@ -208,7 +208,7 @@ TQTextCodec* CachedObject::codecForBuffer( const TQString& charset, const TQByte // ------------------------------------------------------------------------------------------- -CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, +CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, TDEIO::CacheControl _cachePolicy, const char *accept) : CachedObject(url, CSSStyleSheet, _cachePolicy, 0) { @@ -227,7 +227,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI } CachedCSSStyleSheet::CachedCSSStyleSheet(const DOMString &url, const TQString &stylesheet_data) - : CachedObject(url, CSSStyleSheet, KIO::CC_Verify, stylesheet_data.length()) + : CachedObject(url, CSSStyleSheet, TDEIO::CC_Verify, stylesheet_data.length()) { m_loading = false; m_status = Persistent; @@ -321,7 +321,7 @@ TQString CachedCSSStyleSheet::checkCharset(const TQByteArray& buffer ) const // ------------------------------------------------------------------------------------------- -CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, const char*) +CachedScript::CachedScript(DocLoader* dl, const DOMString &url, TDEIO::CacheControl _cachePolicy, const char*) : CachedObject(url, Script, _cachePolicy, 0) { // It's javascript we want. @@ -334,7 +334,7 @@ CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheContro } CachedScript::CachedScript(const DOMString &url, const TQString &script_data) - : CachedObject(url, Script, KIO::CC_Verify, script_data.length()) + : CachedObject(url, Script, TDEIO::CC_Verify, script_data.length()) { m_loading = false; m_status = Persistent; @@ -466,7 +466,7 @@ static TQString buildAcceptHeader() // ------------------------------------------------------------------------------------- -CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, const char*) +CachedImage::CachedImage(DocLoader* dl, const DOMString &url, TDEIO::CacheControl _cachePolicy, const char*) : TQObject(), CachedObject(url, Image, _cachePolicy, 0) { static const TQString &acceptHeader = TDEGlobal::staticQString( buildAcceptHeader() ); @@ -943,7 +943,7 @@ Request::~Request() DocLoader::DocLoader(KHTMLPart* part, DocumentImpl* doc) { - m_cachePolicy = KIO::CC_Verify; + m_cachePolicy = TDEIO::CC_Verify; m_expireDate = 0; m_creationDate = time(0); m_bautoloadImages = true; @@ -991,7 +991,7 @@ void DocLoader::insertCachedObject( CachedObject* o ) const bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) { bool reload = false; - if (m_cachePolicy == KIO::CC_Verify) + if (m_cachePolicy == TDEIO::CC_Verify) { if (!m_reloadedURLs.contains(fullURL)) { @@ -1003,7 +1003,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) } } } - else if ((m_cachePolicy == KIO::CC_Reload) || (m_cachePolicy == KIO::CC_Refresh)) + else if ((m_cachePolicy == TDEIO::CC_Reload) || (m_cachePolicy == TDEIO::CC_Refresh)) { if (!m_reloadedURLs.contains(fullURL)) { @@ -1153,9 +1153,9 @@ void Loader::servePendingRequests() #endif KURL u(req->object->url().string()); - KIO::TransferJob* job = KIO::get( u, false, false /*no GUI*/); + TDEIO::TransferJob* job = TDEIO::get( u, false, false /*no GUI*/); - job->addMetaData("cache", KIO::getCacheControlString(req->object->cachePolicy())); + job->addMetaData("cache", TDEIO::getCacheControlString(req->object->cachePolicy())); if (!req->object->accept().isEmpty()) job->addMetaData("accept", req->object->accept()); if ( req->m_docLoader ) @@ -1171,21 +1171,21 @@ void Loader::servePendingRequests() } } - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotFinished( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)), - TQT_SLOT( slotData( KIO::Job*, const TQByteArray &))); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotFinished( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray &)), + TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray &))); if ( req->object->schedule() ) - KIO::Scheduler::scheduleJob( job ); + TDEIO::Scheduler::scheduleJob( job ); m_requestsLoading.insert(job, req); } } -void Loader::slotFinished( KIO::Job* job ) +void Loader::slotFinished( TDEIO::Job* job ) { Request *r = m_requestsLoading.take( job ); - KIO::TransferJob* j = static_cast<KIO::TransferJob*>(job); + TDEIO::TransferJob* j = static_cast<TDEIO::TransferJob*>(job); if ( !r ) return; @@ -1247,7 +1247,7 @@ void Loader::slotFinished( KIO::Job* job ) m_timer.start(0, true); } -void Loader::slotData( KIO::Job*job, const TQByteArray &data ) +void Loader::slotData( TDEIO::Job*job, const TQByteArray &data ) { Request *r = m_requestsLoading[job]; if(!r) { @@ -1303,7 +1303,7 @@ void Loader::cancelRequests( DocLoader* dl ) if ( lIt.current()->m_docLoader == dl ) { //kdDebug( 6060 ) << "canceling loading request for " << lIt.current()->object->url().string() << endl; - KIO::Job *job = static_cast<KIO::Job *>( lIt.currentKey() ); + TDEIO::Job *job = static_cast<TDEIO::Job *>( lIt.currentKey() ); Cache::removeCacheEntry( lIt.current()->object ); m_requestsLoading.remove( lIt.currentKey() ); job->kill(); @@ -1314,7 +1314,7 @@ void Loader::cancelRequests( DocLoader* dl ) } } -KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const +TDEIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const { TQPtrDictIterator<Request> it( m_requestsLoading ); @@ -1323,7 +1323,7 @@ KIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const CachedObject *obj = it.current()->object; if ( obj && obj->url() == url ) - return static_cast<KIO::Job *>( it.currentKey() ); + return static_cast<TDEIO::Job *>( it.currentKey() ); } return 0; @@ -1424,7 +1424,7 @@ void Cache::clear() template<typename CachedObjectType, enum CachedObject::Type CachedType> CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const char* accept ) { - KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify; + TDEIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : TDEIO::CC_Verify; TQString url = kurl.url(); CachedObject* o = cache->find(url); diff --git a/khtml/misc/loader.h b/khtml/misc/loader.h index e950f1767..833b98b84 100644 --- a/khtml/misc/loader.h +++ b/khtml/misc/loader.h @@ -57,7 +57,7 @@ class TQMovie; class KHTMLPart; -namespace KIO { +namespace TDEIO { class Job; class TransferJob; } @@ -99,7 +99,7 @@ namespace khtml Cached // regular case }; - CachedObject(const DOM::DOMString &url, Type type, KIO::CacheControl _cachePolicy, int size) + CachedObject(const DOM::DOMString &url, Type type, TDEIO::CacheControl _cachePolicy, int size) : m_url(url), m_type(type), m_cachePolicy(_cachePolicy), m_expireDate(0), m_size(size) { @@ -140,7 +140,7 @@ namespace khtml bool free() const { return m_free; } - KIO::CacheControl cachePolicy() const { return m_cachePolicy; } + TDEIO::CacheControl cachePolicy() const { return m_cachePolicy; } void setRequest(Request *_request); @@ -169,7 +169,7 @@ namespace khtml Type m_type; Status m_status; int m_accessCount; - KIO::CacheControl m_cachePolicy; + TDEIO::CacheControl m_cachePolicy; time_t m_expireDate; int m_size; bool m_deleted : 1; @@ -195,7 +195,7 @@ namespace khtml class CachedCSSStyleSheet : public CachedObject { public: - CachedCSSStyleSheet(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, + CachedCSSStyleSheet(DocLoader* dl, const DOM::DOMString &url, TDEIO::CacheControl cachePolicy, const char *accept); CachedCSSStyleSheet(const DOM::DOMString &url, const TQString &stylesheet_data); @@ -226,7 +226,7 @@ namespace khtml class CachedScript : public CachedObject { public: - CachedScript(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept ); + CachedScript(DocLoader* dl, const DOM::DOMString &url, TDEIO::CacheControl cachePolicy, const char* accept ); CachedScript(const DOM::DOMString &url, const TQString &script_data); const DOM::DOMString &script() const { return m_script; } @@ -257,7 +257,7 @@ namespace khtml { Q_OBJECT public: - CachedImage(DocLoader* dl, const DOM::DOMString &url, KIO::CacheControl cachePolicy, const char* accept); + CachedImage(DocLoader* dl, const DOM::DOMString &url, TDEIO::CacheControl cachePolicy, const char* accept); virtual ~CachedImage(); const TQPixmap &pixmap() const; @@ -354,7 +354,7 @@ namespace khtml CachedScript *requestScript( const DOM::DOMString &url, const TQString& charset); bool autoloadImages() const { return m_bautoloadImages; } - KIO::CacheControl cachePolicy() const { return m_cachePolicy; } + TDEIO::CacheControl cachePolicy() const { return m_cachePolicy; } KHTMLSettings::KAnimationAdvice showAnimations() const { return m_showAnimations; } time_t expireDate() const { return m_expireDate; } KHTMLPart* part() const { return m_part; } @@ -363,7 +363,7 @@ namespace khtml void setCacheCreationDate( time_t ); void setExpireDate( time_t, bool relative ); void setAutoloadImages( bool ); - void setCachePolicy( KIO::CacheControl cachePolicy ) { m_cachePolicy = cachePolicy; } + void setCachePolicy( TDEIO::CacheControl cachePolicy ) { m_cachePolicy = cachePolicy; } void setShowAnimations( KHTMLSettings::KAnimationAdvice ); void pauseAnimations(); void resumeAnimations(); @@ -381,7 +381,7 @@ namespace khtml mutable TQPtrDict<CachedObject> m_docObjects; time_t m_expireDate; time_t m_creationDate; - KIO::CacheControl m_cachePolicy; + TDEIO::CacheControl m_cachePolicy; bool m_bautoloadImages : 1; KHTMLSettings::KAnimationAdvice m_showAnimations : 2; KHTMLPart* m_part; @@ -418,7 +418,7 @@ namespace khtml void cancelRequests( DocLoader* dl ); // may return 0L - KIO::Job *jobForRequest( const DOM::DOMString &url ) const; + TDEIO::Job *jobForRequest( const DOM::DOMString &url ) const; signals: void requestStarted( khtml::DocLoader* dl, khtml::CachedObject* obj ); @@ -426,8 +426,8 @@ namespace khtml void requestFailed( khtml::DocLoader* dl, khtml::CachedObject *obj ); protected slots: - void slotFinished( KIO::Job * ); - void slotData( KIO::Job *, const TQByteArray & ); + void slotFinished( TDEIO::Job * ); + void slotData( TDEIO::Job *, const TQByteArray & ); void servePendingRequests(); protected: diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp index 62785e204..172e63e4a 100644 --- a/khtml/test_regression.cpp +++ b/khtml/test_regression.cpp @@ -521,7 +521,7 @@ int main(int argc, char *argv[]) a.config()->writeEntry( "kjscupguard_alarmhandler", true ); a.config()->setGroup("HTML Settings"); a.config()->writeEntry("ReportJSErrors", false); - KConfig cfg( "khtmlrc" ); + TDEConfig cfg( "khtmlrc" ); cfg.setGroup("HTML Settings"); cfg.writeEntry( "StandardFont", HTML_DEFAULT_VIEW_SANSSERIF_FONT ); cfg.writeEntry( "FixedFont", HTML_DEFAULT_VIEW_FIXED_FONT ); diff --git a/khtml/testkhtml.cpp b/khtml/testkhtml.cpp index ba5bf063f..e0135d091 100644 --- a/khtml/testkhtml.cpp +++ b/khtml/testkhtml.cpp @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) void Dummy::doBenchmark() { - KConfigGroup settings(TDEGlobal::config(), "bench"); + TDEConfigGroup settings(TDEGlobal::config(), "bench"); results.clear(); TQString directory = KFileDialog::getExistingDirectory(settings.readPathEntry("path"), m_part->view(), diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp index 3a277ecf5..ff206a1cc 100644 --- a/khtml/xml/dom_docimpl.cpp +++ b/khtml/xml/dom_docimpl.cpp @@ -1718,7 +1718,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con KURL url = v->part()->url(); if ((str == "no-cache") && url.protocol().startsWith("http")) { - KIO::http_update_cache(url, true, 0); + TDEIO::http_update_cache(url, true, 0); } } else if( (strcasecmp(equiv, "set-cookie") == 0)) @@ -2491,7 +2491,7 @@ void DocumentImpl::error(int err, const TQString &text) int exceptioncode = 0; EventImpl *evt = new EventImpl(EventImpl::ERROR_EVENT,false,false); if (err != 0) - evt->setMessage(KIO::buildErrorString(err,text)); + evt->setMessage(TDEIO::buildErrorString(err,text)); else evt->setMessage(text); evt->ref(); diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp index 4e8b6c784..3fe0825a4 100644 --- a/kinit/autostart.cpp +++ b/kinit/autostart.cpp @@ -102,7 +102,7 @@ static bool startCondition(const TQString &condition) if (list[0].isEmpty() || list[2].isEmpty()) return true; - KConfig config(list[0], true, false); + TDEConfig config(list[0], true, false); if (!list[1].isEmpty()) config.setGroup(list[1]); diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp index 470e7faba..b74417c3f 100644 --- a/kinit/kdostartupconfig.cpp +++ b/kinit/kdostartupconfig.cpp @@ -95,7 +95,7 @@ int main() return 6; if( group.left( 1 ) == "[" && group.right( 1 ) == "]" ) { // whole config group - KConfig cfg( file ); + TDEConfig cfg( file ); group = group.mid( 1, group.length() - 2 ); TQMap< TQString, TQString > entries = cfg.entryMap( group ); startupconfig << "# " << line << "\n"; @@ -115,7 +115,7 @@ int main() { // a single key if( key.isEmpty()) return 7; - KConfig cfg( file ); + TDEConfig cfg( file ); cfg.setGroup( group ); TQString value = cfg.readEntry( key, def ); startupconfig << "# " << line << "\n"; diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index d7e7c7e1c..1f65658d9 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -171,7 +171,7 @@ int tdeinit_x_errhandler( Display *, XErrorEvent *err ); extern "C" KParts::Plugin* _kinit_init_kparts() { return new KParts::Plugin(); } /* These are to link libkio even if 'smart' linker is used */ #include <kio/authinfo.h> -extern "C" KIO::AuthInfo* _kioslave_init_kio() { return new KIO::AuthInfo(); } +extern "C" TDEIO::AuthInfo* _kioslave_init_kio() { return new TDEIO::AuthInfo(); } /* * Close fd's which are only useful for the parent process. @@ -1758,7 +1758,7 @@ int main(int argc, char **argv, char **envp) tdeinit_initsetproctitle(argc, argv, envp); tdeinit_library_path(); // Don't make our instance the global instance - // (do it only after tdeinit_library_path, that one indirectly uses KConfig, + // (do it only after tdeinit_library_path, that one indirectly uses TDEConfig, // which seems to be buggy and always use TDEGlobal instead of the maching TDEInstance) TDEGlobal::_instance = 0L; // don't change envvars before tdeinit_initsetproctitle() diff --git a/kinit/kioslave.cpp b/kinit/kioslave.cpp index f132abb0d..0cb77db02 100644 --- a/kinit/kioslave.cpp +++ b/kinit/kioslave.cpp @@ -49,7 +49,7 @@ /* These are to link libkio even if 'smart' linker is used */ #include <kio/authinfo.h> -extern "C" KIO::AuthInfo* _kioslave_init_kio() { return new KIO::AuthInfo(); } +extern "C" TDEIO::AuthInfo* _kioslave_init_kio() { return new TDEIO::AuthInfo(); } int main(int argc, char **argv) { diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp index 3f5510ea0..8c66789e7 100644 --- a/kinit/klauncher.cpp +++ b/kinit/klauncher.cpp @@ -61,12 +61,12 @@ // Dispose slaves after being idle for SLAVE_MAX_IDLE seconds #define SLAVE_MAX_IDLE 30 -using namespace KIO; +using namespace TDEIO; template class TQPtrList<KLaunchRequest>; template class TQPtrList<IdleSlave>; -IdleSlave::IdleSlave(KSocket *socket) +IdleSlave::IdleSlave(TDESocket *socket) { mConn.init(socket); mConn.connect(this, TQT_SLOT(gotInput())); @@ -194,9 +194,9 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup) domainname.close(); domainname.unlink(); #endif - mPoolSocket = new KServerSocket(static_cast<const char*>(TQFile::encodeName(mPoolSocketName))); - connect(mPoolSocket, TQT_SIGNAL(accepted( KSocket *)), - TQT_SLOT(acceptSlave(KSocket *))); + mPoolSocket = new TDEServerSocket(static_cast<const char*>(TQFile::encodeName(mPoolSocketName))); + connect(mPoolSocket, TQT_SIGNAL(accepted( TDESocket *)), + TQT_SLOT(acceptSlave(TDESocket *))); connect(&mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleTimeout())); @@ -1353,7 +1353,7 @@ KLauncher::waitForSlave(pid_t pid) } void -KLauncher::acceptSlave(KSocket *slaveSocket) +KLauncher::acceptSlave(TDESocket *slaveSocket) { IdleSlave *slave = new IdleSlave(slaveSocket); // Send it a SLAVE_STATUS command. diff --git a/kinit/klauncher.h b/kinit/klauncher.h index 8058bb31e..37b10f059 100644 --- a/kinit/klauncher.h +++ b/kinit/klauncher.h @@ -43,7 +43,7 @@ class IdleSlave : public TQObject { Q_OBJECT public: - IdleSlave(KSocket *socket); + IdleSlave(TDESocket *socket); bool match( const TQString &protocol, const TQString &host, bool connected); void connect( const TQString &app_socket); pid_t pid() const { return mPid;} @@ -59,7 +59,7 @@ protected slots: void gotInput(); protected: - KIO::Connection mConn; + TDEIO::Connection mConn; TQString mProtocol; TQString mHost; bool mConnected; @@ -169,7 +169,7 @@ public slots: void slotKDEInitData(int); void slotAppRegistered(const TQCString &appId); void slotSlaveStatus(IdleSlave *); - void acceptSlave( KSocket *); + void acceptSlave( TDESocket *); void slotSlaveGone(); void idleTimeout(); @@ -182,7 +182,7 @@ protected: KLaunchRequest *lastRequest; TQPtrList<SlaveWaitRequest> mSlaveWaitRequest; TQString mPoolSocketName; - KServerSocket *mPoolSocket; + TDEServerSocket *mPoolSocket; TQPtrList<IdleSlave> mSlaveList; TQTimer mTimer; TQTimer mAutoTimer; diff --git a/kio/DESIGN b/kio/DESIGN index c84bd2182..08617bbda 100644 --- a/kio/DESIGN +++ b/kio/DESIGN @@ -190,7 +190,7 @@ B. customized progress dialogs This will be similar to what we had before. - ProgressBase class that all other dialogs will inherit. - will contain an initialization method setJob( KIO::Job*) for apps of the + will contain an initialization method setJob( TDEIO::Job*) for apps of the second class (see A.2 above), that will connect job's signals to dialog's slots diff --git a/kio/DESIGN.metadata b/kio/DESIGN.metadata index 9890c961d..783d7f52a 100644 --- a/kio/DESIGN.metadata +++ b/kio/DESIGN.metadata @@ -132,11 +132,11 @@ DefaultRemoteProtocol string Protocol to redirect file://<hostname>/ URLs to, de Examples: E.g. the following disables cookies: -job = KIO::get( KURL("http://www.kde.org"), false, false); +job = TDEIO::get( KURL("http://www.kde.org"), false, false); job->addMetaData("cookies", "none"); If you want to handle cookies yourself, you can do: -job = KIO::get( KURL("http://www.kde.org"), false, false); +job = TDEIO::get( KURL("http://www.kde.org"), false, false); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", "Cookie: foo=bar; gnat=gnork"); diff --git a/kio/Mainpage.dox b/kio/Mainpage.dox index bb7f2796f..7545c29ef 100644 --- a/kio/Mainpage.dox +++ b/kio/Mainpage.dox @@ -6,8 +6,8 @@ * this to provide its network-enabled file management. * * The easiest way to use this library from a %Trinity application is via the - * KIO::NetAccess class (for easy synchronous access) or via the - * KIO::Job class (for more complex asynchronous jobs). + * TDEIO::NetAccess class (for easy synchronous access) or via the + * TDEIO::Job class (for more complex asynchronous jobs). * * This library also implements the System Configuration Cache (KSycoca). * @@ -44,7 +44,7 @@ * view based on KIconView. Additionally, there are some compound views, * like a view using the icon-view for files on the right side and another * view for directories on the left. A view, that shows a preview for the - * currently selected file (using KIO::PreviewJob to generate previews) + * currently selected file (using TDEIO::PreviewJob to generate previews) * and any other view to show the files is also available. * * All those views share a common baseclass, named KFileView, which diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc index 49999e675..ac0d29b97 100644 --- a/kio/bookmarks/kbookmarkimporter_kde1.cc +++ b/kio/bookmarks/kbookmarkimporter_kde1.cc @@ -81,8 +81,8 @@ void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString & parentElem.appendChild( groupElem ); TQDomElement textElem = m_pDoc->createElement( "title" ); groupElem.appendChild( textElem ); - textElem.appendChild( m_pDoc->createTextNode( KIO::decodeFileName( ep->d_name ) ) ); - if ( KIO::decodeFileName( ep->d_name ) == "Toolbar" ) + textElem.appendChild( m_pDoc->createTextNode( TDEIO::decodeFileName( ep->d_name ) ) ); + if ( TDEIO::decodeFileName( ep->d_name ) == "Toolbar" ) groupElem.setAttribute("toolbar","yes"); scanIntern( groupElem, file.path() ); } @@ -136,7 +136,7 @@ void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _tex if (icon.right( 4 ) == ".xpm" ) // prevent warnings icon.truncate( icon.length() - 4 ); - TQString text = KIO::decodeFileName( TQString::fromLocal8Bit(_text) ); + TQString text = TDEIO::decodeFileName( TQString::fromLocal8Bit(_text) ); if ( text.length() > 8 && text.right( 8 ) == ".desktop" ) text.truncate( text.length() - 8 ); if ( text.length() > 7 && text.right( 7 ) == ".kdelnk" ) diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc index 9e6d711d2..a87e0f20e 100644 --- a/kio/bookmarks/kbookmarkmanager.cc +++ b/kio/bookmarks/kbookmarkmanager.cc @@ -702,7 +702,7 @@ KBookmarkSettings* KBookmarkSettings::s_self = 0; void KBookmarkSettings::readSettings() { - KConfig config("kbookmarkrc", false, false); + TDEConfig config("kbookmarkrc", false, false); config.setGroup("Bookmarks"); // add bookmark dialog usage - no reparse diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc index 20ce42a86..5e85bc1f6 100644 --- a/kio/bookmarks/kbookmarkmenu.cc +++ b/kio/bookmarks/kbookmarkmenu.cc @@ -1099,7 +1099,7 @@ void KBookmarkMenuNSImporter::endFolder() KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const TQString &id ) { - KConfig config("kbookmarkrc", false, false); + TDEConfig config("kbookmarkrc", false, false); config.setGroup("Bookmarks"); DynMenuInfo info; @@ -1131,7 +1131,7 @@ KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const TQString & TQStringList KBookmarkMenu::dynamicBookmarksList() { - KConfig config("kbookmarkrc", false, false); + TDEConfig config("kbookmarkrc", false, false); config.setGroup("Bookmarks"); TQStringList mlist; @@ -1145,7 +1145,7 @@ TQStringList KBookmarkMenu::dynamicBookmarksList() void KBookmarkMenu::setDynamicBookmarks(const TQString &id, const DynMenuInfo &newMenu) { - KConfig config("kbookmarkrc", false, false); + TDEConfig config("kbookmarkrc", false, false); // add group unconditionally config.setGroup("DynamicMenu-" + id); diff --git a/kio/bookmarks/kbookmarkmenu.h b/kio/bookmarks/kbookmarkmenu.h index fa0368b68..b54398a02 100644 --- a/kio/bookmarks/kbookmarkmenu.h +++ b/kio/bookmarks/kbookmarkmenu.h @@ -50,7 +50,7 @@ class KBookmarkOwner; class KBookmarkMenu; class KPopupMenu; -namespace KIO { class Job; } +namespace TDEIO { class Job; } /** * This class provides a bookmark menu. It is typically used in diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc index 6a5a1346c..0f2adf20a 100644 --- a/kio/httpfilter/httpfilter.cc +++ b/kio/httpfilter/httpfilter.cc @@ -275,7 +275,7 @@ HTTPFilterGZip::slotInput(const TQByteArray &d) } } if (!bHasFinished) - emit error( KIO::ERR_SLAVE_DEFINED, i18n("Unexpected end of data, some information may be lost.")); + emit error( TDEIO::ERR_SLAVE_DEFINED, i18n("Unexpected end of data, some information may be lost.")); return; } if (bHasFinished) @@ -332,7 +332,7 @@ HTTPFilterGZip::slotInput(const TQByteArray &d) int result = inflate( &zstr, Z_NO_FLUSH ); if ((result != Z_OK) && (result != Z_STREAM_END)) { - emit error( KIO::ERR_SLAVE_DEFINED, i18n("Receiving corrupt data.")); + emit error( TDEIO::ERR_SLAVE_DEFINED, i18n("Receiving corrupt data.")); break; } int bytesOut = 8192 - zstr.avail_out; diff --git a/kio/kcmodule.desktop b/kio/kcmodule.desktop index c3ab78532..5cbe9b786 100644 --- a/kio/kcmodule.desktop +++ b/kio/kcmodule.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=ServiceType -X-TDE-ServiceType=KCModule +X-TDE-ServiceType=TDECModule Name=TDE Control Module Name[af]=TDE Beheer Module Name[ar]=ÙˆØدة تØكم كيدي diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp index 8ba9d29bb..3f199fb92 100644 --- a/kio/kfile/kcombiview.cpp +++ b/kio/kfile/kcombiview.cpp @@ -305,14 +305,14 @@ KFileView *KCombiView::focusView( KFileView *preferred ) const return (preferred && w == preferred->widget()) ? preferred : other; } -void KCombiView::readConfig( KConfig *config, const TQString& group ) +void KCombiView::readConfig( TDEConfig *config, const TQString& group ) { left->readConfig( config, group ); if ( right ) right->readConfig( config, group ); } -void KCombiView::writeConfig( KConfig *config, const TQString& group ) +void KCombiView::writeConfig( TDEConfig *config, const TQString& group ) { left->writeConfig( config, group ); if ( right ) diff --git a/kio/kfile/kcombiview.h b/kio/kfile/kcombiview.h index 6186ab740..2747c51ad 100644 --- a/kio/kfile/kcombiview.h +++ b/kio/kfile/kcombiview.h @@ -93,8 +93,8 @@ public: virtual void setSorting( TQDir::SortSpec sort ); - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( KConfig *, const TQString& group = TQString::null); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); void ensureItemVisible( const KFileItem * ); diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp index 1c762bfb9..2049860d1 100644 --- a/kio/kfile/kcustommenueditor.cpp +++ b/kio/kfile/kcustommenueditor.cpp @@ -119,7 +119,7 @@ void KCustomMenuEditor::refreshButton() } void -KCustomMenuEditor::load(KConfigBase *cfg) +KCustomMenuEditor::load(TDEConfigBase *cfg) { cfg->setGroup(TQString::null); int count = cfg->readNumEntry("NrOfItems"); @@ -147,7 +147,7 @@ KCustomMenuEditor::load(KConfigBase *cfg) } void -KCustomMenuEditor::save(KConfigBase *cfg) +KCustomMenuEditor::save(TDEConfigBase *cfg) { // First clear the whole config file. TQStringList groups = cfg->groupList(); diff --git a/kio/kfile/kcustommenueditor.h b/kio/kfile/kcustommenueditor.h index cc20c6204..9112780b0 100644 --- a/kio/kfile/kcustommenueditor.h +++ b/kio/kfile/kcustommenueditor.h @@ -22,7 +22,7 @@ #include <kdialogbase.h> class KListView; -class KConfigBase; +class TDEConfigBase; /* * Dialog for editing custom menus. @@ -42,12 +42,12 @@ public: /** * load the custom menu */ - void load(KConfigBase *); + void load(TDEConfigBase *); /** * save the custom menu */ - void save(KConfigBase *); + void save(TDEConfigBase *); public slots: void slotNewItem(); diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index 0f2e9f4e1..1b7e11356 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -90,7 +90,7 @@ public: KActionSeparator *viewActionSeparator; int dropOptions; - KConfig *config; + TDEConfig *config; TQString configGroup; }; @@ -388,13 +388,13 @@ void KDirOperator::mkdir() TQString where = url().pathOrURL(); TQString name = i18n( "New Folder" ); if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() ) - name = KIO::RenameDlg::suggestName( url(), name ); + name = TDEIO::RenameDlg::suggestName( url(), name ); TQString dir = KInputDialog::getText( i18n( "New Folder" ), i18n( "Create new folder in:\n%1" ).arg( where ), name, &ok, this); if (ok) - mkdir( KIO::encodeFileName( dir ), true ); + mkdir( TDEIO::encodeFileName( dir ), true ); } bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) @@ -413,8 +413,8 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) for ( ; it != dirs.end(); ++it ) { url.addPath( *it ); - exists = KIO::NetAccess::exists( url, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( url, topLevelWidget() ); + exists = TDEIO::NetAccess::exists( url, false, 0 ); + writeOk = !exists && TDEIO::NetAccess::mkdir( url, topLevelWidget() ); } if ( exists ) // url was already existant @@ -433,13 +433,13 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) return writeOk; } -KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, +TDEIO::DeleteJob * KDirOperator::del( const KFileItemList& items, bool ask, bool showProgress ) { return del( items, this, ask, showProgress ); } -KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, +TDEIO::DeleteJob * KDirOperator::del( const KFileItemList& items, TQWidget *parent, bool ask, bool showProgress ) { @@ -483,7 +483,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, } if ( doIt ) { - KIO::DeleteJob *job = KIO::del( urls, false, showProgress ); + TDEIO::DeleteJob *job = TDEIO::del( urls, false, showProgress ); job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; @@ -502,7 +502,7 @@ void KDirOperator::deleteSelected() del( *list ); } -KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, +TDEIO::CopyJob * KDirOperator::trash( const KFileItemList& items, TQWidget *parent, bool ask, bool showProgress ) { @@ -546,7 +546,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, } if ( doIt ) { - KIO::CopyJob *job = KIO::trash( urls, showProgress ); + TDEIO::CopyJob *job = TDEIO::trash( urls, showProgress ); job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; @@ -718,7 +718,7 @@ void KDirOperator::pathChanged() // it may be, that we weren't ready at this time TQApplication::restoreOverrideCursor(); - // when KIO::Job emits finished, the slot will restore the cursor + // when TDEIO::Job emits finished, the slot will restore the cursor TQApplication::setOverrideCursor( tqwaitCursor ); if ( !isReadable( currUrl )) { @@ -812,8 +812,8 @@ bool KDirOperator::checkPreviewSupport() KToggleAction *previewAction = static_cast<KToggleAction*>( myActionCollection->action( "preview" )); bool hasPreviewSupport = false; - KConfig *kc = TDEGlobal::config(); - KConfigGroupSaver cs( kc, ConfigGroup ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver cs( kc, ConfigGroup ); if ( kc->readBoolEntry( "Show Default Preview", true ) ) hasPreviewSupport = checkPreviewInternal(); @@ -823,7 +823,7 @@ bool KDirOperator::checkPreviewSupport() bool KDirOperator::checkPreviewInternal() const { - TQStringList supported = KIO::PreviewJob::supportedMimeTypes(); + TQStringList supported = TDEIO::PreviewJob::supportedMimeTypes(); // no preview support for directories? if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 ) return false; @@ -1385,8 +1385,8 @@ void KDirOperator::setupMenu(int whichActions) actionMenu->insert( mkdirAction ); if (currUrl.isLocalFile() && !(TDEApplication::keyboardMouseState() & TQt::ShiftButton)) actionMenu->insert( myActionCollection->action( "trash" ) ); - KConfig *globalconfig = TDEGlobal::config(); - KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); + TDEConfig *globalconfig = TDEGlobal::config(); + TDEConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); if (!currUrl.isLocalFile() || (TDEApplication::keyboardMouseState() & TQt::ShiftButton) || globalconfig->readBoolEntry("ShowDeleteCommand", false)) actionMenu->insert( myActionCollection->action( "delete" ) ); @@ -1439,7 +1439,7 @@ void KDirOperator::updateViewActions() detailedAction->setChecked( KFile::isDetailView( fv )); } -void KDirOperator::readConfig( KConfig *kc, const TQString& group ) +void KDirOperator::readConfig( TDEConfig *kc, const TQString& group ) { if ( !kc ) return; @@ -1495,7 +1495,7 @@ void KDirOperator::readConfig( KConfig *kc, const TQString& group ) kc->setGroup( oldGroup ); } -void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) +void KDirOperator::writeConfig( TDEConfig *kc, const TQString& group ) { if ( !kc ) return; @@ -1718,13 +1718,13 @@ void KDirOperator::slotRefreshItems( const KFileItemList& items ) m_fileView->updateView( it.current() ); } -void KDirOperator::setViewConfig( KConfig *config, const TQString& group ) +void KDirOperator::setViewConfig( TDEConfig *config, const TQString& group ) { d->config = config; d->configGroup = group; } -KConfig * KDirOperator::viewConfig() +TDEConfig * KDirOperator::viewConfig() { return d->config; } diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h index e644f7b98..73798b92c 100644 --- a/kio/kfile/kdiroperator.h +++ b/kio/kfile/kdiroperator.h @@ -41,7 +41,7 @@ class KActionSeparator; class KActionMenu; class TQWidgetStack; class KProgress; -namespace KIO { +namespace TDEIO { class CopyJob; class DeleteJob; } @@ -60,7 +60,7 @@ namespace KIO { * show either a simple or detailed view and additionally a preview widget * (see setPreviewWidget()). KImageFilePreview is one implementation * of a preview widget, that displays previews for all supported filetypes - * utilizing KIO::PreviewJob. + * utilizing TDEIO::PreviewJob. * * Currently, those classes don't support Drag&Drop out of the box -- there * you have to use your own view-classes. You can use some DnD-aware views @@ -407,16 +407,16 @@ class KIO_EXPORT KDirOperator : public TQWidget * @since 3.1 */ // ### KDE4: make virtual - void setViewConfig( KConfig *config, const TQString& group ); + void setViewConfig( TDEConfig *config, const TQString& group ); /** - * Returns the KConfig object used for saving and restoring view's + * Returns the TDEConfig object used for saving and restoring view's * configuration. - * @returns the KConfig object used for saving and restoring view's + * @returns the TDEConfig object used for saving and restoring view's * configuration. * @since 3.1 */ - KConfig *viewConfig(); + TDEConfig *viewConfig(); /** * Returns the group name used for saving and restoring view's @@ -440,7 +440,7 @@ class KIO_EXPORT KDirOperator : public TQWidget * @see setViewConfig * @see writeConfig */ - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); /** * Saves the current settings like sorting, simple or detailed view. @@ -448,7 +448,7 @@ class KIO_EXPORT KDirOperator : public TQWidget * @see readConfig * @see setViewConfig */ - virtual void writeConfig( KConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null ); /** @@ -482,18 +482,18 @@ class KIO_EXPORT KDirOperator : public TQWidget bool mkdir( const TQString& directory, bool enterDirectory = true ); /** - * Starts and returns a KIO::DeleteJob to delete the given @p items. + * Starts and returns a TDEIO::DeleteJob to delete the given @p items. * * @param items the list of items to be deleted * @param ask specifies whether a confirmation dialog should be shown * @param showProgress passed to the DeleteJob to show a progress dialog */ // ### KDE4: make virtual - KIO::DeleteJob * del( const KFileItemList& items, + TDEIO::DeleteJob * del( const KFileItemList& items, bool ask = true, bool showProgress = true ); /** - * Starts and returns a KIO::DeleteJob to delete the given @p items. + * Starts and returns a TDEIO::DeleteJob to delete the given @p items. * * @param items the list of items to be deleted * @param parent the parent widget used for the confirmation dialog @@ -502,7 +502,7 @@ class KIO_EXPORT KDirOperator : public TQWidget * @since 3.1 */ // ### KDE4: make virtual - KIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent, + TDEIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent, bool ask = true, bool showProgress = true ); /** @@ -563,7 +563,7 @@ class KIO_EXPORT KDirOperator : public TQWidget void setDropOptions(int options); /** - * Starts and returns a KIO::CopyJob to trash the given @p items. + * Starts and returns a TDEIO::CopyJob to trash the given @p items. * * @param items the list of items to be trashed * @param parent the parent widget used for the confirmation dialog @@ -572,7 +572,7 @@ class KIO_EXPORT KDirOperator : public TQWidget * @since 3.4 */ // ### KDE4: make virtual - KIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent, + TDEIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent, bool ask = true, bool showProgress = true ); protected: @@ -634,7 +634,7 @@ protected: void prepareCompletionObjects(); /** - * Checks if there support from KIO::PreviewJob for the currently + * Checks if there support from TDEIO::PreviewJob for the currently * shown files, taking mimeFilter() and nameFilter() into account * Enables/disables the preview-action accordingly. */ diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index 8f8a8b299..48dd3a2e4 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -267,20 +267,20 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) } } -void KDirSelectDialog::readConfig( KConfig *config, const TQString& group ) +void KDirSelectDialog::readConfig( TDEConfig *config, const TQString& group ) { d->urlCombo->clear(); - KConfigGroup conf( config, group ); + TDEConfigGroup conf( config, group ); d->urlCombo->setHistoryItems( conf.readPathListEntry( "History Items" )); TQSize defaultSize( 400, 450 ); resize( conf.readSizeEntry( "DirSelectDialog Size", &defaultSize )); } -void KDirSelectDialog::saveConfig( KConfig *config, const TQString& group ) +void KDirSelectDialog::saveConfig( TDEConfig *config, const TQString& group ) { - KConfigGroup conf( config, group ); + TDEConfigGroup conf( config, group ); conf.writePathEntry( "History Items", d->urlCombo->historyItems(), ',', true, true); conf.writeEntry( "DirSelectDialog Size", size(), true, true ); @@ -406,9 +406,9 @@ void KDirSelectDialog::slotMkdir() TQString where = url().pathOrURL(); TQString name = i18n( "New Folder" ); if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() ) - name = KIO::RenameDlg::suggestName( url(), name ); + name = TDEIO::RenameDlg::suggestName( url(), name ); - TQString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ), + TQString directory = TDEIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ), i18n( "Create new folder in:\n%1" ).arg( where ), name, &ok, this)); if (!ok) @@ -425,8 +425,8 @@ void KDirSelectDialog::slotMkdir() for ( ; it != dirs.end(); ++it ) { folderurl.addPath( *it ); - exists = KIO::NetAccess::exists( folderurl, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( folderurl, topLevelWidget() ); + exists = TDEIO::NetAccess::exists( folderurl, false, 0 ); + writeOk = !exists && TDEIO::NetAccess::mkdir( folderurl, topLevelWidget() ); } if ( exists ) // url was already existant @@ -470,7 +470,7 @@ KURL KDirSelectDialog::selectDirectory( const TQString& startDir, myDialog.setCaption( caption ); if ( myDialog.exec() == TQDialog::Accepted ) - return KIO::NetAccess::mostLocalURL(myDialog.url(),parent); + return TDEIO::NetAccess::mostLocalURL(myDialog.url(),parent); else return KURL(); } diff --git a/kio/kfile/kdirselectdialog.h b/kio/kfile/kdirselectdialog.h index 79358f4f3..106fe77fc 100644 --- a/kio/kfile/kdirselectdialog.h +++ b/kio/kfile/kdirselectdialog.h @@ -25,7 +25,7 @@ class TQPopupMenu; class TQVBoxLayout; -class KConfig; +class TDEConfig; class KFileTreeBranch; class KFileTreeView; class KFileTreeViewItem; @@ -111,8 +111,8 @@ private slots: void slotMkdir(); private: - void readConfig( KConfig *config, const TQString& group ); - void saveConfig( KConfig *config, const TQString& group ); + void readConfig( TDEConfig *config, const TQString& group ); + void saveConfig( TDEConfig *config, const TQString& group ); void openNextDir( KFileTreeViewItem *parent ); KFileTreeBranch * createBranch( const KURL& url ); diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp index 3ab42817b..14936679a 100644 --- a/kio/kfile/kdirsize.cpp +++ b/kio/kfile/kdirsize.cpp @@ -24,16 +24,16 @@ #include <tqtimer.h> #include <config-kfile.h> -using namespace KIO; +using namespace TDEIO; KDirSize::KDirSize( const KURL & directory ) - : KIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L) + : TDEIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L) { startNextJob( directory ); } KDirSize::KDirSize( const KFileItemList & lstItems ) - : KIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems) + : TDEIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems) { TQTimer::singleShot( 0, this, TQT_SLOT(processList()) ); } @@ -69,38 +69,38 @@ void KDirSize::processList() void KDirSize::startNextJob( const KURL & url ) { - KIO::ListJob * listJob = KIO::listRecursive( url, false /* no GUI */ ); - connect( listJob, TQT_SIGNAL(entries( KIO::Job *, - const KIO::UDSEntryList& )), - TQT_SLOT( slotEntries( KIO::Job*, - const KIO::UDSEntryList& ))); + TDEIO::ListJob * listJob = TDEIO::listRecursive( url, false /* no GUI */ ); + connect( listJob, TQT_SIGNAL(entries( TDEIO::Job *, + const TDEIO::UDSEntryList& )), + TQT_SLOT( slotEntries( TDEIO::Job*, + const TDEIO::UDSEntryList& ))); addSubjob( listJob ); } -void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) +void KDirSize::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) { static const TQString& dot = TDEGlobal::staticQString( "." ); static const TQString& dotdot = TDEGlobal::staticQString( ".." ); - KIO::UDSEntryListConstIterator it = list.begin(); - KIO::UDSEntryListConstIterator end = list.end(); + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); for (; it != end; ++it) { - KIO::UDSEntry::ConstIterator it2 = (*it).begin(); - KIO::filesize_t size = 0; + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); + TDEIO::filesize_t size = 0; bool isLink = false; bool isDir = false; TQString name; for( ; it2 != (*it).end(); it2++ ) { switch( (*it2).m_uds ) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: name = (*it2).m_str; break; - case KIO::UDS_LINK_DEST: + case TDEIO::UDS_LINK_DEST: isLink = !(*it2).m_str.isEmpty(); break; - case KIO::UDS_SIZE: + case TDEIO::UDS_SIZE: size = ((*it2).m_long); break; - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: isDir = S_ISDIR((*it2).m_long); break; default: @@ -135,7 +135,7 @@ KDirSize * KDirSize::dirSizeJob( const KFileItemList & lstItems ) } //static -KIO::filesize_t KDirSize::dirSize( const KURL & directory ) +TDEIO::filesize_t KDirSize::dirSize( const KURL & directory ) { KDirSize * dirSize = dirSizeJob( directory ); dirSize->setSync(); @@ -144,9 +144,9 @@ KIO::filesize_t KDirSize::dirSize( const KURL & directory ) } -void KDirSize::slotResult( KIO::Job * job ) +void KDirSize::slotResult( TDEIO::Job * job ) { - kdDebug(kfile_area) << " KDirSize::slotResult( KIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; + kdDebug(kfile_area) << " KDirSize::slotResult( TDEIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; if ( !m_lstItems.isEmpty() ) { subjobs.remove(job); // Remove job, but don't kill this job. @@ -156,11 +156,11 @@ void KDirSize::slotResult( KIO::Job * job ) { if ( !m_bAsync ) tqApp->exit_loop(); - KIO::Job::slotResult( job ); + TDEIO::Job::slotResult( job ); } } void KDirSize::virtual_hook( int id, void* data ) -{ KIO::Job::virtual_hook( id, data ); } +{ TDEIO::Job::virtual_hook( id, data ); } #include "kdirsize.moc" diff --git a/kio/kfile/kdirsize.h b/kio/kfile/kdirsize.h index 64ae80765..41fe87eb6 100644 --- a/kio/kfile/kdirsize.h +++ b/kio/kfile/kdirsize.h @@ -27,7 +27,7 @@ * Computes a directory size (similar to "du", but doesn't give the same results * since we simply sum up the dir and file sizes, whereas du speaks disk blocks) */ -class KIO_EXPORT KDirSize : public KIO::Job +class KIO_EXPORT KDirSize : public TDEIO::Job { Q_OBJECT protected: @@ -39,14 +39,14 @@ public: /** * @return the size we found */ - KIO::filesize_t totalSize() const { return m_totalSize; } + TDEIO::filesize_t totalSize() const { return m_totalSize; } /** * @return the total number of files (counting symlinks to files, sockets * and character devices as files) in this directory and all sub-directories * @since 3.3 */ - KIO::filesize_t totalFiles() const { return m_totalFiles; } + TDEIO::filesize_t totalFiles() const { return m_totalFiles; } /** * @return the total number of sub-directories found (not including the @@ -54,7 +54,7 @@ public: * as directories) * @since 3.3 */ - KIO::filesize_t totalSubdirs() const { return m_totalSubdirs; } + TDEIO::filesize_t totalSubdirs() const { return m_totalSubdirs; } /** * Asynchronous method. Connect to the result signal. @@ -75,7 +75,7 @@ public: * Synchronous method - you get the result as soon as * the call returns. */ - static KIO::filesize_t dirSize( const KURL & directory ); + static TDEIO::filesize_t dirSize( const KURL & directory ); protected: /** @@ -87,15 +87,15 @@ protected: protected slots: - virtual void slotResult( KIO::Job *job ); - void slotEntries( KIO::Job * , const KIO::UDSEntryList &); + virtual void slotResult( TDEIO::Job *job ); + void slotEntries( TDEIO::Job * , const TDEIO::UDSEntryList &); void processList(); private: bool m_bAsync; - KIO::filesize_t m_totalSize; - KIO::filesize_t m_totalFiles; - KIO::filesize_t m_totalSubdirs; + TDEIO::filesize_t m_totalSize; + TDEIO::filesize_t m_totalFiles; + TDEIO::filesize_t m_totalSubdirs; KFileItemList m_lstItems; protected: virtual void virtual_hook( int id, void* data ); diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 21338c058..18245bdcd 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -163,7 +163,7 @@ void KDiskFreeSp::dfDone() KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path ) { KDiskFreeSp * job = new KDiskFreeSp; - TQString mountPoint = KIO::findPathMountPoint( path ); + TQString mountPoint = TDEIO::findPathMountPoint( path ); job->readDF( mountPoint ); return job; } diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp index 1bc6f6257..099a7cee5 100644 --- a/kio/kfile/kfiledetailview.cpp +++ b/kio/kfile/kfiledetailview.cpp @@ -130,12 +130,12 @@ KFileDetailView::~KFileDetailView() delete d; } -void KFileDetailView::readConfig( KConfig *config, const TQString& group ) +void KFileDetailView::readConfig( TDEConfig *config, const TQString& group ) { restoreLayout( config, group ); } -void KFileDetailView::writeConfig( KConfig *config, const TQString& group ) +void KFileDetailView::writeConfig( TDEConfig *config, const TQString& group ) { saveLayout( config, group ); } @@ -327,7 +327,7 @@ void KFileDetailView::setSortingKey( KFileListViewItem *item, TQDir::SortSpec spec = KFileView::sorting(); if ( spec & TQDir::Time ) - item->setKey( sortingKey( i->time( KIO::UDS_MODIFICATION_TIME ), + item->setKey( sortingKey( i->time( TDEIO::UDS_MODIFICATION_TIME ), i->isDir(), spec )); else if ( spec & TQDir::Size ) item->setKey( sortingKey( i->size(), i->isDir(), spec )); @@ -399,7 +399,7 @@ void KFileDetailView::slotSortingChanged( int col ) if ( sortSpec & TQDir::Time ) { for ( ; (item = it.current()); ++it ) - viewItem(item)->setKey( sortingKey( item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec )); + viewItem(item)->setKey( sortingKey( item->time( TDEIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec )); } else if ( sortSpec & TQDir::Size ) { diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h index 937c8f56c..9c41cfb91 100644 --- a/kio/kfile/kfiledetailview.h +++ b/kio/kfile/kfiledetailview.h @@ -149,8 +149,8 @@ public: void determineIcon( KFileListViewItem *item ); TQScrollView *scrollWidget() const { return (TQScrollView*) this; } - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( KConfig *, const TQString& group = TQString::null); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); signals: /** diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 5e1634144..1538d5dbc 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -97,7 +97,7 @@ enum Buttons { HOTLIST_BUTTON, PATH_COMBO, CONFIGURE_BUTTON }; -template class TQPtrList<KIO::StatJob>; +template class TQPtrList<TDEIO::StatJob>; namespace { static void silenceQToolBar(TQtMsgType, const char *) @@ -136,7 +136,7 @@ struct KFileDialogPrivate bool autoSelectExtChecked; // whether or not the _user_ has checked the above box TQString extension; // current extension for this filter - TQPtrList<KIO::StatJob> statJobs; + TQPtrList<TDEIO::StatJob> statJobs; KURL::List urlList; //the list of selected urls @@ -185,7 +185,7 @@ KFileDialog::~KFileDialog() { hide(); - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (d->urlBar) d->urlBar->save( config ); @@ -402,7 +402,7 @@ void KFileDialog::slotOk() } } - KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); + KURL url = TDEIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { // ### after message freeze, add message for directories! @@ -446,7 +446,7 @@ void KFileDialog::slotOk() return; } - KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); + KURL url = TDEIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { KMessageBox::sorry( d->mainWidget, @@ -528,12 +528,12 @@ void KFileDialog::slotOk() if (!kapp->authorizeURLAction("open", KURL(), d->url)) { - TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL()); + TQString msg = TDEIO::buildErrorString(TDEIO::ERR_ACCESS_DENIED, d->url.prettyURL()); KMessageBox::error( d->mainWidget, msg); return; } - KIO::StatJob *job = 0L; + TDEIO::StatJob *job = 0L; d->statJobs.clear(); d->filenames = KShell::tildeExpand(locationEdit->currentText()); @@ -546,7 +546,7 @@ void KFileDialog::slotOk() { if (!kapp->authorizeURLAction("open", KURL(), *it)) { - TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL()); + TQString msg = TDEIO::buildErrorString(TDEIO::ERR_ACCESS_DENIED, (*it).prettyURL()); KMessageBox::error( d->mainWidget, msg); return; } @@ -554,32 +554,32 @@ void KFileDialog::slotOk() for ( KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it ) { - job = KIO::stat( *it, !(*it).isLocalFile() ); + job = TDEIO::stat( *it, !(*it).isLocalFile() ); job->setWindow (topLevelWidget()); - KIO::Scheduler::scheduleJob( job ); + TDEIO::Scheduler::scheduleJob( job ); d->statJobs.append( job ); - connect( job, TQT_SIGNAL( result(KIO::Job *) ), - TQT_SLOT( slotStatResult( KIO::Job *) )); + connect( job, TQT_SIGNAL( result(TDEIO::Job *) ), + TQT_SLOT( slotStatResult( TDEIO::Job *) )); } return; } - job = KIO::stat(d->url,!d->url.isLocalFile()); + job = TDEIO::stat(d->url,!d->url.isLocalFile()); job->setWindow (topLevelWidget()); d->statJobs.append( job ); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*))); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotStatResult(TDEIO::Job*))); } -static bool isDirectory (const KIO::UDSEntry &t) +static bool isDirectory (const TDEIO::UDSEntry &t) { bool isDir = false; - for (KIO::UDSEntry::ConstIterator it = t.begin(); + for (TDEIO::UDSEntry::ConstIterator it = t.begin(); it != t.end(); it++) { - if ((*it).m_uds == KIO::UDS_FILE_TYPE) + if ((*it).m_uds == TDEIO::UDS_FILE_TYPE) { isDir = S_ISDIR ((mode_t) ((*it).m_long)); break; @@ -592,10 +592,10 @@ static bool isDirectory (const KIO::UDSEntry &t) // FIXME : count all errors and show messagebox when d->statJobs.count() == 0 // in case of an error, we cancel the whole operation (clear d->statJobs and // don't call accept) -void KFileDialog::slotStatResult(KIO::Job* job) +void KFileDialog::slotStatResult(TDEIO::Job* job) { kdDebug(kfile_area) << "slotStatResult" << endl; - KIO::StatJob *sJob = static_cast<KIO::StatJob *>( job ); + TDEIO::StatJob *sJob = static_cast<TDEIO::StatJob *>( job ); if ( !d->statJobs.removeRef( sJob ) ) { return; @@ -611,7 +611,7 @@ void KFileDialog::slotStatResult(KIO::Job* job) return; } - KIO::UDSEntry t = sJob->statResult(); + TDEIO::UDSEntry t = sJob->statResult(); if (isDirectory (t)) { if ( ops->dirOnlyMode() ) @@ -672,7 +672,7 @@ void KFileDialog::accept() locationEdit->insertItem( file, 1 ); } - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setForceGlobal( true ); writeConfig( config, ConfigGroup ); config->setForceGlobal( false ); @@ -1038,7 +1038,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge initGUI(); // activate GM - KConfig* config = TDEGlobal::config(); + TDEConfig* config = TDEGlobal::config(); readRecentFiles( config ); adjustSize(); @@ -1550,7 +1550,7 @@ TQString KFileDialog::selectedFile() const { if ( result() == TQDialog::Accepted ) { - KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); + KURL url = TDEIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if (url.isLocalFile()) return url.path(); else { @@ -1572,7 +1572,7 @@ TQStringList KFileDialog::selectedFiles() const KURL::List urls = parseSelectedURLs(); TQValueListConstIterator<KURL> it = urls.begin(); while ( it != urls.end() ) { - url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget()); + url = TDEIO::NetAccess::mostLocalURL(*it,topLevelWidget()); if ( url.isLocalFile() ) list.append( url.path() ); ++it; @@ -1698,7 +1698,7 @@ KFile::Mode KFileDialog::mode() const } -void KFileDialog::readConfig( KConfig *kc, const TQString& group ) +void KFileDialog::readConfig( TDEConfig *kc, const TQString& group ) { if ( !kc ) return; @@ -1749,7 +1749,7 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group ) kc->setGroup( oldGroup ); } -void KFileDialog::writeConfig( KConfig *kc, const TQString& group ) +void KFileDialog::writeConfig( TDEConfig *kc, const TQString& group ) { if ( !kc ) return; @@ -1771,7 +1771,7 @@ void KFileDialog::writeConfig( KConfig *kc, const TQString& group ) } -void KFileDialog::readRecentFiles( KConfig *kc ) +void KFileDialog::readRecentFiles( TDEConfig *kc ) { TQString oldGroup = kc->group(); kc->setGroup( ConfigGroup ); @@ -1786,7 +1786,7 @@ void KFileDialog::readRecentFiles( KConfig *kc ) kc->setGroup( oldGroup ); } -void KFileDialog::saveRecentFiles( KConfig *kc ) +void KFileDialog::saveRecentFiles( TDEConfig *kc ) { TQString oldGroup = kc->group(); kc->setGroup( ConfigGroup ); @@ -1816,7 +1816,7 @@ void KFileDialog::slotCancel() ops->close(); KDialogBase::slotCancel(); - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setForceGlobal( true ); writeConfig( config, ConfigGroup ); config->setForceGlobal( false ); @@ -2069,8 +2069,8 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) ) { // exists? - KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, topLevelWidget())) + TDEIO::UDSEntry t; + if (TDEIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists" << endl; @@ -2142,13 +2142,13 @@ void KFileDialog::appendExtension (KURL &url) const bool suppressExtension = (dot == len - 1); const bool unspecifiedExtension = (dot <= 0); - // don't KIO::NetAccess::Stat if unnecessary + // don't TDEIO::NetAccess::Stat if unnecessary if (!(suppressExtension || unspecifiedExtension)) return; // exists? - KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, topLevelWidget())) + TDEIO::UDSEntry t; + if (TDEIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl; return; diff --git a/kio/kfile/kfiledialog.h b/kio/kfile/kfiledialog.h index 33e0c9b12..51d817b2f 100644 --- a/kio/kfile/kfiledialog.h +++ b/kio/kfile/kfiledialog.h @@ -854,22 +854,22 @@ protected: /** * Reads configuration and applies it (size, recent directories, ...) */ - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); /** * Saves the current configuration */ - virtual void writeConfig( KConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null ); /** * Reads the recent used files and inserts them into the location combobox */ - virtual void readRecentFiles( KConfig * ); + virtual void readRecentFiles( TDEConfig * ); /** * Saves the entries from the location combobox. */ - virtual void saveRecentFiles( KConfig * ); + virtual void saveRecentFiles( TDEConfig * ); /** * Parses the string "line" for files. If line doesn't contain any ", the @@ -929,7 +929,7 @@ protected slots: void slotFilterChanged(); void fileHighlighted(const KFileItem *i); void fileSelected(const KFileItem *i); - void slotStatResult(KIO::Job* job); + void slotStatResult(TDEIO::Job* job); void slotLoadingFinished(); void fileCompletion( const TQString& ); diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index a9882d56f..5d9977de6 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -102,7 +102,7 @@ public: KRadioAction *smallColumns, *largeRows; KAction *zoomIn, *zoomOut; KToggleAction *previews; - KIO::PreviewJob *job; + TDEIO::PreviewJob *job; KFileIconViewItem *dropItem; TQTimer previewTimer; TQTimer autoOpenTimer; @@ -187,10 +187,10 @@ KFileIconView::~KFileIconView() delete d; } -void KFileIconView::readConfig( KConfig *kc, const TQString& group ) +void KFileIconView::readConfig( TDEConfig *kc, const TQString& group ) { TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; - KConfigGroupSaver cs( kc, gr ); + TDEConfigGroupSaver cs( kc, gr ); TQString small = TQString::fromLatin1("SmallColumns"); d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE ); d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) ); @@ -208,10 +208,10 @@ void KFileIconView::readConfig( KConfig *kc, const TQString& group ) showPreviews(); } -void KFileIconView::writeConfig( KConfig *kc, const TQString& group ) +void KFileIconView::writeConfig( TDEConfig *kc, const TQString& group ) { TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; - KConfigGroupSaver cs( kc, gr ); + TDEConfigGroupSaver cs( kc, gr ); TQString viewMode = d->smallColumns->isChecked() ? TQString::fromLatin1("SmallColumns") : @@ -578,7 +578,7 @@ void KFileIconView::slotPreviewsToggled( bool on ) void KFileIconView::showPreviews() { if ( d->previewMimeTypes.isEmpty() ) - d->previewMimeTypes = KIO::PreviewJob::supportedMimeTypes(); + d->previewMimeTypes = TDEIO::PreviewJob::supportedMimeTypes(); stopPreview(); d->previews->setChecked( true ); @@ -591,18 +591,18 @@ void KFileIconView::showPreviews() updateIcons(); } - d->job = KIO::filePreview(*items(), d->previewIconSize,d->previewIconSize); + d->job = TDEIO::filePreview(*items(), d->previewIconSize,d->previewIconSize); d->job->setIgnoreMaximumSize(d->ignoreMaximumSize); - connect( d->job, TQT_SIGNAL( result( KIO::Job * )), - this, TQT_SLOT( slotPreviewResult( KIO::Job * ))); + connect( d->job, TQT_SIGNAL( result( TDEIO::Job * )), + this, TQT_SLOT( slotPreviewResult( TDEIO::Job * ))); connect( d->job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )), TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) )); // connect( d->job, TQT_SIGNAL( failed( const KFileItem* )), // this, TQT_SLOT( slotFailed( const KFileItem* ) )); } -void KFileIconView::slotPreviewResult( KIO::Job *job ) +void KFileIconView::slotPreviewResult( TDEIO::Job *job ) { if ( job == d->job ) d->job = 0L; @@ -683,7 +683,7 @@ void KFileIconView::setSorting( TQDir::SortSpec spec ) if ( spec & TQDir::Time ) { for ( ; (item = it.current()); ++it ) // warning, time_t is often signed -> cast it - viewItem(item)->setKey( sortingKey( (unsigned long)item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), spec )); + viewItem(item)->setKey( sortingKey( (unsigned long)item->time( TDEIO::UDS_MODIFICATION_TIME ), item->isDir(), spec )); } else if ( spec & TQDir::Size ) { @@ -775,7 +775,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i, if ( spec & TQDir::Time ) // warning, time_t is often signed -> cast it - item->setKey( sortingKey( (unsigned long) i->time( KIO::UDS_MODIFICATION_TIME ), + item->setKey( sortingKey( (unsigned long) i->time( TDEIO::UDS_MODIFICATION_TIME ), i->isDir(), spec )); else if ( spec & TQDir::Size ) item->setKey( sortingKey( i->size(), i->isDir(), spec )); diff --git a/kio/kfile/kfileiconview.h b/kio/kfile/kfileiconview.h index a4fd34ea1..209e4828a 100644 --- a/kio/kfile/kfileiconview.h +++ b/kio/kfile/kfileiconview.h @@ -68,7 +68,7 @@ private: }; -namespace KIO { +namespace TDEIO { class Job; } @@ -141,8 +141,8 @@ public: virtual void setSorting(TQDir::SortSpec sort); - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( KConfig *, const TQString& group = TQString::null); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); // for KMimeTypeResolver void mimeTypeDeterminationFinished(); @@ -212,7 +212,7 @@ private slots: void slotLargeRows(); void slotPreviewsToggled( bool ); - void slotPreviewResult( KIO::Job * ); + void slotPreviewResult( TDEIO::Job * ); void gotPreview( const KFileItem *item, const TQPixmap& pix ); void slotAutoOpen(); diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp index b221a1ebb..04124570b 100644 --- a/kio/kfile/kfilepreview.cpp +++ b/kio/kfile/kfilepreview.cpp @@ -264,12 +264,12 @@ KActionCollection * KFilePreview::actionCollection() const } } -void KFilePreview::readConfig( KConfig *config, const TQString& group ) +void KFilePreview::readConfig( TDEConfig *config, const TQString& group ) { left->readConfig( config, group ); } -void KFilePreview::writeConfig( KConfig *config, const TQString& group ) +void KFilePreview::writeConfig( TDEConfig *config, const TQString& group ) { left->writeConfig( config, group ); } diff --git a/kio/kfile/kfilepreview.h b/kio/kfile/kfilepreview.h index 123d221f1..79dda2984 100644 --- a/kio/kfile/kfilepreview.h +++ b/kio/kfile/kfilepreview.h @@ -83,8 +83,8 @@ public: virtual void setSorting( TQDir::SortSpec sort ); - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( KConfig *, const TQString& group = TQString::null); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); /** * This overrides KFileView::actionCollection() by returning diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp index 9ab3b8ee5..567d929eb 100644 --- a/kio/kfile/kfilespeedbar.cpp +++ b/kio/kfile/kfilespeedbar.cpp @@ -35,8 +35,8 @@ KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name ) : KURLBar( true, parent, name ) { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, ConfigGroup ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, ConfigGroup ); m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", true ); setIconSize(KIcon::SizeSmallMedium); @@ -121,11 +121,11 @@ KFileSpeedBar::~KFileSpeedBar() { } -void KFileSpeedBar::save( KConfig *config ) +void KFileSpeedBar::save( TDEConfig *config ) { if ( m_initializeSpeedbar && isModified() ) { - KConfigGroup conf( config, ConfigGroup ); + TDEConfigGroup conf( config, ConfigGroup ); // write to kdeglobals conf.writeEntry( "Set speedbar defaults", false, true, true ); } diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h index 28c621651..f7a27131b 100644 --- a/kio/kfile/kfilespeedbar.h +++ b/kio/kfile/kfilespeedbar.h @@ -21,7 +21,7 @@ #include <kurlbar.h> -class KConfig; +class TDEConfig; class KIO_EXPORT KFileSpeedBar : public KURLBar { @@ -30,7 +30,7 @@ public: KFileSpeedBar( TQWidget *parent = 0, const char *name = 0 ); ~KFileSpeedBar(); - virtual void save( KConfig *config ); + virtual void save( TDEConfig *config ); virtual TQSize sizeHint() const; private: diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp index b32746aa6..a62b8aa50 100644 --- a/kio/kfile/kfileview.cpp +++ b/kio/kfile/kfileview.cpp @@ -212,8 +212,8 @@ sort_by_name: break; case TQDir::Time: { - time_t t1 = fi1->time( KIO::UDS_MODIFICATION_TIME ); - time_t t2 = fi2->time( KIO::UDS_MODIFICATION_TIME ); + time_t t1 = fi1->time( TDEIO::UDS_MODIFICATION_TIME ); + time_t t2 = fi2->time( TDEIO::UDS_MODIFICATION_TIME ); if ( t1 != t2 ) { bigger = (t1 > t2); break; @@ -228,8 +228,8 @@ sort_by_name: } case TQDir::Size: { - KIO::filesize_t s1 = fi1->size(); - KIO::filesize_t s2 = fi2->size(); + TDEIO::filesize_t s1 = fi1->size(); + TDEIO::filesize_t s2 = fi2->size(); if ( s1 != s2 ) { bigger = (s1 > s2); break; @@ -369,11 +369,11 @@ KActionCollection * KFileView::actionCollection() const return d->actions; } -void KFileView::readConfig( KConfig *, const TQString& ) +void KFileView::readConfig( TDEConfig *, const TQString& ) { } -void KFileView::writeConfig( KConfig *, const TQString& ) +void KFileView::writeConfig( TDEConfig *, const TQString& ) { } @@ -386,12 +386,12 @@ TQString KFileView::sortingKey( const TQString& value, bool isDir, int sortSpec return result.prepend( start ); } -TQString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec) +TQString KFileView::sortingKey( TDEIO::filesize_t value, bool isDir, int sortSpec) { bool reverse = sortSpec & TQDir::Reversed; bool dirsFirst = sortSpec & TQDir::DirsFirst; char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1'; - return KIO::number( value ).rightJustify( 24, '0' ).prepend( start ); + return TDEIO::number( value ).rightJustify( 24, '0' ).prepend( start ); } void KFileView::setDropOptions(int options) diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h index bce408327..5a6bfd002 100644 --- a/kio/kfile/kfileview.h +++ b/kio/kfile/kfileview.h @@ -346,8 +346,8 @@ public: KFileViewSignaler * signaler() const { return sig; } - virtual void readConfig( KConfig *, const TQString& group = TQString::null ); - virtual void writeConfig( KConfig *, const TQString& group = TQString::null); + virtual void readConfig( TDEConfig *, const TQString& group = TQString::null ); + virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null); /** * Various options for drag and drop support. @@ -392,10 +392,10 @@ public: /** * An overloaded method that takes not a TQString, but a number as sort * criterion. You can use this for file-sizes or dates/times for example. - * If you use a time_t, you need to cast that to KIO::filesize_t because + * If you use a time_t, you need to cast that to TDEIO::filesize_t because * of ambiguity problems. */ - static TQString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec); + static TQString sortingKey( TDEIO::filesize_t value, bool isDir,int sortSpec); /** * @internal diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp index c55acaf9e..0cc0ef2a7 100644 --- a/kio/kfile/kimagefilepreview.cpp +++ b/kio/kfile/kimagefilepreview.cpp @@ -35,8 +35,8 @@ KImageFilePreview::KImageFilePreview( TQWidget *parent ) : KPreviewWidgetBase( parent ), m_job( 0L ) { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, ConfigGroup ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, ConfigGroup ); autoMode = config->readBoolEntry( "Automatic Preview", true ); TQVBoxLayout *vb = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); @@ -62,7 +62,7 @@ KImageFilePreview::KImageFilePreview( TQWidget *parent ) timer = new TQTimer( this ); connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(showPreview()) ); - setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() ); + setSupportedMimeTypes( TDEIO::PreviewJob::supportedMimeTypes() ); } KImageFilePreview::~KImageFilePreview() @@ -70,8 +70,8 @@ KImageFilePreview::~KImageFilePreview() if ( m_job ) m_job->kill(); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, ConfigGroup ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, ConfigGroup ); config->writeEntry( "Automatic Preview", autoPreview->isChecked() ); } @@ -109,8 +109,8 @@ void KImageFilePreview::showPreview( const KURL &url, bool force ) if ( force ) // explicitly requested previews shall always be generated! m_job->setIgnoreMaximumSize( true ); - connect( m_job, TQT_SIGNAL( result( KIO::Job * )), - this, TQT_SLOT( slotResult( KIO::Job * ))); + connect( m_job, TQT_SIGNAL( result( TDEIO::Job * )), + this, TQT_SLOT( slotResult( TDEIO::Job * ))); connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )), TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) )); @@ -142,11 +142,11 @@ TQSize KImageFilePreview::sizeHint() const return TQSize( 20, 200 ); // otherwise it ends up huge??? } -KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h ) +TDEIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h ) { KURL::List urls; urls.append( url ); - return KIO::filePreview( urls, w, h, 0, 0, true, false ); + return TDEIO::filePreview( urls, w, h, 0, 0, true, false ); } void KImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm ) @@ -164,7 +164,7 @@ void KImageFilePreview::slotFailed( const KFileItem* item ) KIcon::DisabledState )); } -void KImageFilePreview::slotResult( KIO::Job *job ) +void KImageFilePreview::slotResult( TDEIO::Job *job ) { if ( job == m_job ) m_job = 0L; diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h index 864fc5d31..a86f4f923 100644 --- a/kio/kfile/kimagefilepreview.h +++ b/kio/kfile/kimagefilepreview.h @@ -23,7 +23,7 @@ class TQTimer; class KFileDialog; class KFileItem; -namespace KIO { class Job; class PreviewJob; } +namespace TDEIO { class Job; class PreviewJob; } /** * Image preview widget for the file dialog. @@ -51,11 +51,11 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase protected: virtual void resizeEvent(TQResizeEvent *e); - virtual KIO::PreviewJob * createJob( const KURL& url, + virtual TDEIO::PreviewJob * createJob( const KURL& url, int w, int h ); private slots: - void slotResult( KIO::Job * ); + void slotResult( TDEIO::Job * ); virtual void slotFailed( const KFileItem* ); private: @@ -66,7 +66,7 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase TQLabel *infoLabel; TQCheckBox *autoPreview; TQPushButton *previewButton; - KIO::PreviewJob *m_job; + TDEIO::PreviewJob *m_job; protected: virtual void virtual_hook( int id, void* data ); private: diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index 69d7be4e8..088f9be54 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -915,7 +915,7 @@ void KNotifyWidget::openExecDialog( KURLRequester *requester ) void KNotifyWidget::playSound() { TQString soundPath = m_soundPath->url(); - if (!KIO::NetAccess::exists( m_soundPath->url(), true, 0 )) { + if (!TDEIO::NetAccess::exists( m_soundPath->url(), true, 0 )) { bool foundSound=false; // find the first "sound"-resource that contains files @@ -930,7 +930,7 @@ void KNotifyWidget::playSound() while ( it != soundDirs.end() ) { dir = *it; if ( dir.isReadable() && dir.count() > 2 && - KIO::NetAccess::exists( *it + m_soundPath->url(), true, 0 )) { + TDEIO::NetAccess::exists( *it + m_soundPath->url(), true, 0 )) { foundSound=true; soundPath = *it + m_soundPath->url(); break; @@ -1003,8 +1003,8 @@ Application::Application( const TQString &path ) TQString config_file = path; config_file[config_file.find('/')] = '.'; m_events = 0L; - config = new KConfig(config_file, false, false); - kc = new KConfig(path, true, false, "data"); + config = new TDEConfig(config_file, false, false); + kc = new TDEConfig(path, true, false, "data"); kc->setGroup( TQString::fromLatin1("!Global!") ); m_icon = kc->readEntry(TQString::fromLatin1("IconName"), TQString::fromLatin1("misc")); diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h index ef5d356fd..acab7e23f 100644 --- a/kio/kfile/knotifydialog.h +++ b/kio/kfile/knotifydialog.h @@ -168,8 +168,8 @@ namespace KNotify TQString m_appname; EventList *m_events; - KConfig *kc; // The file that defines the events. - KConfig *config; // The file that contains the settings for the events + TDEConfig *kc; // The file that defines the events. + TDEConfig *config; // The file that contains the settings for the events }; diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index 9a3fcabd1..efeaa1f02 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -412,8 +412,8 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // init the history combo and insert it into the URL-Requester KHistoryCombo *combo = new KHistoryCombo(); combo->setDuplicatesEnabled( false ); - KConfig *kc = TDEGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), @@ -483,7 +483,7 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // check to see if we use konsole if not disable the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); + TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); if (bReadOnly || preferredTerminal != "konsole") @@ -666,7 +666,7 @@ void KOpenWithDlg::slotOK() if (terminal->isChecked()) { - KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); + TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); m_command = preferredTerminal; // only add --noclose when we are sure it is konsole we're using @@ -813,8 +813,8 @@ void KOpenWithDlg::accept() if ( combo ) { combo->addToHistory( edit->url() ); - KConfig *kc = TDEGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); kc->writeEntry(TQString::fromLatin1("CompletionMode"), combo->completionMode()); diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index 94b95a2b6..e9296ca90 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -146,7 +146,7 @@ static TQString nameFromFileName(TQString nameStr) if ( nameStr.endsWith(".kdelnk") ) nameStr.truncate( nameStr.length() - 7 ); // Make it human-readable (%2F => '/', ...) - nameStr = KIO::decodeFileName( nameStr ); + nameStr = TDEIO::decodeFileName( nameStr ); return nameStr; } @@ -174,7 +174,7 @@ public: KPropertiesDialog::KPropertiesDialog (KFileItem* item, TQWidget* parent, const char* name, bool modal, bool autoShow) - : KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(KIO::decodeFileName(item->url().fileName())), + : KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(item->url().fileName())), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, modal) { @@ -206,7 +206,7 @@ KPropertiesDialog::KPropertiesDialog (KFileItemList _items, // TODO: replace <never used> with "Properties for 1 item". It's very confusing how it has to be translated otherwise // (empty translation before the "\n" is not allowed by msgfmt...) _items.count()>1 ? i18n( "<never used>","Properties for %n Selected Items",_items.count()) : - i18n( "Properties for %1" ).arg(KIO::decodeFileName(_items.first()->url().fileName())), + i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_items.first()->url().fileName())), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, modal) { @@ -229,16 +229,16 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now u TQWidget* parent, const char* name, bool modal, bool autoShow) : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())), + i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_url.fileName())), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, modal), m_singleUrl( _url ) { d = new KPropertiesDialogPrivate; - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; - KIO::NetAccess::stat(_url, entry, parent); + TDEIO::NetAccess::stat(_url, entry, parent); m_items.append( new KFileItem( entry, _url ) ); init (modal, autoShow); @@ -249,16 +249,16 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url, TQWidget* parent, const char* name, bool modal, bool autoShow) : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())), + i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_url.fileName())), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, modal), m_singleUrl( _url ) { d = new KPropertiesDialogPrivate; - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; - KIO::NetAccess::stat(_url, entry, parent); + TDEIO::NetAccess::stat(_url, entry, parent); m_items.append( new KFileItem( entry, _url ) ); init (modal, autoShow); @@ -269,7 +269,7 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _current TQWidget* parent, const char* name, bool modal, bool autoShow) : KDialogBase (KDialogBase::Tabbed, - i18n( "Properties for %1" ).arg(KIO::decodeFileName(_tempUrl.fileName())), + i18n( "Properties for %1" ).arg(TDEIO::decodeFileName(_tempUrl.fileName())), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, modal), @@ -360,7 +360,7 @@ void KPropertiesDialog::setFileNameReadOnly( bool ro ) } } -void KPropertiesDialog::slotStatResult( KIO::Job * ) +void KPropertiesDialog::slotStatResult( TDEIO::Job * ) { } @@ -725,7 +725,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) TQString mimeComment = item->mimeComment(); d->mimeType = item->mimetype(); bool hasTotalSize; - KIO::filesize_t totalSize = item->size(hasTotalSize); + TDEIO::filesize_t totalSize = item->size(hasTotalSize); TQString magicMimeComment; if ( isLocal ) { KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() ); @@ -894,7 +894,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) { TQLabel *lab = new TQLabel(d->m_frame ); if ( d->bMultiple ) - lab->setText( KIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) ); + lab->setText( TDEIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) ); else lab->setText( filename ); nameArea = lab; @@ -992,7 +992,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) if ( !hasDirs ) // Only files [and symlinks] { if(hasTotalSize) { - m_sizeLabel->setText(KIO::convertSizeWithBytes(totalSize)); + m_sizeLabel->setText(TDEIO::convertSizeWithBytes(totalSize)); } m_sizeDetermineButton = 0L; @@ -1034,7 +1034,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) { TQDateTime dt; bool hasTime; - time_t tim = item->time(KIO::UDS_CREATION_TIME, hasTime); + time_t tim = item->time(TDEIO::UDS_CREATION_TIME, hasTime); if ( hasTime ) { l = new TQLabel(i18n("Created:"), d->m_frame ); @@ -1045,7 +1045,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addWidget(l, curRow++, 2); } - tim = item->time(KIO::UDS_MODIFICATION_TIME, hasTime); + tim = item->time(TDEIO::UDS_MODIFICATION_TIME, hasTime); if ( hasTime ) { l = new TQLabel(i18n("Modified:"), d->m_frame ); @@ -1056,7 +1056,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addWidget(l, curRow++, 2); } - tim = item->time(KIO::UDS_ACCESS_TIME, hasTime); + tim = item->time(TDEIO::UDS_ACCESS_TIME, hasTime); if ( hasTime ) { l = new TQLabel(i18n("Accessed:"), d->m_frame ); @@ -1074,7 +1074,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->addMultiCellWidget(sep, curRow, curRow, 0, 2); ++curRow; - TQString mountPoint = KIO::findPathMountPoint( url.path() ); + TQString mountPoint = TDEIO::findPathMountPoint( url.path() ); if (mountPoint != "/") { @@ -1193,8 +1193,8 @@ void KFilePropsPlugin::slotFoundMountPoint( const TQString&, d->m_freeSpaceLabel->setText( // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(KIO::convertSizeFromKB(kBAvail)) - .arg(KIO::convertSizeFromKB(kBSize)) + .arg(TDEIO::convertSizeFromKB(kBAvail)) + .arg(TDEIO::convertSizeFromKB(kBSize)) .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); } @@ -1208,34 +1208,34 @@ void KFilePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize, d->m_freeSpaceLabel->setText( // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(KIO::convertSizeFromKB(kBAvail)) - .arg(KIO::convertSizeFromKB(kBSize)) + .arg(TDEIO::convertSizeFromKB(kBAvail)) + .arg(TDEIO::convertSizeFromKB(kBSize)) .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); } void KFilePropsPlugin::slotDirSizeUpdate() { - KIO::filesize_t totalSize = d->dirSizeJob->totalSize(); - KIO::filesize_t totalFiles = d->dirSizeJob->totalFiles(); - KIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs(); + TDEIO::filesize_t totalSize = d->dirSizeJob->totalSize(); + TDEIO::filesize_t totalFiles = d->dirSizeJob->totalFiles(); + TDEIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs(); m_sizeLabel->setText( i18n("Calculating... %1 (%2)\n%3, %4") - .arg(KIO::convertSize(totalSize)) + .arg(TDEIO::convertSize(totalSize)) .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); } -void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) +void KFilePropsPlugin::slotDirSizeFinished( TDEIO::Job * job ) { if (job->error()) m_sizeLabel->setText( job->errorString() ); else { - KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize(); - KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles(); - KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); + TDEIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize(); + TDEIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles(); + TDEIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") - .arg(KIO::convertSize(totalSize)) + .arg(TDEIO::convertSize(totalSize)) .arg(TDEGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs))); @@ -1259,8 +1259,8 @@ void KFilePropsPlugin::slotSizeDetermine() connect( d->dirSizeUpdateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDirSizeUpdate() ) ); d->dirSizeUpdateTimer->start(500); - connect( d->dirSizeJob, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotDirSizeFinished( KIO::Job * ) ) ); + connect( d->dirSizeJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotDirSizeFinished( TDEIO::Job * ) ) ); m_sizeStopButton->setEnabled(true); m_sizeDetermineButton->setEnabled(false); @@ -1270,7 +1270,7 @@ void KFilePropsPlugin::slotSizeDetermine() bool isLocal; KFileItem * item = properties->item(); KURL url = item->mostLocalURL( isLocal ); - TQString mountPoint = KIO::findPathMountPoint( url.path() ); + TQString mountPoint = TDEIO::findPathMountPoint( url.path() ); KDiskFreeSp * job = new KDiskFreeSp; connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&, @@ -1334,10 +1334,10 @@ void KFilePropsPlugin::applyChanges() kdDebug(250) << "oldname = " << oldName << endl; kdDebug(250) << "newname = " << n << endl; if ( oldName != n || m_bFromTemplate ) { // true for any from-template file - KIO::Job * job = 0L; + TDEIO::Job * job = 0L; KURL oldurl = properties->kurl(); - TQString newFileName = KIO::encodeFileName(n); + TQString newFileName = TDEIO::encodeFileName(n); if (d->bDesktopFile && !newFileName.endsWith(".desktop") && !newFileName.endsWith(".kdelnk")) newFileName += ".desktop"; @@ -1353,14 +1353,14 @@ void KFilePropsPlugin::applyChanges() // Don't remove the template !! if ( !m_bFromTemplate ) // (normal renaming) - job = KIO::move( oldurl, properties->kurl() ); + job = TDEIO::move( oldurl, properties->kurl() ); else // Copying a template - job = KIO::copy( oldurl, properties->kurl() ); + job = TDEIO::copy( oldurl, properties->kurl() ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotCopyFinished( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ), - TQT_SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotCopyFinished( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( renamed( TDEIO::Job *, const KURL &, const KURL & ) ), + TQT_SLOT( slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & ) ) ); // wait for job TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); tqt_enter_modal(&dummy); @@ -1378,7 +1378,7 @@ void KFilePropsPlugin::applyChanges() slotCopyFinished( 0L ); } -void KFilePropsPlugin::slotCopyFinished( KIO::Job * job ) +void KFilePropsPlugin::slotCopyFinished( TDEIO::Job * job ) { kdDebug(250) << "KFilePropsPlugin::slotCopyFinished" << endl; if (job) @@ -1389,7 +1389,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job ) { job->showErrorDialog( d->m_frame ); // Didn't work. Revert the URL to the old one - properties->updateUrl( static_cast<KIO::CopyJob*>(job)->srcURLs().first() ); + properties->updateUrl( static_cast<TDEIO::CopyJob*>(job)->srcURLs().first() ); properties->abortApplying(); // Don't apply the changes to the wrong file ! return; } @@ -1431,9 +1431,9 @@ void KFilePropsPlugin::applyIconChanges() if ( !iconButton || !d->bIconChanged ) return; // handle icon changes - only local files (or pseudo-local) for now - // TODO: Use KTempFile and KIO::file_copy with overwrite = true + // TODO: Use KTempFile and TDEIO::file_copy with overwrite = true KURL url = properties->kurl(); - url = KIO::NetAccess::mostLocalURL( url, properties ); + url = TDEIO::NetAccess::mostLocalURL( url, properties ); if (url.isLocalFile()) { TQString path; @@ -1478,7 +1478,7 @@ void KFilePropsPlugin::applyIconChanges() } } -void KFilePropsPlugin::slotFileRenamed( KIO::Job *, const KURL &, const KURL & newUrl ) +void KFilePropsPlugin::slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & newUrl ) { // This is called in case of an existing local file during the copy/move operation, // if the user chooses Rename. @@ -1633,7 +1633,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr } else { //We don't know, for remote files, if they are ours or not. //So we let the user change permissions, and - //KIO::chmod will tell, if he had no right to do it. + //TDEIO::chmod will tell, if he had no right to do it. isMyFile = true; } @@ -2506,17 +2506,17 @@ void KFilePermissionsPropsPlugin::applyChanges() && !permissionChange && !ACLChange && !defaultACLChange ) return; - KIO::Job * job; + TDEIO::Job * job; if (files.count() > 0) { - job = KIO::chmod( files, orFilePermissions, ~andFilePermissions, + job = TDEIO::chmod( files, orFilePermissions, ~andFilePermissions, owner, group, false ); if ( ACLChange && d->fileSystemSupportsACLs ) job->addMetaData( "ACL_STRING", d->extendedACL.isValid()?d->extendedACL.asString():"ACL_DELETE" ); if ( defaultACLChange && d->fileSystemSupportsACLs ) job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotChmodResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotChmodResult( TDEIO::Job * ) ) ); // Wait for job TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); tqt_enter_modal(&dummy); @@ -2524,15 +2524,15 @@ void KFilePermissionsPropsPlugin::applyChanges() tqt_leave_modal(&dummy); } if (dirs.count() > 0) { - job = KIO::chmod( dirs, orDirPermissions, ~andDirPermissions, + job = TDEIO::chmod( dirs, orDirPermissions, ~andDirPermissions, owner, group, recursive ); if ( ACLChange && d->fileSystemSupportsACLs ) job->addMetaData( "ACL_STRING", d->extendedACL.isValid()?d->extendedACL.asString():"ACL_DELETE" ); if ( defaultACLChange && d->fileSystemSupportsACLs ) job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotChmodResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotChmodResult( TDEIO::Job * ) ) ); // Wait for job TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); tqt_enter_modal(&dummy); @@ -2541,7 +2541,7 @@ void KFilePermissionsPropsPlugin::applyChanges() } } -void KFilePermissionsPropsPlugin::slotChmodResult( KIO::Job * job ) +void KFilePermissionsPropsPlugin::slotChmodResult( TDEIO::Job * job ) { kdDebug(250) << "KFilePermissionsPropsPlugin::slotChmodResult" << endl; if (job->error()) @@ -3042,8 +3042,8 @@ void KDevicePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize, d->m_freeSpaceLabel->setText( // xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part. i18n("Available space out of total partition size (percent used)", "%1 out of %2 (%3% used)") - .arg(KIO::convertSizeFromKB(kBAvail)) - .arg(KIO::convertSizeFromKB(kBSize)) + .arg(TDEIO::convertSizeFromKB(kBAvail)) + .arg(TDEIO::convertSizeFromKB(kBSize)) .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); d->m_freeSpaceBar->setProgress(percUsed, 100); @@ -3446,7 +3446,7 @@ void KDesktopPropsPlugin::slotAdvanced() // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); + TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); @@ -3672,7 +3672,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); + TDEConfigGroup confGroup( TDEGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h index d6a8223dd..df814f7d4 100644 --- a/kio/kfile/kpropertiesdialog.h +++ b/kio/kfile/kpropertiesdialog.h @@ -48,7 +48,7 @@ class TQComboBox; #define KPropsPage KPropsDlgPlugin -namespace KIO { class Job; } +namespace TDEIO { class Job; } /** * The main properties dialog class. @@ -142,7 +142,7 @@ public: * @param name is the internal name. * @param modal tells the dialog whether it should be modal. * IMPORTANT: This constructor, together with modal=true, leads to a grave - * display bug (due to KIO::stat() being run before the dialog has all the + * display bug (due to TDEIO::stat() being run before the dialog has all the * necessary information). Do not use this combination for now. * For local files with a known mimetype, simply create a KFileItem and pass * it to the other constructor. @@ -412,7 +412,7 @@ private: TQPtrList<KPropsDlgPlugin> m_pageList; private slots: - void slotStatResult( KIO::Job * ); // No longer used + void slotStatResult( TDEIO::Job * ); // No longer used protected: virtual void virtual_hook( int id, void* data ); private: @@ -523,10 +523,10 @@ public: protected slots: void slotEditFileType(); - void slotCopyFinished( KIO::Job * ); - void slotFileRenamed( KIO::Job *, const KURL &, const KURL & ); + void slotCopyFinished( TDEIO::Job * ); + void slotFileRenamed( TDEIO::Job *, const KURL &, const KURL & ); void slotDirSizeUpdate(); - void slotDirSizeFinished( KIO::Job * ); + void slotDirSizeFinished( TDEIO::Job * ); void slotFoundMountPoint( const TQString& mp, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail ); void slotSizeStop(); @@ -600,7 +600,7 @@ public: private slots: - void slotChmodResult( KIO::Job * ); + void slotChmodResult( TDEIO::Job * ); void slotShowAdvancedPermissions(); private: diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp index 609668373..6f4a01f3b 100644 --- a/kio/kfile/krecentdirs.cpp +++ b/kio/kfile/krecentdirs.cpp @@ -32,7 +32,7 @@ #define MAX_DIR_HISTORY 3 -static void recentdirs_done(KConfig *config) +static void recentdirs_done(TDEConfig *config) { if (config == TDEGlobal::config()) { @@ -44,9 +44,9 @@ static void recentdirs_done(KConfig *config) } } -static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly) +static TDEConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly) { - KConfig *config; + TDEConfig *config; if ((key.length() < 2) || (key[0] != ':')) key = ":default"; if (key[1] == ':') @@ -87,7 +87,7 @@ void KRecentDirs::add(const TQString &fileClass, const TQString &directory) { TQString key = fileClass; TQStringList result; - KConfig *config = recentdirs_readList(key, result, false); + TDEConfig *config = recentdirs_readList(key, result, false); // make sure the dir is first in history result.remove(directory); result.prepend(directory); diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index d91e7551f..1ec4a98c8 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -86,7 +86,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded kdDebug(250) << "KRecentDocument::add for " << openStr << endl; - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQString oldGrp = config->group(); config->setGroup(TQString::fromLatin1("RecentDocuments")); bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); @@ -169,8 +169,8 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); } diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index 1d2cf1547..95f30ee24 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -577,16 +577,16 @@ KURL KURLBar::currentURL() const return item ? item->url() : KURL(); } -void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup ) +void KURLBar::readConfig( TDEConfig *appConfig, const TQString& itemGroup ) { m_isImmutable = appConfig->groupIsImmutable( itemGroup ); - KConfigGroupSaver cs( appConfig, itemGroup ); + TDEConfigGroupSaver cs( appConfig, itemGroup ); d->defaultIconSize = m_iconSize; m_iconSize = appConfig->readNumEntry( "Speedbar IconSize", m_iconSize ); if ( m_useGlobal ) { // read global items - KConfig *globalConfig = TDEGlobal::config(); - KConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)")); + TDEConfig *globalConfig = TDEGlobal::config(); + TDEConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)")); int num = globalConfig->readNumEntry( "Number of Entries" ); for ( int i = 0; i < num; i++ ) { readItem( i, globalConfig, false ); @@ -600,7 +600,7 @@ void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup ) } } -void KURLBar::readItem( int i, KConfig *config, bool applicationLocal ) +void KURLBar::readItem( int i, TDEConfig *config, bool applicationLocal ) { TQString number = TQString::number( i ); KURL url = KURL::fromPathOrURL( config->readPathEntry( TQString("URL_") + number )); @@ -610,9 +610,9 @@ void KURLBar::readItem( int i, KConfig *config, bool applicationLocal ) TQString description = config->readEntry( TQString("Description_") + number ); if (description.isEmpty() && url.protocol()=="beagle") { - KIO::UDSEntry uds; + TDEIO::UDSEntry uds; const KURL kurl("beagle:?beagled-status"); - if (!KIO::NetAccess::stat(kurl, uds)) + if (!TDEIO::NetAccess::stat(kurl, uds)) return; description = i18n("Desktop Search"); @@ -626,9 +626,9 @@ void KURLBar::readItem( int i, KConfig *config, bool applicationLocal ) config->readNumEntry( TQString("IconGroup_") + number )) ); } -void KURLBar::writeConfig( KConfig *config, const TQString& itemGroup ) +void KURLBar::writeConfig( TDEConfig *config, const TQString& itemGroup ) { - KConfigGroupSaver cs1( config, itemGroup ); + TDEConfigGroupSaver cs1( config, itemGroup ); if(!config->hasDefault("Speedbar IconSize") && m_iconSize == d->defaultIconSize ) config->revertToDefault("Speedbar IconSize"); else @@ -685,7 +685,7 @@ void KURLBar::writeConfig( KConfig *config, const TQString& itemGroup ) m_isModified = false; } -void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config, +void KURLBar::writeItem( KURLBarItem *item, int i, TDEConfig *config, bool global ) { if ( !item->isPersistent() ) diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h index 29a73ff34..df9d15790 100644 --- a/kio/kfile/kurlbar.h +++ b/kio/kfile/kurlbar.h @@ -28,7 +28,7 @@ #include <klistbox.h> #include <kurl.h> -class KConfig; +class TDEConfig; class KURLBar; /** @@ -215,7 +215,7 @@ class KURLBarListBox; * read and write the configuration of all the entries. It can differentiate * between global and local entries -- global entries will be saved in the * global configuration (kdeglobals), while local entries will be saved in - * your application's KConfig object. + * your application's TDEConfig object. * * Due to the configurability, you usually only insert some default entries * once and then solely use the read and writeConfig methods to preserve the @@ -331,27 +331,27 @@ public: * inside the group @p itemGroup. All items in there will be restored. * The reading of every item is delegated to the readItem() method. */ - virtual void readConfig( KConfig *config, const TQString& itemGroup ); + virtual void readConfig( TDEConfig *config, const TQString& itemGroup ); /** * Call this method to save the current configuration into @p config, * inside the group @p iconGroup. The writeItem() method is used * to save each item. */ - virtual void writeConfig( KConfig *config, const TQString& itemGroup ); + virtual void writeConfig( TDEConfig *config, const TQString& itemGroup ); /** * Called from readConfig() to read the i'th from @p config. * After reading a KURLBarItem is created and initialized with the read * values (as well as the given @p applicationLocal). */ - virtual void readItem( int i, KConfig *config, bool applicationLocal ); + virtual void readItem( int i, TDEConfig *config, bool applicationLocal ); /** * Called from writeConfig() to save the KURLBarItem @p item as the * i'th entry in the config-object. * @p global tell whether it should be saved in the global configuration - * or not (using KConfig::writeEntry( key, value, true, global ) ). + * or not (using TDEConfig::writeEntry( key, value, true, global ) ). */ - virtual void writeItem( KURLBarItem *item, int i, KConfig *, bool global ); + virtual void writeItem( KURLBarItem *item, int i, TDEConfig *, bool global ); /** * @returns the current KURLBarItem, or 0L if none. diff --git a/kio/kfile/tests/kcustommenueditortest.cpp b/kio/kfile/tests/kcustommenueditortest.cpp index 9e00687ac..1fc6da496 100644 --- a/kio/kfile/tests/kcustommenueditortest.cpp +++ b/kio/kfile/tests/kcustommenueditortest.cpp @@ -8,7 +8,7 @@ int main(int argc, char** argv) KLocale::setMainCatalogue("tdelibs"); TDEApplication app(argc, argv, "KCustomMenuEditorTest"); KCustomMenuEditor editor(0); - KConfig *cfg = new KConfig("kdesktop_custom_menu2"); + TDEConfig *cfg = new TDEConfig("kdesktop_custom_menu2"); editor.load(cfg); if (editor.exec()) { diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp index 6f0592ac4..483bc682f 100644 --- a/kio/kio/authinfo.cpp +++ b/kio/kio/authinfo.cpp @@ -39,7 +39,7 @@ #define NETRC_READ_BUF_SIZE 4096 -using namespace KIO; +using namespace TDEIO; AuthInfo::AuthInfo() { @@ -72,7 +72,7 @@ AuthInfo& AuthInfo::operator= ( const AuthInfo& info ) return *this; } -TQDataStream& KIO::operator<< (TQDataStream& s, const AuthInfo& a) +TQDataStream& TDEIO::operator<< (TQDataStream& s, const AuthInfo& a) { s << a.url << a.username << a.password << a.prompt << a.caption << a.comment << a.commentLabel << a.realmValue << a.digestInfo @@ -81,7 +81,7 @@ TQDataStream& KIO::operator<< (TQDataStream& s, const AuthInfo& a) return s; } -TQDataStream& KIO::operator>> (TQDataStream& s, AuthInfo& a) +TQDataStream& TDEIO::operator>> (TQDataStream& s, AuthInfo& a) { TQ_UINT8 verify = 0; TQ_UINT8 ro = 0; diff --git a/kio/kio/authinfo.h b/kio/kio/authinfo.h index 3f92e58d1..130db0857 100644 --- a/kio/kio/authinfo.h +++ b/kio/kio/authinfo.h @@ -26,7 +26,7 @@ #include <kurl.h> -namespace KIO { +namespace TDEIO { /** * This class is intended to make it easier to prompt for, cache diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp index e1d343c10..e1c8a64e4 100644 --- a/kio/kio/chmodjob.cpp +++ b/kio/kio/chmodjob.cpp @@ -38,12 +38,12 @@ #include <kdirnotify_stub.h> -using namespace KIO; +using namespace TDEIO; ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int mask, int newOwner, int newGroup, bool recursive, bool showProgressInfo ) - : KIO::Job( showProgressInfo ), state( STATE_LISTING ), + : TDEIO::Job( showProgressInfo ), state( STATE_LISTING ), m_permissions( permissions ), m_mask( mask ), m_newOwner( newOwner ), m_newGroup( newGroup ), m_recursive( recursive ), m_lstItems( lstItems ) @@ -76,11 +76,11 @@ void ChmodJob::processList() if ( item->isDir() && m_recursive ) { //kdDebug(7007) << "ChmodJob::processList dir -> listing" << endl; - KIO::ListJob * listJob = KIO::listRecursive( item->url(), false /* no GUI */ ); - connect( listJob, TQT_SIGNAL(entries( KIO::Job *, - const KIO::UDSEntryList& )), - TQT_SLOT( slotEntries( KIO::Job*, - const KIO::UDSEntryList& ))); + TDEIO::ListJob * listJob = TDEIO::listRecursive( item->url(), false /* no GUI */ ); + connect( listJob, TQT_SIGNAL(entries( TDEIO::Job *, + const TDEIO::UDSEntryList& )), + TQT_SLOT( slotEntries( TDEIO::Job*, + const TDEIO::UDSEntryList& ))); addSubjob( listJob ); return; // we'll come back later, when this one's finished } @@ -93,28 +93,28 @@ void ChmodJob::processList() chmodNextFile(); } -void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) +void ChmodJob::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList & list ) { - KIO::UDSEntryListConstIterator it = list.begin(); - KIO::UDSEntryListConstIterator end = list.end(); + TDEIO::UDSEntryListConstIterator it = list.begin(); + TDEIO::UDSEntryListConstIterator end = list.end(); for (; it != end; ++it) { - KIO::UDSEntry::ConstIterator it2 = (*it).begin(); + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); mode_t permissions = 0; bool isDir = false; bool isLink = false; TQString relativePath; for( ; it2 != (*it).end(); it2++ ) { switch( (*it2).m_uds ) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: relativePath = (*it2).m_str; break; - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: isDir = S_ISDIR((*it2).m_long); break; - case KIO::UDS_LINK_DEST: + case TDEIO::UDS_LINK_DEST: isLink = !(*it2).m_str.isEmpty(); break; - case KIO::UDS_ACCESS: + case TDEIO::UDS_ACCESS: permissions = (mode_t)((*it2).m_long); break; default: @@ -182,7 +182,7 @@ void ChmodJob::chmodNextFile() kdDebug(7007) << "ChmodJob::chmodNextFile chmod'ing " << info.url.prettyURL() << " to " << TQString::number(info.permissions,8) << endl; - KIO::SimpleJob * job = KIO::chmod( info.url, info.permissions ); + TDEIO::SimpleJob * job = TDEIO::chmod( info.url, info.permissions ); // copy the metadata for acl and default acl const TQString aclString = queryMetaData( "ACL_STRING" ); const TQString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" ); @@ -197,7 +197,7 @@ void ChmodJob::chmodNextFile() emitResult(); } -void ChmodJob::slotResult( KIO::Job * job ) +void ChmodJob::slotResult( TDEIO::Job * job ) { if ( job->error() ) { @@ -206,7 +206,7 @@ void ChmodJob::slotResult( KIO::Job * job ) emitResult(); return; } - //kdDebug(7007) << " ChmodJob::slotResult( KIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; + //kdDebug(7007) << " ChmodJob::slotResult( TDEIO::Job * job ) m_lstItems:" << m_lstItems.count() << endl; switch ( state ) { case STATE_LISTING: @@ -227,7 +227,7 @@ void ChmodJob::slotResult( KIO::Job * job ) } // antlarr: KDE 4: Make owner and group be const TQString & -KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, int mask, +KIO_EXPORT ChmodJob *TDEIO::chmod( const KFileItemList& lstItems, int permissions, int mask, TQString owner, TQString group, bool recursive, bool showProgressInfo ) { @@ -253,6 +253,6 @@ KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, } void ChmodJob::virtual_hook( int id, void* data ) -{ KIO::Job::virtual_hook( id, data ); } +{ TDEIO::Job::virtual_hook( id, data ); } #include "chmodjob.moc" diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h index fdb873b17..c501add6a 100644 --- a/kio/kio/chmodjob.h +++ b/kio/kio/chmodjob.h @@ -28,19 +28,19 @@ #include <kio/job.h> #include <kfileitem.h> -namespace KIO { +namespace TDEIO { /** * This job changes permissions on a list of files or directories, * optionally in a recursive manner. - * @see KIO::chmod() + * @see TDEIO::chmod() */ - class KIO_EXPORT ChmodJob : public KIO::Job + class KIO_EXPORT ChmodJob : public TDEIO::Job { Q_OBJECT public: /** - * Create new ChmodJobs using the KIO::chmod() function. + * Create new ChmodJobs using the TDEIO::chmod() function. */ ChmodJob( const KFileItemList & lstItems, int permissions, int mask, int newOwner, int newGroup, @@ -51,8 +51,8 @@ namespace KIO { protected slots: - virtual void slotResult( KIO::Job *job ); - void slotEntries( KIO::Job * , const KIO::UDSEntryList & ); + virtual void slotResult( TDEIO::Job *job ); + void slotEntries( TDEIO::Job * , const TDEIO::UDSEntryList & ); void processList(); private: diff --git a/kio/kio/connection.cpp b/kio/kio/connection.cpp index b2a84a798..d85f4921c 100644 --- a/kio/kio/connection.cpp +++ b/kio/kio/connection.cpp @@ -43,7 +43,7 @@ #include <kdebug.h> #include <tqsocketnotifier.h> -using namespace KIO; +using namespace TDEIO; Connection::Connection() { @@ -83,7 +83,7 @@ void Connection::close() delete socket; socket = 0; - // KSocket has already closed the file descriptor, but we need to + // TDESocket has already closed the file descriptor, but we need to // close the file-stream as well otherwise we leak memory. // As a result we close the file descriptor twice, but that should // be harmless @@ -121,7 +121,7 @@ void Connection::dequeue() } } -void Connection::init(KSocket *sock) +void Connection::init(TDESocket *sock) { delete notifier; notifier = 0; diff --git a/kio/kio/connection.h b/kio/kio/connection.h index a30131af8..720e4e935 100644 --- a/kio/kio/connection.h +++ b/kio/kio/connection.h @@ -30,10 +30,10 @@ #include <tqptrlist.h> #include <tqobject.h> -class KSocket; +class TDESocket; class TQSocketNotifier; -namespace KIO { +namespace TDEIO { struct KIO_EXPORT Task { int cmd; @@ -62,7 +62,7 @@ namespace KIO { * @param sock the socket to use * @see inited() */ - void init(KSocket *sock); + void init(TDESocket *sock); /** * Initialize the connection to use the given file * descriptors. @@ -143,7 +143,7 @@ namespace KIO { private: int fd_in; FILE *f_out; - KSocket *socket; + TDESocket *socket; TQSocketNotifier *notifier; TQObject *receiver; const char *member; diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp index 0ee463d87..1e3db04d7 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -42,7 +42,7 @@ # define DISPATCH(f) f #endif -using namespace KIO; +using namespace TDEIO; #ifdef DATAKIOSLAVE extern "C" { diff --git a/kio/kio/dataprotocol.h b/kio/kio/dataprotocol.h index 44dccfcce..472b42886 100644 --- a/kio/kio/dataprotocol.h +++ b/kio/kio/dataprotocol.h @@ -37,14 +37,14 @@ class KURL; # include "kio/dataslave.h" #endif -namespace KIO { +namespace TDEIO { /** This kioslave provides support of data urls as specified by rfc 2397 * @see http://www.ietf.org/rfc/rfc2397.txt * @author Leo Savernik */ #if defined(DATAKIOSLAVE) -class DataProtocol : public KIO::SlaveBase { +class DataProtocol : public TDEIO::SlaveBase { #elif defined(TESTKIO) class DataProtocol : public TestSlave { #else diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp index d16ecc0d4..528368ba5 100644 --- a/kio/kio/dataslave.cpp +++ b/kio/kio/dataslave.cpp @@ -28,7 +28,7 @@ #include <tqtimer.h> -using namespace KIO; +using namespace TDEIO; #define KIO_DATA_POLL_INTERVAL 0 @@ -198,12 +198,12 @@ void DataSlave::virtual_hook( int id, void* data ) { return; } default: - KIO::Slave::virtual_hook( id, data ); + TDEIO::Slave::virtual_hook( id, data ); } } DISPATCH_IMPL1(mimeType, const TQString &, s) -DISPATCH_IMPL1(totalSize, KIO::filesize_t, size) +DISPATCH_IMPL1(totalSize, TDEIO::filesize_t, size) DISPATCH_IMPL(sendMetaData) DISPATCH_IMPL1(data, const TQByteArray &, ba) diff --git a/kio/kio/dataslave.h b/kio/kio/dataslave.h index 71eae6cd3..3567f3faf 100644 --- a/kio/kio/dataslave.h +++ b/kio/kio/dataslave.h @@ -35,7 +35,7 @@ class TQTimer; #define DISPATCH_DECL1(type, paramtype, param) \ void dispatch_##type(paramtype param); -namespace KIO { +namespace TDEIO { /** * This class provides a high performance implementation for the data @@ -46,7 +46,7 @@ namespace KIO { * detail of KIO and subject to change without notice. * @author Leo Savernik */ - class DataSlave : public KIO::Slave { + class DataSlave : public TDEIO::Slave { Q_OBJECT public: DataSlave(); @@ -90,7 +90,7 @@ namespace KIO { struct QueueStruct { QueueType type; TQString s; - KIO::filesize_t size; + TDEIO::filesize_t size; TQByteArray ba; QueueStruct() {} @@ -100,7 +100,7 @@ namespace KIO { DispatchQueue dispatchQueue; DISPATCH_DECL1(mimeType, const TQString &, s) - DISPATCH_DECL1(totalSize, KIO::filesize_t, size) + DISPATCH_DECL1(totalSize, TDEIO::filesize_t, size) DISPATCH_DECL(sendMetaData) DISPATCH_DECL1(data, const TQByteArray &, ba) DISPATCH_DECL(finished) diff --git a/kio/kio/davjob.cpp b/kio/kio/davjob.cpp index 1f3b208a6..f1ba2d2d4 100644 --- a/kio/kio/davjob.cpp +++ b/kio/kio/davjob.cpp @@ -40,7 +40,7 @@ #define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream -using namespace KIO; +using namespace TDEIO; class DavJob::DavJobPrivate { @@ -50,7 +50,7 @@ public: }; DavJob::DavJob( const KURL& url, int method, const TQString& request, bool showProgressInfo ) - : TransferJob( url, KIO::CMD_SPECIAL, TQByteArray(), TQByteArray(), showProgressInfo ) + : TransferJob( url, TDEIO::CMD_SPECIAL, TQByteArray(), TQByteArray(), showProgressInfo ) { d = new DavJobPrivate; // We couldn't set the args when calling the parent constructor, @@ -86,10 +86,10 @@ void DavJob::slotFinished() istream >> s_url; istream >> s_method; // PROPFIND - if ( (s_cmd == 7) && (s_method == (int)KIO::DAV_PROPFIND) ) { + if ( (s_cmd == 7) && (s_method == (int)TDEIO::DAV_PROPFIND) ) { m_packedArgs.truncate(0); TQDataStream stream( m_packedArgs, IO_WriteOnly ); - stream << (int)7 << m_redirectionURL << (int)KIO::DAV_PROPFIND; + stream << (int)7 << m_redirectionURL << (int)TDEIO::DAV_PROPFIND; } } else if ( ! m_response.setContent( d->str_response, true ) ) { // An error occurred parsing the XML response @@ -114,20 +114,20 @@ void DavJob::slotFinished() /* Convenience methods */ // KDE 4: Make it const TQString & -DavJob* KIO::davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo ) +DavJob* TDEIO::davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo ) { - DavJob *job = new DavJob( url, (int) KIO::DAV_PROPFIND, properties.toString(), showProgressInfo ); + DavJob *job = new DavJob( url, (int) TDEIO::DAV_PROPFIND, properties.toString(), showProgressInfo ); job->addMetaData( "davDepth", depth ); return job; } -DavJob* KIO::davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo ) +DavJob* TDEIO::davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo ) { - return new DavJob( url, (int) KIO::DAV_PROPPATCH, properties.toString(), showProgressInfo ); + return new DavJob( url, (int) TDEIO::DAV_PROPPATCH, properties.toString(), showProgressInfo ); } -DavJob* KIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo ) +DavJob* TDEIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo ) { TQDomDocument doc; TQDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" ); @@ -136,7 +136,7 @@ DavJob* KIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& searchelement.appendChild( text ); searchrequest.appendChild( searchelement ); doc.appendChild( searchrequest ); - return new DavJob( url, KIO::DAV_SEARCH, doc.toString(), showProgressInfo ); + return new DavJob( url, TDEIO::DAV_SEARCH, doc.toString(), showProgressInfo ); } #include "davjob.moc" diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h index 98d0fe702..3232f9e00 100644 --- a/kio/kio/davjob.h +++ b/kio/kio/davjob.h @@ -39,7 +39,7 @@ class Observer; class TQTimer; -namespace KIO { +namespace TDEIO { class Slave; class SlaveInterface; @@ -49,9 +49,9 @@ namespace KIO { * Data is sent to the slave on request of the slave ( dataReq). * If data coming from the slave can not be handled, the * reading of data from the slave should be suspended. - * @see KIO::davPropFind() - * @see KIO::davPropPatch() - * @see KIO::davSearch() + * @see TDEIO::davPropFind() + * @see TDEIO::davPropPatch() + * @see TDEIO::davSearch() * @since 3.1 */ class KIO_EXPORT DavJob : public TransferJob { @@ -59,8 +59,8 @@ namespace KIO { public: /** - * Use KIO::davPropFind(), KIO::davPropPatch() and - * KIO::davSearch() to create a new DavJob. + * Use TDEIO::davPropFind(), TDEIO::davPropPatch() and + * TDEIO::davSearch() to create a new DavJob. */ DavJob(const KURL& url, int method, const TQString& request, bool showProgressInfo); diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp index 3f16f565f..72bec0cfc 100644 --- a/kio/kio/defaultprogress.cpp +++ b/kio/kio/defaultprogress.cpp @@ -42,7 +42,7 @@ #include "jobclasses.h" #include "defaultprogress.h" -namespace KIO { +namespace TDEIO { class DefaultProgress::DefaultProgressPrivate { @@ -184,7 +184,7 @@ DefaultProgress::~DefaultProgress() delete d; } -void DefaultProgress::slotTotalSize( KIO::Job*, KIO::filesize_t size ) +void DefaultProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) { // size is measured in bytes if ( m_iTotalSize == size ) @@ -195,7 +195,7 @@ void DefaultProgress::slotTotalSize( KIO::Job*, KIO::filesize_t size ) } -void DefaultProgress::slotTotalFiles( KIO::Job*, unsigned long files ) +void DefaultProgress::slotTotalFiles( TDEIO::Job*, unsigned long files ) { if ( m_iTotalFiles == files ) return; @@ -204,7 +204,7 @@ void DefaultProgress::slotTotalFiles( KIO::Job*, unsigned long files ) } -void DefaultProgress::slotTotalDirs( KIO::Job*, unsigned long dirs ) +void DefaultProgress::slotTotalDirs( TDEIO::Job*, unsigned long dirs ) { if ( m_iTotalDirs == dirs ) return; @@ -232,18 +232,18 @@ void DefaultProgress::showTotals() //static TQString DefaultProgress::makePercentString( unsigned long percent, - KIO::filesize_t totalSize, + TDEIO::filesize_t totalSize, unsigned long totalFiles ) { if ( totalSize ) - return i18n( "%1 % of %2 " ).arg( TQString::number(percent) , KIO::convertSize( totalSize ) ); + return i18n( "%1 % of %2 " ).arg( TQString::number(percent) , TDEIO::convertSize( totalSize ) ); else if ( totalFiles ) return i18n( "%1 % of 1 file", "%1 % of %n files", totalFiles ).arg( percent ); else return i18n( "%1 %" ).arg( percent ); } -void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent ) +void DefaultProgress::slotPercent( TDEIO::Job*, unsigned long percent ) { TQString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles ); m_pProgressBar->setValue( percent ); @@ -270,26 +270,26 @@ void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent ) } -void DefaultProgress::slotInfoMessage( KIO::Job*, const TQString & msg ) +void DefaultProgress::slotInfoMessage( TDEIO::Job*, const TQString & msg ) { speedLabel->setText( msg ); speedLabel->setAlignment( speedLabel->alignment() & ~TQt::WordBreak ); } -void DefaultProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) { +void DefaultProgress::slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t bytes ) { if ( m_iProcessedSize == bytes ) return; m_iProcessedSize = bytes; TQString tmp = i18n( "%1 of %2 complete") - .arg( KIO::convertSize(bytes) ) - .arg( KIO::convertSize(m_iTotalSize)); + .arg( TDEIO::convertSize(bytes) ) + .arg( TDEIO::convertSize(m_iTotalSize)); sizeLabel->setText( tmp ); } -void DefaultProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs ) +void DefaultProgress::slotProcessedDirs( TDEIO::Job*, unsigned long dirs ) { if ( m_iProcessedDirs == dirs ) return; @@ -303,7 +303,7 @@ void DefaultProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs ) } -void DefaultProgress::slotProcessedFiles( KIO::Job*, unsigned long files ) +void DefaultProgress::slotProcessedFiles( TDEIO::Job*, unsigned long files ) { if ( m_iProcessedFiles == files ) return; @@ -319,18 +319,18 @@ void DefaultProgress::slotProcessedFiles( KIO::Job*, unsigned long files ) } -void DefaultProgress::slotSpeed( KIO::Job*, unsigned long speed ) +void DefaultProgress::slotSpeed( TDEIO::Job*, unsigned long speed ) { if ( speed == 0 ) { speedLabel->setText( i18n( "Stalled") ); } else { - speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( KIO::convertSize( speed )) - .arg( KIO::convertSeconds( KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, speed ))) ); + speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( TDEIO::convertSize( speed )) + .arg( TDEIO::convertSeconds( TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, speed ))) ); } } -void DefaultProgress::slotCopying( KIO::Job*, const KURL& from, const KURL& to ) +void DefaultProgress::slotCopying( TDEIO::Job*, const KURL& from, const KURL& to ) { if ( d->noCaptionYet ) { setCaption(i18n("Copy File(s) Progress")); @@ -344,7 +344,7 @@ void DefaultProgress::slotCopying( KIO::Job*, const KURL& from, const KURL& to ) } -void DefaultProgress::slotMoving( KIO::Job*, const KURL& from, const KURL& to ) +void DefaultProgress::slotMoving( TDEIO::Job*, const KURL& from, const KURL& to ) { if ( d->noCaptionYet ) { setCaption(i18n("Move File(s) Progress")); @@ -358,7 +358,7 @@ void DefaultProgress::slotMoving( KIO::Job*, const KURL& from, const KURL& to ) } -void DefaultProgress::slotCreatingDir( KIO::Job*, const KURL& dir ) +void DefaultProgress::slotCreatingDir( TDEIO::Job*, const KURL& dir ) { if ( d->noCaptionYet ) { setCaption(i18n("Creating Folder")); @@ -370,7 +370,7 @@ void DefaultProgress::slotCreatingDir( KIO::Job*, const KURL& dir ) } -void DefaultProgress::slotDeleting( KIO::Job*, const KURL& url ) +void DefaultProgress::slotDeleting( TDEIO::Job*, const KURL& url ) { if ( d->noCaptionYet ) { setCaption(i18n("Delete File(s) Progress")); @@ -381,7 +381,7 @@ void DefaultProgress::slotDeleting( KIO::Job*, const KURL& url ) setDestVisible( false ); } -void DefaultProgress::slotTransferring( KIO::Job*, const KURL& url ) +void DefaultProgress::slotTransferring( TDEIO::Job*, const KURL& url ) { if ( d->noCaptionYet ) { setCaption(i18n("Loading Progress")); @@ -391,31 +391,31 @@ void DefaultProgress::slotTransferring( KIO::Job*, const KURL& url ) setDestVisible( false ); } -void DefaultProgress::slotStating( KIO::Job*, const KURL& url ) +void DefaultProgress::slotStating( TDEIO::Job*, const KURL& url ) { setCaption(i18n("Examining File Progress")); sourceEdit->setText(url.prettyURL()); setDestVisible( false ); } -void DefaultProgress::slotMounting( KIO::Job*, const TQString & dev, const TQString & point ) +void DefaultProgress::slotMounting( TDEIO::Job*, const TQString & dev, const TQString & point ) { setCaption(i18n("Mounting %1").arg(dev)); sourceEdit->setText(point); setDestVisible( false ); } -void DefaultProgress::slotUnmounting( KIO::Job*, const TQString & point ) +void DefaultProgress::slotUnmounting( TDEIO::Job*, const TQString & point ) { setCaption(i18n("Unmounting")); sourceEdit->setText(point); setDestVisible( false ); } -void DefaultProgress::slotCanResume( KIO::Job*, KIO::filesize_t resume ) +void DefaultProgress::slotCanResume( TDEIO::Job*, TDEIO::filesize_t resume ) { if ( resume ) { - resumeLabel->setText( i18n("Resuming from %1").arg(KIO::number(resume)) ); + resumeLabel->setText( i18n("Resuming from %1").arg(TDEIO::number(resume)) ); } else { resumeLabel->setText( i18n("Not resumable") ); } @@ -453,7 +453,7 @@ void DefaultProgress::slotClean() { int s = d->startTime.elapsed(); if (!s) s = 1; - speedLabel->setText(i18n("%1/s (done)").arg(KIO::convertSize(1000 * m_iTotalSize / s))); + speedLabel->setText(i18n("%1/s (done)").arg(TDEIO::convertSize(1000 * m_iTotalSize / s))); } setOnlyClean(false); } diff --git a/kio/kio/defaultprogress.h b/kio/kio/defaultprogress.h index 8dca499bd..68d405b24 100644 --- a/kio/kio/defaultprogress.h +++ b/kio/kio/defaultprogress.h @@ -28,7 +28,7 @@ class KLineEdit; -namespace KIO { +namespace TDEIO { /* * A default implementation of the progress dialog ProgressBase. @@ -58,59 +58,59 @@ public: /// Shared with uiserver.cpp static TQString makePercentString( unsigned long percent, - KIO::filesize_t totalSize, + TDEIO::filesize_t totalSize, unsigned long totalFiles ); public slots: - virtual void slotTotalSize( KIO::Job *job, KIO::filesize_t size ); - virtual void slotTotalFiles( KIO::Job *job, unsigned long files ); - virtual void slotTotalDirs( KIO::Job *job, unsigned long dirs ); + virtual void slotTotalSize( TDEIO::Job *job, TDEIO::filesize_t size ); + virtual void slotTotalFiles( TDEIO::Job *job, unsigned long files ); + virtual void slotTotalDirs( TDEIO::Job *job, unsigned long dirs ); - virtual void slotProcessedSize( KIO::Job *job, KIO::filesize_t bytes ); - virtual void slotProcessedFiles( KIO::Job *job, unsigned long files ); - virtual void slotProcessedDirs( KIO::Job *job, unsigned long dirs ); + virtual void slotProcessedSize( TDEIO::Job *job, TDEIO::filesize_t bytes ); + virtual void slotProcessedFiles( TDEIO::Job *job, unsigned long files ); + virtual void slotProcessedDirs( TDEIO::Job *job, unsigned long dirs ); - virtual void slotSpeed( KIO::Job *job, unsigned long speed ); - virtual void slotPercent( KIO::Job *job, unsigned long percent ); + virtual void slotSpeed( TDEIO::Job *job, unsigned long speed ); + virtual void slotPercent( TDEIO::Job *job, unsigned long percent ); /** * Called to set an information message. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param msg the message to set */ - virtual void slotInfoMessage( KIO::Job *job, const TQString & msg ); + virtual void slotInfoMessage( TDEIO::Job *job, const TQString & msg ); - virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest ); - virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest ); - virtual void slotDeleting( KIO::Job* job, const KURL& url ); + virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest ); + virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest ); + virtual void slotDeleting( TDEIO::Job* job, const KURL& url ); /** * Called when the job is transferring. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param url the url to transfer * @since 3.1 */ - void slotTransferring( KIO::Job* job, const KURL& url ); - virtual void slotCreatingDir( KIO::Job* job, const KURL& dir ); + void slotTransferring( TDEIO::Job* job, const KURL& url ); + virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir ); /** * Called when the job is requesting a stat. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param dir the dir to stat * @since 3.1 */ - virtual void slotStating( KIO::Job* job, const KURL& dir ); + virtual void slotStating( TDEIO::Job* job, const KURL& dir ); /** * Called when the job is mounting. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param dev the device to mount * @param point the mount point */ - virtual void slotMounting( KIO::Job* job, const TQString & dev, const TQString & point ); + virtual void slotMounting( TDEIO::Job* job, const TQString & dev, const TQString & point ); /** * Called when the job is unmounting. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param point the mount point */ - virtual void slotUnmounting( KIO::Job* job, const TQString & point ); - virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from); + virtual void slotUnmounting( TDEIO::Job* job, const TQString & point ); + virtual void slotCanResume( TDEIO::Job* job, TDEIO::filesize_t from); /** * Called when the job is cleaned. @@ -136,11 +136,11 @@ protected: KProgress* m_pProgressBar; - KIO::filesize_t m_iTotalSize; + TDEIO::filesize_t m_iTotalSize; unsigned long m_iTotalFiles; unsigned long m_iTotalDirs; - KIO::filesize_t m_iProcessedSize; + TDEIO::filesize_t m_iProcessedSize; unsigned long m_iProcessedDirs; unsigned long m_iProcessedFiles; diff --git a/kio/kio/forwardingslavebase.cpp b/kio/kio/forwardingslavebase.cpp index 17f12900a..53121986d 100644 --- a/kio/kio/forwardingslavebase.cpp +++ b/kio/kio/forwardingslavebase.cpp @@ -27,7 +27,7 @@ #include "forwardingslavebase.h" -namespace KIO +namespace TDEIO { class ForwardingSlaveBasePrivate @@ -63,7 +63,7 @@ bool ForwardingSlaveBase::internalRewriteURL(const KURL &url, KURL &newURL) return result; } -void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry, +void ForwardingSlaveBase::prepareUDSEntry(TDEIO::UDSEntry &entry, bool listing) const { kdDebug() << "ForwardingSlaveBase::prepareUDSEntry: listing==" @@ -73,8 +73,8 @@ void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry, TQString name; KURL url; - KIO::UDSEntry::iterator it = entry.begin(); - KIO::UDSEntry::iterator end = entry.end(); + TDEIO::UDSEntry::iterator it = entry.begin(); + TDEIO::UDSEntry::iterator end = entry.end(); for(; it!=end; ++it) { @@ -82,11 +82,11 @@ void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry, switch( (*it).m_uds ) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: name = (*it).m_str; kdDebug() << "Name = " << name << endl; break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: url_found = true; url = (*it).m_str; if (listing) @@ -108,8 +108,8 @@ void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry, new_url.addPath( name ); } - KIO::UDSAtom atom; - atom.m_uds = KIO::UDS_LOCAL_PATH; + TDEIO::UDSAtom atom; + atom.m_uds = TDEIO::UDS_LOCAL_PATH; atom.m_long = 0; atom.m_str = new_url.path(); entry.append(atom); @@ -123,7 +123,7 @@ void ForwardingSlaveBase::get(const KURL &url) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::TransferJob *job = KIO::get(new_url, false, false); + TDEIO::TransferJob *job = TDEIO::get(new_url, false, false); connectTransferJob(job); tqApp->eventLoop()->enterLoop(); @@ -138,7 +138,7 @@ void ForwardingSlaveBase::put(const KURL &url, int permissions, KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::TransferJob *job = KIO::put(new_url, permissions, overwrite, + TDEIO::TransferJob *job = TDEIO::put(new_url, permissions, overwrite, resume, false); connectTransferJob(job); @@ -153,7 +153,7 @@ void ForwardingSlaveBase::stat(const KURL &url) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::SimpleJob *job = KIO::stat(new_url, false); + TDEIO::SimpleJob *job = TDEIO::stat(new_url, false); connectSimpleJob(job); tqApp->eventLoop()->enterLoop(); @@ -167,7 +167,7 @@ void ForwardingSlaveBase::mimetype(const KURL &url) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::TransferJob *job = KIO::mimetype(new_url, false); + TDEIO::TransferJob *job = TDEIO::mimetype(new_url, false); connectTransferJob(job); tqApp->eventLoop()->enterLoop(); @@ -181,7 +181,7 @@ void ForwardingSlaveBase::listDir(const KURL &url) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::ListJob *job = KIO::listDir(new_url, false); + TDEIO::ListJob *job = TDEIO::listDir(new_url, false); connectListJob(job); tqApp->eventLoop()->enterLoop(); @@ -195,7 +195,7 @@ void ForwardingSlaveBase::mkdir(const KURL &url, int permissions) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::SimpleJob *job = KIO::mkdir(new_url, permissions); + TDEIO::SimpleJob *job = TDEIO::mkdir(new_url, permissions); connectSimpleJob(job); tqApp->eventLoop()->enterLoop(); @@ -210,7 +210,7 @@ void ForwardingSlaveBase::rename(const KURL &src, const KURL &dest, KURL new_src, new_dest; if ( internalRewriteURL(src, new_src) && internalRewriteURL(dest, new_dest) ) { - KIO::Job *job = KIO::rename(new_src, new_dest, overwrite); + TDEIO::Job *job = TDEIO::rename(new_src, new_dest, overwrite); connectJob(job); tqApp->eventLoop()->enterLoop(); @@ -225,7 +225,7 @@ void ForwardingSlaveBase::symlink(const TQString &target, const KURL &dest, KURL new_dest; if ( internalRewriteURL(dest, new_dest) ) { - KIO::SimpleJob *job = KIO::symlink(target, new_dest, overwrite, false); + TDEIO::SimpleJob *job = TDEIO::symlink(target, new_dest, overwrite, false); connectSimpleJob(job); tqApp->eventLoop()->enterLoop(); @@ -239,7 +239,7 @@ void ForwardingSlaveBase::chmod(const KURL &url, int permissions) KURL new_url; if ( internalRewriteURL(url, new_url) ) { - KIO::SimpleJob *job = KIO::chmod(new_url, permissions); + TDEIO::SimpleJob *job = TDEIO::chmod(new_url, permissions); connectSimpleJob(job); tqApp->eventLoop()->enterLoop(); @@ -254,7 +254,7 @@ void ForwardingSlaveBase::copy(const KURL &src, const KURL &dest, KURL new_src, new_dest; if ( internalRewriteURL(src, new_src) && internalRewriteURL(dest, new_dest) ) { - KIO::Job *job = KIO::file_copy(new_src, new_dest, permissions, + TDEIO::Job *job = TDEIO::file_copy(new_src, new_dest, permissions, overwrite, false); connectJob(job); @@ -271,12 +271,12 @@ void ForwardingSlaveBase::del(const KURL &url, bool isfile) { if (isfile) { - KIO::DeleteJob *job = KIO::del(new_url, false, false); + TDEIO::DeleteJob *job = TDEIO::del(new_url, false, false); connectJob(job); } else { - KIO::SimpleJob *job = KIO::rmdir(new_url); + TDEIO::SimpleJob *job = TDEIO::rmdir(new_url); connectSimpleJob(job); } @@ -291,7 +291,7 @@ void ForwardingSlaveBase::localURL(const KURL& remoteURL) KURL new_url; if ( internalRewriteURL(remoteURL, new_url) ) { - KIO::LocalURLJob *job = KIO::localURL(new_url); + TDEIO::LocalURLJob *job = TDEIO::localURL(new_url); connectLocalURLJob(job); tqApp->eventLoop()->enterLoop(); @@ -305,7 +305,7 @@ void ForwardingSlaveBase::localURL(const KURL& remoteURL) ////////////////////////////////////////////////////////////////////////////// -void ForwardingSlaveBase::connectJob(KIO::Job *job) +void ForwardingSlaveBase::connectJob(TDEIO::Job *job) { // We will forward the warning message, no need to let the job // display it itself @@ -320,57 +320,57 @@ void ForwardingSlaveBase::connectJob(KIO::Job *job) kdDebug() << it.key() << " = " << it.data() << endl; #endif - connect( job, TQT_SIGNAL( result(KIO::Job *) ), - this, TQT_SLOT( slotResult(KIO::Job *) ) ); - connect( job, TQT_SIGNAL( warning(KIO::Job *, const TQString &) ), - this, TQT_SLOT( slotWarning(KIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( infoMessage(KIO::Job *, const TQString &) ), - this, TQT_SLOT( slotInfoMessage(KIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( totalSize(KIO::Job *, KIO::filesize_t) ), - this, TQT_SLOT( slotTotalSize(KIO::Job *, KIO::filesize_t) ) ); - connect( job, TQT_SIGNAL( processedSize(KIO::Job *, KIO::filesize_t) ), - this, TQT_SLOT( slotProcessedSize(KIO::Job *, KIO::filesize_t) ) ); - connect( job, TQT_SIGNAL( speed(KIO::Job *, unsigned long) ), - this, TQT_SLOT( slotSpeed(KIO::Job *, unsigned long) ) ); + connect( job, TQT_SIGNAL( result(TDEIO::Job *) ), + this, TQT_SLOT( slotResult(TDEIO::Job *) ) ); + connect( job, TQT_SIGNAL( warning(TDEIO::Job *, const TQString &) ), + this, TQT_SLOT( slotWarning(TDEIO::Job *, const TQString &) ) ); + connect( job, TQT_SIGNAL( infoMessage(TDEIO::Job *, const TQString &) ), + this, TQT_SLOT( slotInfoMessage(TDEIO::Job *, const TQString &) ) ); + connect( job, TQT_SIGNAL( totalSize(TDEIO::Job *, TDEIO::filesize_t) ), + this, TQT_SLOT( slotTotalSize(TDEIO::Job *, TDEIO::filesize_t) ) ); + connect( job, TQT_SIGNAL( processedSize(TDEIO::Job *, TDEIO::filesize_t) ), + this, TQT_SLOT( slotProcessedSize(TDEIO::Job *, TDEIO::filesize_t) ) ); + connect( job, TQT_SIGNAL( speed(TDEIO::Job *, unsigned long) ), + this, TQT_SLOT( slotSpeed(TDEIO::Job *, unsigned long) ) ); } -void ForwardingSlaveBase::connectSimpleJob(KIO::SimpleJob *job) +void ForwardingSlaveBase::connectSimpleJob(TDEIO::SimpleJob *job) { connectJob(job); - connect( job, TQT_SIGNAL( redirection(KIO::Job *, const KURL &) ), - this, TQT_SLOT( slotRedirection(KIO::Job *, const KURL &) ) ); + connect( job, TQT_SIGNAL( redirection(TDEIO::Job *, const KURL &) ), + this, TQT_SLOT( slotRedirection(TDEIO::Job *, const KURL &) ) ); } -void ForwardingSlaveBase::connectListJob(KIO::ListJob *job) +void ForwardingSlaveBase::connectListJob(TDEIO::ListJob *job) { connectSimpleJob(job); - connect( job, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList &) ), - this, TQT_SLOT( slotEntries(KIO::Job *, const KIO::UDSEntryList &) ) ); + connect( job, TQT_SIGNAL( entries(TDEIO::Job *, const TDEIO::UDSEntryList &) ), + this, TQT_SLOT( slotEntries(TDEIO::Job *, const TDEIO::UDSEntryList &) ) ); } -void ForwardingSlaveBase::connectTransferJob(KIO::TransferJob *job) +void ForwardingSlaveBase::connectTransferJob(TDEIO::TransferJob *job) { connectSimpleJob(job); - connect( job, TQT_SIGNAL( data(KIO::Job *, const TQByteArray &) ), - this, TQT_SLOT( slotData(KIO::Job *, const TQByteArray &) ) ); - connect( job, TQT_SIGNAL( dataReq(KIO::Job *, TQByteArray &) ), - this, TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray &) ) ); - connect( job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &) ), - this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &) ) ); - connect( job, TQT_SIGNAL( canResume(KIO::Job *, KIO::filesize_t) ), - this, TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t) ) ); + connect( job, TQT_SIGNAL( data(TDEIO::Job *, const TQByteArray &) ), + this, TQT_SLOT( slotData(TDEIO::Job *, const TQByteArray &) ) ); + connect( job, TQT_SIGNAL( dataReq(TDEIO::Job *, TQByteArray &) ), + this, TQT_SLOT( slotDataReq(TDEIO::Job *, TQByteArray &) ) ); + connect( job, TQT_SIGNAL( mimetype(TDEIO::Job *, const TQString &) ), + this, TQT_SLOT( slotMimetype(TDEIO::Job *, const TQString &) ) ); + connect( job, TQT_SIGNAL( canResume(TDEIO::Job *, TDEIO::filesize_t) ), + this, TQT_SLOT( slotCanResume(TDEIO::Job *, TDEIO::filesize_t) ) ); } -void ForwardingSlaveBase::connectLocalURLJob(KIO::LocalURLJob *job) +void ForwardingSlaveBase::connectLocalURLJob(TDEIO::LocalURLJob *job) { connectJob(job); - connect( job, TQT_SIGNAL( localURL(KIO::Job *, const KURL&, bool) ), - this, TQT_SLOT( slotLocalURL(KIO::Job *, const KURL&, bool) ) ); + connect( job, TQT_SIGNAL( localURL(TDEIO::Job *, const KURL&, bool) ), + this, TQT_SLOT( slotLocalURL(TDEIO::Job *, const KURL&, bool) ) ); } ////////////////////////////////////////////////////////////////////////////// -void ForwardingSlaveBase::slotResult(KIO::Job *job) +void ForwardingSlaveBase::slotResult(TDEIO::Job *job) { if ( job->error() != 0) { @@ -378,10 +378,10 @@ void ForwardingSlaveBase::slotResult(KIO::Job *job) } else { - KIO::StatJob *stat_job = dynamic_cast<KIO::StatJob *>(job); + TDEIO::StatJob *stat_job = dynamic_cast<TDEIO::StatJob *>(job); if ( stat_job!=0L ) { - KIO::UDSEntry entry = stat_job->statResult(); + TDEIO::UDSEntry entry = stat_job->statResult(); prepareUDSEntry(entry); statEntry( entry ); } @@ -391,32 +391,32 @@ void ForwardingSlaveBase::slotResult(KIO::Job *job) tqApp->eventLoop()->exitLoop(); } -void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const TQString &msg) +void ForwardingSlaveBase::slotWarning(TDEIO::Job* /*job*/, const TQString &msg) { warning(msg); } -void ForwardingSlaveBase::slotInfoMessage(KIO::Job* /*job*/, const TQString &msg) +void ForwardingSlaveBase::slotInfoMessage(TDEIO::Job* /*job*/, const TQString &msg) { infoMessage(msg); } -void ForwardingSlaveBase::slotTotalSize(KIO::Job* /*job*/, KIO::filesize_t size) +void ForwardingSlaveBase::slotTotalSize(TDEIO::Job* /*job*/, TDEIO::filesize_t size) { totalSize(size); } -void ForwardingSlaveBase::slotProcessedSize(KIO::Job* /*job*/, KIO::filesize_t size) +void ForwardingSlaveBase::slotProcessedSize(TDEIO::Job* /*job*/, TDEIO::filesize_t size) { processedSize(size); } -void ForwardingSlaveBase::slotSpeed(KIO::Job* /*job*/, unsigned long bytesPerSecond) +void ForwardingSlaveBase::slotSpeed(TDEIO::Job* /*job*/, unsigned long bytesPerSecond) { speed(bytesPerSecond); } -void ForwardingSlaveBase::slotRedirection(KIO::Job *job, const KURL &url) +void ForwardingSlaveBase::slotRedirection(TDEIO::Job *job, const KURL &url) { redirection(url); @@ -427,13 +427,13 @@ void ForwardingSlaveBase::slotRedirection(KIO::Job *job, const KURL &url) tqApp->eventLoop()->exitLoop(); } -void ForwardingSlaveBase::slotEntries(KIO::Job* /*job*/, - const KIO::UDSEntryList &entries) +void ForwardingSlaveBase::slotEntries(TDEIO::Job* /*job*/, + const TDEIO::UDSEntryList &entries) { - KIO::UDSEntryList final_entries = entries; + TDEIO::UDSEntryList final_entries = entries; - KIO::UDSEntryList::iterator it = final_entries.begin(); - KIO::UDSEntryList::iterator end = final_entries.end(); + TDEIO::UDSEntryList::iterator it = final_entries.begin(); + TDEIO::UDSEntryList::iterator end = final_entries.end(); for(; it!=end; ++it) { @@ -443,28 +443,28 @@ void ForwardingSlaveBase::slotEntries(KIO::Job* /*job*/, listEntries( final_entries ); } -void ForwardingSlaveBase::slotData(KIO::Job* /*job*/, const TQByteArray &d) +void ForwardingSlaveBase::slotData(TDEIO::Job* /*job*/, const TQByteArray &d) { data(d); } -void ForwardingSlaveBase::slotDataReq(KIO::Job* /*job*/, TQByteArray &data) +void ForwardingSlaveBase::slotDataReq(TDEIO::Job* /*job*/, TQByteArray &data) { dataReq(); readData(data); } -void ForwardingSlaveBase::slotMimetype (KIO::Job* /*job*/, const TQString &type) +void ForwardingSlaveBase::slotMimetype (TDEIO::Job* /*job*/, const TQString &type) { mimeType(type); } -void ForwardingSlaveBase::slotCanResume (KIO::Job* /*job*/, KIO::filesize_t offset) +void ForwardingSlaveBase::slotCanResume (TDEIO::Job* /*job*/, TDEIO::filesize_t offset) { canResume(offset); } -void ForwardingSlaveBase::slotLocalURL(KIO::Job *, const KURL& url, bool) +void ForwardingSlaveBase::slotLocalURL(TDEIO::Job *, const KURL& url, bool) { SlaveBase::localURL(url); } diff --git a/kio/kio/forwardingslavebase.h b/kio/kio/forwardingslavebase.h index 1e6d303ee..49d01f4e2 100644 --- a/kio/kio/forwardingslavebase.h +++ b/kio/kio/forwardingslavebase.h @@ -25,7 +25,7 @@ #include <tqobject.h> -namespace KIO +namespace TDEIO { class ForwardingSlaveBasePrivate; @@ -56,7 +56,7 @@ class ForwardingSlaveBasePrivate; * if ( is_special ) * { * // Handle the URL ourselves - * KIO::UDSEntry entry; + * TDEIO::UDSEntry entry; * // Fill entry with UDSAtom instances * statEntry(entry); * finished(); @@ -146,7 +146,7 @@ protected: * @param listing indicate if this entry it created during a listDir * operation */ - virtual void prepareUDSEntry(KIO::UDSEntry &entry, + virtual void prepareUDSEntry(TDEIO::UDSEntry &entry, bool listing=false) const; /** @@ -175,28 +175,28 @@ private: void connectLocalURLJob(LocalURLJob *job); private slots: - // KIO::Job - void slotResult(KIO::Job *job); - void slotWarning(KIO::Job *job, const TQString &msg); - void slotInfoMessage(KIO::Job *job, const TQString &msg); - void slotTotalSize(KIO::Job *job, KIO::filesize_t size); - void slotProcessedSize(KIO::Job *job, KIO::filesize_t size); - void slotSpeed(KIO::Job *job, unsigned long bytesPerSecond); - - // KIO::SimpleJob subclasses - void slotRedirection(KIO::Job *job, const KURL &url); - - // KIO::ListJob - void slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries); - - // KIO::TransferJob - void slotData(KIO::Job *job, const TQByteArray &data); - void slotDataReq(KIO::Job *job, TQByteArray &data); - void slotMimetype (KIO::Job *job, const TQString &type); - void slotCanResume (KIO::Job *job, KIO::filesize_t offset); - - // KIO::LocalURLJob - void slotLocalURL(KIO::Job *, const KURL&, bool); + // TDEIO::Job + void slotResult(TDEIO::Job *job); + void slotWarning(TDEIO::Job *job, const TQString &msg); + void slotInfoMessage(TDEIO::Job *job, const TQString &msg); + void slotTotalSize(TDEIO::Job *job, TDEIO::filesize_t size); + void slotProcessedSize(TDEIO::Job *job, TDEIO::filesize_t size); + void slotSpeed(TDEIO::Job *job, unsigned long bytesPerSecond); + + // TDEIO::SimpleJob subclasses + void slotRedirection(TDEIO::Job *job, const KURL &url); + + // TDEIO::ListJob + void slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &entries); + + // TDEIO::TransferJob + void slotData(TDEIO::Job *job, const TQByteArray &data); + void slotDataReq(TDEIO::Job *job, TQByteArray &data); + void slotMimetype (TDEIO::Job *job, const TQString &type); + void slotCanResume (TDEIO::Job *job, TDEIO::filesize_t offset); + + // TDEIO::LocalURLJob + void slotLocalURL(TDEIO::Job *, const KURL&, bool); }; } diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp index 63ba82921..36706a6cf 100644 --- a/kio/kio/global.cpp +++ b/kio/kio/global.cpp @@ -42,7 +42,7 @@ #include <volmgt.h> #endif -KIO_EXPORT TQString KIO::convertSizeWithBytes( KIO::filesize_t size ) +KIO_EXPORT TQString TDEIO::convertSizeWithBytes( TDEIO::filesize_t size ) { if ( size >= 1024 ) return convertSize( size ) + " (" + i18n( "%1 B" ).arg( TDEGlobal::locale()->formatNumber(size, 0) ) + ")"; @@ -50,7 +50,7 @@ KIO_EXPORT TQString KIO::convertSizeWithBytes( KIO::filesize_t size ) return convertSize( size ); } -KIO_EXPORT TQString KIO::convertSize( KIO::filesize_t size ) +KIO_EXPORT TQString TDEIO::convertSize( TDEIO::filesize_t size ) { double fsize = size; TQString s; @@ -88,20 +88,20 @@ KIO_EXPORT TQString KIO::convertSize( KIO::filesize_t size ) return s; } -KIO_EXPORT TQString KIO::convertSizeFromKB( KIO::filesize_t kbSize ) +KIO_EXPORT TQString TDEIO::convertSizeFromKB( TDEIO::filesize_t kbSize ) { return convertSize(kbSize * 1024); } -KIO_EXPORT TQString KIO::number( KIO::filesize_t size ) +KIO_EXPORT TQString TDEIO::number( TDEIO::filesize_t size ) { char charbuf[256]; sprintf(charbuf, "%lld", size); return TQString::fromLatin1(charbuf); } -KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize, - KIO::filesize_t processedSize, KIO::filesize_t speed ) +KIO_EXPORT unsigned int TDEIO::calculateRemainingSeconds( TDEIO::filesize_t totalSize, + TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) { if ( (speed != 0) && (totalSize != 0) ) return ( totalSize - processedSize ) / speed; @@ -109,7 +109,7 @@ KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSiz return 0; } -KIO_EXPORT TQString KIO::convertSeconds( unsigned int seconds ) +KIO_EXPORT TQString TDEIO::convertSeconds( unsigned int seconds ) { unsigned int days = seconds / 86400; unsigned int hours = (seconds - (days * 86400)) / 3600; @@ -124,12 +124,12 @@ KIO_EXPORT TQString KIO::convertSeconds( unsigned int seconds ) return timeStr; } -KIO_EXPORT TQTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) +KIO_EXPORT TQTime TDEIO::calculateRemaining( TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) { TQTime remainingTime; if ( speed != 0 ) { - KIO::filesize_t secs; + TDEIO::filesize_t secs; if ( totalSize == 0 ) { secs = 0; } else { @@ -147,7 +147,7 @@ KIO_EXPORT TQTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::files return remainingTime; } -KIO_EXPORT TQString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize) +KIO_EXPORT TQString TDEIO::itemsSummaryString(uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize) { TQString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items ); text += " - "; @@ -155,14 +155,14 @@ KIO_EXPORT TQString KIO::itemsSummaryString(uint items, uint files, uint dirs, K if ( showSize && files > 0 ) { text += " "; - text += i18n("(%1 Total)").arg(KIO::convertSize( size ) ); + text += i18n("(%1 Total)").arg(TDEIO::convertSize( size ) ); } text += " - "; text += dirs == 0 ? i18n( "No Folders" ) : i18n("One Folder", "%n Folders", dirs); return text; } -KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str ) +KIO_EXPORT TQString TDEIO::encodeFileName( const TQString & _str ) { TQString str( _str ); @@ -177,7 +177,7 @@ KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str ) return str; } -KIO_EXPORT TQString KIO::decodeFileName( const TQString & _str ) +KIO_EXPORT TQString TDEIO::decodeFileName( const TQString & _str ) { TQString str; @@ -205,210 +205,210 @@ KIO_EXPORT TQString KIO::decodeFileName( const TQString & _str ) return str; } -KIO_EXPORT TQString KIO::Job::errorString() const +KIO_EXPORT TQString TDEIO::Job::errorString() const { - return KIO::buildErrorString(m_error, m_errorText); + return TDEIO::buildErrorString(m_error, m_errorText); } -KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorText) +KIO_EXPORT TQString TDEIO::buildErrorString(int errorCode, const TQString &errorText) { TQString result; switch( errorCode ) { - case KIO::ERR_CANNOT_OPEN_FOR_READING: + case TDEIO::ERR_CANNOT_OPEN_FOR_READING: result = i18n( "Could not read %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_OPEN_FOR_WRITING: + case TDEIO::ERR_CANNOT_OPEN_FOR_WRITING: result = i18n( "Could not write to %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_LAUNCH_PROCESS: + case TDEIO::ERR_CANNOT_LAUNCH_PROCESS: result = i18n( "Could not start process %1." ).arg( errorText ); break; - case KIO::ERR_INTERNAL: + case TDEIO::ERR_INTERNAL: result = i18n( "Internal Error\nPlease send a full bug report at http://bugs.kde.org\n%1" ).arg( errorText ); break; - case KIO::ERR_MALFORMED_URL: + case TDEIO::ERR_MALFORMED_URL: result = i18n( "Malformed URL %1." ).arg( errorText ); break; - case KIO::ERR_UNSUPPORTED_PROTOCOL: + case TDEIO::ERR_UNSUPPORTED_PROTOCOL: result = i18n( "The protocol %1 is not supported." ).arg( errorText ); break; - case KIO::ERR_NO_SOURCE_PROTOCOL: + case TDEIO::ERR_NO_SOURCE_PROTOCOL: result = i18n( "The protocol %1 is only a filter protocol.").arg( errorText ); break; - case KIO::ERR_UNSUPPORTED_ACTION: + case TDEIO::ERR_UNSUPPORTED_ACTION: result = errorText; // result = i18n( "Unsupported action %1" ).arg( errorText ); break; - case KIO::ERR_IS_DIRECTORY: + case TDEIO::ERR_IS_DIRECTORY: result = i18n( "%1 is a folder, but a file was expected." ).arg( errorText ); break; - case KIO::ERR_IS_FILE: + case TDEIO::ERR_IS_FILE: result = i18n( "%1 is a file, but a folder was expected." ).arg( errorText ); break; - case KIO::ERR_DOES_NOT_EXIST: + case TDEIO::ERR_DOES_NOT_EXIST: result = i18n( "The file or folder %1 does not exist." ).arg( errorText ); break; - case KIO::ERR_FILE_ALREADY_EXIST: + case TDEIO::ERR_FILE_ALREADY_EXIST: result = i18n( "A file named %1 already exists." ).arg( errorText ); break; - case KIO::ERR_DIR_ALREADY_EXIST: + case TDEIO::ERR_DIR_ALREADY_EXIST: result = i18n( "A folder named %1 already exists." ).arg( errorText ); break; - case KIO::ERR_UNKNOWN_HOST: + case TDEIO::ERR_UNKNOWN_HOST: result = errorText.isEmpty() ? i18n( "No hostname specified." ) : i18n( "Unknown host %1" ).arg( errorText ); break; - case KIO::ERR_ACCESS_DENIED: + case TDEIO::ERR_ACCESS_DENIED: result = i18n( "Access denied to %1." ).arg( errorText ); break; - case KIO::ERR_WRITE_ACCESS_DENIED: + case TDEIO::ERR_WRITE_ACCESS_DENIED: result = i18n( "Access denied.\nCould not write to %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_ENTER_DIRECTORY: + case TDEIO::ERR_CANNOT_ENTER_DIRECTORY: result = i18n( "Could not enter folder %1." ).arg( errorText ); break; - case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: + case TDEIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: result = i18n( "The protocol %1 does not implement a folder service." ).arg( errorText ); break; - case KIO::ERR_CYCLIC_LINK: + case TDEIO::ERR_CYCLIC_LINK: result = i18n( "Found a cyclic link in %1." ).arg( errorText ); break; - case KIO::ERR_USER_CANCELED: + case TDEIO::ERR_USER_CANCELED: // Do nothing in this case. The user doesn't need to be told what he just did. break; - case KIO::ERR_CYCLIC_COPY: + case TDEIO::ERR_CYCLIC_COPY: result = i18n( "Found a cyclic link while copying %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_CREATE_SOCKET: + case TDEIO::ERR_COULD_NOT_CREATE_SOCKET: result = i18n( "Could not create socket for accessing %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_CONNECT: + case TDEIO::ERR_COULD_NOT_CONNECT: result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText ); break; - case KIO::ERR_CONNECTION_BROKEN: + case TDEIO::ERR_CONNECTION_BROKEN: result = i18n( "Connection to host %1 is broken." ).arg( errorText ); break; - case KIO::ERR_NOT_FILTER_PROTOCOL: + case TDEIO::ERR_NOT_FILTER_PROTOCOL: result = i18n( "The protocol %1 is not a filter protocol." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_MOUNT: + case TDEIO::ERR_COULD_NOT_MOUNT: result = i18n( "Could not mount device.\nThe reported error was:\n%1" ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_UNMOUNT: + case TDEIO::ERR_COULD_NOT_UNMOUNT: result = i18n( "Could not unmount device.\nThe reported error was:\n%1" ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_READ: + case TDEIO::ERR_COULD_NOT_READ: result = i18n( "Could not read file %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_WRITE: + case TDEIO::ERR_COULD_NOT_WRITE: result = i18n( "Could not write to file %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_BIND: + case TDEIO::ERR_COULD_NOT_BIND: result = i18n( "Could not bind %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_LISTEN: + case TDEIO::ERR_COULD_NOT_LISTEN: result = i18n( "Could not listen %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_ACCEPT: + case TDEIO::ERR_COULD_NOT_ACCEPT: result = i18n( "Could not accept %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_LOGIN: + case TDEIO::ERR_COULD_NOT_LOGIN: result = errorText; break; - case KIO::ERR_COULD_NOT_STAT: + case TDEIO::ERR_COULD_NOT_STAT: result = i18n( "Could not access %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_CLOSEDIR: + case TDEIO::ERR_COULD_NOT_CLOSEDIR: result = i18n( "Could not terminate listing %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_MKDIR: + case TDEIO::ERR_COULD_NOT_MKDIR: result = i18n( "Could not make folder %1." ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_RMDIR: + case TDEIO::ERR_COULD_NOT_RMDIR: result = i18n( "Could not remove folder %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_RESUME: + case TDEIO::ERR_CANNOT_RESUME: result = i18n( "Could not resume file %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_RENAME: + case TDEIO::ERR_CANNOT_RENAME: result = i18n( "Could not rename file %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_CHMOD: + case TDEIO::ERR_CANNOT_CHMOD: result = i18n( "Could not change permissions for %1." ).arg( errorText ); break; - case KIO::ERR_CANNOT_DELETE: + case TDEIO::ERR_CANNOT_DELETE: result = i18n( "Could not delete file %1." ).arg( errorText ); break; - case KIO::ERR_SLAVE_DIED: + case TDEIO::ERR_SLAVE_DIED: result = i18n( "The process for the %1 protocol died unexpectedly." ).arg( errorText ); break; - case KIO::ERR_OUT_OF_MEMORY: + case TDEIO::ERR_OUT_OF_MEMORY: result = i18n( "Error. Out of memory.\n%1" ).arg( errorText ); break; - case KIO::ERR_UNKNOWN_PROXY_HOST: + case TDEIO::ERR_UNKNOWN_PROXY_HOST: result = i18n( "Unknown proxy host\n%1" ).arg( errorText ); break; - case KIO::ERR_COULD_NOT_AUTHENTICATE: + case TDEIO::ERR_COULD_NOT_AUTHENTICATE: result = i18n( "Authorization failed, %1 authentication not supported" ).arg( errorText ); break; - case KIO::ERR_ABORTED: + case TDEIO::ERR_ABORTED: result = i18n( "User canceled action\n%1" ).arg( errorText ); break; - case KIO::ERR_INTERNAL_SERVER: + case TDEIO::ERR_INTERNAL_SERVER: result = i18n( "Internal error in server\n%1" ).arg( errorText ); break; - case KIO::ERR_SERVER_TIMEOUT: + case TDEIO::ERR_SERVER_TIMEOUT: result = i18n( "Timeout on server\n%1" ).arg( errorText ); break; - case KIO::ERR_UNKNOWN: + case TDEIO::ERR_UNKNOWN: result = i18n( "Unknown error\n%1" ).arg( errorText ); break; - case KIO::ERR_UNKNOWN_INTERRUPT: + case TDEIO::ERR_UNKNOWN_INTERRUPT: result = i18n( "Unknown interrupt\n%1" ).arg( errorText ); break; /* - case KIO::ERR_CHECKSUM_MISMATCH: + case TDEIO::ERR_CHECKSUM_MISMATCH: if (errorText) result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg(errorText); else result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg("document"); break; */ - case KIO::ERR_CANNOT_DELETE_ORIGINAL: + case TDEIO::ERR_CANNOT_DELETE_ORIGINAL: result = i18n( "Could not delete original file %1.\nPlease check permissions." ).arg( errorText ); break; - case KIO::ERR_CANNOT_DELETE_PARTIAL: + case TDEIO::ERR_CANNOT_DELETE_PARTIAL: result = i18n( "Could not delete partial file %1.\nPlease check permissions." ).arg( errorText ); break; - case KIO::ERR_CANNOT_RENAME_ORIGINAL: + case TDEIO::ERR_CANNOT_RENAME_ORIGINAL: result = i18n( "Could not rename original file %1.\nPlease check permissions." ).arg( errorText ); break; - case KIO::ERR_CANNOT_RENAME_PARTIAL: + case TDEIO::ERR_CANNOT_RENAME_PARTIAL: result = i18n( "Could not rename partial file %1.\nPlease check permissions." ).arg( errorText ); break; - case KIO::ERR_CANNOT_SYMLINK: + case TDEIO::ERR_CANNOT_SYMLINK: result = i18n( "Could not create symlink %1.\nPlease check permissions." ).arg( errorText ); break; - case KIO::ERR_NO_CONTENT: + case TDEIO::ERR_NO_CONTENT: result = errorText; break; - case KIO::ERR_DISK_FULL: + case TDEIO::ERR_DISK_FULL: result = i18n( "Could not write file %1.\nDisk full." ).arg( errorText ); break; - case KIO::ERR_IDENTICAL_FILES: + case TDEIO::ERR_IDENTICAL_FILES: result = i18n( "The source and destination are the same file.\n%1" ).arg( errorText ); break; - case KIO::ERR_SLAVE_DEFINED: + case TDEIO::ERR_SLAVE_DEFINED: result = errorText; break; - case KIO::ERR_UPGRADE_REQUIRED: + case TDEIO::ERR_UPGRADE_REQUIRED: result = i18n( "%1 is required by the server, but is not available." ).arg(errorText); break; - case KIO::ERR_POST_DENIED: + case TDEIO::ERR_POST_DENIED: result = i18n( "Access to restricted port in POST denied."); break; - case KIO::ERR_OFFLINE_MODE: + case TDEIO::ERR_OFFLINE_MODE: result = i18n( "Could not access %1.\nOffline mode active.").arg( errorText ); break; default: @@ -419,7 +419,7 @@ KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorTe return result; } -KIO_EXPORT TQString KIO::unsupportedActionErrorString(const TQString &protocol, int cmd) { +KIO_EXPORT TQString TDEIO::unsupportedActionErrorString(const TQString &protocol, int cmd) { switch (cmd) { case CMD_CONNECT: return i18n("Opening connections is not supported with the protocol %1." ).arg(protocol); @@ -458,7 +458,7 @@ KIO_EXPORT TQString KIO::unsupportedActionErrorString(const TQString &protocol, }/*end switch*/ } -KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/, +KIO_EXPORT TQStringList TDEIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/, int method /*= -1*/ ) const { TQString errorName, techName, description, ret2; @@ -508,7 +508,7 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0 return ret; } -KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorText, +KIO_EXPORT TQByteArray TDEIO::rawErrorDetail(int errorCode, const TQString &errorText, const KURL *reqUrl /*= 0L*/, int /*method = -1*/ ) { TQString url, host, protocol, datetime, domain, path, dir, filename; @@ -612,7 +612,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT TQString sNetwork = i18n( "Check your network connection status." ); switch( errorCode ) { - case KIO::ERR_CANNOT_OPEN_FOR_READING: + case TDEIO::ERR_CANNOT_OPEN_FOR_READING: errorName = i18n( "Cannot Open Resource For Reading" ); description = i18n( "This means that the contents of the requested file " "or folder <strong>%1</strong> could not be retrieved, as read " @@ -622,7 +622,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sQuerylock << sSysadmin; break; - case KIO::ERR_CANNOT_OPEN_FOR_WRITING: + case TDEIO::ERR_CANNOT_OPEN_FOR_WRITING: errorName = i18n( "Cannot Open Resource For Writing" ); description = i18n( "This means that the file, <strong>%1</strong>, could " "not be written to as requested, because access with permission to " @@ -631,7 +631,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sQuerylock << sSysadmin; break; - case KIO::ERR_CANNOT_LAUNCH_PROCESS: + case TDEIO::ERR_CANNOT_LAUNCH_PROCESS: errorName = i18n( "Cannot Initiate the %1 Protocol" ).arg( protocol ); techName = i18n( "Unable to Launch Process" ); description = i18n( "The program on your computer which provides access " @@ -644,7 +644,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sSysadmin; break; - case KIO::ERR_INTERNAL: + case TDEIO::ERR_INTERNAL: errorName = i18n( "Internal Error" ); description = i18n( "The program on your computer which provides access " "to the <strong>%1</strong> protocol has reported an internal error." ) @@ -653,7 +653,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_MALFORMED_URL: + case TDEIO::ERR_MALFORMED_URL: errorName = i18n( "Improperly Formatted URL" ); description = i18n( "The <strong>U</strong>niform <strong>R</strong>esource " "<strong>L</strong>ocator (URL) that you entered was not properly " @@ -663,7 +663,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTypo; break; - case KIO::ERR_UNSUPPORTED_PROTOCOL: + case TDEIO::ERR_UNSUPPORTED_PROTOCOL: errorName = i18n( "Unsupported Protocol %1" ).arg( protocol ); description = i18n( "The protocol <strong>%1</strong> is not supported " "by the TDE programs currently installed on this computer." ) @@ -679,7 +679,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT << sUpdate << sSysadmin; break; - case KIO::ERR_NO_SOURCE_PROTOCOL: + case TDEIO::ERR_NO_SOURCE_PROTOCOL: errorName = i18n( "URL Does Not Refer to a Resource." ); techName = i18n( "Protocol is a Filter Protocol" ); description = i18n( "The <strong>U</strong>niform <strong>R</strong>esource " @@ -692,7 +692,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTypo; break; - case KIO::ERR_UNSUPPORTED_ACTION: + case TDEIO::ERR_UNSUPPORTED_ACTION: errorName = i18n( "Unsupported Action: %1" ).arg( errorText ); description = i18n( "The requested action is not supported by the TDE " "program which is implementing the <strong>%1</strong> protocol." ) @@ -704,7 +704,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "outcome." ); break; - case KIO::ERR_IS_DIRECTORY: + case TDEIO::ERR_IS_DIRECTORY: errorName = i18n( "File Expected" ); description = i18n( "The request expected a file, however the " "folder <strong>%1</strong> was found instead." ).arg( dir ); @@ -712,7 +712,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sSysadmin; break; - case KIO::ERR_IS_FILE: + case TDEIO::ERR_IS_FILE: errorName = i18n( "Folder Expected" ); description = i18n( "The request expected a folder, however " "the file <strong>%1</strong> was found instead." ).arg( filename ); @@ -720,7 +720,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sSysadmin; break; - case KIO::ERR_DOES_NOT_EXIST: + case TDEIO::ERR_DOES_NOT_EXIST: errorName = i18n( "File or Folder Does Not Exist" ); description = i18n( "The specified file or folder <strong>%1</strong> " "does not exist." ).arg( dir ); @@ -728,7 +728,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sSysadmin; break; - case KIO::ERR_FILE_ALREADY_EXIST: + case TDEIO::ERR_FILE_ALREADY_EXIST: errorName = i18n( "File Already Exists" ); description = i18n( "The requested file could not be created because a " "file with the same name already exists." ); @@ -738,7 +738,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT << i18n( "Choose an alternate filename for the new file." ); break; - case KIO::ERR_DIR_ALREADY_EXIST: + case TDEIO::ERR_DIR_ALREADY_EXIST: errorName = i18n( "Folder Already Exists" ); description = i18n( "The requested folder could not be created because " "a folder with the same name already exists." ); @@ -748,7 +748,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT << i18n( "Choose an alternate name for the new folder." ); break; - case KIO::ERR_UNKNOWN_HOST: + case TDEIO::ERR_UNKNOWN_HOST: errorName = i18n( "Unknown Host" ); description = i18n( "An unknown host error indicates that the server with " "the requested name, <strong>%1</strong>, could not be " @@ -759,7 +759,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sNetwork << sSysadmin; break; - case KIO::ERR_ACCESS_DENIED: + case TDEIO::ERR_ACCESS_DENIED: errorName = i18n( "Access Denied" ); description = i18n( "Access was denied to the specified resource, " "<strong>%1</strong>." ).arg( url ); @@ -772,7 +772,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT if ( !isSlaveNetwork ) solutions << sServeradmin; break; - case KIO::ERR_WRITE_ACCESS_DENIED: + case TDEIO::ERR_WRITE_ACCESS_DENIED: errorName = i18n( "Write Access Denied" ); description = i18n( "This means that an attempt to write to the file " "<strong>%1</strong> was rejected." ).arg( filename ); @@ -780,7 +780,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sQuerylock << sSysadmin; break; - case KIO::ERR_CANNOT_ENTER_DIRECTORY: + case TDEIO::ERR_CANNOT_ENTER_DIRECTORY: errorName = i18n( "Unable to Enter Folder" ); description = i18n( "This means that an attempt to enter (in other words, " "to open) the requested folder <strong>%1</strong> was rejected." ) @@ -789,7 +789,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sQuerylock << sSysadmin; break; - case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: + case TDEIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM: errorName = i18n( "Folder Listing Unavailable" ); techName = i18n( "Protocol %1 is not a Filesystem" ).arg( protocol ); description = i18n( "This means that a request was made which requires " @@ -799,7 +799,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_CYCLIC_LINK: + case TDEIO::ERR_CYCLIC_LINK: errorName = i18n( "Cyclic Link Detected" ); description = i18n( "UNIX environments are commonly able to link a file or " "folder to a separate name and/or location. TDE detected a link or " @@ -809,7 +809,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "cause an infinite loop, and try again." ) << sSysadmin; break; - case KIO::ERR_USER_CANCELED: + case TDEIO::ERR_USER_CANCELED: // Do nothing in this case. The user doesn't need to be told what he just did. // rodda: However, if we have been called, an application is about to display // this information anyway. If we don't return sensible information, the @@ -820,7 +820,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << i18n( "Retry the request." ); break; - case KIO::ERR_CYCLIC_COPY: + case TDEIO::ERR_CYCLIC_COPY: errorName = i18n( "Cyclic Link Detected During Copy" ); description = i18n( "UNIX environments are commonly able to link a file or " "folder to a separate name and/or location. During the requested copy " @@ -831,7 +831,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "cause an infinite loop, and try again." ) << sSysadmin; break; - case KIO::ERR_COULD_NOT_CREATE_SOCKET: + case TDEIO::ERR_COULD_NOT_CREATE_SOCKET: errorName = i18n( "Could Not Create Network Connection" ); techName = i18n( "Could Not Create Socket" ); description = i18n( "This is a fairly technical error in which a required " @@ -841,7 +841,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sNetwork << sSysadmin; break; - case KIO::ERR_COULD_NOT_CONNECT: + case TDEIO::ERR_COULD_NOT_CONNECT: errorName = i18n( "Connection to Server Refused" ); description = i18n( "The server <strong>%1</strong> refused to allow this " "computer to make a connection." ).arg( host ); @@ -855,7 +855,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTryagain << sServeradmin << sSysadmin; break; - case KIO::ERR_CONNECTION_BROKEN: + case TDEIO::ERR_CONNECTION_BROKEN: errorName = i18n( "Connection to Server Closed Unexpectedly" ); description = i18n( "Although a connection was established to " "<strong>%1</strong>, the connection was closed at an unexpected point " @@ -865,7 +865,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTryagain << sServeradmin << sSysadmin; break; - case KIO::ERR_NOT_FILTER_PROTOCOL: + case TDEIO::ERR_NOT_FILTER_PROTOCOL: errorName = i18n( "URL Resource Invalid" ); techName = i18n( "Protocol %1 is not a Filter Protocol" ).arg( protocol ); description = i18n( "The <strong>U</strong>niform <strong>R</strong>esource " @@ -880,7 +880,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTypo << sSysadmin; break; - case KIO::ERR_COULD_NOT_MOUNT: + case TDEIO::ERR_COULD_NOT_MOUNT: errorName = i18n( "Unable to Initialize Input/Output Device" ); techName = i18n( "Could Not Mount Device" ); description = i18n( "The requested device could not be initialized " @@ -899,7 +899,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "on.; and try again." ) << sAccess << sSysadmin; break; - case KIO::ERR_COULD_NOT_UNMOUNT: + case TDEIO::ERR_COULD_NOT_UNMOUNT: errorName = i18n( "Unable to Uninitialize Input/Output Device" ); techName = i18n( "Could Not Unmount Device" ); description = i18n( "The requested device could not be uninitialized " @@ -917,7 +917,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "and try again." ) << sAccess << sSysadmin; break; - case KIO::ERR_COULD_NOT_READ: + case TDEIO::ERR_COULD_NOT_READ: errorName = i18n( "Cannot Read From Resource" ); description = i18n( "This means that although the resource, " "<strong>%1</strong>, was able to be opened, an error occurred while " @@ -930,7 +930,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sSysadmin; break; - case KIO::ERR_COULD_NOT_WRITE: + case TDEIO::ERR_COULD_NOT_WRITE: errorName = i18n( "Cannot Write to Resource" ); description = i18n( "This means that although the resource, <strong>%1</strong>" ", was able to be opened, an error occurred while writing to the resource." ) @@ -943,7 +943,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sSysadmin; break; - case KIO::ERR_COULD_NOT_BIND: + case TDEIO::ERR_COULD_NOT_BIND: errorName = i18n( "Could Not Listen for Network Connections" ); techName = i18n( "Could Not Bind" ); description = i18n( "This is a fairly technical error in which a required " @@ -954,7 +954,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sNetwork << sSysadmin; break; - case KIO::ERR_COULD_NOT_LISTEN: + case TDEIO::ERR_COULD_NOT_LISTEN: errorName = i18n( "Could Not Listen for Network Connections" ); techName = i18n( "Could Not Listen" ); description = i18n( "This is a fairly technical error in which a required " @@ -965,7 +965,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sNetwork << sSysadmin; break; - case KIO::ERR_COULD_NOT_ACCEPT: + case TDEIO::ERR_COULD_NOT_ACCEPT: errorName = i18n( "Could Not Accept Network Connection" ); description = i18n( "This is a fairly technical error in which an error " "occurred while attempting to accept an incoming network connection." ); @@ -975,7 +975,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sNetwork << sSysadmin; break; - case KIO::ERR_COULD_NOT_LOGIN: + case TDEIO::ERR_COULD_NOT_LOGIN: errorName = i18n( "Could Not Login: %1" ).arg( errorText ); description = i18n( "An attempt to login to perform the requested " "operation was unsuccessful." ); @@ -987,7 +987,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "are entered correctly." ) << sServeradmin << sSysadmin; break; - case KIO::ERR_COULD_NOT_STAT: + case TDEIO::ERR_COULD_NOT_STAT: errorName = i18n( "Could Not Determine Resource Status" ); techName = i18n( "Could Not Stat Resource" ); description = i18n( "An attempt to determine information about the status " @@ -999,13 +999,13 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "are entered correctly." ) << sSysadmin; break; - case KIO::ERR_COULD_NOT_CLOSEDIR: + case TDEIO::ERR_COULD_NOT_CLOSEDIR: //result = i18n( "Could not terminate listing %1" ).arg( errorText ); errorName = i18n( "Could Not Cancel Listing" ); techName = i18n( "FIXME: Document this" ); break; - case KIO::ERR_COULD_NOT_MKDIR: + case TDEIO::ERR_COULD_NOT_MKDIR: errorName = i18n( "Could Not Create Folder" ); description = i18n( "An attempt to create the requested folder failed." ); causes << cAccess << i18n( "The location where the folder was to be created " @@ -1014,7 +1014,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << i18n( "Retry the request." ) << sAccess; break; - case KIO::ERR_COULD_NOT_RMDIR: + case TDEIO::ERR_COULD_NOT_RMDIR: errorName = i18n( "Could Not Remove Folder" ); description = i18n( "An attempt to remove the specified folder, " "<strong>%1</strong>, failed." ).arg( dir ); @@ -1026,7 +1026,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "again." ) << sAccess; break; - case KIO::ERR_CANNOT_RESUME: + case TDEIO::ERR_CANNOT_RESUME: errorName = i18n( "Could Not Resume File Transfer" ); description = i18n( "The specified request asked that the transfer of " "file <strong>%1</strong> be resumed at a certain point of the " @@ -1037,7 +1037,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "transfer." ); break; - case KIO::ERR_CANNOT_RENAME: + case TDEIO::ERR_CANNOT_RENAME: errorName = i18n( "Could Not Rename Resource" ); description = i18n( "An attempt to rename the specified resource " "<strong>%1</strong> failed." ).arg( url ); @@ -1046,7 +1046,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sExists; break; - case KIO::ERR_CANNOT_CHMOD: + case TDEIO::ERR_CANNOT_CHMOD: errorName = i18n( "Could Not Alter Permissions of Resource" ); description = i18n( "An attempt to alter the permissions on the specified " "resource <strong>%1</strong> failed." ).arg( url ); @@ -1054,7 +1054,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sExists; break; - case KIO::ERR_CANNOT_DELETE: + case TDEIO::ERR_CANNOT_DELETE: errorName = i18n( "Could Not Delete Resource" ); description = i18n( "An attempt to delete the specified resource " "<strong>%1</strong> failed." ).arg( url ); @@ -1062,7 +1062,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess << sExists; break; - case KIO::ERR_SLAVE_DIED: + case TDEIO::ERR_SLAVE_DIED: errorName = i18n( "Unexpected Program Termination" ); description = i18n( "The program on your computer which provides access " "to the <strong>%1</strong> protocol has unexpectedly terminated." ) @@ -1071,7 +1071,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_OUT_OF_MEMORY: + case TDEIO::ERR_OUT_OF_MEMORY: errorName = i18n( "Out of Memory" ); description = i18n( "The program on your computer which provides access " "to the <strong>%1</strong> protocol could not obtain the memory " @@ -1080,7 +1080,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_UNKNOWN_PROXY_HOST: + case TDEIO::ERR_UNKNOWN_PROXY_HOST: errorName = i18n( "Unknown Proxy Host" ); description = i18n( "While retrieving information about the specified " "proxy host, <strong>%1</strong>, an Unknown Host error was encountered. " @@ -1094,7 +1094,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT << sSysadmin; break; - case KIO::ERR_COULD_NOT_AUTHENTICATE: + case TDEIO::ERR_COULD_NOT_AUTHENTICATE: errorName = i18n( "Authentication Failed: Method %1 Not Supported" ) .arg( errorText ); description = i18n( "Although you may have supplied the correct " @@ -1106,14 +1106,14 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "authentication method." ) << sSysadmin; break; - case KIO::ERR_ABORTED: + case TDEIO::ERR_ABORTED: errorName = i18n( "Request Aborted" ); description = i18n( "The request was not completed because it was " "aborted." ); solutions << i18n( "Retry the request." ); break; - case KIO::ERR_INTERNAL_SERVER: + case TDEIO::ERR_INTERNAL_SERVER: errorName = i18n( "Internal Error in Server" ); description = i18n( "The program on the server which provides access " "to the <strong>%1</strong> protocol has reported an internal error: " @@ -1127,7 +1127,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT "submit the bug report directly to them." ); break; - case KIO::ERR_SERVER_TIMEOUT: + case TDEIO::ERR_SERVER_TIMEOUT: errorName = i18n( "Timeout Error" ); description = i18n( "Although contact was made with the server, a " "response was not received within the amount of time allocated for " @@ -1145,7 +1145,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sTryagain << sServeradmin; break; - case KIO::ERR_UNKNOWN: + case TDEIO::ERR_UNKNOWN: errorName = i18n( "Unknown Error" ); description = i18n( "The program on your computer which provides access " "to the <strong>%1</strong> protocol has reported an unknown error: " @@ -1154,7 +1154,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_UNKNOWN_INTERRUPT: + case TDEIO::ERR_UNKNOWN_INTERRUPT: errorName = i18n( "Unknown Interruption" ); description = i18n( "The program on your computer which provides access " "to the <strong>%1</strong> protocol has reported an interruption of " @@ -1163,7 +1163,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sUpdate << sBugreport; break; - case KIO::ERR_CANNOT_DELETE_ORIGINAL: + case TDEIO::ERR_CANNOT_DELETE_ORIGINAL: errorName = i18n( "Could Not Delete Original File" ); description = i18n( "The requested operation required the deleting of " "the original file, most likely at the end of a file move operation. " @@ -1173,7 +1173,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess; break; - case KIO::ERR_CANNOT_DELETE_PARTIAL: + case TDEIO::ERR_CANNOT_DELETE_PARTIAL: errorName = i18n( "Could Not Delete Temporary File" ); description = i18n( "The requested operation required the creation of " "a temporary file in which to save the new file while being " @@ -1183,7 +1183,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess; break; - case KIO::ERR_CANNOT_RENAME_ORIGINAL: + case TDEIO::ERR_CANNOT_RENAME_ORIGINAL: errorName = i18n( "Could Not Rename Original File" ); description = i18n( "The requested operation required the renaming of " "the original file <strong>%1</strong>, however it could not be " @@ -1192,7 +1192,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess; break; - case KIO::ERR_CANNOT_RENAME_PARTIAL: + case TDEIO::ERR_CANNOT_RENAME_PARTIAL: errorName = i18n( "Could Not Rename Temporary File" ); description = i18n( "The requested operation required the creation of " "a temporary file <strong>%1</strong>, however it could not be " @@ -1201,7 +1201,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess; break; - case KIO::ERR_CANNOT_SYMLINK: + case TDEIO::ERR_CANNOT_SYMLINK: errorName = i18n( "Could Not Create Link" ); techName = i18n( "Could Not Create Symbolic Link" ); description = i18n( "The requested symbolic link %1 could not be created." ) @@ -1210,12 +1210,12 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT solutions << sAccess; break; - case KIO::ERR_NO_CONTENT: + case TDEIO::ERR_NO_CONTENT: errorName = i18n( "No Content" ); description = errorText; break; - case KIO::ERR_DISK_FULL: + case TDEIO::ERR_DISK_FULL: errorName = i18n( "Disk Full" ); description = i18n( "The requested file <strong>%1</strong> could not be " "written to as there is inadequate disk space." ).arg( errorText ); @@ -1225,7 +1225,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT << sSysadmin; break; - case KIO::ERR_IDENTICAL_FILES: + case TDEIO::ERR_IDENTICAL_FILES: errorName = i18n( "Source and Destination Files Identical" ); description = i18n( "The operation could not be completed because the " "source and destination files are the same file." ); @@ -1233,7 +1233,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT break; // We assume that the slave has all the details - case KIO::ERR_SLAVE_DEFINED: + case TDEIO::ERR_SLAVE_DEFINED: errorName = TQString::null; description = errorText; break; @@ -1368,7 +1368,7 @@ extern "C" void endvfsent( ); #endif /* HAVE_GETMNTINFO */ -TQString KIO::findDeviceMountPoint( const TQString& filename ) +TQString TDEIO::findDeviceMountPoint( const TQString& filename ) { TQString result; @@ -1909,13 +1909,13 @@ static TQString get_mount_info(const TQString& filename, #else //!Q_OS_UNIX //dummy -TQString KIO::findDeviceMountPoint( const TQString& filename ) +TQString TDEIO::findDeviceMountPoint( const TQString& filename ) { return TQString::null; } #endif -TQString KIO::findPathMountPoint(const TQString& filename) +TQString TDEIO::findPathMountPoint(const TQString& filename) { #ifdef Q_OS_UNIX MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; @@ -1926,7 +1926,7 @@ TQString KIO::findPathMountPoint(const TQString& filename) #endif } -bool KIO::manually_mounted(const TQString& filename) +bool TDEIO::manually_mounted(const TQString& filename) { #ifdef Q_OS_UNIX MountState isautofs = Unseen, isslow = Unseen, ismanual = Unseen; @@ -1938,7 +1938,7 @@ bool KIO::manually_mounted(const TQString& filename) #endif } -bool KIO::probably_slow_mounted(const TQString& filename) +bool TDEIO::probably_slow_mounted(const TQString& filename) { #ifdef Q_OS_UNIX MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; @@ -1950,7 +1950,7 @@ bool KIO::probably_slow_mounted(const TQString& filename) #endif } -bool KIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag) +bool TDEIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag) { #ifdef Q_OS_UNIX MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; @@ -1973,36 +1973,36 @@ bool KIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag) return false; } -KIO::CacheControl KIO::parseCacheControl(const TQString &cacheControl) +TDEIO::CacheControl TDEIO::parseCacheControl(const TQString &cacheControl) { TQString tmp = cacheControl.lower(); if (tmp == "cacheonly") - return KIO::CC_CacheOnly; + return TDEIO::CC_CacheOnly; if (tmp == "cache") - return KIO::CC_Cache; + return TDEIO::CC_Cache; if (tmp == "verify") - return KIO::CC_Verify; + return TDEIO::CC_Verify; if (tmp == "refresh") - return KIO::CC_Refresh; + return TDEIO::CC_Refresh; if (tmp == "reload") - return KIO::CC_Reload; + return TDEIO::CC_Reload; kdDebug() << "unrecognized Cache control option:"<<cacheControl<<endl; - return KIO::CC_Verify; + return TDEIO::CC_Verify; } -TQString KIO::getCacheControlString(KIO::CacheControl cacheControl) +TQString TDEIO::getCacheControlString(TDEIO::CacheControl cacheControl) { - if (cacheControl == KIO::CC_CacheOnly) + if (cacheControl == TDEIO::CC_CacheOnly) return "CacheOnly"; - if (cacheControl == KIO::CC_Cache) + if (cacheControl == TDEIO::CC_Cache) return "Cache"; - if (cacheControl == KIO::CC_Verify) + if (cacheControl == TDEIO::CC_Verify) return "Verify"; - if (cacheControl == KIO::CC_Refresh) + if (cacheControl == TDEIO::CC_Refresh) return "Refresh"; - if (cacheControl == KIO::CC_Reload) + if (cacheControl == TDEIO::CC_Reload) return "Reload"; kdDebug() << "unrecognized Cache control enum value:"<<cacheControl<<endl; return TQString::null; diff --git a/kio/kio/global.h b/kio/kio/global.h index 6b0408c04..0091c4801 100644 --- a/kio/kio/global.h +++ b/kio/kio/global.h @@ -31,7 +31,7 @@ * @short A namespace for KIO globals * */ -namespace KIO +namespace TDEIO { /// 64-bit file offset typedef TQ_LLONG fileoffset_t; @@ -44,7 +44,7 @@ namespace KIO * @param size size in bytes * @return converted size as a string - e.g. 123.4 kB , 12.0 MB */ - KIO_EXPORT TQString convertSize( KIO::filesize_t size ); + KIO_EXPORT TQString convertSize( TDEIO::filesize_t size ); /** * Converts @p size from bytes to a string representation with includes @@ -53,7 +53,7 @@ namespace KIO * @param size size in bytes * @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B */ - KIO_EXPORT TQString convertSizeWithBytes( KIO::filesize_t size ); + KIO_EXPORT TQString convertSizeWithBytes( TDEIO::filesize_t size ); /** * Converts a size to a string representation * Not unlike TQString::number(...) @@ -61,7 +61,7 @@ namespace KIO * @param size size in bytes * @return converted size as a string - e.g. 123456789 */ - KIO_EXPORT TQString number( KIO::filesize_t size ); + KIO_EXPORT TQString number( TDEIO::filesize_t size ); /** * Converts size from kilo-bytes to the string representation. @@ -69,7 +69,7 @@ namespace KIO * @param kbSize size in kilo-bytes * @return converted size as a string - e.g. 123.4 kB , 12.0 MB */ - KIO_EXPORT TQString convertSizeFromKB( KIO::filesize_t kbSize ); + KIO_EXPORT TQString convertSizeFromKB( TDEIO::filesize_t kbSize ); /** * Calculates remaining time in seconds from total size, processed size and speed. @@ -81,8 +81,8 @@ namespace KIO * * @since 3.4 */ - KIO_EXPORT unsigned int calculateRemainingSeconds( KIO::filesize_t totalSize, - KIO::filesize_t processedSize, KIO::filesize_t speed ); + KIO_EXPORT unsigned int calculateRemainingSeconds( TDEIO::filesize_t totalSize, + TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ); /** * Convert @p seconds to a string representing number of days, hours, minutes and seconds @@ -103,7 +103,7 @@ namespace KIO * @param speed speed in bytes per second * @return calculated remaining time */ - KIO_EXPORT TQTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED; + KIO_EXPORT TQTime calculateRemaining( TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) KDE_DEPRECATED; /** * Helper for showing information about a set of files and directories @@ -114,12 +114,12 @@ namespace KIO * @param showSize whether to show the size in the result * @return the summary string */ - KIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize); + KIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize); /** * Encodes (from the text displayed to the real filename) * This translates % into %% and / into %2f - * Used by KIO::link, for instance. + * Used by TDEIO::link, for instance. * @param str the file name to encode * @return the encoded file name */ @@ -401,7 +401,7 @@ namespace KIO * @return the cache control value * @see getCacheControlString() */ - KIO_EXPORT KIO::CacheControl parseCacheControl(const TQString &cacheControl); + KIO_EXPORT TDEIO::CacheControl parseCacheControl(const TQString &cacheControl); /** * Returns a string representation of the given cache control method. @@ -410,7 +410,7 @@ namespace KIO * @return the string representation * @see parseCacheControl() */ - KIO_EXPORT TQString getCacheControlString(KIO::CacheControl cacheControl); + KIO_EXPORT TQString getCacheControlString(TDEIO::CacheControl cacheControl); /** * Returns the mount point where @p device is mounted diff --git a/kio/kio/http_slave_defaults.h b/kio/kio/http_slave_defaults.h index 715efcfdb..e3247e39b 100644 --- a/kio/kio/http_slave_defaults.h +++ b/kio/kio/http_slave_defaults.h @@ -27,7 +27,7 @@ #define DEFAULT_MAX_CACHE_AGE 60*60*24*14 // 14 DAYS #define DEFAULT_CACHE_EXPIRE 3*60 // 3 MINS #define DEFAULT_CLEAN_CACHE_INTERVAL 30*60 // 30 MINS -#define DEFAULT_CACHE_CONTROL KIO::CC_Refresh // Verify with remote +#define DEFAULT_CACHE_CONTROL TDEIO::CC_Refresh // Verify with remote #define CACHE_REVISION "7\n" // Cache version // DEFAULT USER AGENT KEY - ENABLES OS NAME diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 3bbb72432..01bb2c60d 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -78,8 +78,8 @@ extern "C" { #include <fixx11h.h> #endif -using namespace KIO; -template class TQPtrList<KIO::Job>; +using namespace TDEIO; +template class TQPtrList<TDEIO::Job>; //this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX #define REPORT_TIMEOUT 200 @@ -102,7 +102,7 @@ public: // (requires a new ctor, and moving the ctor code to some init()). Job* m_parentJob; int m_extraFlags; - KIO::filesize_t m_processedSize; + TDEIO::filesize_t m_processedSize; unsigned long m_userTimestamp; }; @@ -118,16 +118,16 @@ Job::Job(bool showProgressInfo) : TQObject(0, "job"), m_error(0), m_percent(0) addMetaData("progress-id", TQString::number(m_progressId)); //kdDebug(7007) << "Created job " << this << " with progress info -- m_progressId=" << m_progressId << endl; // Connect global progress info signals - connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); - connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ), - Observer::self(), TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) ); - connect( this, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), - Observer::self(), TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( this, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), - Observer::self(), TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( this, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString & ) ), + Observer::self(), TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString & ) ) ); + connect( this, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), + Observer::self(), TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( this, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), + Observer::self(), TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( this, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) ); } // Don't exit while this job is running if (kapp) @@ -149,12 +149,12 @@ int& Job::extraFlags() return d->m_extraFlags; } -void Job::setProcessedSize(KIO::filesize_t size) +void Job::setProcessedSize(TDEIO::filesize_t size) { d->m_processedSize = size; } -KIO::filesize_t Job::getProcessedSize() +TDEIO::filesize_t Job::getProcessedSize() { return d->m_processedSize; } @@ -164,15 +164,15 @@ void Job::addSubjob(Job *job, bool inheritMetaData) //kdDebug(7007) << "addSubjob(" << job << ") this = " << this << endl; subjobs.append(job); - connect( job, TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotResult(KIO::Job*)) ); + connect( job, TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotResult(TDEIO::Job*)) ); // Forward information from that subjob. - connect( job, TQT_SIGNAL(speed( KIO::Job*, unsigned long )), - TQT_SLOT(slotSpeed(KIO::Job*, unsigned long)) ); + connect( job, TQT_SIGNAL(speed( TDEIO::Job*, unsigned long )), + TQT_SLOT(slotSpeed(TDEIO::Job*, unsigned long)) ); - connect( job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )), - TQT_SLOT(slotInfoMessage(KIO::Job*, const TQString &)) ); + connect( job, TQT_SIGNAL(infoMessage( TDEIO::Job*, const TQString & )), + TQT_SLOT(slotInfoMessage(TDEIO::Job*, const TQString &)) ); if (inheritMetaData) job->mergeMetaData(m_outgoingMetaData); @@ -197,7 +197,7 @@ void Job::removeSubjob( Job *job, bool mergeMetaData, bool emitResultIfLast ) emitResult(); } -void Job::emitPercent( KIO::filesize_t processedSize, KIO::filesize_t totalSize ) +void Job::emitPercent( TDEIO::filesize_t processedSize, TDEIO::filesize_t totalSize ) { // calculate percents unsigned long ipercent = m_percent; @@ -269,13 +269,13 @@ void Job::slotResult( Job *job ) removeSubjob(job); } -void Job::slotSpeed( KIO::Job*, unsigned long speed ) +void Job::slotSpeed( TDEIO::Job*, unsigned long speed ) { //kdDebug(7007) << "Job::slotSpeed " << speed << endl; emitSpeed( speed ); } -void Job::slotInfoMessage( KIO::Job*, const TQString & msg ) +void Job::slotInfoMessage( TDEIO::Job*, const TQString & msg ) { emit infoMessage( this, msg ); } @@ -352,7 +352,7 @@ bool Job::isInteractive() const void Job::setWindow(TQWidget *window) { m_window = window; - KIO::Scheduler::registerWindow(window); + TDEIO::Scheduler::registerWindow(window); } TQWidget *Job::window() const @@ -397,7 +397,7 @@ TQString Job::queryMetaData(const TQString &key) return m_incomingMetaData[key]; } -void Job::setMetaData( const KIO::MetaData &_metaData) +void Job::setMetaData( const TDEIO::MetaData &_metaData) { m_outgoingMetaData = _metaData; } @@ -512,11 +512,11 @@ void SimpleJob::start(Slave *slave) if ((extraFlags() & EF_TransferJobDataSent) == 0) { - connect( m_slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) ); + connect( m_slave, TQT_SIGNAL( totalSize( TDEIO::filesize_t ) ), + TQT_SLOT( slotTotalSize( TDEIO::filesize_t ) ) ); - connect( m_slave, TQT_SIGNAL( processedSize( KIO::filesize_t ) ), - TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) ); + connect( m_slave, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ), + TQT_SLOT( slotProcessedSize( TDEIO::filesize_t ) ) ); connect( m_slave, TQT_SIGNAL( speed( unsigned long ) ), TQT_SLOT( slotSpeed( unsigned long ) ) ); @@ -525,8 +525,8 @@ void SimpleJob::start(Slave *slave) connect( slave, TQT_SIGNAL( needProgressId() ), TQT_SLOT( slotNeedProgressId() ) ); - connect( slave, TQT_SIGNAL(metaData( const KIO::MetaData& ) ), - TQT_SLOT( slotMetaData( const KIO::MetaData& ) ) ); + connect( slave, TQT_SIGNAL(metaData( const TDEIO::MetaData& ) ), + TQT_SLOT( slotMetaData( const TDEIO::MetaData& ) ) ); if (m_window) { @@ -648,7 +648,7 @@ void SimpleJob::slotNeedProgressId() m_slave->setProgressId( m_progressId ); } -void SimpleJob::slotTotalSize( KIO::filesize_t size ) +void SimpleJob::slotTotalSize( TDEIO::filesize_t size ) { if (size > m_totalSize) { @@ -657,9 +657,9 @@ void SimpleJob::slotTotalSize( KIO::filesize_t size ) } } -void SimpleJob::slotProcessedSize( KIO::filesize_t size ) +void SimpleJob::slotProcessedSize( TDEIO::filesize_t size ) { - //kdDebug(7007) << "SimpleJob::slotProcessedSize " << KIO::number(size) << endl; + //kdDebug(7007) << "SimpleJob::slotProcessedSize " << TDEIO::number(size) << endl; setProcessedSize(size); emit processedSize( this, size ); if ( size > m_totalSize ) { @@ -674,7 +674,7 @@ void SimpleJob::slotSpeed( unsigned long speed ) emitSpeed( speed ); } -void SimpleJob::slotMetaData( const KIO::MetaData &_metaData) +void SimpleJob::slotMetaData( const TDEIO::MetaData &_metaData) { m_incomingMetaData += _metaData; } @@ -748,48 +748,48 @@ void MkdirJob::slotFinished() } } -SimpleJob *KIO::mkdir( const KURL& url, int permissions ) +SimpleJob *TDEIO::mkdir( const KURL& url, int permissions ) { //kdDebug(7007) << "mkdir " << url << endl; KIO_ARGS << url << permissions; return new MkdirJob(url, CMD_MKDIR, packedArgs, false); } -SimpleJob *KIO::rmdir( const KURL& url ) +SimpleJob *TDEIO::rmdir( const KURL& url ) { //kdDebug(7007) << "rmdir " << url << endl; KIO_ARGS << url << TQ_INT8(false); // isFile is false return new SimpleJob(url, CMD_DEL, packedArgs, false); } -SimpleJob *KIO::chmod( const KURL& url, int permissions ) +SimpleJob *TDEIO::chmod( const KURL& url, int permissions ) { //kdDebug(7007) << "chmod " << url << endl; KIO_ARGS << url << permissions; return new SimpleJob(url, CMD_CHMOD, packedArgs, false); } -SimpleJob *KIO::rename( const KURL& src, const KURL & dest, bool overwrite ) +SimpleJob *TDEIO::rename( const KURL& src, const KURL & dest, bool overwrite ) { //kdDebug(7007) << "rename " << src << " " << dest << endl; KIO_ARGS << src << dest << (TQ_INT8) overwrite; return new SimpleJob(src, CMD_RENAME, packedArgs, false); } -SimpleJob *KIO::symlink( const TQString& target, const KURL & dest, bool overwrite, bool showProgressInfo ) +SimpleJob *TDEIO::symlink( const TQString& target, const KURL & dest, bool overwrite, bool showProgressInfo ) { //kdDebug(7007) << "symlink target=" << target << " " << dest << endl; KIO_ARGS << target << dest << (TQ_INT8) overwrite; return new SimpleJob(dest, CMD_SYMLINK, packedArgs, showProgressInfo); } -SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProgressInfo) +SimpleJob *TDEIO::special(const KURL& url, const TQByteArray & data, bool showProgressInfo) { //kdDebug(7007) << "special " << url << endl; return new SimpleJob(url, CMD_SPECIAL, data, showProgressInfo); } -SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo ) +SimpleJob *TDEIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo ) { KIO_ARGS << int(1) << TQ_INT8( ro ? 1 : 0 ) << TQString::fromLatin1(fstype) << dev << point; @@ -799,7 +799,7 @@ SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const T return job; } -SimpleJob *KIO::unmount( const TQString& point, bool showProgressInfo ) +SimpleJob *TDEIO::unmount( const TQString& point, bool showProgressInfo ) { KIO_ARGS << int(2) << point; SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo ); @@ -837,7 +837,7 @@ void LocalURLJob::slotFinished() SimpleJob::slotFinished(); } -LocalURLJob *KIO::localURL( const KURL& remoteUrl ) +LocalURLJob *TDEIO::localURL( const KURL& remoteUrl ) { KIO_ARGS << remoteUrl; return new LocalURLJob(remoteUrl, CMD_LOCALURL, packedArgs, false); @@ -858,15 +858,15 @@ void StatJob::start(Slave *slave) m_outgoingMetaData.replace( "statSide", m_bSource ? "source" : "dest" ); m_outgoingMetaData.replace( "details", TQString::number(m_details) ); - connect( slave, TQT_SIGNAL( statEntry( const KIO::UDSEntry& ) ), - TQT_SLOT( slotStatEntry( const KIO::UDSEntry & ) ) ); + connect( slave, TQT_SIGNAL( statEntry( const TDEIO::UDSEntry& ) ), + TQT_SLOT( slotStatEntry( const TDEIO::UDSEntry & ) ) ); connect( slave, TQT_SIGNAL( redirection(const KURL &) ), TQT_SLOT( slotRedirection(const KURL &) ) ); SimpleJob::start(slave); } -void StatJob::slotStatEntry( const KIO::UDSEntry & entry ) +void StatJob::slotStatEntry( const TDEIO::UDSEntry & entry ) { //kdDebug(7007) << "StatJob::slotStatEntry" << endl; m_statResult = entry; @@ -912,18 +912,18 @@ void StatJob::slotFinished() } } -void StatJob::slotMetaData( const KIO::MetaData &_metaData) { +void StatJob::slotMetaData( const TDEIO::MetaData &_metaData) { SimpleJob::slotMetaData(_metaData); storeSSLSessionFromJob(m_redirectionURL); } -StatJob *KIO::stat(const KURL& url, bool showProgressInfo) +StatJob *TDEIO::stat(const KURL& url, bool showProgressInfo) { // Assume sideIsSource. Gets are more common than puts. return stat( url, true, 2, showProgressInfo ); } -StatJob *KIO::stat(const KURL& url, bool sideIsSource, short int details, bool showProgressInfo) +StatJob *TDEIO::stat(const KURL& url, bool sideIsSource, short int details, bool showProgressInfo) { kdDebug(7007) << "stat " << url << endl; KIO_ARGS << url; @@ -935,7 +935,7 @@ StatJob *KIO::stat(const KURL& url, bool sideIsSource, short int details, bool s return job; } -SimpleJob *KIO::http_update_cache( const KURL& url, bool no_cache, time_t expireDate) +SimpleJob *TDEIO::http_update_cache( const KURL& url, bool no_cache, time_t expireDate) { assert( (url.protocol() == "http") || (url.protocol() == "https") ); // Send http update_cache command (2) @@ -1074,7 +1074,7 @@ void TransferJob::sendAsyncData(const TQByteArray &dataForSlave) m_slave->send( MSG_DATA, dataForSlave ); if (extraFlags() & EF_TransferJobDataSent) { - KIO::filesize_t size = getProcessedSize()+dataForSlave.size(); + TDEIO::filesize_t size = getProcessedSize()+dataForSlave.size(); setProcessedSize(size); emit processedSize( this, size ); if ( size > m_totalSize ) { @@ -1181,8 +1181,8 @@ void TransferJob::start(Slave *slave) connect( slave, TQT_SIGNAL( needSubURLData() ), TQT_SLOT( slotNeedSubURLData() ) ); - connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ), - TQT_SLOT( slotCanResume( KIO::filesize_t ) ) ); + connect( slave, TQT_SIGNAL(canResume( TDEIO::filesize_t ) ), + TQT_SLOT( slotCanResume( TDEIO::filesize_t ) ) ); if (slave->suspended()) { @@ -1199,14 +1199,14 @@ void TransferJob::start(Slave *slave) void TransferJob::slotNeedSubURLData() { // Job needs data from subURL. - m_subJob = KIO::get( m_subUrl, false, false); + m_subJob = TDEIO::get( m_subUrl, false, false); suspend(); // Put job on hold until we have some data. - connect(m_subJob, TQT_SIGNAL( data(KIO::Job*,const TQByteArray &)), - TQT_SLOT( slotSubURLData(KIO::Job*,const TQByteArray &))); + connect(m_subJob, TQT_SIGNAL( data(TDEIO::Job*,const TQByteArray &)), + TQT_SLOT( slotSubURLData(TDEIO::Job*,const TQByteArray &))); addSubjob(m_subJob); } -void TransferJob::slotSubURLData(KIO::Job*, const TQByteArray &data) +void TransferJob::slotSubURLData(TDEIO::Job*, const TQByteArray &data) { // The Alternating Bitburg protocol in action again. staticData = data; @@ -1214,7 +1214,7 @@ void TransferJob::slotSubURLData(KIO::Job*, const TQByteArray &data) resume(); // Activate ourselves again. } -void TransferJob::slotMetaData( const KIO::MetaData &_metaData) { +void TransferJob::slotMetaData( const TDEIO::MetaData &_metaData) { SimpleJob::slotMetaData(_metaData); storeSSLSessionFromJob(m_redirectionURL); } @@ -1224,12 +1224,12 @@ void TransferJob::slotErrorPage() m_errorPage = true; } -void TransferJob::slotCanResume( KIO::filesize_t offset ) +void TransferJob::slotCanResume( TDEIO::filesize_t offset ) { emit canResume(this, offset); } -void TransferJob::slotResult( KIO::Job *job) +void TransferJob::slotResult( TDEIO::Job *job) { // This can only be our suburl. assert(job == m_subJob); @@ -1251,7 +1251,7 @@ void TransferJob::slotResult( KIO::Job *job) removeSubjob( job, false, false ); // Remove job, but don't kill this job. } -TransferJob *KIO::get( const KURL& url, bool reload, bool showProgressInfo ) +TransferJob *TDEIO::get( const KURL& url, bool reload, bool showProgressInfo ) { // Send decoded path and encoded query KIO_ARGS << url; @@ -1274,7 +1274,7 @@ public: }; -TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool showProgressInfo ) +TransferJob *TDEIO::http_post( const KURL& url, const TQByteArray &postData, bool showProgressInfo ) { int _error = 0; @@ -1344,7 +1344,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool for (int cnt=0; bad_ports[cnt]; ++cnt) if (url.port() == bad_ports[cnt]) { - _error = KIO::ERR_POST_DENIED; + _error = TDEIO::ERR_POST_DENIED; break; } @@ -1354,7 +1354,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool static TQValueList< int >* overriden_ports = NULL; if( !override_loaded ) { - KConfig cfg( "kio_httprc", true ); + TDEConfig cfg( "kio_httprc", true ); overriden_ports = new TQValueList< int >; *overriden_ports = cfg.readIntListEntry( "OverriddenPorts" ); override_loaded = true; @@ -1368,7 +1368,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool // filter out non https? protocols if ((url.protocol() != "http") && (url.protocol() != "https" )) - _error = KIO::ERR_POST_DENIED; + _error = TDEIO::ERR_POST_DENIED; bool redirection = false; KURL _url(url); @@ -1379,7 +1379,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool } if (!_error && !kapp->authorizeURLAction("open", KURL(), _url)) - _error = KIO::ERR_ACCESS_DENIED; + _error = TDEIO::ERR_ACCESS_DENIED; // if request is not valid, return an invalid transfer job if (_error) @@ -1411,7 +1411,7 @@ void TransferJob::slotPostRedirection() } -TransferJob *KIO::put( const KURL& url, int permissions, +TransferJob *TDEIO::put( const KURL& url, int permissions, bool overwrite, bool resume, bool showProgressInfo ) { KIO_ARGS << url << TQ_INT8( overwrite ? 1 : 0 ) << TQ_INT8( resume ? 1 : 0 ) << permissions; @@ -1428,10 +1428,10 @@ StoredTransferJob::StoredTransferJob(const KURL& url, int command, : TransferJob( url, command, packedArgs, _staticData, showProgressInfo ), m_uploadOffset( 0 ) { - connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - TQT_SLOT( slotStoredData( KIO::Job *, const TQByteArray & ) ) ); - connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ), - TQT_SLOT( slotStoredDataReq( KIO::Job *, TQByteArray & ) ) ); + connect( this, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotStoredData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( this, TQT_SIGNAL( dataReq( TDEIO::Job *, TQByteArray & ) ), + TQT_SLOT( slotStoredDataReq( TDEIO::Job *, TQByteArray & ) ) ); } void StoredTransferJob::setData( const TQByteArray& arr ) @@ -1441,7 +1441,7 @@ void StoredTransferJob::setData( const TQByteArray& arr ) m_data = arr; } -void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data ) +void StoredTransferJob::slotStoredData( TDEIO::Job *, const TQByteArray &data ) { // check for end-of-data marker: if ( data.size() == 0 ) @@ -1451,7 +1451,7 @@ void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data ) memcpy( m_data.data() + oldSize, data.data(), data.size() ); } -void StoredTransferJob::slotStoredDataReq( KIO::Job *, TQByteArray &data ) +void StoredTransferJob::slotStoredDataReq( TDEIO::Job *, TQByteArray &data ) { // Inspired from kmail's KMKernel::byteArrayToRemoteFile // send the data in 64 KB chunks @@ -1472,7 +1472,7 @@ void StoredTransferJob::slotStoredDataReq( KIO::Job *, TQByteArray &data ) } } -StoredTransferJob *KIO::storedGet( const KURL& url, bool reload, bool showProgressInfo ) +StoredTransferJob *TDEIO::storedGet( const KURL& url, bool reload, bool showProgressInfo ) { // Send decoded path and encoded query KIO_ARGS << url; @@ -1482,7 +1482,7 @@ StoredTransferJob *KIO::storedGet( const KURL& url, bool reload, bool showProgre return job; } -StoredTransferJob *KIO::storedPut( const TQByteArray& arr, const KURL& url, int permissions, +StoredTransferJob *TDEIO::storedPut( const TQByteArray& arr, const KURL& url, int permissions, bool overwrite, bool resume, bool showProgressInfo ) { KIO_ARGS << url << TQ_INT8( overwrite ? 1 : 0 ) << TQ_INT8( resume ? 1 : 0 ) << permissions; @@ -1508,7 +1508,7 @@ void MimetypeJob::start(Slave *slave) void MimetypeJob::slotFinished( ) { //kdDebug(7007) << "MimetypeJob::slotFinished()" << endl; - if ( m_error == KIO::ERR_IS_DIRECTORY ) + if ( m_error == TDEIO::ERR_IS_DIRECTORY ) { // It is in fact a directory. This happens when HTTP redirects to FTP. // Due to the "protocol doesn't support listing" code in KRun, we @@ -1540,7 +1540,7 @@ void MimetypeJob::slotFinished( ) } } -MimetypeJob *KIO::mimetype(const KURL& url, bool showProgressInfo ) +MimetypeJob *TDEIO::mimetype(const KURL& url, bool showProgressInfo ) { KIO_ARGS << url; MimetypeJob * job = new MimetypeJob(url, CMD_MIMETYPE, packedArgs, showProgressInfo); @@ -1559,12 +1559,12 @@ DirectCopyJob::DirectCopyJob( const KURL& url, int command, void DirectCopyJob::start( Slave* slave ) { - connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ), - TQT_SLOT( slotCanResume( KIO::filesize_t ) ) ); + connect( slave, TQT_SIGNAL(canResume( TDEIO::filesize_t ) ), + TQT_SLOT( slotCanResume( TDEIO::filesize_t ) ) ); SimpleJob::start(slave); } -void DirectCopyJob::slotCanResume( KIO::filesize_t offset ) +void DirectCopyJob::slotCanResume( TDEIO::filesize_t offset ) { emit canResume(this, offset); } @@ -1575,7 +1575,7 @@ void DirectCopyJob::slotCanResume( KIO::filesize_t offset ) class FileCopyJob::FileCopyJobPrivate { public: - KIO::filesize_t m_sourceSize; + TDEIO::filesize_t m_sourceSize; time_t m_modificationTime; SimpleJob *m_delJob; }; @@ -1605,7 +1605,7 @@ FileCopyJob::FileCopyJob( const KURL& src, const KURL& dest, int permissions, m_putJob = 0; d = new FileCopyJobPrivate; d->m_delJob = 0; - d->m_sourceSize = (KIO::filesize_t) -1; + d->m_sourceSize = (TDEIO::filesize_t) -1; d->m_modificationTime = static_cast<time_t>( -1 ); TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); } @@ -1677,10 +1677,10 @@ void FileCopyJob::setSourceSize( off_t size ) m_totalSize = size; } -void FileCopyJob::setSourceSize64( KIO::filesize_t size ) +void FileCopyJob::setSourceSize64( TDEIO::filesize_t size ) { d->m_sourceSize = size; - if (size != (KIO::filesize_t) -1) + if (size != (TDEIO::filesize_t) -1) m_totalSize = size; } @@ -1701,8 +1701,8 @@ void FileCopyJob::startCopyJob(const KURL &slave_url) m_copyJob = new DirectCopyJob(slave_url, CMD_COPY, packedArgs, false); addSubjob( m_copyJob ); connectSubjob( m_copyJob ); - connect( m_copyJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)), - TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t))); + connect( m_copyJob, TQT_SIGNAL(canResume(TDEIO::Job *, TDEIO::filesize_t)), + TQT_SLOT( slotCanResume(TDEIO::Job *, TDEIO::filesize_t))); } void FileCopyJob::startRenameJob(const KURL &slave_url) @@ -1715,18 +1715,18 @@ void FileCopyJob::startRenameJob(const KURL &slave_url) void FileCopyJob::connectSubjob( SimpleJob * job ) { - connect( job, TQT_SIGNAL(totalSize( KIO::Job*, KIO::filesize_t )), - this, TQT_SLOT( slotTotalSize(KIO::Job*, KIO::filesize_t)) ); + connect( job, TQT_SIGNAL(totalSize( TDEIO::Job*, TDEIO::filesize_t )), + this, TQT_SLOT( slotTotalSize(TDEIO::Job*, TDEIO::filesize_t)) ); - connect( job, TQT_SIGNAL(processedSize( KIO::Job*, KIO::filesize_t )), - this, TQT_SLOT( slotProcessedSize(KIO::Job*, KIO::filesize_t)) ); + connect( job, TQT_SIGNAL(processedSize( TDEIO::Job*, TDEIO::filesize_t )), + this, TQT_SLOT( slotProcessedSize(TDEIO::Job*, TDEIO::filesize_t)) ); - connect( job, TQT_SIGNAL(percent( KIO::Job*, unsigned long )), - this, TQT_SLOT( slotPercent(KIO::Job*, unsigned long)) ); + connect( job, TQT_SIGNAL(percent( TDEIO::Job*, unsigned long )), + this, TQT_SLOT( slotPercent(TDEIO::Job*, unsigned long)) ); } -void FileCopyJob::slotProcessedSize( KIO::Job *, KIO::filesize_t size ) +void FileCopyJob::slotProcessedSize( TDEIO::Job *, TDEIO::filesize_t size ) { setProcessedSize(size); emit processedSize( this, size ); @@ -1736,7 +1736,7 @@ void FileCopyJob::slotProcessedSize( KIO::Job *, KIO::filesize_t size ) emitPercent( size, m_totalSize ); } -void FileCopyJob::slotTotalSize( KIO::Job*, KIO::filesize_t size ) +void FileCopyJob::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) { if (size > m_totalSize) { @@ -1745,7 +1745,7 @@ void FileCopyJob::slotTotalSize( KIO::Job*, KIO::filesize_t size ) } } -void FileCopyJob::slotPercent( KIO::Job*, unsigned long pct ) +void FileCopyJob::slotPercent( TDEIO::Job*, unsigned long pct ) { if ( pct > m_percent ) { @@ -1770,18 +1770,18 @@ void FileCopyJob::startDataPump() // The first thing the put job will tell us is whether we can // resume or not (this is always emitted) - connect( m_putJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)), - TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t))); - connect( m_putJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray&)), - TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray&))); + connect( m_putJob, TQT_SIGNAL(canResume(TDEIO::Job *, TDEIO::filesize_t)), + TQT_SLOT( slotCanResume(TDEIO::Job *, TDEIO::filesize_t))); + connect( m_putJob, TQT_SIGNAL(dataReq(TDEIO::Job *, TQByteArray&)), + TQT_SLOT( slotDataReq(TDEIO::Job *, TQByteArray&))); addSubjob( m_putJob ); } -void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) +void FileCopyJob::slotCanResume( TDEIO::Job* job, TDEIO::filesize_t offset ) { if ( job == m_putJob || job == m_copyJob ) { - //kdDebug(7007) << "FileCopyJob::slotCanResume from PUT job. offset=" << KIO::number(offset) << endl; + //kdDebug(7007) << "FileCopyJob::slotCanResume from PUT job. offset=" << TDEIO::number(offset) << endl; if (offset) { RenameDlg_Result res = R_RESUME; @@ -1789,7 +1789,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) if (!KProtocolManager::autoResume() && !m_overwrite) { TQString newPath; - KIO::Job* job = ( !m_progressId && parentJob() ) ? parentJob() : this; + TDEIO::Job* job = ( !m_progressId && parentJob() ) ? parentJob() : this; // Ask confirmation about resuming previous transfer res = Observer::self()->open_RenameDlg( job, i18n("File Already Exists"), @@ -1822,18 +1822,18 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) m_getJob->addMetaData( "errorPage", "false" ); m_getJob->addMetaData( "AllowCompressedPage", "false" ); // Set size in subjob. This helps if the slave doesn't emit totalSize. - if ( d->m_sourceSize != (KIO::filesize_t)-1 ) + if ( d->m_sourceSize != (TDEIO::filesize_t)-1 ) m_getJob->slotTotalSize( d->m_sourceSize ); if (offset) { //kdDebug(7007) << "Setting metadata for resume to " << (unsigned long) offset << endl; // TODO KDE4: rename to seek or offset and document it // This isn't used only for resuming, but potentially also for extracting (#72302). - m_getJob->addMetaData( "resume", KIO::number(offset) ); + m_getJob->addMetaData( "resume", TDEIO::number(offset) ); // Might or might not get emitted - connect( m_getJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)), - TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t))); + connect( m_getJob, TQT_SIGNAL(canResume(TDEIO::Job *, TDEIO::filesize_t)), + TQT_SLOT( slotCanResume(TDEIO::Job *, TDEIO::filesize_t))); } m_putJob->slave()->setOffset( offset ); @@ -1842,10 +1842,10 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) connectSubjob( m_getJob ); // Progress info depends on get m_getJob->resume(); // Order a beer - connect( m_getJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)), - TQT_SLOT( slotData(KIO::Job*,const TQByteArray&)) ); - connect( m_getJob, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&) ), - TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) ); + connect( m_getJob, TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray&)), + TQT_SLOT( slotData(TDEIO::Job*,const TQByteArray&)) ); + connect( m_getJob, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&) ), + TQT_SLOT(slotMimetype(TDEIO::Job*,const TQString&)) ); } else // copyjob { @@ -1865,7 +1865,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) << " m_getJob=" << m_getJob << " m_putJob=" << m_putJob << endl; } -void FileCopyJob::slotData( KIO::Job * , const TQByteArray &data) +void FileCopyJob::slotData( TDEIO::Job * , const TQByteArray &data) { //kdDebug(7007) << "FileCopyJob::slotData" << endl; //kdDebug(7007) << " data size : " << data.size() << endl; @@ -1885,7 +1885,7 @@ void FileCopyJob::slotData( KIO::Job * , const TQByteArray &data) } } -void FileCopyJob::slotDataReq( KIO::Job * , TQByteArray &data) +void FileCopyJob::slotDataReq( TDEIO::Job * , TQByteArray &data) { //kdDebug(7007) << "FileCopyJob::slotDataReq" << endl; if (!m_resumeAnswerSent && !m_getJob) @@ -1906,12 +1906,12 @@ void FileCopyJob::slotDataReq( KIO::Job * , TQByteArray &data) m_buffer = TQByteArray(); } -void FileCopyJob::slotMimetype( KIO::Job*, const TQString& type ) +void FileCopyJob::slotMimetype( TDEIO::Job*, const TQString& type ) { emit mimetype( this, type ); } -void FileCopyJob::slotResult( KIO::Job *job) +void FileCopyJob::slotResult( TDEIO::Job *job) { //kdDebug(7007) << "FileCopyJob this=" << this << " ::slotResult(" << job << ")" << endl; // Did job have an error ? @@ -1994,19 +1994,19 @@ void FileCopyJob::slotResult( KIO::Job *job) removeSubjob(job); } -FileCopyJob *KIO::file_copy( const KURL& src, const KURL& dest, int permissions, +FileCopyJob *TDEIO::file_copy( const KURL& src, const KURL& dest, int permissions, bool overwrite, bool resume, bool showProgressInfo) { return new FileCopyJob( src, dest, permissions, false, overwrite, resume, showProgressInfo ); } -FileCopyJob *KIO::file_move( const KURL& src, const KURL& dest, int permissions, +FileCopyJob *TDEIO::file_move( const KURL& src, const KURL& dest, int permissions, bool overwrite, bool resume, bool showProgressInfo) { return new FileCopyJob( src, dest, permissions, true, overwrite, resume, showProgressInfo ); } -SimpleJob *KIO::file_delete( const KURL& src, bool showProgressInfo) +SimpleJob *TDEIO::file_delete( const KURL& src, bool showProgressInfo) { KIO_ARGS << src << TQ_INT8(true); // isFile return new SimpleJob(src, CMD_DEL, packedArgs, showProgressInfo ); @@ -2025,7 +2025,7 @@ ListJob::ListJob(const KURL& u, bool showProgressInfo, bool _recursive, TQString stream << u; } -void ListJob::slotListEntries( const KIO::UDSEntryList& list ) +void ListJob::slotListEntries( const TDEIO::UDSEntryList& list ) { // Emit progress info (takes care of emit processedSize and percent) m_processedEntries += list.count(); @@ -2074,10 +2074,10 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list ) prefix + filename + "/", includeHidden); Scheduler::scheduleJob(job); - connect(job, TQT_SIGNAL(entries( KIO::Job *, - const KIO::UDSEntryList& )), - TQT_SLOT( gotEntries( KIO::Job*, - const KIO::UDSEntryList& ))); + connect(job, TQT_SIGNAL(entries( TDEIO::Job *, + const TDEIO::UDSEntryList& )), + TQT_SLOT( gotEntries( TDEIO::Job*, + const TDEIO::UDSEntryList& ))); addSubjob(job); } } @@ -2117,13 +2117,13 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list ) } } -void ListJob::gotEntries(KIO::Job *, const KIO::UDSEntryList& list ) +void ListJob::gotEntries(TDEIO::Job *, const TDEIO::UDSEntryList& list ) { // Forward entries received by subjob - faking we received them ourselves emit entries(this, list); } -void ListJob::slotResult( KIO::Job * job ) +void ListJob::slotResult( TDEIO::Job * job ) { // If we can't list a subdir, the result is still ok // This is why we override Job::slotResult() - to skip error checking @@ -2146,7 +2146,7 @@ void ListJob::slotRedirection( const KURL & url ) void ListJob::slotFinished() { // Support for listing archives as directories - if ( m_error == KIO::ERR_IS_FILE && m_url.isLocalFile() ) { + if ( m_error == TDEIO::ERR_IS_FILE && m_url.isLocalFile() ) { KMimeType::Ptr ptr = KMimeType::findByURL( m_url, 0, true, true ); if ( ptr ) { TQString proto = ptr->property("X-TDE-LocalProtocol").toString(); @@ -2178,18 +2178,18 @@ void ListJob::slotFinished() } } -void ListJob::slotMetaData( const KIO::MetaData &_metaData) { +void ListJob::slotMetaData( const TDEIO::MetaData &_metaData) { SimpleJob::slotMetaData(_metaData); storeSSLSessionFromJob(m_redirectionURL); } -ListJob *KIO::listDir( const KURL& url, bool showProgressInfo, bool includeHidden ) +ListJob *TDEIO::listDir( const KURL& url, bool showProgressInfo, bool includeHidden ) { ListJob * job = new ListJob(url, showProgressInfo,false,TQString::null,includeHidden); return job; } -ListJob *KIO::listRecursive( const KURL& url, bool showProgressInfo, bool includeHidden ) +ListJob *TDEIO::listRecursive( const KURL& url, bool showProgressInfo, bool includeHidden ) { ListJob * job = new ListJob(url, showProgressInfo, true,TQString::null,includeHidden); return job; @@ -2212,10 +2212,10 @@ void ListJob::start(Slave *slave) TQTimer::singleShot(0, this, TQT_SLOT(slotFinished()) ); return; } - connect( slave, TQT_SIGNAL( listEntries( const KIO::UDSEntryList& )), - TQT_SLOT( slotListEntries( const KIO::UDSEntryList& ))); - connect( slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) ); + connect( slave, TQT_SIGNAL( listEntries( const TDEIO::UDSEntryList& )), + TQT_SLOT( slotListEntries( const TDEIO::UDSEntryList& ))); + connect( slave, TQT_SIGNAL( totalSize( TDEIO::filesize_t ) ), + TQT_SLOT( slotTotalSize( TDEIO::filesize_t ) ) ); connect( slave, TQT_SIGNAL( redirection(const KURL &) ), TQT_SLOT( slotRedirection(const KURL &) ) ); @@ -2260,11 +2260,11 @@ CopyJob::CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool a d->m_globalDestinationState = destinationState; if ( showProgressInfo ) { - connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); - connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); } TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); /** @@ -2301,7 +2301,7 @@ void CopyJob::slotStart() m_reportTimer->start(REPORT_TIMEOUT,false); // Stat the dest - KIO::Job * job = KIO::stat( m_dest, false, 2, false ); + TDEIO::Job * job = TDEIO::stat( m_dest, false, 2, false ); //kdDebug(7007) << "CopyJob:stating the dest " << m_dest << endl; addSubjob(job); } @@ -2328,7 +2328,7 @@ void CopyJob::slotResultStating( Job *job ) info.permissions = (mode_t) -1; info.mtime = (time_t) -1; info.ctime = (time_t) -1; - info.size = (KIO::filesize_t)-1; + info.size = (TDEIO::filesize_t)-1; info.uSource = srcurl; info.uDest = m_dest; // Append filename or dirname to destination URL, if allowed @@ -2525,7 +2525,7 @@ void CopyJob::slotReport() } } -void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list) +void CopyJob::slotEntries(TDEIO::Job* job, const UDSEntryList& list) { UDSEntryListConstIterator it = list.begin(); UDSEntryListConstIterator end = list.end(); @@ -2535,7 +2535,7 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list) info.permissions = -1; info.mtime = (time_t) -1; info.ctime = (time_t) -1; - info.size = (KIO::filesize_t)-1; + info.size = (TDEIO::filesize_t)-1; TQString displayName; KURL url; TQString localPath; @@ -2562,7 +2562,7 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list) info.permissions = ((*it2).m_long); break; case UDS_SIZE: - info.size = (KIO::filesize_t)((*it2).m_long); + info.size = (TDEIO::filesize_t)((*it2).m_long); m_totalSize += info.size; break; case UDS_MODIFICATION_TIME: @@ -2627,7 +2627,7 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list) // Otherwise, we end up with e.g. dest=..../Desktop/ itself. // (This can happen when dropping a link to a webpage with no path) if ( destFileName.isEmpty() ) - destFileName = KIO::encodeFileName( info.uSource.prettyURL() ); + destFileName = TDEIO::encodeFileName( info.uSource.prettyURL() ); //kdDebug(7007) << " adding destFileName=" << destFileName << endl; info.uDest.addPath( destFileName ); @@ -2682,7 +2682,7 @@ void CopyJob::statCurrentSrc() info.permissions = -1; info.mtime = (time_t) -1; info.ctime = (time_t) -1; - info.size = (KIO::filesize_t)-1; + info.size = (TDEIO::filesize_t)-1; info.uSource = m_currentSrcURL; info.uDest = m_currentDest; // Append filename or dirname to destination URL, if allowed @@ -2703,7 +2703,7 @@ void CopyJob::statCurrentSrc() // Different protocols, we'll create a .desktop file // We have to change the extension anyway, so while we're at it, // name the file like the URL - info.uDest.addPath( KIO::encodeFileName( m_currentSrcURL.prettyURL() )+".desktop" ); + info.uDest.addPath( TDEIO::encodeFileName( m_currentSrcURL.prettyURL() )+".desktop" ); } } files.append( info ); // Files and any symlinks @@ -2750,8 +2750,8 @@ void CopyJob::statCurrentSrc() } // Stat the next src url - Job * job = KIO::stat( m_currentSrcURL, true, 2, false ); - //kdDebug(7007) << "KIO::stat on " << m_currentSrcURL << endl; + Job * job = TDEIO::stat( m_currentSrcURL, true, 2, false ); + //kdDebug(7007) << "TDEIO::stat on " << m_currentSrcURL << endl; state = STATE_STATING; addSubjob(job); m_currentDestURL=m_dest; @@ -2790,7 +2790,7 @@ void CopyJob::startRenameJob( const KURL& slave_url ) info.permissions = -1; info.mtime = (time_t) -1; info.ctime = (time_t) -1; - info.size = (KIO::filesize_t)-1; + info.size = (TDEIO::filesize_t)-1; info.uSource = m_currentSrcURL; info.uDest = dest; TQValueList<CopyInfo> files; @@ -2811,10 +2811,10 @@ void CopyJob::startListing( const KURL & src ) d->m_bURLDirty = true; ListJob * newjob = listRecursive( src, false ); newjob->setUnrestricted(true); - connect(newjob, TQT_SIGNAL(entries( KIO::Job *, - const KIO::UDSEntryList& )), - TQT_SLOT( slotEntries( KIO::Job*, - const KIO::UDSEntryList& ))); + connect(newjob, TQT_SIGNAL(entries( TDEIO::Job *, + const TDEIO::UDSEntryList& )), + TQT_SLOT( slotEntries( TDEIO::Job*, + const TDEIO::UDSEntryList& ))); addSubjob( newjob ); } @@ -2888,9 +2888,9 @@ void CopyJob::slotResultCreatingDirs( Job * job ) // We need to stat the existing dir, to get its last-modification time KURL existingDest( (*it).uDest ); - SimpleJob * newJob = KIO::stat( existingDest, false, 2, false ); + SimpleJob * newJob = TDEIO::stat( existingDest, false, 2, false ); Scheduler::scheduleJob(newJob); - kdDebug(7007) << "KIO::stat for resolving conflict on " << existingDest << endl; + kdDebug(7007) << "TDEIO::stat for resolving conflict on " << existingDest << endl; state = STATE_CONFLICT_CREATING_DIRS; addSubjob(newJob); return; // Don't move to next dir yet ! @@ -2919,7 +2919,7 @@ void CopyJob::slotResultCreatingDirs( Job * job ) createNextDir(); } -void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job ) +void CopyJob::slotResultConflictCreatingDirs( TDEIO::Job * job ) { // We come here after a conflict has been detected and we've stated the existing dir @@ -2928,11 +2928,11 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job ) // Its modification time: time_t destmtime = (time_t)-1; time_t destctime = (time_t)-1; - KIO::filesize_t destsize = 0; + TDEIO::filesize_t destsize = 0; TQString linkDest; - UDSEntry entry = ((KIO::StatJob*)job)->statResult(); - KIO::UDSEntry::ConstIterator it2 = entry.begin(); + UDSEntry entry = ((TDEIO::StatJob*)job)->statResult(); + TDEIO::UDSEntry::ConstIterator it2 = entry.begin(); for( ; it2 != entry.end(); it2++ ) { switch ((*it2).m_uds) { case UDS_MODIFICATION_TIME: @@ -3082,7 +3082,7 @@ void CopyJob::createNextDir() { // Create the directory - with default permissions so that we can put files into it // TODO : change permissions once all is finished; but for stuff coming from CDROM it sucks... - KIO::SimpleJob *newjob = KIO::mkdir( udir, -1 ); + TDEIO::SimpleJob *newjob = TDEIO::mkdir( udir, -1 ); Scheduler::scheduleJob(newjob); m_currentDestURL = udir; @@ -3132,16 +3132,16 @@ void CopyJob::slotResultCopyingFiles( Job * job ) assert ( subjobs.isEmpty() ); // We need to stat the existing file, to get its last-modification time KURL existingFile( (*it).uDest ); - SimpleJob * newJob = KIO::stat( existingFile, false, 2, false ); + SimpleJob * newJob = TDEIO::stat( existingFile, false, 2, false ); Scheduler::scheduleJob(newJob); - kdDebug(7007) << "KIO::stat for resolving conflict on " << existingFile << endl; + kdDebug(7007) << "TDEIO::stat for resolving conflict on " << existingFile << endl; state = STATE_CONFLICT_COPYING_FILES; addSubjob(newJob); return; // Don't move to next file yet ! } else { - if ( m_bCurrentOperationIsLink && ::tqqt_cast<KIO::DeleteJob*>( job ) ) + if ( m_bCurrentOperationIsLink && ::tqqt_cast<TDEIO::DeleteJob*>( job ) ) { // Very special case, see a few lines below // We are deleting the source of a symlink we successfully moved... ignore error @@ -3158,14 +3158,14 @@ void CopyJob::slotResultCopyingFiles( Job * job ) { // Special case for moving links. That operation needs two jobs, unlike others. if ( m_bCurrentOperationIsLink && m_mode == Move - && !::tqqt_cast<KIO::DeleteJob *>( job ) // Deleting source not already done + && !::tqqt_cast<TDEIO::DeleteJob *>( job ) // Deleting source not already done ) { subjobs.remove( job ); assert ( subjobs.isEmpty() ); // The only problem with this trick is that the error handling for this del operation // is not going to be right... see 'Very special case' above. - KIO::Job * newjob = KIO::del( (*it).uSource, false /*don't shred*/, false /*no GUI*/ ); + TDEIO::Job * newjob = TDEIO::del( (*it).uSource, false /*don't shred*/, false /*no GUI*/ ); addSubjob( newjob ); return; // Don't move to next file yet ! } @@ -3195,7 +3195,7 @@ void CopyJob::slotResultCopyingFiles( Job * job ) copyNextFile(); } -void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job ) +void CopyJob::slotResultConflictCopyingFiles( TDEIO::Job * job ) { // We come here after a conflict has been detected and we've stated the existing file // The file we were trying to create: @@ -3214,10 +3214,10 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job ) // Its modification time: time_t destmtime = (time_t)-1; time_t destctime = (time_t)-1; - KIO::filesize_t destsize = 0; + TDEIO::filesize_t destsize = 0; TQString linkDest; - UDSEntry entry = ((KIO::StatJob*)job)->statResult(); - KIO::UDSEntry::ConstIterator it2 = entry.begin(); + UDSEntry entry = ((TDEIO::StatJob*)job)->statResult(); + TDEIO::UDSEntry::ConstIterator it2 = entry.begin(); for( ; it2 != entry.end(); it2++ ) { switch ((*it2).m_uds) { case UDS_MODIFICATION_TIME: @@ -3364,7 +3364,7 @@ void CopyJob::copyNextFile() bOverwrite = shouldOverwrite( destFile ); m_bCurrentOperationIsLink = false; - KIO::Job * newjob = 0L; + TDEIO::Job * newjob = 0L; if ( m_mode == Link ) { //kdDebug(7007) << "Linking" << endl; @@ -3376,7 +3376,7 @@ void CopyJob::copyNextFile() ((*it).uSource.pass() == (*it).uDest.pass()) ) { // This is the case of creating a real symlink - KIO::SimpleJob *newJob = KIO::symlink( (*it).uSource.path(), (*it).uDest, bOverwrite, false /*no GUI*/ ); + TDEIO::SimpleJob *newJob = TDEIO::symlink( (*it).uSource.path(), (*it).uDest, bOverwrite, false /*no GUI*/ ); newjob = newJob; Scheduler::scheduleJob(newJob); //kdDebug(7007) << "CopyJob::copyNextFile : Linking target=" << (*it).uSource.path() << " link=" << (*it).uDest << endl; @@ -3476,7 +3476,7 @@ void CopyJob::copyNextFile() ((*it).uSource.pass() == (*it).uDest.pass())) // Copying a symlink - only on the same protocol/host/etc. (#5601, downloading an FTP file through its link), { - KIO::SimpleJob *newJob = KIO::symlink( (*it).linkDest, (*it).uDest, bOverwrite, false /*no GUI*/ ); + TDEIO::SimpleJob *newJob = TDEIO::symlink( (*it).linkDest, (*it).uDest, bOverwrite, false /*no GUI*/ ); Scheduler::scheduleJob(newJob); newjob = newJob; //kdDebug(7007) << "CopyJob::copyNextFile : Linking target=" << (*it).linkDest << " link=" << (*it).uDest << endl; @@ -3489,7 +3489,7 @@ void CopyJob::copyNextFile() // NOTE: if we are moving stuff, the deletion of the source will be done in slotResultCopyingFiles } else if (m_mode == Move) // Moving a file { - KIO::FileCopyJob * moveJob = KIO::file_move( (*it).uSource, (*it).uDest, (*it).permissions, bOverwrite, false, false/*no GUI*/ ); + TDEIO::FileCopyJob * moveJob = TDEIO::file_move( (*it).uSource, (*it).uDest, (*it).permissions, bOverwrite, false, false/*no GUI*/ ); moveJob->setSourceSize64( (*it).size ); newjob = moveJob; //kdDebug(7007) << "CopyJob::copyNextFile : Moving " << (*it).uSource << " to " << (*it).uDest << endl; @@ -3507,7 +3507,7 @@ void CopyJob::copyNextFile() int permissions = (*it).permissions; if ( d->m_defaultPermissions || ( remoteSource && (*it).uDest.isLocalFile() ) ) permissions = -1; - KIO::FileCopyJob * copyJob = KIO::file_copy( (*it).uSource, (*it).uDest, permissions, bOverwrite, false, false/*no GUI*/ ); + TDEIO::FileCopyJob * copyJob = TDEIO::file_copy( (*it).uSource, (*it).uDest, permissions, bOverwrite, false, false/*no GUI*/ ); copyJob->setParentJob( this ); // in case of rename dialog copyJob->setSourceSize64( (*it).size ); copyJob->setModificationTime( (*it).mtime ); @@ -3518,10 +3518,10 @@ void CopyJob::copyNextFile() d->m_bURLDirty = true; } addSubjob(newjob); - connect( newjob, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), - this, TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( newjob, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), - this, TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); + connect( newjob, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), + this, TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( newjob, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), + this, TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); } else { @@ -3539,7 +3539,7 @@ void CopyJob::deleteNextDir() d->m_bURLDirty = true; // Take first dir to delete out of list - last ones first ! KURL::List::Iterator it = dirsToRemove.fromLast(); - SimpleJob *job = KIO::rmdir( *it ); + SimpleJob *job = TDEIO::rmdir( *it ); Scheduler::scheduleJob(job); dirsToRemove.remove(it); addSubjob( job ); @@ -3604,7 +3604,7 @@ void CopyJob::setNextDirAttribute() } } -void CopyJob::slotProcessedSize( KIO::Job*, KIO::filesize_t data_size ) +void CopyJob::slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t data_size ) { //kdDebug(7007) << "CopyJob::slotProcessedSize " << data_size << endl; m_fileProcessedSize = data_size; @@ -3621,7 +3621,7 @@ void CopyJob::slotProcessedSize( KIO::Job*, KIO::filesize_t data_size ) emitPercent( m_processedSize + m_fileProcessedSize, m_totalSize ); } -void CopyJob::slotTotalSize( KIO::Job*, KIO::filesize_t size ) +void CopyJob::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) { //kdDebug(7007) << "slotTotalSize: " << size << endl; // Special case for copying a single file @@ -3753,8 +3753,8 @@ void CopyJob::slotResultRenaming( Job* job ) // we lack mtime info for both the src (not stated) // and the dest (stated but this info wasn't stored) // Let's do it for local files, at least - KIO::filesize_t sizeSrc = (KIO::filesize_t) -1; - KIO::filesize_t sizeDest = (KIO::filesize_t) -1; + TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1; + TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1; time_t ctimeSrc = (time_t) -1; time_t ctimeDest = (time_t) -1; time_t mtimeSrc = (time_t) -1; @@ -3799,7 +3799,7 @@ void CopyJob::slotResultRenaming( Job* job ) // Set m_dest to the chosen destination // This is only for this src url; the next one will revert to d->m_globalDest m_dest.setPath( newPath ); - KIO::Job* job = KIO::stat( m_dest, false, 2, false ); + TDEIO::Job* job = TDEIO::stat( m_dest, false, 2, false ); state = STATE_STATING; destinationState = DEST_NOT_STATED; addSubjob(job); @@ -3829,7 +3829,7 @@ void CopyJob::slotResultRenaming( Job* job ) break; } } - } else if ( err != KIO::ERR_UNSUPPORTED_ACTION ) { + } else if ( err != TDEIO::ERR_UNSUPPORTED_ACTION ) { kdDebug(7007) << "Couldn't rename " << m_currentSrcURL << " to " << dest << ", aborting" << endl; m_error = err; m_errorText = errText; @@ -3837,8 +3837,8 @@ void CopyJob::slotResultRenaming( Job* job ) return; } kdDebug(7007) << "Couldn't rename " << m_currentSrcURL << " to " << dest << ", reverting to normal way, starting with stat" << endl; - //kdDebug(7007) << "KIO::stat on " << m_currentSrcURL << endl; - KIO::Job* job = KIO::stat( m_currentSrcURL, true, 2, false ); + //kdDebug(7007) << "TDEIO::stat on " << m_currentSrcURL << endl; + TDEIO::Job* job = TDEIO::stat( m_currentSrcURL, true, 2, false ); state = STATE_STATING; addSubjob(job); m_bOnlyRenames = false; @@ -3906,40 +3906,40 @@ void CopyJob::slotResult( Job *job ) } } -void KIO::CopyJob::setDefaultPermissions( bool b ) +void TDEIO::CopyJob::setDefaultPermissions( bool b ) { d->m_defaultPermissions = b; } // KDE4: remove -void KIO::CopyJob::setInteractive( bool b ) +void TDEIO::CopyJob::setInteractive( bool b ) { Job::setInteractive( b ); } -CopyJob *KIO::copy(const KURL& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::copy(const KURL& src, const KURL& dest, bool showProgressInfo ) { - //kdDebug(7007) << "KIO::copy src=" << src << " dest=" << dest << endl; + //kdDebug(7007) << "TDEIO::copy src=" << src << " dest=" << dest << endl; KURL::List srcList; srcList.append( src ); return new CopyJob( srcList, dest, CopyJob::Copy, false, showProgressInfo ); } -CopyJob *KIO::copyAs(const KURL& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::copyAs(const KURL& src, const KURL& dest, bool showProgressInfo ) { - //kdDebug(7007) << "KIO::copyAs src=" << src << " dest=" << dest << endl; + //kdDebug(7007) << "TDEIO::copyAs src=" << src << " dest=" << dest << endl; KURL::List srcList; srcList.append( src ); return new CopyJob( srcList, dest, CopyJob::Copy, true, showProgressInfo ); } -CopyJob *KIO::copy( const KURL::List& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::copy( const KURL::List& src, const KURL& dest, bool showProgressInfo ) { //kdDebug(7007) << src << " " << dest << endl; return new CopyJob( src, dest, CopyJob::Copy, false, showProgressInfo ); } -CopyJob *KIO::move(const KURL& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::move(const KURL& src, const KURL& dest, bool showProgressInfo ) { //kdDebug(7007) << src << " " << dest << endl; KURL::List srcList; @@ -3947,7 +3947,7 @@ CopyJob *KIO::move(const KURL& src, const KURL& dest, bool showProgressInfo ) return new CopyJob( srcList, dest, CopyJob::Move, false, showProgressInfo ); } -CopyJob *KIO::moveAs(const KURL& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::moveAs(const KURL& src, const KURL& dest, bool showProgressInfo ) { //kdDebug(7007) << src << " " << dest << endl; KURL::List srcList; @@ -3955,39 +3955,39 @@ CopyJob *KIO::moveAs(const KURL& src, const KURL& dest, bool showProgressInfo ) return new CopyJob( srcList, dest, CopyJob::Move, true, showProgressInfo ); } -CopyJob *KIO::move( const KURL::List& src, const KURL& dest, bool showProgressInfo ) +CopyJob *TDEIO::move( const KURL::List& src, const KURL& dest, bool showProgressInfo ) { //kdDebug(7007) << src << " " << dest << endl; return new CopyJob( src, dest, CopyJob::Move, false, showProgressInfo ); } -CopyJob *KIO::link(const KURL& src, const KURL& destDir, bool showProgressInfo ) +CopyJob *TDEIO::link(const KURL& src, const KURL& destDir, bool showProgressInfo ) { KURL::List srcList; srcList.append( src ); return new CopyJob( srcList, destDir, CopyJob::Link, false, showProgressInfo ); } -CopyJob *KIO::link(const KURL::List& srcList, const KURL& destDir, bool showProgressInfo ) +CopyJob *TDEIO::link(const KURL::List& srcList, const KURL& destDir, bool showProgressInfo ) { return new CopyJob( srcList, destDir, CopyJob::Link, false, showProgressInfo ); } -CopyJob *KIO::linkAs(const KURL& src, const KURL& destDir, bool showProgressInfo ) +CopyJob *TDEIO::linkAs(const KURL& src, const KURL& destDir, bool showProgressInfo ) { KURL::List srcList; srcList.append( src ); return new CopyJob( srcList, destDir, CopyJob::Link, false, showProgressInfo ); } -CopyJob *KIO::trash(const KURL& src, bool showProgressInfo ) +CopyJob *TDEIO::trash(const KURL& src, bool showProgressInfo ) { KURL::List srcList; srcList.append( src ); return new CopyJob( srcList, KURL( "trash:/" ), CopyJob::Move, false, showProgressInfo ); } -CopyJob *KIO::trash(const KURL::List& srcList, bool showProgressInfo ) +CopyJob *TDEIO::trash(const KURL::List& srcList, bool showProgressInfo ) { return new CopyJob( srcList, KURL( "trash:/" ), CopyJob::Move, false, showProgressInfo ); } @@ -4001,21 +4001,21 @@ DeleteJob::DeleteJob( const KURL::List& src, bool /*shred*/, bool showProgressIn { if ( showProgressInfo ) { - connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); - connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ), - Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), + Observer::self(), TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); // See slotReport - /*connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ), - m_observer, TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) ); + /*connect( this, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ), + m_observer, TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) ); - connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ), - m_observer, TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) ); + connect( this, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ), + m_observer, TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) ); - connect( this, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ), - m_observer, TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );*/ + connect( this, TQT_SIGNAL( deleting( TDEIO::Job*, const KURL& ) ), + m_observer, TQT_SLOT( slotDeleting( TDEIO::Job*, const KURL& ) ) );*/ m_reportTimer=new TQTimer(this); connect(m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport())); @@ -4065,7 +4065,7 @@ void DeleteJob::slotReport() } -void DeleteJob::slotEntries(KIO::Job* job, const UDSEntryList& list) +void DeleteJob::slotEntries(TDEIO::Job* job, const UDSEntryList& list) { UDSEntryListConstIterator it = list.begin(); UDSEntryListConstIterator end = list.end(); @@ -4098,7 +4098,7 @@ void DeleteJob::slotEntries(KIO::Job* job, const UDSEntryList& list) atomsFound++; break; case UDS_SIZE: - m_totalSize += (KIO::filesize_t)((*it2).m_long); + m_totalSize += (TDEIO::filesize_t)((*it2).m_long); atomsFound++; break; default: @@ -4144,9 +4144,9 @@ void DeleteJob::statNextSrc() } // Stat it state = STATE_STATING; - KIO::SimpleJob * job = KIO::stat( m_currentURL, true, 1, false ); + TDEIO::SimpleJob * job = TDEIO::stat( m_currentURL, true, 1, false ); Scheduler::scheduleJob(job); - //kdDebug(7007) << "KIO::stat (DeleteJob) " << m_currentURL << endl; + //kdDebug(7007) << "TDEIO::stat (DeleteJob) " << m_currentURL << endl; addSubjob(job); //if ( m_progressId ) // Did we get an ID from the observer ? // Observer::self()->slotDeleting( this, *it ); // show asap @@ -4192,7 +4192,7 @@ void DeleteJob::deleteNextFile() } } else { // if remote - or if unlink() failed (we'll use the job's error handling in that case) - job = KIO::file_delete( *it, false /*no GUI*/); + job = TDEIO::file_delete( *it, false /*no GUI*/); Scheduler::scheduleJob(job); m_currentURL=(*it); } @@ -4231,9 +4231,9 @@ void DeleteJob::deleteNextDir() if ( KProtocolInfo::canDeleteRecursive( *it ) ) { // If the ioslave supports recursive deletion of a directory, then // we only need to send a single CMD_DEL command, so we use file_delete :) - job = KIO::file_delete( *it, false /*no gui*/ ); + job = TDEIO::file_delete( *it, false /*no gui*/ ); } else { - job = KIO::rmdir( *it ); + job = TDEIO::rmdir( *it ); } Scheduler::scheduleJob(job); dirs.remove(it); @@ -4260,7 +4260,7 @@ void DeleteJob::deleteNextDir() emitResult(); } -void DeleteJob::slotProcessedSize( KIO::Job*, KIO::filesize_t data_size ) +void DeleteJob::slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t data_size ) { // Note: this is the same implementation as CopyJob::slotProcessedSize but // it's different from FileCopyJob::slotProcessedSize - which is why this @@ -4307,7 +4307,7 @@ void DeleteJob::slotResult( Job *job ) UDSEntry entry = ((StatJob*)job)->statResult(); bool bDir = false; bool bLink = false; - KIO::filesize_t size = (KIO::filesize_t)-1; + TDEIO::filesize_t size = (TDEIO::filesize_t)-1; UDSEntry::ConstIterator it2 = entry.begin(); int atomsFound(0); for( ; it2 != entry.end(); it2++ ) @@ -4349,10 +4349,10 @@ void DeleteJob::slotResult( Job *job ) ListJob *newjob = listRecursive( url, false ); newjob->setUnrestricted(true); // No KIOSK restrictions Scheduler::scheduleJob(newjob); - connect(newjob, TQT_SIGNAL(entries( KIO::Job *, - const KIO::UDSEntryList& )), - TQT_SLOT( slotEntries( KIO::Job*, - const KIO::UDSEntryList& ))); + connect(newjob, TQT_SIGNAL(entries( TDEIO::Job *, + const TDEIO::UDSEntryList& )), + TQT_SLOT( slotEntries( TDEIO::Job*, + const TDEIO::UDSEntryList& ))); addSubjob(newjob); } else { ++m_currentStat; @@ -4417,7 +4417,7 @@ void DeleteJob::slotResult( Job *job ) } } -DeleteJob *KIO::del( const KURL& src, bool shred, bool showProgressInfo ) +DeleteJob *TDEIO::del( const KURL& src, bool shred, bool showProgressInfo ) { KURL::List srcList; srcList.append( src ); @@ -4425,7 +4425,7 @@ DeleteJob *KIO::del( const KURL& src, bool shred, bool showProgressInfo ) return job; } -DeleteJob *KIO::del( const KURL::List& src, bool shred, bool showProgressInfo ) +DeleteJob *TDEIO::del( const KURL::List& src, bool shred, bool showProgressInfo ) { DeleteJob *job = new DeleteJob( src, shred, showProgressInfo ); return job; @@ -4599,7 +4599,7 @@ void MultiGetJob::slotMimetype( const TQString &_mimetype ) emit mimetype(m_currentEntry->id, _mimetype); } -MultiGetJob *KIO::multi_get(long id, const KURL &url, const MetaData &metaData) +MultiGetJob *TDEIO::multi_get(long id, const KURL &url, const MetaData &metaData) { MultiGetJob * job = new MultiGetJob( url, false ); job->get(id, url, metaData); @@ -4778,7 +4778,7 @@ void Job::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void SimpleJob::virtual_hook( int id, void* data ) -{ KIO::Job::virtual_hook( id, data ); } +{ TDEIO::Job::virtual_hook( id, data ); } void MkdirJob::virtual_hook( int id, void* data ) { SimpleJob::virtual_hook( id, data ); } diff --git a/kio/kio/job.h b/kio/kio/job.h index fed6f82ab..03985b637 100644 --- a/kio/kio/job.h +++ b/kio/kio/job.h @@ -24,7 +24,7 @@ #include <kio/jobclasses.h> -namespace KIO { +namespace TDEIO { /** @@ -80,7 +80,7 @@ namespace KIO { * Create or move a symlink. * This is the lowlevel operation, similar to file_copy and file_move. * It doesn't do any check (other than those the slave does) - * and it doesn't show rename and skip dialogs - use KIO::link for that. + * and it doesn't show rename and skip dialogs - use TDEIO::link for that. * @param target The string that will become the "target" of the link (can be relative) * @param dest The symlink to create. * @param overwrite whether to automatically overwrite if the dest exists @@ -215,7 +215,7 @@ namespace KIO { * * Example: * \code - * job = KIO::http_post( url, postData, false ); + * job = TDEIO::http_post( url, postData, false ); * job->addMetaData("content-type", contentType ); * job->addMetaData("referrer", referrerURL); * \endcode diff --git a/kio/kio/jobclasses.h b/kio/kio/jobclasses.h index 9d6624dc0..9858b1ce1 100644 --- a/kio/kio/jobclasses.h +++ b/kio/kio/jobclasses.h @@ -39,7 +39,7 @@ class TQTimer; #define KIO_COPYJOB_HAS_SETINTERACTIVE // new in 3.4. Used by kio_trash. -namespace KIO { +namespace TDEIO { class Slave; class SlaveInterface; @@ -50,9 +50,9 @@ namespace KIO { * For all jobs created in an application, the code looks like * * \code - * KIO::Job * job = KIO::someoperation( some parameters ); - * connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - * this, TQT_SLOT( slotResult( KIO::Job * ) ) ); + * TDEIO::Job * job = TDEIO::someoperation( some parameters ); + * connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + * this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); * \endcode * (other connects, specific to the job) * @@ -62,8 +62,8 @@ namespace KIO { * if ( job->error() ) * job->showErrorDialog( this or 0L ); * \endcode - * @see KIO::Scheduler - * @see KIO::Slave + * @see TDEIO::Scheduler + * @see TDEIO::Slave */ class KIO_EXPORT Job : public TQObject { Q_OBJECT @@ -90,7 +90,7 @@ namespace KIO { * Returns the error code, if there has been an error. * Only call this method from the slot connected to result(). * @return the error code for this job, 0 if no error. - * Error codes are defined in KIO::Error. + * Error codes are defined in TDEIO::Error. */ int error() const { return m_error; } @@ -262,7 +262,7 @@ namespace KIO { * @see addMetaData() * @see mergeMetaData() */ - void setMetaData( const KIO::MetaData &metaData); + void setMetaData( const TDEIO::MetaData &metaData); /** * Add key/value pair to the meta data that is sent to the slave. @@ -317,7 +317,7 @@ namespace KIO { * @see processedSize * @since 3.2 */ - KIO::filesize_t getProcessedSize(); + TDEIO::filesize_t getProcessedSize(); signals: /** @@ -325,7 +325,7 @@ namespace KIO { * failed...). Use error to know the result. * @param job the job that emitted this signal */ - void result( KIO::Job *job ); + void result( TDEIO::Job *job ); /** * @deprecated. Don't use ! @@ -334,7 +334,7 @@ namespace KIO { * in this case, ERR_USER_CANCELED. * @param job the job that emitted this signal */ - void canceled( KIO::Job *job ); + void canceled( TDEIO::Job *job ); /** * Emitted to display information about this job, as sent by the slave. @@ -342,7 +342,7 @@ namespace KIO { * @param job the job that emitted this signal * @param msg the info message */ - void infoMessage( KIO::Job *job, const TQString & msg ); + void infoMessage( TDEIO::Job *job, const TQString & msg ); // KDE4: Separate rich-text string from plain-text string, for different widgets. /** @@ -351,7 +351,7 @@ namespace KIO { * @param msg the info message * @since 3.5 */ - void warning( KIO::Job *job, const TQString & msg ); + void warning( TDEIO::Job *job, const TQString & msg ); // KDE4: Separate rich-text string from plain-text string, for different widgets. /** @@ -360,7 +360,7 @@ namespace KIO { * currently unused (in the applications). * @param job the job that emitted this signal */ - void connected( KIO::Job *job ); + void connected( TDEIO::Job *job ); /** * Progress signal showing the overall progress of the job @@ -370,7 +370,7 @@ namespace KIO { * @param job the job that emitted this signal * @param percent the percentage */ - void percent( KIO::Job *job, unsigned long percent ); + void percent( TDEIO::Job *job, unsigned long percent ); /** * Emitted when we know the size of this job (data size for transfers, @@ -378,7 +378,7 @@ namespace KIO { * @param job the job that emitted this signal * @param size the total size in bytes */ - void totalSize( KIO::Job *job, KIO::filesize_t size ); + void totalSize( TDEIO::Job *job, TDEIO::filesize_t size ); /** * Regularly emitted to show the progress of this job @@ -386,14 +386,14 @@ namespace KIO { * @param job the job that emitted this signal * @param size the processed size in bytes */ - void processedSize( KIO::Job *job, KIO::filesize_t size ); + void processedSize( TDEIO::Job *job, TDEIO::filesize_t size ); /** * Emitted to display information about the speed of this job. * @param job the job that emitted this signal * @param speed the speed in bytes/s */ - void speed( KIO::Job *job, unsigned long speed ); + void speed( TDEIO::Job *job, unsigned long speed ); protected slots: /** @@ -404,7 +404,7 @@ namespace KIO { * @param job the subjob * @see result() */ - virtual void slotResult( KIO::Job *job ); + virtual void slotResult( TDEIO::Job *job ); /** * Forward signal from subjob. @@ -412,14 +412,14 @@ namespace KIO { * @param speed the speed in bytes/s * @see speed() */ - void slotSpeed( KIO::Job *job, unsigned long speed ); + void slotSpeed( TDEIO::Job *job, unsigned long speed ); /** * Forward signal from subjob. * @param job the subjob * @param msg the info message * @see infoMessage() */ - void slotInfoMessage( KIO::Job *job, const TQString &msg ); + void slotInfoMessage( TDEIO::Job *job, const TQString &msg ); /** * Remove speed information. @@ -465,7 +465,7 @@ namespace KIO { * @param processedSize the processed size in bytes * @param totalSize the total size in bytes */ - void emitPercent( KIO::filesize_t processedSize, KIO::filesize_t totalSize ); + void emitPercent( TDEIO::filesize_t processedSize, TDEIO::filesize_t totalSize ); /** * Utility function for inherited jobs. @@ -485,7 +485,7 @@ namespace KIO { * Set the processed size, does not emit processedSize * @since 3.2 */ - void setProcessedSize(KIO::filesize_t size); + void setProcessedSize(TDEIO::filesize_t size); /** * @internal @@ -525,7 +525,7 @@ namespace KIO { * Other jobs are high-level jobs (CopyJob, DeleteJob, FileCopyJob...) * that manage subjobs but aren't scheduled directly. */ - class KIO_EXPORT SimpleJob : public KIO::Job { + class KIO_EXPORT SimpleJob : public TDEIO::Job { Q_OBJECT public: @@ -598,7 +598,7 @@ namespace KIO { * Can also be called by the parent job, when it knows the size. * @param data_size the total size */ - void slotTotalSize( KIO::filesize_t data_size ); + void slotTotalSize( TDEIO::filesize_t data_size ); protected slots: /** @@ -631,7 +631,7 @@ namespace KIO { * @param data_size the processed size in bytes * @see processedSize() */ - void slotProcessedSize( KIO::filesize_t data_size ); + void slotProcessedSize( TDEIO::filesize_t data_size ); /** * Forward signal from the slave. * @param speed the speed in bytes/s @@ -644,7 +644,7 @@ namespace KIO { * @param _metaData the meta data * @see metaData() */ - virtual void slotMetaData( const KIO::MetaData &_metaData); + virtual void slotMetaData( const TDEIO::MetaData &_metaData); public slots: /** @@ -666,7 +666,7 @@ namespace KIO { KURL m_url; KURL m_subUrl; int m_command; - KIO::filesize_t m_totalSize; + TDEIO::filesize_t m_totalSize; protected: virtual void virtual_hook( int id, void* data ); /* @@ -683,7 +683,7 @@ namespace KIO { /** * A KIO job that retrieves information about a file or directory. - * @see KIO::stat() + * @see TDEIO::stat() */ class KIO_EXPORT StatJob : public SimpleJob { @@ -691,7 +691,7 @@ namespace KIO { public: /** - * Do not use this constructor to create a StatJob, use KIO::stat() instead. + * Do not use this constructor to create a StatJob, use TDEIO::stat() instead. * @param url the url of the file or directory to check * @param command the command to issue * @param packedArgs the arguments @@ -742,7 +742,7 @@ namespace KIO { * @param job the job that is redirected * @param url the new url */ - void redirection( KIO::Job *job, const KURL &url ); + void redirection( TDEIO::Job *job, const KURL &url ); /** * Signals a permanent redirection. @@ -752,13 +752,13 @@ namespace KIO { * @param toUrl the new URL * @since 3.1 */ - void permanentRedirection( KIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); + void permanentRedirection( TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); protected slots: - void slotStatEntry( const KIO::UDSEntry & entry ); + void slotStatEntry( const TDEIO::UDSEntry & entry ); void slotRedirection( const KURL &url); virtual void slotFinished(); - virtual void slotMetaData( const KIO::MetaData &_metaData); + virtual void slotMetaData( const TDEIO::MetaData &_metaData); protected: UDSEntry m_statResult; @@ -774,7 +774,7 @@ namespace KIO { /** * A KIO job that creates a directory - * @see KIO::mkdir() + * @see TDEIO::mkdir() * @since 3.3 */ class KIO_EXPORT MkdirJob : public SimpleJob { @@ -783,7 +783,7 @@ namespace KIO { public: /** - * Do not use this constructor to create a MkdirJob, use KIO::mkdir() instead. + * Do not use this constructor to create a MkdirJob, use TDEIO::mkdir() instead. * @param url the url of the file or directory to check * @param command the command to issue * @param packedArgs the arguments @@ -807,7 +807,7 @@ namespace KIO { * @param job the job that is redirected * @param url the new url */ - void redirection( KIO::Job *job, const KURL &url ); + void redirection( TDEIO::Job *job, const KURL &url ); /** * Signals a permanent redirection. @@ -816,7 +816,7 @@ namespace KIO { * @param fromUrl the original URL * @param toUrl the new URL */ - void permanentRedirection( KIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); + void permanentRedirection( TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); protected slots: void slotRedirection( const KURL &url); @@ -841,7 +841,7 @@ namespace KIO { public: /** - * Do not create a DirectCopyJob. Use KIO::copy() or KIO::file_copy() instead. + * Do not create a DirectCopyJob. Use TDEIO::copy() or TDEIO::file_copy() instead. */ DirectCopyJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo); @@ -859,10 +859,10 @@ namespace KIO { * Emitted if the job found an existing partial file * and supports resuming. Used by FileCopyJob. */ - void canResume( KIO::Job *job, KIO::filesize_t offset ); + void canResume( TDEIO::Job *job, TDEIO::filesize_t offset ); private slots: - void slotCanResume( KIO::filesize_t offset ); + void slotCanResume( TDEIO::filesize_t offset ); }; @@ -877,7 +877,7 @@ namespace KIO { public: /** - * Do not create a TransferJob. Use KIO::get() or KIO::put() + * Do not create a TransferJob. Use TDEIO::get() or TDEIO::put() * instead. * @param url the url to get or put * @param command the command to issue @@ -902,7 +902,7 @@ namespace KIO { * Called when m_subJob finishes. * @param job the job that finished */ - virtual void slotResult( KIO::Job *job ); + virtual void slotResult( TDEIO::Job *job ); /** * Flow control. Suspend data processing from the slave. @@ -974,7 +974,7 @@ namespace KIO { * should not be certain of data.size() == 0 ever happening (e.g. in case * of an error), so you should rely on result() instead. */ - void data( KIO::Job *job, const TQByteArray &data ); + void data( TDEIO::Job *job, const TQByteArray &data ); /** * Request for data. @@ -987,7 +987,7 @@ namespace KIO { * @param data buffer to fill with data to send to the * slave. An empty buffer indicates end of data. (EOD) */ - void dataReq( KIO::Job *job, TQByteArray &data ); + void dataReq( TDEIO::Job *job, TQByteArray &data ); /** * Signals a redirection. @@ -996,7 +996,7 @@ namespace KIO { * @param job the job that emitted this signal * @param url the new URL */ - void redirection( KIO::Job *job, const KURL &url ); + void redirection( TDEIO::Job *job, const KURL &url ); /** * Signals a permanent redirection. @@ -1006,14 +1006,14 @@ namespace KIO { * @param toUrl the new URL * @since 3.1 */ - void permanentRedirection( KIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); + void permanentRedirection( TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); /** * Mimetype determined. * @param job the job that emitted this signal * @param type the mime type */ - void mimetype( KIO::Job *job, const TQString &type ); + void mimetype( TDEIO::Job *job, const TQString &type ); /** * @internal @@ -1022,7 +1022,7 @@ namespace KIO { * and emitted by the "get" job if it supports resuming to * the given offset - in this case @p offset is unused) */ - void canResume( KIO::Job *job, KIO::filesize_t offset ); + void canResume( TDEIO::Job *job, TDEIO::filesize_t offset ); protected slots: @@ -1032,10 +1032,10 @@ namespace KIO { virtual void slotDataReq(); virtual void slotMimetype( const TQString &mimetype ); virtual void slotNeedSubURLData(); - virtual void slotSubURLData(KIO::Job*, const TQByteArray &); - virtual void slotMetaData( const KIO::MetaData &_metaData); + virtual void slotSubURLData(TDEIO::Job*, const TQByteArray &); + virtual void slotMetaData( const TDEIO::MetaData &_metaData); void slotErrorPage(); - void slotCanResume( KIO::filesize_t offset ); + void slotCanResume( TDEIO::filesize_t offset ); void slotPostRedirection(); protected: @@ -1057,14 +1057,14 @@ namespace KIO { * also stores a TQByteArray with the data, making it simpler to use than the * standard TransferJob. * - * For KIO::storedGet it puts the data into the member TQByteArray, so the user + * For TDEIO::storedGet it puts the data into the member TQByteArray, so the user * of this class can get hold of the whole data at once by calling data() * when the result signal is emitted. * You should only use StoredTransferJob to download data if you cannot * process the data by chunks while it's being downloaded, since storing * everything in a TQByteArray can potentially require a lot of memory. * - * For KIO::storedPut the user of this class simply provides the bytearray from + * For TDEIO::storedPut the user of this class simply provides the bytearray from * the start, and the job takes care of uploading it. * You should only use StoredTransferJob to upload data if you cannot * provide the in chunks while it's being uploaded, since storing @@ -1072,7 +1072,7 @@ namespace KIO { * * @since 3.3 */ - class KIO_EXPORT StoredTransferJob : public KIO::TransferJob { + class KIO_EXPORT StoredTransferJob : public TDEIO::TransferJob { Q_OBJECT public: @@ -1092,7 +1092,7 @@ namespace KIO { /** * Set data to be uploaded. This is for put jobs. - * Automatically called by KIO::storedPut(const TQByteArray &, ...), + * Automatically called by TDEIO::storedPut(const TQByteArray &, ...), * do not call this yourself. */ void setData( const TQByteArray& arr ); @@ -1104,8 +1104,8 @@ namespace KIO { TQByteArray data() const { return m_data; } private slots: - void slotStoredData( KIO::Job *job, const TQByteArray &data ); - void slotStoredDataReq( KIO::Job *job, TQByteArray &data ); + void slotStoredData( TDEIO::Job *job, const TQByteArray &data ); + void slotStoredDataReq( TDEIO::Job *job, TQByteArray &data ); private: TQByteArray m_data; int m_uploadOffset; @@ -1114,15 +1114,15 @@ namespace KIO { /** * The MultiGetJob is a TransferJob that allows you to get * several files from a single server. Don't create directly, - * but use KIO::multi_get() instead. - * @see KIO::multi_get() + * but use TDEIO::multi_get() instead. + * @see TDEIO::multi_get() */ class KIO_EXPORT MultiGetJob : public TransferJob { Q_OBJECT public: /** - * Do not create a MultiGetJob directly, use KIO::multi_get() + * Do not create a MultiGetJob directly, use TDEIO::multi_get() * instead. * * @param url the first url to get @@ -1166,7 +1166,7 @@ namespace KIO { /** * File transfer completed. * - * When all files have been processed, result(KIO::Job *) gets + * When all files have been processed, result(TDEIO::Job *) gets * emitted. * @param id the id of the request */ @@ -1202,15 +1202,15 @@ namespace KIO { /** * A MimetypeJob is a TransferJob that allows you to get * the mime type of an URL. Don't create directly, - * but use KIO::mimetype() instead. - * @see KIO::mimetype() + * but use TDEIO::mimetype() instead. + * @see TDEIO::mimetype() */ class KIO_EXPORT MimetypeJob : public TransferJob { Q_OBJECT public: /** - * Do not create a MimetypeJob directly. Use KIO::mimetype() + * Do not create a MimetypeJob directly. Use TDEIO::mimetype() * instead. * @param url the url to get * @param command the command to issue @@ -1244,16 +1244,16 @@ namespace KIO { /** * The FileCopyJob copies data from one place to another. - * @see KIO::file_copy() - * @see KIO::file_move() + * @see TDEIO::file_copy() + * @see TDEIO::file_move() */ class KIO_EXPORT FileCopyJob : public Job { Q_OBJECT public: /** - * Do not create a FileCopyJob directly. Use KIO::file_move() - * or KIO::file_copy() instead. + * Do not create a FileCopyJob directly. Use TDEIO::file_move() + * or TDEIO::file_copy() instead. * @param src the source URL * @param dest the destination URL * @param permissions the permissions of the resulting resource @@ -1272,7 +1272,7 @@ namespace KIO { * @param size the size of the source file * @since 3.2 */ - void setSourceSize64(KIO::filesize_t size); + void setSourceSize64(TDEIO::filesize_t size); /** * Sets the modification time of the file @@ -1310,45 +1310,45 @@ namespace KIO { * * @since 3.5.7 */ - void mimetype( KIO::Job *job, const TQString &type ); + void mimetype( TDEIO::Job *job, const TQString &type ); public slots: void slotStart(); - void slotData( KIO::Job *, const TQByteArray &data); - void slotDataReq( KIO::Job *, TQByteArray &data); - void slotMimetype( KIO::Job *, const TQString& type ); + void slotData( TDEIO::Job *, const TQByteArray &data); + void slotDataReq( TDEIO::Job *, TQByteArray &data); + void slotMimetype( TDEIO::Job *, const TQString& type ); protected slots: /** * Called whenever a subjob finishes. * @param job the job that emitted this signal */ - virtual void slotResult( KIO::Job *job ); + virtual void slotResult( TDEIO::Job *job ); /** * Forward signal from subjob * @param job the job that emitted this signal * @param size the processed size in bytes */ - void slotProcessedSize( KIO::Job *job, KIO::filesize_t size ); + void slotProcessedSize( TDEIO::Job *job, TDEIO::filesize_t size ); /** * Forward signal from subjob * @param job the job that emitted this signal * @param size the total size */ - void slotTotalSize( KIO::Job *job, KIO::filesize_t size ); + void slotTotalSize( TDEIO::Job *job, TDEIO::filesize_t size ); /** * Forward signal from subjob * @param job the job that emitted this signal * @param pct the percentage */ - void slotPercent( KIO::Job *job, unsigned long pct ); + void slotPercent( TDEIO::Job *job, unsigned long pct ); /** * Forward signal from subjob * @param job the job that emitted this signal * @param offset the offset to resume from */ - void slotCanResume( KIO::Job *job, KIO::filesize_t offset ); + void slotCanResume( TDEIO::Job *job, TDEIO::filesize_t offset ); protected: void startCopyJob(); @@ -1374,7 +1374,7 @@ namespace KIO { SimpleJob *m_copyJob; TransferJob *m_getJob; TransferJob *m_putJob; - KIO::filesize_t m_totalSize; + TDEIO::filesize_t m_totalSize; protected: virtual void virtual_hook( int id, void* data ); private: @@ -1384,18 +1384,18 @@ namespace KIO { /** * A ListJob is allows you to get the get the content of a directory. - * Don't create the job directly, but use KIO::listRecursive() or - * KIO::listDir() instead. - * @see KIO::listRecursive() - * @see KIO::listDir() + * Don't create the job directly, but use TDEIO::listRecursive() or + * TDEIO::listDir() instead. + * @see TDEIO::listRecursive() + * @see TDEIO::listDir() */ class KIO_EXPORT ListJob : public SimpleJob { Q_OBJECT public: /** - * Do not create a ListJob directly. Use KIO::listDir() or - * KIO::listRecursive() instead. + * Do not create a ListJob directly. Use TDEIO::listDir() or + * TDEIO::listRecursive() instead. * @param url the url of the directory * @param showProgressInfo true to show progress information to the user * @param recursive true to get the data recursively from child directories, @@ -1439,7 +1439,7 @@ namespace KIO { * @param job the job that emitted this signal * @param list the list of UDSEntries */ - void entries( KIO::Job *job, const KIO::UDSEntryList& list); + void entries( TDEIO::Job *job, const TDEIO::UDSEntryList& list); /** * Signals a redirection. @@ -1448,7 +1448,7 @@ namespace KIO { * @param job the job that is redirected * @param url the new url */ - void redirection( KIO::Job *job, const KURL &url ); + void redirection( TDEIO::Job *job, const KURL &url ); /** * Signals a permanent redirection. @@ -1458,15 +1458,15 @@ namespace KIO { * @param toUrl the new URL * @since 3.1 */ - void permanentRedirection( KIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); + void permanentRedirection( TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl ); protected slots: virtual void slotFinished( ); - virtual void slotMetaData( const KIO::MetaData &_metaData); - virtual void slotResult( KIO::Job *job ); - void slotListEntries( const KIO::UDSEntryList& list ); + virtual void slotMetaData( const TDEIO::MetaData &_metaData); + virtual void slotResult( TDEIO::Job *job ); + void slotListEntries( const TDEIO::UDSEntryList& list ); void slotRedirection( const KURL &url ); - void gotEntries( KIO::Job * subjob, const KIO::UDSEntryList& list ); + void gotEntries( TDEIO::Job * subjob, const TDEIO::UDSEntryList& list ); private: bool recursive; @@ -1490,20 +1490,20 @@ namespace KIO { //mode_t type; time_t ctime; time_t mtime; - KIO::filesize_t size; // 0 for dirs + TDEIO::filesize_t size; // 0 for dirs }; /** * CopyJob is used to move, copy or symlink files and directories. - * Don't create the job directly, but use KIO::copy(), - * KIO::move(), KIO::link() and friends. + * Don't create the job directly, but use TDEIO::copy(), + * TDEIO::move(), TDEIO::link() and friends. * - * @see KIO::copy() - * @see KIO::copyAs() - * @see KIO::move() - * @see KIO::moveAs() - * @see KIO::link() - * @see KIO::linkAs() + * @see TDEIO::copy() + * @see TDEIO::copyAs() + * @see TDEIO::move() + * @see TDEIO::moveAs() + * @see TDEIO::link() + * @see TDEIO::linkAs() */ class KIO_EXPORT CopyJob : public Job { Q_OBJECT @@ -1515,21 +1515,21 @@ namespace KIO { enum CopyMode{ Copy, Move, Link }; /** - * Do not create a CopyJob directly. Use KIO::copy(), - * KIO::move(), KIO::link() and friends instead. + * Do not create a CopyJob directly. Use TDEIO::copy(), + * TDEIO::move(), TDEIO::link() and friends instead. * * @param src the list of source URLs * @param dest the destination URL * @param mode specifies whether the job should copy, move or link - * @param asMethod if true, behaves like KIO::copyAs(), - * KIO::moveAs() or KIO::linkAs() + * @param asMethod if true, behaves like TDEIO::copyAs(), + * TDEIO::moveAs() or TDEIO::linkAs() * @param showProgressInfo true to show progress information to the user - * @see KIO::copy() - * @see KIO::copyAs() - * @see KIO::move() - * @see KIO::moveAs() - * @see KIO::link() - * @see KIO::linkAs() + * @see TDEIO::copy() + * @see TDEIO::copyAs() + * @see TDEIO::move() + * @see TDEIO::moveAs() + * @see TDEIO::link() + * @see TDEIO::linkAs() */ CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo ); @@ -1579,13 +1579,13 @@ namespace KIO { * @param job the job that emitted this signal * @param files the total number of files */ - void totalFiles( KIO::Job *job, unsigned long files ); + void totalFiles( TDEIO::Job *job, unsigned long files ); /** * Emitted when the toal number of direcotries is known. * @param job the job that emitted this signal * @param dirs the total number of directories */ - void totalDirs( KIO::Job *job, unsigned long dirs ); + void totalDirs( TDEIO::Job *job, unsigned long dirs ); /** * Emitted when it is known which files / directories are going @@ -1594,20 +1594,20 @@ namespace KIO { * @param job the job that emitted this signal * @param files a list of items that are about to be created. */ - void aboutToCreate( KIO::Job *job, const TQValueList<KIO::CopyInfo> &files); + void aboutToCreate( TDEIO::Job *job, const TQValueList<TDEIO::CopyInfo> &files); /** * Sends the number of processed files. * @param job the job that emitted this signal * @param files the number of processed files */ - void processedFiles( KIO::Job *job, unsigned long files ); + void processedFiles( TDEIO::Job *job, unsigned long files ); /** * Sends the number of processed directories. * @param job the job that emitted this signal * @param dirs the number of processed dirs */ - void processedDirs( KIO::Job *job, unsigned long dirs ); + void processedDirs( TDEIO::Job *job, unsigned long dirs ); /** * The job is copying a file or directory. @@ -1616,7 +1616,7 @@ namespace KIO { * being copied * @param to the destination of the current operation */ - void copying( KIO::Job *job, const KURL& from, const KURL& to ); + void copying( TDEIO::Job *job, const KURL& from, const KURL& to ); /** * The job is creating a symbolic link. * @param job the job that emitted this signal @@ -1624,7 +1624,7 @@ namespace KIO { * being linked * @param to the destination of the current operation */ - void linking( KIO::Job *job, const TQString& target, const KURL& to ); + void linking( TDEIO::Job *job, const TQString& target, const KURL& to ); /** * The job is moving a file or directory. * @param job the job that emitted this signal @@ -1632,20 +1632,20 @@ namespace KIO { * being moved * @param to the destination of the current operation */ - void moving( KIO::Job *job, const KURL& from, const KURL& to ); + void moving( TDEIO::Job *job, const KURL& from, const KURL& to ); /** * The job is creating the directory @p dir. * @param job the job that emitted this signal * @param dir the directory that is currently being created */ - void creatingDir( KIO::Job *job, const KURL& dir ); + void creatingDir( TDEIO::Job *job, const KURL& dir ); /** * The user chose to rename @p from to @p to. * @param job the job that emitted this signal * @param from the original name * @param to the new name */ - void renamed( KIO::Job *job, const KURL& from, const KURL& to ); + void renamed( TDEIO::Job *job, const KURL& from, const KURL& to ); /** * The job emits this signal when copying or moving a file or directory successfully finished. @@ -1659,7 +1659,7 @@ namespace KIO { * @param renamed indicates that the destination URL was created using a * rename operation (i.e. fast directory moving). true if is has been renamed */ - void copyingDone( KIO::Job *job, const KURL &from, const KURL &to, bool directory, bool renamed ); + void copyingDone( TDEIO::Job *job, const KURL &from, const KURL &to, bool directory, bool renamed ); /** * The job is copying or moving a symbolic link, that points to target. * The new link is created in @p to. The existing one is/was in @p from. @@ -1669,26 +1669,26 @@ namespace KIO { * @param target the target * @param to the destination URL */ - void copyingLinkDone( KIO::Job *job, const KURL &from, const TQString& target, const KURL& to ); + void copyingLinkDone( TDEIO::Job *job, const KURL &from, const TQString& target, const KURL& to ); protected: void statCurrentSrc(); void statNextSrc(); // Those aren't slots but submethods for slotResult. - void slotResultStating( KIO::Job * job ); + void slotResultStating( TDEIO::Job * job ); void startListing( const KURL & src ); - void slotResultCreatingDirs( KIO::Job * job ); - void slotResultConflictCreatingDirs( KIO::Job * job ); + void slotResultCreatingDirs( TDEIO::Job * job ); + void slotResultConflictCreatingDirs( TDEIO::Job * job ); void createNextDir(); - void slotResultCopyingFiles( KIO::Job * job ); - void slotResultConflictCopyingFiles( KIO::Job * job ); + void slotResultCopyingFiles( TDEIO::Job * job ); + void slotResultConflictCopyingFiles( TDEIO::Job * job ); void copyNextFile(); - void slotResultDeletingDirs( KIO::Job * job ); + void slotResultDeletingDirs( TDEIO::Job * job ); void deleteNextDir(); void skip( const KURL & sourceURL ); - void slotResultRenaming( KIO::Job * job ); - //void slotResultSettingDirAttributes( KIO::Job * job ); + void slotResultRenaming( TDEIO::Job * job ); + //void slotResultSettingDirAttributes( TDEIO::Job * job ); void setNextDirAttribute(); private: void startRenameJob(const KURL &slave_url); @@ -1698,17 +1698,17 @@ namespace KIO { protected slots: void slotStart(); - void slotEntries( KIO::Job*, const KIO::UDSEntryList& list ); - virtual void slotResult( KIO::Job *job ); + void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& list ); + virtual void slotResult( TDEIO::Job *job ); /** * Forward signal from subjob */ - void slotProcessedSize( KIO::Job*, KIO::filesize_t data_size ); + void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t data_size ); /** * Forward signal from subjob * @param size the total size */ - void slotTotalSize( KIO::Job*, KIO::filesize_t size ); + void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ); void slotReport(); private: @@ -1719,9 +1719,9 @@ namespace KIO { enum { STATE_STATING, STATE_RENAMING, STATE_LISTING, STATE_CREATING_DIRS, STATE_CONFLICT_CREATING_DIRS, STATE_COPYING_FILES, STATE_CONFLICT_COPYING_FILES, STATE_DELETING_DIRS, STATE_SETTING_DIR_ATTRIBUTES } state; - KIO::filesize_t m_totalSize; - KIO::filesize_t m_processedSize; - KIO::filesize_t m_fileProcessedSize; + TDEIO::filesize_t m_totalSize; + TDEIO::filesize_t m_processedSize; + TDEIO::filesize_t m_fileProcessedSize; int m_processedFiles; int m_processedDirs; TQValueList<CopyInfo> files; @@ -1756,22 +1756,22 @@ namespace KIO { /** * A more complex Job to delete files and directories. - * Don't create the job directly, but use KIO::del() instead. + * Don't create the job directly, but use TDEIO::del() instead. * - * @see KIO::del() + * @see TDEIO::del() */ class KIO_EXPORT DeleteJob : public Job { Q_OBJECT public: /** - * Do not create a DeleteJob directly. Use KIO::del() + * Do not create a DeleteJob directly. Use TDEIO::del() * instead. * * @param src the list of URLs to delete * @param shred true to shred (make sure that data is not recoverable)a * @param showProgressInfo true to show progress information to the user - * @see KIO::del() + * @see TDEIO::del() */ DeleteJob( const KURL::List& src, bool shred, bool showProgressInfo ); @@ -1788,26 +1788,26 @@ namespace KIO { * @param job the job that emitted this signal * @param files the total number of files */ - void totalFiles( KIO::Job *job, unsigned long files ); + void totalFiles( TDEIO::Job *job, unsigned long files ); /** * Emitted when the toal number of direcotries is known. * @param job the job that emitted this signal * @param dirs the total number of directories */ - void totalDirs( KIO::Job *job, unsigned long dirs ); + void totalDirs( TDEIO::Job *job, unsigned long dirs ); /** * Sends the number of processed files. * @param job the job that emitted this signal * @param files the number of processed files */ - void processedFiles( KIO::Job *job, unsigned long files ); + void processedFiles( TDEIO::Job *job, unsigned long files ); /** * Sends the number of processed directories. * @param job the job that emitted this signal * @param dirs the number of processed dirs */ - void processedDirs( KIO::Job *job, unsigned long dirs ); + void processedDirs( TDEIO::Job *job, unsigned long dirs ); /** * Sends the URL of the file that is currently being deleted. @@ -1815,17 +1815,17 @@ namespace KIO { * @param file the URL of the file or directory that is being * deleted */ - void deleting( KIO::Job *job, const KURL& file ); + void deleting( TDEIO::Job *job, const KURL& file ); protected slots: void slotStart(); - void slotEntries( KIO::Job*, const KIO::UDSEntryList& list ); - virtual void slotResult( KIO::Job *job ); + void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& list ); + virtual void slotResult( TDEIO::Job *job ); /** * Forward signal from subjob */ - void slotProcessedSize( KIO::Job*, KIO::filesize_t data_size ); + void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t data_size ); void slotReport(); private: @@ -1836,9 +1836,9 @@ namespace KIO { private: enum { STATE_STATING, STATE_LISTING, STATE_DELETING_FILES, STATE_DELETING_DIRS } state; - KIO::filesize_t m_totalSize; - KIO::filesize_t m_processedSize; - KIO::filesize_t m_fileProcessedSize; + TDEIO::filesize_t m_totalSize; + TDEIO::filesize_t m_processedSize; + TDEIO::filesize_t m_fileProcessedSize; int m_processedFiles; int m_processedDirs; int m_totalFilesDirs; @@ -1860,7 +1860,7 @@ namespace KIO { /** * A KIO job that finds a local URL - * @see KIO::localURL() + * @see TDEIO::localURL() * @since R14.0.0 */ class KIO_EXPORT LocalURLJob : public SimpleJob { @@ -1869,7 +1869,7 @@ namespace KIO { public: /** - * Do not use this constructor to create a LocalURLJob, use KIO::localURL() instead. + * Do not use this constructor to create a LocalURLJob, use TDEIO::localURL() instead. * @param url the url of the file or directory to check * @param command the command to issue * @param packedArgs the arguments @@ -1891,7 +1891,7 @@ namespace KIO { * @param url the local url * @param isLocal true if the returned URL is local, false if not */ - void localURL( KIO::Job *job, const KURL &url, bool isLocal ); + void localURL( TDEIO::Job *job, const KURL &url, bool isLocal ); protected slots: void slotLocalURL( const KURL &url, bool isLocal ); diff --git a/kio/kio/kautomount.cpp b/kio/kio/kautomount.cpp index a4782c313..e8b1d2af0 100644 --- a/kio/kio/kautomount.cpp +++ b/kio/kio/kautomount.cpp @@ -38,11 +38,11 @@ KAutoMount::KAutoMount( bool _readonly, const TQString& _format, const TQString& //kdDebug(7015) << "KAutoMount device=" << _device << " mountpoint=" << _mountpoint << endl; m_bShowFilemanagerWindow = _show_filemanager_window; - KIO::Job* job = KIO::mount( _readonly, _format.ascii(), _device, _mountpoint ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); + TDEIO::Job* job = TDEIO::mount( _readonly, _format.ascii(), _device, _mountpoint ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); } -void KAutoMount::slotResult( KIO::Job * job ) +void KAutoMount::slotResult( TDEIO::Job * job ) { if ( job->error() ) { emit error(); @@ -51,12 +51,12 @@ void KAutoMount::slotResult( KIO::Job * job ) else { KURL mountpoint; - mountpoint.setPath( KIO::findDeviceMountPoint( m_strDevice ) ); + mountpoint.setPath( TDEIO::findDeviceMountPoint( m_strDevice ) ); //kdDebug(7015) << "KAutoMount: m_strDevice=" << m_strDevice << " -> mountpoint=" << mountpoint << endl; Q_ASSERT( mountpoint.isValid() ); if ( mountpoint.path().isEmpty() ) - kdWarning(7015) << m_strDevice << " was correctly mounted, but KIO::findDeviceMountPoint didn't find it. " + kdWarning(7015) << m_strDevice << " was correctly mounted, but TDEIO::findDeviceMountPoint didn't find it. " << "This looks like a bug, please report it on http://bugs.kde.org, together with your /etc/fstab line" << endl; else if ( m_bShowFilemanagerWindow ) KRun::runURL( mountpoint, "inode/directory" ); @@ -80,11 +80,11 @@ void KAutoMount::slotResult( KIO::Job * job ) KAutoUnmount::KAutoUnmount( const TQString & _mountpoint, const TQString & _desktopFile ) : m_desktopFile( _desktopFile ), m_mountpoint( _mountpoint ) { - KIO::Job * job = KIO::unmount( m_mountpoint ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); + TDEIO::Job * job = TDEIO::unmount( m_mountpoint ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); } -void KAutoUnmount::slotResult( KIO::Job * job ) +void KAutoUnmount::slotResult( TDEIO::Job * job ) { if ( job->error() ) { emit error(); diff --git a/kio/kio/kautomount.h b/kio/kio/kautomount.h index c5aa30583..68eecdbbd 100644 --- a/kio/kio/kautomount.h +++ b/kio/kio/kautomount.h @@ -30,14 +30,14 @@ #ifdef Q_OS_UNIX -namespace KIO { +namespace TDEIO { class Job; } /** * This class implements synchronous mounting of devices, * as well as showing a file-manager window after mounting a device, optionally. - * It is a wrapper around the asychronous KIO::special() call for mount, + * It is a wrapper around the asychronous TDEIO::special() call for mount, * used by KMimeType. * * @short This class implements synchronous mounting of devices. @@ -68,7 +68,7 @@ signals: void error(); protected slots: - void slotResult( KIO::Job * ); + void slotResult( TDEIO::Job * ); protected: TQString m_strDevice; @@ -82,7 +82,7 @@ private: /** * This class implements synchronous unmounting of devices, - * It is a wrapper around the asychronous KIO::special() call for unmount, + * It is a wrapper around the asychronous TDEIO::special() call for unmount, * used by KMimeType. * * @short This class implements synchronous unmounting of devices, @@ -107,7 +107,7 @@ signals: void error(); protected slots: - void slotResult( KIO::Job * ); + void slotResult( TDEIO::Job * ); private: TQString m_desktopFile; TQString m_mountpoint; diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index b6905b3a3..90cfca041 100644 --- a/kio/kio/kdirlister.cpp +++ b/kio/kio/kdirlister.cpp @@ -224,8 +224,8 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u, if ( lister->d->url == _url ) lister->d->rootFileItem = 0; - KIO::ListJob* job = KIO::listDir( _url, false /* no default GUI */ ); - jobs.insert( job, TQValueList<KIO::UDSEntry>() ); + TDEIO::ListJob* job = TDEIO::listDir( _url, false /* no default GUI */ ); + jobs.insert( job, TQValueList<TDEIO::UDSEntry>() ); lister->jobStarted( job ); lister->connectJob( job ); @@ -233,12 +233,12 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u, if ( lister->d->window ) job->setWindow( lister->d->window ); - connect( job, TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList & ) ), - this, TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - this, TQT_SLOT( slotResult( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( redirection( KIO::Job *, const KURL & ) ), - this, TQT_SLOT( slotRedirection( KIO::Job *, const KURL & ) ) ); + connect( job, TQT_SIGNAL( entries( TDEIO::Job *, const TDEIO::UDSEntryList & ) ), + this, TQT_SLOT( slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList & ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( redirection( TDEIO::Job *, const KURL & ) ), + this, TQT_SLOT( slotRedirection( TDEIO::Job *, const KURL & ) ) ); emit lister->started( _url ); @@ -253,7 +253,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u, urlsCurrentlyListed[urlStr]->append( lister ); - KIO::ListJob *job = jobForUrl( urlStr ); + TDEIO::ListJob *job = jobForUrl( urlStr ); Q_ASSERT( job ); lister->jobStarted( job ); @@ -322,7 +322,7 @@ void KDirListerCache::stop( KDirLister *lister ) bool ret = listers->removeRef( lister ); Q_ASSERT( ret ); - KIO::ListJob *job = jobForUrl( url ); + TDEIO::ListJob *job = jobForUrl( url ); if ( job ) lister->jobDone( job ); @@ -388,7 +388,7 @@ void KDirListerCache::stop( KDirLister *lister, const KURL& _u ) holders->append( lister ); - KIO::ListJob *job = jobForUrl( urlStr ); + TDEIO::ListJob *job = jobForUrl( urlStr ); if ( job ) lister->jobDone( job ); @@ -472,7 +472,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not itemsInUse.remove( urlStr ); // this job is a running update - KIO::ListJob *job = jobForUrl( urlStr ); + TDEIO::ListJob *job = jobForUrl( urlStr ); if ( job ) { lister->jobDone( job ); @@ -499,7 +499,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // Generally keep a watch, except when it would prevent // unmounting a removable device (#37780) const bool isLocal = item->url.isLocalFile(); - const bool isManuallyMounted = isLocal && KIO::manually_mounted( item->url.path() ); + const bool isManuallyMounted = isLocal && TDEIO::manually_mounted( item->url.path() ); bool containsManuallyMounted = false; if ( !isManuallyMounted && item->lstItems && isLocal ) { @@ -509,7 +509,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // of the time this is just a stat per subdir) KFileItemListIterator kit( *item->lstItems ); for ( ; kit.current() && !containsManuallyMounted; ++kit ) - if ( (*kit)->isDir() && KIO::manually_mounted( (*kit)->url().path() ) ) + if ( (*kit)->isDir() && TDEIO::manually_mounted( (*kit)->url().path() ) ) containsManuallyMounted = true; } @@ -554,7 +554,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir ) // restart the job for _dir if it is running already bool killed = false; TQWidget *window = 0; - KIO::ListJob *job = jobForUrl( urlStr ); + TDEIO::ListJob *job = jobForUrl( urlStr ); if ( job ) { window = job->window(); @@ -577,13 +577,13 @@ void KDirListerCache::updateDirectory( const KURL& _dir ) Q_ASSERT( !listers || (listers && killed) ); - job = KIO::listDir( _dir, false /* no default GUI */ ); - jobs.insert( job, TQValueList<KIO::UDSEntry>() ); + job = TDEIO::listDir( _dir, false /* no default GUI */ ); + jobs.insert( job, TQValueList<TDEIO::UDSEntry>() ); - connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )), - this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) ); - connect( job, TQT_SIGNAL(result( KIO::Job * )), - this, TQT_SLOT(slotUpdateResult( KIO::Job * )) ); + connect( job, TQT_SIGNAL(entries( TDEIO::Job *, const TDEIO::UDSEntryList & )), + this, TQT_SLOT(slotUpdateEntries( TDEIO::Job *, const TDEIO::UDSEntryList & )) ); + connect( job, TQT_SIGNAL(result( TDEIO::Job * )), + this, TQT_SLOT(slotUpdateResult( TDEIO::Job * )) ); kdDebug(7004) << k_funcinfo << "update started in " << _dir << endl; @@ -930,9 +930,9 @@ void KDirListerCache::slotFileDeleted( const TQString& _file ) FilesRemoved( u ); } -void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entries ) +void KDirListerCache::slotEntries( TDEIO::Job *job, const TDEIO::UDSEntryList &entries ) { - KURL url = joburl( static_cast<KIO::ListJob *>(job) ); + KURL url = joburl( static_cast<TDEIO::ListJob *>(job) ); url.adjustPath(-1); TQString urlStr = url.url(); @@ -954,17 +954,17 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri static const TQString& dot = TDEGlobal::staticQString("."); static const TQString& dotdot = TDEGlobal::staticQString(".."); - KIO::UDSEntryListConstIterator it = entries.begin(); - KIO::UDSEntryListConstIterator end = entries.end(); + TDEIO::UDSEntryListConstIterator it = entries.begin(); + TDEIO::UDSEntryListConstIterator end = entries.end(); for ( ; it != end; ++it ) { TQString name; // find out about the name - KIO::UDSEntry::ConstIterator entit = (*it).begin(); + TDEIO::UDSEntry::ConstIterator entit = (*it).begin(); for( ; entit != (*it).end(); ++entit ) - if ( (*entit).m_uds == KIO::UDS_NAME ) + if ( (*entit).m_uds == TDEIO::UDS_NAME ) { name = (*entit).m_str; break; @@ -1000,10 +1000,10 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri kdl->emitItems(); } -void KDirListerCache::slotResult( KIO::Job *j ) +void KDirListerCache::slotResult( TDEIO::Job *j ) { Q_ASSERT( j ); - KIO::ListJob *job = static_cast<KIO::ListJob *>( j ); + TDEIO::ListJob *job = static_cast<TDEIO::ListJob *>( j ); jobs.remove( job ); KURL jobUrl = joburl( job ); @@ -1067,10 +1067,10 @@ void KDirListerCache::slotResult( KIO::Job *j ) #endif } -void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url ) +void KDirListerCache::slotRedirection( TDEIO::Job *j, const KURL& url ) { Q_ASSERT( j ); - KIO::ListJob *job = static_cast<KIO::ListJob *>( j ); + TDEIO::ListJob *job = static_cast<TDEIO::ListJob *>( j ); KURL oldUrl = job->url(); // here we really need the old url! KURL newUrl = url; @@ -1175,7 +1175,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url ) // get the job if one's running for newUrl already (can be a list-job or an update-job), but // do not return this 'job', which would happen because of the use of redirectionURL() - KIO::ListJob *oldJob = jobForUrl( newUrl.url(), job ); + TDEIO::ListJob *oldJob = jobForUrl( newUrl.url(), job ); // listers of newUrl with oldJob: forget about the oldJob and use the already running one // which will be converted to an updateJob @@ -1305,10 +1305,10 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url ) // make the job an update job job->disconnect( this ); - connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )), - this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) ); - connect( job, TQT_SIGNAL(result( KIO::Job * )), - this, TQT_SLOT(slotUpdateResult( KIO::Job * )) ); + connect( job, TQT_SIGNAL(entries( TDEIO::Job *, const TDEIO::UDSEntryList & )), + this, TQT_SLOT(slotUpdateEntries( TDEIO::Job *, const TDEIO::UDSEntryList & )) ); + connect( job, TQT_SIGNAL(result( TDEIO::Job * )), + this, TQT_SLOT(slotUpdateResult( TDEIO::Job * )) ); // FIXME: autoUpdate-Counts!! @@ -1385,7 +1385,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url ) TQString oldUrlStr = oldUrl.url(-1); TQString urlStr = url.url(-1); - KIO::ListJob *job = jobForUrl( oldUrlStr ); + TDEIO::ListJob *job = jobForUrl( oldUrlStr ); if ( job ) killJob( job ); @@ -1454,15 +1454,15 @@ void KDirListerCache::removeDirFromCache( const KURL& dir ) } } -void KDirListerCache::slotUpdateEntries( KIO::Job* job, const KIO::UDSEntryList& list ) +void KDirListerCache::slotUpdateEntries( TDEIO::Job* job, const TDEIO::UDSEntryList& list ) { - jobs[static_cast<KIO::ListJob*>(job)] += list; + jobs[static_cast<TDEIO::ListJob*>(job)] += list; } -void KDirListerCache::slotUpdateResult( KIO::Job * j ) +void KDirListerCache::slotUpdateResult( TDEIO::Job * j ) { Q_ASSERT( j ); - KIO::ListJob *job = static_cast<KIO::ListJob *>( j ); + TDEIO::ListJob *job = static_cast<TDEIO::ListJob *>( j ); KURL jobUrl = joburl( job ); jobUrl.adjustPath(-1); // need remove trailing slashes again, in case of redirections @@ -1544,8 +1544,8 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j ) KFileItem *item = 0, *tmp; - TQValueList<KIO::UDSEntry> buf = jobs[job]; - TQValueListIterator<KIO::UDSEntry> it = buf.begin(); + TQValueList<TDEIO::UDSEntry> buf = jobs[job]; + TQValueListIterator<TDEIO::UDSEntry> it = buf.begin(); for ( ; it != buf.end(); ++it ) { // Form the complete url @@ -1641,10 +1641,10 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j ) // private -KIO::ListJob *KDirListerCache::jobForUrl( const TQString& url, KIO::ListJob *not_job ) +TDEIO::ListJob *KDirListerCache::jobForUrl( const TQString& url, TDEIO::ListJob *not_job ) { - KIO::ListJob *job; - TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator it = jobs.begin(); + TDEIO::ListJob *job; + TQMap< TDEIO::ListJob *, TQValueList<TDEIO::UDSEntry> >::Iterator it = jobs.begin(); while ( it != jobs.end() ) { job = it.key(); @@ -1655,7 +1655,7 @@ KIO::ListJob *KDirListerCache::jobForUrl( const TQString& url, KIO::ListJob *not return 0; } -const KURL& KDirListerCache::joburl( KIO::ListJob *job ) +const KURL& KDirListerCache::joburl( TDEIO::ListJob *job ) { if ( job->redirectionURL().isValid() ) return job->redirectionURL(); @@ -1663,7 +1663,7 @@ const KURL& KDirListerCache::joburl( KIO::ListJob *job ) return job->url(); } -void KDirListerCache::killJob( KIO::ListJob *job ) +void KDirListerCache::killJob( TDEIO::ListJob *job ) { jobs.remove( job ); job->disconnect( this ); @@ -1806,7 +1806,7 @@ void KDirListerCache::printDebug() kdDebug(7004) << " " << it2.currentKey() << " " << it2.current()->count() << " listers: " << list << endl; } - TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator jit = jobs.begin(); + TQMap< TDEIO::ListJob *, TQValueList<TDEIO::UDSEntry> >::Iterator jit = jobs.begin(); kdDebug(7004) << "Jobs: " << endl; for ( ; jit != jobs.end() ; ++jit ) kdDebug(7004) << " " << jit.key() << " listing " << joburl( jit.key() ).prettyURL() << ": " << (*jit).count() << " entries." << endl; @@ -1867,9 +1867,9 @@ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload ) // If a local path is available, monitor that instead of the given remote URL... KURL realURL = _url; if (!realURL.isLocalFile()) { - KIO::LocalURLJob* localURLJob = KIO::localURL(_url); + TDEIO::LocalURLJob* localURLJob = TDEIO::localURL(_url); if (localURLJob) { - connect(localURLJob, TQT_SIGNAL(localURL(KIO::Job*, const KURL&, bool)), this, TQT_SLOT(slotLocalURL(KIO::Job*, const KURL&, bool))); + connect(localURLJob, TQT_SIGNAL(localURL(TDEIO::Job*, const KURL&, bool)), this, TQT_SLOT(slotLocalURL(TDEIO::Job*, const KURL&, bool))); connect(localURLJob, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotLocalURLKIODestroyed())); d->localURLSlotFired = false; while (!d->localURLSlotFired) { @@ -1885,7 +1885,7 @@ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload ) return s_pCache->listDir( this, realURL, _keep, _reload ); } -void KDirLister::slotLocalURL(KIO::Job *job, const KURL& url, bool isLocal) { +void KDirLister::slotLocalURL(TDEIO::Job *job, const KURL& url, bool isLocal) { d->localURLSlotFired = true; d->localURLResultURL = url; d->localURLResultIsLocal = isLocal; @@ -2248,7 +2248,7 @@ bool KDirLister::validURL( const KURL& _url ) const return s_pCache->validURL( this, _url ); } -void KDirLister::handleError( KIO::Job *job ) +void KDirLister::handleError( TDEIO::Job *job ) { if ( d->autoErrorHandling ) job->showErrorDialog( d->errorParent ); @@ -2382,20 +2382,20 @@ void KDirLister::emitDeleteItem( KFileItem *item ) // ================ private slots ================ // -void KDirLister::slotInfoMessage( KIO::Job *, const TQString& message ) +void KDirLister::slotInfoMessage( TDEIO::Job *, const TQString& message ) { emit infoMessage( message ); } -void KDirLister::slotPercent( KIO::Job *job, unsigned long pcnt ) +void KDirLister::slotPercent( TDEIO::Job *job, unsigned long pcnt ) { - d->jobData[static_cast<KIO::ListJob *>(job)].percent = pcnt; + d->jobData[static_cast<TDEIO::ListJob *>(job)].percent = pcnt; int result = 0; - KIO::filesize_t size = 0; + TDEIO::filesize_t size = 0; - TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); + TQMap< TDEIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); while ( dataIt != d->jobData.end() ) { result += (*dataIt).percent * (*dataIt).totalSize; @@ -2410,12 +2410,12 @@ void KDirLister::slotPercent( KIO::Job *job, unsigned long pcnt ) emit percent( result ); } -void KDirLister::slotTotalSize( KIO::Job *job, KIO::filesize_t size ) +void KDirLister::slotTotalSize( TDEIO::Job *job, TDEIO::filesize_t size ) { - d->jobData[static_cast<KIO::ListJob *>(job)].totalSize = size; + d->jobData[static_cast<TDEIO::ListJob *>(job)].totalSize = size; - KIO::filesize_t result = 0; - TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); + TDEIO::filesize_t result = 0; + TQMap< TDEIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); while ( dataIt != d->jobData.end() ) { result += (*dataIt).totalSize; @@ -2425,12 +2425,12 @@ void KDirLister::slotTotalSize( KIO::Job *job, KIO::filesize_t size ) emit totalSize( result ); } -void KDirLister::slotProcessedSize( KIO::Job *job, KIO::filesize_t size ) +void KDirLister::slotProcessedSize( TDEIO::Job *job, TDEIO::filesize_t size ) { - d->jobData[static_cast<KIO::ListJob *>(job)].processedSize = size; + d->jobData[static_cast<TDEIO::ListJob *>(job)].processedSize = size; - KIO::filesize_t result = 0; - TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); + TDEIO::filesize_t result = 0; + TQMap< TDEIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); while ( dataIt != d->jobData.end() ) { result += (*dataIt).processedSize; @@ -2440,12 +2440,12 @@ void KDirLister::slotProcessedSize( KIO::Job *job, KIO::filesize_t size ) emit processedSize( result ); } -void KDirLister::slotSpeed( KIO::Job *job, unsigned long spd ) +void KDirLister::slotSpeed( TDEIO::Job *job, unsigned long spd ) { - d->jobData[static_cast<KIO::ListJob *>(job)].speed = spd; + d->jobData[static_cast<TDEIO::ListJob *>(job)].speed = spd; int result = 0; - TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); + TQMap< TDEIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin(); while ( dataIt != d->jobData.end() ) { result += (*dataIt).speed; @@ -2460,12 +2460,12 @@ uint KDirLister::numJobs() return d->jobData.count(); } -void KDirLister::jobDone( KIO::ListJob *job ) +void KDirLister::jobDone( TDEIO::ListJob *job ) { d->jobData.remove( job ); } -void KDirLister::jobStarted( KIO::ListJob *job ) +void KDirLister::jobStarted( TDEIO::ListJob *job ) { KDirListerPrivate::JobData jobData; jobData.speed = 0; @@ -2477,18 +2477,18 @@ void KDirLister::jobStarted( KIO::ListJob *job ) d->complete = false; } -void KDirLister::connectJob( KIO::ListJob *job ) +void KDirLister::connectJob( TDEIO::ListJob *job ) { - connect( job, TQT_SIGNAL(infoMessage( KIO::Job *, const TQString& )), - this, TQT_SLOT(slotInfoMessage( KIO::Job *, const TQString& )) ); - connect( job, TQT_SIGNAL(percent( KIO::Job *, unsigned long )), - this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long )) ); - connect( job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t )), - this, TQT_SLOT(slotTotalSize( KIO::Job *, KIO::filesize_t )) ); - connect( job, TQT_SIGNAL(processedSize( KIO::Job *, KIO::filesize_t )), - this, TQT_SLOT(slotProcessedSize( KIO::Job *, KIO::filesize_t )) ); - connect( job, TQT_SIGNAL(speed( KIO::Job *, unsigned long )), - this, TQT_SLOT(slotSpeed( KIO::Job *, unsigned long )) ); + connect( job, TQT_SIGNAL(infoMessage( TDEIO::Job *, const TQString& )), + this, TQT_SLOT(slotInfoMessage( TDEIO::Job *, const TQString& )) ); + connect( job, TQT_SIGNAL(percent( TDEIO::Job *, unsigned long )), + this, TQT_SLOT(slotPercent( TDEIO::Job *, unsigned long )) ); + connect( job, TQT_SIGNAL(totalSize( TDEIO::Job *, TDEIO::filesize_t )), + this, TQT_SLOT(slotTotalSize( TDEIO::Job *, TDEIO::filesize_t )) ); + connect( job, TQT_SIGNAL(processedSize( TDEIO::Job *, TDEIO::filesize_t )), + this, TQT_SLOT(slotProcessedSize( TDEIO::Job *, TDEIO::filesize_t )) ); + connect( job, TQT_SIGNAL(speed( TDEIO::Job *, unsigned long )), + this, TQT_SLOT(slotSpeed( TDEIO::Job *, unsigned long )) ); } void KDirLister::setMainWindow( TQWidget *window ) diff --git a/kio/kio/kdirlister.h b/kio/kio/kdirlister.h index 2271b2a70..87aa6c694 100644 --- a/kio/kio/kdirlister.h +++ b/kio/kio/kdirlister.h @@ -29,7 +29,7 @@ #include <kurl.h> -namespace KIO { class Job; class ListJob; } +namespace TDEIO { class Job; class ListJob; } /** * The dir lister deals with the kiojob used to list and update a directory @@ -520,13 +520,13 @@ signals: * Emitted when we know the size of the jobs. * @param size the total size in bytes */ - void totalSize( KIO::filesize_t size ); + void totalSize( TDEIO::filesize_t size ); /** * Regularly emitted to show the progress of this KDirLister. * @param size the processed size in bytes */ - void processedSize( KIO::filesize_t size ); + void processedSize( TDEIO::filesize_t size ); /** * Emitted to display information about the speed of the jobs. @@ -598,24 +598,24 @@ protected: virtual bool validURL( const KURL& ) const; /** Reimplement to customize error handling */ - virtual void handleError( KIO::Job * ); + virtual void handleError( TDEIO::Job * ); protected: virtual void virtual_hook( int id, void *data ); private slots: - void slotInfoMessage( KIO::Job *, const TQString& ); - void slotPercent( KIO::Job *, unsigned long ); - void slotTotalSize( KIO::Job *, KIO::filesize_t ); - void slotProcessedSize( KIO::Job *, KIO::filesize_t ); - void slotSpeed( KIO::Job *, unsigned long ); - void slotLocalURL( KIO::Job *, const KURL&, bool ); + void slotInfoMessage( TDEIO::Job *, const TQString& ); + void slotPercent( TDEIO::Job *, unsigned long ); + void slotTotalSize( TDEIO::Job *, TDEIO::filesize_t ); + void slotProcessedSize( TDEIO::Job *, TDEIO::filesize_t ); + void slotSpeed( TDEIO::Job *, unsigned long ); + void slotLocalURL( TDEIO::Job *, const KURL&, bool ); void slotLocalURLKIODestroyed( ); private: - void jobStarted( KIO::ListJob * ); - void connectJob( KIO::ListJob * ); - void jobDone( KIO::ListJob * ); + void jobStarted( TDEIO::ListJob * ); + void connectJob( TDEIO::ListJob * ); + void jobDone( TDEIO::ListJob * ); uint numJobs(); diff --git a/kio/kio/kdirlister_p.h b/kio/kio/kdirlister_p.h index 047c83148..47bd4d452 100644 --- a/kio/kio/kdirlister_p.h +++ b/kio/kio/kdirlister_p.h @@ -34,7 +34,7 @@ class TQTimer; class KDirLister; -namespace KIO { class Job; class ListJob; } +namespace TDEIO { class Job; class ListJob; } class KDirLister::KDirListerPrivate @@ -90,10 +90,10 @@ public: struct JobData { long unsigned int percent, speed; - KIO::filesize_t processedSize, totalSize; + TDEIO::filesize_t processedSize, totalSize; }; - TQMap<KIO::ListJob *, JobData> jobData; + TQMap<TDEIO::ListJob *, JobData> jobData; // file item for the root itself (".") KFileItem *rootFileItem; @@ -195,18 +195,18 @@ private slots: void slotFileDirtyDelayed(); - void slotEntries( KIO::Job *job, const KIO::UDSEntryList &entries ); - void slotResult( KIO::Job *j ); - void slotRedirection( KIO::Job *job, const KURL &url ); + void slotEntries( TDEIO::Job *job, const TDEIO::UDSEntryList &entries ); + void slotResult( TDEIO::Job *j ); + void slotRedirection( TDEIO::Job *job, const KURL &url ); - void slotUpdateEntries( KIO::Job *job, const KIO::UDSEntryList &entries ); - void slotUpdateResult( KIO::Job *job ); + void slotUpdateEntries( TDEIO::Job *job, const TDEIO::UDSEntryList &entries ); + void slotUpdateResult( TDEIO::Job *job ); private: - KIO::ListJob *jobForUrl( const TQString& url, KIO::ListJob *not_job = 0 ); - const KURL& joburl( KIO::ListJob *job ); + TDEIO::ListJob *jobForUrl( const TQString& url, TDEIO::ListJob *not_job = 0 ); + const KURL& joburl( TDEIO::ListJob *job ); - void killJob( KIO::ListJob *job ); + void killJob( TDEIO::ListJob *job ); // check if _url is held by some lister and return true, // otherwise schedule a delayed update and return false @@ -324,7 +324,7 @@ private: }; static const unsigned short MAX_JOBS_PER_LISTER; - TQMap<KIO::ListJob *, KIO::UDSEntryList> jobs; + TQMap<TDEIO::ListJob *, TDEIO::UDSEntryList> jobs; // an item is a complete directory TQDict<DirItem> itemsInUse; diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp index 580de16cc..1ea5805f3 100644 --- a/kio/kio/kdirwatch.cpp +++ b/kio/kio/kdirwatch.cpp @@ -109,7 +109,7 @@ #include "kdirwatch.h" #include "kdirwatch_p.h" -#include "global.h" // KIO::probably_slow_mounted +#include "global.h" // TDEIO::probably_slow_mounted #define NO_NOTIFY (time_t) 0 @@ -226,7 +226,7 @@ KDirWatchPrivate::KDirWatchPrivate() delayRemove = false; m_ref = 0; - KConfigGroup config(TDEGlobal::config(), TQCString("DirWatch")); + TDEConfigGroup config(TDEGlobal::config(), TQCString("DirWatch")); m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000); m_PollInterval = config.readNumEntry("PollInterval", 500); @@ -744,7 +744,7 @@ bool KDirWatchPrivate::useINotify( Entry* e ) bool KDirWatchPrivate::useStat(Entry* e) { if ( e->path.startsWith("/media/") || (e->path == "/media") - || (KIO::probably_slow_mounted(e->path)) ) + || (TDEIO::probably_slow_mounted(e->path)) ) useFreq(e, m_nfsPollInterval); else useFreq(e, m_PollInterval); diff --git a/kio/kio/kemailsettings.cpp b/kio/kio/kemailsettings.cpp index 2f1ffe7a0..f8ad9f7dd 100644 --- a/kio/kio/kemailsettings.cpp +++ b/kio/kio/kemailsettings.cpp @@ -36,7 +36,7 @@ class KEMailSettingsPrivate { public: KEMailSettingsPrivate() : m_pConfig( 0 ) {} ~KEMailSettingsPrivate() { delete m_pConfig; } - KConfig *m_pConfig; + TDEConfig *m_pConfig; TQStringList profiles; TQString m_sDefaultProfile, m_sCurrentProfile; }; @@ -242,7 +242,7 @@ KEMailSettings::KEMailSettings() p = new KEMailSettingsPrivate(); p->m_sCurrentProfile=TQString::null; - p->m_pConfig = new KConfig("emaildefaults"); + p->m_pConfig = new TDEConfig("emaildefaults"); TQStringList groups = p->m_pConfig->groupList(); for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) { diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index 50ee1a5d2..fa08ae961 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -58,7 +58,7 @@ class KFileItem::KFileItemPrivate { TQString iconName; }; -KFileItem::KFileItem( const KIO::UDSEntry& _entry, const KURL& _url, +KFileItem::KFileItem( const TDEIO::UDSEntry& _entry, const KURL& _url, bool _determineMimeTypeOnDemand, bool _urlIsDirectory ) : m_entry( _entry ), m_url( _url ), @@ -80,7 +80,7 @@ KFileItem::KFileItem( mode_t _mode, mode_t _permissions, const KURL& _url, bool m_entry(), // warning ! m_url( _url ), m_strName( _url.fileName() ), - m_strText( KIO::decodeFileName( m_strName ) ), + m_strText( TDEIO::decodeFileName( m_strName ) ), m_pMimeType( 0 ), m_fileMode ( _mode ), m_permissions( _permissions ), @@ -97,7 +97,7 @@ KFileItem::KFileItem( mode_t _mode, mode_t _permissions, const KURL& _url, bool KFileItem::KFileItem( const KURL &url, const TQString &mimeType, mode_t mode ) : m_url( url ), m_strName( url.fileName() ), - m_strText( KIO::decodeFileName( m_strName ) ), + m_strText( TDEIO::decodeFileName( m_strName ) ), m_pMimeType( 0 ), m_fileMode( mode ), m_permissions( KFileItem::Unknown ), @@ -134,7 +134,7 @@ KFileItem::~KFileItem() void KFileItem::init( bool _determineMimeTypeOnDemand ) { m_access = TQString::null; - m_size = (KIO::filesize_t) -1; + m_size = (TDEIO::filesize_t) -1; // metaInfo = KFileMetaInfo(); for ( int i = 0; i < NumFlags; i++ ) m_time[i] = (time_t) -1; @@ -195,63 +195,63 @@ void KFileItem::init( bool _determineMimeTypeOnDemand ) void KFileItem::readUDSEntry( bool _urlIsDirectory ) { - // extract the mode and the filename from the KIO::UDS Entry + // extract the mode and the filename from the TDEIO::UDS Entry bool UDS_URL_seen = false; if (&m_entry == NULL) return; - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) { switch ((*it).m_uds) { - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: m_fileMode = (mode_t)((*it).m_long); break; - case KIO::UDS_ACCESS: + case TDEIO::UDS_ACCESS: m_permissions = (mode_t)((*it).m_long); break; - case KIO::UDS_USER: + case TDEIO::UDS_USER: m_user = ((*it).m_str); break; - case KIO::UDS_GROUP: + case TDEIO::UDS_GROUP: m_group = ((*it).m_str); break; - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: m_strName = (*it).m_str; - m_strText = KIO::decodeFileName( m_strName ); + m_strText = TDEIO::decodeFileName( m_strName ); break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: UDS_URL_seen = true; m_url = KURL((*it).m_str); if ( m_url.isLocalFile() ) m_bIsLocalURL = true; break; - case KIO::UDS_MIME_TYPE: + case TDEIO::UDS_MIME_TYPE: m_pMimeType = KMimeType::mimeType((*it).m_str); m_bMimeTypeKnown = true; break; - case KIO::UDS_GUESSED_MIME_TYPE: + case TDEIO::UDS_GUESSED_MIME_TYPE: m_guessedMimeType = (*it).m_str; break; - case KIO::UDS_LINK_DEST: + case TDEIO::UDS_LINK_DEST: m_bLink = !(*it).m_str.isEmpty(); // we don't store the link dest break; - case KIO::UDS_ICON_NAME: + case TDEIO::UDS_ICON_NAME: if ( !d ) d = new KFileItemPrivate(); d->iconName = (*it).m_str; break; - case KIO::UDS_HIDDEN: + case TDEIO::UDS_HIDDEN: if ( (*it).m_long ) m_hidden = Hidden; else @@ -280,7 +280,7 @@ void KFileItem::refresh() // Everything could have changed... // Clearing m_entry makes it possible to detect changes in the size of the file, // the time information, etc. - m_entry = KIO::UDSEntry(); + m_entry = TDEIO::UDSEntry(); init( false ); } @@ -299,19 +299,19 @@ void KFileItem::setURL( const KURL &url ) void KFileItem::setName( const TQString& name ) { m_strName = name; - m_strText = KIO::decodeFileName( m_strName ); + m_strText = TDEIO::decodeFileName( m_strName ); } TQString KFileItem::linkDest() const { if (&m_entry == NULL) return TQString::null; - // Extract it from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + // Extract it from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) - if ( (*it).m_uds == KIO::UDS_LINK_DEST ) + if ( (*it).m_uds == TDEIO::UDS_LINK_DEST ) return (*it).m_str; - // If not in the KIO::UDSEntry, or if UDSEntry empty, use readlink() [if local URL] + // If not in the TDEIO::UDSEntry, or if UDSEntry empty, use readlink() [if local URL] if ( m_bIsLocalURL ) { char buf[1000]; @@ -335,33 +335,33 @@ TQString KFileItem::localPath() const { if (&m_entry == NULL) return TQString::null; - // Extract the local path from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); - const KIO::UDSEntry::ConstIterator end = m_entry.end(); + // Extract the local path from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); + const TDEIO::UDSEntry::ConstIterator end = m_entry.end(); for( ; it != end; ++it ) - if ( (*it).m_uds == KIO::UDS_LOCAL_PATH ) + if ( (*it).m_uds == TDEIO::UDS_LOCAL_PATH ) return (*it).m_str; } return TQString::null; } -KIO::filesize_t KFileItem::size(bool &exists) const +TDEIO::filesize_t KFileItem::size(bool &exists) const { exists = true; - if ( m_size != (KIO::filesize_t) -1 ) + if ( m_size != (TDEIO::filesize_t) -1 ) return m_size; if (&m_entry == NULL) return 0L; - // Extract it from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + // Extract it from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) - if ( (*it).m_uds == KIO::UDS_SIZE ) { + if ( (*it).m_uds == TDEIO::UDS_SIZE ) { m_size = (*it).m_long; return m_size; } - // If not in the KIO::UDSEntry, or if UDSEntry empty, use stat() [if local URL] + // If not in the TDEIO::UDSEntry, or if UDSEntry empty, use stat() [if local URL] if ( m_bIsLocalURL ) { KDE_struct_stat buf; @@ -375,9 +375,9 @@ KIO::filesize_t KFileItem::size(bool &exists) const bool KFileItem::hasExtendedACL() const { if (&m_entry == NULL) return false; - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); it++ ) - if ( (*it).m_uds == KIO::UDS_EXTENDED_ACL ) { + if ( (*it).m_uds == TDEIO::UDS_EXTENDED_ACL ) { return true; } return false; @@ -388,10 +388,10 @@ KACL KFileItem::ACL() const if ( hasExtendedACL() ) { if (&m_entry == NULL) return KACL( m_permissions ); - // Extract it from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + // Extract it from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) - if ( (*it).m_uds == KIO::UDS_ACL_STRING ) + if ( (*it).m_uds == TDEIO::UDS_ACL_STRING ) return KACL((*it).m_str); } // create one from the basic permissions @@ -402,15 +402,15 @@ KACL KFileItem::defaultACL() const { if (&m_entry == NULL) return KACL(); - // Extract it from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + // Extract it from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) - if ( (*it).m_uds == KIO::UDS_DEFAULT_ACL_STRING ) + if ( (*it).m_uds == TDEIO::UDS_DEFAULT_ACL_STRING ) return KACL((*it).m_str); return KACL(); } -KIO::filesize_t KFileItem::size() const +TDEIO::filesize_t KFileItem::size() const { bool exists; return size(exists); @@ -427,13 +427,13 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const unsigned int mappedWhich = 0; switch( which ) { - case KIO::UDS_MODIFICATION_TIME: + case TDEIO::UDS_MODIFICATION_TIME: mappedWhich = Modification; break; - case KIO::UDS_ACCESS_TIME: + case TDEIO::UDS_ACCESS_TIME: mappedWhich = Access; break; - case KIO::UDS_CREATION_TIME: + case TDEIO::UDS_CREATION_TIME: mappedWhich = Creation; break; } @@ -443,29 +443,29 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const if (&m_entry == NULL) return static_cast<time_t>(0); - // Extract it from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = m_entry.begin(); + // Extract it from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = m_entry.begin(); for( ; it != m_entry.end(); ++it ) if ( (*it).m_uds == which ) { m_time[mappedWhich] = static_cast<time_t>((*it).m_long); return m_time[mappedWhich]; } - // If not in the KIO::UDSEntry, or if UDSEntry empty, use stat() [if local URL] + // If not in the TDEIO::UDSEntry, or if UDSEntry empty, use stat() [if local URL] if ( m_bIsLocalURL ) { KDE_struct_stat buf; if ( KDE_stat( TQFile::encodeName(m_url.path(-1)), &buf ) == 0 ) { - if(which == KIO::UDS_CREATION_TIME) { + if(which == TDEIO::UDS_CREATION_TIME) { // We can't determine creation time for local files hasTime = false; m_time[mappedWhich] = static_cast<time_t>(0); return m_time[mappedWhich]; } - m_time[mappedWhich] = (which == KIO::UDS_MODIFICATION_TIME) ? + m_time[mappedWhich] = (which == TDEIO::UDS_MODIFICATION_TIME) ? buf.st_mtime : - /* which == KIO::UDS_ACCESS_TIME)*/ + /* which == TDEIO::UDS_ACCESS_TIME)*/ buf.st_atime; return m_time[mappedWhich]; } @@ -843,9 +843,9 @@ TQString KFileItem::getStatusBarInfo() else if ( S_ISREG( m_fileMode ) ) { bool hasSize; - KIO::filesize_t sizeValue = size(hasSize); + TDEIO::filesize_t sizeValue = size(hasSize); if(hasSize) - text += TQString(" (%1) ").arg( KIO::convertSize( sizeValue ) ); + text += TQString(" (%1) ").arg( TDEIO::convertSize( sizeValue ) ); text += mimeComment(); } else if ( S_ISDIR ( m_fileMode ) ) @@ -887,12 +887,12 @@ TQString KFileItem::getToolTipText(int maxcount) if ( !S_ISDIR ( m_fileMode ) ) { bool hasSize; - KIO::filesize_t sizeValue = size(hasSize); + TDEIO::filesize_t sizeValue = size(hasSize); if(hasSize) tip += start + i18n("Size:") + mid + - KIO::convertSizeWithBytes(sizeValue) + end; + TDEIO::convertSizeWithBytes(sizeValue) + end; } - TQString timeStr = timeString( KIO::UDS_MODIFICATION_TIME); + TQString timeStr = timeString( TDEIO::UDS_MODIFICATION_TIME); if(!timeStr.isEmpty()) tip += start + i18n("Modified:") + mid + timeStr + end; @@ -966,7 +966,7 @@ bool KFileItem::cmp( const KFileItem & item ) && m_hidden == item.m_hidden && size(hasSize1) == item.size(hasSize2) && hasSize1 == hasSize2 - && time(KIO::UDS_MODIFICATION_TIME, hasTime1) == item.time(KIO::UDS_MODIFICATION_TIME, hasTime2) + && time(TDEIO::UDS_MODIFICATION_TIME, hasTime1) == item.time(TDEIO::UDS_MODIFICATION_TIME, hasTime2) && hasTime1 == hasTime2 && (!d || !item.d || d->iconName == item.d->iconName) ); @@ -1014,7 +1014,7 @@ void KFileItem::assign( const KFileItem & item ) } } -void KFileItem::setUDSEntry( const KIO::UDSEntry& _entry, const KURL& _url, +void KFileItem::setUDSEntry( const TDEIO::UDSEntry& _entry, const KURL& _url, bool _determineMimeTypeOnDemand, bool _urlIsDirectory ) { m_entry = _entry; diff --git a/kio/kio/kfileitem.h b/kio/kio/kfileitem.h index cf6344669..5e75ac16f 100644 --- a/kio/kio/kfileitem.h +++ b/kio/kio/kfileitem.h @@ -34,7 +34,7 @@ /** * A KFileItem is a generic class to handle a file, local or remote. - * In particular, it makes it easier to handle the result of KIO::listDir + * In particular, it makes it easier to handle the result of TDEIO::listDir * (UDSEntry isn't very friendly to use). * It includes many file attributes such as mimetype, icon, text, mode, link... */ @@ -45,7 +45,7 @@ public: /** * Creates an item representing a file, from a UDSEntry. - * This is the preferred constructor when using KIO::listDir(). + * This is the preferred constructor when using TDEIO::listDir(). * * @param _entry the KIO entry used to get the file, contains info about it * @param _url the file url @@ -54,7 +54,7 @@ public: * @param _urlIsDirectory specifies if the url is just the directory of the * fileitem and the filename from the UDSEntry should be used. */ - KFileItem( const KIO::UDSEntry& _entry, const KURL& _url, + KFileItem( const TDEIO::UDSEntry& _entry, const KURL& _url, bool _determineMimeTypeOnDemand = false, bool _urlIsDirectory = false ); @@ -239,14 +239,14 @@ public: * Returns the size of the file, if known. * @return the file size, or 0 if not known */ - KIO::filesize_t size() const; + TDEIO::filesize_t size() const; /** * Returns the size of the file, if known, and sets @p hasSize to false if not known * @param @hasSize This is set to true if the size is known, and false if not known * @return the file size, or 0 if not known */ - KIO::filesize_t size(bool &hasSize) const; + TDEIO::filesize_t size(bool &hasSize) const; //FIXME KDE4 deprecate this in favor of time(unsigned int which, bool &hasSize) /** @@ -273,7 +273,7 @@ public: * @returns a formatted string of the requested time, TQString::null if time is not known * @see time */ - TQString timeString( unsigned int which = KIO::UDS_MODIFICATION_TIME ) const; + TQString timeString( unsigned int which = TDEIO::UDS_MODIFICATION_TIME ) const; /** * Returns true if the file is a local file. @@ -396,7 +396,7 @@ public: * by position. * @return the UDS entry */ - const KIO::UDSEntry & entry() const { return m_entry; } + const TDEIO::UDSEntry & entry() const { return m_entry; } /** * Used when updating a directory. marked == seen when refreshing. @@ -536,7 +536,7 @@ public: * fileitem and the filename from the UDSEntry should be used. * @since 3.4.1 */ - void setUDSEntry( const KIO::UDSEntry& entry, const KURL& url, + void setUDSEntry( const TDEIO::UDSEntry& entry, const KURL& url, bool determineMimeTypeOnDemand = false, bool urlIsDirectory = false ); @@ -576,7 +576,7 @@ private: /** * We keep a copy of the UDSEntry since we need it for getStatusBarInfo */ - KIO::UDSEntry m_entry; + TDEIO::UDSEntry m_entry; /** * The url of the file */ @@ -643,7 +643,7 @@ private: enum { Modification = 0, Access = 1, Creation = 2, NumFlags = 3 }; mutable time_t m_time[3]; - mutable KIO::filesize_t m_size; + mutable TDEIO::filesize_t m_size; protected: virtual void virtual_hook( int id, void* data ); diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index c345ef89e..0ccbb577b 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -1626,12 +1626,12 @@ TQString KFileMimeTypeInfo::ItemInfo::string(const TQVariant& value, bool mangle else if (unit() == KFileMimeTypeInfo::Bytes) { // convertSize already adds the correct suffix - return KIO::convertSize(value.toInt()); + return TDEIO::convertSize(value.toInt()); } else if (unit() == KFileMimeTypeInfo::KiloBytes) { // convertSizeFromKB already adds the correct suffix - return KIO::convertSizeFromKB(value.toInt()); + return TDEIO::convertSizeFromKB(value.toInt()); } else s = TDEGlobal::locale()->formatNumber( value.toInt() , 0); @@ -1643,9 +1643,9 @@ TQString KFileMimeTypeInfo::ItemInfo::string(const TQVariant& value, bool mangle case TQVariant::ULongLong : if ( unit() == KFileMimeTypeInfo::Bytes ) - return KIO::convertSize( value.toULongLong() ); + return TDEIO::convertSize( value.toULongLong() ); else if ( unit() == KFileMimeTypeInfo::KiloBytes ) - return KIO::convertSizeFromKB( value.toULongLong() ); + return TDEIO::convertSizeFromKB( value.toULongLong() ); else s = TDEGlobal::locale()->formatNumber( value.toULongLong(), 0 ); break; diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp index 75622bf7d..cdbaa8ea3 100644 --- a/kio/kio/kimageio.cpp +++ b/kio/kio/kimageio.cpp @@ -37,7 +37,7 @@ KImageIOFormat::KImageIOFormat( const TQString &path) bLibLoaded = false; mReadFunc = 0; mWriteFunc = 0; - KConfig config(path, true, false); + TDEConfig config(path, true, false); config.setGroup("Image Format"); mType = config.readEntry("Type"); diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index 37867cd23..397fbc9e9 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -533,8 +533,8 @@ TQString KMimeType::favIconForURL( const KURL& url ) static bool check = true; if ( check ) { check = false; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, "HTML Settings" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "HTML Settings" ); useFavIcons = config->readBoolEntry( "EnableFavicon", true ); } @@ -717,7 +717,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const TQString dev = cfg.readEntry( "Dev" ); if ( !icon.isEmpty() && !unmount_icon.isEmpty() && !dev.isEmpty() ) { - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = TDEIO::findDeviceMountPoint( dev ); // Is the device not mounted ? if ( mp.isNull() ) return unmount_icon; @@ -831,7 +831,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf return retval; } - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = TDEIO::findDeviceMountPoint( dev ); // Is the device already mounted ? if ( !mp.isNull() ) { @@ -933,7 +933,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( co } else { - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = TDEIO::findDeviceMountPoint( dev ); // not mounted ? if ( mp.isEmpty() ) { @@ -968,12 +968,12 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices return userDefinedServices( path, cfg, bLocalFiles ); } -TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles ) +TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, TDEConfig& cfg, bool bLocalFiles ) { return userDefinedServices( path, cfg, bLocalFiles, KURL::List() ); } -TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles, const KURL::List & file_list ) +TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, TDEConfig& cfg, bool bLocalFiles, const KURL::List & file_list ) { TQValueList<Service> result; @@ -1114,7 +1114,7 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT KMessageBoxWrapper::error( 0, tmp ); return; } - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = TDEIO::findDeviceMountPoint( dev ); if ( _service.m_type == ST_MOUNT ) { diff --git a/kio/kio/kmimetype.h b/kio/kio/kmimetype.h index b5ffdc9df..1d53f3713 100644 --- a/kio/kio/kmimetype.h +++ b/kio/kio/kmimetype.h @@ -561,11 +561,11 @@ public: static TQValueList<Service> userDefinedServices( const TQString& path, bool bLocalFiles ); /** - * Overload of userDefinedServices for speed purposes: it takes a KConfig* so that + * Overload of userDefinedServices for speed purposes: it takes a TDEConfig* so that * the caller can check things in the file without having it parsed twice. * @since 3.4 */ - static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles ); + static TQValueList<Service> userDefinedServices( const TQString& path, TDEConfig& config, bool bLocalFiles ); /** * Overload of userDefinedServices but also allows you to pass a list of urls for this file. @@ -573,7 +573,7 @@ public: * the X-TDE-GetActionMenu extension. * @since 3.5 */ - static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles, const KURL::List & file_list); + static TQValueList<Service> userDefinedServices( const TQString& path, TDEConfig& config, bool bLocalFiles, const KURL::List & file_list); /** * @param path is the path of the desktop entry. diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp index 0cb010913..b22bbd8dc 100644 --- a/kio/kio/kmimetypechooser.cpp +++ b/kio/kio/kmimetypechooser.cpp @@ -261,7 +261,7 @@ KMimeTypeChooserDialog::KMimeTypeChooserDialog( this, "chooser" ); setMainWidget(m_chooser); - KConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); + TDEConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); TQSize defaultSize( 400, 300 ); resize( group.readSizeEntry("size", &defaultSize) ); } @@ -280,7 +280,7 @@ KMimeTypeChooserDialog::KMimeTypeChooserDialog( this, "chooser" ); setMainWidget(m_chooser); - KConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); + TDEConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); TQSize defaultSize( 400, 300 ); resize( group.readSizeEntry("size", &defaultSize) ); } @@ -288,7 +288,7 @@ KMimeTypeChooserDialog::KMimeTypeChooserDialog( KMimeTypeChooserDialog::~KMimeTypeChooserDialog() { - KConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); + TDEConfigGroup group( TDEGlobal::config(), "KMimeTypeChooserDialog"); group.writeEntry("size", size()); } diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp index f0fdfce6d..394120009 100644 --- a/kio/kio/knfsshare.cpp +++ b/kio/kio/knfsshare.cpp @@ -52,7 +52,7 @@ KNFSSharePrivate::KNFSSharePrivate() * @return wether an 'exports' file was found. **/ bool KNFSSharePrivate::findExportsFile() { - KConfig config("knfsshare"); + TDEConfig config("knfsshare"); config.setGroup("General"); exportsFile = config.readPathEntry("exportsFile"); diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp index 252bdbfbd..a4f8169f5 100644 --- a/kio/kio/kprotocolmanager.cpp +++ b/kio/kio/kprotocolmanager.cpp @@ -44,8 +44,8 @@ public: ~KProtocolManagerPrivate(); - KConfig *config; - KConfig *http_config; + TDEConfig *config; + TDEConfig *http_config; bool init_busy; KURL url; TQString protocol; @@ -80,29 +80,29 @@ void KProtocolManager::reparseConfiguration() kpmpksd.destructObject(); // Force the slave config to re-read its config... - KIO::SlaveConfig::self()->reset (); + TDEIO::SlaveConfig::self()->reset (); } -KConfig *KProtocolManager::config() +TDEConfig *KProtocolManager::config() { if (!d) d = new KProtocolManagerPrivate; if (!d->config) { - d->config = new KConfig("kioslaverc", true, false); + d->config = new TDEConfig("kioslaverc", true, false); } return d->config; } -KConfig *KProtocolManager::http_config() +TDEConfig *KProtocolManager::http_config() { if (!d) d = new KProtocolManagerPrivate; if (!d->http_config) { - d->http_config = new KConfig("kio_httprc", false, false); + d->http_config = new TDEConfig("kio_httprc", false, false); } return d->http_config; } @@ -111,7 +111,7 @@ KConfig *KProtocolManager::http_config() int KProtocolManager::readTimeout() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ReadTimeout", DEFAULT_READ_TIMEOUT ); return QMAX(MIN_TIMEOUT_VALUE, val); @@ -119,7 +119,7 @@ int KProtocolManager::readTimeout() int KProtocolManager::connectTimeout() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ConnectTimeout", DEFAULT_CONNECT_TIMEOUT ); return QMAX(MIN_TIMEOUT_VALUE, val); @@ -127,7 +127,7 @@ int KProtocolManager::connectTimeout() int KProtocolManager::proxyConnectTimeout() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ProxyConnectTimeout", DEFAULT_PROXY_CONNECT_TIMEOUT ); return QMAX(MIN_TIMEOUT_VALUE, val); @@ -135,7 +135,7 @@ int KProtocolManager::proxyConnectTimeout() int KProtocolManager::responseTimeout() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); int val = cfg->readNumEntry( "ResponseTimeout", DEFAULT_RESPONSE_TIMEOUT ); return QMAX(MIN_TIMEOUT_VALUE, val); @@ -150,21 +150,21 @@ bool KProtocolManager::useProxy() bool KProtocolManager::useReverseProxy() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return cfg->readBoolEntry("ReversedException", false); } KProtocolManager::ProxyType KProtocolManager::proxyType() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return static_cast<ProxyType>(cfg->readNumEntry( "ProxyType" )); } KProtocolManager::ProxyAuthMode KProtocolManager::proxyAuthMode() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return static_cast<ProxyAuthMode>(cfg->readNumEntry( "AuthMode" )); } @@ -173,40 +173,40 @@ KProtocolManager::ProxyAuthMode KProtocolManager::proxyAuthMode() bool KProtocolManager::useCache() { - KConfig *cfg = http_config(); + TDEConfig *cfg = http_config(); return cfg->readBoolEntry( "UseCache", true ); } -KIO::CacheControl KProtocolManager::cacheControl() +TDEIO::CacheControl KProtocolManager::cacheControl() { - KConfig *cfg = http_config(); + TDEConfig *cfg = http_config(); TQString tmp = cfg->readEntry("cache"); if (tmp.isEmpty()) return DEFAULT_CACHE_CONTROL; - return KIO::parseCacheControl(tmp); + return TDEIO::parseCacheControl(tmp); } TQString KProtocolManager::cacheDir() { - KConfig *cfg = http_config(); + TDEConfig *cfg = http_config(); return cfg->readPathEntry("CacheDir", TDEGlobal::dirs()->saveLocation("cache","http")); } int KProtocolManager::maxCacheAge() { - KConfig *cfg = http_config(); + TDEConfig *cfg = http_config(); return cfg->readNumEntry( "MaxCacheAge", DEFAULT_MAX_CACHE_AGE ); // 14 days } int KProtocolManager::maxCacheSize() { - KConfig *cfg = http_config(); + TDEConfig *cfg = http_config(); return cfg->readNumEntry( "MaxCacheSize", DEFAULT_MAX_CACHE_SIZE ); // 5 MB } TQString KProtocolManager::noProxyForRaw() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return cfg->readEntry( "NoProxyFor" ); @@ -230,7 +230,7 @@ TQString KProtocolManager::proxyFor( const TQString& protocol ) else if (scheme == "webdavs") scheme = "https"; - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return cfg->readEntry( scheme + "Proxy" ); } @@ -417,11 +417,11 @@ TQString KProtocolManager::slaveProtocol(const KURL &url, TQString &proxy) TQString KProtocolManager::userAgentForHost( const TQString& hostname ) { - TQString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower(); + TQString sendUserAgent = TDEIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower(); if (sendUserAgent == "false") return TQString::null; - TQString useragent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent"); + TQString useragent = TDEIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent"); // Return the default user-agent if none is specified // for the requested host. @@ -433,7 +433,7 @@ TQString KProtocolManager::userAgentForHost( const TQString& hostname ) TQString KProtocolManager::defaultUserAgent( ) { - TQString modifiers = KIO::SlaveConfig::self()->configData("http", TQString::null, "UserAgentKeys"); + TQString modifiers = TDEIO::SlaveConfig::self()->configData("http", TQString::null, "UserAgentKeys"); return defaultUserAgent(modifiers); } @@ -492,14 +492,14 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) bool KProtocolManager::markPartial() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); return cfg->readBoolEntry( "MarkPartial", true ); } int KProtocolManager::minimumKeepSize() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); return cfg->readNumEntry( "MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE ); // 5000 byte @@ -507,28 +507,28 @@ int KProtocolManager::minimumKeepSize() bool KProtocolManager::autoResume() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); return cfg->readBoolEntry( "AutoResume", false ); } bool KProtocolManager::persistentConnections() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); return cfg->readBoolEntry( "PersistentConnections", true ); } bool KProtocolManager::persistentProxyConnection() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( TQString::null ); return cfg->readBoolEntry( "PersistentProxyConnection", false ); } TQString KProtocolManager::proxyConfigScript() { - KConfig *cfg = config(); + TDEConfig *cfg = config(); cfg->setGroup( "Proxy Settings" ); return cfg->readEntry( "Proxy Config Script" ); } diff --git a/kio/kio/kprotocolmanager.h b/kio/kio/kprotocolmanager.h index ec59342af..e1d425ebd 100644 --- a/kio/kio/kprotocolmanager.h +++ b/kio/kio/kprotocolmanager.h @@ -28,7 +28,7 @@ /** @deprecated Use KProtocolManager::defaultUserAgent() instead. */ #define DEFAULT_USERAGENT_STRING "" -class KConfig; +class TDEConfig; /** * Provides information about I/O (Internet, etc.) settings chosen/set @@ -311,7 +311,7 @@ public: * Returns the Cache control directive to be used. * @return the cache control value */ - static KIO::CacheControl cacheControl(); + static TDEIO::CacheControl cacheControl(); /*============================ DOWNLOAD CONFIG ==============================*/ @@ -382,8 +382,8 @@ public: * @internal * (Shared with SlaveConfig) */ - static KConfig *config(); + static TDEConfig *config(); private: - static KConfig *http_config(); + static TDEConfig *http_config(); }; #endif diff --git a/kio/kio/kremoteencoding.h b/kio/kio/kremoteencoding.h index 35191d8e5..6f5eea5fd 100644 --- a/kio/kio/kremoteencoding.h +++ b/kio/kio/kremoteencoding.h @@ -31,11 +31,11 @@ class KRemoteEncodingPrivate; * Certain protocols do not specify an appropriate encoding for decoding * their 8-bit data into proper Unicode forms. Therefore, ioslaves should * use this class in order to convert those forms into QStrings before - * creating the respective KIO::UDSEntry. The same is true for decoding + * creating the respective TDEIO::UDSEntry. The same is true for decoding * URLs to its components. * - * Each KIO::SlaveBase has one object of this kind, even if it is not necessary. - * It can be accessed through KIO::SlaveBase::remoteEncoding. + * Each TDEIO::SlaveBase has one object of this kind, even if it is not necessary. + * It can be accessed through TDEIO::SlaveBase::remoteEncoding. * * @short A class for handling remote filenames * @author Thiago Macieira <thiago.macieira@kdemail.net> diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp index 2f6e9861a..f99f636db 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -476,7 +476,7 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List */ if (_service.terminal()) { - KConfigGroupSaver gs(TDEGlobal::config(), "General"); + TDEConfigGroupSaver gs(TDEGlobal::config(), "General"); TQString terminal = TDEGlobal::config()->readPathEntry("TerminalApplication", "konsole"); if (terminal == "konsole") terminal += " -caption=%c %i %m"; @@ -727,7 +727,7 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" ) { // Maybe we can resolve to a local URL? - KURL localURL = KIO::NetAccess::mostLocalURL( url, 0 ); + KURL localURL = TDEIO::NetAccess::mostLocalURL( url, 0 ); if ( localURL != url ) { *it = localURL; kdDebug(7010) << "Changed to " << localURL << endl; @@ -1003,7 +1003,7 @@ void KRun::init() } if ( !kapp->authorizeURLAction( "open", KURL(), m_strURL)) { - TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, m_strURL.prettyURL()); + TQString msg = TDEIO::buildErrorString(TDEIO::ERR_ACCESS_DENIED, m_strURL.prettyURL()); d->m_showingError = true; KMessageBoxWrapper::error( d->m_window, msg ); d->m_showingError = false; @@ -1119,10 +1119,10 @@ void KRun::init() kdDebug(7010) << "Testing directory (stating)" << endl; // It may be a directory or a file, let's stat - KIO::StatJob *job = KIO::stat( m_strURL, true, 0 /* no details */, m_bProgressInfo ); + TDEIO::StatJob *job = TDEIO::stat( m_strURL, true, 0 /* no details */, m_bProgressInfo ); job->setWindow (d->m_window); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - this, TQT_SLOT( slotStatResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + this, TQT_SLOT( slotStatResult( TDEIO::Job * ) ) ); m_job = job; kdDebug(7010) << " Job " << job << " is about stating " << m_strURL.url() << endl; } @@ -1168,12 +1168,12 @@ void KRun::scanFile() } kdDebug(7010) << this << " Scanning file " << m_strURL.url() << endl; - KIO::TransferJob *job = KIO::get( m_strURL, false /*reload*/, m_bProgressInfo ); + TDEIO::TransferJob *job = TDEIO::get( m_strURL, false /*reload*/, m_bProgressInfo ); job->setWindow (d->m_window); - connect(job, TQT_SIGNAL( result(KIO::Job *)), - this, TQT_SLOT( slotScanFinished(KIO::Job *))); - connect(job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &)), - this, TQT_SLOT( slotScanMimeType(KIO::Job *, const TQString &))); + connect(job, TQT_SIGNAL( result(TDEIO::Job *)), + this, TQT_SLOT( slotScanFinished(TDEIO::Job *))); + connect(job, TQT_SIGNAL( mimetype(TDEIO::Job *, const TQString &)), + this, TQT_SLOT( slotScanMimeType(TDEIO::Job *, const TQString &))); m_job = job; kdDebug(7010) << " Job " << job << " is about getting from " << m_strURL.url() << endl; } @@ -1217,7 +1217,7 @@ void KRun::slotTimeout() } } -void KRun::slotStatResult( KIO::Job * job ) +void KRun::slotStatResult( TDEIO::Job * job ) { m_job = 0L; if (job->error()) @@ -1237,24 +1237,24 @@ void KRun::slotStatResult( KIO::Job * job ) } else { kdDebug(7010) << "Finished" << endl; - if(!dynamic_cast<KIO::StatJob*>(job)) + if(!dynamic_cast<TDEIO::StatJob*>(job)) kdFatal() << "job is a " << typeid(*job).name() << " should be a StatJob" << endl; TQString knownMimeType; - KIO::UDSEntry entry = ((KIO::StatJob*)job)->statResult(); - KIO::UDSEntry::ConstIterator it = entry.begin(); + TDEIO::UDSEntry entry = ((TDEIO::StatJob*)job)->statResult(); + TDEIO::UDSEntry::ConstIterator it = entry.begin(); for( ; it != entry.end(); it++ ) { switch( (*it).m_uds ) { - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: if ( S_ISDIR( (mode_t)((*it).m_long) ) ) m_bIsDirectory = true; // it's a dir else m_bScanFile = true; // it's a file break; - case KIO::UDS_MIME_TYPE: // mimetype already known? (e.g. print:/manager) + case TDEIO::UDS_MIME_TYPE: // mimetype already known? (e.g. print:/manager) knownMimeType = (*it).m_str; break; - case KIO::UDS_LOCAL_PATH: + case TDEIO::UDS_LOCAL_PATH: d->m_localPath = (*it).m_str; break; default: @@ -1277,7 +1277,7 @@ void KRun::slotStatResult( KIO::Job * job ) } } -void KRun::slotScanMimeType( KIO::Job *, const TQString &mimetype ) +void KRun::slotScanMimeType( TDEIO::Job *, const TQString &mimetype ) { if ( mimetype.isEmpty() ) kdWarning(7010) << "KRun::slotScanFinished : MimetypeJob didn't find a mimetype! Probably a kioslave bug." << endl; @@ -1285,7 +1285,7 @@ void KRun::slotScanMimeType( KIO::Job *, const TQString &mimetype ) m_job = 0; } -void KRun::slotScanFinished( KIO::Job *job ) +void KRun::slotScanFinished( TDEIO::Job *job ) { m_job = 0; if (job->error()) @@ -1352,19 +1352,19 @@ void KRun::foundMimeType( const TQString& type ) // We don't know if this is a file or a directory. Let's test this first. // (For instance a tar.gz is a directory contained inside a file) // It may be a directory or a file, let's stat - KIO::StatJob *job = KIO::stat( m_strURL, m_bProgressInfo ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - this, TQT_SLOT( slotStatResult( KIO::Job * ) ) ); + TDEIO::StatJob *job = TDEIO::stat( m_strURL, m_bProgressInfo ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + this, TQT_SLOT( slotStatResult( TDEIO::Job * ) ) ); m_job = job; return; } */ - KIO::TransferJob *job = ::tqqt_cast<KIO::TransferJob *>( m_job ); + TDEIO::TransferJob *job = ::tqqt_cast<TDEIO::TransferJob *>( m_job ); if ( job ) { job->putOnHold(); - KIO::Scheduler::publishSlaveOnHold(); + TDEIO::Scheduler::publishSlaveOnHold(); m_job = 0; } @@ -1440,7 +1440,7 @@ void KRun::abort() void KRun::setEnableExternalBrowser(bool b) { if (b) - d->m_externalBrowser = KConfigGroup(TDEGlobal::config(), "General").readEntry("BrowserApplication"); + d->m_externalBrowser = TDEConfigGroup(TDEGlobal::config(), "General").readEntry("BrowserApplication"); else d->m_externalBrowser = TQString::null; } diff --git a/kio/kio/krun.h b/kio/kio/krun.h index 9e4bf8c44..44bff6dee 100644 --- a/kio/kio/krun.h +++ b/kio/kio/krun.h @@ -32,7 +32,7 @@ class TDEProcess; class KService; -namespace KIO { +namespace TDEIO { class Job; class StatJob; } @@ -77,7 +77,7 @@ public: * * @param showProgressInfo * Whether to show progress information when determining the - * type of the file (i.e. when using KIO::stat and KIO::mimetype) + * type of the file (i.e. when using TDEIO::stat and TDEIO::mimetype) * Before you set this to false to avoid a dialog box, think about * a very slow FTP server... * It is always better to provide progress info in such cases. @@ -104,7 +104,7 @@ public: * * @param showProgressInfo * Whether to show progress information when determining the - * type of the file (i.e. when using KIO::stat and KIO::mimetype) + * type of the file (i.e. when using TDEIO::stat and TDEIO::mimetype) * Before you set this to false to avoid a dialog box, think about * a very slow FTP server... * It is always better to provide progress info in such cases. @@ -401,9 +401,9 @@ signals: protected slots: void slotTimeout(); - void slotScanFinished( KIO::Job * ); - void slotScanMimeType( KIO::Job *, const TQString &type ); - virtual void slotStatResult( KIO::Job * ); + void slotScanFinished( TDEIO::Job * ); + void slotScanMimeType( TDEIO::Job *, const TQString &type ); + virtual void slotStatResult( TDEIO::Job * ); protected: virtual void init(); @@ -424,7 +424,7 @@ protected: bool m_bAutoDelete; bool m_bProgressInfo; bool m_bFinished; - KIO::Job * m_job; + TDEIO::Job * m_job; TQTimer m_timer; /** diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp index 9324f964d..a5216981f 100644 --- a/kio/kio/kservice.cpp +++ b/kio/kio/kservice.cpp @@ -474,7 +474,7 @@ int KService::initialPreferenceForMimeType( const TQString& mimeType ) const return 0; } -class KServiceReadProperty : public KConfigBase +class KServiceReadProperty : public TDEConfigBase { public: KServiceReadProperty(const TQString &_key, const TQCString &_value) @@ -570,7 +570,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const } } - // Then we use a homebuild class based on KConfigBase to convert the TQString. + // Then we use a homebuild class based on TDEConfigBase to convert the TQString. // For some often used property types we do the conversion ourselves. TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name ); if ( (it == m_mapProps.end()) || (!it.data().isValid())) diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp index af69e1765..e85991f82 100644 --- a/kio/kio/kservicegroup.cpp +++ b/kio/kio/kservicegroup.cpp @@ -128,7 +128,7 @@ int KServiceGroup::childCount() { if (m_childCount == -1) { - KConfig global("kdeglobals"); + TDEConfig global("kdeglobals"); global.setGroup("KDE"); bool showUnimportant = global.readBoolEntry("showUnimportant", true); diff --git a/kio/kio/kshred.h b/kio/kio/kshred.h index c38c610ed..c7669122a 100644 --- a/kio/kio/kshred.h +++ b/kio/kio/kshred.h @@ -112,7 +112,7 @@ class KIO_EXPORT_DEPRECATED KShred : public TQObject { // KDE4: remove * Shows progress of the shredding. * @param bytes the number of bytes written to the file */ - void processedSize(KIO::filesize_t bytes); + void processedSize(TDEIO::filesize_t bytes); /** * Shows a message in the progress dialog @@ -139,7 +139,7 @@ class KIO_EXPORT_DEPRECATED KShred : public TQObject { // KDE4: remove /** * @internal for the size of the file */ - KIO::filesize_t fileSize; + TDEIO::filesize_t fileSize; /** * @internal for keeping track of progress diff --git a/kio/kio/ktrader.cpp b/kio/kio/ktrader.cpp index dbe096075..585c6a499 100644 --- a/kio/kio/ktrader.cpp +++ b/kio/kio/ktrader.cpp @@ -29,7 +29,7 @@ template class KStaticDeleter<KTrader>; -using namespace KIO; +using namespace TDEIO; class KTraderSorter { @@ -118,10 +118,10 @@ KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& ParseTreeBase::Ptr prefs; if ( !_constraint.isEmpty() ) - constr = KIO::parseConstraints( _constraint ); + constr = TDEIO::parseConstraints( _constraint ); if ( !_preferences.isEmpty() ) - prefs = KIO::parsePreferences( _preferences ); + prefs = TDEIO::parsePreferences( _preferences ); KServiceTypeProfile::OfferList lst; KTrader::OfferList ret; diff --git a/kio/kio/ktraderparse.cpp b/kio/kio/ktraderparse.cpp index 64d9e449f..627791c00 100644 --- a/kio/kio/ktraderparse.cpp +++ b/kio/kio/ktraderparse.cpp @@ -30,12 +30,12 @@ extern "C" #include "ktraderparsetree.h" #include <kdebug.h> -using namespace KIO; +using namespace TDEIO; static ParseTreeBase::Ptr *pTree = 0; static const char* sCode = 0; -ParseTreeBase::Ptr KIO::parseConstraints( const TQString& _constr ) +ParseTreeBase::Ptr TDEIO::parseConstraints( const TQString& _constr ) { TQCString str = _constr.utf8(); sCode = str.data(); @@ -45,7 +45,7 @@ ParseTreeBase::Ptr KIO::parseConstraints( const TQString& _constr ) return *pTree; } -ParseTreeBase::Ptr KIO::parsePreferences( const TQString& _prefs ) +ParseTreeBase::Ptr TDEIO::parsePreferences( const TQString& _prefs ) { TQCString str = _prefs.utf8(); sCode = str.data(); diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp index 711ec5356..0a04b7918 100644 --- a/kio/kio/ktraderparsetree.cpp +++ b/kio/kio/ktraderparsetree.cpp @@ -19,7 +19,7 @@ #include "ktraderparsetree.h" -namespace KIO { +namespace TDEIO { bool ParseTreeOR::eval( ParseContext *_context ) const { diff --git a/kio/kio/ktraderparsetree.h b/kio/kio/ktraderparsetree.h index 3af4273d0..8cc466abd 100644 --- a/kio/kio/ktraderparsetree.h +++ b/kio/kio/ktraderparsetree.h @@ -31,7 +31,7 @@ #include "ktrader.h" -namespace KIO { +namespace TDEIO { class ParseTreeBase; diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h index cff151cb7..0084129bf 100644 --- a/kio/kio/kurifilter.h +++ b/kio/kio/kurifilter.h @@ -39,7 +39,7 @@ class KURIFilterPrivate; class KURIFilterDataPrivate; -class KCModule; +class TDECModule; /** * A basic message object used for exchanging filtering @@ -410,7 +410,7 @@ public: * * @return A configuration module, 0 if the filter isn't configurable. */ - virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; } + virtual TDECModule *configModule( TQWidget*, const char* ) const { return 0; } /** * Returns the name of the configuration module for the filter. diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp index 0443e0fce..2dc4185cc 100644 --- a/kio/kio/kurlcompletion.cpp +++ b/kio/kio/kurlcompletion.cpp @@ -459,7 +459,7 @@ public: bool replace_home; bool complete_url; // if true completing a URL (i.e. 'prepend' is a URL), otherwise a path - KIO::ListJob *list_job; // kio job to list directories + TDEIO::ListJob *list_job; // kio job to list directories TQString prepend; // text to prepend to listed items TQString compl_text; // text to pass on to KCompletion @@ -519,8 +519,8 @@ void KURLCompletion::init() d->mode = KURLCompletion::FileCompletion; // Read settings - KConfig *c = TDEGlobal::config(); - KConfigGroupSaver cgs( c, "URLCompletion" ); + TDEConfig *c = TDEGlobal::config(); + TDEConfigGroupSaver cgs( c, "URLCompletion" ); d->url_auto_completion = c->readBoolEntry("alwaysAutoComplete", true); d->popup_append_slash = c->readBoolEntry("popupAppendSlash", true); @@ -1226,12 +1226,12 @@ void KURLCompletion::listURLs( * * Receive files listed by KIO and call addMatches() */ -void KURLCompletion::slotEntries(KIO::Job*, const KIO::UDSEntryList& entries) +void KURLCompletion::slotEntries(TDEIO::Job*, const TDEIO::UDSEntryList& entries) { TQStringList matches; - KIO::UDSEntryListConstIterator it = entries.begin(); - KIO::UDSEntryListConstIterator end = entries.end(); + TDEIO::UDSEntryListConstIterator it = entries.begin(); + TDEIO::UDSEntryListConstIterator end = entries.end(); TQString filter = d->list_urls_filter; @@ -1245,21 +1245,21 @@ void KURLCompletion::slotEntries(KIO::Job*, const KIO::UDSEntryList& entries) bool is_exe = false; bool is_dir = false; - KIO::UDSEntry e = *it; - KIO::UDSEntry::ConstIterator it_2 = e.begin(); + TDEIO::UDSEntry e = *it; + TDEIO::UDSEntry::ConstIterator it_2 = e.begin(); for( ; it_2 != e.end(); it_2++ ) { switch ( (*it_2).m_uds ) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: name = (*it_2).m_str; break; - case KIO::UDS_ACCESS: + case TDEIO::UDS_ACCESS: is_exe = ((*it_2).m_long & MODE_EXE) != 0; break; - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: is_dir = ((*it_2).m_long & S_IFDIR) != 0; break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: url = (*it_2).m_str; break; } @@ -1301,7 +1301,7 @@ void KURLCompletion::slotEntries(KIO::Job*, const KIO::UDSEntryList& entries) * Start a new list job if there are still urls in * d->list_urls, otherwise call finished() */ -void KURLCompletion::slotIOFinished( KIO::Job * job ) +void KURLCompletion::slotIOFinished( TDEIO::Job * job ) { // kdDebug() << "slotIOFinished() " << endl; @@ -1322,18 +1322,18 @@ void KURLCompletion::slotIOFinished( KIO::Job * job ) // kdDebug() << "Start KIO: " << kurl->prettyURL() << endl; - d->list_job = KIO::listDir( *kurl, false ); + d->list_job = TDEIO::listDir( *kurl, false ); d->list_job->addMetaData("no-auth-prompt", "true"); assert( d->list_job ); connect( d->list_job, - TQT_SIGNAL(result(KIO::Job*)), - TQT_SLOT(slotIOFinished(KIO::Job*)) ); + TQT_SIGNAL(result(TDEIO::Job*)), + TQT_SLOT(slotIOFinished(TDEIO::Job*)) ); connect( d->list_job, - TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)) ); + TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), + TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&)) ); delete kurl; } diff --git a/kio/kio/kurlcompletion.h b/kio/kio/kurlcompletion.h index 2e042c3bc..62eda9f8d 100644 --- a/kio/kio/kurlcompletion.h +++ b/kio/kio/kurlcompletion.h @@ -176,8 +176,8 @@ protected: virtual void customEvent( TQCustomEvent *e ); protected slots: - void slotEntries( KIO::Job *, const KIO::UDSEntryList& ); - void slotIOFinished( KIO::Job * ); + void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& ); + void slotIOFinished( TDEIO::Job * ); private: diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp index fe07c3ad1..efc4cbae3 100644 --- a/kio/kio/kuserprofile.cpp +++ b/kio/kio/kuserprofile.cpp @@ -53,7 +53,7 @@ void KServiceTypeProfile::initStatic() profileDeleter.setObject(s_lstProfiles, new KServiceTypeProfileList); s_lstProfiles->setAutoDelete( true ); - KConfig config( "profilerc", true, false); + TDEConfig config( "profilerc", true, false); static const TQString & defaultGroup = TDEGlobal::staticQString("<default>"); diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp index 3998584e3..545c841b0 100644 --- a/kio/kio/metainfojob.cpp +++ b/kio/kio/metainfojob.cpp @@ -31,9 +31,9 @@ #include "metainfojob.moc" -using namespace KIO; +using namespace TDEIO; -struct KIO::MetaInfoJobPrivate +struct TDEIO::MetaInfoJobPrivate { KFileItemList items; // all the items we got KFileItemListIterator* currentItem; // argh! No default constructor @@ -42,7 +42,7 @@ struct KIO::MetaInfoJobPrivate }; MetaInfoJob::MetaInfoJob(const KFileItemList &items, bool deleteItems) - : KIO::Job(false /* no GUI */) + : TDEIO::Job(false /* no GUI */) { d = new MetaInfoJobPrivate; d->deleteItems = deleteItems; @@ -113,7 +113,7 @@ void MetaInfoJob::determineNextFile() getMetaInfo(); } -void MetaInfoJob::slotResult( KIO::Job *job ) +void MetaInfoJob::slotResult( TDEIO::Job *job ) { subjobs.remove(job); Q_ASSERT(subjobs.isEmpty()); // We should have only one job at a time ... @@ -129,17 +129,17 @@ void MetaInfoJob::getMetaInfo() URL.setProtocol("metainfo"); URL.setPath(d->currentItem->current()->url().path()); - KIO::TransferJob* job = KIO::get(URL, false, false); + TDEIO::TransferJob* job = TDEIO::get(URL, false, false); addSubjob(job); - connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), - this, TQT_SLOT(slotMetaInfo(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotMetaInfo(TDEIO::Job *, const TQByteArray &))); job->addMetaData("mimeType", d->currentItem->current()->mimetype()); } -void MetaInfoJob::slotMetaInfo(KIO::Job*, const TQByteArray &data) +void MetaInfoJob::slotMetaInfo(TDEIO::Job*, const TQByteArray &data) { KFileMetaInfo info; TQDataStream s(data, IO_ReadOnly); @@ -169,12 +169,12 @@ TQStringList MetaInfoJob::supportedMimeTypes() return result; } -KIO_EXPORT MetaInfoJob *KIO::fileMetaInfo( const KFileItemList &items) +KIO_EXPORT MetaInfoJob *TDEIO::fileMetaInfo( const KFileItemList &items) { return new MetaInfoJob(items, false); } -KIO_EXPORT MetaInfoJob *KIO::fileMetaInfo( const KURL::List &items) +KIO_EXPORT MetaInfoJob *TDEIO::fileMetaInfo( const KURL::List &items) { KFileItemList fileItems; for (KURL::List::ConstIterator it = items.begin(); it != items.end(); ++it) diff --git a/kio/kio/metainfojob.h b/kio/kio/metainfojob.h index 3b96713fb..0f7d485b3 100644 --- a/kio/kio/metainfojob.h +++ b/kio/kio/metainfojob.h @@ -25,14 +25,14 @@ #include <kio/job.h> #include <kfileitem.h> -namespace KIO { +namespace TDEIO { /** * MetaInfoJob is a KIO Job to retrieve meta information from files. * * @short KIO Job to retrieve meta information from files. * @since 3.1 */ - class KIO_EXPORT MetaInfoJob : public KIO::Job + class KIO_EXPORT MetaInfoJob : public TDEIO::Job { Q_OBJECT public: @@ -85,11 +85,11 @@ namespace KIO { void getMetaInfo(); protected slots: - virtual void slotResult( KIO::Job *job ); + virtual void slotResult( TDEIO::Job *job ); private slots: void start(); - void slotMetaInfo(KIO::Job *, const TQByteArray &); + void slotMetaInfo(TDEIO::Job *, const TQByteArray &); private: void determineNextFile(); diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index a7ddb3987..11c20be49 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -43,7 +43,7 @@ #include "kio/netaccess.h" -using namespace KIO; +using namespace TDEIO; TQString * NetAccess::lastErrorMsg; int NetAccess::lastErrorCode = 0; @@ -190,12 +190,12 @@ bool NetAccess::exists( const KURL & url, bool source, TQWidget* window ) return kioNet.statInternal( url, 0 /*no details*/, source, window ); } -bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry ) +bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry ) { return NetAccess::stat( url, entry, 0 ); } -bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, TQWidget* window ) +bool NetAccess::stat( const KURL & url, TDEIO::UDSEntry & entry, TQWidget* window ) { NetAccess kioNet; bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window ); @@ -211,7 +211,7 @@ KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window) return url; } - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; if (!stat(url, entry, window)) { return url; @@ -219,12 +219,12 @@ KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window) TQString path; - // Extract the local path from the KIO::UDSEntry - KIO::UDSEntry::ConstIterator it = entry.begin(); - const KIO::UDSEntry::ConstIterator end = entry.end(); + // Extract the local path from the TDEIO::UDSEntry + TDEIO::UDSEntry::ConstIterator it = entry.begin(); + const TDEIO::UDSEntry::ConstIterator end = entry.end(); for ( ; it != end; ++it ) { - if ( (*it).m_uds == KIO::UDS_LOCAL_PATH ) + if ( (*it).m_uds == TDEIO::UDS_LOCAL_PATH ) { path = (*it).m_str; break; @@ -305,13 +305,13 @@ bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permis { bJobOK = true; // success unless further error occurs - KIO::Scheduler::checkSlaveOnHold(true); - KIO::Job * job = move - ? KIO::file_move( src, target, permissions, overwrite, resume ) - : KIO::file_copy( src, target, permissions, overwrite, resume ); + TDEIO::Scheduler::checkSlaveOnHold(true); + TDEIO::Job * job = move + ? TDEIO::file_move( src, target, permissions, overwrite, resume ) + : TDEIO::file_copy( src, target, permissions, overwrite, resume ); job->setWindow (window); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); return bJobOK; @@ -322,12 +322,12 @@ bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target, { bJobOK = true; // success unless further error occurs - KIO::Job * job = move - ? KIO::move( src, target ) - : KIO::copy( src, target ); + TDEIO::Job * job = move + ? TDEIO::move( src, target ) + : TDEIO::copy( src, target ); job->setWindow (window); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); return bJobOK; @@ -337,12 +337,12 @@ bool NetAccess::statInternal( const KURL & url, int details, bool source, TQWidget* window ) { bJobOK = true; // success unless further error occurs - KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() && !url.url().startsWith("beagle:?") ); + TDEIO::StatJob * job = TDEIO::stat( url, !url.isLocalFile() && !url.url().startsWith("beagle:?") ); job->setWindow (window); job->setDetails( details ); job->setSide( source ); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); return bJobOK; } @@ -350,10 +350,10 @@ bool NetAccess::statInternal( const KURL & url, int details, bool source, bool NetAccess::delInternal( const KURL & url, TQWidget* window ) { bJobOK = true; // success unless further error occurs - KIO::Job * job = KIO::del( url ); + TDEIO::Job * job = TDEIO::del( url ); job->setWindow (window); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); return bJobOK; } @@ -362,10 +362,10 @@ bool NetAccess::mkdirInternal( const KURL & url, int permissions, TQWidget* window ) { bJobOK = true; // success unless further error occurs - KIO::Job * job = KIO::mkdir( url, permissions ); + TDEIO::Job * job = TDEIO::mkdir( url, permissions ); job->setWindow (window); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); return bJobOK; } @@ -374,17 +374,17 @@ TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window ) { bJobOK = true; // success unless further error occurs m_mimetype = TQString::fromLatin1("unknown"); - KIO::Job * job = KIO::mimetype( url ); + TDEIO::Job * job = TDEIO::mimetype( url ); job->setWindow (window); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); - connect( job, TQT_SIGNAL( mimetype (KIO::Job *, const TQString &) ), - this, TQT_SLOT( slotMimetype (KIO::Job *, const TQString &) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); + connect( job, TQT_SIGNAL( mimetype (TDEIO::Job *, const TQString &) ), + this, TQT_SLOT( slotMimetype (TDEIO::Job *, const TQString &) ) ); enter_loop(); return m_mimetype; } -void NetAccess::slotMimetype( KIO::Job *, const TQString & type ) +void NetAccess::slotMimetype( TDEIO::Job *, const TQString & type ) { m_mimetype = type; } @@ -412,13 +412,13 @@ TQString NetAccess::fish_executeInternal(const KURL & url, const TQString comman stream << int('X') << tempPathUrl << command; - KIO::Job * job = KIO::special( tempPathUrl, packedArgs, true ); + TDEIO::Job * job = TDEIO::special( tempPathUrl, packedArgs, true ); job->setWindow( window ); - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); enter_loop(); - // since the KIO::special does not provide feedback we need to download the result + // since the TDEIO::special does not provide feedback we need to download the result if( NetAccess::download( tempPathUrl, target, window ) ) { TQFile resultFile( target ); @@ -459,21 +459,21 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* } } - connect( job, TQT_SIGNAL( result (KIO::Job *) ), - this, TQT_SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (TDEIO::Job *) ), + this, TQT_SLOT( slotResult (TDEIO::Job *) ) ); TQMetaObject *meta = job->metaObject(); - static const char dataSignal[] = "data(KIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)"; + static const char dataSignal[] = "data(TDEIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)"; if ( meta->findSignal( dataSignal ) != -1 ) { - connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)), - this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) ); + connect( job, TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray&)), + this, TQT_SLOT(slotData(TDEIO::Job*,const TQByteArray&)) ); } - static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)"; + static const char redirSignal[] = "redirection(TDEIO::Job*,const KURL&)"; if ( meta->findSignal( redirSignal ) != -1 ) { - connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)), - this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) ); + connect( job, TQT_SIGNAL(redirection(TDEIO::Job*,const KURL&)), + this, TQT_SLOT(slotRedirection(TDEIO::Job*, const KURL&)) ); } enter_loop(); @@ -499,7 +499,7 @@ void NetAccess::enter_loop() tqt_leave_modal(&dummy); } -void NetAccess::slotResult( KIO::Job * job ) +void NetAccess::slotResult( TDEIO::Job * job ) { lastErrorCode = job->error(); bJobOK = !job->error(); @@ -509,8 +509,8 @@ void NetAccess::slotResult( KIO::Job * job ) lastErrorMsg = new TQString; *lastErrorMsg = job->errorString(); } - if ( job->isA("KIO::StatJob") ) - m_entry = static_cast<KIO::StatJob *>(job)->statResult(); + if ( job->isA("TDEIO::StatJob") ) + m_entry = static_cast<TDEIO::StatJob *>(job)->statResult(); if ( m_metaData ) *m_metaData = job->metaData(); @@ -518,7 +518,7 @@ void NetAccess::slotResult( KIO::Job * job ) tqApp->exit_loop(); } -void NetAccess::slotData( KIO::Job*, const TQByteArray& data ) +void NetAccess::slotData( TDEIO::Job*, const TQByteArray& data ) { if ( data.isEmpty() ) return; @@ -528,7 +528,7 @@ void NetAccess::slotData( KIO::Job*, const TQByteArray& data ) std::memcpy( m_data.data() + offset, data.data(), data.size() ); } -void NetAccess::slotRedirection( KIO::Job*, const KURL& url ) +void NetAccess::slotRedirection( TDEIO::Job*, const KURL& url ) { m_url = url; } diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h index 110c18053..ba8988dfc 100644 --- a/kio/kio/netaccess.h +++ b/kio/kio/netaccess.h @@ -32,7 +32,7 @@ class TQWidget; class KURL; template<typename T, typename K> class TQMap; -namespace KIO { +namespace TDEIO { class Job; @@ -40,9 +40,9 @@ namespace KIO { * Net Transparency. * * NetAccess allows you to do simple file operation (load, save, - * copy, delete...) without working with KIO::Job directly. - * Whereas a KIO::Job is asynchronous, meaning that the - * developer has to connect slots for it, KIO::NetAccess provides + * copy, delete...) without working with TDEIO::Job directly. + * Whereas a TDEIO::Job is asynchronous, meaning that the + * developer has to connect slots for it, TDEIO::NetAccess provides * synchronous downloads and uploads, as well as temporary file * creation and removal. The functions appear to be blocking, * but the Qt event loop continues running while the operations @@ -83,12 +83,12 @@ public: * * \code * TQString tmpFile; - * if( KIO::NetAccess::download( u, tmpFile, window ) ) + * if( TDEIO::NetAccess::download( u, tmpFile, window ) ) * { * loadFile( tmpFile ); - * KIO::NetAccess::removeTempFile( tmpFile ); + * TDEIO::NetAccess::removeTempFile( tmpFile ); * } else { - * KMessageBox::error(this, KIO::NetAccess::lastErrorString() ); + * KMessageBox::error(this, TDEIO::NetAccess::lastErrorString() ); * } * \endcode * @@ -123,7 +123,7 @@ public: /** * Removes the specified file if and only if it was created - * by KIO::NetAccess as a temporary file for a former download. + * by TDEIO::NetAccess as a temporary file for a former download. * * Note: This means that if you created your temporary with KTempFile, * use KTempFile::unlink() or KTempFile::setAutoDelete() to have @@ -165,7 +165,7 @@ public: * Overwrite is false, so this will fail if @p target exists. * * This one takes two URLs and is a direct equivalent - * of KIO::file_copy (not KIO::copy!). + * of TDEIO::file_copy (not TDEIO::copy!). * It will be renamed file_copy in KDE4, so better use file_copy. * * @param src URL Referencing the file to upload. @@ -188,13 +188,13 @@ public: // KDE4: merge with above /** - * Full-fledged equivalent of KIO::file_copy + * Full-fledged equivalent of TDEIO::file_copy */ static bool file_copy( const KURL& src, const KURL& dest, int permissions=-1, bool overwrite=false, bool resume=false, TQWidget* window = 0L ); /** - * Full-fledged equivalent of KIO::file_move. + * Full-fledged equivalent of TDEIO::file_move. * Moves or renames *one file*. * @since 3.2 */ @@ -207,7 +207,7 @@ public: * Overwrite is false, so this will fail if @p target exists. * * This one takes two URLs and is a direct equivalent - * of KIO::copy!. + * of TDEIO::copy!. * This means that it can copy files and directories alike * (it should have been named copy()). * @@ -234,14 +234,14 @@ public: static bool dircopy( const KURL::List& src, const KURL& target, TQWidget* window = 0L ); /** - * Full-fledged equivalent of KIO::move. + * Full-fledged equivalent of TDEIO::move. * Moves or renames one file or directory. * @since 3.2 */ static bool move( const KURL& src, const KURL& target, TQWidget* window = 0L ); /** - * Full-fledged equivalent of KIO::move. + * Full-fledged equivalent of TDEIO::move. * Moves or renames a list of files or directories. * @since 3.2 */ @@ -253,7 +253,7 @@ public: * @param url the URL we are testing * @param source if true, we want to read from that URL. * If false, we want to write to it. - * IMPORTANT: see documentation for KIO::stat for more details about this. + * IMPORTANT: see documentation for TDEIO::stat for more details about this. * @param window main window associated with this job. This is used to * automatically cache and discard authentication information * as needed. If NULL, authentication information will be @@ -284,7 +284,7 @@ public: /** * Tests whether a URL exists and return information on it. * - * This is a convenience function for KIO::stat + * This is a convenience function for TDEIO::stat * (it saves creating a slot and testing for the job result). * * @param url The URL we are testing. @@ -297,17 +297,17 @@ public: * again be prompted for passwords as needed. * @return true if successful, false for failure */ - static bool stat(const KURL& url, KIO::UDSEntry & entry, TQWidget* window); + static bool stat(const KURL& url, TDEIO::UDSEntry & entry, TQWidget* window); /** * @deprecated. Use the function above instead. */ - static bool stat(const KURL& url, KIO::UDSEntry & entry) KDE_DEPRECATED; + static bool stat(const KURL& url, TDEIO::UDSEntry & entry) KDE_DEPRECATED; /** * Tries to map a local URL for the given URL. * - * This is a convenience function for KIO::stat + parsing the + * This is a convenience function for TDEIO::stat + parsing the * resulting UDSEntry. * * @param url The URL we are testing. @@ -325,7 +325,7 @@ public: /** * Deletes a file or a directory in a synchronous way. * - * This is a convenience function for KIO::del + * This is a convenience function for TDEIO::del * (it saves creating a slot and testing for the job result). * * @param url The file or directory to delete. @@ -349,7 +349,7 @@ public: /** * Creates a directory in a synchronous way. * - * This is a convenience function for @p KIO::mkdir + * This is a convenience function for @p TDEIO::mkdir * (it saves creating a slot and testing for the job result). * * @param url The directory to create. @@ -397,7 +397,7 @@ public: * and after the function returns it will contain all the data fetched by this job. * * <code> - * KIO::Job *job = KIO::get( url, false, false ); + * TDEIO::Job *job = TDEIO::get( url, false, false ); * TQMap<TQString, TQString> metaData; * metaData.insert( "PropagateHttpHeader", "true" ); * if ( NetAccess::synchronousRun( job, 0, &data, &url, &metaData ) ) { @@ -435,7 +435,7 @@ public: * * Determines the mimetype of a given URL. * - * This is a convenience function for KIO::mimetype. You + * This is a convenience function for TDEIO::mimetype. You * should call this only when really necessary. * KMimeType::findByURL can determine extension a lot faster, but * less reliably for remote files. Only when findByURL() returns @@ -514,10 +514,10 @@ private: friend class I_like_this_class; private slots: - void slotResult( KIO::Job * job ); - void slotMimetype( KIO::Job * job, const TQString & type ); - void slotData( KIO::Job*, const TQByteArray& ); - void slotRedirection( KIO::Job*, const KURL& ); + void slotResult( TDEIO::Job * job ); + void slotMimetype( TDEIO::Job * job, const TQString & type ); + void slotData( TDEIO::Job*, const TQByteArray& ); + void slotRedirection( TDEIO::Job*, const KURL& ); private: UDSEntry m_entry; diff --git a/kio/kio/observer.cpp b/kio/kio/observer.cpp index 599703f9b..347db9df9 100644 --- a/kio/kio/observer.cpp +++ b/kio/kio/observer.cpp @@ -41,15 +41,15 @@ #include <ksslcertchain.h> #include <klocale.h> -using namespace KIO; +using namespace TDEIO; -template class TQIntDict<KIO::Job>; +template class TQIntDict<TDEIO::Job>; Observer * Observer::s_pObserver = 0L; const int KDEBUG_OBSERVER = 7007; // Should be 7028 -Observer::Observer() : DCOPObject("KIO::Observer") +Observer::Observer() : DCOPObject("TDEIO::Observer") { // Register app as able to receive DCOP messages if (kapp && !kapp->dcopClient()->isAttached()) @@ -78,7 +78,7 @@ Observer::Observer() : DCOPObject("KIO::Observer") m_uiserver = new UIServer_stub( "kio_uiserver", "UIServer" ); } -int Observer::newJob( KIO::Job * job, bool showProgress ) +int Observer::newJob( TDEIO::Job * job, bool showProgress ) { // Tell the UI Server about this new job, and give it the application id // at the same time @@ -98,7 +98,7 @@ void Observer::jobFinished( int progressId ) void Observer::killJob( int progressId ) { - KIO::Job * job = m_dctJobs[ progressId ]; + TDEIO::Job * job = m_dctJobs[ progressId ]; if (!job) { kdWarning() << "Can't find job to kill ! There is no job with progressId=" << progressId << " in this process" << endl; @@ -109,111 +109,111 @@ void Observer::killJob( int progressId ) MetaData Observer::metadata( int progressId ) { - KIO::Job * job = m_dctJobs[ progressId ]; + TDEIO::Job * job = m_dctJobs[ progressId ]; assert(job); return job->metaData(); } -void Observer::slotTotalSize( KIO::Job* job, KIO::filesize_t size ) +void Observer::slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalSize " << job << " " << KIO::number(size) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalSize " << job << " " << TDEIO::number(size) << endl; m_uiserver->totalSize64( job->progressId(), size ); } -void Observer::slotTotalFiles( KIO::Job* job, unsigned long files ) +void Observer::slotTotalFiles( TDEIO::Job* job, unsigned long files ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalFiles " << job << " " << files << endl; m_uiserver->totalFiles( job->progressId(), files ); } -void Observer::slotTotalDirs( KIO::Job* job, unsigned long dirs ) +void Observer::slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalDirs " << job << " " << dirs << endl; m_uiserver->totalDirs( job->progressId(), dirs ); } -void Observer::slotProcessedSize( KIO::Job* job, KIO::filesize_t size ) +void Observer::slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t size ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedSize " << job << " " << job->progressId() << " " << KIO::number(size) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedSize " << job << " " << job->progressId() << " " << TDEIO::number(size) << endl; m_uiserver->processedSize64( job->progressId(), size ); } -void Observer::slotProcessedFiles( KIO::Job* job, unsigned long files ) +void Observer::slotProcessedFiles( TDEIO::Job* job, unsigned long files ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedFiles " << job << " " << files << endl; m_uiserver->processedFiles( job->progressId(), files ); } -void Observer::slotProcessedDirs( KIO::Job* job, unsigned long dirs ) +void Observer::slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedDirs " << job << " " << dirs << endl; m_uiserver->processedDirs( job->progressId(), dirs ); } -void Observer::slotSpeed( KIO::Job* job, unsigned long speed ) +void Observer::slotSpeed( TDEIO::Job* job, unsigned long speed ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotSpeed " << job << " " << speed << endl; m_uiserver->speed( job->progressId(), speed ); } -void Observer::slotPercent( KIO::Job* job, unsigned long percent ) +void Observer::slotPercent( TDEIO::Job* job, unsigned long percent ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotPercent " << job << " " << percent << endl; m_uiserver->percent( job->progressId(), percent ); } -void Observer::slotInfoMessage( KIO::Job* job, const TQString & msg ) +void Observer::slotInfoMessage( TDEIO::Job* job, const TQString & msg ) { m_uiserver->infoMessage( job->progressId(), msg ); } -void Observer::slotCopying( KIO::Job* job, const KURL& from, const KURL& to ) +void Observer::slotCopying( TDEIO::Job* job, const KURL& from, const KURL& to ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCopying " << job << " " << from.url() << " " << to.url() << endl; m_uiserver->copying( job->progressId(), from, to ); } -void Observer::slotMoving( KIO::Job* job, const KURL& from, const KURL& to ) +void Observer::slotMoving( TDEIO::Job* job, const KURL& from, const KURL& to ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotMoving " << job << " " << from.url() << " " << to.url() << endl; m_uiserver->moving( job->progressId(), from, to ); } -void Observer::slotDeleting( KIO::Job* job, const KURL& url ) +void Observer::slotDeleting( TDEIO::Job* job, const KURL& url ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotDeleting " << job << " " << url.url() << endl; m_uiserver->deleting( job->progressId(), url ); } -void Observer::slotTransferring( KIO::Job* job, const KURL& url ) +void Observer::slotTransferring( TDEIO::Job* job, const KURL& url ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTransferring " << job << " " << url.url() << endl; m_uiserver->transferring( job->progressId(), url ); } -void Observer::slotCreatingDir( KIO::Job* job, const KURL& dir ) +void Observer::slotCreatingDir( TDEIO::Job* job, const KURL& dir ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCreatingDir " << job << " " << dir.url() << endl; m_uiserver->creatingDir( job->progressId(), dir ); } -void Observer::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) +void Observer::slotCanResume( TDEIO::Job* job, TDEIO::filesize_t offset ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCanResume " << job << " " << KIO::number(offset) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCanResume " << job << " " << TDEIO::number(offset) << endl; m_uiserver->canResume64( job->progressId(), offset ); } -void Observer::stating( KIO::Job* job, const KURL& url ) +void Observer::stating( TDEIO::Job* job, const KURL& url ) { m_uiserver->stating( job->progressId(), url ); } -void Observer::mounting( KIO::Job* job, const TQString & dev, const TQString & point ) +void Observer::mounting( TDEIO::Job* job, const TQString & dev, const TQString & point ) { m_uiserver->mounting( job->progressId(), dev, point ); } -void Observer::unmounting( KIO::Job* job, const TQString & point ) +void Observer::unmounting( TDEIO::Job* job, const TQString & point ) { m_uiserver->unmounting( job->progressId(), point ); } @@ -235,11 +235,11 @@ bool Observer::openPassDlg( const TQString& prompt, TQString& user, return result; } -bool Observer::openPassDlg( KIO::AuthInfo& info ) +bool Observer::openPassDlg( TDEIO::AuthInfo& info ) { kdDebug(KDEBUG_OBSERVER) << "Observer::openPassDlg: User= " << info.username << ", Message= " << info.prompt << endl; - int result = KIO::PasswordDialog::getNameAndPassword( info.username, info.password, + int result = TDEIO::PasswordDialog::getNameAndPassword( info.username, info.password, &info.keepPassword, info.prompt, info.readOnly, info.caption, info.comment, info.commentLabel ); @@ -264,39 +264,39 @@ int Observer::messageBox( int progressId, int type, const TQString &text, { kdDebug() << "Observer::messageBox " << type << " " << text << " - " << caption << endl; int result = -1; - KConfig *config = new KConfig("kioslaverc"); + TDEConfig *config = new TDEConfig("kioslaverc"); KMessageBox::setDontShowAskAgainConfig(config); switch (type) { - case KIO::SlaveBase::QuestionYesNo: + case TDEIO::SlaveBase::QuestionYesNo: result = KMessageBox::questionYesNo( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::WarningYesNo: + case TDEIO::SlaveBase::WarningYesNo: result = KMessageBox::warningYesNo( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::WarningContinueCancel: + case TDEIO::SlaveBase::WarningContinueCancel: result = KMessageBox::warningContinueCancel( 0L, // parent ? text, caption, buttonYes, dontAskAgainName ); break; - case KIO::SlaveBase::WarningYesNoCancel: + case TDEIO::SlaveBase::WarningYesNoCancel: result = KMessageBox::warningYesNoCancel( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::Information: + case TDEIO::SlaveBase::Information: KMessageBox::information( 0L, // parent ? text, caption, dontAskAgainName ); result = 1; // whatever break; - case KIO::SlaveBase::SSLMessageBox: + case TDEIO::SlaveBase::SSLMessageBox: { TQCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp - // Contact the object "KIO::Observer" in the application <appId> + // Contact the object "TDEIO::Observer" in the application <appId> // Yes, this could be the same application we are, but not necessarily. - Observer_stub observer( observerAppId, "KIO::Observer" ); + Observer_stub observer( observerAppId, "TDEIO::Observer" ); - KIO::MetaData meta = observer.metadata( progressId ); + TDEIO::MetaData meta = observer.metadata( progressId ); KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); if (x) { @@ -367,12 +367,12 @@ int Observer::messageBox( int progressId, int type, const TQString &text, #endif } -RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, +RenameDlg_Result Observer::open_RenameDlg( TDEIO::Job* job, const TQString & caption, const TQString& src, const TQString & dest, RenameDlg_Mode mode, TQString& newDest, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, time_t ctimeSrc, time_t ctimeDest, time_t mtimeSrc, @@ -387,7 +387,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, m_uiserver->setJobVisible( job->progressId(), false ); // We now do it in process => KDE4: move this code out of Observer (back to job.cpp), so that // opening the rename dialog doesn't start uiserver for nothing if progressId=0 (e.g. F2 in konq) - RenameDlg_Result res = KIO::open_RenameDlg( caption, src, dest, mode, + RenameDlg_Result res = TDEIO::open_RenameDlg( caption, src, dest, mode, newDest, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest ); @@ -396,7 +396,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, return res; } -SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job, +SkipDlg_Result Observer::open_SkipDlg( TDEIO::Job* job, bool _multi, const TQString& _error_text ) { @@ -404,8 +404,8 @@ SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job, // Hide existing dialog box if any if (job && job->progressId()) m_uiserver->setJobVisible( job->progressId(), false ); - // We now do it in process. So this method is a useless wrapper around KIO::open_RenameDlg. - SkipDlg_Result res = KIO::open_SkipDlg( _multi, _error_text ); + // We now do it in process. So this method is a useless wrapper around TDEIO::open_RenameDlg. + SkipDlg_Result res = TDEIO::open_SkipDlg( _multi, _error_text ); if (job && job->progressId()) m_uiserver->setJobVisible( job->progressId(), true ); return res; diff --git a/kio/kio/observer.h b/kio/kio/observer.h index 94b8cede9..8c20e6f92 100644 --- a/kio/kio/observer.h +++ b/kio/kio/observer.h @@ -32,12 +32,12 @@ class UIServer_stub; class KURL; -namespace KIO { +namespace TDEIO { class Job; } /** - * Observer for KIO::Job progress information. + * Observer for TDEIO::Job progress information. * * This class, of which there is always only one instance, * "observes" what jobs do and forwards this information @@ -47,9 +47,9 @@ namespace KIO { * kill method when the user presses Cancel. * * Usually jobs are automatically registered by the - * KIO::Scheduler, so you do not have to care about that. + * TDEIO::Scheduler, so you do not have to care about that. * - * @short Observer for KIO::Job progress information + * @short Observer for TDEIO::Job progress information * @author David Faure <faure@kde.org> */ class KIO_EXPORT Observer : public TQObject, public DCOPObject { @@ -75,7 +75,7 @@ public: * @param showProgress true to show progress, false otherwise * @return the progress ID assigned by the UI Server to the Job. */ - int newJob( KIO::Job * job, bool showProgress ); + int newJob( TDEIO::Job * job, bool showProgress ); /** * Called by the job destructor, to tell the UI Server that @@ -85,7 +85,7 @@ public: void jobFinished( int progressId ); /** - * @deprecated use KIO::AutoInfo + * @deprecated use TDEIO::AutoInfo */ bool openPassDlg( const TQString& prompt, TQString& user, TQString& pass, bool readOnly ); @@ -95,10 +95,10 @@ public: * @param info the authentication information * @return true if successful ("ok" clicked), false otherwise */ - bool openPassDlg( KIO::AuthInfo& info ); + bool openPassDlg( TDEIO::AuthInfo& info ); /** - * Popup a message box. See KIO::SlaveBase. + * Popup a message box. See TDEIO::SlaveBase. * This doesn't use DCOP anymore, it shows the dialog in the application's process. * Otherwise, other apps would block when trying to communicate with UIServer. * @param progressId the progress ID of the job, as returned by newJob() @@ -112,7 +112,7 @@ public: const TQString &buttonYes, const TQString &buttonNo ); /** - * Popup a message box. See KIO::SlaveBase. + * Popup a message box. See TDEIO::SlaveBase. * This doesn't use DCOP anymore, it shows the dialog in the application's process. * Otherwise, other apps would block when trying to communicate with UIServer. * @param progressId the progress ID of the job, as returned by newJob() @@ -132,13 +132,13 @@ public: * @internal * See renamedlg.h */ - KIO::RenameDlg_Result open_RenameDlg( KIO::Job * job, + TDEIO::RenameDlg_Result open_RenameDlg( TDEIO::Job * job, const TQString & caption, const TQString& src, const TQString & dest, - KIO::RenameDlg_Mode mode, + TDEIO::RenameDlg_Mode mode, TQString& newDest, - KIO::filesize_t sizeSrc = (KIO::filesize_t) -1, - KIO::filesize_t sizeDest = (KIO::filesize_t) -1, + TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, + TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, time_t ctimeSrc = (time_t) -1, time_t ctimeDest = (time_t) -1, time_t mtimeSrc = (time_t) -1, @@ -149,7 +149,7 @@ public: * @internal * See skipdlg.h */ - KIO::SkipDlg_Result open_SkipDlg( KIO::Job * job, + TDEIO::SkipDlg_Result open_SkipDlg( TDEIO::Job * job, bool multi, const TQString & error_text ); @@ -164,7 +164,7 @@ k_dcop: * Called by the UI Server (using DCOP) to get all the metadata of the job * @param progressId the progress IDof the job, as returned by newJob() */ - KIO::MetaData metadata( int progressId ); + TDEIO::MetaData metadata( int progressId ); protected: @@ -174,35 +174,35 @@ protected: UIServer_stub * m_uiserver; - TQIntDict< KIO::Job > m_dctJobs; + TQIntDict< TDEIO::Job > m_dctJobs; public slots: - void slotTotalSize( KIO::Job*, KIO::filesize_t size ); - void slotTotalFiles( KIO::Job*, unsigned long files ); - void slotTotalDirs( KIO::Job*, unsigned long dirs ); + void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ); + void slotTotalFiles( TDEIO::Job*, unsigned long files ); + void slotTotalDirs( TDEIO::Job*, unsigned long dirs ); - void slotProcessedSize( KIO::Job*, KIO::filesize_t size ); - void slotProcessedFiles( KIO::Job*, unsigned long files ); - void slotProcessedDirs( KIO::Job*, unsigned long dirs ); + void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t size ); + void slotProcessedFiles( TDEIO::Job*, unsigned long files ); + void slotProcessedDirs( TDEIO::Job*, unsigned long dirs ); - void slotSpeed( KIO::Job*, unsigned long speed ); - void slotPercent( KIO::Job*, unsigned long percent ); - void slotInfoMessage( KIO::Job*, const TQString & msg ); + void slotSpeed( TDEIO::Job*, unsigned long speed ); + void slotPercent( TDEIO::Job*, unsigned long percent ); + void slotInfoMessage( TDEIO::Job*, const TQString & msg ); - void slotCopying( KIO::Job*, const KURL& from, const KURL& to ); - void slotMoving( KIO::Job*, const KURL& from, const KURL& to ); - void slotDeleting( KIO::Job*, const KURL& url ); + void slotCopying( TDEIO::Job*, const KURL& from, const KURL& to ); + void slotMoving( TDEIO::Job*, const KURL& from, const KURL& to ); + void slotDeleting( TDEIO::Job*, const KURL& url ); /// @since 3.1 - void slotTransferring( KIO::Job*, const KURL& url ); - void slotCreatingDir( KIO::Job*, const KURL& dir ); + void slotTransferring( TDEIO::Job*, const KURL& url ); + void slotCreatingDir( TDEIO::Job*, const KURL& dir ); // currently unused - void slotCanResume( KIO::Job*, KIO::filesize_t offset ); + void slotCanResume( TDEIO::Job*, TDEIO::filesize_t offset ); public: - void stating( KIO::Job*, const KURL& url ); - void mounting( KIO::Job*, const TQString & dev, const TQString & point ); - void unmounting( KIO::Job*, const TQString & point ); + void stating( TDEIO::Job*, const KURL& url ); + void mounting( TDEIO::Job*, const TQString & dev, const TQString & point ); + void unmounting( TDEIO::Job*, const TQString & point ); protected: virtual void virtual_hook( int id, void* data ); private: diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index 28d32d377..1b5679028 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -33,7 +33,7 @@ #include <klocale.h> #include <kstandarddirs.h> -using namespace KIO; +using namespace TDEIO; struct PasswordDialog::PasswordDialogPrivate { @@ -74,8 +74,8 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, d->nRow = 0; d->keepCheckBox = 0; - KConfig* cfg = TDEGlobal::config(); - KConfigGroupSaver saver( cfg, "Passwords" ); + TDEConfig* cfg = TDEGlobal::config(); + TDEConfigGroupSaver saver( cfg, "Passwords" ); d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); d->layout->addColSpacing(1, 5); diff --git a/kio/kio/passdlg.h b/kio/kio/passdlg.h index bbd811328..b071ddef0 100644 --- a/kio/kio/passdlg.h +++ b/kio/kio/passdlg.h @@ -24,7 +24,7 @@ class TQGridLayout; -namespace KIO { +namespace TDEIO { /** * A dialog for requesting a login and a password from the end user. diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp index f39aa0746..55102c5ed 100644 --- a/kio/kio/paste.cpp +++ b/kio/kio/paste.cpp @@ -54,10 +54,10 @@ static KURL getNewFileName( const KURL &u, const TQString& text ) KURL myurl(u); myurl.addPath( file ); - if (KIO::NetAccess::exists(myurl, false, 0)) + if (TDEIO::NetAccess::exists(myurl, false, 0)) { kdDebug(7007) << "Paste will overwrite file. Prompting..." << endl; - KIO::RenameDlg_Result res = KIO::R_OVERWRITE; + TDEIO::RenameDlg_Result res = TDEIO::R_OVERWRITE; TQString newPath; // Ask confirmation about resuming previous transfer @@ -65,13 +65,13 @@ static KURL getNewFileName( const KURL &u, const TQString& text ) 0L, i18n("File Already Exists"), u.pathOrURL(), myurl.pathOrURL(), - (KIO::RenameDlg_Mode) (KIO::M_OVERWRITE | KIO::M_SINGLE), newPath); + (TDEIO::RenameDlg_Mode) (TDEIO::M_OVERWRITE | TDEIO::M_SINGLE), newPath); - if ( res == KIO::R_RENAME ) + if ( res == TDEIO::R_RENAME ) { myurl = newPath; } - else if ( res == KIO::R_CANCEL ) + else if ( res == TDEIO::R_CANCEL ) { return KURL(); } @@ -81,7 +81,7 @@ static KURL getNewFileName( const KURL &u, const TQString& text ) } // The finaly step: write _data to tempfile and move it to neW_url -static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _data ) +static TDEIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _data ) { KTempFile tempFile; tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() ); @@ -90,11 +90,11 @@ static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _ KURL orig_url; orig_url.setPath(tempFile.name()); - return KIO::move( orig_url, new_url ); + return TDEIO::move( orig_url, new_url ); } #ifndef QT_NO_MIMECLIPBOARD -static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, +static TDEIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, const TQValueVector<TQCString>& formats, const TQString& text, TQWidget* widget, @@ -113,7 +113,7 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, TQString dialogText( text ); if ( dialogText.isEmpty() ) dialogText = i18n( "Filename for clipboard content:" ); - KIO::PasteDialog dlg( TQString::null, dialogText, TQString::null, formatLabels, widget, clipboard ); + TDEIO::PasteDialog dlg( TQString::null, dialogText, TQString::null, formatLabels, widget, clipboard ); if ( dlg.exec() != KDialogBase::Accepted ) return 0; @@ -143,7 +143,7 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, #endif // KDE4: remove -KIO_EXPORT bool KIO::isClipboardEmpty() +KIO_EXPORT bool TDEIO::isClipboardEmpty() { #ifndef QT_NO_MIMECLIPBOARD TQMimeSource *data = TQApplication::clipboard()->data(); @@ -161,7 +161,7 @@ KIO_EXPORT bool KIO::isClipboardEmpty() #ifndef QT_NO_MIMECLIPBOARD // The main method for dropping -KIO::CopyJob* KIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url, +TDEIO::CopyJob* TDEIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url, const TQString& dialogText, TQWidget* widget, bool clipboard ) { TQByteArray ba; @@ -207,7 +207,7 @@ KIO::CopyJob* KIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url, #endif // The main method for pasting -KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move ) +KIO_EXPORT TDEIO::Job *TDEIO::pasteClipboard( const KURL& dest_url, bool move ) { if ( !dest_url.isValid() ) { KMessageBox::error( 0L, i18n( "Malformed URL\n%1" ).arg( dest_url.url() ) ); @@ -225,11 +225,11 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move ) return 0; } - KIO::Job *res = 0; + TDEIO::Job *res = 0; if ( move ) - res = KIO::move( urls, dest_url ); + res = TDEIO::move( urls, dest_url ); else - res = KIO::copy( urls, dest_url ); + res = TDEIO::copy( urls, dest_url ); // If moving, erase the clipboard contents, the original files don't exist anymore if ( move ) @@ -256,10 +256,10 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move ) } -KIO_EXPORT void KIO::pasteData( const KURL& u, const TQByteArray& _data ) +KIO_EXPORT void TDEIO::pasteData( const KURL& u, const TQByteArray& _data ) { KURL new_url = getNewFileName( u, TQString::null ); - // We could use KIO::put here, but that would require a class + // We could use TDEIO::put here, but that would require a class // for the slotData call. With NetAccess, we can do a synchronous call. if (new_url.isEmpty()) @@ -270,15 +270,15 @@ KIO_EXPORT void KIO::pasteData( const KURL& u, const TQByteArray& _data ) tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() ); tempFile.close(); - (void) KIO::NetAccess::upload( tempFile.name(), new_url, 0 ); + (void) TDEIO::NetAccess::upload( tempFile.name(), new_url, 0 ); } -KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data ) +KIO_EXPORT TDEIO::CopyJob* TDEIO::pasteDataAsync( const KURL& u, const TQByteArray& _data ) { return pasteDataAsync( u, _data, TQString::null ); } -KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data, const TQString& text ) +KIO_EXPORT TDEIO::CopyJob* TDEIO::pasteDataAsync( const KURL& u, const TQByteArray& _data, const TQString& text ) { KURL new_url = getNewFileName( u, text ); @@ -288,7 +288,7 @@ KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& return pasteDataAsyncTo( new_url, _data ); } -KIO_EXPORT TQString KIO::pasteActionText() +KIO_EXPORT TQString TDEIO::pasteActionText() { TQMimeSource *data = TQApplication::clipboard()->data(); KURL::List urls; diff --git a/kio/kio/paste.h b/kio/kio/paste.h index 3fad2c8b6..36befcd65 100644 --- a/kio/kio/paste.h +++ b/kio/kio/paste.h @@ -27,7 +27,7 @@ class TQMimeSource; // KDE4 TODO pass a parent widget to all methods that will display a message box -namespace KIO { +namespace TDEIO { class Job; class CopyJob; diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp index 480eaaba8..0252baff1 100644 --- a/kio/kio/pastedialog.cpp +++ b/kio/kio/pastedialog.cpp @@ -28,7 +28,7 @@ #include <tqapplication.h> #include <tqclipboard.h> -KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, +TDEIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, const TQString &value, const TQStringList& items, TQWidget *parent, bool clipboard ) @@ -66,17 +66,17 @@ KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, this, TQT_SLOT( slotClipboardDataChanged() ) ); } -void KIO::PasteDialog::slotClipboardDataChanged() +void TDEIO::PasteDialog::slotClipboardDataChanged() { m_clipboardChanged = true; } -TQString KIO::PasteDialog::lineEditText() const +TQString TDEIO::PasteDialog::lineEditText() const { return m_lineEdit->text(); } -int KIO::PasteDialog::comboItem() const +int TDEIO::PasteDialog::comboItem() const { return m_comboBox->currentItem(); } diff --git a/kio/kio/pastedialog.h b/kio/kio/pastedialog.h index 4f8b79b2e..2e7bdfda1 100644 --- a/kio/kio/pastedialog.h +++ b/kio/kio/pastedialog.h @@ -25,7 +25,7 @@ class TQComboBox; class KLineEdit; class TQLabel; -namespace KIO { +namespace TDEIO { /** * @internal diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index c266947f3..de4800ab1 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -53,16 +53,16 @@ #include "previewjob.moc" -namespace KIO { struct PreviewItem; } -using namespace KIO; +namespace TDEIO { struct PreviewItem; } +using namespace TDEIO; -struct KIO::PreviewItem +struct TDEIO::PreviewItem { KFileItem *item; KService::Ptr plugin; }; -struct KIO::PreviewJobPrivate +struct TDEIO::PreviewJobPrivate { enum { STATE_STATORIG, // if the thumbnail exists STATE_GETORIG, // if we create it @@ -118,7 +118,7 @@ struct KIO::PreviewJobPrivate PreviewJob::PreviewJob( const KFileItemList &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const TQStringList *enabledPlugins, bool deleteItems ) - : KIO::Job( false /* no GUI */ ) + : TDEIO::Job( false /* no GUI */ ) { d = new PreviewJobPrivate; d->tOrig = 0; @@ -244,8 +244,8 @@ void PreviewJob::startPreview() } // Read configuration value for the maximum allowed size - KConfig * config = TDEGlobal::config(); - KConfigGroupSaver cgs( config, "PreviewSettings" ); + TDEConfig * config = TDEGlobal::config(); + TDEConfigGroupSaver cgs( config, "PreviewSettings" ); d->maximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); if (bNeedCache) @@ -306,13 +306,13 @@ void PreviewJob::determineNextFile() d->currentItem = d->items.first(); d->succeeded = false; d->items.remove(d->items.begin()); - KIO::Job *job = KIO::stat( d->currentItem.item->url(), false ); + TDEIO::Job *job = TDEIO::stat( d->currentItem.item->url(), false ); job->addMetaData( "no-auth-prompt", "true" ); addSubjob(job); } } -void PreviewJob::slotResult( KIO::Job *job ) +void PreviewJob::slotResult( TDEIO::Job *job ) { subjobs.remove( job ); Q_ASSERT ( subjobs.isEmpty() ); // We should have only one job at a time ... @@ -326,18 +326,18 @@ void PreviewJob::slotResult( KIO::Job *job ) determineNextFile(); return; } - KIO::UDSEntry entry = ((KIO::StatJob*)job)->statResult(); - KIO::UDSEntry::ConstIterator it = entry.begin(); + TDEIO::UDSEntry entry = ((TDEIO::StatJob*)job)->statResult(); + TDEIO::UDSEntry::ConstIterator it = entry.begin(); d->tOrig = 0; int found = 0; for( ; it != entry.end() && found < 2; it++ ) { - if ( (*it).m_uds == KIO::UDS_MODIFICATION_TIME ) + if ( (*it).m_uds == TDEIO::UDS_MODIFICATION_TIME ) { d->tOrig = (time_t)((*it).m_long); found++; } - else if ( (*it).m_uds == KIO::UDS_SIZE ) + else if ( (*it).m_uds == TDEIO::UDS_SIZE ) { if ( filesize_t((*it).m_long) > d->maximumSize && !d->ignoreMaximumSize && @@ -372,7 +372,7 @@ void PreviewJob::slotResult( KIO::Job *job ) return; } - createThumbnail( static_cast<KIO::FileCopyJob*>(job)->destURL().path() ); + createThumbnail( static_cast<TDEIO::FileCopyJob*>(job)->destURL().path() ); return; } case PreviewJobPrivate::STATE_CREATETHUMB: @@ -436,7 +436,7 @@ void PreviewJob::getOrCreateThumbnail() KURL localURL; localURL.setPath( d->tempName = localFile.name() ); const KURL currentURL = item->url(); - KIO::Job * job = KIO::file_copy( currentURL, localURL, -1, true, + TDEIO::Job * job = TDEIO::file_copy( currentURL, localURL, -1, true, false, false /* No GUI */ ); job->addMetaData("thumbnail","1"); addSubjob(job); @@ -450,9 +450,9 @@ void PreviewJob::createThumbnail( TQString pixPath ) KURL thumbURL; thumbURL.setProtocol("thumbnail"); thumbURL.setPath(pixPath); - KIO::TransferJob *job = KIO::get(thumbURL, false, false); + TDEIO::TransferJob *job = TDEIO::get(thumbURL, false, false); addSubjob(job); - connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotThumbData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQT_SLOT(slotThumbData(TDEIO::Job *, const TQByteArray &))); bool save = d->bSave && d->currentItem.plugin->property("CacheThumbnail").toBool(); job->addMetaData("mimeType", d->currentItem.item->mimetype()); job->addMetaData("width", TQString().setNum(save ? d->cacheWidth : d->width)); @@ -486,7 +486,7 @@ void PreviewJob::createThumbnail( TQString pixPath ) #endif } -void PreviewJob::slotThumbData(KIO::Job *, const TQByteArray &data) +void PreviewJob::slotThumbData(TDEIO::Job *, const TQByteArray &data) { bool save = d->bSave && d->currentItem.plugin->property("CacheThumbnail").toBool() && @@ -573,7 +573,7 @@ void PreviewJob::kill( bool quietly ) Job::kill( quietly ); } -PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height, +PreviewJob *TDEIO::filePreview( const KFileItemList &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const TQStringList *enabledPlugins ) { @@ -581,7 +581,7 @@ PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height, scale, save, enabledPlugins); } -PreviewJob *KIO::filePreview( const KURL::List &items, int width, int height, +PreviewJob *TDEIO::filePreview( const KURL::List &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const TQStringList *enabledPlugins ) { @@ -593,5 +593,5 @@ PreviewJob *KIO::filePreview( const KURL::List &items, int width, int height, } void PreviewJob::virtual_hook( int id, void* data ) -{ KIO::Job::virtual_hook( id, data ); } +{ TDEIO::Job::virtual_hook( id, data ); } diff --git a/kio/kio/previewjob.h b/kio/kio/previewjob.h index d7686505e..a0a137ff4 100644 --- a/kio/kio/previewjob.h +++ b/kio/kio/previewjob.h @@ -29,12 +29,12 @@ class TQPixmap; -namespace KIO { +namespace TDEIO { /*! * This class catches a preview (thumbnail) for files. * @short KIO Job to get a thumbnail picture */ - class KIO_EXPORT PreviewJob : public KIO::Job + class KIO_EXPORT PreviewJob : public TDEIO::Job { Q_OBJECT public: @@ -117,11 +117,11 @@ namespace KIO { void createThumbnail( TQString ); protected slots: - virtual void slotResult( KIO::Job *job ); + virtual void slotResult( TDEIO::Job *job ); private slots: void startPreview(); - void slotThumbData(KIO::Job *, const TQByteArray &); + void slotThumbData(TDEIO::Job *, const TQByteArray &); private: void determineNextFile(); diff --git a/kio/kio/progressbase.cpp b/kio/kio/progressbase.cpp index f01c00a7a..146f4182e 100644 --- a/kio/kio/progressbase.cpp +++ b/kio/kio/progressbase.cpp @@ -19,7 +19,7 @@ #include "jobclasses.h" #include "progressbase.h" -namespace KIO { +namespace TDEIO { ProgressBase::ProgressBase( TQWidget *parent ) : TQWidget( parent ) @@ -34,93 +34,93 @@ ProgressBase::ProgressBase( TQWidget *parent ) } -void ProgressBase::setJob( KIO::Job *job ) +void ProgressBase::setJob( TDEIO::Job *job ) { // first connect all slots - connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); - connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); // then assign job m_pJob = job; } -void ProgressBase::setJob( KIO::CopyJob *job ) +void ProgressBase::setJob( TDEIO::CopyJob *job ) { // first connect all slots - connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), - TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( copying( KIO::Job*, const KURL& , const KURL& ) ), - TQT_SLOT( slotCopying( KIO::Job*, const KURL&, const KURL& ) ) ); - connect( job, TQT_SIGNAL( moving( KIO::Job*, const KURL& , const KURL& ) ), - TQT_SLOT( slotMoving( KIO::Job*, const KURL&, const KURL& ) ) ); - connect( job, TQT_SIGNAL( creatingDir( KIO::Job*, const KURL& ) ), - TQT_SLOT( slotCreatingDir( KIO::Job*, const KURL& ) ) ); - - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); - - connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), + TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( job, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), + TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( job, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( copying( TDEIO::Job*, const KURL& , const KURL& ) ), + TQT_SLOT( slotCopying( TDEIO::Job*, const KURL&, const KURL& ) ) ); + connect( job, TQT_SIGNAL( moving( TDEIO::Job*, const KURL& , const KURL& ) ), + TQT_SLOT( slotMoving( TDEIO::Job*, const KURL&, const KURL& ) ) ); + connect( job, TQT_SIGNAL( creatingDir( TDEIO::Job*, const KURL& ) ), + TQT_SLOT( slotCreatingDir( TDEIO::Job*, const KURL& ) ) ); + + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); + + connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); // then assign job m_pJob = job; } -void ProgressBase::setJob( KIO::DeleteJob *job ) +void ProgressBase::setJob( TDEIO::DeleteJob *job ) { // first connect all slots - connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), - TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), - TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); - connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) ); - connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), - TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); - - connect( job, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ), - TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) ); - - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); - - connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ), - TQT_SLOT( slotFinished( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), + TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( job, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), + TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) ); + connect( job, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) ); + connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ), + TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) ); + + connect( job, TQT_SIGNAL( deleting( TDEIO::Job*, const KURL& ) ), + TQT_SLOT( slotDeleting( TDEIO::Job*, const KURL& ) ) ); + + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); + + connect( job, TQT_SIGNAL( canceled( TDEIO::Job* ) ), + TQT_SLOT( slotFinished( TDEIO::Job* ) ) ); // then assign job m_pJob = job; @@ -150,7 +150,7 @@ void ProgressBase::finished() { } } -void ProgressBase::slotFinished( KIO::Job* ) { +void ProgressBase::slotFinished( TDEIO::Job* ) { finished(); } diff --git a/kio/kio/progressbase.h b/kio/kio/progressbase.h index d9e3d8f96..cbcab06be 100644 --- a/kio/kio/progressbase.h +++ b/kio/kio/progressbase.h @@ -24,13 +24,13 @@ #include <kio/global.h> class KURL; -namespace KIO { +namespace TDEIO { class Job; class CopyJob; class DeleteJob; } -namespace KIO +namespace TDEIO { enum Progress { DEFAULT = 1, @@ -53,7 +53,7 @@ namespace KIO * Custom progress dialog will be used like this : * \code * // create job -* CopyJob* job = KIO::copy(...); +* CopyJob* job = TDEIO::copy(...); * // create a dialog * MyCustomProgress *customProgress; * customProgress = new MyCustomProgress(); @@ -81,20 +81,20 @@ public: ~ProgressBase() {} /** - * Assign a KIO::Job to this progress dialog. + * Assign a TDEIO::Job to this progress dialog. * @param job the job to assign */ - void setJob( KIO::Job *job ); + void setJob( TDEIO::Job *job ); /** - * Assign a KIO::Job to this progress dialog. + * Assign a TDEIO::Job to this progress dialog. * @param job the job to assign */ - void setJob( KIO::CopyJob *job ); + void setJob( TDEIO::CopyJob *job ); /** - * Assign a KIO::Job to this progress dialog. + * Assign a TDEIO::Job to this progress dialog. * @param job the job to assign */ - void setJob( KIO::DeleteJob *job ); + void setJob( TDEIO::DeleteJob *job ); // should we stop the job when the dialog is closed ? void setStopOnClose( bool stopOnClose ) { m_bStopOnClose = stopOnClose; } @@ -103,7 +103,7 @@ public: // should we delete the dialog or just clean it when the job is finished ? /** * This controls whether the dialog should be deleted or only cleaned when - * the KIO::Job is finished (or canceled). + * the TDEIO::Job is finished (or canceled). * * If your dialog is an embedded widget and not a separate window, you should * setOnlyClean(true) in the constructor of your custom dialog. @@ -143,101 +143,101 @@ public slots: // progress slots /** * Called to set the total size. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param size the total size in bytes */ - virtual void slotTotalSize( KIO::Job* job, KIO::filesize_t size ) { + virtual void slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) { Q_UNUSED(job);Q_UNUSED(size);} /** * Called to set the total number of files. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param files the number of files */ - virtual void slotTotalFiles( KIO::Job* job, unsigned long files ) { + virtual void slotTotalFiles( TDEIO::Job* job, unsigned long files ) { Q_UNUSED(job);Q_UNUSED(files);} /** * Called to set the total number of directories. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param dirs the number of directories */ - virtual void slotTotalDirs( KIO::Job* job, unsigned long dirs ) { + virtual void slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) { Q_UNUSED(job);Q_UNUSED(dirs);} /** * Called to set the processed size. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param bytes the processed size in bytes */ - virtual void slotProcessedSize( KIO::Job* job, KIO::filesize_t bytes ) { + virtual void slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t bytes ) { Q_UNUSED(job);Q_UNUSED(bytes);} /** * Called to set the number of processed files. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param files the number of files */ - virtual void slotProcessedFiles( KIO::Job* job, unsigned long files ) { + virtual void slotProcessedFiles( TDEIO::Job* job, unsigned long files ) { Q_UNUSED(job);Q_UNUSED(files);} /** * Called to set the number of processed directories. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param dirs the number of directories */ - virtual void slotProcessedDirs( KIO::Job* job, unsigned long dirs ) { + virtual void slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) { Q_UNUSED(job);Q_UNUSED(dirs);} /** * Called to set the speed. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param speed the speed in bytes/second */ - virtual void slotSpeed( KIO::Job* job, unsigned long speed ) { + virtual void slotSpeed( TDEIO::Job* job, unsigned long speed ) { Q_UNUSED(job);Q_UNUSED(speed);} /** * Called to set the percentage. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param percent the percentage */ - virtual void slotPercent( KIO::Job* job, unsigned long percent ) { + virtual void slotPercent( TDEIO::Job* job, unsigned long percent ) { Q_UNUSED(job);Q_UNUSED(percent);} /** * Called when the job is copying. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param src the source of the operation * @param dest the destination of the operation */ - virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest ) { + virtual void slotCopying( TDEIO::Job* job, const KURL& src, const KURL& dest ) { Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);} /** * Called when the job is moving. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param src the source of the operation * @param dest the destination of the operation */ - virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest ) { + virtual void slotMoving( TDEIO::Job* job, const KURL& src, const KURL& dest ) { Q_UNUSED(job);Q_UNUSED(src);Q_UNUSED(dest);} /** * Called when the job is deleting. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param url the URL to delete */ - virtual void slotDeleting( KIO::Job* job, const KURL& url) { + virtual void slotDeleting( TDEIO::Job* job, const KURL& url) { Q_UNUSED(job);Q_UNUSED(url);} /** * Called when the job is creating a directory. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param dir the URL of the directory to create */ - virtual void slotCreatingDir( KIO::Job* job, const KURL& dir ) { + virtual void slotCreatingDir( TDEIO::Job* job, const KURL& dir ) { Q_UNUSED(job);Q_UNUSED(dir);} /** * Called when the job is resuming.. - * @param job the KIO::Job + * @param job the TDEIO::Job * @param from the position to resume from in bytes */ - virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from) { + virtual void slotCanResume( TDEIO::Job* job, TDEIO::filesize_t from) { Q_UNUSED(job);Q_UNUSED(from);} signals: @@ -247,13 +247,13 @@ signals: void stopped(); protected slots: - void slotFinished( KIO::Job* ); + void slotFinished( TDEIO::Job* ); protected: virtual void closeEvent( TQCloseEvent * ); - KIO::Job* m_pJob; + TDEIO::Job* m_pJob; private: bool m_bOnlyClean; diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp index 9eb7a2c73..7bba95460 100644 --- a/kio/kio/renamedlg.cpp +++ b/kio/kio/renamedlg.cpp @@ -52,7 +52,7 @@ #include <twin.h> #endif -using namespace KIO; +using namespace TDEIO; class RenameDlg::RenameDlgPrivate { @@ -84,14 +84,14 @@ class RenameDlg::RenameDlgPrivate RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, const TQString &_src, const TQString &_dest, RenameDlg_Mode _mode, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, time_t ctimeSrc, time_t ctimeDest, time_t mtimeSrc, time_t mtimeDest, bool _modal) - : TQDialog ( parent, "KIO::RenameDialog" , _modal ) + : TQDialog ( parent, "TDEIO::RenameDialog" , _modal ) { d = new RenameDlgPrivate( ); d->modal = _modal; @@ -243,9 +243,9 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, gridLayout->addMultiCellWidget( lb1, 1, 3, 0, 0 ); // takes the first column on rows 1-3 int row = 1; - if ( sizeDest != (KIO::filesize_t)-1 ) + if ( sizeDest != (TDEIO::filesize_t)-1 ) { - TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeDest) ), this ); + TQLabel * lb = new TQLabel( i18n("size %1").arg( TDEIO::convertSize(sizeDest) ), this ); gridLayout->addWidget( lb, row, 1 ); row++; @@ -279,9 +279,9 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, row = 6; - if ( sizeSrc != (KIO::filesize_t)-1 ) + if ( sizeSrc != (TDEIO::filesize_t)-1 ) { - TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeSrc) ), this ); + TQLabel * lb = new TQLabel( i18n("size %1").arg( TDEIO::convertSize(sizeSrc) ), this ); gridLayout->addWidget( lb, row, 1 ); row++; } @@ -323,7 +323,7 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, d->m_pLineEdit = new TQLineEdit( this ); layout2->addWidget( d->m_pLineEdit ); TQString fileName = d->dest.fileName(); - d->m_pLineEdit->setText( KIO::decodeFileName( fileName ) ); + d->m_pLineEdit->setText( TDEIO::decodeFileName( fileName ) ); if ( d->bRename || d->bOverwrite ) connect(d->m_pLineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(enableRenameButton(const TQString &))); @@ -391,7 +391,7 @@ RenameDlg::~RenameDlg() void RenameDlg::enableRenameButton(const TQString &newDest) { - if ( newDest != KIO::decodeFileName( d->dest.fileName() ) && !newDest.isEmpty() ) + if ( newDest != TDEIO::decodeFileName( d->dest.fileName() ) && !newDest.isEmpty() ) { d->bRename->setEnabled( true ); d->bRename->setDefault( true ); @@ -410,7 +410,7 @@ KURL RenameDlg::newDestURL() { KURL newDest( d->dest ); TQString fileName = d->m_pLineEdit->text(); - newDest.setFileName( KIO::encodeFileName( fileName ) ); + newDest.setFileName( TDEIO::encodeFileName( fileName ) ); return newDest; } @@ -523,7 +523,7 @@ static TQString mime( const KURL& src ) { KMimeType::Ptr type = KMimeType::findByURL( src ); //if( type->name() == KMimeType::defaultMimeType() ){ // ok no mimetype - // TQString ty = KIO::NetAccess::mimetype(d->src ); + // TQString ty = TDEIO::NetAccess::mimetype(d->src ); // return ty; return type->name(); } @@ -544,12 +544,12 @@ void RenameDlg::pluginHandling() } -RenameDlg_Result KIO::open_RenameDlg( const TQString & _caption, +RenameDlg_Result TDEIO::open_RenameDlg( const TQString & _caption, const TQString & _src, const TQString & _dest, RenameDlg_Mode _mode, TQString& _new, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, time_t ctimeSrc, time_t ctimeDest, time_t mtimeSrc, diff --git a/kio/kio/renamedlg.h b/kio/kio/renamedlg.h index 373abf446..b2347539b 100644 --- a/kio/kio/renamedlg.h +++ b/kio/kio/renamedlg.h @@ -29,7 +29,7 @@ #include <kio/global.h> -namespace KIO { +namespace TDEIO { // KDE4: get rid of M_OVERWRITE_ITSELF, trigger it internally if src==dest enum RenameDlg_Mode { M_OVERWRITE = 1, M_OVERWRITE_ITSELF = 2, M_SKIP = 4, M_SINGLE = 8, M_MULTI = 16, M_RESUME = 32, M_NORENAME = 64 }; @@ -69,8 +69,8 @@ public: // KDE4: make those KURLs, and use pathOrURL() internally. const TQString & src, const TQString & dest, RenameDlg_Mode mode, - KIO::filesize_t sizeSrc = (KIO::filesize_t) -1, - KIO::filesize_t sizeDest = (KIO::filesize_t) -1, + TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, + TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, time_t ctimeSrc = (time_t) -1, time_t ctimeDest = (time_t) -1, time_t mtimeSrc = (time_t) -1, @@ -116,7 +116,7 @@ private: /** * \addtogroup renamedlg "RenameDlg related Functions" * @{ - * \relates KIO::RenameDlg + * \relates TDEIO::RenameDlg * Construct a modal, parent-less "rename" dialog, and return * a result code, as well as the new dest. Much easier to use than the * class RenameDlg directly. @@ -139,8 +139,8 @@ KIO_EXPORT RenameDlg_Result open_RenameDlg( const TQString & caption, // KDE4: make those KURLs const TQString& src, const TQString & dest, RenameDlg_Mode mode, TQString& newDestPath, - KIO::filesize_t sizeSrc = (KIO::filesize_t) -1, - KIO::filesize_t sizeDest = (KIO::filesize_t) -1, + TDEIO::filesize_t sizeSrc = (TDEIO::filesize_t) -1, + TDEIO::filesize_t sizeDest = (TDEIO::filesize_t) -1, time_t ctimeSrc = (time_t) -1, time_t ctimeDest = (time_t) -1, time_t mtimeSrc = (time_t) -1, diff --git a/kio/kio/renamedlgplugin.h b/kio/kio/renamedlgplugin.h index b4dd8b9fb..ab50e6b6a 100644 --- a/kio/kio/renamedlgplugin.h +++ b/kio/kio/renamedlgplugin.h @@ -43,11 +43,11 @@ public: * This function will be called by RenameDlg. The params are infos about the files. * @return If the plugin want's to display it return true, if not return false */ - virtual bool initialize(KIO::RenameDlg_Mode /*mod*/ , const TQString &/*_src*/, const TQString &/*_dest*/, + virtual bool initialize(TDEIO::RenameDlg_Mode /*mod*/ , const TQString &/*_src*/, const TQString &/*_dest*/, const TQString &/*mimeSrc*/, const TQString &/*mimeDest*/, - KIO::filesize_t /*sizeSrc*/, - KIO::filesize_t /*sizeDest*/, + TDEIO::filesize_t /*sizeSrc*/, + TDEIO::filesize_t /*sizeDest*/, time_t /*ctimeSrc*/, time_t /*ctimeDest*/, time_t /*mtimeSrc*/, diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp index 9b518b1ef..09560cb8b 100644 --- a/kio/kio/scheduler.cpp +++ b/kio/kio/scheduler.cpp @@ -40,13 +40,13 @@ // to the system wide slave pool. (3 minutes) #define MAX_SLAVE_IDLE (3*60) -using namespace KIO; +using namespace TDEIO; -template class TQDict<KIO::Scheduler::ProtocolInfo>; +template class TQDict<TDEIO::Scheduler::ProtocolInfo>; Scheduler *Scheduler::instance = 0; -class KIO::SlaveList: public TQPtrList<Slave> +class TDEIO::SlaveList: public TQPtrList<Slave> { public: SlaveList() { } @@ -67,7 +67,7 @@ class KIO::SlaveList: public TQPtrList<Slave> // We schedule slaves based on (2) but tell the slave about (1) via // Slave::setProtocol(). -class KIO::Scheduler::JobData +class TDEIO::Scheduler::JobData { public: JobData() : checkOnHold(false) { } @@ -78,13 +78,13 @@ public: bool checkOnHold; }; -class KIO::Scheduler::ExtraJobData: public TQPtrDict<KIO::Scheduler::JobData> +class TDEIO::Scheduler::ExtraJobData: public TQPtrDict<TDEIO::Scheduler::JobData> { public: ExtraJobData() { setAutoDelete(true); } }; -class KIO::Scheduler::ProtocolInfo +class TDEIO::Scheduler::ProtocolInfo { public: ProtocolInfo() : maxSlaves(1), skipCount(0) @@ -99,16 +99,16 @@ public: TQString protocol; }; -class KIO::Scheduler::ProtocolInfoDict : public TQDict<KIO::Scheduler::ProtocolInfo> +class TDEIO::Scheduler::ProtocolInfoDict : public TQDict<TDEIO::Scheduler::ProtocolInfo> { public: ProtocolInfoDict() { } - KIO::Scheduler::ProtocolInfo *get( const TQString &protocol); + TDEIO::Scheduler::ProtocolInfo *get( const TQString &protocol); }; -KIO::Scheduler::ProtocolInfo * -KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol) +TDEIO::Scheduler::ProtocolInfo * +TDEIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol) { ProtocolInfo *info = find(protocol); if (!info) @@ -124,7 +124,7 @@ KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol) Scheduler::Scheduler() - : DCOPObject( "KIO::Scheduler" ), + : DCOPObject( "TDEIO::Scheduler" ), TQObject(kapp, "scheduler"), slaveTimer(0, "Scheduler::slaveTimer"), coSlaveTimer(0, "Scheduler::coSlaveTimer"), @@ -211,7 +211,7 @@ void Scheduler::_doJob(SimpleJob *job) { slaveTimer.start(0, true); #ifndef NDEBUG if (newJobs.count() > 150) - kdDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a TQObject)." << endl; + kdDebug() << "WARNING - TDEIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a TQObject)." << endl; #endif } @@ -272,7 +272,7 @@ void Scheduler::startStep() { (void) startJobDirect(); } - TQDictIterator<KIO::Scheduler::ProtocolInfo> it(*protInfoDict); + TQDictIterator<TDEIO::Scheduler::ProtocolInfo> it(*protInfoDict); while(it.current()) { if (startJobScheduled(it.current())) return; @@ -280,7 +280,7 @@ void Scheduler::startStep() } } -void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config) +void Scheduler::setupSlave(TDEIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const TDEIO::MetaData *config) { TQString host = url.host(); int port = url.port(); @@ -497,13 +497,13 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact) { // Make sure that the job wants to do a GET or a POST, and with no offset bool bCanReuse = (job->command() == CMD_GET); - KIO::TransferJob * tJob = dynamic_cast<KIO::TransferJob *>(job); + TDEIO::TransferJob * tJob = dynamic_cast<TDEIO::TransferJob *>(job); if ( tJob ) { bCanReuse = (job->command() == CMD_GET || job->command() == CMD_SPECIAL); if ( bCanReuse ) { - KIO::MetaData outgoing = tJob->outgoingMetaData(); + TDEIO::MetaData outgoing = tJob->outgoingMetaData(); TQString resume = (!outgoing.contains("resume")) ? TQString() : outgoing["resume"]; kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl; bCanReuse = (resume.isEmpty() || resume == "0"); @@ -541,8 +541,8 @@ Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL { slaveList->append(slave); idleSlaves->append(slave); - connect(slave, TQT_SIGNAL(slaveDied(KIO::Slave *)), - TQT_SLOT(slotSlaveDied(KIO::Slave *))); + connect(slave, TQT_SIGNAL(slaveDied(TDEIO::Slave *)), + TQT_SLOT(slotSlaveDied(TDEIO::Slave *))); connect(slave, TQT_SIGNAL(slaveStatus(pid_t,const TQCString &,const TQString &, bool)), TQT_SLOT(slotSlaveStatus(pid_t,const TQCString &, const TQString &, bool))); @@ -607,7 +607,7 @@ void Scheduler::_jobFinished(SimpleJob *job, Slave *slave) } } -void Scheduler::slotSlaveDied(KIO::Slave *slave) +void Scheduler::slotSlaveDied(TDEIO::Slave *slave) { assert(!slave->isAlive()); ProtocolInfo *protInfo = protInfoDict->get(slave->slaveProtocol()); @@ -662,7 +662,7 @@ void Scheduler::_scheduleCleanup() } } -void Scheduler::_putSlaveOnHold(KIO::SimpleJob *job, const KURL &url) +void Scheduler::_putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url) { Slave *slave = job->slave(); slave->disconnect(job); @@ -695,7 +695,7 @@ void Scheduler::_removeSlaveOnHold() } Slave * -Scheduler::_getConnectedSlave(const KURL &url, const KIO::MetaData &config ) +Scheduler::_getConnectedSlave(const KURL &url, const TDEIO::MetaData &config ) { TQString proxy; TQString protocol = KProtocolManager::slaveProtocol(url, proxy); @@ -792,7 +792,7 @@ Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg) } bool -Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job) +Scheduler::_assignJobToSlave(TDEIO::Slave *slave, SimpleJob *job) { // kdDebug(7006) << "_assignJobToSlave( " << job << ", " << slave << ")" << endl; TQString dummy; @@ -822,7 +822,7 @@ Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job) } bool -Scheduler::_disconnectSlave(KIO::Slave *slave) +Scheduler::_disconnectSlave(TDEIO::Slave *slave) { // kdDebug(7006) << "_disconnectSlave( " << slave << ")" << endl; JobList *list = coSlaves.take(slave); diff --git a/kio/kio/scheduler.h b/kio/kio/scheduler.h index 4a4f104ba..9871cd1c2 100644 --- a/kio/kio/scheduler.h +++ b/kio/kio/scheduler.h @@ -30,7 +30,7 @@ #include <dcopobject.h> -namespace KIO { +namespace TDEIO { class Slave; class SlaveList; @@ -38,7 +38,7 @@ namespace KIO { class SessionData; /** - * The KIO::Scheduler manages io-slaves for the application. + * The TDEIO::Scheduler manages io-slaves for the application. * It also queues jobs and assigns the job to a slave when one * becomes available. * @@ -46,12 +46,12 @@ namespace KIO { * * <h3>1. Direct</h3> * This is the default. When you create a job the - * KIO::Scheduler will be notified and will find either an existing + * TDEIO::Scheduler will be notified and will find either an existing * slave that is idle or it will create a new slave for the job. * * Example: * \code - * TransferJob *job = KIO::get(KURL("http://www.kde.org")); + * TransferJob *job = TDEIO::get(KURL("http://www.kde.org")); * \endcode * * @@ -64,8 +64,8 @@ namespace KIO { * * Example: * \code - * TransferJob *job = KIO::get(KURL("http://www.kde.org")); - * KIO::Scheduler::scheduleJob(job); + * TransferJob *job = TDEIO::get(KURL("http://www.kde.org")); + * TDEIO::Scheduler::scheduleJob(job); * \endcode * * <h3>3. Connection Oriented</h3> @@ -80,32 +80,32 @@ namespace KIO { * * Example: * \code - * Slave *slave = KIO::Scheduler::getConnectedSlave( + * Slave *slave = TDEIO::Scheduler::getConnectedSlave( * KURL("pop3://bastian:password@mail.kde.org")); - * TransferJob *job1 = KIO::get( + * TransferJob *job1 = TDEIO::get( * KURL("pop3://bastian:password@mail.kde.org/msg1")); - * KIO::Scheduler::assignJobToSlave(slave, job1); - * TransferJob *job2 = KIO::get( + * TDEIO::Scheduler::assignJobToSlave(slave, job1); + * TransferJob *job2 = TDEIO::get( * KURL("pop3://bastian:password@mail.kde.org/msg2")); - * KIO::Scheduler::assignJobToSlave(slave, job2); - * TransferJob *job3 = KIO::get( + * TDEIO::Scheduler::assignJobToSlave(slave, job2); + * TransferJob *job3 = TDEIO::get( * KURL("pop3://bastian:password@mail.kde.org/msg3")); - * KIO::Scheduler::assignJobToSlave(slave, job3); + * TDEIO::Scheduler::assignJobToSlave(slave, job3); * * // ... Wait for jobs to finish... * - * KIO::Scheduler::disconnectSlave(slave); + * TDEIO::Scheduler::disconnectSlave(slave); * \endcode * * Note that you need to explicitly disconnect the slave when the * connection goes down, so your error handler should contain: * \code - * if (error == KIO::ERR_CONNECTION_BROKEN) - * KIO::Scheduler::disconnectSlave(slave); + * if (error == TDEIO::ERR_CONNECTION_BROKEN) + * TDEIO::Scheduler::disconnectSlave(slave); * \endcode * - * @see KIO::Slave - * @see KIO::Job + * @see TDEIO::Slave + * @see TDEIO::Job **/ class KIO_EXPORT Scheduler : public TQObject, virtual public DCOPObject { @@ -150,7 +150,7 @@ namespace KIO { * @param job the finished job * @param slave the slave that executed the @p job */ - static void jobFinished(KIO::SimpleJob *job, KIO::Slave *slave) + static void jobFinished(TDEIO::SimpleJob *job, TDEIO::Slave *slave) { self()->_jobFinished(job, slave); } /** @@ -164,7 +164,7 @@ namespace KIO { * @param job the job that should be stopped * @param url the URL that is handled by the @p url */ - static void putSlaveOnHold(KIO::SimpleJob *job, const KURL &url) + static void putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url) { self()->_putSlaveOnHold(job, url); } /** @@ -193,7 +193,7 @@ namespace KIO { * @see assignJobToSlave() * @see disconnectSlave() */ - static KIO::Slave *getConnectedSlave(const KURL &url, const KIO::MetaData &config = MetaData() ) + static TDEIO::Slave *getConnectedSlave(const KURL &url, const TDEIO::MetaData &config = MetaData() ) { return self()->_getConnectedSlave(url, config); } /* @@ -212,7 +212,7 @@ namespace KIO { * @see slaveConnected() * @see slaveError() */ - static bool assignJobToSlave(KIO::Slave *slave, KIO::SimpleJob *job) + static bool assignJobToSlave(TDEIO::Slave *slave, TDEIO::SimpleJob *job) { return self()->_assignJobToSlave(slave, job); } /* @@ -227,7 +227,7 @@ namespace KIO { * @see getConnectedSlave * @see assignJobToSlave */ - static bool disconnectSlave(KIO::Slave *slave) + static bool disconnectSlave(TDEIO::Slave *slave) { return self()->_disconnectSlave(slave); } /** @@ -236,7 +236,7 @@ namespace KIO { * the that was started. * Register the mainwindow @p wid with the KIO subsystem * Do not call this, it is called automatically from - * void KIO::Job::setWindow(TQWidget*). + * void TDEIO::Job::setWindow(TQWidget*). * @param wid the window to register * @since 3.1 */ @@ -287,15 +287,15 @@ namespace KIO { virtual QCStringList functions(); public slots: - void slotSlaveDied(KIO::Slave *slave); + void slotSlaveDied(TDEIO::Slave *slave); void slotSlaveStatus(pid_t pid, const TQCString &protocol, const TQString &host, bool connected); signals: - void slaveConnected(KIO::Slave *slave); - void slaveError(KIO::Slave *slave, int error, const TQString &errorMsg); + void slaveConnected(TDEIO::Slave *slave); + void slaveError(TDEIO::Slave *slave, int error, const TQString &errorMsg); protected: - void setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config=0); + void setupSlave(TDEIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const TDEIO::MetaData *config=0); bool startJobScheduled(ProtocolInfo *protInfo); bool startJobDirect(); Scheduler(); @@ -319,13 +319,13 @@ namespace KIO { void _doJob(SimpleJob *job); void _scheduleJob(SimpleJob *job); void _cancelJob(SimpleJob *job); - void _jobFinished(KIO::SimpleJob *job, KIO::Slave *slave); + void _jobFinished(TDEIO::SimpleJob *job, TDEIO::Slave *slave); void _scheduleCleanup(); - void _putSlaveOnHold(KIO::SimpleJob *job, const KURL &url); + void _putSlaveOnHold(TDEIO::SimpleJob *job, const KURL &url); void _removeSlaveOnHold(); - Slave *_getConnectedSlave(const KURL &url, const KIO::MetaData &metaData ); - bool _assignJobToSlave(KIO::Slave *slave, KIO::SimpleJob *job); - bool _disconnectSlave(KIO::Slave *slave); + Slave *_getConnectedSlave(const KURL &url, const TDEIO::MetaData &metaData ); + bool _assignJobToSlave(TDEIO::Slave *slave, TDEIO::SimpleJob *job); + bool _disconnectSlave(TDEIO::Slave *slave); void _checkSlaveOnHold(bool b); void _publishSlaveOnHold(); void _registerWindow(TQWidget *wid); diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp index d3c398fc4..e2517cc73 100644 --- a/kio/kio/sessiondata.cpp +++ b/kio/kio/sessiondata.cpp @@ -37,7 +37,7 @@ #include "sessiondata.h" #include "sessiondata.moc" -namespace KIO { +namespace TDEIO { /***************************** SessionData::AuthData ************************/ struct SessionData::AuthData @@ -264,7 +264,7 @@ void SessionData::reset() { d->initDone = true; // Get Cookie settings... - KConfig* cfg = new KConfig("kcookiejarrc", true, false); + TDEConfig* cfg = new TDEConfig("kcookiejarrc", true, false); cfg->setGroup( "Cookie Policy" ); d->useCookie = cfg->readBoolEntry( "Cookies", true ); delete cfg; diff --git a/kio/kio/sessiondata.h b/kio/kio/sessiondata.h index 80433679c..80b28ace6 100644 --- a/kio/kio/sessiondata.h +++ b/kio/kio/sessiondata.h @@ -24,7 +24,7 @@ #include <tqobject.h> #include <kio/global.h> -namespace KIO { +namespace TDEIO { class SlaveConfig; @@ -40,7 +40,7 @@ public: SessionData(); ~SessionData(); - virtual void configDataFor( KIO::MetaData &configData, const TQString &proto, + virtual void configDataFor( TDEIO::MetaData &configData, const TQString &proto, const TQString &host ); virtual void reset(); diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp index 0fe7b230b..f4a14a229 100644 --- a/kio/kio/skipdlg.cpp +++ b/kio/kio/skipdlg.cpp @@ -36,7 +36,7 @@ #include <twin.h> #endif -using namespace KIO; +using namespace TDEIO; SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal ) : KDialog ( parent, "" , _modal ) @@ -132,7 +132,7 @@ void SkipDlg::b2Pressed() emit result( this, 2 ); } -SkipDlg_Result KIO::open_SkipDlg( bool _multi, const TQString& _error_text ) +SkipDlg_Result TDEIO::open_SkipDlg( bool _multi, const TQString& _error_text ) { Q_ASSERT(kapp); diff --git a/kio/kio/skipdlg.h b/kio/kio/skipdlg.h index dbf583ef0..e1199de97 100644 --- a/kio/kio/skipdlg.h +++ b/kio/kio/skipdlg.h @@ -25,7 +25,7 @@ class TQPushButton; class TQWidget; -namespace KIO { +namespace TDEIO { enum SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 }; diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp index 8306c8650..6e834f5fa 100644 --- a/kio/kio/slave.cpp +++ b/kio/kio/slave.cpp @@ -59,7 +59,7 @@ #define _PATH_TMP "/tmp" #endif -using namespace KIO; +using namespace TDEIO; #define SLAVE_CONNECTION_TIMEOUT_MIN 2 @@ -73,7 +73,7 @@ using namespace KIO; #define SLAVE_CONNECTION_TIMEOUT_MAX 3600 #endif -namespace KIO { +namespace TDEIO { /** * @internal @@ -87,7 +87,7 @@ namespace KIO { }; } -void Slave::accept(KSocket *socket) +void Slave::accept(TDESocket *socket) { #ifndef Q_WS_WIN slaveconn.init(socket); @@ -138,7 +138,7 @@ void Slave::timeout() deref(); } -Slave::Slave(KServerSocket *socket, const TQString &protocol, const TQString &socketname) +Slave::Slave(TDEServerSocket *socket, const TQString &protocol, const TQString &socketname) : SlaveInterface(&slaveconn), serv(socket), contacted(false), d(new SlavePrivate(false)) { @@ -152,12 +152,12 @@ Slave::Slave(KServerSocket *socket, const TQString &protocol, const TQString &so m_pid = 0; m_port = 0; #ifndef Q_WS_WIN - connect(serv, TQT_SIGNAL(accepted( KSocket* )), - TQT_SLOT(accept(KSocket*) ) ); + connect(serv, TQT_SIGNAL(accepted( TDESocket* )), + TQT_SLOT(accept(TDESocket*) ) ); #endif } -Slave::Slave(bool /*derived*/, KServerSocket *socket, const TQString &protocol, +Slave::Slave(bool /*derived*/, TDEServerSocket *socket, const TQString &protocol, const TQString &socketname) : SlaveInterface(&slaveconn), serv(socket), contacted(false), d(new SlavePrivate(true)) @@ -174,8 +174,8 @@ Slave::Slave(bool /*derived*/, KServerSocket *socket, const TQString &protocol, m_port = 0; if (serv != 0) { #ifndef Q_WS_WIN - connect(serv, TQT_SIGNAL(accepted( KSocket* )), - TQT_SLOT(accept(KSocket*) ) ); + connect(serv, TQT_SIGNAL(accepted( TDESocket* )), + TQT_SLOT(accept(TDESocket*) ) ); #endif } } @@ -368,7 +368,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error if ( socketfile.status() != 0 ) { error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno)); - error = KIO::ERR_CANNOT_LAUNCH_PROCESS; + error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; return 0; } @@ -377,7 +377,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error #endif #ifndef Q_WS_WIN - KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()).data()); + TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); Slave *slave = new Slave(kss, protocol, socketfile.name()); #else @@ -399,7 +399,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error if (_name.isEmpty()) { error_text = i18n("Unknown protocol '%1'.").arg(protocol); - error = KIO::ERR_CANNOT_LAUNCH_PROCESS; + error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; delete slave; return 0; } @@ -407,7 +407,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error if (lib_path.isEmpty()) { error_text = i18n("Can not find io-slave for protocol '%1'.").arg(protocol); - error = KIO::ERR_CANNOT_LAUNCH_PROCESS; + error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; return 0; } @@ -435,7 +435,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error if (!client->call(launcher, launcher, "requestSlave(TQString,TQString,TQString)", params, replyType, reply)) { error_text = i18n("Cannot talk to klauncher"); - error = KIO::ERR_SLAVE_DEFINED; + error = TDEIO::ERR_SLAVE_DEFINED; delete slave; return 0; } @@ -446,7 +446,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error if (!pid) { error_text = i18n("Unable to create io-slave:\nklauncher said: %1").arg(errorStr); - error = KIO::ERR_CANNOT_LAUNCH_PROCESS; + error = TDEIO::ERR_CANNOT_LAUNCH_PROCESS; delete slave; return 0; } @@ -479,7 +479,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url ) #endif #ifndef Q_WS_WIN - KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()).data()); + TDEServerSocket *kss = new TDEServerSocket(TQFile::encodeName(socketfile.name()).data()); Slave *slave = new Slave(kss, protocol, socketfile.name()); #else @@ -513,7 +513,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url ) } void Slave::virtual_hook( int id, void* data ) { - KIO::SlaveInterface::virtual_hook( id, data ); + TDEIO::SlaveInterface::virtual_hook( id, data ); } #include "slave.moc" diff --git a/kio/kio/slave.h b/kio/kio/slave.h index e5cdc332c..bbede6637 100644 --- a/kio/kio/slave.h +++ b/kio/kio/slave.h @@ -32,16 +32,16 @@ #include "kio/slaveinterface.h" #include "kio/connection.h" -class KServerSocket; -class KSocket; +class TDEServerSocket; +class TDESocket; -namespace KIO { +namespace TDEIO { - /** Attention developers: If you change the implementation of KIO::Slave, - * do *not* use connection() or slaveconn but the respective KIO::Slave + /** Attention developers: If you change the implementation of TDEIO::Slave, + * do *not* use connection() or slaveconn but the respective TDEIO::Slave * accessor methods. Otherwise classes derived from Slave might break. (LS) */ - class KIO_EXPORT Slave : public KIO::SlaveInterface + class KIO_EXPORT Slave : public TDEIO::SlaveInterface { Q_OBJECT @@ -53,11 +53,11 @@ namespace KIO { * @internal * @since 3.2 */ - Slave(bool derived, KServerSocket *unixdomain, const TQString &protocol, + Slave(bool derived, TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname); // TODO(BIC): Remove in KDE 4 public: - Slave(KServerSocket *unixdomain, + Slave(TDEServerSocket *unixdomain, const TQString &protocol, const TQString &socketname); virtual ~Slave(); @@ -202,7 +202,7 @@ namespace KIO { void setConnected(bool c) { contacted = c; } /** @deprecated This method is obsolete, use the accessor methods - * within KIO::Slave instead. Old code directly accessing connection() + * within TDEIO::Slave instead. Old code directly accessing connection() * will not be able to access special protocols. */ KDE_DEPRECATED Connection *connection() { return &slaveconn; } // TODO(BIC): remove before KDE 4 @@ -211,11 +211,11 @@ namespace KIO { void deref() { m_refCount--; if (!m_refCount) delete this; } public slots: - void accept(KSocket *socket); + void accept(TDESocket *socket); void gotInput(); void timeout(); signals: - void slaveDied(KIO::Slave *slave); + void slaveDied(TDEIO::Slave *slave); protected: void unlinkSocket(); @@ -227,14 +227,14 @@ namespace KIO { int m_port; TQString m_user; TQString m_passwd; - KServerSocket *serv; + TDEServerSocket *serv; TQString m_socket; pid_t m_pid; bool contacted; bool dead; time_t contact_started; time_t idle_since; - KIO::Connection slaveconn; + TDEIO::Connection slaveconn; int m_refCount; protected: virtual void virtual_hook( int id, void* data ); diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp index d2e807077..07d784527 100644 --- a/kio/kio/slavebase.cpp +++ b/kio/kio/slavebase.cpp @@ -66,7 +66,7 @@ #endif #endif -using namespace KIO; +using namespace TDEIO; template class TQPtrList<TQValueList<UDSAtom> >; typedef TQValueList<TQCString> AuthKeysList; @@ -74,9 +74,9 @@ typedef TQMap<TQString,TQCString> AuthKeysMap; #define KIO_DATA TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream #define KIO_FILESIZE_T(x) (unsigned long)(x & 0xffffffff) << (unsigned long)(x >> 32) -namespace KIO { +namespace TDEIO { -class SlaveBaseConfig : public KConfigBase +class SlaveBaseConfig : public TDEConfigBase { public: SlaveBaseConfig(SlaveBase *_slave) @@ -124,8 +124,8 @@ public: KURL onHoldUrl; struct timeval last_tv; - KIO::filesize_t totalSize; - KIO::filesize_t sentListEntries; + TDEIO::filesize_t totalSize; + TDEIO::filesize_t sentListEntries; DCOPClient *dcopClient; KRemoteEncoding *remotefile; time_t timeout; @@ -341,8 +341,8 @@ void SlaveBase::dispatchLoop() void SlaveBase::connectSlave(const TQString& path) { -#ifdef Q_OS_UNIX //TODO: KSocket not yet available on WIN32 - appconn->init(new KSocket(TQFile::encodeName(path).data())); +#ifdef Q_OS_UNIX //TODO: TDESocket not yet available on WIN32 + appconn->init(new TDESocket(TQFile::encodeName(path).data())); if (!appconn->inited()) { kdDebug(7019) << "SlaveBase: failed to connect to " << path << endl; @@ -389,7 +389,7 @@ bool SlaveBase::hasMetaData(const TQString &key) { return const_cast<const SlaveBase*>(this)->hasMetaData( key ); } -KConfigBase *SlaveBase::config() +TDEConfigBase *SlaveBase::config() { return d->config; } @@ -485,7 +485,7 @@ void SlaveBase::canResume() m_pConnection->send( MSG_CANRESUME ); } -void SlaveBase::totalSize( KIO::filesize_t _bytes ) +void SlaveBase::totalSize( TDEIO::filesize_t _bytes ) { KIO_DATA << KIO_FILESIZE_T(_bytes); slaveWriteError = false; @@ -501,7 +501,7 @@ void SlaveBase::totalSize( KIO::filesize_t _bytes ) d->sentListEntries=0; } -void SlaveBase::processedSize( KIO::filesize_t _bytes ) +void SlaveBase::processedSize( TDEIO::filesize_t _bytes ) { bool emitSignal=false; struct timeval tv; @@ -872,7 +872,7 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg ) else stream << info << errorMsg << windowId << s_seqNr << userTimestamp; - bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, TQString, long int, long int, unsigned long int)", + bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(TDEIO::AuthInfo, TQString, long int, long int, unsigned long int)", params, replyType, reply ); if (progressId) @@ -884,7 +884,7 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg ) return false; } - if ( replyType == "KIO::AuthInfo" ) + if ( replyType == "TDEIO::AuthInfo" ) { TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> authResult >> s_seqNr; @@ -892,7 +892,7 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg ) else { kdError(7019) << "DCOP function queryAuthInfo(...) returns " - << replyType << ", expected KIO::AuthInfo" << endl; + << replyType << ", expected TDEIO::AuthInfo" << endl; return false; } @@ -930,9 +930,9 @@ int SlaveBase::messageBox( const TQString &text, MessageBoxType type, const TQSt return 0; // communication failure } -bool SlaveBase::canResume( KIO::filesize_t offset ) +bool SlaveBase::canResume( TDEIO::filesize_t offset ) { - kdDebug(7019) << "SlaveBase::canResume offset=" << KIO::number(offset) << endl; + kdDebug(7019) << "SlaveBase::canResume offset=" << TDEIO::number(offset) << endl; d->needSendCanResume = false; KIO_DATA << KIO_FILESIZE_T(offset); m_pConnection->send( MSG_RESUME, data ); @@ -1216,14 +1216,14 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info ) TQDataStream stream(params, IO_WriteOnly); stream << info << windowId << userTimestamp; - if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int, unsigned long int)", + if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(TDEIO::AuthInfo, long int, unsigned long int)", params, replyType, reply ) ) { kdWarning(7019) << "Can't communicate with kded_kpasswdserver!" << endl; return false; } - if ( replyType == "KIO::AuthInfo" ) + if ( replyType == "TDEIO::AuthInfo" ) { TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> authResult; @@ -1231,7 +1231,7 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info ) else { kdError(7019) << "DCOP function checkAuthInfo(...) returns " - << replyType << ", expected KIO::AuthInfo" << endl; + << replyType << ", expected TDEIO::AuthInfo" << endl; return false; } if (!authResult.isModified()) @@ -1253,7 +1253,7 @@ bool SlaveBase::cacheAuthentication( const AuthInfo& info ) TQDataStream stream(params, IO_WriteOnly); stream << info << windowId; - d->dcopClient->send( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo, long int)", params ); + d->dcopClient->send( "kded", "kpasswdserver", "addAuthInfo(TDEIO::AuthInfo, long int)", params ); return true; } diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h index b6e48d5b6..332646875 100644 --- a/kio/kio/slavebase.h +++ b/kio/kio/slavebase.h @@ -28,7 +28,7 @@ class DCOPClient; class KRemoteEncoding; -namespace KIO { +namespace TDEIO { class Connection; class SlaveBasePrivate; @@ -93,7 +93,7 @@ public: * Call to signal an error. * This also finishes the job, no need to call finished. * - * If the Error code is KIO::ERR_SLAVE_DEFINED then the + * If the Error code is TDEIO::ERR_SLAVE_DEFINED then the * _text should contain the complete translated text of * of the error message. This message will be displayed * in an KTextBrowser which allows rich text complete @@ -101,9 +101,9 @@ public: * mailer, "exec:/command arg1 arg2" will be forked and * all other links will call the default browser. * - * @see KIO::Error + * @see TDEIO::Error * @see KTextBrowser - * @param _errid the error code from KIO::Error + * @param _errid the error code from TDEIO::Error * @param _text the rich text error message */ void error( int _errid, const TQString &_text ); @@ -154,7 +154,7 @@ public: * In this case, the boolean returns whether we can indeed resume or not * (we can't if the protocol doing the get() doesn't support setting an offset) */ - bool canResume( KIO::filesize_t offset ); + bool canResume( TDEIO::filesize_t offset ); /* * Call this at the beginning of get(), if the "resume" metadata was set @@ -171,13 +171,13 @@ public: * of the file * Call in listDir too, when you know the total number of items. */ - void totalSize( KIO::filesize_t _bytes ); + void totalSize( TDEIO::filesize_t _bytes ); /** * Call this during get and copy, once in a while, * to give some info about the current state. * Don't emit it in listDir, listEntries speaks for itself. */ - void processedSize( KIO::filesize_t _bytes ); + void processedSize( TDEIO::filesize_t _bytes ); /** * Only use this if you can't know in advance the size of the @@ -317,7 +317,7 @@ public: * The application provides the slave with all configuration information * relevant for the current protocol and host. */ - KConfigBase* config(); + TDEConfigBase* config(); /** * Returns an object that can translate remote filenames into proper @@ -621,7 +621,7 @@ public: * simple example: * * \code - * KIO::AuthInfo authInfo; + * TDEIO::AuthInfo authInfo; * if ( openPassDlg( authInfo ) ) * { * kdDebug() << TQString::fromLatin1("User: ") @@ -635,7 +635,7 @@ public: * comment as follows: * * \code - * KIO::AuthInfo authInfo; + * TDEIO::AuthInfo authInfo; * authInfo.caption= "Acme Password Dialog"; * authInfo.username= "Wile E. Coyote"; * TQString errorMsg = "You entered an incorrect password."; @@ -661,13 +661,13 @@ public: * @return @p true if user clicks on "OK", @p false otherwsie. * @since 3.1 */ - bool openPassDlg( KIO::AuthInfo& info, const TQString &errorMsg ); + bool openPassDlg( TDEIO::AuthInfo& info, const TQString &errorMsg ); /** * Same as above function except it does not need error message. * BIC: Combine this function with the above for KDE4. */ - bool openPassDlg( KIO::AuthInfo& info ); + bool openPassDlg( TDEIO::AuthInfo& info ); /** * Checks for cached authentication based on parameters diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp index 9ce4a86a0..c0ec44779 100644 --- a/kio/kio/slaveconfig.cpp +++ b/kio/kio/slaveconfig.cpp @@ -31,9 +31,9 @@ #include "slaveconfig.h" -using namespace KIO; +using namespace TDEIO; -namespace KIO { +namespace TDEIO { class SlaveConfigProtocol { @@ -47,10 +47,10 @@ public: public: MetaData global; TQDict<MetaData> host; - KConfig *configFile; + TDEConfig *configFile; }; -static void readConfig(KConfig *config, const TQString & group, MetaData *metaData) +static void readConfig(TDEConfig *config, const TQString & group, MetaData *metaData) { *metaData += config->entryMap(group); } @@ -71,7 +71,7 @@ void SlaveConfigPrivate::readGlobalConfig() { global.clear(); // Read stuff... - KConfig *config = KProtocolManager::config(); + TDEConfig *config = KProtocolManager::config(); readConfig(TDEGlobal::config(), "Socks", &global); // Socks settings. if ( config ) readConfig(config, "<default>", &global); @@ -84,7 +84,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_pro { TQString filename = KProtocolInfo::config(_protocol); scp = new SlaveConfigProtocol; - scp->configFile = new KConfig(filename, true, false); + scp->configFile = new TDEConfig(filename, true, false); protocol.insert(_protocol, scp); } // Read global stuff... diff --git a/kio/kio/slaveconfig.h b/kio/kio/slaveconfig.h index a7ded457d..59abb74ac 100644 --- a/kio/kio/slaveconfig.h +++ b/kio/kio/slaveconfig.h @@ -24,7 +24,7 @@ #include <tqobject.h> #include <kio/global.h> -namespace KIO { +namespace TDEIO { class SlaveConfigPrivate; /** diff --git a/kio/kio/slaveinterface.cpp b/kio/kio/slaveinterface.cpp index 05036cf8a..5ba2f6e86 100644 --- a/kio/kio/slaveinterface.cpp +++ b/kio/kio/slaveinterface.cpp @@ -32,10 +32,10 @@ #include <time.h> #include <tqtimer.h> -using namespace KIO; +using namespace TDEIO; -TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e ) +TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSEntry &e ) { // On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front // of it to carry the 32 msb. We can't send a 64 bit UDS_SIZE because @@ -44,21 +44,21 @@ TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e ) // environment. TQ_UINT32 size = 0; - KIO::UDSEntry::ConstIterator it = e.begin(); + TDEIO::UDSEntry::ConstIterator it = e.begin(); for( ; it != e.end(); ++it ) { size++; - if ((*it).m_uds == KIO::UDS_SIZE) + if ((*it).m_uds == TDEIO::UDS_SIZE) size++; } s << size; it = e.begin(); for( ; it != e.end(); ++it ) { - if ((*it).m_uds == KIO::UDS_SIZE) + if ((*it).m_uds == TDEIO::UDS_SIZE) { - KIO::UDSAtom a; - a.m_uds = KIO::UDS_SIZE_LARGE; + TDEIO::UDSAtom a; + a.m_uds = TDEIO::UDS_SIZE_LARGE; a.m_long = (*it).m_long >> 32; s << a; } @@ -67,7 +67,7 @@ TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e ) return s; } -TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e ) +TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSEntry &e ) { e.clear(); TQ_UINT32 size; @@ -81,15 +81,15 @@ TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e ) TQ_LLONG msb = 0; for(TQ_UINT32 i = 0; i < size; i++) { - KIO::UDSAtom a; + TDEIO::UDSAtom a; s >> a; - if (a.m_uds == KIO::UDS_SIZE_LARGE) + if (a.m_uds == TDEIO::UDS_SIZE_LARGE) { msb = a.m_long; } else { - if (a.m_uds == KIO::UDS_SIZE) + if (a.m_uds == TDEIO::UDS_SIZE) { if (a.m_long < 0) a.m_long += (TQ_LLONG) 1 << 32; @@ -104,7 +104,7 @@ TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e ) static const unsigned int max_nums = 8; -class KIO::SlaveInterfacePrivate +class TDEIO::SlaveInterfacePrivate { public: SlaveInterfacePrivate() { @@ -120,9 +120,9 @@ public: struct timeval start_time; uint nums; long times[max_nums]; - KIO::filesize_t sizes[max_nums]; + TDEIO::filesize_t sizes[max_nums]; size_t last_time; - KIO::filesize_t filesize, offset; + TDEIO::filesize_t filesize, offset; TQTimer speed_timer; }; @@ -146,16 +146,16 @@ SlaveInterface::~SlaveInterface() delete d; } -static KIO::filesize_t readFilesize_t(TQDataStream &stream) +static TDEIO::filesize_t readFilesize_t(TQDataStream &stream) { - KIO::filesize_t result; + TDEIO::filesize_t result; unsigned long ul; stream >> ul; result = ul; if (stream.atEnd()) return result; stream >> ul; - result += ((KIO::filesize_t)ul) << 32; + result += ((TDEIO::filesize_t)ul) << 32; return result; } @@ -199,7 +199,7 @@ void SlaveInterface::calcSpeed() d->times[d->nums] = diff; d->sizes[d->nums++] = d->filesize - d->offset; - KIO::filesize_t lspeed = 1000 * (d->sizes[d->nums-1] - d->sizes[0]) / (d->times[d->nums-1] - d->times[0]); + TDEIO::filesize_t lspeed = 1000 * (d->sizes[d->nums-1] - d->sizes[0]) / (d->times[d->nums-1] - d->times[0]); // kdDebug() << "proceeed " << (long)d->filesize << " " << diff << " " // << long(d->sizes[d->nums-1] - d->sizes[0]) << " " @@ -293,7 +293,7 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata ) case INF_TOTAL_SIZE: { - KIO::filesize_t size = readFilesize_t(stream); + TDEIO::filesize_t size = readFilesize_t(stream); gettimeofday(&d->start_time, 0); d->last_time = 0; d->filesize = d->offset; @@ -307,7 +307,7 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata ) break; case INF_PROCESSED_SIZE: { - KIO::filesize_t size = readFilesize_t(stream); + TDEIO::filesize_t size = readFilesize_t(stream); emit processedSize( size ); d->filesize = size; } @@ -423,12 +423,12 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata ) return true; } -void SlaveInterface::setOffset( KIO::filesize_t o) +void SlaveInterface::setOffset( TDEIO::filesize_t o) { d->offset = o; } -KIO::filesize_t SlaveInterface::offset() const { return d->offset; } +TDEIO::filesize_t SlaveInterface::offset() const { return d->offset; } void SlaveInterface::requestNetwork(const TQString &host, const TQString &slaveid) { @@ -510,7 +510,7 @@ void SlaveInterface::messageBox( int type, const TQString &text, const TQString TQDataStream stream( packedArgs, IO_WriteOnly ); TQString caption( _caption ); - if ( type == KIO::SlaveBase::SSLMessageBox ) + if ( type == TDEIO::SlaveBase::SSLMessageBox ) caption = TQString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp emit needProgressId(); diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h index 9d278adfc..79d797e08 100644 --- a/kio/kio/slaveinterface.h +++ b/kio/kio/slaveinterface.h @@ -30,7 +30,7 @@ #include <kio/authinfo.h> #include <kdatastream.h> -namespace KIO { +namespace TDEIO { class Connection; // better there is one ... @@ -85,7 +85,7 @@ class SlaveInterfacePrivate; /** * There are two classes that specifies the protocol between application - * (KIO::Job) and kioslave. SlaveInterface is the class to use on the application + * (TDEIO::Job) and kioslave. SlaveInterface is the class to use on the application * end, SlaveBase is the one to use on the slave end. * * A call to foo() results in a call to slotFoo() on the other end. @@ -109,8 +109,8 @@ public: */ void sendResumeAnswer( bool resume ); - void setOffset( KIO::filesize_t offset ); - KIO::filesize_t offset() const; + void setOffset( TDEIO::filesize_t offset ); + TDEIO::filesize_t offset() const; signals: /////////// @@ -123,19 +123,19 @@ signals: void connected(); void finished(); void slaveStatus(pid_t, const TQCString &, const TQString &, bool); - void listEntries( const KIO::UDSEntryList& ); - void statEntry( const KIO::UDSEntry& ); + void listEntries( const TDEIO::UDSEntryList& ); + void statEntry( const TDEIO::UDSEntry& ); void needSubURLData(); void needProgressId(); - void canResume( KIO::filesize_t ) ; + void canResume( TDEIO::filesize_t ) ; /////////// // Info sent by the slave ////////// - void metaData( const KIO::MetaData & ); - void totalSize( KIO::filesize_t ) ; - void processedSize( KIO::filesize_t ) ; + void metaData( const TDEIO::MetaData & ); + void totalSize( TDEIO::filesize_t ) ; + void processedSize( TDEIO::filesize_t ) ; void redirection( const KURL& ) ; void localURL( const KURL&, bool ) ; @@ -172,7 +172,7 @@ protected: * using default values: * * \code - * KIO::AuthInfo authInfo; + * TDEIO::AuthInfo authInfo; * bool result = openPassDlg( authInfo ); * if ( result ) * { @@ -203,7 +203,7 @@ protected: * @param info See AuthInfo. * @return true if user clicks on "OK", false otherwsie. */ - void openPassDlg( KIO::AuthInfo& info ); + void openPassDlg( TDEIO::AuthInfo& info ); /** * @deprecated. Use openPassDlg( AuthInfo& ) instead. @@ -252,16 +252,16 @@ private: } -inline TQDataStream &operator >>(TQDataStream &s, KIO::UDSAtom &a ) +inline TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSAtom &a ) { TQ_INT32 l; s >> a.m_uds; - if ( a.m_uds & KIO::UDS_LONG ) { + if ( a.m_uds & TDEIO::UDS_LONG ) { s >> l; a.m_long = l; a.m_str = TQString::null; - } else if ( a.m_uds & KIO::UDS_STRING ) { + } else if ( a.m_uds & TDEIO::UDS_STRING ) { s >> a.m_str; a.m_long = 0; } else {} // DIE! @@ -270,13 +270,13 @@ inline TQDataStream &operator >>(TQDataStream &s, KIO::UDSAtom &a ) return s; } -inline TQDataStream &operator <<(TQDataStream &s, const KIO::UDSAtom &a ) +inline TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSAtom &a ) { s << a.m_uds; - if ( a.m_uds & KIO::UDS_LONG ) + if ( a.m_uds & TDEIO::UDS_LONG ) s << (TQ_INT32) a.m_long; - else if ( a.m_uds & KIO::UDS_STRING ) + else if ( a.m_uds & TDEIO::UDS_STRING ) s << a.m_str; else {} // DIE! // assert( 0 ); @@ -284,7 +284,7 @@ inline TQDataStream &operator <<(TQDataStream &s, const KIO::UDSAtom &a ) return s; } -KIO_EXPORT TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e ); -KIO_EXPORT TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e ); +KIO_EXPORT TQDataStream &operator <<(TQDataStream &s, const TDEIO::UDSEntry &e ); +KIO_EXPORT TQDataStream &operator >>(TQDataStream &s, TDEIO::UDSEntry &e ); #endif diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp index 777f96e58..66517ca03 100644 --- a/kio/kio/statusbarprogress.cpp +++ b/kio/kio/statusbarprogress.cpp @@ -30,7 +30,7 @@ #include "jobclasses.h" #include "statusbarprogress.h" -namespace KIO { +namespace TDEIO { StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button ) : ProgressBase( parent ) { @@ -71,7 +71,7 @@ StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button ) } -void StatusbarProgress::setJob( KIO::Job *job ) +void StatusbarProgress::setJob( TDEIO::Job *job ) { ProgressBase::setJob( job ); @@ -118,20 +118,20 @@ void StatusbarProgress::slotClean() { } -void StatusbarProgress::slotTotalSize( KIO::Job*, KIO::filesize_t size ) { +void StatusbarProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t size ) { m_iTotalSize = size; // size is measured in bytes } -void StatusbarProgress::slotPercent( KIO::Job*, unsigned long percent ) { +void StatusbarProgress::slotPercent( TDEIO::Job*, unsigned long percent ) { m_pProgressBar->setValue( percent ); } -void StatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) { +void StatusbarProgress::slotSpeed( TDEIO::Job*, unsigned long speed ) { if ( speed == 0 ) { // spped is measured in bytes-per-second m_pLabel->setText( i18n( " Stalled ") ); } else { - m_pLabel->setText( i18n( " %1/s ").arg( KIO::convertSize( speed )) ); + m_pLabel->setText( i18n( " %1/s ").arg( TDEIO::convertSize( speed )) ); } } diff --git a/kio/kio/statusbarprogress.h b/kio/kio/statusbarprogress.h index 6fb460283..58bd77fa9 100644 --- a/kio/kio/statusbarprogress.h +++ b/kio/kio/statusbarprogress.h @@ -27,7 +27,7 @@ class TQPushButton; class TQLabel; class KProgress; -namespace KIO { +namespace TDEIO { class Job; @@ -49,7 +49,7 @@ class Job; * statusBar()->insertWidget( statusProgress, statusProgress->width() , 0 ); * ... * // create job and connect it to the progress -* CopyJob* job = KIO::copy(...); +* CopyJob* job = TDEIO::copy(...); * statusProgress->setJob( job ); * ... * \endcode @@ -76,20 +76,20 @@ public: * Sets the job to monitor. * @param job the job to monitor */ - void setJob( KIO::Job *job ); + void setJob( TDEIO::Job *job ); public slots: virtual void slotClean(); - virtual void slotTotalSize( KIO::Job* job, KIO::filesize_t size ); - virtual void slotPercent( KIO::Job* job, unsigned long percent ); - virtual void slotSpeed( KIO::Job* job, unsigned long speed ); + virtual void slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ); + virtual void slotPercent( TDEIO::Job* job, unsigned long percent ); + virtual void slotSpeed( TDEIO::Job* job, unsigned long speed ); protected: KProgress* m_pProgressBar; TQLabel* m_pLabel; TQPushButton* m_pButton; - KIO::filesize_t m_iTotalSize; + TDEIO::filesize_t m_iTotalSize; enum Mode { None, Label, Progress }; diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp index dc556ea23..8d3cc49ff 100644 --- a/kio/kio/tcpslavebase.cpp +++ b/kio/kio/tcpslavebase.cpp @@ -60,7 +60,7 @@ #include "kio/tcpslavebase.h" -using namespace KIO; +using namespace TDEIO; class TCPSlaveBase::TcpSlaveBasePrivate { @@ -327,7 +327,7 @@ bool TCPSlaveBase::connectToHost( const TQString &host, "WarnOnLeaveSSLMode" ); // Move this setting into KSSL instead - KConfig *config = new KConfig("kioslaverc"); + TDEConfig *config = new TDEConfig("kioslaverc"); config->setGroup("Notification Messages"); if (!config->readBoolEntry("WarnOnLeaveSSLMode", true)) { @@ -369,7 +369,7 @@ bool TCPSlaveBase::connectToHost( const TQString &host, m_iSock = ks.fd(); // store the IP for later - const KSocketAddress *sa = ks.peerAddress(); + const TDESocketAddress *sa = ks.peerAddress(); if (sa) d->ip = sa->nodeName(); else @@ -671,7 +671,7 @@ KSSLCertificateHome::KSSLAuthAction aa; // We're almost committed. If we can read the cert, we'll send it now. KSSLPKCS12 *pkcs = KSSLCertificateHome::getCertificateByName(certname); if (!pkcs && KSSLCertificateHome::hasCertificateByName(certname)) { // We need the password - KIO::AuthInfo ai; + TDEIO::AuthInfo ai; bool first = true; do { ai.prompt = i18n("Enter the certificate password:"); @@ -906,7 +906,7 @@ int TCPSlaveBase::verifyCertificate() arg << theurl << mOutgoingMetaData; arg << metaData("window-id").toInt(); d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,KIO::MetaData,int)", + "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", data, ignoretype, ignore); } } while (result == KMessageBox::Yes); @@ -1033,7 +1033,7 @@ int TCPSlaveBase::verifyCertificate() arg << theurl << mOutgoingMetaData; arg << metaData("window-id").toInt(); d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,KIO::MetaData,int)", + "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", data, ignoretype, ignore); } } while (result == KMessageBox::Yes); @@ -1090,7 +1090,7 @@ int TCPSlaveBase::verifyCertificate() i18n("C&onnect"), "WarnOnEnterSSLMode" ); // Move this setting into KSSL instead - KConfig *config = new KConfig("kioslaverc"); + TDEConfig *config = new TDEConfig("kioslaverc"); config->setGroup("Notification Messages"); if (!config->readBoolEntry("WarnOnEnterSSLMode", true)) { @@ -1117,7 +1117,7 @@ int TCPSlaveBase::verifyCertificate() arg << theurl << mOutgoingMetaData; arg << metaData("window-id").toInt(); d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(TQString,KIO::MetaData,int)", + "showSSLInfoDialog(TQString,TDEIO::MetaData,int)", data, ignoretype, ignore); } } while (result != KMessageBox::No); diff --git a/kio/kio/tcpslavebase.h b/kio/kio/tcpslavebase.h index fd148b00d..8a4e436ce 100644 --- a/kio/kio/tcpslavebase.h +++ b/kio/kio/tcpslavebase.h @@ -31,7 +31,7 @@ #include <kio/slavebase.h> -namespace KIO { +namespace TDEIO { /** * There are two classes that specifies the protocol between application (job) diff --git a/kio/kio/thumbcreator.h b/kio/kio/thumbcreator.h index 3ad6ca8aa..79d499e7f 100644 --- a/kio/kio/thumbcreator.h +++ b/kio/kio/thumbcreator.h @@ -26,7 +26,7 @@ class TQString; class TQImage; /** * This is the baseclass for "thumbnail-plugins" in KDE. Using the class - * KIO::PreviewJob allows you to generate small images (thumbnails) + * TDEIO::PreviewJob allows you to generate small images (thumbnails) * for any kind of file, where a "ThumbCreator" is available. Have a look * at tdebase/kioslave/thumbnail/ for existing ThumbCreators. * diff --git a/kio/kioexec/main.cpp b/kio/kioexec/main.cpp index 22c539a75..40badcbe0 100644 --- a/kio/kioexec/main.cpp +++ b/kio/kioexec/main.cpp @@ -61,11 +61,11 @@ static KCmdLineOptions options[] = int jobCounter = 0; -TQPtrList<KIO::Job>* jobList = 0L; +TQPtrList<TDEIO::Job>* jobList = 0L; KIOExec::KIOExec() { - jobList = new TQPtrList<KIO::Job>; + jobList = new TQPtrList<TDEIO::Job>; jobList->setAutoDelete( false ); // jobs autodelete themselves TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); @@ -83,7 +83,7 @@ KIOExec::KIOExec() { KURL url = args->url(i); // we need to map system:/ etc to make sure we get this right - url = KIO::NetAccess::mostLocalURL( url, 0 ); + url = TDEIO::NetAccess::mostLocalURL( url, 0 ); //kdDebug() << "url=" << url.url() << " filename=" << url.fileName() << endl; // A local file, not an URL ? @@ -105,7 +105,7 @@ KIOExec::KIOExec() else // We must fetch the file { - TQString fileName = KIO::encodeFileName( url.fileName() ); + TQString fileName = TDEIO::encodeFileName( url.fileName() ); if ( !suggestedFileName.isEmpty() ) fileName = suggestedFileName; // Build the destination filename, in ~/.trinity/cache-*/krun/ @@ -122,10 +122,10 @@ KIOExec::KIOExec() KURL dest; dest.setPath( tmp ); kdDebug() << "Copying " << url.prettyURL() << " to " << dest << endl; - KIO::Job *job = KIO::file_copy( url, dest ); + TDEIO::Job *job = TDEIO::file_copy( url, dest ); jobList->append( job ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), TQT_SLOT( slotResult( TDEIO::Job * ) ) ); } } } @@ -143,16 +143,16 @@ KIOExec::KIOExec() slotResult( 0L ); } -void KIOExec::slotResult( KIO::Job * job ) +void KIOExec::slotResult( TDEIO::Job * job ) { if (job && job->error()) { // That error dialog would be queued, i.e. not immediate... //job->showErrorDialog(); - if ( (job->error() != KIO::ERR_USER_CANCELED) ) + if ( (job->error() != TDEIO::ERR_USER_CANCELED) ) KMessageBox::error( 0L, job->errorString() ); - TQString path = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); + TQString path = static_cast<TDEIO::FileCopyJob*>(job)->destURL().path(); TQValueList<fileInfo>::Iterator it = fileList.begin(); for(;it != fileList.end(); ++it) @@ -164,7 +164,7 @@ void KIOExec::slotResult( KIO::Job * job ) if ( it != fileList.end() ) fileList.remove( it ); else - kdDebug() << static_cast<KIO::FileCopyJob*>(job)->destURL().path() << " not found in list" << endl; + kdDebug() << static_cast<TDEIO::FileCopyJob*>(job)->destURL().path() << " not found in list" << endl; } counter++; @@ -246,9 +246,9 @@ void KIOExec::slotRunApp() { kdDebug() << TQString(TQString("src='%1' dest='%2'").arg(src).arg(dest.url())).ascii() << endl; // Do it the synchronous way. - if ( !KIO::NetAccess::upload( src, dest, 0 ) ) + if ( !TDEIO::NetAccess::upload( src, dest, 0 ) ) { - KMessageBox::error( 0L, KIO::NetAccess::lastErrorString() ); + KMessageBox::error( 0L, TDEIO::NetAccess::lastErrorString() ); continue; // don't delete the temp file } } diff --git a/kio/kioexec/main.h b/kio/kioexec/main.h index 6a5dee65e..beb6a2297 100644 --- a/kio/kioexec/main.h +++ b/kio/kioexec/main.h @@ -6,7 +6,7 @@ #include <tqstrlist.h> #include <tqtimer.h> -namespace KIO { class Job; } +namespace TDEIO { class Job; } class KIOExec : public TQObject { @@ -15,7 +15,7 @@ public: KIOExec(); public slots: - void slotResult( KIO::Job * ); + void slotResult( TDEIO::Job * ); void slotRunApp(); protected: diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp index 0f7b2cc58..7b140c467 100644 --- a/kio/kpasswdserver/kpasswdserver.cpp +++ b/kio/kpasswdserver/kpasswdserver.cpp @@ -100,7 +100,7 @@ static TQString makeMapKey( const char* key, int entryNumber ) return str; } -static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const KIO::AuthInfo &info ) +static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const TDEIO::AuthInfo &info ) { if ( !wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) ) if ( !wallet->createFolder( KWallet::Wallet::PasswordFolder() ) ) @@ -175,14 +175,14 @@ static bool readFromWallet( KWallet::Wallet* wallet, const TQString& key, const return false; } -KIO::AuthInfo -KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId) +TDEIO::AuthInfo +KPasswdServer::checkAuthInfo(TDEIO::AuthInfo info, long windowId) { return checkAuthInfo(info, windowId, 0); } -KIO::AuthInfo -KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long usertime) +TDEIO::AuthInfo +KPasswdServer::checkAuthInfo(TDEIO::AuthInfo info, long windowId, unsigned long usertime) { kdDebug(130) << "KPasswdServer::checkAuthInfo: User= " << info.username << ", WindowId = " << windowId << endl; @@ -242,14 +242,14 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us return copyAuthInfo(result); } -KIO::AuthInfo -KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr) +TDEIO::AuthInfo +KPasswdServer::queryAuthInfo(TDEIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr) { return queryAuthInfo(info, errorMsg, windowId, seqNr, 0 ); } -KIO::AuthInfo -KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr, unsigned long usertime) +TDEIO::AuthInfo +KPasswdServer::queryAuthInfo(TDEIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr, unsigned long usertime) { kdDebug(130) << "KPasswdServer::queryAuthInfo: User= " << info.username << ", Message= " << info.prompt << ", WindowId = " << windowId << endl; @@ -285,7 +285,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowI } void -KPasswdServer::addAuthInfo(KIO::AuthInfo info, long windowId) +KPasswdServer::addAuthInfo(TDEIO::AuthInfo info, long windowId) { kdDebug(130) << "KPasswdServer::addAuthInfo: User= " << info.username << ", RealmValue= " << info.realmValue << ", WindowId = " << windowId << endl; @@ -316,7 +316,7 @@ KPasswdServer::processRequest() if (!request) return; - KIO::AuthInfo &info = request->info; + TDEIO::AuthInfo &info = request->info; kdDebug(130) << "KPasswdServer::processRequest: User= " << info.username << ", Message= " << info.prompt << endl; @@ -366,7 +366,7 @@ KPasswdServer::processRequest() hasWalletData = readFromWallet( m_wallet, request->key, info.realmValue, username, password, info.readOnly, knownLogins ); } - KIO::PasswordDialog dlg( info.prompt, username, info.keepPassword ); + TDEIO::PasswordDialog dlg( info.prompt, username, info.keepPassword ); if (info.caption.isEmpty()) dlg.setPlainCaption( i18n("Authorization Dialog") ); else @@ -428,7 +428,7 @@ KPasswdServer::processRequest() TQDataStream stream2(replyData, IO_WriteOnly); stream2 << info << m_seqNr; - replyType = "KIO::AuthInfo"; + replyType = "TDEIO::AuthInfo"; request->client->endTransaction( request->transaction, replyType, replyData); @@ -479,11 +479,11 @@ KPasswdServer::processRequest() else { updateAuthExpire(waitRequest->key, result, waitRequest->windowId, false); - KIO::AuthInfo info = copyAuthInfo(result); + TDEIO::AuthInfo info = copyAuthInfo(result); stream2 << info; } - replyType = "KIO::AuthInfo"; + replyType = "TDEIO::AuthInfo"; waitRequest->client->endTransaction( waitRequest->transaction, replyType, replyData); @@ -497,7 +497,7 @@ KPasswdServer::processRequest() } -TQString KPasswdServer::createCacheKey( const KIO::AuthInfo &info ) +TQString KPasswdServer::createCacheKey( const TDEIO::AuthInfo &info ) { if( !info.url.isValid() ) { // Note that a null key will break findAuthInfoItem later on... @@ -524,10 +524,10 @@ TQString KPasswdServer::createCacheKey( const KIO::AuthInfo &info ) return key; } -KIO::AuthInfo +TDEIO::AuthInfo KPasswdServer::copyAuthInfo(const AuthInfo *i) { - KIO::AuthInfo result; + TDEIO::AuthInfo result; result.url = i->url; result.username = i->username; result.password = i->password; @@ -539,7 +539,7 @@ KPasswdServer::copyAuthInfo(const AuthInfo *i) } const KPasswdServer::AuthInfo * -KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) +KPasswdServer::findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info) { AuthInfoList *authList = m_authDict.find(key); if (!authList) @@ -577,7 +577,7 @@ KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) } void -KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) +KPasswdServer::removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info) { AuthInfoList *authList = m_authDict.find(key); if (!authList) @@ -604,7 +604,7 @@ KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info void -KPasswdServer::addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled) +KPasswdServer::addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled) { AuthInfoList *authList = m_authDict.find(key); if (!authList) diff --git a/kio/kpasswdserver/kpasswdserver.h b/kio/kpasswdserver/kpasswdserver.h index cf44681bf..46e7191db 100644 --- a/kio/kpasswdserver/kpasswdserver.h +++ b/kio/kpasswdserver/kpasswdserver.h @@ -46,11 +46,11 @@ public: k_dcop: // KDE4 merge - KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long, unsigned long); - KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long); - KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long, unsigned long); - KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long); - void addAuthInfo(KIO::AuthInfo, long); + TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long, unsigned long); + TDEIO::AuthInfo checkAuthInfo(TDEIO::AuthInfo, long); + TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long, unsigned long); + TDEIO::AuthInfo queryAuthInfo(TDEIO::AuthInfo, TQString, long, long); + void addAuthInfo(TDEIO::AuthInfo, long); public slots: void processRequest(); @@ -60,11 +60,11 @@ public slots: protected: struct AuthInfo; - TQString createCacheKey( const KIO::AuthInfo &info ); - const AuthInfo *findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info); - void removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info); - void addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled); - KIO::AuthInfo copyAuthInfo(const AuthInfo *); + TQString createCacheKey( const TDEIO::AuthInfo &info ); + const AuthInfo *findAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info); + void removeAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info); + void addAuthInfoItem(const TQString &key, const TDEIO::AuthInfo &info, long windowId, long seqNr, bool canceled); + TDEIO::AuthInfo copyAuthInfo(const AuthInfo *); void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep); int findWalletEntry( const TQMap<TQString,TQString>& map, const TQString& username ); bool openWallet( WId windowId ); @@ -100,7 +100,7 @@ protected: DCOPClient *client; DCOPClientTransaction *transaction; TQString key; - KIO::AuthInfo info; + TDEIO::AuthInfo info; TQString errorMsg; long windowId; long seqNr; diff --git a/kio/kssl/TODO b/kio/kssl/TODO index f24761473..7e2270575 100644 --- a/kio/kssl/TODO +++ b/kio/kssl/TODO @@ -15,7 +15,7 @@ - <keygen> is not working. -- Namespace it all to KIO::SSL:: in KDE4 +- Namespace it all to TDEIO::SSL:: in KDE4 - Remove SSLv2 diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc index e327cd68b..9983edceb 100644 --- a/kio/kssl/kopenssl.cc +++ b/kio/kssl/kopenssl.cc @@ -273,12 +273,12 @@ KOpenSSLProxy::KOpenSSLProxy() { KLibLoader *ll = KLibLoader::self(); _ok = false; TQStringList libpaths, libnamesc, libnamess; -KConfig *cfg; +TDEConfig *cfg; _cryptoLib = 0L; _sslLib = 0L; - cfg = new KConfig("cryptodefaults", false, false); + cfg = new TDEConfig("cryptodefaults", false, false); cfg->setGroup("OpenSSL"); TQString upath = cfg->readPathEntry("Path"); if (!upath.isEmpty()) diff --git a/kio/kssl/kssl/certkde b/kio/kssl/kssl/certkde index 2a46393f9..37c924f83 100755 --- a/kio/kssl/kssl/certkde +++ b/kio/kssl/kssl/certkde @@ -3,7 +3,7 @@ eval 'exec perl -S $0 ${1+"$@"}' if $running_under_some_shell; ## -## Generate the KDE CA list KConfig file +## Generate the KDE CA list TDEConfig file ## %CERT = (); diff --git a/kio/kssl/ksslcertificatehome.cc b/kio/kssl/ksslcertificatehome.cc index c722e2c6b..39470c5ab 100644 --- a/kio/kssl/ksslcertificatehome.cc +++ b/kio/kssl/ksslcertificatehome.cc @@ -186,7 +186,7 @@ KSimpleConfig cfg("ksslauthmap", false); TQString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) { -KConfig cfg("cryptodefaults", false); +TDEConfig cfg("cryptodefaults", false); cfg.setGroup("Auth"); if (aa) { diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc index 26f6114a1..eb91ea9cb 100644 --- a/kio/kssl/ksslsettings.cc +++ b/kio/kssl/ksslsettings.cc @@ -96,7 +96,7 @@ public: KSSLSettings::KSSLSettings(bool readConfig) { d = new KSSLSettingsPrivate; - m_cfg = new KConfig("cryptodefaults", false, false); + m_cfg = new TDEConfig("cryptodefaults", false, false); if (!TDEGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl")) { //kdDebug(7029) << "Error adding (kssl, share/apps/kssl)" << endl; diff --git a/kio/kssl/ksslsettings.h b/kio/kssl/ksslsettings.h index 44345937b..1b56a7a3a 100644 --- a/kio/kssl/ksslsettings.h +++ b/kio/kssl/ksslsettings.h @@ -208,7 +208,7 @@ public: void save(); private: - KConfig *m_cfg; + TDEConfig *m_cfg; bool m_bUseSSLv2, m_bUseSSLv3, m_bUseTLSv1; bool m_bWarnOnEnter, m_bWarnOnUnencrypted, m_bWarnOnLeave, m_bWarnOnMixed; bool m_bWarnSelfSigned, m_bWarnRevoked, m_bWarnExpired; diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp index 19417b1fb..c150a732c 100644 --- a/kio/misc/kpac/downloader.cpp +++ b/kio/misc/kpac/downloader.cpp @@ -43,10 +43,10 @@ namespace KPAC m_script = TQString::null; m_scriptURL = url; - KIO::TransferJob* job = KIO::get( url, false, false ); - connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), - TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( result( KIO::Job* ) ) ); + TDEIO::TransferJob* job = TDEIO::get( url, false, false ); + connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + TQT_SLOT( data( TDEIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), TQT_SLOT( result( TDEIO::Job* ) ) ); } void Downloader::failed() @@ -59,16 +59,16 @@ namespace KPAC m_error = error; } - void Downloader::data( KIO::Job*, const TQByteArray& data ) + void Downloader::data( TDEIO::Job*, const TQByteArray& data ) { unsigned offset = m_data.size(); m_data.resize( offset + data.size() ); std::memcpy( m_data.data() + offset, data.data(), data.size() ); } - void Downloader::result( KIO::Job* job ) + void Downloader::result( TDEIO::Job* job ) { - if ( !job->error() && !static_cast< KIO::TransferJob* >( job )->isErrorPage() ) + if ( !job->error() && !static_cast< TDEIO::TransferJob* >( job )->isErrorPage() ) { bool dummy; m_script = TDEGlobal::charsets()->codecForName( diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h index 82418882f..808e09378 100644 --- a/kio/misc/kpac/downloader.h +++ b/kio/misc/kpac/downloader.h @@ -25,7 +25,7 @@ #include <kurl.h> -namespace KIO { class Job; } +namespace TDEIO { class Job; } namespace KPAC { @@ -48,8 +48,8 @@ namespace KPAC void setError( const TQString& ); private slots: - void data( KIO::Job*, const TQByteArray& ); - void result( KIO::Job* ); + void data( TDEIO::Job*, const TQByteArray& ); + void result( TDEIO::Job* ); private: TQByteArray m_data; diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index 36a417b88..d282782fc 100644 --- a/kio/misc/ksendbugmail/smtp.cpp +++ b/kio/misc/ksendbugmail/smtp.cpp @@ -158,7 +158,7 @@ void SMTP::connectTimerTick(void) } kdDebug() << "connecting to " << serverHost << ":" << hostPort << " ..... " << endl; - sock = new KSocket(serverHost.ascii(), hostPort); + sock = new TDESocket(serverHost.ascii(), hostPort); if(sock == 0L || sock->socket() < 0) { timeOutTimer.stop(); @@ -173,8 +173,8 @@ void SMTP::connectTimerTick(void) state = INIT; serverState = NONE; - connect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *))); - connect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *))); + connect(sock, TQT_SIGNAL(readEvent(TDESocket *)), this, TQT_SLOT(socketRead(TDESocket *))); + connect(sock, TQT_SIGNAL(closeEvent(TDESocket *)), this, TQT_SLOT(socketClose(TDESocket *))); // sock->enableRead(true); timeOutTimer.stop(); kdDebug() << "connected" << endl; @@ -202,7 +202,7 @@ void SMTP::interactTimedOut(void) emit error(INTERACTTIMEOUT); } -void SMTP::socketRead(KSocket *socket) +void SMTP::socketRead(TDESocket *socket) { int n, nl; @@ -228,11 +228,11 @@ void SMTP::socketRead(KSocket *socket) interactTimer.start(timeOut, true); } -void SMTP::socketClose(KSocket *socket) +void SMTP::socketClose(TDESocket *socket) { timeOutTimer.stop(); - disconnect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *))); - disconnect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *))); + disconnect(sock, TQT_SIGNAL(readEvent(TDESocket *)), this, TQT_SLOT(socketRead(TDESocket *))); + disconnect(sock, TQT_SIGNAL(closeEvent(TDESocket *)), this, TQT_SLOT(socketClose(TDESocket *))); socket->enableRead(false); kdDebug() << "connection terminated" << endl; connected = false; diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h index 707d20ae4..acdb4a3c3 100644 --- a/kio/misc/ksendbugmail/smtp.h +++ b/kio/misc/ksendbugmail/smtp.h @@ -104,8 +104,8 @@ public slots: void connectTimedOut(); void interactTimedOut(); - void socketRead(KSocket *); - void socketClose(KSocket *); + void socketRead(TDESocket *); + void socketClose(TDESocket *); signals: void connectionClosed(); @@ -131,7 +131,7 @@ private: TQString domainName; - KSocket *sock; + TDESocket *sock; TQTimer connectTimer; TQTimer timeOutTimer; TQTimer interactTimer; diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp index 40c52a1be..22bf6ab84 100644 --- a/kio/misc/kssld/kssld.cpp +++ b/kio/misc/kssld/kssld.cpp @@ -61,7 +61,7 @@ extern "C" { } -static void updatePoliciesConfig(KConfig *cfg) { +static void updatePoliciesConfig(TDEConfig *cfg) { TQStringList groups = cfg->groupList(); for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) { @@ -641,7 +641,7 @@ TQFile out(path); if (!out.open(IO_WriteOnly)) return false; -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); TQStringList x = cfg.groupList(); @@ -677,7 +677,7 @@ KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit()); if (!x) return false; -KConfig cfg("ksslcalist", false, false); +TDEConfig cfg("ksslcalist", false, false); cfg.setGroup(x->getSubject()); cfg.writeEntry("x509", certificate); @@ -766,7 +766,7 @@ bool KSSLD::caRemoveFromFile(TQString filename) { TQStringList KSSLD::caList() { TQStringList x; -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); x = cfg.groupList(); x.remove("<default>"); @@ -776,7 +776,7 @@ return x; bool KSSLD::caUseForSSL(TQString subject) { -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) return false; @@ -788,7 +788,7 @@ return cfg.readBoolEntry("site", false); bool KSSLD::caUseForEmail(TQString subject) { -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) return false; @@ -800,7 +800,7 @@ return cfg.readBoolEntry("email", false); bool KSSLD::caUseForCode(TQString subject) { -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) return false; @@ -811,7 +811,7 @@ return cfg.readBoolEntry("code", false); bool KSSLD::caRemove(TQString subject) { -KConfig cfg("ksslcalist", false, false); +TDEConfig cfg("ksslcalist", false, false); if (!cfg.hasGroup(subject)) return false; @@ -823,7 +823,7 @@ return true; TQString KSSLD::caGetCert(TQString subject) { -KConfig cfg("ksslcalist", true, false); +TDEConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) return TQString::null; @@ -834,7 +834,7 @@ return cfg.readEntry("x509", TQString::null); bool KSSLD::caSetUse(TQString subject, bool ssl, bool email, bool code) { -KConfig cfg("ksslcalist", false, false); +TDEConfig cfg("ksslcalist", false, false); if (!cfg.hasGroup(subject)) return false; diff --git a/kio/misc/ktelnetservice.cpp b/kio/misc/ktelnetservice.cpp index ea8708863..cf1b5694c 100644 --- a/kio/misc/ktelnetservice.cpp +++ b/kio/misc/ktelnetservice.cpp @@ -49,7 +49,7 @@ int main(int argc, char **argv) if (args->count() != 1) return 1; - KConfig *config = new KConfig("kdeglobals", true); + TDEConfig *config = new TDEConfig("kdeglobals", true); config->setGroup("General"); TQString terminal = config->readPathEntry("TerminalApplication", "konsole"); diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp index e87f96c31..afa634c64 100644 --- a/kio/misc/kwalletd/kwalletd.cpp +++ b/kio/misc/kwalletd/kwalletd.cpp @@ -314,7 +314,7 @@ int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, setupDialog( wiz, wId, appid, modal ); int rc = wiz->exec(); if (rc == TQDialog::Accepted) { - KConfig cfg("kwalletrc"); + TDEConfig cfg("kwalletrc"); cfg.setGroup("Wallet"); cfg.writeEntry("First Use", false); cfg.writeEntry("Enabled", wiz->_useWallet->isChecked()); @@ -344,7 +344,7 @@ int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, return -1; } } else if (_firstUse) { - KConfig cfg("kwalletrc"); + TDEConfig cfg("kwalletrc"); _firstUse = false; cfg.setGroup("Wallet"); cfg.writeEntry("First Use", false); @@ -564,7 +564,7 @@ bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, W if (response == 0 || response == 1) { if (response == 1) { - KConfig cfg("kwalletrc"); + TDEConfig cfg("kwalletrc"); cfg.setGroup("Auto Allow"); TQStringList apps = cfg.readListEntry(wallet); if (!apps.contains(thisApp)) { @@ -575,7 +575,7 @@ bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, W } } } else if (response == 3) { - KConfig cfg("kwalletrc"); + TDEConfig cfg("kwalletrc"); cfg.setGroup("Auto Deny"); TQStringList apps = cfg.readListEntry(wallet); if (!apps.contains(thisApp)) { @@ -1343,7 +1343,7 @@ void KWalletD::emitWalletListDirty() { void KWalletD::reconfigure() { - KConfig cfg("kwalletrc"); + TDEConfig cfg("kwalletrc"); cfg.setGroup("Wallet"); _firstUse = cfg.readBoolEntry("First Use", true); _enabled = cfg.readBoolEntry("Enabled", true); diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp index 3e890c553..e898e5a50 100644 --- a/kio/misc/uiserver.cpp +++ b/kio/misc/uiserver.cpp @@ -192,7 +192,7 @@ ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString m_defaultProgressVisible = showDefault; // create dialog, but don't show it - defaultProgress = new KIO::DefaultProgress( false ); + defaultProgress = new TDEIO::DefaultProgress( false ); defaultProgress->setOnlyClean( true ); connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) ); connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) ); @@ -217,11 +217,11 @@ ProgressItem::~ProgressItem() { } -void ProgressItem::setTotalSize( KIO::filesize_t size ) { +void ProgressItem::setTotalSize( TDEIO::filesize_t size ) { m_iTotalSize = size; // It's already in the % column... - //setText( listProgress->lv_total, KIO::convertSize( m_iTotalSize ) ); + //setText( listProgress->lv_total, TDEIO::convertSize( m_iTotalSize ) ); defaultProgress->slotTotalSize( 0, m_iTotalSize ); } @@ -239,10 +239,10 @@ void ProgressItem::setTotalDirs( unsigned long dirs ) { } -void ProgressItem::setProcessedSize( KIO::filesize_t size ) { +void ProgressItem::setProcessedSize( TDEIO::filesize_t size ) { m_iProcessedSize = size; - setText( ListProgress::TB_TOTAL, KIO::convertSize( size ) ); + setText( ListProgress::TB_TOTAL, TDEIO::convertSize( size ) ); defaultProgress->slotProcessedSize( 0, size ); } @@ -264,7 +264,7 @@ void ProgressItem::setProcessedDirs( unsigned long dirs ) { void ProgressItem::setPercent( unsigned long percent ) { - const TQString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles ); + const TQString tmps = TDEIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles ); setText( ListProgress::TB_PROGRESS, tmps ); defaultProgress->slotPercent( 0, percent ); @@ -281,15 +281,15 @@ void ProgressItem::setInfoMessage( const TQString & msg ) { void ProgressItem::setSpeed( unsigned long bytes_per_second ) { m_iSpeed = bytes_per_second; - m_remainingSeconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed ); + m_remainingSeconds = TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed ); TQString tmps, tmps2; if ( m_iSpeed == 0 ) { tmps = i18n( "Stalled"); tmps2 = tmps; } else { - tmps = i18n( "%1/s").arg( KIO::convertSize( m_iSpeed )); - tmps2 = KIO::convertSeconds( m_remainingSeconds ); + tmps = i18n( "%1/s").arg( TDEIO::convertSize( m_iSpeed )); + tmps2 = TDEIO::convertSeconds( m_remainingSeconds ); } setText( ListProgress::TB_SPEED, tmps ); setText( ListProgress::TB_REMAINING_TIME, tmps2 ); @@ -382,7 +382,7 @@ void ProgressItem::setUnmounting( const TQString & point ) { defaultProgress->slotUnmounting( 0, point ); } -void ProgressItem::setCanResume( KIO::filesize_t offset ) { +void ProgressItem::setCanResume( TDEIO::filesize_t offset ) { /* TQString tmps; // set canResume @@ -527,7 +527,7 @@ void ListProgress::applySettings() } void ListProgress::readSettings() { - KConfig config("uiserverrc"); + TDEConfig config("uiserverrc"); // read listview geometry properties config.setGroup( "ProgressList" ); @@ -560,7 +560,7 @@ void ListProgress::columnWidthChanged(int column) } void ListProgress::writeSettings() { - KConfig config("uiserverrc"); + TDEConfig config("uiserverrc"); // write listview geometry properties config.setGroup( "ProgressList" ); @@ -830,9 +830,9 @@ void UIServer::jobFinished( int id ) void UIServer::totalSize( int id, unsigned long size ) { totalSize64(id, size); } -void UIServer::totalSize64( int id, KIO::filesize_t size ) +void UIServer::totalSize64( int id, TDEIO::filesize_t size ) { -// kdDebug(7024) << "UIServer::totalSize " << id << " " << KIO::number(size) << endl; +// kdDebug(7024) << "UIServer::totalSize " << id << " " << TDEIO::number(size) << endl; ProgressItem *item = findItem( id ); if ( item ) { @@ -863,9 +863,9 @@ void UIServer::totalDirs( int id, unsigned long dirs ) void UIServer::processedSize( int id, unsigned long size ) { processedSize64(id, size); } -void UIServer::processedSize64( int id, KIO::filesize_t size ) +void UIServer::processedSize64( int id, TDEIO::filesize_t size ) { - //kdDebug(7024) << "UIServer::processedSize " << id << " " << KIO::number(size) << endl; + //kdDebug(7024) << "UIServer::processedSize " << id << " " << TDEIO::number(size) << endl; ProgressItem *item = findItem( id ); if ( item ) { @@ -926,7 +926,7 @@ void UIServer::infoMessage( int id, const TQString & msg ) void UIServer::canResume( int id, unsigned long offset ) { canResume64(id, offset); } -void UIServer::canResume64( int id, KIO::filesize_t offset ) +void UIServer::canResume64( int id, TDEIO::filesize_t offset ) { //kdDebug(7024) << "UIServer::canResume " << id << " " << offset << endl; @@ -1018,8 +1018,8 @@ void UIServer::unmounting( int id, TQString point ) void UIServer::killJob( TQCString observerAppId, int progressId ) { - // Contact the object "KIO::Observer" in the application <appId> - Observer_stub observer( observerAppId, "KIO::Observer" ); + // Contact the object "TDEIO::Observer" in the application <appId> + Observer_stub observer( observerAppId, "TDEIO::Observer" ); // Tell it to kill the job observer.killJob( progressId ); } @@ -1029,7 +1029,7 @@ void UIServer::slotJobCanceled( ProgressItem *item ) { // kill the corresponding job killJob( item->appId(), item->jobId() ); - // KIO::Job, when killed, should call back jobFinished(), but we can't + // TDEIO::Job, when killed, should call back jobFinished(), but we can't // really rely on that - the app may have crashed delete item; } @@ -1071,7 +1071,7 @@ void UIServer::slotUpdate() { } int iTotalFiles = 0; - KIO::filesize_t iTotalSize = 0; + TDEIO::filesize_t iTotalSize = 0; int iTotalSpeed = 0; unsigned int totalRemTime = 0; // in seconds @@ -1095,11 +1095,11 @@ void UIServer::slotUpdate() { // update statusbar statusBar()->changeItem( i18n( " Files: %1 ").arg( iTotalFiles ), ID_TOTAL_FILES); - statusBar()->changeItem( i18n( "Remaining Size", " Rem. Size: %1 ").arg( KIO::convertSize( iTotalSize ) ), + statusBar()->changeItem( i18n( "Remaining Size", " Rem. Size: %1 ").arg( TDEIO::convertSize( iTotalSize ) ), ID_TOTAL_SIZE); - statusBar()->changeItem( i18n( "Remaining Time", " Rem. Time: %1 ").arg( KIO::convertSeconds( totalRemTime ) ), + statusBar()->changeItem( i18n( "Remaining Time", " Rem. Time: %1 ").arg( TDEIO::convertSeconds( totalRemTime ) ), ID_TOTAL_TIME); - statusBar()->changeItem( i18n( " %1/s ").arg( KIO::convertSize( iTotalSpeed ) ), + statusBar()->changeItem( i18n( " %1/s ").arg( TDEIO::convertSize( iTotalSpeed ) ), ID_TOTAL_SPEED); } @@ -1145,12 +1145,12 @@ void UIServer::slotSelection() { // This code is deprecated, slaves go to Observer::openPassDlg now, // but this is kept for compat (DCOP calls to kio_uiserver). -TQByteArray UIServer::openPassDlg( const KIO::AuthInfo &info ) +TQByteArray UIServer::openPassDlg( const TDEIO::AuthInfo &info ) { kdDebug(7024) << "UIServer::openPassDlg: User= " << info.username << ", Msg= " << info.prompt << endl; - KIO::AuthInfo inf(info); - int result = KIO::PasswordDialog::getNameAndPassword( inf.username, inf.password, + TDEIO::AuthInfo inf(info); + int result = TDEIO::PasswordDialog::getNameAndPassword( inf.username, inf.password, &inf.keepPassword, inf.prompt, inf.readOnly, inf.caption, inf.comment, inf.commentLabel ); @@ -1169,12 +1169,12 @@ int UIServer::messageBox( int progressId, int type, const TQString &text, const return Observer::messageBox( progressId, type, text, caption, buttonYes, buttonNo ); } -void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta) +void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &meta) { return showSSLInfoDialog(url,meta,0); } -void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta, int mainwindow) +void UIServer::showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &meta, int mainwindow) { KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); @@ -1269,8 +1269,8 @@ TQByteArray UIServer::open_RenameDlg64( int id, const TQString & caption, const TQString& src, const TQString & dest, int mode, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, unsigned long ctimeSrc, unsigned long ctimeDest, unsigned long mtimeSrc, @@ -1282,17 +1282,17 @@ TQByteArray UIServer::open_RenameDlg64( int id, if ( item ) setItemVisible( item, false ); TQString newDest; - kdDebug(7024) << "Calling KIO::open_RenameDlg" << endl; - KIO::RenameDlg_Result result = KIO::open_RenameDlg( caption, src, dest, - (KIO::RenameDlg_Mode) mode, newDest, + kdDebug(7024) << "Calling TDEIO::open_RenameDlg" << endl; + TDEIO::RenameDlg_Result result = TDEIO::open_RenameDlg( caption, src, dest, + (TDEIO::RenameDlg_Mode) mode, newDest, sizeSrc, sizeDest, (time_t)ctimeSrc, (time_t)ctimeDest, (time_t)mtimeSrc, (time_t)mtimeDest ); - kdDebug(7024) << "KIO::open_RenameDlg done" << endl; + kdDebug(7024) << "TDEIO::open_RenameDlg done" << endl; TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << TQ_UINT8(result) << newDest; - if ( item && result != KIO::R_CANCEL ) + if ( item && result != TDEIO::R_CANCEL ) setItemVisible( item, true ); return data; } @@ -1305,16 +1305,16 @@ int UIServer::open_SkipDlg( int id, ProgressItem *item = findItem( id ); if ( item ) setItemVisible( item, false ); - kdDebug(7024) << "Calling KIO::open_SkipDlg" << endl; - KIO::SkipDlg_Result result = KIO::open_SkipDlg( (bool)multi, error_text ); - if ( item && result != KIO::S_CANCEL ) + kdDebug(7024) << "Calling TDEIO::open_SkipDlg" << endl; + TDEIO::SkipDlg_Result result = TDEIO::open_SkipDlg( (bool)multi, error_text ); + if ( item && result != TDEIO::S_CANCEL ) setItemVisible( item, true ); - return (KIO::SkipDlg_Result) result; + return (TDEIO::SkipDlg_Result) result; } void UIServer::readSettings() { - KConfig config("uiserverrc"); + TDEConfig config("uiserverrc"); config.setGroup( "UIServer" ); m_showStatusBar=config.readBoolEntry("ShowStatusBar",false); m_showToolBar=config.readBoolEntry("ShowToolBar",true); @@ -1326,7 +1326,7 @@ void UIServer::readSettings() { } void UIServer::writeSettings() { - KConfig config("uiserverrc"); + TDEConfig config("uiserverrc"); config.setGroup( "UIServer" ); config.writeEntry("InitialWidth",width()); config.writeEntry("InitialHeight",height()); diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h index 85e255a43..c7cfaf5c0 100644 --- a/kio/misc/uiserver.h +++ b/kio/misc/uiserver.h @@ -37,7 +37,7 @@ class KSqueezedTextLabel; class ProgressItem; class UIServer; -namespace KIO { +namespace TDEIO { class Job; class DefaultProgress; } @@ -122,11 +122,11 @@ public: void setDefaultProgressVisible( bool visible ); bool isVisible() const { return m_visible; } - void setTotalSize( KIO::filesize_t bytes ); + void setTotalSize( TDEIO::filesize_t bytes ); void setTotalFiles( unsigned long files ); void setTotalDirs( unsigned long dirs ); - void setProcessedSize( KIO::filesize_t size ); + void setProcessedSize( TDEIO::filesize_t size ); void setProcessedFiles( unsigned long files ); void setProcessedDirs( unsigned long dirs ); @@ -143,11 +143,11 @@ public: void setMounting( const TQString & dev, const TQString & point ); void setUnmounting( const TQString & point ); - void setCanResume( KIO::filesize_t offset ); + void setCanResume( TDEIO::filesize_t offset ); - KIO::filesize_t totalSize() { return m_iTotalSize; } + TDEIO::filesize_t totalSize() { return m_iTotalSize; } unsigned long totalFiles() { return m_iTotalFiles; } - KIO::filesize_t processedSize() { return m_iProcessedSize; } + TDEIO::filesize_t processedSize() { return m_iProcessedSize; } unsigned long processedFiles() { return m_iProcessedFiles; } unsigned long speed() { return m_iSpeed; } unsigned int remainingSeconds() { return m_remainingSeconds; } @@ -179,12 +179,12 @@ protected: ListProgress *listProgress; // associated default progress dialog - KIO::DefaultProgress *defaultProgress; + TDEIO::DefaultProgress *defaultProgress; // we store these values for calculation of totals ( for statusbar ) - KIO::filesize_t m_iTotalSize; + TDEIO::filesize_t m_iTotalSize; unsigned long m_iTotalFiles; - KIO::filesize_t m_iProcessedSize; + TDEIO::filesize_t m_iProcessedSize; unsigned long m_iProcessedFiles; unsigned long m_iSpeed; int m_remainingSeconds; @@ -230,7 +230,7 @@ k_dcop: /** * Signal a new job * @param appId the DCOP application id of the job's parent application - * @see KIO::Observer::newJob + * @see TDEIO::Observer::newJob * @param showProgress whether to popup the progress for the job. * Usually true, but may be false when we use kio_uiserver for * other things, like SSL dialogs. @@ -241,12 +241,12 @@ k_dcop: ASYNC jobFinished( int id ); ASYNC totalSize( int id, unsigned long size ); - ASYNC totalSize64( int id, KIO::filesize_t size ); + ASYNC totalSize64( int id, TDEIO::filesize_t size ); ASYNC totalFiles( int id, unsigned long files ); ASYNC totalDirs( int id, unsigned long dirs ); ASYNC processedSize( int id, unsigned long bytes ); - ASYNC processedSize64( int id, KIO::filesize_t bytes ); + ASYNC processedSize64( int id, TDEIO::filesize_t bytes ); ASYNC processedFiles( int id, unsigned long files ); ASYNC processedDirs( int id, unsigned long dirs ); @@ -265,14 +265,14 @@ k_dcop: ASYNC unmounting( int id, TQString point ); ASYNC canResume( int id, unsigned long offset ); - ASYNC canResume64( int id, KIO::filesize_t offset ); + ASYNC canResume64( int id, TDEIO::filesize_t offset ); /** * @deprecated (it blocks other apps). - * Use KIO::PasswordDialog::getNameAndPassword instead. + * Use TDEIO::PasswordDialog::getNameAndPassword instead. * To be removed in KDE 4.0. */ - TQByteArray openPassDlg( const KIO::AuthInfo &info ); + TQByteArray openPassDlg( const TDEIO::AuthInfo &info ); /** * Popup a message box. @@ -296,15 +296,15 @@ k_dcop: /** * @deprecated (it blocks other apps). - * Use KIO::open_RenameDlg instead. + * Use TDEIO::open_RenameDlg instead. * To be removed in KDE 4.0. */ TQByteArray open_RenameDlg64( int id, const TQString & caption, const TQString& src, const TQString & dest, - int /* KIO::RenameDlg_Mode */ mode, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + int /* TDEIO::RenameDlg_Mode */ mode, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, unsigned long /* time_t */ ctimeSrc, unsigned long /* time_t */ ctimeDest, unsigned long /* time_t */ mtimeSrc, @@ -312,13 +312,13 @@ k_dcop: ); /** * @deprecated (it blocks other apps). - * Use KIO::open_RenameDlg instead. + * Use TDEIO::open_RenameDlg instead. * To be removed in KDE 4.0. */ TQByteArray open_RenameDlg( int id, const TQString & caption, const TQString& src, const TQString & dest, - int /* KIO::RenameDlg_Mode */ mode, + int /* TDEIO::RenameDlg_Mode */ mode, unsigned long sizeSrc, unsigned long sizeDest, unsigned long /* time_t */ ctimeSrc, @@ -329,7 +329,7 @@ k_dcop: /** * @deprecated (it blocks other apps). - * Use KIO::open_SkipDlg instead. + * Use TDEIO::open_SkipDlg instead. * To be removed in KDE 4.0. */ int open_SkipDlg( int id, @@ -350,12 +350,12 @@ k_dcop: /** * Show a SSL Information Dialog */ - void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data, int mainwindow); + void showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &data, int mainwindow); /** * @deprecated */ - void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data); + void showSSLInfoDialog(const TQString &url, const TDEIO::MetaData &data); /* * Show an SSL Certificate Selection Dialog diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp index 0c8470a61..dfacd92e4 100644 --- a/kio/tests/dataprotocoltest.cpp +++ b/kio/tests/dataprotocoltest.cpp @@ -39,7 +39,7 @@ public: testStrings("MIME Type: ",mime_type_expected,type); } - void totalSize(KIO::filesize_t bytes) { + void totalSize(TDEIO::filesize_t bytes) { // cout << "content size: " << bytes << " bytes" << endl; } @@ -47,7 +47,7 @@ public: // meta_data[key] = value; // cout << "§ " << key << " = " << value << endl; TQString prefix = "Metadata[\""+key+"\"]: "; - KIO::MetaData::Iterator it = attributes_expected.find(key); + TDEIO::MetaData::Iterator it = attributes_expected.find(key); if (it != attributes_expected.end()) { testStrings(prefix,it.data(),value); // remove key from map @@ -60,8 +60,8 @@ public: void sendMetaData() { // check here if attributes_expected contains any excess keys - KIO::MetaData::ConstIterator it = attributes_expected.begin(); - KIO::MetaData::ConstIterator end = attributes_expected.end(); + TDEIO::MetaData::ConstIterator it = attributes_expected.begin(); + TDEIO::MetaData::ConstIterator end = attributes_expected.end(); for (; it != end; ++it) { cout << endl << "Metadata[\"" << it.key() << "\"] was expected but not defined"; @@ -93,7 +93,7 @@ private: // -- testcase related members TQString mime_type_expected; // expected mime type /** contains all attributes and values the testcase has to set */ - KIO::MetaData attributes_expected; + TDEIO::MetaData attributes_expected; /** contains the content as it is expected to be returned */ TQByteArray content_expected; int passed; // # of passed tests @@ -150,7 +150,7 @@ public: /** * sets all attribute-value pairs the testcase must deliver. */ - void setExpectedAttributes(const KIO::MetaData &attres) { + void setExpectedAttributes(const TDEIO::MetaData &attres) { attributes_expected = attres; } diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index cd9a99bb8..a0da57244 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -135,9 +135,9 @@ void JobTest::runAll() void JobTest::cleanup() { - KIO::NetAccess::del( homeTmpDir(), 0 ); - KIO::NetAccess::del( otherTmpDir(), 0 ); - KIO::NetAccess::del( systemTmpDir(), 0 ); + TDEIO::NetAccess::del( homeTmpDir(), 0 ); + TDEIO::NetAccess::del( otherTmpDir(), 0 ); + TDEIO::NetAccess::del( systemTmpDir(), 0 ); } static void setTimeStamp( const TQString& path ) @@ -194,19 +194,19 @@ void JobTest::get() createTestFile( filePath ); KURL u; u.setPath( filePath ); m_result = -1; - KIO::StoredTransferJob* job = KIO::storedGet( u ); - connect( job, TQT_SIGNAL( result( KIO::Job* ) ), - this, TQT_SLOT( slotGetResult( KIO::Job* ) ) ); + TDEIO::StoredTransferJob* job = TDEIO::storedGet( u ); + connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), + this, TQT_SLOT( slotGetResult( TDEIO::Job* ) ) ); kapp->eventLoop()->enterLoop(); assert( m_result == 0 ); // no error assert( m_data.size() == 11 ); assert( TQCString( m_data ) == "Hello world" ); } -void JobTest::slotGetResult( KIO::Job* job ) +void JobTest::slotGetResult( TDEIO::Job* job ) { m_result = job->error(); - m_data = static_cast<KIO::StoredTransferJob *>(job)->data(); + m_data = static_cast<TDEIO::StoredTransferJob *>(job)->data(); kapp->eventLoop()->exitLoop(); } @@ -220,7 +220,7 @@ void JobTest::copyLocalFile( const TQString& src, const TQString& dest ) d.setPath( dest ); // copy the file with file_copy - bool ok = KIO::NetAccess::file_copy( u, d ); + bool ok = TDEIO::NetAccess::file_copy( u, d ); assert( ok ); assert( TQFile::exists( dest ) ); assert( TQFile::exists( src ) ); // still there @@ -234,9 +234,9 @@ void JobTest::copyLocalFile( const TQString& src, const TQString& dest ) assert( srcInfo.lastModified() == destInfo.lastModified() ); } - // cleanup and retry with KIO::copy() + // cleanup and retry with TDEIO::copy() TQFile::remove( dest ); - ok = KIO::NetAccess::dircopy( u, d, 0 ); + ok = TDEIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); assert( TQFile::exists( dest ) ); assert( TQFile::exists( src ) ); // still there @@ -262,7 +262,7 @@ void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, in else assert( !TQFile::exists( dest ) ); - bool ok = KIO::NetAccess::dircopy( u, d, 0 ); + bool ok = TDEIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); if ( flags & AlreadyExists ) { @@ -341,13 +341,13 @@ void JobTest::moveLocalFile( const TQString& src, const TQString& dest ) d.setPath( dest ); // move the file with file_move - bool ok = KIO::NetAccess::file_move( u, d ); + bool ok = TDEIO::NetAccess::file_move( u, d ); assert( ok ); assert( TQFile::exists( dest ) ); assert( !TQFile::exists( src ) ); // not there anymore - // move it back with KIO::move() - ok = KIO::NetAccess::move( d, u, 0 ); + // move it back with TDEIO::move() + ok = TDEIO::NetAccess::move( d, u, 0 ); assert( ok ); assert( !TQFile::exists( dest ) ); assert( TQFile::exists( src ) ); // it's back @@ -363,15 +363,15 @@ static void moveLocalSymlink( const TQString& src, const TQString& dest ) d.setPath( dest ); // move the symlink with move, NOT with file_move - bool ok = KIO::NetAccess::move( u, d ); + bool ok = TDEIO::NetAccess::move( u, d ); if ( !ok ) - kdWarning() << KIO::NetAccess::lastError() << endl; + kdWarning() << TDEIO::NetAccess::lastError() << endl; assert( ok ); assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) == 0 ); assert( !TQFile::exists( src ) ); // not there anymore - // move it back with KIO::move() - ok = KIO::NetAccess::move( d, u, 0 ); + // move it back with TDEIO::move() + ok = TDEIO::NetAccess::move( d, u, 0 ); assert( ok ); assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back @@ -388,7 +388,7 @@ void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest ) KURL d; d.setPath( dest ); - bool ok = KIO::NetAccess::move( u, d, 0 ); + bool ok = TDEIO::NetAccess::move( u, d, 0 ); assert( ok ); assert( TQFile::exists( dest ) ); assert( TQFileInfo( dest ).isDir() ); @@ -455,12 +455,12 @@ void JobTest::moveFileNoPermissions() KURL d; d.setPath( dest ); - KIO::CopyJob* job = KIO::move( u, d, 0 ); + TDEIO::CopyJob* job = TDEIO::move( u, d, 0 ); job->setInteractive( false ); // no skip dialog, thanks TQMap<TQString, TQString> metaData; - bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); + bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); assert( !ok ); - assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED ); + assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED ); // OK this is fishy. Just like mv(1), KIO's behavior depends on whether // a direct rename(2) was used, or a full copy+del. In the first case // there is no destination file created, but in the second case the @@ -482,12 +482,12 @@ void JobTest::moveDirectoryNoPermissions() KURL d; d.setPath( dest ); - KIO::CopyJob* job = KIO::move( u, d, 0 ); + TDEIO::CopyJob* job = TDEIO::move( u, d, 0 ); job->setInteractive( false ); // no skip dialog, thanks TQMap<TQString, TQString> metaData; - bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); + bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); assert( !ok ); - assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED ); + assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED ); assert( TQFile::exists( dest ) ); // see moveFileNoPermissions assert( TQFile::exists( src ) ); } @@ -497,10 +497,10 @@ void JobTest::listRecursive() const TQString src = homeTmpDir(); KURL u; u.setPath( src ); - KIO::ListJob* job = KIO::listRecursive( u ); - connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); - bool ok = KIO::NetAccess::synchronousRun( job, 0 ); + TDEIO::ListJob* job = TDEIO::listRecursive( u ); + connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ), + TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) ); + bool ok = TDEIO::NetAccess::synchronousRun( job, 0 ); assert( ok ); m_names.sort(); check( "listRecursive", m_names.join( "," ), ".,..," @@ -510,18 +510,18 @@ void JobTest::listRecursive() "fileFromHome,fileFromHome_copied" ); } -void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) +void JobTest::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst ) { - for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - KIO::UDSEntry::ConstIterator it2 = (*it).begin(); + for( TDEIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + TDEIO::UDSEntry::ConstIterator it2 = (*it).begin(); TQString displayName; KURL url; for( ; it2 != (*it).end(); it2++ ) { switch ((*it2).m_uds) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: displayName = (*it2).m_str; break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: url = (*it2).m_str; break; } @@ -564,10 +564,10 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) kdDebug() << "copying " << u << " to " << d << endl; // copy the file with file_copy - KIO::FileCopyJob* job = KIO::file_copy( u, d ); - connect( job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)), - this, TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) ); - bool ok = KIO::NetAccess::synchronousRun( job, 0 ); + TDEIO::FileCopyJob* job = TDEIO::file_copy( u, d ); + connect( job, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), + this, TQT_SLOT(slotMimetype(TDEIO::Job*,const TQString&)) ); + bool ok = TDEIO::NetAccess::synchronousRun( job, 0 ); assert( ok ); TQString dest = realSystemPath() + "fileFromHome_copied"; @@ -587,9 +587,9 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) assert( m_mimetype == "application/octet-stream" ); //assert( m_mimetype == "text/plain" ); - // cleanup and retry with KIO::copy() + // cleanup and retry with TDEIO::copy() TQFile::remove( dest ); - ok = KIO::NetAccess::dircopy( u, d, 0 ); + ok = TDEIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); assert( TQFile::exists( dest ) ); assert( TQFile::exists( src ) ); // still there @@ -604,7 +604,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) kio_resolve_local_urls = true; } -void JobTest::slotMimetype(KIO::Job* job, const TQString& type) +void JobTest::slotMimetype(TDEIO::Job* job, const TQString& type) { assert( job ); m_mimetype = type; diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h index 83ec2da7c..61051fbaf 100644 --- a/kio/tests/jobtest.h +++ b/kio/tests/jobtest.h @@ -54,9 +54,9 @@ public: void copyFileToSystem(); private slots: - void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ); - void slotGetResult( KIO::Job* ); - void slotMimetype(KIO::Job*,const TQString&); + void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst ); + void slotGetResult( TDEIO::Job* ); + void slotMimetype(TDEIO::Job*,const TQString&); private: TQString homeTmpDir() const; diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp index e62408204..79ad44e3c 100644 --- a/kio/tests/kdefaultprogresstest.cpp +++ b/kio/tests/kdefaultprogresstest.cpp @@ -3,7 +3,7 @@ #include <kurl.h> #include <kdebug.h> -using namespace KIO; +using namespace TDEIO; int main(int argc, char **argv) { diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp index 01d0a36e9..000fb200c 100644 --- a/kio/tests/kdirlistertest.cpp +++ b/kio/tests/kdirlistertest.cpp @@ -82,10 +82,10 @@ KDirListerTest::KDirListerTest( TQWidget *parent, const char *name ) debug, TQT_SLOT( infoMessage( const TQString& ) ) ); connect( lister, TQT_SIGNAL( percent( int ) ), debug, TQT_SLOT( percent( int ) ) ); - connect( lister, TQT_SIGNAL( totalSize( KIO::filesize_t ) ), - debug, TQT_SLOT( totalSize( KIO::filesize_t ) ) ); - connect( lister, TQT_SIGNAL( processedSize( KIO::filesize_t ) ), - debug, TQT_SLOT( processedSize( KIO::filesize_t ) ) ); + connect( lister, TQT_SIGNAL( totalSize( TDEIO::filesize_t ) ), + debug, TQT_SLOT( totalSize( TDEIO::filesize_t ) ) ); + connect( lister, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ), + debug, TQT_SLOT( processedSize( TDEIO::filesize_t ) ) ); connect( lister, TQT_SIGNAL( speed( int ) ), debug, TQT_SLOT( speed( int ) ) ); diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h index 12e72c911..065f7478d 100644 --- a/kio/tests/kdirlistertest.h +++ b/kio/tests/kdirlistertest.h @@ -88,10 +88,10 @@ public slots: void percent( int percent ) { cout << "*** percent: " << percent << endl; } - void totalSize( KIO::filesize_t size ) + void totalSize( TDEIO::filesize_t size ) { cout << "*** totalSize: " << (long)size << endl; } - void processedSize( KIO::filesize_t size ) + void processedSize( TDEIO::filesize_t size ) { cout << "*** processedSize: " << (long)size << endl; } void speed( int bytes_per_second ) diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp index 82c669c74..2d96c8495 100644 --- a/kio/tests/kionetrctest.cpp +++ b/kio/tests/kionetrctest.cpp @@ -8,8 +8,8 @@ void output( const KURL& u ) { kdDebug() << "Looking up auto login for: " << u.url() << endl; - KIO::NetRC::AutoLogin l; - bool result = KIO::NetRC::self()->lookup( u, l, true ); + TDEIO::NetRC::AutoLogin l; + bool result = TDEIO::NetRC::self()->lookup( u, l, true ); if ( !result ) { kdDebug() << "Either no .netrc and/or .kionetrc file was " diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp index 2bbdaa658..adb14a306 100644 --- a/kio/tests/kiopassdlgtest.cpp +++ b/kio/tests/kiopassdlgtest.cpp @@ -15,7 +15,7 @@ int main ( int argc, char** argv ) TQString usr, pass, comment, label; label = "Site:"; comment = "<b>localhost</b>"; - int res = KIO::PasswordDialog::getNameAndPassword( usr, pass, 0L, + int res = TDEIO::PasswordDialog::getNameAndPassword( usr, pass, 0L, TQString::null, false, TQString::null, comment, label ); diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp index 72a7ffb05..27a99eabc 100644 --- a/kio/tests/kioslavetest.cpp +++ b/kio/tests/kioslavetest.cpp @@ -26,7 +26,7 @@ #include "kioslavetest.h" -using namespace KIO; +using namespace TDEIO; KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) : KMainWindow(0, "") @@ -165,10 +165,10 @@ KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) setCentralWidget( main_widget ); slave = 0; -// slave = KIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org")); - KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave*)), +// slave = TDEIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org")); + TDEIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(TDEIO::Slave*)), this, TQT_SLOT(slotSlaveConnected())); - KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave*,int,const TQString&)), + TDEIO::Scheduler::connect(TQT_SIGNAL(slaveError(TDEIO::Slave*,int,const TQString&)), this, TQT_SLOT(slotSlaveError())); } @@ -183,7 +183,7 @@ void KioslaveTest::slotQuit(){ job->kill( true ); // kill the job quietly } if (slave) - KIO::Scheduler::disconnectSlave(slave); + TDEIO::Scheduler::disconnectSlave(slave); kapp->quit(); } @@ -241,70 +241,70 @@ void KioslaveTest::startJob() { switch ( selectedOperation ) { case List: - myJob = KIO::listDir( src ); - connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); + myJob = TDEIO::listDir( src ); + connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), + TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&))); break; case ListRecursive: - myJob = KIO::listRecursive( src ); - connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); + myJob = TDEIO::listRecursive( src ); + connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), + TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&))); break; case Stat: - myJob = KIO::stat( src, false, 2 ); + myJob = TDEIO::stat( src, false, 2 ); break; case Get: - myJob = KIO::get( src, true ); - connect(myJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)), - TQT_SLOT( slotData( KIO::Job*, const TQByteArray &))); + myJob = TDEIO::get( src, true ); + connect(myJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray &)), + TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray &))); break; case Put: putBuffer = 0; - myJob = KIO::put( src, -1, true, false); - connect(myJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray &)), - TQT_SLOT( slotDataReq( KIO::Job*, TQByteArray &))); + myJob = TDEIO::put( src, -1, true, false); + connect(myJob, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray &)), + TQT_SLOT( slotDataReq( TDEIO::Job*, TQByteArray &))); break; case Copy: - job = KIO::copy( src, dest, observe ); + job = TDEIO::copy( src, dest, observe ); break; case Move: - job = KIO::move( src, dest, observe ); + job = TDEIO::move( src, dest, observe ); break; case Delete: - job = KIO::del( src, false, observe ); + job = TDEIO::del( src, false, observe ); break; case Shred: - job = KIO::del(src, true, observe); + job = TDEIO::del(src, true, observe); break; case Mkdir: - myJob = KIO::mkdir( src ); + myJob = TDEIO::mkdir( src ); break; case Mimetype: - myJob = KIO::mimetype( src ); + myJob = TDEIO::mimetype( src ); break; } if (myJob) { if (slave) - KIO::Scheduler::assignJobToSlave(slave, myJob); + TDEIO::Scheduler::assignJobToSlave(slave, myJob); job = myJob; } - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotResult( TDEIO::Job * ) ) ); - connect( job, TQT_SIGNAL( canceled( KIO::Job * ) ), - TQT_SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( canceled( TDEIO::Job * ) ), + TQT_SLOT( slotResult( TDEIO::Job * ) ) ); if (progressMode == ProgressStatus) { statusProgress->setJob( job ); @@ -314,7 +314,7 @@ void KioslaveTest::startJob() { } -void KioslaveTest::slotResult( KIO::Job * _job ) +void KioslaveTest::slotResult( TDEIO::Job * _job ) { if ( _job->error() ) { @@ -322,12 +322,12 @@ void KioslaveTest::slotResult( KIO::Job * _job ) } else if ( selectedOperation == Stat ) { - UDSEntry entry = ((KIO::StatJob*)_job)->statResult(); + UDSEntry entry = ((TDEIO::StatJob*)_job)->statResult(); printUDSEntry( entry ); } else if ( selectedOperation == Mimetype ) { - kdDebug() << "mimetype is " << ((KIO::MimetypeJob*)_job)->mimetype() << endl; + kdDebug() << "mimetype is " << ((TDEIO::MimetypeJob*)_job)->mimetype() << endl; } if (job == _job) @@ -357,62 +357,62 @@ static void printACL( const TQString& acl ) } -void KioslaveTest::printUDSEntry( const KIO::UDSEntry & entry ) +void KioslaveTest::printUDSEntry( const TDEIO::UDSEntry & entry ) { - KIO::UDSEntry::ConstIterator it = entry.begin(); + TDEIO::UDSEntry::ConstIterator it = entry.begin(); for( ; it != entry.end(); it++ ) { switch ((*it).m_uds) { - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: kdDebug() << "File Type : " << (mode_t)((*it).m_long) << endl; if ( S_ISDIR( (mode_t)((*it).m_long) ) ) { kdDebug() << "is a dir" << endl; } break; - case KIO::UDS_ACCESS: + case TDEIO::UDS_ACCESS: kdDebug() << "Access permissions : " << (*it).m_long << endl; break; - case KIO::UDS_EXTENDED_ACL: + case TDEIO::UDS_EXTENDED_ACL: if( (*it).m_long == 1 ) kdDebug() << "Has extended ACL information." << endl; break; - case KIO::UDS_ACL_STRING: + case TDEIO::UDS_ACL_STRING: kdDebug() << "ACL: " << ( (*it).m_str.ascii() ) << endl; printACL( (*it).m_str ); break; - case KIO::UDS_DEFAULT_ACL_STRING: + case TDEIO::UDS_DEFAULT_ACL_STRING: kdDebug() << "Default ACL: " << ( (*it).m_str.ascii() ) << endl; printACL( (*it).m_str ); break; - case KIO::UDS_USER: + case TDEIO::UDS_USER: kdDebug() << "User : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_GROUP: + case TDEIO::UDS_GROUP: kdDebug() << "Group : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: kdDebug() << "Name : " << ((*it).m_str.ascii() ) << endl; //m_strText = decodeFileName( (*it).m_str ); break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: kdDebug() << "URL : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_MIME_TYPE: + case TDEIO::UDS_MIME_TYPE: kdDebug() << "MimeType : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_LINK_DEST: + case TDEIO::UDS_LINK_DEST: kdDebug() << "LinkDest : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_SIZE: - kdDebug() << "Size: " << KIO::convertSize((*it).m_long) << endl; + case TDEIO::UDS_SIZE: + kdDebug() << "Size: " << TDEIO::convertSize((*it).m_long) << endl; break; } } } -void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) { +void KioslaveTest::slotEntries(TDEIO::Job* job, const TDEIO::UDSEntryList& list) { - KURL url = static_cast<KIO::ListJob*>( job )->url(); + KURL url = static_cast<TDEIO::ListJob*>( job )->url(); KProtocolInfo::ExtraFieldList extraFields = KProtocolInfo::extraFields(url); UDSEntryListConstIterator it=list.begin(); for (; it != list.end(); ++it) { @@ -433,7 +433,7 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) { } } -void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data) +void KioslaveTest::slotData(TDEIO::Job*, const TQByteArray &data) { if (data.size() == 0) { @@ -445,7 +445,7 @@ void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data) } } -void KioslaveTest::slotDataReq(KIO::Job*, TQByteArray &data) +void KioslaveTest::slotDataReq(TDEIO::Job*, TQByteArray &data) { const char *fileDataArray[] = { diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h index 02fae7f23..79533bbc5 100644 --- a/kio/tests/kioslavetest.h +++ b/kio/tests/kioslavetest.h @@ -41,7 +41,7 @@ protected: void closeEvent( TQCloseEvent * ); - void printUDSEntry( const KIO::UDSEntry & entry ); + void printUDSEntry( const TDEIO::UDSEntry & entry ); // info stuff TQLabel *lb_from; @@ -84,25 +84,25 @@ protected slots: void startJob(); void stopJob(); - void slotResult( KIO::Job * ); - void slotEntries( KIO::Job *, const KIO::UDSEntryList& ); - void slotData( KIO::Job *, const TQByteArray &data ); - void slotDataReq( KIO::Job *, TQByteArray &data ); + void slotResult( TDEIO::Job * ); + void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& ); + void slotData( TDEIO::Job *, const TQByteArray &data ); + void slotDataReq( TDEIO::Job *, TQByteArray &data ); void slotQuit(); void slotSlaveConnected(); void slotSlaveError(); private: - KIO::Job *job; + TDEIO::Job *job; TQWidget *main_widget; - KIO::StatusbarProgress *statusProgress; + TDEIO::StatusbarProgress *statusProgress; int selectedOperation; int progressMode; int putBuffer; - KIO::Slave *slave; + TDEIO::Slave *slave; }; #endif // _KIOSLAVETEST_H diff --git a/kio/tests/kpropsdlgtest.cpp b/kio/tests/kpropsdlgtest.cpp index 66b02bae0..811f03923 100644 --- a/kio/tests/kpropsdlgtest.cpp +++ b/kio/tests/kpropsdlgtest.cpp @@ -25,7 +25,7 @@ int main ( int argc, char** argv ) KURL u = args->url( 0 ); // This is the test for the KPropertiesDialog constructor that is now - // documented to NOT work. Passing only a URL means a KIO::stat will happen, + // documented to NOT work. Passing only a URL means a TDEIO::stat will happen, // and asking for the dialog to be modal too creates problems. // (A non-modal, URL-only dialog is the one kicker uses for app buttons, no problem there) KPropertiesDialog* dlg = new KPropertiesDialog( u, 0, 0, true /*modal*/, false /*we do exec ourselves*/ ); diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp index 9f4e09013..a5ed8da9d 100644 --- a/kio/tests/kurifiltertest.cpp +++ b/kio/tests/kurifiltertest.cpp @@ -354,7 +354,7 @@ int main(int argc, char **argv) filter( "config", tdehome+"/share/config", KURIFilterData::LOCAL_DIR, "kshorturifilter", tdehome+"/share" ); // Clean up - KIO::NetAccess::del( tdehome, 0 ); + TDEIO::NetAccess::del( tdehome, 0 ); kdDebug() << "All tests done. Go home..." << endl; return 0; diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp index a9aeb66d4..c83f45aae 100644 --- a/kio/tests/netaccesstest.cpp +++ b/kio/tests/netaccesstest.cpp @@ -31,8 +31,8 @@ int main(int argc, char **argv) for ( uint i = 0; i < 4 ; ++i ) { kdDebug() << "file_copy" << endl; - if ( !KIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) ) - kdError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl; + if ( !TDEIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) ) + kdError() << "file_copy failed: " << TDEIO::NetAccess::lastErrorString() << endl; else { TQFile f( tmpURL.path() ); if (!f.open(IO_ReadOnly)) diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp index 52dea6ac7..62f6c3d62 100644 --- a/kio/tests/previewtest.cpp +++ b/kio/tests/previewtest.cpp @@ -30,13 +30,13 @@ void PreviewTest::slotGenerate() { KURL::List urls; urls.append(m_url->text()); - KIO::PreviewJob *job = KIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); + TDEIO::PreviewJob *job = TDEIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*))); connect(job, TQT_SIGNAL(gotPreview(const KFileItem *, const TQPixmap &)), TQT_SLOT(slotPreview(const KFileItem *, const TQPixmap &))); connect(job, TQT_SIGNAL(failed(const KFileItem *)), TQT_SLOT(slotFailed())); } -void PreviewTest::slotResult(KIO::Job*) +void PreviewTest::slotResult(TDEIO::Job*) { kdDebug() << "PreviewTest::slotResult(...)" << endl; } diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h index 27d797403..a749e95a3 100644 --- a/kio/tests/previewtest.h +++ b/kio/tests/previewtest.h @@ -14,7 +14,7 @@ public: private slots: void slotGenerate(); - void slotResult(KIO::Job *); + void slotResult(TDEIO::Job *); void slotPreview( const KFileItem *, const TQPixmap & ); void slotFailed(); diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp index ae94d83e6..44a7d9330 100644 --- a/kio/tests/speed.cpp +++ b/kio/tests/speed.cpp @@ -25,21 +25,21 @@ #include <tqdir.h> #include <kio/global.h> -using namespace KIO; +using namespace TDEIO; SpeedTest::SpeedTest( const KURL & url ) : TQObject(0, "speed") { Job *job = listRecursive( url ); //Job *job = del( KURL("file:" + TQDir::currentDirPath()) ); DANGEROUS ! - connect(job, TQT_SIGNAL( result( KIO::Job*)), - TQT_SLOT( finished( KIO::Job* ) )); - /*connect(job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList&))); + connect(job, TQT_SIGNAL( result( TDEIO::Job*)), + TQT_SLOT( finished( TDEIO::Job* ) )); + /*connect(job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)), + TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList&))); */ } -void SpeedTest::entries(KIO::Job*, const UDSEntryList& list) { +void SpeedTest::entries(TDEIO::Job*, const UDSEntryList& list) { UDSEntryListConstIterator it=list.begin(); for (; it != list.end(); ++it) { @@ -65,7 +65,7 @@ static KCmdLineOptions options[] = int main(int argc, char **argv) { - TDECmdLineArgs::init( argc, argv, "speedapp", "A KIO::listRecursive testing tool", "0.0" ); + TDECmdLineArgs::init( argc, argv, "speedapp", "A TDEIO::listRecursive testing tool", "0.0" ); TDECmdLineArgs::addCmdLineOptions( options ); @@ -79,15 +79,15 @@ int main(int argc, char **argv) { else url = "file:" + TQDir::currentDirPath(); - kdDebug() << url.url() << " is probably " << (KIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n"; - kdDebug() << url.url() << " is " << (KIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n"; - TQString mp = KIO::findDeviceMountPoint(url.path()); + kdDebug() << url.url() << " is probably " << (TDEIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n"; + kdDebug() << url.url() << " is " << (TDEIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n"; + TQString mp = TDEIO::findDeviceMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for device " << url.url() << " found\n"; } else kdDebug() << mp << " is the mount point for device " << url.url() << endl; - mp = KIO::findPathMountPoint(url.path()); + mp = TDEIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for path " << url.url() << " found\n"; } else @@ -95,7 +95,7 @@ int main(int argc, char **argv) { // SpeedTest test( url ); // app.exec(); - mp = KIO::findPathMountPoint(url.path()); + mp = TDEIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for path " << url.url() << " found\n"; } else @@ -105,7 +105,7 @@ int main(int argc, char **argv) { url.setPath(TQDir::homeDirPath()); - mp = KIO::findPathMountPoint(url.path()); + mp = TDEIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for path " << url.url() << " found\n"; } else @@ -113,7 +113,7 @@ int main(int argc, char **argv) { // SpeedTest test( url ); // app.exec(); - mp = KIO::findPathMountPoint(url.path()); + mp = TDEIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for path " << url.url() << " found\n"; } else @@ -126,7 +126,7 @@ int main(int argc, char **argv) { else url = "file:" + TQDir::currentDirPath(); - mp = KIO::findPathMountPoint(url.path()); + mp = TDEIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for path " << url.url() << " found\n"; } else diff --git a/kio/tests/speed.h b/kio/tests/speed.h index 69b12465f..5b928a18e 100644 --- a/kio/tests/speed.h +++ b/kio/tests/speed.h @@ -5,7 +5,7 @@ #include <kio/global.h> #include <kurl.h> -namespace KIO { +namespace TDEIO { class Job; } @@ -16,8 +16,8 @@ public: SpeedTest(const KURL & url); private slots: - void entries( KIO::Job *, const KIO::UDSEntryList& ); - void finished( KIO::Job *job ); + void entries( TDEIO::Job *, const TDEIO::UDSEntryList& ); + void finished( TDEIO::Job *job ); }; diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index 9b906ffb5..73a037b91 100644 --- a/kioslave/file/file.cc +++ b/kioslave/file/file.cc @@ -96,7 +96,7 @@ #include <kglobal.h> #include <kmimetype.h> -using namespace KIO; +using namespace TDEIO; #define MAX_IPC_SIZE (1024*32) @@ -192,16 +192,16 @@ void FileProtocol::chmod( const KURL& url, int permissions ) switch (errno) { case EPERM: case EACCES: - error( KIO::ERR_ACCESS_DENIED, url.path() ); + error( TDEIO::ERR_ACCESS_DENIED, url.path() ); break; case ENOTSUP: - error( KIO::ERR_UNSUPPORTED_ACTION, url.path() ); + error( TDEIO::ERR_UNSUPPORTED_ACTION, url.path() ); break; case ENOSPC: - error( KIO::ERR_DISK_FULL, url.path() ); + error( TDEIO::ERR_DISK_FULL, url.path() ); break; default: - error( KIO::ERR_CANNOT_CHMOD, url.path() ); + error( TDEIO::ERR_CANNOT_CHMOD, url.path() ); } } else finished(); @@ -217,13 +217,13 @@ void FileProtocol::mkdir( const KURL& url, int permissions ) if ( KDE_stat( _path.data(), &buff ) == -1 ) { if ( ::mkdir( _path.data(), 0777 /*umask will be applied*/ ) != 0 ) { if ( errno == EACCES ) { - error( KIO::ERR_ACCESS_DENIED, url.path() ); + error( TDEIO::ERR_ACCESS_DENIED, url.path() ); return; } else if ( errno == ENOSPC ) { - error( KIO::ERR_DISK_FULL, url.path() ); + error( TDEIO::ERR_DISK_FULL, url.path() ); return; } else { - error( KIO::ERR_COULD_NOT_MKDIR, url.path() ); + error( TDEIO::ERR_COULD_NOT_MKDIR, url.path() ); return; } } else { @@ -237,10 +237,10 @@ void FileProtocol::mkdir( const KURL& url, int permissions ) if ( S_ISDIR( buff.st_mode ) ) { kdDebug(7101) << "ERR_DIR_ALREADY_EXIST" << endl; - error( KIO::ERR_DIR_ALREADY_EXIST, url.path() ); + error( TDEIO::ERR_DIR_ALREADY_EXIST, url.path() ); return; } - error( KIO::ERR_FILE_ALREADY_EXIST, url.path() ); + error( TDEIO::ERR_FILE_ALREADY_EXIST, url.path() ); return; } @@ -258,24 +258,24 @@ void FileProtocol::get( const KURL& url ) KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { if ( errno == EACCES ) - error( KIO::ERR_ACCESS_DENIED, url.path() ); + error( TDEIO::ERR_ACCESS_DENIED, url.path() ); else - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } if ( S_ISDIR( buff.st_mode ) ) { - error( KIO::ERR_IS_DIRECTORY, url.path() ); + error( TDEIO::ERR_IS_DIRECTORY, url.path() ); return; } if ( !S_ISREG( buff.st_mode ) ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); return; } int fd = KDE_open( _path.data(), O_RDONLY); if ( fd < 0 ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); return; } @@ -288,20 +288,20 @@ void FileProtocol::get( const KURL& url ) KMimeType::Ptr mt = KMimeType::findByURL( url, buff.st_mode, true /* local URL */ ); emit mimeType( mt->name() ); - KIO::filesize_t processed_size = 0; + TDEIO::filesize_t processed_size = 0; TQString resumeOffset = metaData("resume"); if ( !resumeOffset.isEmpty() ) { bool ok; - KIO::fileoffset_t offset = resumeOffset.toLongLong(&ok); + TDEIO::fileoffset_t offset = resumeOffset.toLongLong(&ok); if (ok && (offset > 0) && (offset < buff.st_size)) { if (KDE_lseek(fd, offset, SEEK_SET) == offset) { canResume (); processed_size = offset; - kdDebug( 7101 ) << "Resume offset: " << KIO::number(offset) << endl; + kdDebug( 7101 ) << "Resume offset: " << TDEIO::number(offset) << endl; } } } @@ -318,7 +318,7 @@ void FileProtocol::get( const KURL& url ) { if (errno == EINTR) continue; - error( KIO::ERR_COULD_NOT_READ, url.path()); + error( TDEIO::ERR_COULD_NOT_READ, url.path()); close(fd); return; } @@ -332,7 +332,7 @@ void FileProtocol::get( const KURL& url ) processed_size += n; processedSize( processed_size ); - //kdDebug( 7101 ) << "Processed: " << KIO::number (processed_size) << endl; + //kdDebug( 7101 ) << "Processed: " << TDEIO::number (processed_size) << endl; } data( TQByteArray() ); @@ -395,7 +395,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum if (bPartExists && !_resume && !_overwrite && buff_part.st_size > 0 && S_ISREG(buff_part.st_mode)) { kdDebug(7101) << "FileProtocol::put : calling canResume with " - << KIO::number(buff_part.st_size) << endl; + << TDEIO::number(buff_part.st_size) << endl; // Maybe we can use this partial file for resuming // Tell about the size we have, and the app will tell us @@ -409,9 +409,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum if ( bOrigExists && !_overwrite && !_resume) { if (S_ISDIR(buff_orig.st_mode)) - error( KIO::ERR_DIR_ALREADY_EXIST, dest_orig ); + error( TDEIO::ERR_DIR_ALREADY_EXIST, dest_orig ); else - error( KIO::ERR_FILE_ALREADY_EXIST, dest_orig ); + error( TDEIO::ERR_FILE_ALREADY_EXIST, dest_orig ); return; } @@ -479,9 +479,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum kdDebug(7101) << "####################### COULD NOT WRITE " << dest << " _mode=" << _mode << endl; kdDebug(7101) << "errno==" << errno << "(" << strerror(errno) << ")" << endl; if ( errno == EACCES ) - error( KIO::ERR_WRITE_ACCESS_DENIED, dest ); + error( TDEIO::ERR_WRITE_ACCESS_DENIED, dest ); else - error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, dest ); return; } } @@ -490,13 +490,13 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum { if ( errno == ENOSPC ) // disk full { - error( KIO::ERR_DISK_FULL, dest_orig); + error( TDEIO::ERR_DISK_FULL, dest_orig); result = -2; // means: remove dest file } else { kdWarning(7101) << "Couldn't write. Error:" << strerror(errno) << endl; - error( KIO::ERR_COULD_NOT_WRITE, dest_orig); + error( TDEIO::ERR_COULD_NOT_WRITE, dest_orig); result = -1; } } @@ -534,7 +534,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum if ( close(fd) ) { kdWarning(7101) << "Error when closing file descriptor:" << strerror(errno) << endl; - error( KIO::ERR_COULD_NOT_WRITE, dest_orig); + error( TDEIO::ERR_COULD_NOT_WRITE, dest_orig); return; } @@ -550,7 +550,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum if ( ::rename( _dest.data(), _dest_orig.data() ) ) { kdWarning(7101) << " Couldn't rename " << _dest << " to " << _dest_orig << endl; - error( KIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig ); + error( TDEIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig ); return; } } @@ -561,7 +561,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum if (::chmod(_dest_orig.data(), _mode) != 0) { // couldn't chmod. Eat the error if the filesystem apparently doesn't support it. - if ( KIO::testFileSystemFlag( _dest_orig, KIO::SupportsChmod ) ) + if ( TDEIO::testFileSystemFlag( _dest_orig, TDEIO::SupportsChmod ) ) warning( i18n( "Could not change permissions for\n%1" ).arg( dest_orig ) ); } } @@ -602,18 +602,18 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, if ( KDE_stat( _src.data(), &buff_src ) == -1 ) { if ( errno == EACCES ) - error( KIO::ERR_ACCESS_DENIED, src.path() ); + error( TDEIO::ERR_ACCESS_DENIED, src.path() ); else - error( KIO::ERR_DOES_NOT_EXIST, src.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, src.path() ); return; } if ( S_ISDIR( buff_src.st_mode ) ) { - error( KIO::ERR_IS_DIRECTORY, src.path() ); + error( TDEIO::ERR_IS_DIRECTORY, src.path() ); return; } if ( S_ISFIFO( buff_src.st_mode ) || S_ISSOCK ( buff_src.st_mode ) ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, src.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, src.path() ); return; } @@ -623,19 +623,19 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, { if (S_ISDIR(buff_dest.st_mode)) { - error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() ); return; } if ( same_inode( buff_dest, buff_src) ) { - error( KIO::ERR_IDENTICAL_FILES, dest.path() ); + error( TDEIO::ERR_IDENTICAL_FILES, dest.path() ); return; } if (!_overwrite) { - error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() ); return; } @@ -651,7 +651,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, int src_fd = KDE_open( _src.data(), O_RDONLY); if ( src_fd < 0 ) { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, src.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, src.path() ); return; } @@ -670,9 +670,9 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, if ( dest_fd < 0 ) { kdDebug(7101) << "###### COULD NOT WRITE " << dest.url() << endl; if ( errno == EACCES ) { - error( KIO::ERR_WRITE_ACCESS_DENIED, dest.path() ); + error( TDEIO::ERR_WRITE_ACCESS_DENIED, dest.path() ); } else { - error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest.path() ); + error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, dest.path() ); } close(src_fd); return; @@ -692,7 +692,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, #endif totalSize( buff_src.st_size ); - KIO::filesize_t processed_size = 0; + TDEIO::filesize_t processed_size = 0; char buffer[ MAX_IPC_SIZE ]; int n; #ifdef USE_SENDFILE @@ -723,17 +723,17 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, kdDebug(7101) << "sendfile() error:" << strerror(errno) << endl; if ( errno == ENOSPC ) // disk full { - error( KIO::ERR_DISK_FULL, dest.path()); + error( TDEIO::ERR_DISK_FULL, dest.path()); remove( _dest.data() ); } else { - error( KIO::ERR_SLAVE_DEFINED, + error( TDEIO::ERR_SLAVE_DEFINED, i18n("Cannot copy file from %1 to %2. (Errno: %3)") .arg( src.path() ).arg( dest.path() ).arg( errno ) ); } } else #endif - error( KIO::ERR_COULD_NOT_READ, src.path()); + error( TDEIO::ERR_COULD_NOT_READ, src.path()); close(src_fd); close(dest_fd); #ifdef USE_POSIX_ACL @@ -753,13 +753,13 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, if ( errno == ENOSPC ) // disk full { - error( KIO::ERR_DISK_FULL, dest.path()); + error( TDEIO::ERR_DISK_FULL, dest.path()); remove( _dest.data() ); } else { kdWarning(7101) << "Couldn't write[2]. Error:" << strerror(errno) << endl; - error( KIO::ERR_COULD_NOT_WRITE, dest.path()); + error( TDEIO::ERR_COULD_NOT_WRITE, dest.path()); } #ifdef USE_POSIX_ACL if (acl) acl_free(acl); @@ -778,7 +778,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, if (close( dest_fd)) { kdWarning(7101) << "Error when closing file descriptor[2]:" << strerror(errno) << endl; - error( KIO::ERR_COULD_NOT_WRITE, dest.path()); + error( TDEIO::ERR_COULD_NOT_WRITE, dest.path()); #ifdef USE_POSIX_ACL if (acl) acl_free(acl); #endif @@ -795,7 +795,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest, ) { // Eat the error if the filesystem apparently doesn't support chmod. - if ( KIO::testFileSystemFlag( _dest, KIO::SupportsChmod ) ) + if ( TDEIO::testFileSystemFlag( _dest, TDEIO::SupportsChmod ) ) warning( i18n( "Could not change permissions for\n%1" ).arg( dest.path() ) ); } } @@ -824,9 +824,9 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, KDE_struct_stat buff_src; if ( KDE_lstat( _src.data(), &buff_src ) == -1 ) { if ( errno == EACCES ) - error( KIO::ERR_ACCESS_DENIED, src.path() ); + error( TDEIO::ERR_ACCESS_DENIED, src.path() ); else - error( KIO::ERR_DOES_NOT_EXIST, src.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, src.path() ); return; } @@ -836,19 +836,19 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, { if (S_ISDIR(buff_dest.st_mode)) { - error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() ); return; } if ( same_inode( buff_dest, buff_src) ) { - error( KIO::ERR_IDENTICAL_FILES, dest.path() ); + error( TDEIO::ERR_IDENTICAL_FILES, dest.path() ); return; } if (!_overwrite) { - error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() ); return; } } @@ -856,16 +856,16 @@ void FileProtocol::rename( const KURL &src, const KURL &dest, if ( ::rename( _src.data(), _dest.data())) { if (( errno == EACCES ) || (errno == EPERM)) { - error( KIO::ERR_ACCESS_DENIED, dest.path() ); + error( TDEIO::ERR_ACCESS_DENIED, dest.path() ); } else if (errno == EXDEV) { - error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename")); + error( TDEIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename")); } else if (errno == EROFS) { // The file is on a read-only filesystem - error( KIO::ERR_CANNOT_DELETE, src.path() ); + error( TDEIO::ERR_CANNOT_DELETE, src.path() ); } else { - error( KIO::ERR_CANNOT_RENAME, src.path() ); + error( TDEIO::ERR_CANNOT_RENAME, src.path() ); } return; } @@ -886,7 +886,7 @@ void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overw // Try to delete the destination if ( unlink( TQFile::encodeName( dest.path() ) ) != 0 ) { - error( KIO::ERR_CANNOT_DELETE, dest.path() ); + error( TDEIO::ERR_CANNOT_DELETE, dest.path() ); return; } // Try again - this won't loop forever since unlink succeeded @@ -897,16 +897,16 @@ void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overw KDE_struct_stat buff_dest; KDE_lstat( TQFile::encodeName( dest.path() ), &buff_dest ); if (S_ISDIR(buff_dest.st_mode)) - error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() ); else - error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() ); + error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() ); return; } } else { // Some error occurred while we tried to symlink - error( KIO::ERR_CANNOT_SYMLINK, dest.path() ); + error( TDEIO::ERR_CANNOT_SYMLINK, dest.path() ); return; } } @@ -927,11 +927,11 @@ void FileProtocol::del( const KURL& url, bool isfile) if ( unlink( _path.data() ) == -1 ) { if ((errno == EACCES) || (errno == EPERM)) - error( KIO::ERR_ACCESS_DENIED, url.path()); + error( TDEIO::ERR_ACCESS_DENIED, url.path()); else if (errno == EISDIR) - error( KIO::ERR_IS_DIRECTORY, url.path()); + error( TDEIO::ERR_IS_DIRECTORY, url.path()); else - error( KIO::ERR_CANNOT_DELETE, url.path() ); + error( TDEIO::ERR_CANNOT_DELETE, url.path() ); return; } } else { @@ -944,10 +944,10 @@ void FileProtocol::del( const KURL& url, bool isfile) if ( ::rmdir( _path.data() ) == -1 ) { if ((errno == EACCES) || (errno == EPERM)) - error( KIO::ERR_ACCESS_DENIED, url.path()); + error( TDEIO::ERR_ACCESS_DENIED, url.path()); else { kdDebug( 7101 ) << "could not rmdir " << perror << endl; - error( KIO::ERR_COULD_NOT_RMDIR, url.path() ); + error( TDEIO::ERR_COULD_NOT_RMDIR, url.path() ); return; } } @@ -1001,7 +1001,7 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & // because there's no real performance penalty in kio_file for returning the complete // details. Please consider doing it in your kioslave if you're using this one as a model :) UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = filename; entry.append( atom ); @@ -1019,7 +1019,7 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & buffer2[ n ] = 0; } - atom.m_uds = KIO::UDS_LINK_DEST; + atom.m_uds = TDEIO::UDS_LINK_DEST; atom.m_str = TQFile::decodeName( buffer2 ); entry.append( atom ); @@ -1029,15 +1029,15 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & type = S_IFMT - 1; access = S_IRWXU | S_IRWXG | S_IRWXO; - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = type; entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = access; entry.append( atom ); - atom.m_uds = KIO::UDS_SIZE; + atom.m_uds = TDEIO::UDS_SIZE; atom.m_long = 0L; entry.append( atom ); @@ -1053,15 +1053,15 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & type = buff.st_mode & S_IFMT; // extract file type access = buff.st_mode & 07777; // extract permissions - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = type; entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = access; entry.append( atom ); - atom.m_uds = KIO::UDS_SIZE; + atom.m_uds = TDEIO::UDS_SIZE; atom.m_long = buff.st_size; entry.append( atom ); @@ -1073,19 +1073,19 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString & #endif notype: - atom.m_uds = KIO::UDS_MODIFICATION_TIME; + atom.m_uds = TDEIO::UDS_MODIFICATION_TIME; atom.m_long = buff.st_mtime; entry.append( atom ); - atom.m_uds = KIO::UDS_USER; + atom.m_uds = TDEIO::UDS_USER; atom.m_str = getUserName( buff.st_uid ); entry.append( atom ); - atom.m_uds = KIO::UDS_GROUP; + atom.m_uds = TDEIO::UDS_GROUP; atom.m_str = getGroupName( buff.st_gid ); entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS_TIME; + atom.m_uds = TDEIO::UDS_ACCESS_TIME; atom.m_long = buff.st_atime; entry.append( atom ); @@ -1123,40 +1123,40 @@ void FileProtocol::stat( const KURL & url ) UDSEntry entry; if ( !createUDSEntry( url.fileName(), _path, entry, details, true /*with acls*/ ) ) { - error( KIO::ERR_DOES_NOT_EXIST, url.path(-1) ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path(-1) ); return; } #if 0 ///////// debug code - KIO::UDSEntry::ConstIterator it = entry.begin(); + TDEIO::UDSEntry::ConstIterator it = entry.begin(); for( ; it != entry.end(); it++ ) { switch ((*it).m_uds) { - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: kdDebug(7101) << "File Type : " << (mode_t)((*it).m_long) << endl; break; - case KIO::UDS_ACCESS: + case TDEIO::UDS_ACCESS: kdDebug(7101) << "Access permissions : " << (mode_t)((*it).m_long) << endl; break; - case KIO::UDS_USER: + case TDEIO::UDS_USER: kdDebug(7101) << "User : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_GROUP: + case TDEIO::UDS_GROUP: kdDebug(7101) << "Group : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: kdDebug(7101) << "Name : " << ((*it).m_str.ascii() ) << endl; //m_strText = decodeFileName( (*it).m_str ); break; - case KIO::UDS_URL: + case TDEIO::UDS_URL: kdDebug(7101) << "URL : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_MIME_TYPE: + case TDEIO::UDS_MIME_TYPE: kdDebug(7101) << "MimeType : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_LINK_DEST: + case TDEIO::UDS_LINK_DEST: kdDebug(7101) << "LinkDest : " << ((*it).m_str.ascii() ) << endl; break; - case KIO::UDS_EXTENDED_ACL: + case TDEIO::UDS_EXTENDED_ACL: kdDebug(7101) << "Contains extended ACL " << endl; break; } @@ -1188,12 +1188,12 @@ void FileProtocol::listDir( const KURL& url) KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } if ( !S_ISDIR( buff.st_mode ) ) { - error( KIO::ERR_IS_FILE, url.path() ); + error( TDEIO::ERR_IS_FILE, url.path() ); return; } @@ -1211,7 +1211,7 @@ void FileProtocol::listDir( const KURL& url) break; #endif default: - error( KIO::ERR_CANNOT_ENTER_DIRECTORY, url.path() ); + error( TDEIO::ERR_CANNOT_ENTER_DIRECTORY, url.path() ); break; } return; @@ -1280,7 +1280,7 @@ void FileProtocol::testDir( const TQString& path ) TQCString _path( TQFile::encodeName(path)); KDE_struct_stat buff; if ( KDE_stat( _path.data(), &buff ) == -1 ) { - error( KIO::ERR_DOES_NOT_EXIST, path ); + error( TDEIO::ERR_DOES_NOT_EXIST, path ); return; } @@ -1335,12 +1335,12 @@ void FileProtocol::special( const TQByteArray &data) TQString filename; stream >> filename; KShred shred( filename ); - connect( &shred, TQT_SIGNAL( processedSize( KIO::filesize_t ) ), - this, TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) ); + connect( &shred, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ), + this, TQT_SLOT( slotProcessedSize( TDEIO::filesize_t ) ) ); connect( &shred, TQT_SIGNAL( infoMessage( const TQString & ) ), this, TQT_SLOT( slotInfoMessage( const TQString & ) ) ); if (!shred.shred()) - error( KIO::ERR_CANNOT_DELETE, filename ); + error( TDEIO::ERR_CANNOT_DELETE, filename ); else finished(); break; @@ -1351,7 +1351,7 @@ void FileProtocol::special( const TQByteArray &data) } // Connected to KShred -void FileProtocol::slotProcessedSize( KIO::filesize_t bytes ) +void FileProtocol::slotProcessedSize( TDEIO::filesize_t bytes ) { kdDebug(7101) << "FileProtocol::slotProcessedSize (" << (unsigned int) bytes << ")" << endl; processedSize( bytes ); @@ -1382,7 +1382,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c kdDebug(7101) << "VOLMGT: no media in " << devname.data() << endl; err = i18n("No Media inserted or Media not recognized."); - error( KIO::ERR_COULD_NOT_MOUNT, err ); + error( TDEIO::ERR_COULD_NOT_MOUNT, err ); return; } else { kdDebug(7101) << "VOLMGT: " << devname.data() @@ -1393,7 +1393,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c } else { err = i18n("\"vold\" is not running."); kdDebug(7101) << "VOLMGT: " << err << endl; - error( KIO::ERR_COULD_NOT_MOUNT, err ); + error( TDEIO::ERR_COULD_NOT_MOUNT, err ); return; } #else @@ -1425,7 +1425,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c path += TQString::fromLatin1(":") + epath; TQString mountProg = TDEGlobal::dirs()->findExe("mount", path); if (mountProg.isEmpty()){ - error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); + error( TDEIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\"")); return; } @@ -1472,7 +1472,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c else { // Didn't work - or maybe we just got a warning - TQString mp = KIO::findDeviceMountPoint( _dev ); + TQString mp = TDEIO::findDeviceMountPoint( _dev ); // Is the device mounted ? if ( !mp.isEmpty() && mount_ret == 0) { @@ -1501,7 +1501,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c } else { - error( KIO::ERR_COULD_NOT_MOUNT, err ); + error( TDEIO::ERR_COULD_NOT_MOUNT, err ); return; } } @@ -1536,7 +1536,7 @@ void FileProtocol::unmount( const TQString& _point ) if( (mnttab = KDE_fopen( MNTTAB, "r" )) == NULL ) { err = "couldn't open mnttab"; kdDebug(7101) << "VOLMGT: " << err << endl; - error( KIO::ERR_COULD_NOT_UNMOUNT, err ); + error( TDEIO::ERR_COULD_NOT_UNMOUNT, err ); return; } @@ -1561,7 +1561,7 @@ void FileProtocol::unmount( const TQString& _point ) kdDebug(7101) << "VOLMGT: " << TQFile::encodeName(_point).data() << ": " << err << endl; - error( KIO::ERR_COULD_NOT_UNMOUNT, err ); + error( TDEIO::ERR_COULD_NOT_UNMOUNT, err ); return; } @@ -1599,7 +1599,7 @@ void FileProtocol::unmount( const TQString& _point ) */ err = i18n("\"vold\" is not running."); kdDebug(7101) << "VOLMGT: " << err << endl; - error( KIO::ERR_COULD_NOT_UNMOUNT, err ); + error( TDEIO::ERR_COULD_NOT_UNMOUNT, err ); return; } #else @@ -1610,7 +1610,7 @@ void FileProtocol::unmount( const TQString& _point ) TQString umountProg = TDEGlobal::dirs()->findExe("umount", path); if (umountProg.isEmpty()) { - error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\"")); + error( TDEIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\"")); return; } buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(TDEProcess::quote(_point)).data(), tmp ); @@ -1646,7 +1646,7 @@ void FileProtocol::unmount( const TQString& _point ) if ( err.isEmpty() ) finished(); else - error( KIO::ERR_COULD_NOT_UNMOUNT, err ); + error( TDEIO::ERR_COULD_NOT_UNMOUNT, err ); } /************************************* @@ -1805,19 +1805,19 @@ static void appendACLAtoms( const TQCString & path, UDSEntry& entry, mode_t type if ( acl || defaultAcl ) { kdDebug(7101) << path.data() << " has extended ACL entries " << endl; - atom.m_uds = KIO::UDS_EXTENDED_ACL; + atom.m_uds = TDEIO::UDS_EXTENDED_ACL; atom.m_long = 1; entry.append( atom ); } if ( withACL ) { if ( acl ) { - atom.m_uds = KIO::UDS_ACL_STRING; + atom.m_uds = TDEIO::UDS_ACL_STRING; atom.m_str = aclAsString( acl ); entry.append( atom ); kdDebug(7101) << path.data() << "ACL: " << atom.m_str << endl; } if ( defaultAcl ) { - atom.m_uds = KIO::UDS_DEFAULT_ACL_STRING; + atom.m_uds = TDEIO::UDS_DEFAULT_ACL_STRING; atom.m_str = aclAsString( defaultAcl ); entry.append( atom ); kdDebug(7101) << path.data() << "DEFAULT ACL: " << atom.m_str << endl; diff --git a/kioslave/file/file.h b/kioslave/file/file.h index 350703da5..9f9d98995 100644 --- a/kioslave/file/file.h +++ b/kioslave/file/file.h @@ -40,7 +40,7 @@ // Note that this header file is installed, so think twice // before breaking binary compatibility (read: it is forbidden :) -class FileProtocol : public TQObject, public KIO::SlaveBase +class FileProtocol : public TQObject, public TDEIO::SlaveBase { Q_OBJECT public: @@ -76,12 +76,12 @@ public: bool pmount( const TQString &dev ); protected slots: - void slotProcessedSize( KIO::filesize_t _bytes ); + void slotProcessedSize( TDEIO::filesize_t _bytes ); void slotInfoMessage( const TQString & msg ); protected: - bool createUDSEntry( const TQString & filename, const TQCString & path, KIO::UDSEntry & entry, + bool createUDSEntry( const TQString & filename, const TQCString & path, TDEIO::UDSEntry & entry, short int details, bool withACL ); int setACL( const char *path, mode_t perm, bool _directoryDefault ); diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index 62ff5c59c..3d29e2b65 100644 --- a/kioslave/ftp/ftp.cc +++ b/kioslave/ftp/ftp.cc @@ -83,7 +83,7 @@ // JPF: somebody should find a better solution for this or move this to KIO // JPF: anyhow, in KDE 3.2.0 I found diffent MAX_IPC_SIZE definitions! -namespace KIO { +namespace TDEIO { enum buffersizes { /** * largest buffer size that should be used to transfer data between @@ -131,9 +131,9 @@ namespace KIO { } } -KIO::filesize_t Ftp::UnknownSize = (KIO::filesize_t)-1; +TDEIO::filesize_t Ftp::UnknownSize = (TDEIO::filesize_t)-1; -using namespace KIO; +using namespace TDEIO; extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); } @@ -849,7 +849,7 @@ int Ftp::ftpOpenPASVDataConnection() assert(m_data == NULL); // ... but no data connection // Check that we can do PASV - const KSocketAddress *sa = m_control->peerAddress(); + const TDESocketAddress *sa = m_control->peerAddress(); if (sa != NULL && sa->family() != PF_INET) return ERR_INTERNAL; // no PASV for non-PF_INET connections @@ -910,7 +910,7 @@ int Ftp::ftpOpenEPSVDataConnection() assert(m_control != NULL); // must have control connection socket assert(m_data == NULL); // ... but no data connection - const KSocketAddress *sa = m_control->peerAddress(); + const TDESocketAddress *sa = m_control->peerAddress(); int portnum; // we are sure sa is a KInetSocketAddress, because we asked for KExtendedSocket::inetSocket // when we connected @@ -1127,7 +1127,7 @@ int Ftp::ftpAcceptConnect() } bool Ftp::ftpOpenCommand( const char *_command, const TQString & _path, char _mode, - int errorcode, KIO::fileoffset_t _offset ) + int errorcode, TDEIO::fileoffset_t _offset ) { int errCode = 0; if( !ftpDataMode(_mode) ) @@ -1428,15 +1428,15 @@ void Ftp::ftpShortStatAnswer( const TQString& filename, bool isDir ) UDSEntry entry; UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = filename; entry.append( atom ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = isDir ? S_IFDIR : S_IFREG; entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; entry.append( atom ); @@ -1484,22 +1484,22 @@ void Ftp::stat( const KURL &url) UDSEntry entry; UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = TQString::null; entry.append( atom ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFDIR; entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; entry.append( atom ); - atom.m_uds = KIO::UDS_USER; + atom.m_uds = TDEIO::UDS_USER; atom.m_str = "root"; entry.append( atom ); - atom.m_uds = KIO::UDS_GROUP; + atom.m_uds = TDEIO::UDS_GROUP; entry.append( atom ); // no size @@ -1551,15 +1551,15 @@ void Ftp::stat( const KURL &url) UDSEntry entry; UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = filename; entry.append( atom ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFDIR; entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; entry.append( atom ); @@ -1987,7 +1987,7 @@ void Ftp::get( const KURL & url ) ftpCloseCommand(); // must close command! } -Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t llOffset) +Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, TDEIO::fileoffset_t llOffset) { // Calls error() by itself! if( !ftpOpenConnection(loginImplicit) ) @@ -2028,12 +2028,12 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi if (!m_size) m_size = UnknownSize; } - KIO::filesize_t bytesLeft = 0; + TDEIO::filesize_t bytesLeft = 0; if ( m_size != UnknownSize ) bytesLeft = m_size - llOffset; kdDebug(7102) << "ftpGet: starting with offset=" << llOffset << endl; - KIO::fileoffset_t processed_size = llOffset; + TDEIO::fileoffset_t processed_size = llOffset; TQByteArray array; bool mimetypeEmitted = false; @@ -2137,7 +2137,7 @@ void Ftp::mimetype( const KURL& url ) } char buffer[ 2048 ]; TQByteArray array; - // Get one chunk of data only and send it, KIO::Job will determine the + // Get one chunk of data only and send it, TDEIO::Job will determine the // mimetype from it using KMimeMagic int n = m_data->read( buffer, 2048 ); array.setRawData(buffer, n); @@ -2284,7 +2284,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, } else dest = dest_orig; - KIO::fileoffset_t offset = 0; + TDEIO::fileoffset_t offset = 0; // set the mode according to offset if( resume && m_size > 0 ) @@ -2304,7 +2304,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url, return statusServerError; kdDebug(7102) << "ftpPut: starting with offset=" << offset << endl; - KIO::fileoffset_t processed_size = offset; + TDEIO::fileoffset_t processed_size = offset; TQByteArray buffer; int result; @@ -2621,7 +2621,7 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCop initialMode = 0666; // open the output file ... - KIO::fileoffset_t hCopyOffset = 0; + TDEIO::fileoffset_t hCopyOffset = 0; if(bResume) { iCopyFile = KDE_open( sPart.data(), O_RDWR ); // append if resuming diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h index 44f0bdc71..8a847e6da 100644 --- a/kioslave/ftp/ftp.h +++ b/kioslave/ftp/ftp.h @@ -43,7 +43,7 @@ struct FtpEntry TQString group; TQString link; - KIO::filesize_t size; + TDEIO::filesize_t size; mode_t type; mode_t access; time_t date; @@ -233,7 +233,7 @@ private: //=============================================================================== // Ftp //=============================================================================== -class Ftp : public KIO::SlaveBase +class Ftp : public TDEIO::SlaveBase { // Ftp() {} @@ -369,7 +369,7 @@ private: * @return true if the command was accepted by the server. */ bool ftpOpenCommand( const char *command, const TQString & path, char mode, - int errorcode, KIO::fileoffset_t offset = 0 ); + int errorcode, TDEIO::fileoffset_t offset = 0 ); /** * The counterpart to openCommand. @@ -436,7 +436,7 @@ private: /** * Helper to fill an UDSEntry */ - void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir ); + void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, TDEIO::UDSEntry& entry, bool isDir ); void ftpShortStatAnswer( const TQString& filename, bool isDir ); @@ -482,7 +482,7 @@ private: * @param hCopyOffset local file only: non-zero for resume * @return 0 for success, -1 for server error, -2 for client error */ - StatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t hCopyOffset); + StatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, TDEIO::fileoffset_t hCopyOffset); /** * This is the internal implementation of put() - see copy(). @@ -575,8 +575,8 @@ private: // data members bool m_bPasv; bool m_bUseProxy; - KIO::filesize_t m_size; - static KIO::filesize_t UnknownSize; + TDEIO::filesize_t m_size; + static TDEIO::filesize_t UnknownSize; enum { diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index f6e714988..cbff13fdf 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -90,7 +90,7 @@ #include <misc/kntlm/kntlm.h> -using namespace KIO; +using namespace TDEIO; extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); @@ -185,7 +185,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header) } -#define NO_SIZE ((KIO::filesize_t) -1) +#define NO_SIZE ((TDEIO::filesize_t) -1) #ifdef HAVE_STRTOLL #define STRTOLL strtoll @@ -465,7 +465,7 @@ bool HTTPProtocol::checkRequestURL( const KURL& u ) if (m_request.hostname.isEmpty()) { - error( KIO::ERR_UNKNOWN_HOST, i18n("No host specified.")); + error( TDEIO::ERR_UNKNOWN_HOST, i18n("No host specified.")); return false; } @@ -619,15 +619,15 @@ void HTTPProtocol::stat(const KURL& url) // When downloading we assume it exists UDSEntry entry; UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = url.fileName(); entry.append( atom ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFREG; // a file entry.append( atom ); - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = S_IRUSR | S_IRGRP | S_IROTH; // readable by everybody entry.append( atom ); @@ -762,7 +762,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) KURL thisURL ( urlStr, encoding ); - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; if ( thisURL.isValid() ) { // don't list the base dir of a listDir() @@ -811,7 +811,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat ) } } -void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) +void HTTPProtocol::davGeneric( const KURL& url, TDEIO::HTTP_METHOD method ) { kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davGeneric " << url.url() << endl; @@ -877,7 +877,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& if ( hasMetaData( "davRequestResponse" ) ) { - atom.m_uds = KIO::UDS_XML_PROPERTIES; + atom.m_uds = TDEIO::UDS_XML_PROPERTIES; TQDomDocument doc; doc.appendChild(prop); atom.m_str = doc.toString(); @@ -899,14 +899,14 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& if ( property.tagName() == "creationdate" ) { // Resource creation date. Should be is ISO 8601 format. - atom.m_uds = KIO::UDS_CREATION_TIME; + atom.m_uds = TDEIO::UDS_CREATION_TIME; atom.m_long = parseDateTime( property.text(), property.attribute("dt") ); entry.append( atom ); } else if ( property.tagName() == "getcontentlength" ) { // Content length (file size) - atom.m_uds = KIO::UDS_SIZE; + atom.m_uds = TDEIO::UDS_SIZE; atom.m_long = property.text().toULong(); entry.append( atom ); } @@ -952,7 +952,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& else if ( property.tagName() == "getlastmodified" ) { // Last modification date - atom.m_uds = KIO::UDS_MODIFICATION_TIME; + atom.m_uds = TDEIO::UDS_MODIFICATION_TIME; atom.m_long = parseDateTime( property.text(), property.attribute("dt") ); entry.append( atom ); @@ -1009,27 +1009,27 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry& setMetaData( "davLockCount", TQString("%1").arg(lockCount) ); setMetaData( "davSupportedLockCount", TQString("%1").arg(supportedLockCount) ); - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = isDirectory ? S_IFDIR : S_IFREG; entry.append( atom ); if ( foundExecutable || isDirectory ) { // File was executable, or is a directory. - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = 0700; entry.append(atom); } else { - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = 0600; entry.append(atom); } if ( !isDirectory && !mimeType.isEmpty() ) { - atom.m_uds = KIO::UDS_MIME_TYPE; + atom.m_uds = TDEIO::UDS_MIME_TYPE; atom.m_str = mimeType; entry.append( atom ); } @@ -1553,7 +1553,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url ) url = m_request.url.url(); TQString action, errorString; - KIO::Error kError; + TDEIO::Error kError; // for 412 Precondition Failed TQString ow = i18n( "Otherwise, the request would have succeeded." ); @@ -1742,7 +1742,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url ) void HTTPProtocol::httpError() { TQString action, errorString; - KIO::Error kError; + TDEIO::Error kError; switch ( m_request.method ) { case HTTP_PUT: @@ -2187,10 +2187,10 @@ bool HTTPProtocol::httpOpen() { m_request.fcache = checkCacheEntry( ); - bool bCacheOnly = (m_request.cache == KIO::CC_CacheOnly); + bool bCacheOnly = (m_request.cache == TDEIO::CC_CacheOnly); bool bOffline = isOffline(m_request.doProxy ? m_proxyURL : m_request.url); - if (bOffline && (m_request.cache != KIO::CC_Reload)) - m_request.cache = KIO::CC_CacheOnly; + if (bOffline && (m_request.cache != TDEIO::CC_Reload)) + m_request.cache = TDEIO::CC_CacheOnly; if (m_request.cache == CC_Reload && m_request.fcache) { @@ -2198,7 +2198,7 @@ bool HTTPProtocol::httpOpen() fclose(m_request.fcache); m_request.fcache = 0; } - if ((m_request.cache == KIO::CC_CacheOnly) || (m_request.cache == KIO::CC_Cache)) + if ((m_request.cache == TDEIO::CC_CacheOnly) || (m_request.cache == TDEIO::CC_Cache)) m_request.bMustRevalidate = false; m_request.bCachedWrite = true; @@ -2429,8 +2429,8 @@ bool HTTPProtocol::httpOpen() if ( m_request.offset > 0 ) { - header += TQString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset)); - kdDebug(7103) << "kio_http : Range = " << KIO::number(m_request.offset) << endl; + header += TQString("Range: bytes=%1-\r\n").arg(TDEIO::number(m_request.offset)); + kdDebug(7103) << "kio_http : Range = " << TDEIO::number(m_request.offset) << endl; } if ( m_request.cache == CC_Reload ) @@ -4092,7 +4092,7 @@ void HTTPProtocol::special( const TQByteArray &data ) KURL url; int method; stream >> url >> method; - davGeneric( url, (KIO::HTTP_METHOD) method ); + davGeneric( url, (TDEIO::HTTP_METHOD) method ); break; } case 99: // Close Connection @@ -4343,7 +4343,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) bool useMD5 = !m_sContentMD5.isEmpty(); // Deal with the size of the file. - KIO::filesize_t sz = m_request.offset; + TDEIO::filesize_t sz = m_request.offset; if ( sz ) m_iSize += sz; @@ -4354,7 +4354,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) if ( !dataInternal ) { if ( (m_iSize > 0) && (m_iSize != NO_SIZE)) { totalSize(m_iSize); - infoMessage( i18n( "Retrieving %1 from %2...").arg(KIO::convertSize(m_iSize)) + infoMessage( i18n( "Retrieving %1 from %2...").arg(TDEIO::convertSize(m_iSize)) .arg( m_request.hostname ) ); } else @@ -4411,7 +4411,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) m_iBytesLeft = NO_SIZE; kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readBody: retrieve data. " - << KIO::number(m_iBytesLeft) << " left." << endl; + << TDEIO::number(m_iBytesLeft) << " left." << endl; // Main incoming loop... Gather everything while we can... m_cpMimeBuffer = false; @@ -4527,7 +4527,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) if (m_iBytesLeft == 0) { - kdDebug(7113) << "("<<m_pid<<") EOD received! Left = "<< KIO::number(m_iBytesLeft) << endl; + kdDebug(7113) << "("<<m_pid<<") EOD received! Left = "<< TDEIO::number(m_iBytesLeft) << endl; break; } } @@ -4554,13 +4554,13 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ ) } else { - kdDebug(7113) << "(" << m_pid << ") still "<< KIO::number(m_iBytesLeft) + kdDebug(7113) << "(" << m_pid << ") still "<< TDEIO::number(m_iBytesLeft) << " bytes left! can't close cache entry!\n"; } if (sz <= 1) { - /* kdDebug(7113) << "(" << m_pid << ") readBody: sz = " << KIO::number(sz) + /* kdDebug(7113) << "(" << m_pid << ") readBody: sz = " << TDEIO::number(sz) << ", responseCode =" << m_responseCode << endl; */ if (m_responseCode >= 500 && m_responseCode <= 599) error(ERR_INTERNAL_SERVER, m_state.hostname); diff --git a/kioslave/http/http.h b/kioslave/http/http.h index 2985eb938..ccbb60ce6 100644 --- a/kioslave/http/http.h +++ b/kioslave/http/http.h @@ -42,11 +42,11 @@ class DCOPClient; class TQDomElement; class TQDomNodeList; -namespace KIO { +namespace TDEIO { class AuthInfo; } -class HTTPProtocol : public TQObject, public KIO::TCPSlaveBase +class HTTPProtocol : public TQObject, public TDEIO::TCPSlaveBase { Q_OBJECT public: @@ -103,7 +103,7 @@ public: HTTPRequest () { port = 0; - method = KIO::HTTP_UNKNOWN; + method = TDEIO::HTTP_UNKNOWN; offset = 0; doProxy = false; allowCompressedPage = false; @@ -128,9 +128,9 @@ public: TQString passwd; TQString path; TQString query; - KIO::HTTP_METHOD method; - KIO::CacheControl cache; - KIO::filesize_t offset; + TDEIO::HTTP_METHOD method; + TDEIO::CacheControl cache; + TDEIO::filesize_t offset; bool doProxy; KURL url; TQString window; // Window Id this request is related to. @@ -205,7 +205,7 @@ public: bool davHostOk(); // send generic DAV request - void davGeneric( const KURL& url, KIO::HTTP_METHOD method ); + void davGeneric( const KURL& url, TDEIO::HTTP_METHOD method ); // Send requests to lock and unlock resources void davLock( const KURL& url, const TQString& scope, @@ -307,7 +307,7 @@ protected: */ void davSetRequest( const TQCString& requestXML ); void davStatList( const KURL& url, bool stat = true ); - void davParsePropstats( const TQDomNodeList& propstats, KIO::UDSEntry& entry ); + void davParsePropstats( const TQDomNodeList& propstats, TDEIO::UDSEntry& entry ); void davParseActiveLocks( const TQDomNodeList& activeLocks, uint& lockCount ); @@ -463,7 +463,7 @@ protected: /** * Creates authorization prompt info. */ - void promptInfo( KIO::AuthInfo& info ); + void promptInfo( TDEIO::AuthInfo& info ); protected: HTTPState m_state; @@ -481,9 +481,9 @@ protected: // Processing related bool m_bChunked; // Chunked tranfer encoding - KIO::filesize_t m_iSize; // Expected size of message - KIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message. - KIO::filesize_t m_iContentLeft; // # of content bytes left + TDEIO::filesize_t m_iSize; // Expected size of message + TDEIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message. + TDEIO::filesize_t m_iContentLeft; // # of content bytes left TQByteArray m_bufReceive; // Receive buffer bool m_dataInternal; // Data is for internal consumption char m_lineBuf[1024]; diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index e70c97e54..f115a6da6 100644 --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -257,7 +257,7 @@ KCookieJar::KCookieJar() m_configChanged = false; m_cookiesChanged = false; - KConfig cfg("khtml/domain_info", true, false, "data"); + TDEConfig cfg("khtml/domain_info", true, false, "data"); TQStringList countries = cfg.readListEntry("twoLevelTLD"); for(TQStringList::ConstIterator it = countries.begin(); it != countries.end(); ++it) @@ -1479,7 +1479,7 @@ bool KCookieJar::loadCookies(const TQString &_filename) // Save the cookie configuration // -void KCookieJar::saveConfig(KConfig *_config) +void KCookieJar::saveConfig(TDEConfig *_config) { if (!m_configChanged) return; @@ -1515,7 +1515,7 @@ void KCookieJar::saveConfig(KConfig *_config) // Load the cookie configuration // -void KCookieJar::loadConfig(KConfig *_config, bool reparse ) +void KCookieJar::loadConfig(TDEConfig *_config, bool reparse ) { if ( reparse ) _config->reparseConfiguration(); diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h index eb64485ea..bb16d75d3 100644 --- a/kioslave/http/kcookiejar/kcookiejar.h +++ b/kioslave/http/kcookiejar/kcookiejar.h @@ -31,7 +31,7 @@ #include <tqptrlist.h> #include <time.h> -class KConfig; +class TDEConfig; class KCookieJar; class KHttpCookie; class KHttpCookieList; @@ -146,12 +146,12 @@ public: /** * Save the cookie configuration */ - void saveConfig(KConfig *_config); + void saveConfig(TDEConfig *_config); /** * Load the cookie configuration */ - void loadConfig(KConfig *_config, bool reparse = false); + void loadConfig(TDEConfig *_config, bool reparse = false); /** * Looks for cookies in the cookie jar which are appropriate for _url. diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index da9c16ce7..94df40b63 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -88,7 +88,7 @@ KCookieServer::KCookieServer(const TQCString &name) mAdvicePending = false; mTimer = new TQTimer(); connect( mTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotSave())); - mConfig = new KConfig("kcookiejarrc"); + mConfig = new TDEConfig("kcookiejarrc"); mCookieJar->loadConfig( mConfig ); TQString filename = locateLocal("data", "kcookiejar/cookies"); diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h index 0c36f10b1..2cbb9ccf1 100644 --- a/kioslave/http/kcookiejar/kcookieserver.h +++ b/kioslave/http/kcookiejar/kcookieserver.h @@ -34,7 +34,7 @@ class KHttpCookie; class TQTimer; class RequestList; class DCOPClient; -class KConfig; +class TDEConfig; class KCookieServer : public KDEDModule { @@ -86,7 +86,7 @@ protected: TQTimer *mTimer; bool mAdvicePending; DCOPClient *mOldCookieServer; - KConfig *mConfig; + TDEConfig *mConfig; private: virtual int newInstance(TQValueList<TQCString>) { return 0; } diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index 05f0ac0ea..236e2406b 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -36,7 +36,7 @@ static const char *description = "KCookiejar regression test"; static KCookieJar *jar; static TQCString *lastYear; static TQCString *nextYear; -static KConfig *config = 0; +static TDEConfig *config = 0; static KCmdLineOptions options[] = @@ -87,7 +87,7 @@ static void clearConfig() delete config; TQString file = locateLocal("config", "kcookiejar-testconfig"); TQFile::remove(file); - config = new KConfig(file); + config = new TDEConfig(file); config->setGroup("Cookie Policy"); config->writeEntry("RejectCrossDomainCookies", false); config->writeEntry("AcceptSessionCookies", false); diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index f5f7f8757..59f5f781e 100644 --- a/kioslave/iso/iso.cpp +++ b/kioslave/iso/iso.cpp @@ -54,7 +54,7 @@ static const unsigned char zisofs_magic[8] = { 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07 }; -using namespace KIO; +using namespace TDEIO; extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); } @@ -241,7 +241,7 @@ void kio_isoProtocol::listDir( const KURL & url ) kdDebug() << "Checking (stat) on " << _path << endl; struct stat buff; if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } // It's a real dir -> redirect @@ -278,12 +278,12 @@ void kio_isoProtocol::listDir( const KURL & url ) const KArchiveEntry* e = root->entry( path ); if ( !e ) { - error( KIO::ERR_DOES_NOT_EXIST, path ); + error( TDEIO::ERR_DOES_NOT_EXIST, path ); return; } if ( ! e->isDirectory() ) { - error( KIO::ERR_IS_FILE, path ); + error( TDEIO::ERR_IS_FILE, path ); return; } dir = (KArchiveDirectory*)e; @@ -328,17 +328,17 @@ void kio_isoProtocol::stat( const KURL & url ) struct stat buff; if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { kdDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl; - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } // Real directory. Return just enough information for KRun to work UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; atom.m_str = url.fileName(); entry.append( atom ); kdDebug() << "kio_isoProtocol::stat returning name=" << url.fileName() << endl; - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = buff.st_mode & S_IFMT; entry.append( atom ); @@ -363,7 +363,7 @@ void kio_isoProtocol::stat( const KURL & url ) } if ( !isoEntry ) { - error( KIO::ERR_DOES_NOT_EXIST, path ); + error( TDEIO::ERR_DOES_NOT_EXIST, path ); return; } createUDSEntry( isoEntry, entry ); @@ -412,7 +412,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat pptr = pointer_block.data(); } else { - error(KIO::ERR_COULD_NOT_READ, path); + error(TDEIO::ERR_COULD_NOT_READ, path); return; } } else { @@ -474,7 +474,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat } if (pos!=size) { - error(KIO::ERR_COULD_NOT_READ, path); + error(TDEIO::ERR_COULD_NOT_READ, path); return; } @@ -492,7 +492,7 @@ void kio_isoProtocol::get( const KURL & url ) TQString path; if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) { - error( KIO::ERR_DOES_NOT_EXIST, url.path() ); + error( TDEIO::ERR_DOES_NOT_EXIST, url.path() ); return; } @@ -501,12 +501,12 @@ void kio_isoProtocol::get( const KURL & url ) if ( !isoEntry ) { - error( KIO::ERR_DOES_NOT_EXIST, path ); + error( TDEIO::ERR_DOES_NOT_EXIST, path ); return; } if ( isoEntry->isDirectory() ) { - error( KIO::ERR_IS_DIRECTORY, path ); + error( TDEIO::ERR_IS_DIRECTORY, path ); return; } diff --git a/kioslave/iso/iso.h b/kioslave/iso/iso.h index 2a488bd9d..136c32736 100644 --- a/kioslave/iso/iso.h +++ b/kioslave/iso/iso.h @@ -28,7 +28,7 @@ class KIso; -class kio_isoProtocol : public KIO::SlaveBase +class kio_isoProtocol : public TDEIO::SlaveBase { public: kio_isoProtocol( const TQCString &pool, const TQCString &app ); @@ -40,7 +40,7 @@ public: protected: void getFile( const KIsoFile *isoFileEntry, const TQString &path ); - void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry ); + void createUDSEntry( const KArchiveEntry * isoEntry, TDEIO::UDSEntry & entry ); bool checkNewFile( TQString fullPath, TQString & path, int startsec ); KIso * m_isoFile; diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp index 9ec1f1c3e..b19ec589b 100644 --- a/kioslave/iso/kiso.cpp +++ b/kioslave/iso/kiso.cpp @@ -324,9 +324,9 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) { void KIso::readParams() { - KConfig *config; + TDEConfig *config; - config = new KConfig("kio_isorc"); + config = new TDEConfig("kio_isorc"); showhidden=config->readBoolEntry("showhidden",false); showrr=config->readBoolEntry("showrr",true); diff --git a/kioslave/metainfo/metainfo.cpp b/kioslave/metainfo/metainfo.cpp index 9bc99981f..66e5357f9 100644 --- a/kioslave/metainfo/metainfo.cpp +++ b/kioslave/metainfo/metainfo.cpp @@ -33,7 +33,7 @@ // mimeType - the mime type of the file, so we need not extra determine it // what - what to load -using namespace KIO; +using namespace TDEIO; extern "C" { diff --git a/kioslave/metainfo/metainfo.h b/kioslave/metainfo/metainfo.h index 491da62eb..a77647180 100644 --- a/kioslave/metainfo/metainfo.h +++ b/kioslave/metainfo/metainfo.h @@ -23,7 +23,7 @@ #include <kio/slavebase.h> -class MetaInfoProtocol : public KIO::SlaveBase +class MetaInfoProtocol : public TDEIO::SlaveBase { public: MetaInfoProtocol(const TQCString &pool, const TQCString &app); diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp index 79e319964..c9523f230 100644 --- a/kmdi/kmdi/dockcontainer.cpp +++ b/kmdi/kmdi/dockcontainer.cpp @@ -460,7 +460,7 @@ void DockContainer::setPixmap(KDockWidget* widget ,const TQPixmap& pixmap) tab->setIcon(pixmap.isNull()?SmallIcon("misc"):pixmap); } -void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix) +void DockContainer::save(TDEConfig* cfg,const TQString& group_or_prefix) { // group name TQString grp=cfg->group(); @@ -504,7 +504,7 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix) cfg->setGroup(grp); } -void DockContainer::load(KConfig* cfg,const TQString& group_or_prefix) +void DockContainer::load(TDEConfig* cfg,const TQString& group_or_prefix) { TQString grp=cfg->group(); cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name())); diff --git a/kmdi/kmdi/dockcontainer.h b/kmdi/kmdi/dockcontainer.h index ac27f8644..9b7478378 100644 --- a/kmdi/kmdi/dockcontainer.h +++ b/kmdi/kmdi/dockcontainer.h @@ -91,8 +91,8 @@ class DockContainer: public TQWidget, public KDockContainer void hideIfNeeded(); - virtual void save(KConfig *,const TQString& group_or_prefix); - virtual void load(KConfig *,const TQString& group_or_prefix); + virtual void save(TDEConfig *,const TQString& group_or_prefix); + virtual void load(TDEConfig *,const TQString& group_or_prefix); void setStyle(int); protected: diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp index 1233bc64b..64b375ef0 100644 --- a/kmdi/kmdi/guiclient.cpp +++ b/kmdi/kmdi/guiclient.cpp @@ -139,7 +139,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva) // try to read the action shortcut KShortcut sc; - KConfig *cfg = kapp->config(); + TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup("Shortcuts"); sc = KShortcut( cfg->readEntry( aname, "" ) ); diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp index 7c3da3878..af086ee51 100644 --- a/kmdi/kmdidockcontainer.cpp +++ b/kmdi/kmdidockcontainer.cpp @@ -624,7 +624,7 @@ void KMdiDockContainer::load( TQDomElement& dockEl ) TQTimer::singleShot( 0, this, TQT_SLOT( init() ) ); } -void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) +void KMdiDockContainer::save( TDEConfig* cfg, const TQString& group_or_prefix ) { TQString grp = cfg->group(); cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); @@ -671,7 +671,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix ) } -void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix ) +void KMdiDockContainer::load( TDEConfig* cfg, const TQString& group_or_prefix ) { TQString grp = cfg->group(); cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); diff --git a/kmdi/kmdidockcontainer.h b/kmdi/kmdidockcontainer.h index cb0d6e4ce..8dfe6664b 100644 --- a/kmdi/kmdidockcontainer.h +++ b/kmdi/kmdidockcontainer.h @@ -88,22 +88,22 @@ public: void hideIfNeeded(); /** - * Save the config using a KConfig object + * Save the config using a TDEConfig object * * The combination of the group_or_prefix variable and the parent * dockwidget's name will be the group the configuration is saved in * \param group_or_prefix the prefix to append to the parent dockwidget's name */ - virtual void save( KConfig *, const TQString& group_or_prefix ); + virtual void save( TDEConfig *, const TQString& group_or_prefix ); /** - * Load the config using a KConfig object + * Load the config using a TDEConfig object * * The combination of the group_or_prefix variable and the parent * dockwidget's name will be the group the configuration is loaded from * \param group_or_prefix the prefix to append to the parent dockwidget's name */ - virtual void load( KConfig *, const TQString& group_or_prefix ); + virtual void load( TDEConfig *, const TQString& group_or_prefix ); /** * Save the config to a QDomElement diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp index 0057172d6..c2c34c55f 100644 --- a/kmdi/kmdiguiclient.cpp +++ b/kmdi/kmdiguiclient.cpp @@ -251,7 +251,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) // try to read the action shortcut KShortcut sc; - KConfig *cfg = kapp->config(); + TDEConfig *cfg = kapp->config(); TQString _grp = cfg->group(); cfg->setGroup( "Shortcuts" ); // if ( cfg->hasKey( aname ) ) diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index 6a54e3a78..f8e03295c 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -52,8 +52,8 @@ struct DownloadDialog::Private TQWidget *m_page; KListView *m_lvtmp_r, *m_lvtmp_d, *m_lvtmp_l; TQPtrList<Entry> m_installlist; - TQMap<KIO::Job*, Provider*> m_variantjobs; - TQMap<KIO::Job*, TQStringList> m_variants; + TQMap<TDEIO::Job*, Provider*> m_variantjobs; + TQMap<TDEIO::Job*, TQStringList> m_variants; TQMap<Provider*, Provider*> m_newproviders; }; @@ -237,7 +237,7 @@ void DownloadDialog::addProvider(Provider *p) { if(!p->icon().protocol().isEmpty()) { - ret = KIO::NetAccess::download(p->icon(), tmp, this); + ret = TDEIO::NetAccess::download(p->icon(), tmp, this); if(ret) pix = TQPixmap(tmp); } else @@ -331,7 +331,7 @@ void DownloadDialog::addProvider(Provider *p) TQTimer::singleShot(100, this, TQT_SLOT(slotFinish())); } -void DownloadDialog::slotResult(KIO::Job *job) +void DownloadDialog::slotResult(TDEIO::Job *job) { TQDomDocument dom; TQDomElement knewstuff; @@ -459,7 +459,7 @@ void DownloadDialog::addEntry(Entry *entry) kdDebug() << "added entry " << entry->name() << endl; } -void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a) +void DownloadDialog::slotData(TDEIO::Job *job, const TQByteArray &a) { TQCString tmp(a, a.size() + 1); m_data[job].append(TQString::fromUtf8(tmp)); @@ -539,8 +539,8 @@ void DownloadDialog::slotInstall() KURL source = e->payload(); KURL dest = KURL(m_s->downloadDestination(e)); - KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, true); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*))); + TDEIO::FileCopyJob *job = TDEIO::file_copy(source, dest, -1, true); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotInstalled(TDEIO::Job*))); } } @@ -580,12 +580,12 @@ void DownloadDialog::install(Entry *e) d->m_lvtmp_d->setEnabled( true ); } -void DownloadDialog::slotInstalled(KIO::Job *job) +void DownloadDialog::slotInstalled(TDEIO::Job *job) { bool ret = job && (job->error() == 0); if(ret) { - KIO::FileCopyJob *cjob = ::tqqt_cast<KIO::FileCopyJob*>(job); + TDEIO::FileCopyJob *cjob = ::tqqt_cast<TDEIO::FileCopyJob*>(job); if(cjob) { ret = m_s->install(cjob->destURL().path()); @@ -673,7 +673,7 @@ void DownloadDialog::slotSelected() } else { - ret = KIO::NetAccess::download(e->preview(lang), tmp, this); + ret = TDEIO::NetAccess::download(e->preview(lang), tmp, this); } TQString desc = TQString("<b>%1</b><br>").arg(e->name(lang)); @@ -770,7 +770,7 @@ void DownloadDialog::slotPage(TQWidget *w) void DownloadDialog::loadProvider(Provider *p) { - TQMap<KIO::Job*, Provider*>::Iterator it; + TQMap<TDEIO::Job*, Provider*>::Iterator it; for(it = d->m_variantjobs.begin(); it != d->m_variantjobs.end(); it++) { @@ -810,15 +810,15 @@ void DownloadDialog::loadProvider(Provider *p) TQString url = it.key(); TQStringList urlvariants = it.data(); - KIO::TransferJob *variantjob = KIO::get(url); + TDEIO::TransferJob *variantjob = TDEIO::get(url); d->m_newproviders[p] = p; d->m_variantjobs[variantjob] = p; d->m_variants[variantjob] = urlvariants; m_data[variantjob] = ""; - connect(variantjob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); - connect(variantjob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); + connect(variantjob, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*))); + connect(variantjob, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); } if(variants.count() == 0) return; @@ -827,7 +827,7 @@ void DownloadDialog::loadProvider(Provider *p) kdDebug() << "-- reached old downloadurl section; variants left: " << variants.count() << endl; - KIO::TransferJob *job = KIO::get(p->downloadUrl()); + TDEIO::TransferJob *job = TDEIO::get(p->downloadUrl()); d->m_newproviders[p] = p; d->m_variantjobs[job] = p; @@ -835,9 +835,9 @@ void DownloadDialog::loadProvider(Provider *p) //m_jobs[job] = p; // not used anymore due to variants m_data[job] = ""; - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); - connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), - TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::Job*))); + connect(job, TQT_SIGNAL(data(TDEIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(TDEIO::Job*, const TQByteArray&))); } void DownloadDialog::setType(TQString type) diff --git a/knewstuff/downloaddialog.h b/knewstuff/downloaddialog.h index 1f879d938..cfcd4858f 100644 --- a/knewstuff/downloaddialog.h +++ b/knewstuff/downloaddialog.h @@ -23,7 +23,7 @@ #include <kdialogbase.h> #include <knewstuff/provider.h> -namespace KIO +namespace TDEIO { class Job; } @@ -211,11 +211,11 @@ class KDE_EXPORT DownloadDialog : public KDialogBase void slotOk(); private slots: - void slotResult(KIO::Job *job); - void slotData(KIO::Job *job, const TQByteArray &a); + void slotResult(TDEIO::Job *job); + void slotData(TDEIO::Job *job, const TQByteArray &a); void slotInstall(); void slotDetails(); - void slotInstalled(KIO::Job *job); + void slotInstalled(TDEIO::Job *job); void slotTab(); void slotSelected(); void slotPage(TQWidget *w); @@ -244,8 +244,8 @@ class KDE_EXPORT DownloadDialog : public KDialogBase TQMap<TQWidget*, Provider*> m_providers; TQMap<TQWidget*, TQTextBrowser*> m_rts; TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons; - TQMap<KIO::Job*, Provider*> m_jobs; - TQMap<KIO::Job*, TQString> m_data; + TQMap<TDEIO::Job*, Provider*> m_jobs; + TQMap<TDEIO::Job*, TQString> m_data; TQString m_filter; Engine *m_engine; Private *d; diff --git a/knewstuff/engine.cpp b/knewstuff/engine.cpp index e460c2318..7152a0ccd 100644 --- a/knewstuff/engine.cpp +++ b/knewstuff/engine.cpp @@ -104,18 +104,18 @@ void Engine::getMetaInformation( Provider::List *providers ) for ( p = providers->first(); p; p = providers->next() ) { if ( p->downloadUrl().isEmpty() ) continue; - KIO::TransferJob *job = KIO::get( p->downloadUrl(), false, false ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotNewStuffJobResult( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - TQT_SLOT( slotNewStuffJobData( KIO::Job *, const TQByteArray & ) ) ); + TDEIO::TransferJob *job = TDEIO::get( p->downloadUrl(), false, false ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotNewStuffJobResult( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotNewStuffJobData( TDEIO::Job *, const TQByteArray & ) ) ); mNewStuffJobData.insert( job, "" ); mProviderJobs[ job ] = p; } } -void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ) +void Engine::slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data ) { if ( data.isEmpty() ) return; @@ -126,7 +126,7 @@ void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ) mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) ); } -void Engine::slotNewStuffJobResult( KIO::Job *job ) +void Engine::slotNewStuffJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug() << "Error downloading new stuff descriptions." << endl; @@ -199,12 +199,12 @@ void Engine::download( Entry *entry ) kdDebug() << " SOURCE: " << source.url() << endl; kdDebug() << " DESTINATION: " << destination.url() << endl; - KIO::FileCopyJob *job = KIO::file_copy( source, destination, -1, true ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *job = TDEIO::file_copy( source, destination, -1, true ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotDownloadJobResult( TDEIO::Job * ) ) ); } -void Engine::slotDownloadJobResult( KIO::Job *job ) +void Engine::slotDownloadJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug() << "Error downloading new stuff payload." << endl; @@ -321,9 +321,9 @@ void Engine::upload( Entry *entry ) KURL destination = mUploadProvider->uploadUrl(); destination.setFileName( fi.fileName() ); - KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *job = TDEIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadPayloadJobResult( TDEIO::Job * ) ) ); } else { emit uploadFinished( false ); } @@ -364,7 +364,7 @@ bool Engine::createMetaFile( Entry *entry ) return true; } -void Engine::slotUploadPayloadJobResult( KIO::Job *job ) +void Engine::slotUploadPayloadJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug() << "Error uploading new stuff payload." << endl; @@ -383,12 +383,12 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job ) KURL previewDestination = mUploadProvider->uploadUrl(); previewDestination.setFileName( fi.fileName() ); - KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination ); - connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mPreviewFile ), previewDestination ); + connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadPreviewJobResult( TDEIO::Job * ) ) ); } -void Engine::slotUploadPreviewJobResult( KIO::Job *job ) +void Engine::slotUploadPreviewJobResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug() << "Error uploading new stuff preview." << endl; @@ -402,12 +402,12 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job ) KURL metaDestination = mUploadProvider->uploadUrl(); metaDestination.setFileName( fi.fileName() ); - KIO::FileCopyJob *newJob = KIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination ); - connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) ); + TDEIO::FileCopyJob *newJob = TDEIO::file_copy( KURL::fromPathOrURL( mUploadMetaFile ), metaDestination ); + connect( newJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotUploadMetaJobResult( TDEIO::Job * ) ) ); } -void Engine::slotUploadMetaJobResult( KIO::Job *job ) +void Engine::slotUploadMetaJobResult( TDEIO::Job *job ) { mUploadMetaFile = TQString::null; if ( job->error() ) { diff --git a/knewstuff/engine.h b/knewstuff/engine.h index f4b0b4920..374f9122d 100644 --- a/knewstuff/engine.h +++ b/knewstuff/engine.h @@ -27,7 +27,7 @@ #include "entry.h" #include "provider.h" -namespace KIO { class Job; } +namespace TDEIO { class Job; } class KNewStuff; @@ -143,14 +143,14 @@ class KDE_EXPORT Engine : public TQObject void getMetaInformation( Provider::List *providers ); void selectUploadProvider( Provider::List *providers ); - void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ); - void slotNewStuffJobResult( KIO::Job *job ); + void slotNewStuffJobData( TDEIO::Job *job, const TQByteArray &data ); + void slotNewStuffJobResult( TDEIO::Job *job ); - void slotDownloadJobResult( KIO::Job *job ); + void slotDownloadJobResult( TDEIO::Job *job ); - void slotUploadPayloadJobResult( KIO::Job *job ); - void slotUploadPreviewJobResult (KIO::Job *job ); - void slotUploadMetaJobResult( KIO::Job *job ); + void slotUploadPayloadJobResult( TDEIO::Job *job ); + void slotUploadPreviewJobResult (TDEIO::Job *job ); + void slotUploadMetaJobResult( TDEIO::Job *job ); protected: bool createMetaFile( Entry * ); @@ -160,8 +160,8 @@ class KDE_EXPORT Engine : public TQObject ProviderLoader *mProviderLoader; - TQMap<KIO::Job *,TQString> mNewStuffJobData; - TQMap<KIO::Job *,Provider *> mProviderJobs; + TQMap<TDEIO::Job *,TQString> mNewStuffJobData; + TQMap<TDEIO::Job *,Provider *> mProviderJobs; TQPtrList<Entry> mNewStuffList; diff --git a/knewstuff/knewstuffgeneric.h b/knewstuff/knewstuffgeneric.h index 6347bf539..053f83a05 100644 --- a/knewstuff/knewstuffgeneric.h +++ b/knewstuff/knewstuffgeneric.h @@ -23,7 +23,7 @@ #include "knewstuff.h" -class KConfig; +class TDEConfig; /** * @short Basic KNewStuff class with predefined actions. @@ -80,7 +80,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff private: TQString destinationPath( KNS::Entry *entry ); - KConfig *mConfig; + TDEConfig *mConfig; }; #endif diff --git a/knewstuff/knewstuffsecure.cpp b/knewstuff/knewstuffsecure.cpp index 5010b5084..f467530c8 100644 --- a/knewstuff/knewstuffsecure.cpp +++ b/knewstuff/knewstuffsecure.cpp @@ -144,7 +144,7 @@ void KNewStuffSecure::slotValidated(int result) emit installFinished(); } else { - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); cfg->deleteGroup("KNewStuffStatus"); cfg->setGroup("KNewStuffStatus"); for (TQMap<TQString, TQString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it) @@ -159,7 +159,7 @@ void KNewStuffSecure::slotValidated(int result) void KNewStuffSecure::downloadResource() { - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); m_installedResources = cfg->entryMap("KNewStuffStatus"); engine()->ignoreInstallResult(true); KNewStuff::download(); @@ -179,7 +179,7 @@ void KNewStuffSecure::uploadResource(const TQString& fileName) m_tempDir->setAutoDelete(true); TQFileInfo f(fileName); m_signedFileName = m_tempDir->name() + "/" + f.fileName(); - KIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true); + TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(fileName), KURL::fromPathOrURL(m_signedFileName), -1, true); Security::ref()->signFile(m_signedFileName); } @@ -215,7 +215,7 @@ void KNewStuffSecure::slotFileSigned(int result) file.close(); } tar.close(); - KIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true); + TDEIO::NetAccess::file_move(KURL::fromPathOrURL(m_signedFileName + ".signed"), KURL::fromPathOrURL(m_signedFileName), -1, true); KNewStuff::upload(m_signedFileName, TQString::null); 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()); + TDEIO::NetAccess::del(KURL().fromPathOrURL(m_tempDir->name()), parentWidget()); delete m_tempDir; m_tempDir = 0L; } diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp index b9dd24ed8..a29183532 100644 --- a/knewstuff/provider.cpp +++ b/knewstuff/provider.cpp @@ -219,7 +219,7 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList ) mProviders.clear(); mJobData = ""; - KConfig *cfg = TDEGlobal::config(); + TDEConfig *cfg = TDEGlobal::config(); cfg->setGroup("KNewStuff"); TQString providersUrl = providersList; @@ -236,16 +236,16 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList ) kdDebug() << "ProviderLoader::load(): providersUrl: " << providersUrl << endl; - KIO::TransferJob *job = KIO::get( KURL( providersUrl ), false, false ); - connect( job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotJobResult( KIO::Job * ) ) ); - connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), - TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) ); + TDEIO::TransferJob *job = TDEIO::get( KURL( providersUrl ), false, false ); + connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotJobResult( TDEIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) ); // job->dumpObjectInfo(); } -void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data ) +void ProviderLoader::slotJobData( TDEIO::Job *, const TQByteArray &data ) { kdDebug() << "ProviderLoader::slotJobData()" << endl; @@ -256,7 +256,7 @@ void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data ) mJobData.append( TQString::fromUtf8( str ) ); } -void ProviderLoader::slotJobResult( KIO::Job *job ) +void ProviderLoader::slotJobResult( TDEIO::Job *job ) { if ( job->error() ) { job->showErrorDialog( TQT_TQWIDGET(parent()) ); diff --git a/knewstuff/provider.h b/knewstuff/provider.h index 829e52d71..2a0d54a12 100644 --- a/knewstuff/provider.h +++ b/knewstuff/provider.h @@ -28,7 +28,7 @@ #include <kurl.h> -namespace KIO { class Job; } +namespace TDEIO { class Job; } namespace KNS { @@ -198,8 +198,8 @@ class KDE_EXPORT ProviderLoader : public TQObject void providersLoaded( Provider::List * ); protected slots: - void slotJobData( KIO::Job *, const TQByteArray & ); - void slotJobResult( KIO::Job * ); + void slotJobData( TDEIO::Job *, const TQByteArray & ); + void slotJobResult( TDEIO::Job * ); private: TQWidget *mParentWidget; diff --git a/knewstuff/uploaddialog.cpp b/knewstuff/uploaddialog.cpp index 0a9ec85c0..f82e466ff 100644 --- a/knewstuff/uploaddialog.cpp +++ b/knewstuff/uploaddialog.cpp @@ -136,7 +136,7 @@ void UploadDialog::slotOk() entry->setSummary( mSummaryEdit->text(), mLanguageCombo->currentText() ); if ( mPayloadUrl.isValid() ) { - KConfig *conf = kapp->config(); + TDEConfig *conf = kapp->config(); conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) ); conf->writeEntry("name", mNameEdit->text()); conf->writeEntry("author", mAuthorEdit->text()); @@ -164,7 +164,7 @@ void UploadDialog::setPayloadFile( const TQString &payloadFile ) { mPayloadUrl = payloadFile; - KConfig *conf = kapp->config(); + TDEConfig *conf = kapp->config(); conf->setGroup( TQString("KNewStuffUpload:%1").arg(mPayloadUrl.fileName()) ); TQString name = conf->readEntry("name"); TQString author = conf->readEntry("author"); diff --git a/kparts/browserextension.h b/kparts/browserextension.h index bc5e9cc92..d225c8e84 100644 --- a/kparts/browserextension.h +++ b/kparts/browserextension.h @@ -129,7 +129,7 @@ struct KPARTS_EXPORT URLArgs /** * Meta-data to associate with the next KIO operation - * @see KIO::TransferJob etc. + * @see TDEIO::TransferJob etc. */ TQMap<TQString, TQString> &metaData(); @@ -569,7 +569,7 @@ signals: * Since the part emits the jobid in the started() signal, * progress information is automatically displayed. * - * However, if you don't use a KIO::Job in the part, + * However, if you don't use a TDEIO::Job in the part, * you can use loadingProgress() and speedProgress() * to display progress information. */ diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp index 8bec0e790..582460c6d 100644 --- a/kparts/browserrun.cpp +++ b/kparts/browserrun.cpp @@ -75,7 +75,7 @@ void BrowserRun::init() // is either malformed, or points to a non-existing local file... // So we need to reimplement some of the checks, to handle m_bHideErrorDialog if ( !m_strURL.isValid() ) { - redirectToError( KIO::ERR_MALFORMED_URL, m_strURL.url() ); + redirectToError( TDEIO::ERR_MALFORMED_URL, m_strURL.url() ); return; } if ( !m_bIsLocalFile && !m_bFault && m_strURL.isLocalFile() ) @@ -86,7 +86,7 @@ void BrowserRun::init() if ( stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 ) { kdDebug(1000) << "BrowserRun::init : " << m_strURL.prettyURL() << " doesn't exist." << endl; - redirectToError( KIO::ERR_DOES_NOT_EXIST, m_strURL.path() ); + redirectToError( TDEIO::ERR_DOES_NOT_EXIST, m_strURL.path() ); return; } m_mode = buff.st_mode; // while we're at it, save it for KRun::init() to use it @@ -132,38 +132,38 @@ void BrowserRun::scanFile() m_args.metaData().insert("PropagateHttpHeader", "TRUE"); } - KIO::TransferJob *job; + TDEIO::TransferJob *job; if ( m_args.doPost() && m_strURL.protocol().startsWith("http")) { - job = KIO::http_post( m_strURL, m_args.postData, false ); + job = TDEIO::http_post( m_strURL, m_args.postData, false ); job->addMetaData( "content-type", m_args.contentType() ); } else - job = KIO::get(m_strURL, m_args.reload, false); + job = TDEIO::get(m_strURL, m_args.reload, false); if ( m_bRemoveReferrer ) m_args.metaData().remove("referrer"); job->addMetaData( m_args.metaData() ); job->setWindow( m_window ); - connect( job, TQT_SIGNAL( result( KIO::Job *)), - this, TQT_SLOT( slotBrowserScanFinished(KIO::Job *))); - connect( job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &)), - this, TQT_SLOT( slotBrowserMimetype(KIO::Job *, const TQString &))); + connect( job, TQT_SIGNAL( result( TDEIO::Job *)), + this, TQT_SLOT( slotBrowserScanFinished(TDEIO::Job *))); + connect( job, TQT_SIGNAL( mimetype( TDEIO::Job *, const TQString &)), + this, TQT_SLOT( slotBrowserMimetype(TDEIO::Job *, const TQString &))); m_job = job; } -void BrowserRun::slotBrowserScanFinished(KIO::Job *job) +void BrowserRun::slotBrowserScanFinished(TDEIO::Job *job) { kdDebug(1000) << "BrowserRun::slotBrowserScanFinished" << endl; - if ( job->error() == KIO::ERR_IS_DIRECTORY ) + if ( job->error() == TDEIO::ERR_IS_DIRECTORY ) { // It is in fact a directory. This happens when HTTP redirects to FTP. // Due to the "protocol doesn't support listing" code in BrowserRun, we // assumed it was a file. kdDebug(1000) << "It is in fact a directory!" << endl; // Update our URL in case of a redirection - m_strURL = static_cast<KIO::TransferJob *>(job)->url(); + m_strURL = static_cast<TDEIO::TransferJob *>(job)->url(); m_job = 0; foundMimeType( "inode/directory" ); } @@ -176,10 +176,10 @@ void BrowserRun::slotBrowserScanFinished(KIO::Job *job) } } -void BrowserRun::slotBrowserMimetype( KIO::Job *_job, const TQString &type ) +void BrowserRun::slotBrowserMimetype( TDEIO::Job *_job, const TQString &type ) { Q_ASSERT( _job == m_job ); - KIO::TransferJob *job = static_cast<KIO::TransferJob *>(m_job); + TDEIO::TransferJob *job = static_cast<TDEIO::TransferJob *>(m_job); // Update our URL in case of a redirection //kdDebug(1000) << "old URL=" << m_strURL.url() << endl; //kdDebug(1000) << "new URL=" << job->url().url() << endl; @@ -242,10 +242,10 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& KTempFile tempFile( TQString::null, extension ); KURL destURL; destURL.setPath( tempFile.name() ); - KIO::Job *job = KIO::file_copy( m_strURL, destURL, 0600, true /*overwrite*/, false /*no resume*/, true /*progress info*/ ); + TDEIO::Job *job = TDEIO::file_copy( m_strURL, destURL, 0600, true /*overwrite*/, false /*no resume*/, true /*progress info*/ ); job->setWindow (m_window); - connect( job, TQT_SIGNAL( result( KIO::Job *)), - this, TQT_SLOT( slotCopyToTempFileResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL( result( TDEIO::Job *)), + this, TQT_SLOT( slotCopyToTempFileResult(TDEIO::Job *)) ); return Delayed; // We'll continue after the job has finished } } @@ -259,7 +259,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& return Handled; } - KIO::SimpleJob::removeOnHold(); // Kill any slave that was put on hold. + TDEIO::SimpleJob::removeOnHold(); // Kill any slave that was put on hold. return NotHandled; } @@ -377,7 +377,7 @@ void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilenam // only use the downloadmanager for non-local urls if ( !url.isLocalFile() ) { - KConfig cfg("konquerorrc", false, false); + TDEConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); TQString downloadManger = cfg.readPathEntry("DownloadManager"); if (!downloadManger.isEmpty()) @@ -405,7 +405,7 @@ void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilenam kdDebug(1000) << "Calling command " << cmd << endl; // slave is already on hold (slotBrowserMimetype()) - KIO::Scheduler::publishSlaveOnHold(); + TDEIO::Scheduler::publishSlaveOnHold(); KRun::runCommand(cmd); return; } @@ -424,7 +424,7 @@ void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilenam KURL destURL( dlg->selectedURL() ); if ( destURL.isValid() ) { - KIO::Job *job = KIO::copy( url, destURL ); + TDEIO::Job *job = TDEIO::copy( url, destURL ); job->setWindow (window); job->setAutoErrorHandlingEnabled( true ); } @@ -432,7 +432,7 @@ void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilenam delete dlg; } -void BrowserRun::slotStatResult( KIO::Job *job ) +void BrowserRun::slotStatResult( TDEIO::Job *job ) { if ( job->error() ) { kdDebug(1000) << "BrowserRun::slotStatResult : " << job->errorString() << endl; @@ -441,14 +441,14 @@ void BrowserRun::slotStatResult( KIO::Job *job ) KRun::slotStatResult( job ); } -void BrowserRun::handleError( KIO::Job * job ) +void BrowserRun::handleError( TDEIO::Job * job ) { if ( !job ) { // Shouldn't happen, see docu. kdWarning(1000) << "BrowserRun::handleError called with job=0! hideErrorDialog=" << d->m_bHideErrorDialog << endl; return; } - if (d->m_bHideErrorDialog && job->error() != KIO::ERR_NO_CONTENT) + if (d->m_bHideErrorDialog && job->error() != TDEIO::ERR_NO_CONTENT) { redirectToError( job->error(), job->errorText() ); return; @@ -483,13 +483,13 @@ void BrowserRun::redirectToError( int error, const TQString& errorText ) foundMimeType( "text/html" ); } -void BrowserRun::slotCopyToTempFileResult(KIO::Job *job) +void BrowserRun::slotCopyToTempFileResult(TDEIO::Job *job) { if ( job->error() ) { job->showErrorDialog( m_window ); } else { // Same as KRun::foundMimeType but with a different URL - (void) (KRun::runURL( static_cast<KIO::FileCopyJob *>(job)->destURL(), m_sMimeType )); + (void) (KRun::runURL( static_cast<TDEIO::FileCopyJob *>(job)->destURL(), m_sMimeType )); } m_bFault = true; // see above m_bFinished = true; diff --git a/kparts/browserrun.h b/kparts/browserrun.h index 79a7386c6..23709fd2b 100644 --- a/kparts/browserrun.h +++ b/kparts/browserrun.h @@ -47,7 +47,7 @@ namespace KParts { * @param url the URL we're probing * @param args URL args - includes data for a HTTP POST, etc. * @param part the part going to open this URL - can be 0L if not created yet - * @param window the mainwindow - passed to KIO::Job::setWindow() + * @param window the mainwindow - passed to TDEIO::Job::setWindow() * @param removeReferrer if true, the "referrer" metadata from @p args isn't passed on * @param trustedSource if false, a warning will be shown before launching an executable * Always pass false for @p trustedSource, except for local directory views. @@ -61,7 +61,7 @@ namespace KParts { * @param url the URL we're probing * @param args URL args - includes data for a HTTP POST, etc. * @param part the part going to open this URL - can be 0L if not created yet - * @param window the mainwindow - passed to KIO::Job::setWindow() + * @param window the mainwindow - passed to TDEIO::Job::setWindow() * @param removeReferrer if true, the "referrer" metadata from @p args isn't passed on * @param trustedSource if false, a warning will be shown before launching an executable. * Always pass false for @p trustedSource, except for local directory views. @@ -155,7 +155,7 @@ namespace KParts { * It is strongly recommended to reimplement this method if * you passed hideErrorDialog=true. */ - virtual void handleError( KIO::Job * job ); + virtual void handleError( TDEIO::Job * job ); /** * NotHandled means that foundMimeType should call KRun::foundMimeType, @@ -169,10 +169,10 @@ namespace KParts { NonEmbeddableResult handleNonEmbeddable( const TQString& mimeType ); protected slots: - void slotBrowserScanFinished(KIO::Job *job); - void slotBrowserMimetype(KIO::Job *job, const TQString &type); - void slotCopyToTempFileResult(KIO::Job *job); - virtual void slotStatResult( KIO::Job *job ); + void slotBrowserScanFinished(TDEIO::Job *job); + void slotBrowserMimetype(TDEIO::Job *job, const TQString &type); + void slotCopyToTempFileResult(TDEIO::Job *job); + virtual void slotStatResult( TDEIO::Job *job ); protected: KParts::URLArgs m_args; diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h index 67f98a90f..da3c5c7d5 100644 --- a/kparts/componentfactory.h +++ b/kparts/componentfactory.h @@ -307,7 +307,7 @@ namespace KParts * \endcode * * @param serviceType the type of service for which to find a plugin - * @param constraint an optional constraint to pass to the trader (see KIO::KTrader) + * @param constraint an optional constraint to pass to the trader (see TDEIO::KTrader) * @param parent the parent object for the part itself * @param name the name that will be given to the part * @param args A list of string arguments, passed to the factory and possibly diff --git a/kparts/part.cpp b/kparts/part.cpp index 68e9dbbf2..b7bdc7cfa 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -289,8 +289,8 @@ public: { } - KIO::FileCopyJob * m_job; - KIO::FileCopyJob * m_uploadJob; + TDEIO::FileCopyJob * m_job; + TDEIO::FileCopyJob * m_uploadJob; KURL m_originalURL; // for saveAs TQString m_originalFilePath; // for saveAs bool m_showProgressInfo : 1; @@ -364,10 +364,10 @@ bool ReadOnlyPart::openURL( const KURL &url ) KURL destURL; destURL.setPath( m_file ); - d->m_job = KIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo ); + d->m_job = TDEIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo ); d->m_job->setWindow( widget() ? widget()->topLevelWidget() : 0 ); emit started( d->m_job ); - connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) ); + connect( d->m_job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( TDEIO::Job * ) ) ); return true; } } @@ -397,7 +397,7 @@ bool ReadOnlyPart::closeURL() return true; } -void ReadOnlyPart::slotJobFinished( KIO::Job * job ) +void ReadOnlyPart::slotJobFinished( TDEIO::Job * job ) { kdDebug(1000) << "ReadOnlyPart::slotJobFinished" << endl; assert( job == d->m_job ); @@ -637,14 +637,14 @@ bool ReadWritePart::saveToURL() // Uh oh, some error happened. return false; } - d->m_uploadJob = KIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ ); + d->m_uploadJob = TDEIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ ); d->m_uploadJob->setWindow( widget() ? widget()->topLevelWidget() : 0 ); - connect( d->m_uploadJob, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (KIO::Job *) ) ); + connect( d->m_uploadJob, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (TDEIO::Job *) ) ); return true; } } -void ReadWritePart::slotUploadFinished( KIO::Job * ) +void ReadWritePart::slotUploadFinished( TDEIO::Job * ) { if (d->m_uploadJob->error()) { diff --git a/kparts/part.h b/kparts/part.h index 8a58063af..7b5e39b2f 100644 --- a/kparts/part.h +++ b/kparts/part.h @@ -34,7 +34,7 @@ class KActionCollection; class TQEvent; struct QUnknownInterface; -namespace KIO { +namespace TDEIO { class Job; } @@ -96,7 +96,7 @@ protected: /** * We have three different policies, whether to load new plugins or not. The - * value in the KConfig object of the TDEInstance object always overrides + * value in the TDEConfig object of the TDEInstance object always overrides * LoadPlugins and LoadPluginsIfEnabled. */ enum PluginLoadingMode { @@ -452,10 +452,10 @@ private: // Makes no sense for inherited classes to call those. But make it prot signals: /** * The part emits this when starting data. - * If using a KIO::Job, it sets the job in the signal, so that + * If using a TDEIO::Job, it sets the job in the signal, so that * progress information can be shown. Otherwise, job is 0. **/ - void started( KIO::Job * ); + void started( TDEIO::Job * ); /** * Emit this when you have completed loading data. @@ -482,7 +482,7 @@ signals: void canceled( const TQString &errMsg ); protected slots: - void slotJobFinished( KIO::Job * job ); + void slotJobFinished( TDEIO::Job * job ); protected: /** @@ -667,7 +667,7 @@ protected: * @return true on success, false on failure. * On failure the function should inform the user about the * problem with an appropriate message box. Standard error - * messages can be constructed using KIO::buildErrorString() + * messages can be constructed using TDEIO::buildErrorString() * in combination with the error codes defined in kio/global.h */ virtual bool saveFile() = 0; @@ -686,7 +686,7 @@ protected slots: /** * @internal */ - void slotUploadFinished( KIO::Job * job ); + void slotUploadFinished( TDEIO::Job * job ); private: void prepareSaving(); diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index b36d4dbc6..0dc729de1 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -226,7 +226,7 @@ void Plugin::setInstance( TDEInstance *instance ) void Plugin::loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, TDEInstance* instance, bool enableNewPluginsByDefault ) { - KConfigGroup cfgGroup( instance->config(), "KParts Plugins" ); + TDEConfigGroup cfgGroup( instance->config(), "KParts Plugins" ); TQValueList<PluginInfo> plugins = pluginInfos( instance ); TQValueList<PluginInfo>::ConstIterator pIt = plugins.begin(); TQValueList<PluginInfo>::ConstIterator pEnd = plugins.end(); diff --git a/kparts/plugin.h b/kparts/plugin.h index efebf5af4..df1200ee9 100644 --- a/kparts/plugin.h +++ b/kparts/plugin.h @@ -111,7 +111,7 @@ public: * Plugin objects children of @p parent, and insert the plugin as a child GUI client * of @p parentGUIClient. * - * This method uses the KConfig object of the given instance, to find out which + * This method uses the TDEConfig object of the given instance, to find out which * plugins are enabled and which are disabled. What happens by default (i.e. * for new plugins that are not in that config file) is controlled by * @p enableNewPluginsByDefault. It can be overridden by the plugin if it diff --git a/krandr/randr.cpp b/krandr/randr.cpp index dd54f87be..334da5a79 100644 --- a/krandr/randr.cpp +++ b/krandr/randr.cpp @@ -649,7 +649,7 @@ KDE_EXPORT bool RandRScreen::proposeSize(int newSize) return false; } -KDE_EXPORT void RandRScreen::load(KConfig& config) +KDE_EXPORT void RandRScreen::load(TDEConfig& config) { config.setGroup(TQString("Screen%1").arg(m_screen)); @@ -659,7 +659,7 @@ KDE_EXPORT void RandRScreen::load(KConfig& config) proposeRotation(rotationDegreeToIndex(config.readNumEntry("rotation", 0)) + (config.readBoolEntry("reflectX") ? ReflectX : 0) + (config.readBoolEntry("reflectY") ? ReflectY : 0)); } -KDE_EXPORT void RandRScreen::save(KConfig& config) const +KDE_EXPORT void RandRScreen::save(TDEConfig& config) const { config.setGroup(TQString("Screen%1").arg(m_screen)); config.writeEntry("width", currentPixelWidth()); @@ -782,7 +782,7 @@ KDE_EXPORT RandRScreen* RandRDisplay::currentScreen() return m_currentScreen; } -KDE_EXPORT bool RandRDisplay::loadDisplay(KConfig& config, bool loadScreens) +KDE_EXPORT bool RandRDisplay::loadDisplay(TDEConfig& config, bool loadScreens) { if (loadScreens) for (RandRScreen* s = m_screens.first(); s; s = m_screens.next()) @@ -791,19 +791,19 @@ KDE_EXPORT bool RandRDisplay::loadDisplay(KConfig& config, bool loadScreens) return applyOnStartup(config); } -KDE_EXPORT bool RandRDisplay::applyOnStartup(KConfig& config) +KDE_EXPORT bool RandRDisplay::applyOnStartup(TDEConfig& config) { config.setGroup("Display"); return config.readBoolEntry("ApplyOnStartup", false); } -KDE_EXPORT bool RandRDisplay::syncTrayApp(KConfig& config) +KDE_EXPORT bool RandRDisplay::syncTrayApp(TDEConfig& config) { config.setGroup("Display"); return config.readBoolEntry("SyncTrayApp", false); } -KDE_EXPORT void RandRDisplay::saveDisplay(KConfig& config, bool applyOnStartup, bool syncTrayApp) +KDE_EXPORT void RandRDisplay::saveDisplay(TDEConfig& config, bool applyOnStartup, bool syncTrayApp) { Q_ASSERT(!config.isReadOnly()); diff --git a/krandr/randr.h b/krandr/randr.h index b4c830f02..bec5f1b61 100644 --- a/krandr/randr.h +++ b/krandr/randr.h @@ -211,8 +211,8 @@ public: /** * Configuration functions. */ - void load(KConfig& config); - void save(KConfig& config) const; + void load(TDEConfig& config); + void save(TDEConfig& config) const; private: RandRScreenPrivate* d; @@ -271,15 +271,15 @@ public: /** * Loads saved settings. * - * @param config the KConfig object to load from + * @param config the TDEConfig object to load from * @param loadScreens whether to call RandRScreen::load() for each screen * @retuns true if the settings should be applied on KDE startup. */ - bool loadDisplay(KConfig& config, bool loadScreens = true); - void saveDisplay(KConfig& config, bool applyOnStartup, bool syncTrayApp); + bool loadDisplay(TDEConfig& config, bool loadScreens = true); + void saveDisplay(TDEConfig& config, bool applyOnStartup, bool syncTrayApp); - static bool applyOnStartup(KConfig& config); - static bool syncTrayApp(KConfig& config); + static bool applyOnStartup(TDEConfig& config); + static bool syncTrayApp(TDEConfig& config); void applyProposed(bool confirm = true); diff --git a/kresources/README.design b/kresources/README.design index b2163c8b7..f883c7d13 100644 --- a/kresources/README.design +++ b/kresources/README.design @@ -41,7 +41,7 @@ Both Exchange-based calendar resources are objects of the same type, but with different settings. These resources are persistent, and they are managed by the ResourceManager for the calendar resource family. The list of resources, and the settings for -each resource, are stored by the resource manager using KConfig, +each resource, are stored by the resource manager using TDEConfig, in $HOME/.trinity/share/config/<family>. The resource manager is a singleton object for every resource family. diff --git a/kresources/configdialog.cpp b/kresources/configdialog.cpp index bbebc47a3..0d306d29c 100644 --- a/kresources/configdialog.cpp +++ b/kresources/configdialog.cpp @@ -36,7 +36,7 @@ using namespace KRES; ConfigDialog::ConfigDialog( TQWidget *parent, const TQString& resourceFamily, - /*const TQString& type,*/ Resource* resource, /*KConfig *config, */const char *name ) + /*const TQString& type,*/ Resource* resource, /*TDEConfig *config, */const char *name ) : KDialogBase( parent, name, true, i18n( "Resource Configuration" ), Ok|Cancel, Ok, false )/*, mConfig( config )*/, mResource( resource ) { diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp index a3db58de6..ba3b89a47 100644 --- a/kresources/configpage.cpp +++ b/kresources/configpage.cpp @@ -145,7 +145,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) mLastItem = 0; - mConfig = new KConfig( "kcmkresourcesrc" ); + mConfig = new TDEConfig( "kcmkresourcesrc" ); mConfig->setGroup( "General" ); load(); @@ -223,7 +223,7 @@ void ConfigPage::loadManager( const TQString& family ) ResourcePageInfo *info = new ResourcePageInfo; info->mManager = mCurrentManager; - info->mConfig = new KConfig( KRES::ManagerImpl::defaultConfigFile( family ) ); + info->mConfig = new TDEConfig( KRES::ManagerImpl::defaultConfigFile( family ) ); info->mManager->readConfig( info->mConfig ); mInfoMap.append( KSharedPtr<ResourcePageInfo>(info) ); diff --git a/kresources/configpage.h b/kresources/configpage.h index ec1fb3799..d00372ac6 100644 --- a/kresources/configpage.h +++ b/kresources/configpage.h @@ -43,7 +43,7 @@ class KRESOURCES_EXPORT ResourcePageInfo : public KShared ResourcePageInfo(); ~ResourcePageInfo(); Manager<Resource> *mManager; - KConfig *mConfig; + TDEConfig *mConfig; }; class Resource; @@ -89,8 +89,8 @@ class KRESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<Res void saveResourceSettings(); Manager<Resource>* mCurrentManager; - KConfig* mCurrentConfig; - KConfig* mConfig; + TDEConfig* mCurrentConfig; + TDEConfig* mConfig; TQString mFamily; TQStringList mFamilyMap; TQValueList<KSharedPtr<ResourcePageInfo> > mInfoMap; diff --git a/kresources/factory.cpp b/kresources/factory.cpp index fa3ee6eaf..e76d318a7 100644 --- a/kresources/factory.cpp +++ b/kresources/factory.cpp @@ -125,7 +125,7 @@ TQString Factory::typeDescription( const TQString &type ) const return ptr->comment(); } -Resource *Factory::resource( const TQString& type, const KConfig *config ) +Resource *Factory::resource( const TQString& type, const TDEConfig *config ) { kdDebug(5650) << "Factory::resource( " << type << ", config )" << endl; diff --git a/kresources/factory.h b/kresources/factory.h index 925ff2e82..694b470a4 100644 --- a/kresources/factory.h +++ b/kresources/factory.h @@ -49,7 +49,7 @@ namespace KRES { * * // to allow a transparent configuration of resources, we have * // to use a kconfig object. - * KConfig config( "tst" ); + * TDEConfig config( "tst" ); * config.writePathEntry( "FileName", "/home/foobar/test.vcf" );// resource dependend * config.writeEntry( "FileFormat", "vcard" ); // resource dependend * @@ -87,7 +87,7 @@ class KRESOURCES_EXPORT Factory * @param config The config object where the resource get it settings from, * or 0 if a resource with default values should be created. */ - Resource *resource( const TQString& type, const KConfig *config ); + Resource *resource( const TQString& type, const TDEConfig *config ); /** * Returns a list of all available resource types. diff --git a/kresources/kcmkresources.cpp b/kresources/kcmkresources.cpp index ec6a7be48..1baf11f41 100644 --- a/kresources/kcmkresources.cpp +++ b/kresources/kcmkresources.cpp @@ -33,7 +33,7 @@ typedef KGenericFactory<KCMKResources, TQWidget> ResourcesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kresources, ResourcesFactory( "kcmkresources" ) ) KCMKResources::KCMKResources( TQWidget *parent, const char *name, const TQStringList& ) - : KCModule( ResourcesFactory::instance(), parent, name ) + : TDECModule( ResourcesFactory::instance(), parent, name ) { TQVBoxLayout *layout = new TQVBoxLayout( this ); mConfigPage = new KRES::ConfigPage( this ); diff --git a/kresources/kcmkresources.h b/kresources/kcmkresources.h index 97a3183e0..38279d29a 100644 --- a/kresources/kcmkresources.h +++ b/kresources/kcmkresources.h @@ -24,7 +24,7 @@ #include <kcmodule.h> -class KRESOURCES_EXPORT KCMKResources : public KCModule +class KRESOURCES_EXPORT KCMKResources : public TDECModule { Q_OBJECT diff --git a/kresources/manager.h b/kresources/manager.h index ab1562716..0363d959e 100644 --- a/kresources/manager.h +++ b/kresources/manager.h @@ -227,7 +227,7 @@ class Manager : private ManagerNotifier Recreate Resource objects from configuration file. If cfg is 0, read standard configuration file determined by family name. */ - void readConfig( KConfig *cfg = 0 ) + void readConfig( TDEConfig *cfg = 0 ) { mImpl->readConfig( cfg ); } @@ -236,7 +236,7 @@ class Manager : private ManagerNotifier Write configuration of Resource objects to configuration file. If cfg is 0, write to standard configuration file determined by family name. */ - void writeConfig( KConfig *cfg = 0 ) + void writeConfig( TDEConfig *cfg = 0 ) { mImpl->writeConfig( cfg ); } diff --git a/kresources/managerimpl.cpp b/kresources/managerimpl.cpp index 8fa2e03c0..1f7b08444 100644 --- a/kresources/managerimpl.cpp +++ b/kresources/managerimpl.cpp @@ -88,13 +88,13 @@ void ManagerImpl::createStandardConfig() { if ( !mStdConfig ) { TQString file = defaultConfigFile( mFamily ); - mStdConfig = new KConfig( file ); + mStdConfig = new TDEConfig( file ); } mConfig = mStdConfig; } -void ManagerImpl::readConfig( KConfig *cfg ) +void ManagerImpl::readConfig( TDEConfig *cfg ) { kdDebug(5650) << "ManagerImpl::readConfig()" << endl; @@ -123,7 +123,7 @@ void ManagerImpl::readConfig( KConfig *cfg ) mConfigRead = true; } -void ManagerImpl::writeConfig( KConfig *cfg ) +void ManagerImpl::writeConfig( TDEConfig *cfg ) { kdDebug(5650) << "ManagerImpl::writeConfig()" << endl; diff --git a/kresources/managerimpl.h b/kresources/managerimpl.h index e86ea3d9d..4fdd4d96c 100644 --- a/kresources/managerimpl.h +++ b/kresources/managerimpl.h @@ -30,7 +30,7 @@ #include "manageriface.h" #include <kresources/resource.h> -class KConfig; +class TDEConfig; namespace KRES { @@ -49,8 +49,8 @@ class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface ManagerImpl( ManagerNotifier *, const TQString &family ); ~ManagerImpl(); - void readConfig( KConfig * ); - void writeConfig( KConfig * ); + void readConfig( TDEConfig * ); + void writeConfig( TDEConfig * ); void add( Resource *resource ); void remove( Resource *resource ); @@ -90,8 +90,8 @@ class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface ManagerNotifier *mNotifier; TQString mFamily; - KConfig *mConfig; - KConfig *mStdConfig; + TDEConfig *mConfig; + TDEConfig *mStdConfig; Resource *mStandard; Factory *mFactory; Resource::List mResources; diff --git a/kresources/resource.cpp b/kresources/resource.cpp index 83d24cbf5..e652f61f5 100644 --- a/kresources/resource.cpp +++ b/kresources/resource.cpp @@ -44,7 +44,7 @@ class Resource::ResourcePrivate bool mIsOpen; }; -Resource::Resource( const KConfig* config ) +Resource::Resource( const TDEConfig* config ) : TQObject( 0, "" ), d( new ResourcePrivate ) { d->mOpenCount = 0; @@ -71,7 +71,7 @@ Resource::~Resource() d = 0; } -void Resource::writeConfig( KConfig* config ) +void Resource::writeConfig( TDEConfig* config ) { kdDebug(5650) << "Resource::writeConfig()" << endl; diff --git a/kresources/resource.h b/kresources/resource.h index f5587ed09..9fd50db69 100644 --- a/kresources/resource.h +++ b/kresources/resource.h @@ -28,7 +28,7 @@ #include <klibloader.h> -class KConfig; +class TDEConfig; namespace KRES { @@ -72,9 +72,9 @@ class ConfigWidget; class ResourceExample : public KRES::Resource { public: - ResourceExample( const KConfig * ); + ResourceExample( const TDEConfig * ); ~ResourceExample(); - void writeConfig( KConfig *config ); + void writeConfig( TDEConfig *config ); private: TQString mLocation; @@ -88,7 +88,7 @@ class ResourceExample : public KRES::Resource #include "resourceexample.h" -ResourceExample::ResourceExample( const KConfig *config ) +ResourceExample::ResourceExample( const TDEConfig *config ) : Resource( config ) { if ( config ) { @@ -100,7 +100,7 @@ ResourceExample::ResourceExample( const KConfig *config ) } } -void ResourceExample::writeConfig( KConfig *config ) +void ResourceExample::writeConfig( TDEConfig *config ) { KRES::Resource::writeConfig( config ); config->writePathEntry( "Location", mLocation ); @@ -113,7 +113,7 @@ extern "C" return new ResourceExampleConfig( parent, "Configure Example Resource" ); } - KRES::Resource *resource( const KConfig *config ) { + KRES::Resource *resource( const TDEConfig *config ) { return new ResourceExample( config ); } } @@ -266,7 +266,7 @@ class KRESOURCES_EXPORT Resource : public TQObject * @param config Configuration to read persistence information from. * If config is 0, create object using default settings. */ - Resource( const KConfig *config ); + Resource( const TDEConfig *config ); /** * Destructor. @@ -279,7 +279,7 @@ class KRESOURCES_EXPORT Resource : public TQObject * or Terrible Things(TM) will happen. * @param config Configuration to write persistence information to. */ - virtual void writeConfig( KConfig *config ); + virtual void writeConfig( TDEConfig *config ); /** * Open this resource, if it not already open. Increase the open @@ -384,7 +384,7 @@ class KRESOURCES_EXPORT Resource : public TQObject class KRESOURCES_EXPORT PluginFactoryBase : public KLibFactory { public: - virtual Resource *resource( const KConfig *config ) = 0; + virtual Resource *resource( const TDEConfig *config ) = 0; virtual ConfigWidget *configWidget( TQWidget *parent ) = 0; @@ -404,7 +404,7 @@ template<class TR,class TC> class PluginFactory : public PluginFactoryBase { public: - Resource *resource( const KConfig *config ) + Resource *resource( const TDEConfig *config ) { return new TR( config ); } diff --git a/krsync/krsync.cpp b/krsync/krsync.cpp index a9bf295a2..d184a0507 100644 --- a/krsync/krsync.cpp +++ b/krsync/krsync.cpp @@ -428,7 +428,7 @@ KDE_EXPORT bool KRsync::syncBidirectional(TQString synccommand, TQString syncfla /** writes one chunk of data to stdin of child process */ -KDE_EXPORT void KRsync::writeChild(const char *buf, KIO::fileoffset_t len) { +KDE_EXPORT void KRsync::writeChild(const char *buf, TDEIO::fileoffset_t len) { if (outBufPos >= 0 && outBuf) { #if 0 TQString debug; @@ -445,7 +445,7 @@ KDE_EXPORT void KRsync::writeChild(const char *buf, KIO::fileoffset_t len) { /** manages initial communication setup including password queries */ -KDE_EXPORT int KRsync::establishConnectionRsync(char *buffer, KIO::fileoffset_t len) { +KDE_EXPORT int KRsync::establishConnectionRsync(char *buffer, TDEIO::fileoffset_t len) { TQString buf; buf.setLatin1(buffer,len); int pos; @@ -560,7 +560,7 @@ KDE_EXPORT int KRsync::establishConnectionRsync(char *buffer, KIO::fileoffset_t /** manages initial communication setup including password queries */ -KDE_EXPORT int KRsync::establishConnectionUnison(char *buffer, KIO::fileoffset_t len, TQString localfolder, TQString remotepath) { +KDE_EXPORT int KRsync::establishConnectionUnison(char *buffer, TDEIO::fileoffset_t len, TQString localfolder, TQString remotepath) { TQString buf; buf.setLatin1(buffer,len); int pos; @@ -775,7 +775,7 @@ KDE_EXPORT void KRsync::shutdownConnection(bool forced, bool wait){ KDE_EXPORT void KRsync::saveSettings() { - KConfig cfg ("rsyncrc", false, false); + TDEConfig cfg ("rsyncrc", false, false); cfg.setGroup ("General"); cfg.writeEntry("LocalFolders", cfgfolderlist, CONFIGURATION_FILE_SEPARATOR); cfg.writeEntry("AutoSyncOnLogout", cfgautosync_onlogout_list, CONFIGURATION_FILE_SEPARATOR); @@ -787,7 +787,7 @@ KDE_EXPORT void KRsync::loadSettings() if (m_bSettingsLoaded) return; - KConfig cfg ("rsyncrc", false, false); + TDEConfig cfg ("rsyncrc", false, false); cfg.setGroup ("General"); cfgfolderlist = cfg.readListEntry("LocalFolders", CONFIGURATION_FILE_SEPARATOR); diff --git a/krsync/krsync.h b/krsync/krsync.h index 6bca00827..50ff7a7d9 100644 --- a/krsync/krsync.h +++ b/krsync/krsync.h @@ -103,17 +103,17 @@ public: int addLocalFolderByName(TQString folderurl, TQString remoteurl, TQString syncmethod, TQString excludelist, TQString sync_on_login, TQString sync_on_logout, TQString sync_timed_interval); TQString findSyncMethodByName(TQString folderurl); /** manages initial communication setup including password queries */ - int establishConnectionRsync(char *buffer, KIO::fileoffset_t len); + int establishConnectionRsync(char *buffer, TDEIO::fileoffset_t len); /** manages initial communication setup including password queries */ - int establishConnectionUnison(char *buffer, KIO::fileoffset_t len, TQString localfolder, TQString remotepath); + int establishConnectionUnison(char *buffer, TDEIO::fileoffset_t len, TQString localfolder, TQString remotepath); /** creates the unidirectional sync subprocess */ bool syncUnidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath); /** creates the bidirectional sync subprocess */ bool syncBidirectional(TQString synccommand, TQString syncflags, int parameter_order, TQString localfolder, TQString remotepath); /** writes one chunk of data to stdin of child process */ - void writeChild(const char *buf, KIO::fileoffset_t len); + void writeChild(const char *buf, TDEIO::fileoffset_t len); /** AuthInfo object used for logging in */ - KIO::AuthInfo connectionAuth; + TDEIO::AuthInfo connectionAuth; /** Clean up connection */ @@ -158,9 +158,9 @@ private: /** buffer for data to be written */ const char *outBuf; /** current write position in buffer */ - KIO::fileoffset_t outBufPos; + TDEIO::fileoffset_t outBufPos; /** length of buffer */ - KIO::fileoffset_t outBufLen; + TDEIO::fileoffset_t outBufLen; /** use su if true else use ssh */ //bool local; /** // FIXME: just a workaround for konq deficiencies */ diff --git a/kspell2/settings.cpp b/kspell2/settings.cpp index dd54cf53f..63b45e89d 100644 --- a/kspell2/settings.cpp +++ b/kspell2/settings.cpp @@ -180,7 +180,7 @@ bool Settings::ignore( const TQString& word ) void Settings::readIgnoreList() { - KConfigGroup conf( d->config, "Spelling" ); + TDEConfigGroup conf( d->config, "Spelling" ); TQString ignoreEntry = TQString( "ignore_%1" ).arg( d->defaultLanguage ); TQStringList ignores = conf.readListEntry( ignoreEntry ); setQuietIgnoreList( ignores ); @@ -189,7 +189,7 @@ void Settings::readIgnoreList() void Settings::save() { if ( d->modified ) { - KConfigGroup conf( d->config, "Spelling" ); + TDEConfigGroup conf( d->config, "Spelling" ); conf.writeEntry( "defaultClient", d->defaultClient ); conf.writeEntry( "defaultLanguage", d->defaultLanguage ); conf.writeEntry( "checkUppercase", d->checkUppercase ); @@ -203,7 +203,7 @@ void Settings::save() void Settings::loadConfig() { - KConfigGroup conf( d->config, "Spelling" ); + TDEConfigGroup conf( d->config, "Spelling" ); d->defaultClient = conf.readEntry( "defaultClient", TQString::null ); d->defaultLanguage = conf.readEntry( diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 544f692e0..7ca3ffb06 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -60,7 +60,7 @@ Bugs: Can't delete old slider image when calculating the rotated one for some reason. */ -//Shamelessly stolen from KConfigBase +//Shamelessly stolen from TDEConfigBase static TQColor readColorEntry( TQSettings* s, const char *pKey, const TQColor* pDefault ) { diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h index 1e002cd4a..e9ea55d5b 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -280,7 +280,7 @@ public: Background, RotSliderGroove, RotInactiveTab, RotActiveTab, WIDGETS}; /** - * The scaling type specified by the KConfig file. + * The scaling type specified by the TDEConfig file. * * @param widget A Widgets enum value. * @@ -288,7 +288,7 @@ public: */ ScaleHint scaleHint( WidgetType widget ) const; /** - * The gradient type specified by the KConfig file. + * The gradient type specified by the TDEConfig file. * * @param widget A Widgets enum value. * diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h index 457064a56..c978601a8 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -72,8 +72,8 @@ public: /** * Constructs a new KThemeStyle object. * - * @param configDir The directory which has the KConfig file. - * @param configFile A KConfig file to use as the theme configuration. + * @param configDir The directory which has the TDEConfig file. + * @param configFile A TDEConfig file to use as the theme configuration. * Defaults to ~/.kderc. */ KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null ); diff --git a/kutils/Mainpage.dox b/kutils/Mainpage.dox index 935908d1d..77abe5777 100644 --- a/kutils/Mainpage.dox +++ b/kutils/Mainpage.dox @@ -1,6 +1,6 @@ /** @mainpage Some random bits and pieces -Some utility classes for KSettings, KCModule and KPlugin. +Some utility classes for KSettings, TDECModule and KPlugin. @authors Matthias Kretz \<kretz@kde.org\><br> diff --git a/kutils/TODO b/kutils/TODO index 82f28e129..7d9f473ab 100644 --- a/kutils/TODO +++ b/kutils/TODO @@ -1,25 +1,25 @@ This is a list of random changes to do in KDE 4 with the various KCM* classes. -* KCModuleinfo; +* TDECModuleinfo; - Make it inherit KService; saves a lot of code, simplifies ctors/overloads in surrounding classes - Implement docPath in KService - Get rid of loadAll() and do lazy loading in each getter -* Merge KCModuleProxy and its DCOP Object class(MI) +* Merge TDECModuleProxy and its DCOP Object class(MI) -* Get rid of `QStringlist arguments` in KCModule and all the helper classes(simplify API) +* Get rid of `QStringlist arguments` in TDECModule and all the helper classes(simplify API) * Move stuff to d pointers.. Too much hackish solutions otherwise * Get rid of bool fallback argument in helper classes(never fails, simplify API) -* Re-implement the QScrollView(d->view) in KCModuleProxy; the protection against violation of HIG-clause. It needs kde-core-devel approval. +* Re-implement the QScrollView(d->view) in TDECModuleProxy; the protection against violation of HIG-clause. It needs kde-core-devel approval. -* The API in KCModule, KCModuleProxy, and the various desktop entries, concerning root loading are butt ugly. It needs cleaning and simplification. +* The API in TDECModule, TDECModuleProxy, and the various desktop entries, concerning root loading are butt ugly. It needs cleaning and simplification. -* There's big confusion regarding /when/ the changed(bool) signal should be emitted, abd by /whom/. This can't be fixed properly in 3.x since it means breaking behavior. In KDE 4 it must be made clear if KCModuleProxy should take care of emitting appropriate signals for load()/save()/defaults, or if modules manually should handle it(is there a reason?). +* There's big confusion regarding /when/ the changed(bool) signal should be emitted, abd by /whom/. This can't be fixed properly in 3.x since it means breaking behavior. In KDE 4 it must be made clear if TDECModuleProxy should take care of emitting appropriate signals for load()/save()/defaults, or if modules manually should handle it(is there a reason?). -* Root modules in KCModuleProxy doesn't support D&D, or it is perhaps implemented in QXEmbed? Anyway, this is what the XEmbed Protocol Specification says: +* Root modules in TDECModuleProxy doesn't support D&D, or it is perhaps implemented in QXEmbed? Anyway, this is what the XEmbed Protocol Specification says: Solving the drag-and-drop problem, however, is quite easy, since the XDND protocol was carefully designed in a way that makes it possible to support embedded windows. Basically, the embedder has to operate as drag-and-drop proxy for the client. Any XDND messages like XdndEnter, Xdnd,Leave, etc. simply have to be passed through. A toolkit's XDND implementation has to take this situation in consideration. diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp index 8df54f231..b91ffb641 100644 --- a/kutils/kcmodulecontainer.cpp +++ b/kutils/kcmodulecontainer.cpp @@ -40,10 +40,10 @@ #include "kcmodulecontainer.moc" /***********************************************************************/ -class KCModuleContainer::KCModuleContainerPrivate +class TDECModuleContainer::TDECModuleContainerPrivate { public: - KCModuleContainerPrivate( const TQStringList& mods ) + TDECModuleContainerPrivate( const TQStringList& mods ) : modules( mods ) , tabWidget( 0 ) , buttons( 0 ) @@ -70,22 +70,22 @@ class KCModuleContainer::KCModuleContainerPrivate /***********************************************************************/ -KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name, +TDECModuleContainer::TDECModuleContainer( TQWidget* parent, const char* name, const TQString& mods ) - : KCModule( parent, name ) + : TDECModule( parent, name ) { - d = new KCModuleContainerPrivate( TQStringList::split( ",", TQString(mods).remove( " " )) ); + d = new TDECModuleContainerPrivate( TQStringList::split( ",", TQString(mods).remove( " " )) ); init(); } -KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name, +TDECModuleContainer::TDECModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods ) - : KCModule( parent, name ), d( new KCModuleContainerPrivate( mods ) ) + : TDECModule( parent, name ), d( new TDECModuleContainerPrivate( mods ) ) { init(); } -void KCModuleContainer::init() +void TDECModuleContainer::init() { d->topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "topLayout" ); d->tabWidget = new TQTabWidget(this, "tabWidget"); @@ -104,7 +104,7 @@ void KCModuleContainer::init() } -void KCModuleContainer::finalize() +void TDECModuleContainer::finalize() { setButtons( d->buttons ); if ( d->hasRootKCM ) /* Add a root mode button */ @@ -121,7 +121,7 @@ void KCModuleContainer::finalize() } } -void KCModuleContainer::addModule( const TQString& module ) +void TDECModuleContainer::addModule( const TQString& module ) { /* In case it doesn't exist we just silently drop it. * This allows people to easily extend containers. @@ -129,15 +129,15 @@ void KCModuleContainer::addModule( const TQString& module ) */ if ( !KService::serviceByDesktopName( module ) ) { - kdDebug(713) << "KCModuleContainer: module '" << + kdDebug(713) << "TDECModuleContainer: module '" << module << "' was not found and thus not loaded" << endl; return; } - if( !KCModuleLoader::testModule( module )) + if( !TDECModuleLoader::testModule( module )) return; - KCModuleProxy* proxy = new KCModuleProxy( module, false, d->tabWidget, module.latin1()); + TDECModuleProxy* proxy = new TDECModuleProxy( module, false, d->tabWidget, module.latin1()); allModules.append( proxy ); d->tabWidget->addTab( proxy, TQIconSet(TDEGlobal::iconLoader()->loadIcon( @@ -147,7 +147,7 @@ void KCModuleContainer::addModule( const TQString& module ) d->tabWidget->setTabToolTip( proxy, proxy->moduleInfo().comment() ); - connect( proxy, TQT_SIGNAL(changed(KCModuleProxy *)), TQT_SLOT(moduleChanged(KCModuleProxy *))); + connect( proxy, TQT_SIGNAL(changed(TDECModuleProxy *)), TQT_SLOT(moduleChanged(TDECModuleProxy *))); /* Collect our buttons - we go for the common deliminator */ d->buttons = d->buttons | proxy->realModule()->buttons(); @@ -159,7 +159,7 @@ void KCModuleContainer::addModule( const TQString& module ) } -void KCModuleContainer::tabSwitched( TQWidget * module ) +void TDECModuleContainer::tabSwitched( TQWidget * module ) { if ( !d->hasRootKCM ) return; @@ -168,7 +168,7 @@ void KCModuleContainer::tabSwitched( TQWidget * module ) disconnect( d->btnRootMode, 0, 0, 0 ); /* Welcome to the real world huh baby? */ - KCModuleProxy* mod = (KCModuleProxy *) module; + TDECModuleProxy* mod = (TDECModuleProxy *) module; if ( mod->moduleInfo().needsRootPrivileges() && !mod->rootMode() ) { @@ -186,20 +186,20 @@ void KCModuleContainer::tabSwitched( TQWidget * module ) } -void KCModuleContainer::runAsRoot() +void TDECModuleContainer::runAsRoot() { if ( d->tabWidget->currentPage() ) - ( (KCModuleProxy *) d->tabWidget->currentPage() )->runAsRoot(); + ( (TDECModuleProxy *) d->tabWidget->currentPage() )->runAsRoot(); d->btnRootMode->setEnabled( false ); } -void KCModuleContainer::rootExited() +void TDECModuleContainer::rootExited() { connect( d->btnRootMode, TQT_SIGNAL( clicked() ), TQT_SLOT( runAsRoot() )); d->btnRootMode->setEnabled( true ); } -void KCModuleContainer::save() +void TDECModuleContainer::save() { ModuleList list = changedModules; ModuleList::iterator it; @@ -212,7 +212,7 @@ void KCModuleContainer::save() } -void KCModuleContainer::load() +void TDECModuleContainer::load() { ModuleList list = allModules; ModuleList::iterator it; @@ -224,7 +224,7 @@ void KCModuleContainer::load() emit changed( false ); } -void KCModuleContainer::defaults() +void TDECModuleContainer::defaults() { ModuleList list = allModules; ModuleList::iterator it; @@ -237,7 +237,7 @@ void KCModuleContainer::defaults() } -void KCModuleContainer::moduleChanged(KCModuleProxy * proxy) +void TDECModuleContainer::moduleChanged(TDECModuleProxy * proxy) { changedModules.append( proxy ); if( changedModules.isEmpty() ) @@ -246,7 +246,7 @@ void KCModuleContainer::moduleChanged(KCModuleProxy * proxy) emit changed(true); } -KCModuleContainer::~KCModuleContainer() +TDECModuleContainer::~TDECModuleContainer() { delete d; } diff --git a/kutils/kcmodulecontainer.h b/kutils/kcmodulecontainer.h index 7b8551b21..956b23efd 100644 --- a/kutils/kcmodulecontainer.h +++ b/kutils/kcmodulecontainer.h @@ -31,60 +31,60 @@ class TQTabWidget; class TQWidget; class TQVBoxLayout; -class KCModuleProxy; +class TDECModuleProxy; /** * @ingroup kcmodule - * @brief KCModuleContainer is a convenience class encapsulating several KCModules. + * @brief TDECModuleContainer is a convenience class encapsulating several TDECModules. * - * The KCModuleContainer class is a convenience class for organizing a multiple set - * of KCModule. KCModuleContainer is a sub class of KCModule and builds an interface mainly + * The TDECModuleContainer class is a convenience class for organizing a multiple set + * of TDECModule. TDECModuleContainer is a sub class of TDECModule and builds an interface mainly * consisting of a tab widget where each tab contains one of the modules specified via one of the - * constructors. KCModuleContainer can handle modules which requires root permissions. What you + * constructors. TDECModuleContainer can handle modules which requires root permissions. What you * most likely want is the KCMODULECONTAINER macro. \n * Sometimes it is of interest to detect in runtime whether a module should be loaded or not. This - * can be achieved by sub classing KCModuleContainer, doing the probing/testing checks and then manually + * can be achieved by sub classing TDECModuleContainer, doing the probing/testing checks and then manually * call addModule for each module which should be displayed. When all calls to addModule is done, call * finalize() which performs some necessary final steps. * * @author Frans Englich <frans.englich@telia.com> * @since 3.4 */ -class KUTILS_EXPORT KCModuleContainer : public KCModule +class KUTILS_EXPORT TDECModuleContainer : public TDECModule { Q_OBJECT public: /** - * Creates a KCModuleContainer with tabs, each one containing one of the + * Creates a TDECModuleContainer with tabs, each one containing one of the * specified modules in @p mods. * * @param parent the parent TQWidget. * @param name the module's name. - * @param mods The list of KCModules to be loaded. The name of each - * KCModule is its service name, that is the name of the desktop file without + * @param mods The list of TDECModules to be loaded. The name of each + * TDECModule is its service name, that is the name of the desktop file without * the ".desktop" part * */ - KCModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods ); + TDECModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods ); /** * This is a convenience function, instead of building a TQStringList you * can specify the modules in a comma separated TQString. For example; * \code - * KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", TQString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") ); + * TDECModuleContainer* cont = TDECModuleContainer( this, "kcm_misc", TQString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") ); * \endcode * The other constructor takes its modules in a QStringlist which also can be constructed from a * string and thus you will have to be explicit on the data type. * - * What you probably want is the KCMODULECONTAINER macro which builds an KCModule + * What you probably want is the KCMODULECONTAINER macro which builds an TDECModule * for you, taking the modules you want as argument. * * @param parent The parent widget * @param name The service name * @param mods The modules to load - * @return The KCModule containing the requested modules. + * @return The TDECModule containing the requested modules. */ - KCModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() ); + TDECModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() ); /** * Adds the specified module to the tab widget. Setting the tab icon, text, @@ -98,7 +98,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule /** * Default destructor. */ - virtual ~KCModuleContainer(); + virtual ~TDECModuleContainer(); /** * Reimplemented for internal purposes. @@ -122,16 +122,16 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule /** * Sets this KCM's buttons and adds a AdminMode button - * if necessary. If KCModuleContainer is subclassed finalize() + * if necessary. If TDECModuleContainer is subclassed finalize() * should be called in the constructor after all calls to addModule * have been done. Call it once. */ void finalize(); - typedef TQValueList<KCModuleProxy*> ModuleList; + typedef TQValueList<TDECModuleProxy*> ModuleList; /** - * A list containing KCModuleProxy objects which + * A list containing TDECModuleProxy objects which * have changed and must be saved. */ ModuleList changedModules; @@ -148,7 +148,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule */ void tabSwitched( TQWidget * module ); - void moduleChanged(KCModuleProxy *proxy); + void moduleChanged(TDECModuleProxy *proxy); /** * Called when the user clicks our custom root button. @@ -164,19 +164,19 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule void init(); - class KCModuleContainerPrivate; - KCModuleContainerPrivate *d; + class TDECModuleContainerPrivate; + TDECModuleContainerPrivate *d; }; /** * @ingroup kcmodule - * This macro creates an factory declaration which when run creates an KCModule with specified + * This macro creates an factory declaration which when run creates an TDECModule with specified * modules. For example: * \code * KCMODULECONTAINER( "kcm_fonts, kcm_keyboard,kcm_fonts", misc_modules) * \endcode - * would create a KCModule with three tabs, each containing one of the specified KCMs. Each + * would create a TDECModule with three tabs, each containing one of the specified KCMs. Each * use of the macro must be accompanied by a desktop file where the factory name equals * the second argument in the macro(in this example, misc_modules). \n * The module container takes care of testing the contained modules when being shown, as well @@ -188,16 +188,16 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule #define KCMODULECONTAINER( modules, factoryName ) \ extern "C" \ { \ - KCModule *create_## factoryName(TQWidget *parent, const char *name) \ + TDECModule *create_## factoryName(TQWidget *parent, const char *name) \ { \ - return new KCModuleContainer( parent, name, TQString( modules ) ); \ + return new TDECModuleContainer( parent, name, TQString( modules ) ); \ } \ \ bool test_## factoryName() \ { \ TQStringList modList = TQStringList::split( ",", TQString(modules).remove( " " )); \ for ( TQStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \ - if ( KCModuleLoader::testModule( *it ) ) \ + if ( TDECModuleLoader::testModule( *it ) ) \ return true; \ return false; \ } \ diff --git a/kutils/kcmoduleinfo.cpp b/kutils/kcmoduleinfo.cpp index c34069c09..c1892df36 100644 --- a/kutils/kcmoduleinfo.cpp +++ b/kutils/kcmoduleinfo.cpp @@ -31,13 +31,13 @@ #include "kcmoduleinfo.h" -class KCModuleInfo::KCModuleInfoPrivate +class TDECModuleInfo::TDECModuleInfoPrivate { public: - KCModuleInfoPrivate() : + TDECModuleInfoPrivate() : testModule( false ) {} - ~KCModuleInfoPrivate() + ~TDECModuleInfoPrivate() { } TQString factoryName; @@ -45,34 +45,34 @@ class KCModuleInfo::KCModuleInfoPrivate }; -KCModuleInfo::KCModuleInfo() +TDECModuleInfo::TDECModuleInfo() { _allLoaded = false; - d = new KCModuleInfoPrivate; + d = new TDECModuleInfoPrivate; } -KCModuleInfo::KCModuleInfo(const TQString& desktopFile) +TDECModuleInfo::TDECModuleInfo(const TQString& desktopFile) { KService::Ptr service = KService::serviceByStorageId(desktopFile); if(!service) setName(desktopFile); init(service); } -KCModuleInfo::KCModuleInfo( KService::Ptr moduleInfo ) +TDECModuleInfo::TDECModuleInfo( KService::Ptr moduleInfo ) { init(moduleInfo); } -KCModuleInfo::KCModuleInfo( const KCModuleInfo &rhs ) +TDECModuleInfo::TDECModuleInfo( const TDECModuleInfo &rhs ) { - d = new KCModuleInfoPrivate; + d = new TDECModuleInfoPrivate; ( *this ) = rhs; } // this re-implementation exists to ensure that other code always calls // our re-implementation, so in case we add data to the d pointer in the future // we can be sure that we get called when we are copied. -KCModuleInfo &KCModuleInfo::operator=( const KCModuleInfo &rhs ) +TDECModuleInfo &TDECModuleInfo::operator=( const TDECModuleInfo &rhs ) { _keywords = rhs._keywords; _name = rhs._name; @@ -92,7 +92,7 @@ KCModuleInfo &KCModuleInfo::operator=( const KCModuleInfo &rhs ) return *this; } -TQString KCModuleInfo::factoryName() const +TQString TDECModuleInfo::factoryName() const { if( d->factoryName.isEmpty() ) { @@ -104,25 +104,25 @@ TQString KCModuleInfo::factoryName() const return d->factoryName; } -bool KCModuleInfo::operator==( const KCModuleInfo & rhs ) const +bool TDECModuleInfo::operator==( const TDECModuleInfo & rhs ) const { return ( ( _name == rhs._name ) && ( _lib == rhs._lib ) && ( _fileName == rhs._fileName ) ); } -bool KCModuleInfo::operator!=( const KCModuleInfo & rhs ) const +bool TDECModuleInfo::operator!=( const TDECModuleInfo & rhs ) const { return ! operator==( rhs ); } -KCModuleInfo::~KCModuleInfo() +TDECModuleInfo::~TDECModuleInfo() { delete d; } -void KCModuleInfo::init(KService::Ptr s) +void TDECModuleInfo::init(KService::Ptr s) { _allLoaded = false; - d = new KCModuleInfoPrivate; + d = new TDECModuleInfoPrivate; if ( s ) _service = s; @@ -147,7 +147,7 @@ void KCModuleInfo::init(KService::Ptr s) } void -KCModuleInfo::loadAll() +TDECModuleInfo::loadAll() { if( !_service ) /* We have a bogus service. All get functions will return empty/zero values */ return; @@ -180,19 +180,19 @@ KCModuleInfo::loadAll() } TQString -KCModuleInfo::docPath() const +TDECModuleInfo::docPath() const { if (!_allLoaded) - const_cast<KCModuleInfo*>(this)->loadAll(); + const_cast<TDECModuleInfo*>(this)->loadAll(); return _doc; } TQString -KCModuleInfo::handle() const +TDECModuleInfo::handle() const { if (!_allLoaded) - const_cast<KCModuleInfo*>(this)->loadAll(); + const_cast<TDECModuleInfo*>(this)->loadAll(); if (_handle.isEmpty()) return _lib; @@ -201,38 +201,38 @@ KCModuleInfo::handle() const } int -KCModuleInfo::weight() const +TDECModuleInfo::weight() const { if (!_allLoaded) - const_cast<KCModuleInfo*>(this)->loadAll(); + const_cast<TDECModuleInfo*>(this)->loadAll(); return _weight; } bool -KCModuleInfo::needsRootPrivileges() const +TDECModuleInfo::needsRootPrivileges() const { if (!_allLoaded) - const_cast<KCModuleInfo*>(this)->loadAll(); + const_cast<TDECModuleInfo*>(this)->loadAll(); return _needsRootPrivileges; } bool -KCModuleInfo::isHiddenByDefault() const +TDECModuleInfo::isHiddenByDefault() const { if (!_allLoaded) - const_cast<KCModuleInfo*>(this)->loadAll(); + const_cast<TDECModuleInfo*>(this)->loadAll(); return _isHiddenByDefault; } -bool KCModuleInfo::needsTest() const +bool TDECModuleInfo::needsTest() const { return d->testModule; } -void KCModuleInfo::setNeedsTest( bool val ) +void TDECModuleInfo::setNeedsTest( bool val ) { d->testModule = val; } diff --git a/kutils/kcmoduleinfo.h b/kutils/kcmoduleinfo.h index b2e79ee46..a17f6af7a 100644 --- a/kutils/kcmoduleinfo.h +++ b/kutils/kcmoduleinfo.h @@ -32,12 +32,12 @@ class TQStringList; /** * @ingroup kcmodule - * A class that provides information about a KCModule + * A class that provides information about a TDECModule * - * KCModuleInfo provides various technical information, such as icon, library - * etc. about a KCModule.n + * TDECModuleInfo provides various technical information, such as icon, library + * etc. about a TDECModule.n * @note Any values set with the set* functions is not - * written back with KCModuleInfo it only reads value from the desktop file. + * written back with TDECModuleInfo it only reads value from the desktop file. * * @internal * @author Matthias Hoelzer-Kluepfel <mhk@kde.org> @@ -46,19 +46,19 @@ class TQStringList; * @since 3.2 * */ -class KUTILS_EXPORT KCModuleInfo +class KUTILS_EXPORT TDECModuleInfo { public: /** - * Constructs a KCModuleInfo. - * @note a KCModuleInfo object will have to be manually deleted, it is not + * Constructs a TDECModuleInfo. + * @note a TDECModuleInfo object will have to be manually deleted, it is not * done automatically for you. * @param desktopFile the desktop file representing the module, or * the name of the module. */ - KCModuleInfo(const TQString& desktopFile); + TDECModuleInfo(const TQString& desktopFile); /** * Same as above but takes a KService::Ptr as argument. @@ -67,27 +67,27 @@ public: * * @param moduleInfo specifies the module */ - KCModuleInfo( KService::Ptr moduleInfo ); + TDECModuleInfo( KService::Ptr moduleInfo ); /** - * Same as above but takes a KCModuleInfo as argument. + * Same as above but takes a TDECModuleInfo as argument. * * @param rhs specifies the module */ - KCModuleInfo( const KCModuleInfo &rhs ); + TDECModuleInfo( const TDECModuleInfo &rhs ); /** - * Same as above but creates an empty KCModuleInfo. + * Same as above but creates an empty TDECModuleInfo. * You should not normally call this. * @since 3.4 */ - KCModuleInfo(); + TDECModuleInfo(); /** * Assignment operator */ - KCModuleInfo &operator=( const KCModuleInfo &rhs ); + TDECModuleInfo &operator=( const TDECModuleInfo &rhs ); /** * Equal operator @@ -95,17 +95,17 @@ public: * @return true if @p rhs equals itself */ - bool operator==( const KCModuleInfo &rhs ) const; + bool operator==( const TDECModuleInfo &rhs ) const; /** * @return true if @p rhs is not equal itself */ - bool operator!=( const KCModuleInfo &rhs ) const; + bool operator!=( const TDECModuleInfo &rhs ) const; /** * Default destructor. */ - ~KCModuleInfo(); + ~TDECModuleInfo(); /** * @return the filename of the .desktop file that describes the KCM @@ -262,7 +262,7 @@ protected: void setDocPath(const TQString &p) { _doc = p; } /** - * Reads the service entries specific for KCModule from the desktop file. + * Reads the service entries specific for TDECModule from the desktop file. * The usual desktop entries are read in init. */ void loadAll(); @@ -276,7 +276,7 @@ private: private: - // KDE4 These needs to be moved to KCModuleInfoPrivate + // KDE4 These needs to be moved to TDECModuleInfoPrivate TQStringList _keywords; TQString _name, _icon, _lib, _handle, _fileName, _doc, _comment; bool _needsRootPrivileges : 1; @@ -286,8 +286,8 @@ private: KService::Ptr _service; - class KCModuleInfoPrivate; - KCModuleInfoPrivate *d; + class TDECModuleInfoPrivate; + TDECModuleInfoPrivate *d; }; diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp index 2238616c2..da31a72c2 100644 --- a/kutils/kcmoduleloader.cpp +++ b/kutils/kcmoduleloader.cpp @@ -39,11 +39,11 @@ * When something goes wrong in loading the module, this one * jumps in as a "dummy" module. */ -class KCMError : public KCModule +class KCMError : public TDECModule { public: KCMError( const TQString& msg, const TQString& details, TQWidget* parent ) - : KCModule( parent, "KCMError" ) + : TDECModule( parent, "KCMError" ) { TQVBoxLayout* topLayout = new TQVBoxLayout( this ); topLayout->addWidget( new TQLabel( msg, this ) ); @@ -55,7 +55,7 @@ class KCMError : public KCModule -KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname, +TDECModule* TDECModuleLoader::load(const TDECModuleInfo &mod, const TQString &libname, KLibLoader *loader, ErrorReporting report, TQWidget * parent, const char * name, const TQStringList & args ) { @@ -72,7 +72,7 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname, KLibFactory *factory = lib->factory(); if ( factory ) { - KCModule *module = KParts::ComponentFactory::createInstanceFromFactory<KCModule>( factory, TQT_TQOBJECT(parent), name ? name : mod.handle().latin1(), args ); + TDECModule *module = KParts::ComponentFactory::createInstanceFromFactory<TDECModule>( factory, TQT_TQOBJECT(parent), name ? name : mod.handle().latin1(), args ); if (module) return module; } @@ -87,8 +87,8 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname, if (create) { // create the module - KCModule* (*func)(TQWidget *, const char *); - func = (KCModule* (*)(TQWidget *, const char *)) create; + TDECModule* (*func)(TQWidget *, const char *); + func = (TDECModule* (*)(TQWidget *, const char *)) create; return func( parent, name ? name : mod.handle().latin1() ); } else @@ -113,12 +113,12 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname, return 0; } -KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args ) +TDECModule* TDECModuleLoader::loadModule(const TDECModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args ) { return loadModule( mod, None, withfallback, parent, name, args ); } -KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting report, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args ) +TDECModule* TDECModuleLoader::loadModule(const TDECModuleInfo &mod, ErrorReporting report, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args ) { /* * Simple libraries as modules are the easiest case: @@ -153,7 +153,7 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep KLibLoader *loader = KLibLoader::self(); - KCModule *module = load(mod, "kcm_%1", loader, report, parent, name, args ); + TDECModule *module = load(mod, "kcm_%1", loader, report, parent, name, args ); /* * Only try to load libkcm_* if it exists, otherwise KLibLoader::lastErrorMessage would say * "libkcm_foo not found" instead of the real problem with loading kcm_foo. @@ -189,19 +189,19 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep return 0; } -KCModule* KCModuleLoader::loadModule(const TQString &module, TQWidget *parent, +TDECModule* TDECModuleLoader::loadModule(const TQString &module, TQWidget *parent, const char *name, const TQStringList & args) { - return loadModule(KCModuleInfo(module), None, false, parent, name, args); + return loadModule(TDECModuleInfo(module), None, false, parent, name, args); } -KCModule* KCModuleLoader::loadModule(const TQString &module, ErrorReporting +TDECModule* TDECModuleLoader::loadModule(const TQString &module, ErrorReporting report, TQWidget *parent, const char *name, const TQStringList & args) { - return loadModule(KCModuleInfo(module), report, false, parent, name, args); + return loadModule(TDECModuleInfo(module), report, false, parent, name, args); } -void KCModuleLoader::unloadModule(const KCModuleInfo &mod) +void TDECModuleLoader::unloadModule(const TDECModuleInfo &mod) { // get the library loader instance KLibLoader *loader = KLibLoader::self(); @@ -214,7 +214,7 @@ void KCModuleLoader::unloadModule(const KCModuleInfo &mod) loader->unloadLibrary(TQFile::encodeName(libname.arg(mod.library()))); } -void KCModuleLoader::showLastLoaderError(TQWidget *parent) +void TDECModuleLoader::showLastLoaderError(TQWidget *parent) { KMessageBox::detailedError(parent, i18n("There was an error loading the module."),i18n("<qt><p>The diagnostics is:<br>%1" @@ -227,12 +227,12 @@ void KCModuleLoader::showLastLoaderError(TQWidget *parent) } -bool KCModuleLoader::testModule( const TQString& module ) +bool TDECModuleLoader::testModule( const TQString& module ) { - return testModule( KCModuleInfo( module ) ); + return testModule( TDECModuleInfo( module ) ); } -bool KCModuleLoader::testModule( const KCModuleInfo& module ) +bool TDECModuleLoader::testModule( const TDECModuleInfo& module ) { if (!module.service()) { @@ -250,7 +250,7 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module ) /** * If something fails we return true - we can't risk functionality becoming * unavailable because of a buggy test. Furthermore, the error needs to - * show so it is discovered. KCModuleProxy will detect the error and load + * show so it is discovered. TDECModuleProxy will detect the error and load * a corresponding KCMError. * */ KLibLoader* loader = KLibLoader::self(); @@ -281,7 +281,7 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module ) } } -KCModule* KCModuleLoader::reportError( ErrorReporting report, const TQString & text, +TDECModule* TDECModuleLoader::reportError( ErrorReporting report, const TQString & text, TQString details, TQWidget * parent ) { if( details.isNull() ) diff --git a/kutils/kcmoduleloader.h b/kutils/kcmoduleloader.h index 9e0871241..b4b57e21a 100644 --- a/kutils/kcmoduleloader.h +++ b/kutils/kcmoduleloader.h @@ -31,23 +31,23 @@ class KLibLoader; * @ingroup kcmodule * @brief Loads a KControl Module. * - * KCModuleLoader tries in several ways - * to locate and load a KCModule. If loading fails a + * TDECModuleLoader tries in several ways + * to locate and load a TDECModule. If loading fails a * zero pointer is returned. \n - * It is very unlikely KCModuleLoader is what you want - * and @ref KCModuleProxy suits your needs. + * It is very unlikely TDECModuleLoader is what you want + * and @ref TDECModuleProxy suits your needs. * * @author Matthias Hoelzer-Kluepfel <mhk@kde.org> * @author Frans Englich <frans.englich@telia.com> * @since 3.2 * @internal **/ -class KUTILS_EXPORT KCModuleLoader +class KUTILS_EXPORT TDECModuleLoader { public: /** - * Loads a @ref KCModule. If loading fails a zero pointer is returned. + * Loads a @ref TDECModule. If loading fails a zero pointer is returned. * @param module what module to load * @param withFallback if true and loading failed a separate window * with the module may appear and a zero pointer is a returned @@ -55,17 +55,17 @@ class KUTILS_EXPORT KCModuleLoader * @param name The widget's name * @param args A list of arguments for the module to load * - * @return a pointer to the loaded @ref KCModule + * @return a pointer to the loaded @ref TDECModule * * @deprecated use the function which explicitly states the error reporting * method */ - static KCModule *loadModule(const KCModuleInfo &module, bool withFallback=true, + static TDECModule *loadModule(const TDECModuleInfo &module, bool withFallback=true, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ) KDE_DEPRECATED; /** - * Loads a @ref KCModule. If loading fails a zero pointer is returned. + * Loads a @ref TDECModule. If loading fails a zero pointer is returned. * @param module what module to load * with the module may appear and a zero pointer is a returned * @param parent The parent widget @@ -75,7 +75,7 @@ class KUTILS_EXPORT KCModuleLoader * @deprecated use the function which explicitly states the error reporting * method */ - static KCModule *loadModule(const TQString &module, TQWidget *parent = 0, + static TDECModule *loadModule(const TQString &module, TQWidget *parent = 0, const char *name = 0, const TQStringList & args = TQStringList()) KDE_DEPRECATED; /** @@ -88,7 +88,7 @@ class KUTILS_EXPORT KCModuleLoader None = 0, /** * the error report is shown instead of the - * KCModule that should have * been loaded + * TDECModule that should have * been loaded */ Inline = 1, /** @@ -102,7 +102,7 @@ class KUTILS_EXPORT KCModuleLoader }; /** - * Loads a @ref KCModule. If loading fails a zero pointer is returned. + * Loads a @ref TDECModule. If loading fails a zero pointer is returned. * @param module what module to load * @param report see ErrorReporting * @param withFallback if true and loading failed a separate window @@ -111,15 +111,15 @@ class KUTILS_EXPORT KCModuleLoader * @param name The widget's name * @param args A list of arguments for the module to load * - * @return a pointer to the loaded @ref KCModule + * @return a pointer to the loaded @ref TDECModule * @since 3.4 */ - static KCModule *loadModule(const KCModuleInfo &module, ErrorReporting + static TDECModule *loadModule(const TDECModuleInfo &module, ErrorReporting report, bool withFallback=true, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** - * Loads a @ref KCModule. If loading fails a zero pointer is returned. + * Loads a @ref TDECModule. If loading fails a zero pointer is returned. * @param module what module to load * @param report see ErrorReporting * with the module may appear and a zero pointer is a returned @@ -127,10 +127,10 @@ class KUTILS_EXPORT KCModuleLoader * @param name The widget's name * @param args A list of arguments for the module to load * - * @return a pointer to the loaded @ref KCModule + * @return a pointer to the loaded @ref TDECModule * @since 3.4 */ - static KCModule *loadModule(const TQString &module, ErrorReporting + static TDECModule *loadModule(const TQString &module, ErrorReporting report, TQWidget *parent = 0, const char *name = 0, const TQStringList & args = TQStringList()); @@ -138,7 +138,7 @@ class KUTILS_EXPORT KCModuleLoader * Unloads the module's library * @param mod What module to unload for */ - static void unloadModule(const KCModuleInfo &mod); + static void unloadModule(const TDECModuleInfo &mod); /** * Display a message box explaining an error occured and possible @@ -151,7 +151,7 @@ class KUTILS_EXPORT KCModuleLoader /** - * Checks whether an KCModule should be shown by running its + * Checks whether an TDECModule should be shown by running its * test function. If it is unsure whether a module should be shown, it should * be made available, leaving the decision to the user. * If false is returned, the module should not be loaded in any interface. @@ -187,10 +187,10 @@ class KUTILS_EXPORT KCModuleLoader * @returns true if the module should be loaded * @since 3.4 */ - static bool testModule( const KCModuleInfo& module ); + static bool testModule( const TDECModuleInfo& module ); /** - * Returns a KCModule containing the messages @p report and @p text. + * Returns a TDECModule containing the messages @p report and @p text. * * @param report the type of error reporting, see ErrorReporting * @param text the main message @@ -200,7 +200,7 @@ class KUTILS_EXPORT KCModuleLoader * @since 3.4 * @internal */ - static KCModule* reportError( ErrorReporting report, const TQString & text, + static TDECModule* reportError( ErrorReporting report, const TQString & text, TQString details, TQWidget * parent ); private: @@ -209,7 +209,7 @@ class KUTILS_EXPORT KCModuleLoader * Internal loader called by the public loaders. * @internal */ - static KCModule* load(const KCModuleInfo &mod, const TQString &libname, + static TDECModule* load(const TDECModuleInfo &mod, const TQString &libname, KLibLoader *loader, ErrorReporting report, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp index f034c9a5f..df6b2bb98 100644 --- a/kutils/kcmoduleproxy.cpp +++ b/kutils/kcmoduleproxy.cpp @@ -55,10 +55,10 @@ #include "kcmoduleproxyIfaceImpl.h" /***************************************************************/ -class KCModuleProxy::KCModuleProxyPrivate +class TDECModuleProxy::TDECModuleProxyPrivate { public: - KCModuleProxyPrivate( const KCModuleInfo & info ) + TDECModuleProxyPrivate( const TDECModuleInfo & info ) : args( 0 ) , kcm( 0 ) //, view( 0 ) @@ -78,7 +78,7 @@ class KCModuleProxy::KCModuleProxyPrivate , isInitialized( false ) {} - ~KCModuleProxyPrivate() + ~TDECModuleProxyPrivate() { delete rootInfo; // Delete before embedWidget! delete embedWidget; // Delete before embedFrame! @@ -91,17 +91,17 @@ class KCModuleProxy::KCModuleProxyPrivate } TQStringList args; - KCModule *kcm; + TDECModule *kcm; QXEmbed *embedWidget; TDEProcess *rootProcess; TQVBox *embedFrame; - KCModuleProxyIfaceImpl *dcopObject; + TDECModuleProxyIfaceImpl *dcopObject; DCOPClient *dcopClient; TQVBoxLayout *topLayout; /* Contains TQScrollView view, and root stuff */ - KCModuleProxyRootCommunicatorImpl *rootCommunicator; + TDECModuleProxyRootCommunicatorImpl *rootCommunicator; TQLabel *rootInfo; TQCString dcopName; - KCModuleInfo modInfo; + TDECModuleInfo modInfo; bool withFallback; bool changed; bool rootMode; @@ -115,7 +115,7 @@ class KCModuleProxy::KCModuleProxyPrivate /* TODO: - - How KCModuleProxy behaves wrt memory leaks and behavior, when exiting + - How TDECModuleProxy behaves wrt memory leaks and behavior, when exiting from root mode is not tested, because no code make use of it. It needs work, if it should be used. @@ -137,7 +137,7 @@ class KCModuleProxy::KCModuleProxyPrivate */ /***************************************************************/ -KCModule * KCModuleProxy::realModule() const +TDECModule * TDECModuleProxy::realModule() const { /* @@ -157,11 +157,11 @@ KCModule * KCModuleProxy::realModule() const TQApplication::setOverrideCursor( Qt::WaitCursor ); - KCModuleProxy * that = const_cast<KCModuleProxy*>( this ); + TDECModuleProxy * that = const_cast<TDECModuleProxy*>( this ); if( !d->isInitialized ) { - d->dcopName = TQString(moduleInfo().handle().prepend("KCModuleProxy-")).utf8(); + d->dcopName = TQString(moduleInfo().handle().prepend("TDECModuleProxy-")).utf8(); d->topLayout = new TQVBoxLayout( that, 0, 0, "topLayout" ); d->isInitialized = true; @@ -180,9 +180,9 @@ KCModule * KCModuleProxy::realModule() const * or, it was an random application which had picked that name */ kdDebug(711) << "Module not already loaded, loading module" << endl; - d->dcopObject = new KCModuleProxyIfaceImpl( d->dcopName, that ); + d->dcopObject = new TDECModuleProxyIfaceImpl( d->dcopName, that ); - d->kcm = KCModuleLoader::loadModule( moduleInfo(), KCModuleLoader::Inline, d->withFallback, + d->kcm = TDECModuleLoader::loadModule( moduleInfo(), TDECModuleLoader::Inline, d->withFallback, that, name(), d->args ); connect( d->kcm, TQT_SIGNAL( changed( bool ) ), @@ -248,7 +248,7 @@ KCModule * KCModuleProxy::realModule() const { stream >> result; - d->kcm = KCModuleLoader::reportError( KCModuleLoader::Inline, + d->kcm = TDECModuleLoader::reportError( TDECModuleLoader::Inline, i18n( "Argument is application name", "This configuration section is " "already opened in %1" ).arg( result ), " ", that ); @@ -256,7 +256,7 @@ KCModule * KCModuleProxy::realModule() const } else { - kdDebug(711) << "Calling KCModuleProxy's DCOP interface for fetching the name failed." << endl; + kdDebug(711) << "Calling TDECModuleProxy's DCOP interface for fetching the name failed." << endl; d->bogusOccupier = true; TQApplication::restoreOverrideCursor(); return realModule(); @@ -268,7 +268,7 @@ KCModule * KCModuleProxy::realModule() const return d->kcm; } -void KCModuleProxy::applicationRemoved( const TQCString& app ) +void TDECModuleProxy::applicationRemoved( const TQCString& app ) { if( app == d->dcopName ) { @@ -282,7 +282,7 @@ void KCModuleProxy::applicationRemoved( const TQCString& app ) } } -void KCModuleProxy::showEvent( TQShowEvent * ev ) +void TDECModuleProxy::showEvent( TQShowEvent * ev ) { kdDebug(711) << k_funcinfo << endl; @@ -296,7 +296,7 @@ void KCModuleProxy::showEvent( TQShowEvent * ev ) } -void KCModuleProxy::runAsRoot() +void TDECModuleProxy::runAsRoot() { if ( !moduleInfo().needsRootPrivileges() ) return; @@ -378,7 +378,7 @@ void KCModuleProxy::runAsRoot() { d->rootMode = true; kapp->dcopClient(); - d->rootCommunicator = new KCModuleProxyRootCommunicatorImpl( d->dcopName + "-RootCommunicator", this ); + d->rootCommunicator = new TDECModuleProxyRootCommunicatorImpl( d->dcopName + "-RootCommunicator", this ); } delete lblBusy; @@ -395,7 +395,7 @@ void KCModuleProxy::runAsRoot() TQApplication::restoreOverrideCursor(); } -void KCModuleProxy::rootExited() +void TDECModuleProxy::rootExited() { kdDebug(711) << k_funcinfo << endl; @@ -426,15 +426,15 @@ void KCModuleProxy::rootExited() emit childClosed(); } -KCModuleProxy::~KCModuleProxy() +TDECModuleProxy::~TDECModuleProxy() { deleteClient(); - KCModuleLoader::unloadModule(moduleInfo()); + TDECModuleLoader::unloadModule(moduleInfo()); delete d; } -void KCModuleProxy::deleteClient() +void TDECModuleProxy::deleteClient() { if( d->embedWidget ) XKillClient(tqt_xdisplay(), d->embedWidget->embeddedWinId()); @@ -456,7 +456,7 @@ void KCModuleProxy::deleteClient() } -void KCModuleProxy::moduleChanged( bool c ) +void TDECModuleProxy::moduleChanged( bool c ) { if( d->changed == c ) return; @@ -466,21 +466,21 @@ void KCModuleProxy::moduleChanged( bool c ) emit changed( this ); } -void KCModuleProxy::moduleDestroyed() +void TDECModuleProxy::moduleDestroyed() { d->kcm = 0; } -KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback, +TDECModuleProxy::TDECModuleProxy( const KService::Ptr & service, bool withFallback, TQWidget * parent, const char * name, const TQStringList & args) : TQWidget( parent, name ) { - init( KCModuleInfo( service )); + init( TDECModuleInfo( service )); d->args = args; d->withFallback = withFallback; } -KCModuleProxy::KCModuleProxy( const KCModuleInfo & info, bool withFallback, +TDECModuleProxy::TDECModuleProxy( const TDECModuleInfo & info, bool withFallback, TQWidget * parent, const char * name, const TQStringList & args ) : TQWidget( parent, name ) { @@ -489,21 +489,21 @@ KCModuleProxy::KCModuleProxy( const KCModuleInfo & info, bool withFallback, d->withFallback = withFallback; } -KCModuleProxy::KCModuleProxy( const TQString& serviceName, bool withFallback, +TDECModuleProxy::TDECModuleProxy( const TQString& serviceName, bool withFallback, TQWidget * parent, const char * name, const TQStringList & args) : TQWidget( parent, name ) { - init( KCModuleInfo( serviceName )); + init( TDECModuleInfo( serviceName )); d->args = args; d->withFallback = withFallback; } -void KCModuleProxy::init( const KCModuleInfo& info ) +void TDECModuleProxy::init( const TDECModuleInfo& info ) { kdDebug(711) << k_funcinfo << endl; - d = new KCModuleProxyPrivate( info ); + d = new TDECModuleProxyPrivate( info ); /* This is all we do for now; all the heavy work is * done in realModule(). It's called when the module @@ -513,7 +513,7 @@ void KCModuleProxy::init( const KCModuleInfo& info ) } -void KCModuleProxy::load() +void TDECModuleProxy::load() { if( d->rootMode ) @@ -525,7 +525,7 @@ void KCModuleProxy::load() } } -void KCModuleProxy::save() +void TDECModuleProxy::save() { if( d->rootMode ) callRootModule( "save()" ); @@ -536,7 +536,7 @@ void KCModuleProxy::save() } } -void KCModuleProxy::callRootModule( const TQCString& function ) +void TDECModuleProxy::callRootModule( const TQCString& function ) { TQByteArray sendData, replyData; TQCString replyType; @@ -549,7 +549,7 @@ void KCModuleProxy::callRootModule( const TQCString& function ) } -void KCModuleProxy::defaults() +void TDECModuleProxy::defaults() { if( d->rootMode ) callRootModule( "defaults()" ); @@ -557,7 +557,7 @@ void KCModuleProxy::defaults() d->kcm->defaults(); } -TQString KCModuleProxy::quickHelp() const +TQString TDECModuleProxy::quickHelp() const { if( !d->rootMode ) @@ -586,7 +586,7 @@ TQString KCModuleProxy::quickHelp() const } } -const TDEAboutData * KCModuleProxy::aboutData() const +const TDEAboutData * TDECModuleProxy::aboutData() const { if( !d->rootMode ) return realModule() ? realModule()->aboutData() : 0; @@ -598,48 +598,48 @@ const TDEAboutData * KCModuleProxy::aboutData() const } -int KCModuleProxy::buttons() const +int TDECModuleProxy::buttons() const { return realModule() ? realModule()->buttons() : - KCModule::Help | KCModule::Default | KCModule::Apply ; + TDECModule::Help | TDECModule::Default | TDECModule::Apply ; } -TQString KCModuleProxy::rootOnlyMsg() const +TQString TDECModuleProxy::rootOnlyMsg() const { return realModule() ? realModule()->rootOnlyMsg() : TQString::null; } -bool KCModuleProxy::useRootOnlyMsg() const +bool TDECModuleProxy::useRootOnlyMsg() const { return realModule() ? realModule()->useRootOnlyMsg() : true; } -TDEInstance * KCModuleProxy::instance() const +TDEInstance * TDECModuleProxy::instance() const { return realModule() ? realModule()->instance() : 0; } -bool KCModuleProxy::changed() const +bool TDECModuleProxy::changed() const { return d->changed; } -const KCModuleInfo& KCModuleProxy::moduleInfo() const +const TDECModuleInfo& TDECModuleProxy::moduleInfo() const { return d->modInfo; } -bool KCModuleProxy::rootMode() const +bool TDECModuleProxy::rootMode() const { return d->rootMode; } -TQCString KCModuleProxy::dcopName() const +TQCString TDECModuleProxy::dcopName() const { return d->dcopName; } -void KCModuleProxy::emitQuickHelpChanged() +void TDECModuleProxy::emitQuickHelpChanged() { emit quickHelpChanged(); } diff --git a/kutils/kcmoduleproxy.h b/kutils/kcmoduleproxy.h index baf532e34..2ffeabf56 100644 --- a/kutils/kcmoduleproxy.h +++ b/kutils/kcmoduleproxy.h @@ -28,56 +28,56 @@ #include <tdelibs_export.h> class TDEAboutData; -class KCModule; -class KCModuleInfo; +class TDECModule; +class TDECModuleInfo; class TDEInstance; class TDEProcess; /** * @ingroup kcmodule * - * @brief Encapsulates a KCModule for embedding. + * @brief Encapsulates a TDECModule for embedding. * - * KCModuleProxy is a wrapper for KCModule intended for cases where + * TDECModuleProxy is a wrapper for TDECModule intended for cases where * modules are to be displayed. It ensures layout is consistent, handles * root/administrator modules and in general takes care of the details - * needed for making a module available in an interface. A KCModuleProxy + * needed for making a module available in an interface. A TDECModuleProxy * can be treated as a TQWidget, without worrying about the details specific - * for modules such as library loading. KCModuleProxy is not a sub class of KCModule - * but its API closely resembles KCModule's.\n + * for modules such as library loading. TDECModuleProxy is not a sub class of TDECModule + * but its API closely resembles TDECModule's.\n * Usually, an instance is created by passing one of the constructors a KService::Ptr, - * KCModuleInfo or simply the name of the module and then added to the layout as any + * TDECModuleInfo or simply the name of the module and then added to the layout as any * other widget. \n - * When the user have changed the module, changed( bool ) as well as changed ( KCModuleProxy * ) - * is emitted. KCModuleProxy does not take care of prompting for saving - if the object is deleted while + * When the user have changed the module, changed( bool ) as well as changed ( TDECModuleProxy * ) + * is emitted. TDECModuleProxy does not take care of prompting for saving - if the object is deleted while * changes is not saved the changes will be lost. changed() returns true if changes are unsaved. \n * \n - * KCModuleProxy does not take care of authorization of KCModules. \n - * KCModuleProxy do lazy loading, meaning the library will not be loaded or + * TDECModuleProxy does not take care of authorization of TDECModules. \n + * TDECModuleProxy do lazy loading, meaning the library will not be loaded or * any other initialization done before its show() function is called. This means * modules will only be loaded when they are actually needed as well as it is possible to - * load many KCModuleProxy without any speed penalty. + * load many TDECModuleProxy without any speed penalty. * - * KCModuleProxy should be used in all cases where modules are embedded in order to + * TDECModuleProxy should be used in all cases where modules are embedded in order to * promote code efficiency and usability consistency. * * @author Frans Englich <frans.englich@telia.com> * @author Matthias Kretz <kretz@kde.org> * */ -class KUTILS_EXPORT KCModuleProxy : public TQWidget +class KUTILS_EXPORT TDECModuleProxy : public TQWidget { Q_OBJECT - friend class KCModuleProxyRootCommunicatorImpl; + friend class TDECModuleProxyRootCommunicatorImpl; public: /** - * Constructs a KCModuleProxy from a KCModuleInfo class. + * Constructs a TDECModuleProxy from a TDECModuleInfo class. * - * @param info The KCModuleInfo to construct the module from. + * @param info The TDECModuleInfo to construct the module from. * @param withFallback If set to true and loading of the module fails, * a alternative will be tried, resulting in the module appearing in its * own window, if at all. @@ -87,12 +87,12 @@ public: * @param args This is used in the implementation and is internal. * Use the default. */ - KCModuleProxy( const KCModuleInfo & info, bool withFallback = true, + TDECModuleProxy( const TDECModuleInfo & info, bool withFallback = true, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** - * Constructs a KCModuleProxy from a module's service name, which is + * Constructs a TDECModuleProxy from a module's service name, which is * equivalent to the desktop file for the kcm without the ".desktop" part. * Otherwise equal to the one above. * @@ -106,12 +106,12 @@ public: * @param args This is used in the implementation and is internal. * Use the default. */ - KCModuleProxy( const TQString& serviceName, bool withFallback = true, + TDECModuleProxy( const TQString& serviceName, bool withFallback = true, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** - * Constructs a KCModuleProxy from KService. Otherwise equal to the one above. + * Constructs a TDECModuleProxy from KService. Otherwise equal to the one above. * * @param service The KService to construct from. * @param withFallback If set to true and loading of the module fails, @@ -123,14 +123,14 @@ public: * @param args This is used in the implementation and is internal. * Use the default. */ - KCModuleProxy( const KService::Ptr& service, bool withFallback = true, + TDECModuleProxy( const KService::Ptr& service, bool withFallback = true, TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** * Default destructor */ - ~KCModuleProxy(); + ~TDECModuleProxy(); /** * Calling it will cause the contained module to @@ -181,7 +181,7 @@ public: // this one's available via moduleInfo()-> and realModule()-> /** - * Returns the embedded KCModule's TDEInstance. + * Returns the embedded TDECModule's TDEInstance. * @return The module's TDEInstance. * @deprecated */ @@ -215,13 +215,13 @@ public: * * @return the encapsulated module. */ - KCModule* realModule() const; + TDECModule* realModule() const; /** - * @return a KCModuleInfo for the encapsulated + * @return a TDECModuleInfo for the encapsulated * module */ - const KCModuleInfo& moduleInfo() const; + const TDECModuleInfo& moduleInfo() const; /** * Returns the DCOP the module's DCOPClient @@ -250,7 +250,7 @@ public slots: /** * Calling this, results in deleting the contained * module, and unregistering from DCOP. A similar result is achieved - * by deleting the KCModuleProxy itself. + * by deleting the TDECModuleProxy itself. * * @since 3.4 */ @@ -265,11 +265,11 @@ signals: /** * This is emitted in the same situations as in the one above. Practical - * when several KCModuleProxys are loaded. + * when several TDECModuleProxys are loaded. * * @since 3.4 */ - void changed( KCModuleProxy* mod ); + void changed( TDECModuleProxy* mod ); /** * When a module running with root privileges and exits, returns to normal mode, the @@ -301,7 +301,7 @@ protected: * @internal * @since 3.4 */ - void init( const KCModuleInfo& info ); + void init( const TDECModuleInfo& info ); /** @@ -313,7 +313,7 @@ protected: private slots: /** - * Calls the function @p function of the root module's KCModuleProxy + * Calls the function @p function of the root module's TDECModuleProxy * DCOP interface. * * @param function the function signature of the function to call. @@ -350,8 +350,8 @@ private slots: private: - class KCModuleProxyPrivate; - KCModuleProxyPrivate * d; + class TDECModuleProxyPrivate; + TDECModuleProxyPrivate * d; }; #endif // KCMODULEPROXY_H diff --git a/kutils/kcmoduleproxyIface.h b/kutils/kcmoduleproxyIface.h index ff597b5c6..5bf24ac91 100644 --- a/kutils/kcmoduleproxyIface.h +++ b/kutils/kcmoduleproxyIface.h @@ -24,16 +24,16 @@ /** * @ingroup kcmodule - * @brief DCOP Interface for KCModule. + * @brief DCOP Interface for TDECModule. * - * A module (which is loaded via KCModuleProxy) does always have + * A module (which is loaded via TDECModuleProxy) does always have * this DCOP interface, whether it's in root mode or not. * * @since 3.4 * @internal * @author Frans Englich <frans.englich@telia.com> */ -class KCModuleProxyIface : virtual public DCOPObject +class TDECModuleProxyIface : virtual public DCOPObject { K_DCOP @@ -81,7 +81,7 @@ k_dcop_signals: * * @param c true if the module is modified, false if its not. * @param module a string identifying the module which was changed. This - * is typically "KCModuleProx-X" where X is the module's name. + * is typically "TDECModuleProx-X" where X is the module's name. */ virtual void changed( bool c ); @@ -93,25 +93,25 @@ k_dcop_signals: * @ingroup kcmodule * @brief DCOP interface for communicating with the real module running in root mode. * - * When a KCModuleProxy tells kcmshell to load "itself" and embed into the - * KCModuleProxy, this DCOP interface is used to communicate to the real KCModuleProxy, since - * the KCModuleProxy which told kcmshell to load itself, is nothing but a shell. + * When a TDECModuleProxy tells kcmshell to load "itself" and embed into the + * TDECModuleProxy, this DCOP interface is used to communicate to the real TDECModuleProxy, since + * the TDECModuleProxy which told kcmshell to load itself, is nothing but a shell. * * Currently is only the changed signal routed, but it's possible to proxy - * the rest of the KCModuleProxy API, if it turns out necessary. + * the rest of the TDECModuleProxy API, if it turns out necessary. * * @since 3.4 * @internal * @author Frans Englich <frans.englich@telia.com> */ -class KCModuleProxyRootDispatcher : virtual public DCOPObject +class TDECModuleProxyRootDispatcher : virtual public DCOPObject { K_DCOP k_dcop: /** - * KCModuleProxyIface::changed() gets connected to this. + * TDECModuleProxyIface::changed() gets connected to this. */ virtual void changed( bool c ) = 0; diff --git a/kutils/kcmoduleproxyIfaceImpl.cpp b/kutils/kcmoduleproxyIfaceImpl.cpp index c9de5ba7a..5e1ca4986 100644 --- a/kutils/kcmoduleproxyIfaceImpl.cpp +++ b/kutils/kcmoduleproxyIfaceImpl.cpp @@ -30,10 +30,10 @@ #include <tqmessagebox.h> -KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const TQCString& name, - KCModuleProxy* const client ) +TDECModuleProxyIfaceImpl::TDECModuleProxyIfaceImpl( const TQCString& name, + TDECModuleProxy* const client ) : DCOPObject( name ), TQObject( 0, name ), - p( const_cast<KCModuleProxy *>( client )) + p( const_cast<TDECModuleProxy *>( client )) { connect( p, TQT_SIGNAL( changed(bool)), TQT_SLOT( changedRelay(bool))); @@ -41,40 +41,40 @@ KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const TQCString& name, TQT_SLOT( quickHelpRelay())); } -void KCModuleProxyIfaceImpl::save() +void TDECModuleProxyIfaceImpl::save() { kdDebug(711) << k_funcinfo << endl; p->save(); } -void KCModuleProxyIfaceImpl::load() +void TDECModuleProxyIfaceImpl::load() { kdDebug(711) << k_funcinfo << endl; p->load(); } -void KCModuleProxyIfaceImpl::defaults() +void TDECModuleProxyIfaceImpl::defaults() { kdDebug(711) << k_funcinfo << endl; p->defaults(); } -TQString KCModuleProxyIfaceImpl::applicationName() +TQString TDECModuleProxyIfaceImpl::applicationName() { return kapp->caption(); } -TQString KCModuleProxyIfaceImpl::quickHelp() +TQString TDECModuleProxyIfaceImpl::quickHelp() { return p->quickHelp(); } -bool KCModuleProxyIfaceImpl::changed() +bool TDECModuleProxyIfaceImpl::changed() { return p->changed(); } -void KCModuleProxyIfaceImpl::changedRelay( bool c ) +void TDECModuleProxyIfaceImpl::changedRelay( bool c ) { TQByteArray data; TQDataStream stream(data, IO_WriteOnly); @@ -82,7 +82,7 @@ void KCModuleProxyIfaceImpl::changedRelay( bool c ) emitDCOPSignal( "changed(bool)", data ); } -void KCModuleProxyIfaceImpl::quickHelpRelay() +void TDECModuleProxyIfaceImpl::quickHelpRelay() { TQByteArray data; emitDCOPSignal( "quickHelpChanged()", data ); @@ -94,18 +94,18 @@ void KCModuleProxyIfaceImpl::quickHelpRelay() /***************************************************************/ -KCModuleProxyRootCommunicatorImpl::KCModuleProxyRootCommunicatorImpl - ( const TQCString& name, KCModuleProxy* const client ) +TDECModuleProxyRootCommunicatorImpl::TDECModuleProxyRootCommunicatorImpl + ( const TQCString& name, TDECModuleProxy* const client ) : DCOPObject( name ), TQObject( 0, name ), - p( const_cast<KCModuleProxy *>( client )) + p( const_cast<TDECModuleProxy *>( client )) { /* - * Connect kcmshell's KCModuleProxy's change signal + * Connect kcmshell's TDECModuleProxy's change signal * to us, such that we act as a proxy for - * KCModuleProxy's API. + * TDECModuleProxy's API. */ - /* Note, we don't use KCModuleProxy::d->dcopClient */ + /* Note, we don't use TDECModuleProxy::d->dcopClient */ kapp->dcopClient()->connectDCOPSignal( 0, p->dcopName(), "changed(bool)", objId(), "changed(bool)", false ); @@ -114,13 +114,13 @@ KCModuleProxyRootCommunicatorImpl::KCModuleProxyRootCommunicatorImpl } /* Reimplementations of DCOP members */ -void KCModuleProxyRootCommunicatorImpl::changed( bool c ) +void TDECModuleProxyRootCommunicatorImpl::changed( bool c ) { kdDebug(711) << k_funcinfo << endl; p->moduleChanged( c ); } -void KCModuleProxyRootCommunicatorImpl::quickHelpChanged() +void TDECModuleProxyRootCommunicatorImpl::quickHelpChanged() { kdDebug(711) << k_funcinfo << endl; p->emitQuickHelpChanged(); diff --git a/kutils/kcmoduleproxyIfaceImpl.h b/kutils/kcmoduleproxyIfaceImpl.h index bbfe51a28..9de3d58dd 100644 --- a/kutils/kcmoduleproxyIfaceImpl.h +++ b/kutils/kcmoduleproxyIfaceImpl.h @@ -21,14 +21,14 @@ #include "kcmoduleproxyIface.h" -class KCModuleProxy; +class TDECModuleProxy; /***************************************************************/ /** @internal @ingroup internal */ -class KCModuleProxyIfaceImpl: public TQObject, virtual public KCModuleProxyIface +class TDECModuleProxyIfaceImpl: public TQObject, virtual public TDECModuleProxyIface { - /* KDE4 Merge KCModuleProxyIfaceImpl with KCModuleProxy(MI) + /* KDE4 Merge TDECModuleProxyIfaceImpl with TDECModuleProxy(MI) * if it doesn't break what DCOPClient it binds to. * Update: This is probably not possible, since we don't want the DCOPObject when * we're running in root mode. */ @@ -38,7 +38,7 @@ class KCModuleProxyIfaceImpl: public TQObject, virtual public KCModuleProxyIface public: /* Reimplementations of DCOP members */ - KCModuleProxyIfaceImpl( const TQCString& name, KCModuleProxy* const client ); + TDECModuleProxyIfaceImpl( const TQCString& name, TDECModuleProxy* const client ); virtual void save(); @@ -59,14 +59,14 @@ public slots: void changedRelay( bool c ); /** - * Simply relays KCModuleProxy's signal with the same name. + * Simply relays TDECModuleProxy's signal with the same name. */ void quickHelpRelay(); private: - KCModuleProxy* p; + TDECModuleProxy* p; }; /***************************************************************/ @@ -76,20 +76,20 @@ private: /***************************************************************/ /** @internal @ingroup internal */ -class KCModuleProxyRootCommunicatorImpl: public TQObject, - virtual public KCModuleProxyRootDispatcher +class TDECModuleProxyRootCommunicatorImpl: public TQObject, + virtual public TDECModuleProxyRootDispatcher { Q_OBJECT public: - KCModuleProxyRootCommunicatorImpl( const TQCString& name, KCModuleProxy* const client ); + TDECModuleProxyRootCommunicatorImpl( const TQCString& name, TDECModuleProxy* const client ); /* Reimplementations of DCOP members */ virtual void changed( bool c ); virtual void quickHelpChanged(); -KCModuleProxy* p; +TDECModuleProxy* p; }; /***************************************************************/ diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp index 511af866b..5fe862177 100644 --- a/kutils/kcmultidialog.cpp +++ b/kutils/kcmultidialog.cpp @@ -51,7 +51,7 @@ class KCMultiDialog::KCMultiDialogPrivate {} bool hasRootKCM; - KCModuleProxy* currentModule; + TDECModuleProxy* currentModule; }; @@ -141,7 +141,7 @@ void KCMultiDialog::apply() ModuleList::Iterator end = m_modules.end(); for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it ) { - KCModuleProxy * m = ( *it ).kcm; + TDECModuleProxy * m = ( *it ).kcm; if( m->changed() ) { m->save(); @@ -228,10 +228,10 @@ void KCMultiDialog::addModule(const TQString& path, bool withfallback, TQStringL KService::Ptr service = KService::serviceByStorageId( complete ); - addModule( KCModuleInfo( service ), TQStringList(), withfallback, args ); + addModule( TDECModuleInfo( service ), TQStringList(), withfallback, args ); } -void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, +void KCMultiDialog::addModule(const TDECModuleInfo& moduleinfo, TQStringList parentmodulenames, bool withfallback, TQStringList args) { kdDebug(710) << "KCMultiDialog::addModule " @@ -243,7 +243,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, if ( !kapp->authorizeControlModule( moduleinfo.service()->menuId() )) return; - if( !KCModuleLoader::testModule( moduleinfo )) + if( !TDECModuleLoader::testModule( moduleinfo )) return; TQFrame* page = 0; @@ -271,17 +271,17 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, break; } if(!page) { - KCModuleLoader::unloadModule(moduleinfo); + TDECModuleLoader::unloadModule(moduleinfo); return; } - KCModuleProxy * module; + TDECModuleProxy * module; if( m_orphanModules.contains( moduleinfo.service() ) ) { - // the KCModule already exists - it was removed from the dialog in + // the TDECModule already exists - it was removed from the dialog in // removeAllModules module = m_orphanModules[ moduleinfo.service() ]; m_orphanModules.remove( moduleinfo.service() ); - kdDebug( 710 ) << "Use KCModule from the list of orphans for " << + kdDebug( 710 ) << "Use TDECModule from the list of orphans for " << moduleinfo.moduleName() << ": " << module << endl; module->reparent( page, 0, TQPoint( 0, 0 ), true ); @@ -294,7 +294,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, } else { - module = new KCModuleProxy( moduleinfo, withfallback, page, 0, args ); + module = new TDECModuleProxy( moduleinfo, withfallback, page, 0, args ); TQStringList parentComponents = moduleinfo.service()->property( "X-TDE-ParentComponents" ).toStringList(); moduleParentComponents.insert( module, @@ -327,7 +327,7 @@ void KCMultiDialog::removeAllModules() for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it ) { kdDebug( 710 ) << "remove 2" << endl; - KCModuleProxy * kcm = ( *it ).kcm; + TDECModuleProxy * kcm = ( *it ).kcm; TQObject * page = TQT_TQOBJECT(kcm->parent()); kcm->hide(); if( page ) @@ -337,7 +337,7 @@ void KCMultiDialog::removeAllModules() delete page; } m_orphanModules[ ( *it ).service ] = kcm; - kdDebug( 710 ) << "added KCModule to the list of orphans: " << + kdDebug( 710 ) << "added TDECModule to the list of orphans: " << kcm << endl; } m_modules.clear(); @@ -354,19 +354,19 @@ void KCMultiDialog::slotAboutToShow(TQWidget *page) { kdDebug(710) << k_funcinfo << endl; - TQObject * obj = page->child( 0, "KCModuleProxy" ); + TQObject * obj = page->child( 0, "TDECModuleProxy" ); if( ! obj ) return; - KCModuleProxy * module = ::tqqt_cast<KCModuleProxy*>(obj); + TDECModuleProxy * module = ::tqqt_cast<TDECModuleProxy*>(obj); if( ! module ) return; d->currentModule = module; enableButton( KDialogBase::Help, - d->currentModule->buttons() & KCModule::Help ); + d->currentModule->buttons() & TDECModule::Help ); enableButton( KDialogBase::Default, - d->currentModule->buttons() & KCModule::Default ); + d->currentModule->buttons() & TDECModule::Default ); disconnect( this, TQT_SIGNAL(user2Clicked()), 0, 0 ); diff --git a/kutils/kcmultidialog.h b/kutils/kcmultidialog.h index c26836e31..7c89621ca 100644 --- a/kutils/kcmultidialog.h +++ b/kutils/kcmultidialog.h @@ -29,8 +29,8 @@ #include <klocale.h> #include <kservice.h> -class KCModuleProxy; -class KCModuleInfo; +class TDECModuleProxy; +class TDECModuleInfo; /** * @ingroup kcmodule @@ -126,7 +126,7 @@ public: /** * Add a module. * - * @param moduleinfo Pass a KCModuleInfo object which will be + * @param moduleinfo Pass a TDECModuleInfo object which will be * used for creating the module. It will be added * to the list of modules the dialog will show. * @@ -140,7 +140,7 @@ public: * * @param args List of arguments to pass to the module. **/ - void addModule(const KCModuleInfo& moduleinfo, TQStringList + void addModule(const TDECModuleInfo& moduleinfo, TQStringList parentmodulenames = TQStringList(), bool withfallback=false, TQStringList args = TQStringList()); /** @@ -156,7 +156,7 @@ public: signals: /** - * Emitted after all KCModules have been told to save their configuration. + * Emitted after all TDECModules have been told to save their configuration. * * The applyClicked and okClicked signals are emitted before the * configuration is saved. @@ -164,7 +164,7 @@ signals: void configCommitted(); /** - * Emitted after the KCModules have been told to save their configuration. + * Emitted after the TDECModules have been told to save their configuration. * It is emitted once for every instance the KCMs that were changed belong * to. * @@ -265,14 +265,14 @@ private: struct CreatedModule { - KCModuleProxy * kcm; + TDECModuleProxy * kcm; KService::Ptr service; /* KDE 4 Move to Private class */ }; typedef TQValueList<CreatedModule> ModuleList; ModuleList m_modules; - typedef TQMap<KService::Ptr, KCModuleProxy*> OrphanMap; + typedef TQMap<KService::Ptr, TDECModuleProxy*> OrphanMap; OrphanMap m_orphanModules; TQPtrDict<TQStringList> moduleParentComponents; diff --git a/kutils/kplugininfo.cpp b/kutils/kplugininfo.cpp index acdf57dc2..aec0a095c 100644 --- a/kutils/kplugininfo.cpp +++ b/kutils/kplugininfo.cpp @@ -60,7 +60,7 @@ class KPluginInfo::KPluginInfoPrivate bool enabledbydefault; bool pluginenabled; - KConfig * config; + TDEConfig * config; TQString configgroup; KService::Ptr service; TQValueList<KService::Ptr> kcmservices; @@ -151,7 +151,7 @@ KPluginInfo::~KPluginInfo() delete d; } -TQValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, KConfig * config, const TQString & group ) +TQValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, TDEConfig * config, const TQString & group ) { TQValueList<KPluginInfo*> infolist; KPluginInfo * info; @@ -165,7 +165,7 @@ TQValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & serv return infolist; } -TQValueList<KPluginInfo*> KPluginInfo::fromFiles( const TQStringList & files, KConfig * config, const TQString & group ) +TQValueList<KPluginInfo*> KPluginInfo::fromFiles( const TQStringList & files, TDEConfig * config, const TQString & group ) { TQValueList<KPluginInfo*> infolist; for( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) @@ -177,7 +177,7 @@ TQValueList<KPluginInfo*> KPluginInfo::fromFiles( const TQStringList & files, KC return infolist; } -TQValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const TQString & name, KConfig * config, const TQString & group ) +TQValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const TQString & name, TDEConfig * config, const TQString & group ) { TQStringList files = TDEGlobal::dirs()->findAllResources( "data", name + "/kpartplugins/*.desktop", true, false ); @@ -276,7 +276,7 @@ const TQValueList<KService::Ptr> & KPluginInfo::kcmServices() const { if ( !d->kcmservicesCached ) { - d->kcmservices = KTrader::self()->query( "KCModule", "'" + d->pluginName + + d->kcmservices = KTrader::self()->query( "TDECModule", "'" + d->pluginName + "' in [X-TDE-ParentComponents]" ); kdDebug( 703 ) << "found " << d->kcmservices.count() << " offers for " << d->pluginName << endl; @@ -287,13 +287,13 @@ const TQValueList<KService::Ptr> & KPluginInfo::kcmServices() const return d->kcmservices; } -void KPluginInfo::setConfig( KConfig * config, const TQString & group ) +void KPluginInfo::setConfig( TDEConfig * config, const TQString & group ) { d->config = config; d->configgroup = group; } -KConfig * KPluginInfo::config() const +TDEConfig * KPluginInfo::config() const { return d->config; } @@ -316,14 +316,14 @@ TQVariant KPluginInfo::operator[]( const TQString & key ) const return property( key ); } -void KPluginInfo::save( KConfigGroup * config ) +void KPluginInfo::save( TDEConfigGroup * config ) { kdDebug( 703 ) << k_funcinfo << endl; if( 0 == config ) { if( 0 == d->config ) { - kdWarning( 703 ) << "no KConfigGroup, cannot save" << endl; + kdWarning( 703 ) << "no TDEConfigGroup, cannot save" << endl; return; } d->config->setGroup( d->configgroup ); @@ -333,14 +333,14 @@ void KPluginInfo::save( KConfigGroup * config ) config->writeEntry( d->pluginName + "Enabled", isPluginEnabled() ); } -void KPluginInfo::load( KConfigGroup * config ) +void KPluginInfo::load( TDEConfigGroup * config ) { kdDebug( 703 ) << k_funcinfo << endl; if( 0 == config ) { if( 0 == d->config ) { - kdWarning( 703 ) << "no KConfigGroup, cannot load" << endl; + kdWarning( 703 ) << "no TDEConfigGroup, cannot load" << endl; return; } d->config->setGroup( d->configgroup ); diff --git a/kutils/kplugininfo.h b/kutils/kplugininfo.h index bebd11cb6..0ba051d2c 100644 --- a/kutils/kplugininfo.h +++ b/kutils/kplugininfo.h @@ -26,7 +26,7 @@ #include <tqvaluelist.h> #include <kservice.h> -class KConfigGroup; +class TDEConfigGroup; /** * @ingroup main @@ -120,7 +120,7 @@ class KUTILS_EXPORT KPluginInfo * KService objects. If you get a trader offer of the plugins you want * to use you can just pass them to this function. */ - static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const TQString & group = TQString::null ); + static KPluginInfo::List fromServices( const KService::List & services, TDEConfig * config = 0, const TQString & group = TQString::null ); /** * @return A list of KPluginInfo objects constructed from a list of @@ -128,14 +128,14 @@ class KUTILS_EXPORT KPluginInfo * KStandardDirs::findAllResources() you pass the list of files to this * function. */ - static KPluginInfo::List fromFiles( const TQStringList & files, KConfig * config = 0, const TQString & group = TQString::null ); + static KPluginInfo::List fromFiles( const TQStringList & files, TDEConfig * config = 0, const TQString & group = TQString::null ); /** * @return A list of KPluginInfo objects for the KParts plugins of an * instance. You only need the name of the instance not a pointer to the * TDEInstance object. */ - static KPluginInfo::List fromKPartsInstanceName( const TQString &, KConfig * config = 0, const TQString & group = TQString::null ); + static KPluginInfo::List fromKPartsInstanceName( const TQString &, TDEConfig * config = 0, const TQString & group = TQString::null ); /** * @return Whether the plugin should be hidden. @@ -263,25 +263,25 @@ class KUTILS_EXPORT KPluginInfo /** * @return A list of Service pointers if the plugin installs one or more - * KCModule + * TDECModule */ const TQValueList<KService::Ptr> & kcmServices() const; /** - * Set the KConfigGroup to use for load()ing and save()ing the - * configuration. This will be overridden by the KConfigGroup passed to + * Set the TDEConfigGroup to use for load()ing and save()ing the + * configuration. This will be overridden by the TDEConfigGroup passed to * save() or load() (if one is passed). */ - void setConfig( KConfig * config, const TQString & group ); + void setConfig( TDEConfig * config, const TQString & group ); /** - * @return If the KPluginInfo object has a KConfig object set return + * @return If the KPluginInfo object has a TDEConfig object set return * it, else return 0. */ - KConfig * config() const; + TDEConfig * config() const; /** - * @return The groupname used in the KConfig object for load()ing and + * @return The groupname used in the TDEConfig object for load()ing and * save()ing whether the plugin is enabled. */ const TQString & configgroup() const; @@ -289,18 +289,18 @@ class KUTILS_EXPORT KPluginInfo /** * Save state of the plugin - enabled or not. This function is provided * for reimplementation if you need to save somewhere else. - * @param config The KConfigGroup holding the information whether + * @param config The TDEConfigGroup holding the information whether * plugin is enabled. */ - virtual void save( KConfigGroup * config = 0 ); + virtual void save( TDEConfigGroup * config = 0 ); /** * Load the state of the plugin - enabled or not. This function is provided * for reimplementation if you need to save somewhere else. - * @param config The KConfigGroup holding the information whether + * @param config The TDEConfigGroup holding the information whether * plugin is enabled. */ - virtual void load( KConfigGroup * config = 0 ); + virtual void load( TDEConfigGroup * config = 0 ); /** * Restore defaults (enabled or not). diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp index 9dbf42c4a..7f07b7ed2 100644 --- a/kutils/kpluginselector.cpp +++ b/kutils/kpluginselector.cpp @@ -123,7 +123,7 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate { KPluginSelectionWidgetPrivate( KPluginSelector * _kps, const TQString & _cat, - KConfigGroup * _config ) + TDEConfigGroup * _config ) : widgetstack( 0 ) , kps( _kps ) , config( _config ) @@ -146,14 +146,14 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate TQWidgetStack * widgetstack; KPluginSelector * kps; - KConfigGroup * config; + TDEConfigGroup * config; KPluginListViewToolTip *tooltip; - TQDict<KCModuleInfo> pluginconfigmodules; + TQDict<TDECModuleInfo> pluginconfigmodules; TQMap<TQString, int> widgetIDs; TQMap<KPluginInfo*, bool> plugincheckedchanged; TQString catname; - TQValueList<KCModuleProxy*> modulelist; + TQValueList<TDECModuleProxy*> modulelist; TQPtrDict<TQStringList> moduleParentComponents; KPluginInfo * currentplugininfo; @@ -165,7 +165,7 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate KPluginSelectionWidget::KPluginSelectionWidget( const TQValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps, TQWidget * parent, const TQString & catname, const TQString & category, - KConfigGroup * config, const char * name ) + TDEConfigGroup * config, const char * name ) : TQWidget( parent, name ) , d( new KPluginSelectionWidgetPrivate( kps, catname, config ) ) { @@ -238,9 +238,9 @@ bool KPluginSelectionWidget::pluginIsLoaded( const TQString & pluginName ) const TQWidget * KPluginSelectionWidget::insertKCM( TQWidget * parent, - const KCModuleInfo & moduleinfo ) + const TDECModuleInfo & moduleinfo ) { - KCModuleProxy * module = new KCModuleProxy( moduleinfo, false, + TDECModuleProxy * module = new TDECModuleProxy( moduleinfo, false, parent ); if( !module->realModule() ) { @@ -281,7 +281,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch { if( !( *it )->noDisplay() ) { - KCModuleInfo moduleinfo( *it ); + TDECModuleInfo moduleinfo( *it ); TQWidget * module = insertKCM( tabwidget, moduleinfo ); tabwidget->addTab( module, moduleinfo.moduleName() ); } @@ -291,7 +291,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch { if( !plugininfo->kcmServices().front()->noDisplay() ) { - KCModuleInfo moduleinfo( + TDECModuleInfo moduleinfo( plugininfo->kcmServices().front() ); TQWidget * module = insertKCM( d->widgetstack, moduleinfo ); module->setEnabled( checked ); @@ -431,7 +431,7 @@ void KPluginSelectionWidget::load() d->currentchecked = info->isPluginEnabled(); } - for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin(); + for( TQValueList<TDECModuleProxy*>::Iterator it = d->modulelist.begin(); it != d->modulelist.end(); ++it ) if( ( *it )->changed() ) ( *it )->load(); @@ -454,7 +454,7 @@ void KPluginSelectionWidget::save() d->plugincheckedchanged[ info ] = false; } TQStringList updatedModules; - for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin(); + for( TQValueList<TDECModuleProxy*>::Iterator it = d->modulelist.begin(); it != d->modulelist.end(); ++it ) if( ( *it )->changed() ) { @@ -581,7 +581,7 @@ static TQValueList<KPluginInfo*> kpartsPluginInfos( const TQString& instanceName } void KPluginSelector::addPlugins( const TQString & instanceName, - const TQString & catname, const TQString & category, KConfig * config ) + const TQString & catname, const TQString & category, TDEConfig * config ) { const TQValueList<KPluginInfo*> plugininfos = kpartsPluginInfos( instanceName ); if ( plugininfos.isEmpty() ) @@ -590,14 +590,14 @@ void KPluginSelector::addPlugins( const TQString & instanceName, Q_ASSERT( config ); // please set config, or use addPlugins( instance, ... ) which takes care of it if ( !config ) // KDE4: ensure that config is always set; make it second in the arg list? config = new KSimpleConfig( instanceName ); // memleak! - KConfigGroup * cfgGroup = new KConfigGroup( config, "KParts Plugins" ); + TDEConfigGroup * cfgGroup = new TDEConfigGroup( config, "KParts Plugins" ); kdDebug( 702 ) << k_funcinfo << "cfgGroup = " << cfgGroup << endl; addPluginsInternal( plugininfos, catname, category, cfgGroup ); } void KPluginSelector::addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos, const TQString & catname, const TQString & category, - KConfigGroup* cfgGroup ) + TDEConfigGroup* cfgGroup ) { KPluginSelectionWidget * w; if( d->tabwidget ) @@ -619,7 +619,7 @@ void KPluginSelector::addPluginsInternal( const TQValueList<KPluginInfo*> plugin } void KPluginSelector::addPlugins( const TDEInstance * instance, const TQString & - catname, const TQString & category, KConfig * config ) + catname, const TQString & category, TDEConfig * config ) { if ( !config ) config = instance->config(); @@ -627,11 +627,11 @@ void KPluginSelector::addPlugins( const TDEInstance * instance, const TQString & } void KPluginSelector::addPlugins( const TQValueList<KPluginInfo*> & plugininfos, - const TQString & catname, const TQString & category, KConfig * config ) + const TQString & catname, const TQString & category, TDEConfig * config ) { checkNeedForTabWidget(); - // the KConfigGroup becomes owned by KPluginSelectionWidget - KConfigGroup * cfgGroup = new KConfigGroup( config ? config : TDEGlobal::config(), "Plugins" ); + // the TDEConfigGroup becomes owned by KPluginSelectionWidget + TDEConfigGroup * cfgGroup = new TDEConfigGroup( config ? config : TDEGlobal::config(), "Plugins" ); kdDebug( 702 ) << k_funcinfo << "cfgGroup = " << cfgGroup << endl; addPluginsInternal( plugininfos, catname, category, cfgGroup ); } @@ -696,10 +696,10 @@ void KPluginSelector::defaults() // tabwidget - defaults() will be called for all of them) TQWidget * pluginconfig = d->widgetstack->visibleWidget(); - KCModuleProxy * kcm = ::tqqt_cast<KCModuleProxy*>(pluginconfig); + TDECModuleProxy * kcm = ::tqqt_cast<TDECModuleProxy*>(pluginconfig); if( kcm ) { - kdDebug( 702 ) << "call KCModule::defaults() for the plugins KCM" + kdDebug( 702 ) << "call TDECModule::defaults() for the plugins KCM" << endl; kcm->defaults(); return; @@ -707,14 +707,14 @@ void KPluginSelector::defaults() // if we get here the visible Widget must be a tabwidget holding more than // one KCM - TQObjectList * kcms = pluginconfig->queryList( "KCModuleProxy", + TQObjectList * kcms = pluginconfig->queryList( "TDECModuleProxy", 0, false, false ); TQObjectListIt it( *kcms ); TQObject * obj; while( ( obj = it.current() ) != 0 ) { ++it; - ( ( KCModule* )obj )->defaults(); + ( ( TDECModule* )obj )->defaults(); } delete kcms; // FIXME: update changed state diff --git a/kutils/kpluginselector.h b/kutils/kpluginselector.h index 87026154e..4316f4880 100644 --- a/kutils/kpluginselector.h +++ b/kutils/kpluginselector.h @@ -28,8 +28,8 @@ class TDEInstance; class KPluginInfo; class TQWidgetStack; -class KConfig; -class KConfigGroup; +class TDEConfig; +class TDEConfigGroup; /** * @ingroup main @@ -89,10 +89,10 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget * with the Category key == @p category. If @p * category is not set the Category key is ignored * and all plugins are shown. - * @param config The KConfig object that holds the state of the + * @param config The TDEConfig object that holds the state of the * plugins being enabled or not. By default it should * be instance->config(). It is recommended to - * always pass a KConfig object if you use + * always pass a TDEConfig object if you use * KSettings::PluginPage since you never know from where the * page will be called (think global config app). * For example KViewCanvas passes KSimpleConfig( @@ -101,7 +101,7 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget void addPlugins( const TQString & instanceName, const TQString & catname = TQString::null, const TQString & category = TQString::null, - KConfig * config = 0 ); + TDEConfig * config = 0 ); /** * Add a list of KParts plugins. Convenience method for the one above. @@ -110,7 +110,7 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget void addPlugins( const TDEInstance * instance, const TQString & catname = TQString::null, const TQString & category = TQString::null, - KConfig * config = 0 ); + TDEConfig * config = 0 ); /** * Add a list of non-KParts plugins @@ -128,10 +128,10 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget * with the Category key == @p category. If @p * category is not set the Category key is ignored * and all plugins are shown. - * @param config The KConfig object that holds the state of the + * @param config The TDEConfig object that holds the state of the * plugins being enabled or not. By default it will * use TDEGlobal::config(). It is recommended to - * always pass a KConfig object if you use + * always pass a TDEConfig object if you use * KSettings::PluginPage since you never know from where the * page will be called (think global config app). * For example KViewCanvas passes KSimpleConfig( @@ -140,7 +140,7 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget void addPlugins( const TQValueList<KPluginInfo*> & plugininfos, const TQString & catname = TQString::null, const TQString & category = TQString::null, - KConfig * config = 0 ); + TDEConfig * config = 0 ); /** * Set whether the area for showing the KCMs of the plugins should be @@ -208,7 +208,7 @@ class KUTILS_EXPORT KPluginSelector : public TQWidget */ void addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos, const TQString & catname, const TQString & category, - KConfigGroup* cfgGroup ); + TDEConfigGroup* cfgGroup ); class KPluginSelectorPrivate; KPluginSelectorPrivate * d; diff --git a/kutils/kpluginselector_p.h b/kutils/kpluginselector_p.h index eb509a41e..c287ce555 100644 --- a/kutils/kpluginselector_p.h +++ b/kutils/kpluginselector_p.h @@ -24,10 +24,10 @@ #include <tdelibs_export.h> -class KConfigGroup; +class TDEConfigGroup; class TQListViewItem; class KPluginInfo; -class KCModuleInfo; +class TDECModuleInfo; /** * This is a widget to configure what Plugins should be loaded. This widget is @@ -53,7 +53,7 @@ class KPluginSelectionWidget : public TQWidget * @param parent The parent widget. * @param catname The translated name of the category. * @param category The unstranslated category key name. - * @param config Set the KConfigGroup object that holds the + * @param config Set the TDEConfigGroup object that holds the * state of the plugins being enabled or not. * @param name The name of the widget (passed to TQWidget) * @@ -61,7 +61,7 @@ class KPluginSelectionWidget : public TQWidget */ KPluginSelectionWidget( const TQValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps, TQWidget * parent, const TQString & catname, - const TQString & category, KConfigGroup * config = 0, + const TQString & category, TDEConfigGroup * config = 0, const char * name = 0 ); virtual ~KPluginSelectionWidget(); @@ -162,13 +162,13 @@ class KPluginSelectionWidget : public TQWidget private: /** - * Load a KCM from a KCModuleInfo. If successfull connect changed + * Load a KCM from a TDECModuleInfo. If successfull connect changed * signal and return the module. If not, create a label showing "Error", * show the loaderError and return the label. * * @internal */ - TQWidget * insertKCM( TQWidget * parent, const KCModuleInfo & ); + TQWidget * insertKCM( TQWidget * parent, const TDECModuleInfo & ); /** * Embed the KCMs for the plugin into the widgetstack diff --git a/kutils/ksettings/README.dox b/kutils/ksettings/README.dox index b9efd0dcb..88268f671 100644 --- a/kutils/ksettings/README.dox +++ b/kutils/ksettings/README.dox @@ -45,7 +45,7 @@ mechanisms. Every page is a KCM. This is what you need for creating a page: \code -class MyAppConfig : public KCModule +class MyAppConfig : public TDECModule { Q_OBJECT public: @@ -67,7 +67,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_myappconfig, MyAppConfigFactory( "kcm_myappconfig" ) ); MyAppConfig::MyAppConfig( QWidget *parent, const char *, const QStringList &args ) - : KCModule( MyAppConfigFactory::instance(), parent, args ) + : TDECModule( MyAppConfigFactory::instance(), parent, args ) { // create the pages GUI load(); @@ -76,9 +76,9 @@ MyAppConfig::MyAppConfig( QWidget *parent, const char *, const QStringList &args // implementations for the other methods \endcode -For the KConfig object you can either use +For the TDEConfig object you can either use TDEGlobal::config() (I don't recommend it) or KSimpleConfig( "myapprc" ). -I added a method to KSettings::Dispatcher that gives you the KConfig +I added a method to KSettings::Dispatcher that gives you the TDEConfig object for every registered instance name: \ref KSettings::Dispatcher::configForInstanceName @@ -94,7 +94,7 @@ An example file: Encoding=UTF-8 Icon=myapp Type=Service -ServiceTypes=KCModule +ServiceTypes=TDECModule X-TDE-ModuleType=Library X-TDE-Library=myappconfig @@ -115,10 +115,10 @@ Some explanation for those keys: - Icon is the icon that will be used in the listview/iconview for your page. - X-TDE-Library is the name of the library where the page is in. The library always needs to be prefixed with kcm_ but you don't write the prefix in the - desktop file. For more docu on this look for the KCModule docu. + desktop file. For more docu on this look for the TDECModule docu. - X-TDE-FactoryName is either the name of the Factory you used in the KGenericFactory call or the suffix of the create_ function that you created. - Again for more info look for the KCModule docu. + Again for more info look for the TDECModule docu. - X-TDE-ParentApp is the name of the application this config page belongs to. It is used by the first two \ref KSettings::Dialog constructors. The Dialog will use all modules that set X-TDE-ParentApp to diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp index c64e2e64a..727ca1072 100644 --- a/kutils/ksettings/dialog.cpp +++ b/kutils/ksettings/dialog.cpp @@ -58,7 +58,7 @@ class PageNode enum Type { KCM, Group, Root }; union Value { - KCModuleInfo * kcm; + TDECModuleInfo * kcm; GroupInfo * group; }; Type m_type; @@ -71,7 +71,7 @@ class PageNode bool m_dirty; protected: - PageNode( KCModuleInfo * info, PageNode * parent ) + PageNode( TDECModuleInfo * info, PageNode * parent ) : m_type( KCM ) , m_parent( parent ) , m_visible( true ) @@ -291,7 +291,7 @@ class PageNode return false; } - bool insert( KCModuleInfo * info, const TQString & parentid ) + bool insert( TDECModuleInfo * info, const TQString & parentid ) { if( parentid.isNull() ) { @@ -467,10 +467,10 @@ TQValueList<KService::Ptr> Dialog::parentComponentsServices( constraint = "('" + constraint + "' in [X-TDE-ParentComponents])"; kdDebug( 700 ) << "constraint = " << constraint << endl; - return KTrader::self()->query( "KCModule", constraint ); + return KTrader::self()->query( "TDECModule", constraint ); } -bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const +bool Dialog::isPluginForKCMEnabled( TDECModuleInfo * moduleinfo ) const { // if the user of this class requested to hide disabled modules // we check whether it should be enabled or not @@ -491,9 +491,9 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const // we check if the parent component is a plugin if( ! d->plugininfomap.contains( *pcit ) ) { - // if not the KCModule must be enabled + // if not the TDECModule must be enabled enabled = true; - // we're done for this KCModuleInfo + // we're done for this TDECModuleInfo break; } // if it is a plugin we check whether the plugin is enabled @@ -502,7 +502,7 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const enabled = pinfo->isPluginEnabled(); kdDebug( 700 ) << "parent " << *pcit << " is " << ( enabled ? "enabled" : "disabled" ) << endl; - // if it is enabled we're done for this KCModuleInfo + // if it is enabled we're done for this TDECModuleInfo if( enabled ) break; } @@ -543,12 +543,12 @@ void Dialog::createDialogFromServices() it != setdlgaddon.end(); ++it ) parseGroupFile( *it ); - // now we process the KCModule services + // now we process the TDECModule services for( TQValueList<KService::Ptr>::ConstIterator it = d->services.begin(); it != d->services.end(); ++it ) { - // we create the KCModuleInfo - KCModuleInfo * info = new KCModuleInfo( *it ); + // we create the TDECModuleInfo + TDECModuleInfo * info = new TDECModuleInfo( *it ); TQString parentid; TQVariant tmp = info->service()->property( "X-TDE-CfgDlgHierarchy", TQVariant::String ); @@ -577,10 +577,10 @@ void Dialog::createDialogFromServices() // TODO: Don't show the reset button until the issue with the // KPluginSelector::load() method is solved. // Problem: - // KCMultiDialog::show() call KCModule::load() to reset all KCMs + // KCMultiDialog::show() call TDECModule::load() to reset all KCMs // (KPluginSelector::load() resets all plugin selections and all plugin // KCMs). - // The reset button calls KCModule::load(), too but in this case we want the + // The reset button calls TDECModule::load(), too but in this case we want the // KPluginSelector to only reset the current visible plugin KCM and not // touch the plugin selections. // I have no idea how to check that in KPluginSelector::load()... diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h index cd9b539ef..58115426c 100644 --- a/kutils/ksettings/dialog.h +++ b/kutils/ksettings/dialog.h @@ -26,7 +26,7 @@ template<class T> class TQValueList; class KPluginInfo; class KCMultiDialog; -class KCModuleInfo; +class TDECModuleInfo; namespace KSettings { @@ -188,7 +188,7 @@ class KUTILS_EXPORT Dialog : public TQObject * @internal * Check whether the plugin associated with this KCM is enabled. */ - bool isPluginForKCMEnabled( KCModuleInfo * ) const; + bool isPluginForKCMEnabled( TDECModuleInfo * ) const; TQValueList<KService::Ptr> instanceServices() const; TQValueList<KService::Ptr> parentComponentsServices( @@ -204,7 +204,7 @@ class KUTILS_EXPORT Dialog : public TQObject * If this module is put into a TreeList hierarchy this will return a * list of the names of the parent modules. */ - TQStringList parentModuleNames( KCModuleInfo * ); + TQStringList parentModuleNames( TDECModuleInfo * ); /** * @internal diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp index eb9acf0bc..590ca7e3c 100644 --- a/kutils/ksettings/dispatcher.cpp +++ b/kutils/ksettings/dispatcher.cpp @@ -83,7 +83,7 @@ void Dispatcher::registerInstance( TDEInstance * instance, TQObject * recv, cons connect( recv, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( unregisterInstance( TQObject * ) ) ); } -KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName ) +TDEConfig * Dispatcher::configForInstanceName( const TQCString & instanceName ) { kdDebug( 701 ) << k_funcinfo << endl; if( m_instanceInfo.contains( instanceName ) ) @@ -113,7 +113,7 @@ void Dispatcher::reparseConfiguration( const TQCString & instanceName ) // check if the instanceName is valid: if( ! m_instanceInfo.contains( instanceName ) ) return; - // first we reparse the config of the instance so that the KConfig object + // first we reparse the config of the instance so that the TDEConfig object // will be up to date m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration(); TQSignal * sig = m_instanceInfo[ instanceName ].signal; diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h index c04a41b99..fa0c9e6c9 100644 --- a/kutils/ksettings/dispatcher.h +++ b/kutils/ksettings/dispatcher.h @@ -29,7 +29,7 @@ class TQSignal; class TQStrList; template<class T> class KStaticDeleter; class TDEInstance; -class KConfig; +class TDEConfig; namespace KSettings { @@ -39,7 +39,7 @@ namespace KSettings * @short Dispatch change notifications from the KCMs to the program. * * Since your program does not have direct control over the KCMs that get loaded - * into the KConfigureDialog you need a way to get notified. This is what you + * into the TDEConfigureDialog you need a way to get notified. This is what you * do: * \code * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) ); @@ -74,9 +74,9 @@ class KUTILS_EXPORT Dispatcher : public TQObject void registerInstance( TDEInstance * instance, TQObject * recv, const char * slot ); /** - * @return the KConfig object that belongs to the instanceName + * @return the TDEConfig object that belongs to the instanceName */ - KConfig * configForInstanceName( const TQCString & instanceName ); + TDEConfig * configForInstanceName( const TQCString & instanceName ); /** * @return a list of all the instance names that are currently @@ -100,10 +100,10 @@ class KUTILS_EXPORT Dispatcher : public TQObject void reparseConfiguration( const TQCString & instanceName ); /** - * When this slot is called the KConfig objects of all the registered - * instances are sync()ed. This is usefull when some other KConfig + * When this slot is called the TDEConfig objects of all the registered + * instances are sync()ed. This is usefull when some other TDEConfig * objects will read/write from/to the same config file, so that you - * can first write out the current state of the KConfig objects. + * can first write out the current state of the TDEConfig objects. */ void syncConfiguration(); diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp index 4a94d21d4..c7208dc69 100644 --- a/kutils/ksettings/pluginpage.cpp +++ b/kutils/ksettings/pluginpage.cpp @@ -38,7 +38,7 @@ class PluginPage::PluginPagePrivate }; PluginPage::PluginPage( TQWidget * parent, const char * name, const TQStringList & args ) - : KCModule( parent, name, args ) + : TDECModule( parent, name, args ) , d( new PluginPagePrivate ) { ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); @@ -47,7 +47,7 @@ class PluginPage::PluginPagePrivate } PluginPage::PluginPage( TDEInstance * instance, TQWidget * parent, const TQStringList & args ) - : KCModule( instance, parent, args ) + : TDECModule( instance, parent, args ) , d( new PluginPagePrivate ) { ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); diff --git a/kutils/ksettings/pluginpage.h b/kutils/ksettings/pluginpage.h index 16cfbc572..2ba4f2142 100644 --- a/kutils/ksettings/pluginpage.h +++ b/kutils/ksettings/pluginpage.h @@ -31,7 +31,7 @@ namespace KSettings /** * @ingroup settings * @ingroup plugin - * @short Convenience KCModule for creating a plugins config page. + * @short Convenience TDECModule for creating a plugins config page. * * This class makes it very easy to create a plugins configuration page to your * program. All you need to do is create a class that is derived from @@ -55,7 +55,7 @@ namespace KSettings Encoding=UTF-8 Icon=plugin Type=Service - ServiceTypes=KCModule + ServiceTypes=TDECModule X-TDE-ModuleType=Library X-TDE-Library=myapppluginconfig @@ -70,18 +70,18 @@ namespace KSettings * @author Matthias Kretz <kretz@kde.org> * @since 3.2 */ -class KUTILS_EXPORT PluginPage : public KCModule +class KUTILS_EXPORT PluginPage : public TDECModule { Q_OBJECT public: /** - * Standart KCModule constructor. Automatically creates the the + * Standart TDECModule constructor. Automatically creates the the * KPluginSelector widget. */ PluginPage( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** - * Standart KCModule constructor. Automatically creates the the + * Standart TDECModule constructor. Automatically creates the the * KPluginSelector widget. */ PluginPage( TDEInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); @@ -103,7 +103,7 @@ class KUTILS_EXPORT PluginPage : public KCModule virtual void load(); /** - * Save the state of the plugins to KConfig objects + * Save the state of the plugins to TDEConfig objects */ virtual void save(); virtual void defaults(); diff --git a/kwallet/client/kwallet.cc b/kwallet/client/kwallet.cc index a823a06dd..4edb421b2 100644 --- a/kwallet/client/kwallet.cc +++ b/kwallet/client/kwallet.cc @@ -34,7 +34,7 @@ using namespace KWallet; const TQString Wallet::LocalWallet() { - KConfig cfg("kwalletrc", true); + TDEConfig cfg("kwalletrc", true); cfg.setGroup("Wallet"); if (!cfg.readBoolEntry("Use One Wallet", true)) { TQString tmp = cfg.readEntry("Local Wallet", "localwallet"); @@ -52,7 +52,7 @@ const TQString Wallet::LocalWallet() { } const TQString Wallet::NetworkWallet() { - KConfig cfg("kwalletrc", true); + TDEConfig cfg("kwalletrc", true); cfg.setGroup("Wallet"); TQString tmp = cfg.readEntry("Default Wallet", "kdewallet"); diff --git a/libkmid/deviceman.cc b/libkmid/deviceman.cc index ad9fc54fb..f539d00b6 100644 --- a/libkmid/deviceman.cc +++ b/libkmid/deviceman.cc @@ -110,7 +110,7 @@ DeviceManager::DeviceManager(int def) { TDEInstance *tmp_instance=0L; if (!TDEGlobal::_instance) tmp_instance=new TDEInstance("nonKDEapp"); - KConfig *config = new KConfig("kcmmidirc", true); + TDEConfig *config = new TDEConfig("kcmmidirc", true); config->setGroup("Configuration"); default_dev=config->readNumEntry("midiDevice",0); diff --git a/tdecore/AUTHORS b/tdecore/AUTHORS index 07b7d44ef..03def3f46 100644 --- a/tdecore/AUTHORS +++ b/tdecore/AUTHORS @@ -1,5 +1,5 @@ Matthias Kalle Dalheimer <kalle@kde.org>: -classes KConfig, KTextStream, KColorSet, TDEApplication +classes TDEConfig, KTextStream, KColorSet, TDEApplication automake, autoconf, maintenance Richard Moore <moorer@cs.man.ac.uk>: @@ -12,7 +12,7 @@ Steffen Hansen <stefh@dit.ou.dk>: KURL class Torben Weis <weis@stud.uni-frankfurt.de> -DnD stuff, KSocket and KServerSocket classes, KPixmap +DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, diff --git a/tdecore/DESIGN.kconfig b/tdecore/DESIGN.kconfig index 4ced76726..c4c68b28e 100644 --- a/tdecore/DESIGN.kconfig +++ b/tdecore/DESIGN.kconfig @@ -70,7 +70,7 @@ When an entry is read with readEntry(key, defaultValue), non-existing entries will return "defaultValue" while hasKey(key) will return "false" for such entries. -Currently all entries are stored in memory. When KConfig is "sync()'ed" +Currently all entries are stored in memory. When TDEConfig is "sync()'ed" it reads the file that it is about to overwrite (for the second time), it then merges in the entries it has in memory and writes the result back to the file. It does NOT update its map of entries in memory with the entries @@ -99,12 +99,12 @@ KDE3.0 Changes ------------------------------------------------------------------------------ -KConfig XT +TDEConfig XT ========== -My buzzword picker offered KConfig XT ("eXtended Technology") and KConfig NG +My buzzword picker offered TDEConfig XT ("eXtended Technology") and TDEConfig NG ("Next Generation"). Since the planned changes are ment to be evolutionary -rather than revolutionary, KConfig NG was dropped. +rather than revolutionary, TDEConfig NG was dropped. Goals ===== @@ -130,12 +130,12 @@ Type information can be provide by preceding every entry with a formalized comment. Work to be done: -* KConfig needs to be extended to provide access to the default values provided -by the default config files. KConfig already stores this information internally. +* TDEConfig needs to be extended to provide access to the default values provided +by the default config files. TDEConfig already stores this information internally. (DONE) * A formal comment structure needs to be designed that can convey type-information. Preferably in such a way that it is easily parsable by both machine and user. -* KConfig needs to be extended, or another class created, that is able to parse +* TDEConfig needs to be extended, or another class created, that is able to parse the formalized comments. * A tool needs to be developed that can assist developers with the generation and verification of default configuration files including type-information. @@ -170,34 +170,34 @@ Host=wantelbos.zogje.fr Class overview - KConfigBase + TDEConfigBase | v - KConfigBackend <-----> KConfig <------> KConfigSkeleton /--< myapp.kcfg + TDEConfigBackend <-----> TDEConfig <------> TDEConfigSkeleton /--< myapp.kcfg | | | / v v |*---------------< -KConfigINIBackend KSimpleConfig |kconfig_compiler \ +TDEConfigINIBackend KSimpleConfig |kconfig_compiler \ | \--< myconfig.kcfg-codegen v - MyConfig <-----KConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui + MyConfig <-----TDEConfigDialogManager----> MyConfigWidget *---< myconfigwidget.ui uic -KConfigBase: defines API for generic config class +TDEConfigBase: defines API for generic config class -KConfig: functional generic config class that supports merging of cascaded +TDEConfig: functional generic config class that supports merging of cascaded configuration files KSimpleConfig: functional generic config class without support for cascading configuration files. -KConfigBackend: defines API for config backend, t.i. the actual handling +TDEConfigBackend: defines API for config backend, t.i. the actual handling of the storage method and storage format. -KConfigINIBackend: the standard (and only one so far) class that implements +TDEConfigINIBackend: the standard (and only one so far) class that implements the config backend using the file-based .INI format for configuration files -KConfigSkeleton: base class for deriving classes that store application +TDEConfigSkeleton: base class for deriving classes that store application specific options providing type-safety and single-point defaults. @@ -215,9 +215,9 @@ myconfig.kcfg-codegen: Implementation specific code generation instructions just an example name, the application developer choses the actual name. -KConfigDialogManager: Class that links widgets in a dialog up with their +TDEConfigDialogManager: Class that links widgets in a dialog up with their corresponding confguration options in a configuration - object derived from KConfigSkeleton. + object derived from TDEConfigSkeleton. MyConfigWidget: Dialog generated from a .ui description file. Widget names in the dialog that start with "kcfg_" refer to configuration diff --git a/tdecore/KCONFIG_DESIGN b/tdecore/KCONFIG_DESIGN index dfd9aa151..d0fa141ff 100644 --- a/tdecore/KCONFIG_DESIGN +++ b/tdecore/KCONFIG_DESIGN @@ -1,9 +1,9 @@ - The basic design on KConfig for KDE 2.0 and KDE 3.0: + The basic design on TDEConfig for KDE 2.0 and KDE 3.0: ---------------------------------------- -KConfig is a hierarchy of classes for loading and saving configuration -data in KDE. KConfigBase is an abstract data type (ADT) with pure +TDEConfig is a hierarchy of classes for loading and saving configuration +data in KDE. TDEConfigBase is an abstract data type (ADT) with pure virtual functions which describes the API for accessing configuration data. It cannot be instantiated directly; only subclasses which actually implement the API may be created. The reason for this design @@ -15,34 +15,34 @@ achieve shared memory config values. The possibilities are endless, and with this design we insure that future designs will not break compatibility. -This means that most classes that currently take pointers to KConfig -objects should be changed to take pointers to KConfigBase objects. +This means that most classes that currently take pointers to TDEConfig +objects should be changed to take pointers to TDEConfigBase objects. The virtual functions and c++ polymorphism will make sure that the correct function in the actual, instantiated object are called, but -this lets the user/programmer change the type of KConfig that has been +this lets the user/programmer change the type of TDEConfig that has been implemented at runtime without changing other code. -Similarly, there is a abstract data type KConfigBackEnd. All +Similarly, there is a abstract data type TDEConfigBackEnd. All reading/writing of the physical, on-disk configuration should be done -through a subclass of KConfigBackEnd. The only class that is -currently implemented right now is KConfigINIBackEnd, which +through a subclass of TDEConfigBackEnd. The only class that is +currently implemented right now is TDEConfigINIBackEnd, which reads/writes the standard windows INI-style configuration files that KDE has used since KDE 1.x days. However, it is conceivable that one might program an XML backend, or even a database/registry style backend. Again, this abstract data type approach provides flexibility -for the future. Currently KConfig and KSimpleConfig hardcode that -they are using a KConfigINIBackEnd in the constructor. If more back +for the future. Currently TDEConfig and KSimpleConfig hardcode that +they are using a TDEConfigINIBackEnd in the constructor. If more back ends are implemented, this will have to be changed to use a factory method of some sort to create the backend; all they maintain is a -pointer to a KConfigBackEnd, so the actual type of backend does not +pointer to a TDEConfigBackEnd, so the actual type of backend does not matter. -If you are interested in using KConfig, you need simply to look at the -public members of KConfigBase. They will provide you with everything +If you are interested in using TDEConfig, you need simply to look at the +public members of TDEConfigBase. They will provide you with everything you need to do to look up data, change and write data, etc. If you -are interested in implementing a new KConfig format, look at KConfig +are interested in implementing a new TDEConfig format, look at TDEConfig for ideas. Likewise if you want to implement a backend, look at -KConfigINIBackEnd for inspiration. The KDoc-style API documentation +TDEConfigINIBackEnd for inspiration. The KDoc-style API documentation should be complete. If there is anything confusing, please either fix it in CVS yourself or mail me with your questions, and we will make sure things get clarified. diff --git a/tdecore/README.kiosk b/tdecore/README.kiosk index d6d380707..635c61f95 100644 --- a/tdecore/README.kiosk +++ b/tdecore/README.kiosk @@ -64,7 +64,7 @@ that haven't explicitly changed the affected settings to something else. Starting with KDE3, configuration entries can be marked "immutable". When a configuration entry is immutable it means that configuration files that are read later will not be able to override its value. Immutable entries cannot -be changed via KConfig and if the entry is present under $TDEHOME it will +be changed via TDEConfig and if the entry is present under $TDEHOME it will be ignored. Entries can be marked immutable on 4 different levels: diff --git a/tdecore/kaccel.cpp b/tdecore/kaccel.cpp index 41660e59a..7291f3f56 100644 --- a/tdecore/kaccel.cpp +++ b/tdecore/kaccel.cpp @@ -527,13 +527,13 @@ const TQString& KAccel::configGroup() const void KAccel::setConfigGroup( const TQString& s ) { d->setConfigGroup( s ); } -bool KAccel::readSettings( KConfigBase* pConfig ) +bool KAccel::readSettings( TDEConfigBase* pConfig ) { d->readSettings( pConfig ); return true; } -bool KAccel::writeSettings( KConfigBase* pConfig ) const +bool KAccel::writeSettings( TDEConfigBase* pConfig ) const { d->writeSettings( pConfig ); return true; } void KAccel::emitKeycodeChanged() diff --git a/tdecore/kaccel.h b/tdecore/kaccel.h index a54c6bd2e..491fa39ce 100644 --- a/tdecore/kaccel.h +++ b/tdecore/kaccel.h @@ -29,7 +29,7 @@ class TQPopupMenu; // for obsolete insertItem() methods below class TQWidget; class KAccelAction; class KAccelActions; -class KConfigBase; +class TDEConfigBase; class KAccelPrivate; /** @@ -267,14 +267,14 @@ class TDECORE_EXPORT KAccel : public TQAccel /** * Returns the configuration group of the settings. * @return the configuration group - * @see KConfig + * @see TDEConfig */ const TQString& configGroup() const; /** * Returns the configuration group of the settings. * @param name the new configuration group - * @see KConfig + * @see TDEConfig */ void setConfigGroup( const TQString &name ); @@ -289,7 +289,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * configuration file * @return true if successful, false otherwise */ - bool readSettings( KConfigBase* pConfig = 0 ); + bool readSettings( TDEConfigBase* pConfig = 0 ); /** * Write the current shortcuts to @p pConfig, * or (if @p pConfig is zero) to the application's @@ -298,7 +298,7 @@ class TDECORE_EXPORT KAccel : public TQAccel * configuration file * @return true if successful, false otherwise */ - bool writeSettings( KConfigBase* pConfig = 0 ) const; + bool writeSettings( TDEConfigBase* pConfig = 0 ) const; /** * Emits the keycodeChanged() signal. diff --git a/tdecore/kaccelaction.cpp b/tdecore/kaccelaction.cpp index 0dc320a84..e8696cc26 100644 --- a/tdecore/kaccelaction.cpp +++ b/tdecore/kaccelaction.cpp @@ -203,7 +203,7 @@ bool KAccelAction::useFourModifierKeys() { if( KAccelAction::g_bUseFourModifierKeys == -1 ) { // Read in whether to use 4 modifier keys - KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); bool b = TDEGlobal::config()->readBoolEntry( "Use Four Modifier Keys", false ); KAccelAction::g_bUseFourModifierKeys = b && KKeyNative::keyboardHasWinKey(); } @@ -219,7 +219,7 @@ void KAccelAction::useFourModifierKeys( bool b ) if( b && !KKeyNative::keyboardHasWinKey() ) kdDebug(125) << "Tried to use four modifier keys on a keyboard layout without a Meta key.\n"; } - KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); TDEGlobal::config()->writeEntry( "Use Four Modifier Keys", KAccelAction::g_bUseFourModifierKeys, true, true); kdDebug(125) << "bUseFourModifierKeys = " << KAccelAction::g_bUseFourModifierKeys << endl; @@ -294,7 +294,7 @@ bool KAccelActions::init( const KAccelActions& actions ) return true; } -bool KAccelActions::init( KConfigBase& config, const TQString& sGroup ) +bool KAccelActions::init( TDEConfigBase& config, const TQString& sGroup ) { kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl; TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup ); @@ -483,7 +483,7 @@ bool KAccelActions::remove( const TQString& sAction ) return true; } -bool KAccelActions::readActions( const TQString& sConfigGroup, KConfigBase* pConfig ) +bool KAccelActions::readActions( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { KAccelShortcutList accelList(*this, false); return accelList.readSettings( sConfigGroup, pConfig ); @@ -502,13 +502,13 @@ bool KAccelActions::readActions( const TQString& sConfigGroup, KConfigBase* pCon 1) KKeySequence = Alt+F2 -> "Something=Meta+X,Asterisk;Alt+F2" */ -bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig, +bool KAccelActions::writeActions( const TQString &sGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); - KConfigGroupSaver cs( pConfig, sGroup ); + TDEConfigGroupSaver cs( pConfig, sGroup ); for( uint i = 0; i < m_nSize; i++ ) { if( m_prgActions[i] == 0 ) { diff --git a/tdecore/kaccelaction.h b/tdecore/kaccelaction.h index 4c7ac1840..9cca25d4a 100644 --- a/tdecore/kaccelaction.h +++ b/tdecore/kaccelaction.h @@ -30,8 +30,8 @@ class KAccelBase; class TQObject; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; /** * @internal @@ -400,7 +400,7 @@ class TDECORE_EXPORT KAccelActions * @param sGroup the group in the configuration file * @return true if successful, false otherwise */ - bool init( KConfigBase& config, const TQString& sGroup ); + bool init( TDEConfigBase& config, const TQString& sGroup ); /** * Updates the shortcuts of all actions in this object @@ -521,7 +521,7 @@ class TDECORE_EXPORT KAccelActions * @param pConfig the configuration file to load from * @return true if successful, false otherwise */ - bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 ); + bool readActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0 ); /** * Writes the actions to the given configuration file. @@ -532,7 +532,7 @@ class TDECORE_EXPORT KAccelActions * @param bGlobal true to write to the global configuration file * @return true if successful, false otherwise */ - bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0, + bool writeActions( const TQString& sConfigGroup = "Shortcuts", TDEConfigBase* pConfig = 0, bool bWriteAll = false, bool bGlobal = false ) const; /** diff --git a/tdecore/kaccelbase.cpp b/tdecore/kaccelbase.cpp index cb21146d2..729de1c42 100644 --- a/tdecore/kaccelbase.cpp +++ b/tdecore/kaccelbase.cpp @@ -564,14 +564,14 @@ bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut ) return false; } -void KAccelBase::readSettings( KConfigBase* pConfig ) +void KAccelBase::readSettings( TDEConfigBase* pConfig ) { m_rgActions.readActions( m_sConfigGroup, pConfig ); if( m_bAutoUpdate ) updateConnections(); } -void KAccelBase::writeSettings( KConfigBase* pConfig ) const +void KAccelBase::writeSettings( TDEConfigBase* pConfig ) const { m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal ); } diff --git a/tdecore/kaccelbase.h b/tdecore/kaccelbase.h index 03cad863a..132a6aa5c 100644 --- a/tdecore/kaccelbase.h +++ b/tdecore/kaccelbase.h @@ -205,14 +205,14 @@ class TDECORE_EXPORT KAccelBase * The group in which the configuration is stored can be * set with setConfigGroup(). */ - void readSettings( KConfigBase* pConfig = 0 ); + void readSettings( TDEConfigBase* pConfig = 0 ); /** * Write the current configurable associations to @p config, * or (if @p config is zero) to the application's * configuration file. */ - void writeSettings( KConfigBase* pConfig = 0 ) const; + void writeSettings( TDEConfigBase* pConfig = 0 ) const; TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& ); diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index dfc3bb612..2950d6170 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -914,7 +914,7 @@ void TDEApplication::init(bool GUIenabled) // Trigger creation of locale. (void) TDEGlobal::locale(); - KConfig* config = TDEGlobal::config(); + TDEConfig* config = TDEGlobal::config(); d->actionRestrictions = config->hasGroup("KDE Action Restrictions" ) && !kde_kiosk_exception; // For brain-dead configurations where the user's local config file is not writable. // * We use kdialog to warn the user, so we better not generate warnings from @@ -923,7 +923,7 @@ void TDEApplication::init(bool GUIenabled) TQCString readOnly = getenv("TDE_HOME_READONLY"); if (readOnly.isEmpty() && (tqstrcmp(name(), "kdialog") != 0)) { - KConfigGroupSaver saver(config, "KDE Action Restrictions"); + TDEConfigGroupSaver saver(config, "KDE Action Restrictions"); if (config->readBoolEntry("warn_unwritable_config",true)) config->checkConfigFilesWritable(true); } @@ -1107,13 +1107,13 @@ void TDEApplication::disableAutoDcopRegistration() autoDcopRegistration = false; } -KConfig* TDEApplication::sessionConfig() +TDEConfig* TDEApplication::sessionConfig() { if (pSessionConfig) return pSessionConfig; // create an instance specific config object - pSessionConfig = new KConfig( sessionConfigName(), false, false); + pSessionConfig = new TDEConfig( sessionConfigName(), false, false); return pSessionConfig; } @@ -2276,7 +2276,7 @@ void TDEApplication::applyGUIStyle() { if ( !useStyles ) return; - KConfigGroup pConfig (TDEGlobal::config(), "General"); + TDEConfigGroup pConfig (TDEGlobal::config(), "General"); TQString defaultStyle = KStyle::defaultStyle(); TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle); @@ -2339,12 +2339,12 @@ TQString TDEApplication::makeStdCaption( const TQString &userCaption, TQPalette TDEApplication::createApplicationPalette() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "General" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "General" ); return createApplicationPalette( config, TDEGlobalSettings::contrast() ); } -TQPalette TDEApplication::createApplicationPalette( KConfig *config, int contrast_ ) +TQPalette TDEApplication::createApplicationPalette( TDEConfig *config, int contrast_ ) { TQColor trinity4Background( 239, 239, 239 ); TQColor trinity4Blue( 103,141,178 ); @@ -2440,8 +2440,8 @@ void TDEApplication::kdisplaySetPalette() #ifdef Q_WS_MACX //Can I have this on other platforms, please!? --Sam { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "General" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "General" ); bool do_not_set_palette = FALSE; if(config->readBoolEntry("nopaletteChange", &do_not_set_palette)) return; @@ -2484,8 +2484,8 @@ void TDEApplication::kdisplaySetStyle() void TDEApplication::propagateSettings(SettingsCategory arg) { - KConfigBase* config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "KDE" ); + TDEConfigBase* config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE" ); #ifdef QT_HAVE_MAX_IMAGE_SIZE TQSize maxImageSize(4096, 4096); @@ -2532,7 +2532,7 @@ void TDEApplication::installKDEPropertyMap() installed = true; /** * If you are adding a widget that was missing please - * make sure to also add it to KConfigDialogManager's retrieveSettings() + * make sure to also add it to TDEConfigDialogManager's retrieveSettings() * function. * Thanks. */ @@ -2785,7 +2785,7 @@ void TDEApplication::invokeMailer(const TQString &_to, const TQString &_cc, cons const TQString & /*messageFile TODO*/, const TQStringList &attachURLs, const TQCString& startup_id ) { - KConfig config("emaildefaults"); + TDEConfig config("emaildefaults"); config.setGroup("Defaults"); TQString group = config.readEntry("Profile","Default"); @@ -2821,7 +2821,7 @@ void TDEApplication::invokeMailer(const TQString &_to, const TQString &_cc, cons if (config.readBoolEntry("TerminalClient", false)) { - KConfigGroup confGroup( TDEGlobal::config(), "General" ); + TDEConfigGroup confGroup( TDEGlobal::config(), "General" ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole"); command = preferredTerminal + " -e " + command; } @@ -3351,8 +3351,8 @@ bool TDEApplication::authorize(const TQString &genericAction) if (!d->actionRestrictions) return true; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "KDE Action Restrictions" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE Action Restrictions" ); return config->readBoolEntry(genericAction, true); } @@ -3370,15 +3370,15 @@ bool TDEApplication::authorizeControlModule(const TQString &menuId) { if (menuId.isEmpty() || kde_kiosk_exception) return true; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); return config->readBoolEntry(menuId, true); } TQStringList TDEApplication::authorizeControlModules(const TQStringList &menuIds) { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "TDE Control Module Restrictions" ); TQStringList result; for(TQStringList::ConstIterator it = menuIds.begin(); it != menuIds.end(); ++it) @@ -3426,8 +3426,8 @@ void TDEApplication::initUrlActionRestrictions() d->urlActionRestrictions.append( new TDEApplicationPrivate::URLActionRule ("redirect", TQString::null, TQString::null, TQString::null, "=", TQString::null, TQString::null, true)); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "KDE URL Restrictions" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE URL Restrictions" ); int count = config->readNumEntry("rule_count"); TQString keyFormat = TQString("rule_%1"); for(int i = 1; i <= count; i++) diff --git a/tdecore/kapplication.h b/tdecore/kapplication.h index f472e3351..c1b8a4ecc 100644 --- a/tdecore/kapplication.h +++ b/tdecore/kapplication.h @@ -25,7 +25,7 @@ #include "tdeversion.h" #include "tdelibs_export.h" -class KConfig; +class TDEConfig; class KCharsets; class DCOPClient; class DCOPObject; @@ -63,7 +63,7 @@ class TDEApplicationPrivate; * * @li It controls the event queue (see TQApplication ). * @li It provides the application with KDE resources such as -* accelerators, common menu entries, a KConfig object. session +* accelerators, common menu entries, a TDEConfig object. session * management events, help invocation etc. * @li Installs a signal handler for the SIGCHLD signal in order to * avoid zombie children. If you want to catch this signal yourself or @@ -283,10 +283,10 @@ public: * Returns the application session config object. * * @return A pointer to the application's instance specific - * KConfig object. - * @see KConfig + * TDEConfig object. + * @see TDEConfig */ - KConfig* sessionConfig(); + TDEConfig* sessionConfig(); /** * Is the application restored from the session manager? @@ -1296,7 +1296,7 @@ private slots: private: TQString sessionConfigName() const; - KConfig* pSessionConfig; //instance specific application config object + TDEConfig* pSessionConfig; //instance specific application config object static DCOPClient *s_DCOPClient; // app specific application communication client static bool s_dcopClientNeedsPostInit; TQString aCaption; // the name for the window title @@ -1380,7 +1380,7 @@ public: * @internal * Raw access for use by TDM. */ - static TQPalette createApplicationPalette( KConfig *config, int contrast ); + static TQPalette createApplicationPalette( TDEConfig *config, int contrast ); /** * Installs a handler for the SIGPIPE signal. It is thrown when you write to @@ -1494,7 +1494,7 @@ signals: manipulate the UI in that slot, it is blocked by the session manager. - Use the sessionConfig() KConfig object to store all your + Use the sessionConfig() TDEConfig object to store all your instance specific data. Do not do any closing at this point! The user may still select diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index a732bf266..4c8a405cb 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -572,7 +572,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const TQString dir; { - KConfigGroupSaver cfgsav( TDEGlobal::config(), "i18n" ); + TDEConfigGroupSaver cfgsav( TDEGlobal::config(), "i18n" ); dir = TDEGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps")); } diff --git a/tdecore/kcheckaccelerators.cpp b/tdecore/kcheckaccelerators.cpp index c245f9435..69cd06dee 100644 --- a/tdecore/kcheckaccelerators.cpp +++ b/tdecore/kcheckaccelerators.cpp @@ -80,7 +80,7 @@ KCheckAccelerators::KCheckAccelerators( TQObject* parent ) : TQObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0) { parent->installEventFilter( this ); - KConfigGroupSaver saver( TDEGlobal::config(), "Development" ); + TDEConfigGroupSaver saver( TDEGlobal::config(), "Development" ); TQString sKey = TDEGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace(); if( !sKey.isEmpty() ) { KShortcut cuts( sKey ); diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index e6d763b79..f7812a713 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -107,7 +107,7 @@ TDEClipboardSynchronizer::TDEClipboardSynchronizer( TQObject *parent, const char { s_self = this; - KConfigGroup config( TDEGlobal::config(), "General" ); + TDEConfigGroup config( TDEGlobal::config(), "General" ); s_sync = config.readBoolEntry( "SynchronizeClipboardAndSelection", s_sync); s_reverse_sync = config.readBoolEntry( "ClipboardSetSelection", s_reverse_sync ); diff --git a/tdecore/kconfig.cpp b/tdecore/kconfig.cpp index b8ac9d2a1..26459cdde 100644 --- a/tdecore/kconfig.cpp +++ b/tdecore/kconfig.cpp @@ -41,9 +41,9 @@ #include "kstaticdeleter.h" #include <tqtimer.h> -KConfig::KConfig( const TQString& fileName, +TDEConfig::TDEConfig( const TQString& fileName, bool bReadOnly, bool bUseKderc, const char *resType ) - : KConfigBase(), bGroupImmutable(false), bFileImmutable(false), + : TDEConfigBase(), bGroupImmutable(false), bFileImmutable(false), bForceGlobal(false) { // set the object's read-only status. @@ -52,7 +52,7 @@ KConfig::KConfig( const TQString& fileName, // for right now we will hardcode that we are using the INI // back end driver. In the future this should be converted over to // a object factory of some sorts. - KConfigINIBackEnd *aBackEnd = new KConfigINIBackEnd(this, + TDEConfigINIBackEnd *aBackEnd = new TDEConfigINIBackEnd(this, fileName, resType, bUseKderc); @@ -75,7 +75,7 @@ KConfig::KConfig( const TQString& fileName, reparseConfiguration(); } -KConfig::KConfig(KConfigBackEnd *aBackEnd, bool bReadOnly) +TDEConfig::TDEConfig(TDEConfigBackEnd *aBackEnd, bool bReadOnly) : bGroupImmutable(false), bFileImmutable(false), bForceGlobal(false) { @@ -84,19 +84,19 @@ KConfig::KConfig(KConfigBackEnd *aBackEnd, bool bReadOnly) reparseConfiguration(); } -KConfig::~KConfig() +TDEConfig::~TDEConfig() { sync(); delete backEnd; } -void KConfig::rollback(bool bDeep) +void TDEConfig::rollback(bool bDeep) { - KConfigBase::rollback(bDeep); + TDEConfigBase::rollback(bDeep); if (!bDeep) - return; // object's bDeep flag is set in KConfigBase method + return; // object's bDeep flag is set in TDEConfigBase method // clear any dirty flags that entries might have set for (KEntryMapIterator aIt = aEntryMap.begin(); @@ -104,7 +104,7 @@ void KConfig::rollback(bool bDeep) (*aIt).bDirty = false; } -TQStringList KConfig::groupList() const +TQStringList TDEConfig::groupList() const { TQStringList retList; @@ -138,7 +138,7 @@ TQStringList KConfig::groupList() const return retList; } -TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const +TQMap<TQString, TQString> TDEConfig::entryMap(const TQString &pGroup) const { TQCString pGroup_utf = pGroup.utf8(); KEntryKey groupKey( pGroup_utf, 0 ); @@ -158,7 +158,7 @@ TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const return tmpMap; } -void KConfig::reparseConfiguration() +void TDEConfig::reparseConfiguration() { // Don't lose pending changes if (!isReadOnly() && backEnd && bDirty) @@ -175,7 +175,7 @@ void KConfig::reparseConfiguration() bFileImmutable = bReadOnly; } -KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const +KEntryMap TDEConfig::internalEntryMap(const TQString &pGroup) const { TQCString pGroup_utf = pGroup.utf8(); KEntry aEntry; @@ -199,7 +199,7 @@ KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const return tmpEntryMap; } -void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup) +void TDEConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup) { if (bFileImmutable && !_key.bDefault) return; @@ -235,7 +235,7 @@ void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGro } } -KEntry KConfig::lookupData(const KEntryKey &_key) const +KEntry TDEConfig::lookupData(const KEntryKey &_key) const { KEntryMapConstIterator aIt = aEntryMap.find(_key); if (aIt != aEntryMap.end()) @@ -251,7 +251,7 @@ KEntry KConfig::lookupData(const KEntryKey &_key) const } } -bool KConfig::internalHasGroup(const TQCString &group) const +bool TDEConfig::internalHasGroup(const TQCString &group) const { KEntryKey groupKey( group, 0); @@ -272,19 +272,19 @@ bool KConfig::internalHasGroup(const TQCString &group) const return false; } -void KConfig::setFileWriteMode(int mode) +void TDEConfig::setFileWriteMode(int mode) { backEnd->setFileWriteMode(mode); } -KLockFile::Ptr KConfig::lockFile(bool bGlobal) +KLockFile::Ptr TDEConfig::lockFile(bool bGlobal) { - KConfigINIBackEnd *aBackEnd = dynamic_cast<KConfigINIBackEnd*>(backEnd); + TDEConfigINIBackEnd *aBackEnd = dynamic_cast<TDEConfigINIBackEnd*>(backEnd); if (!aBackEnd) return 0; return aBackEnd->lockFile(bGlobal); } -void KConfig::checkUpdate(const TQString &id, const TQString &updateFile) +void TDEConfig::checkUpdate(const TQString &id, const TQString &updateFile) { TQString oldGroup = group(); setGroup("$Version"); @@ -300,10 +300,10 @@ void KConfig::checkUpdate(const TQString &id, const TQString &updateFile) setGroup(oldGroup); } -KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const +TDEConfig* TDEConfig::copyTo(const TQString &file, TDEConfig *config) const { if (!config) - config = new KConfig(TQString::null, false, false); + config = new TDEConfig(TQString::null, false, false); config->backEnd->changeFileName(file, "config", false); config->setReadOnly(false); config->bFileImmutable = false; @@ -325,8 +325,8 @@ KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const return config; } -void KConfig::virtual_hook( int id, void* data ) -{ KConfigBase::virtual_hook( id, data ); } +void TDEConfig::virtual_hook( int id, void* data ) +{ TDEConfigBase::virtual_hook( id, data ); } static KStaticDeleter< TQValueList<KSharedConfig*> > sd; TQValueList<KSharedConfig*> *KSharedConfig::s_list = 0; @@ -348,7 +348,7 @@ KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool read } KSharedConfig::KSharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals) - : KConfig(fileName, readonly, usekdeglobals) + : TDEConfig(fileName, readonly, usekdeglobals) { if (!s_list) { diff --git a/tdecore/kconfig.h b/tdecore/kconfig.h index 63e7be591..c5084c109 100644 --- a/tdecore/kconfig.h +++ b/tdecore/kconfig.h @@ -29,7 +29,7 @@ class TQTimer; #include "kconfigbase.h" #include "klockfile.h" -class KConfigPrivate; +class TDEConfigPrivate; /** * Access KDE Configuration entries. @@ -37,17 +37,17 @@ class KConfigPrivate; * This class implements KDE's default configuration system. * * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org> -* @see TDEGlobal::config(), KConfigBase, KSimpleConfig +* @see TDEGlobal::config(), TDEConfigBase, KSimpleConfig * @short KDE Configuration Management class */ -class TDECORE_EXPORT KConfig : public KConfigBase +class TDECORE_EXPORT TDEConfig : public TDEConfigBase { Q_OBJECT public: /** - * Constructs a KConfig object. + * Constructs a TDEConfig object. * * @param fileName A file to parse in addition to the * system-wide file(s). If it is not provided, only global @@ -59,18 +59,18 @@ public: * @param bUseKDEGlobals Toggle reading the global KDE configuration file. * @param resType the place to look in (config, data, etc) See KStandardDirs. */ - KConfig( const TQString& fileName = TQString::null, + TDEConfig( const TQString& fileName = TQString::null, bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config"); - KConfig(KConfigBackEnd *backEnd, bool bReadOnly = false); + TDEConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false); /** - * Destructs the KConfig object. + * Destructs the TDEConfig object. * * Writes back any dirty configuration entries, and destroys * dynamically created objects. */ - virtual ~KConfig(); + virtual ~TDEConfig(); /** * Clears all entries out of the @p dirtyEntryMap, so the @@ -82,7 +82,7 @@ public: * false, but the dirty entries remain in the dirty entry * map. * - * @see KConfigBase::rollback + * @see TDEConfigBase::rollback */ virtual void rollback(bool bDeep = true); @@ -162,15 +162,15 @@ public: * @param config optional config object to reuse * @since 3.2 */ - KConfig* copyTo(const TQString &file, KConfig *config=0) const; + TDEConfig* copyTo(const TQString &file, TDEConfig *config=0) const; /** * Returns a lock file object for the configuration file or 0 if * the backend does not support locking. * @param bGlobal if true, return the lock file for the global config file * - * NOTE: KConfig::sync() requires a lock on both the normal and global - * config file. When calling KConfig::sync() while having a lock on the + * NOTE: TDEConfig::sync() requires a lock on both the normal and global + * config file. When calling TDEConfig::sync() while having a lock on the * global config file, the normal config file MUST be locked AS WELL and the * normal config file MUST be locked BEFORE the global config file! * Otherwise there is a risk of deadlock. @@ -247,12 +247,12 @@ private: * @internal * copy-construction and assignment are not allowed */ - KConfig( const KConfig& ); + TDEConfig( const TDEConfig& ); /** * @internal * copy-construction and assignment are not allowed */ - KConfig& operator= ( const KConfig& rConfig ); + TDEConfig& operator= ( const TDEConfig& rConfig ); private: bool bGroupImmutable : 1; // Current group is immutable. @@ -261,16 +261,16 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - KConfigPrivate *d; + TDEConfigPrivate *d; }; /** - * KConfig variant using shared memory + * TDEConfig variant using shared memory * * KSharedConfig provides a reference counted, shared memory variant - * of KConfig. + * of TDEConfig. */ -class TDECORE_EXPORT KSharedConfig : public KConfig, public KShared +class TDECORE_EXPORT KSharedConfig : public TDEConfig, public KShared { friend class TQValueList<KSharedConfig*>; public: diff --git a/tdecore/kconfig_compiler/README.dox b/tdecore/kconfig_compiler/README.dox index 36d9f988b..76dbc04c2 100644 --- a/tdecore/kconfig_compiler/README.dox +++ b/tdecore/kconfig_compiler/README.dox @@ -4,7 +4,7 @@ kconfig_compiler generates C++ source code from an XML file containing information about configuration options (.kcfg) and a file that provides the code generation options (.kcfgc) The generated class is based on -KConfigSkeleton and provides an API for the application to access its +TDEConfigSkeleton and provides an API for the application to access its configuration data. <h2>XML description of the configuration options</h2> @@ -96,9 +96,9 @@ The following options are read from the kcfgc file: <tr> <td><b>Inherits</b></td> <td>string</td> - <td>KConfigSkeleton</td> + <td>TDEConfigSkeleton</td> <td>Class the generated class inherits from. This class must inherit - KConfigSkeleton.</td> + TDEConfigSkeleton.</td> </tr> <tr> <td><b>Visibility</b></td> @@ -144,7 +144,7 @@ The following options are read from the kcfgc file: <td><b>ItemAccessors</b></td> <td>bool</td> <td>false</td> - <td>Generate accessor functions for the KConfigSkeletonItem objects + <td>Generate accessor functions for the TDEConfigSkeletonItem objects corresponding to the configuration options. If <b>SetUserTexts</b> is set, <b>ItemAccessors</b> also has to be set.</td> </tr> diff --git a/tdecore/kconfig_compiler/example/autoexample.cpp b/tdecore/kconfig_compiler/example/autoexample.cpp index ec71dea71..53e02f68d 100644 --- a/tdecore/kconfig_compiler/example/autoexample.cpp +++ b/tdecore/kconfig_compiler/example/autoexample.cpp @@ -48,7 +48,7 @@ int main( int argc, char **argv ) ExamplePrefsBase configSkeleton( "dummy1", "dummy2" ); configSkeleton.readConfig(); - KConfigDialog *dialog = new KConfigDialog( 0, "settings", &configSkeleton ); + TDEConfigDialog *dialog = new TDEConfigDialog( 0, "settings", &configSkeleton ); GeneralBase *general = new GeneralBase( 0 ); dialog->addPage( general, i18n("General"), "General", "" ); diff --git a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc b/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc index 829ec2e29..a9ac98dc7 100644 --- a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc +++ b/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc @@ -3,7 +3,7 @@ ClassName=ExamplePrefsBase # # Singleton=false # -# Inherits=KConfigSkeleton +# Inherits=TDEConfigSkeleton # # IncludeFiles=libtdepim/kpimprefs.h # diff --git a/tdecore/kconfig_compiler/kcfg.xsd b/tdecore/kconfig_compiler/kcfg.xsd index 97f716d62..9eb18a068 100644 --- a/tdecore/kconfig_compiler/kcfg.xsd +++ b/tdecore/kconfig_compiler/kcfg.xsd @@ -29,7 +29,7 @@ <xsd:annotation> <xsd:documentation> - A Schema for KDE's KConfigXT XML format. It is similar to the DTD + A Schema for KDE's TDEConfigXT XML format. It is similar to the DTD found at: http://www.kde.org/standards/kcfg/1.0/kcfg.dtd diff --git a/tdecore/kconfig_compiler/kconfig_compiler.cpp b/tdecore/kconfig_compiler/kconfig_compiler.cpp index 51175c528..b8839f677 100644 --- a/tdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/tdecore/kconfig_compiler/kconfig_compiler.cpp @@ -706,7 +706,7 @@ static TQString itemDeclaration(const CfgEntry *e) TQString fCap = e->name(); fCap[0] = fCap[0].upper(); - return " KConfigSkeleton::Item"+itemType( e->type() ) + + return " TDEConfigSkeleton::Item"+itemType( e->type() ) + " *item" + fCap + ( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString()) + ";\n"; @@ -754,7 +754,7 @@ static TQString itemPath(const CfgEntry *e) TQString newItem( const TQString &type, const TQString &name, const TQString &key, const TQString &defaultValue, const TQString ¶m = TQString()) { - TQString t = "new KConfigSkeleton::Item" + itemType( type ) + + TQString t = "new TDEConfigSkeleton::Item" + itemType( type ) + "( currentGroup(), " + key + ", " + varPath( name ) + param; if ( type == "Enum" ) t += ", values" + name; if ( !defaultValue.isEmpty() ) { @@ -953,7 +953,7 @@ TQString indent(TQString text, int spaces) int main( int argc, char **argv ) { TDEAboutData aboutData( "kconfig_compiler", I18N_NOOP("TDE .kcfg compiler"), "0.3", - I18N_NOOP("KConfig Compiler") , TDEAboutData::License_LGPL ); + I18N_NOOP("TDEConfig Compiler") , TDEAboutData::License_LGPL ); aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); aboutData.addAuthor( "Waldo Bastian", 0, "bastian@kde.org" ); aboutData.addAuthor( "Zack Rusin", 0, "zack@kde.org" ); @@ -1093,7 +1093,7 @@ int main( int argc, char **argv ) } } - if ( inherits.isEmpty() ) inherits = "KConfigSkeleton"; + if ( inherits.isEmpty() ) inherits = "TDEConfigSkeleton"; if ( className.isEmpty() ) { kdError() << "Class name missing" << endl; @@ -1330,7 +1330,7 @@ int main( int argc, char **argv ) h << " static" << endl; h << " void writeConfig()" << endl; h << " {" << endl; - h << " static_cast<KConfigSkeleton*>(self())->writeConfig();" << endl; + h << " static_cast<TDEConfigSkeleton*>(self())->writeConfig();" << endl; h << " }" << endl; } @@ -1455,7 +1455,7 @@ int main( int argc, char **argv ) } cpp << endl << " // items" << endl; for( e = entries.first(); e; e = entries.next() ) { - cpp << " KConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e ); + cpp << " TDEConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e ); if (!e->param().isEmpty() ) cpp << TQString("[%1]").arg( e->paramMax()+1 ); cpp << ";" << endl; } @@ -1553,13 +1553,13 @@ int main( int argc, char **argv ) cpp << e->code() << endl; } if ( e->type() == "Enum" ) { - cpp << " TQValueList<KConfigSkeleton::ItemEnum::Choice> values" + cpp << " TQValueList<TDEConfigSkeleton::ItemEnum::Choice> values" << e->name() << ";" << endl; TQValueList<CfgEntry::Choice> choices = e->choices(); TQValueList<CfgEntry::Choice>::ConstIterator it; for( it = choices.begin(); it != choices.end(); ++it ) { cpp << " {" << endl; - cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl; + cpp << " TDEConfigSkeleton::ItemEnum::Choice choice;" << endl; cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl; if ( setUserTexts ) { if ( !(*it).label.isEmpty() ) @@ -1670,7 +1670,7 @@ int main( int argc, char **argv ) if ( itemAccessors ) { cpp << endl; - cpp << "KConfigSkeleton::Item" << itemType( e->type() ) << " *" + cpp << "TDEConfigSkeleton::Item" << itemType( e->type() ) << " *" << getFunction( n, className ) << "Item("; if (!e->param().isEmpty()) { cpp << " " << cppType(e->paramType()) << " i "; diff --git a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp index 2f8e7eee3..143838908 100644 --- a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp +++ b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp @@ -1,5 +1,5 @@ /* - Tests for KConfig Compiler + Tests for TDEConfig Compiler Copyright (c) 2005 by Duncan Mac-Vicar <duncan@kde.org> @@ -21,8 +21,8 @@ using namespace KUnitTest; -KUNITTEST_MODULE( kunittest_kconfigcompiler_test, "KConfigXT") -KUNITTEST_MODULE_REGISTER_TESTER( KConfigCompiler_Test ) +KUNITTEST_MODULE( kunittest_kconfigcompiler_test, "TDEConfigXT") +KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigCompiler_Test ) typedef const char * CompilerTestSet[]; @@ -50,12 +50,12 @@ static CompilerTestSet willFailCases = }; -void KConfigCompiler_Test::allTests() +void TDEConfigCompiler_Test::allTests() { testExpectedOutput(); } -void KConfigCompiler_Test::testExpectedOutput() +void TDEConfigCompiler_Test::testExpectedOutput() { uint i = 0; // Known to pass test cases @@ -74,7 +74,7 @@ void KConfigCompiler_Test::testExpectedOutput() } } -void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail) +void TDEConfigCompiler_Test::performCompare(const TQString &fileName, bool fail) { TQFile file(fileName); TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref")); diff --git a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h index 36b33cd47..1eba78b97 100644 --- a/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h +++ b/tdecore/kconfig_compiler/tests/kconfigcompiler_test.h @@ -1,5 +1,5 @@ /* - Tests for KConfig Compiler + Tests for TDEConfig Compiler Copyright (c) 2005 by Duncan Mac-Vicar <duncan@kde.org> @@ -21,7 +21,7 @@ class TQString; // change to SlotTester when it works -class KConfigCompiler_Test : public KUnitTest::Tester +class TDEConfigCompiler_Test : public KUnitTest::Tester { public: void allTests(); diff --git a/tdecore/kconfig_compiler/tests/myprefs.h b/tdecore/kconfig_compiler/tests/myprefs.h index ebef89c08..020dc6bfa 100644 --- a/tdecore/kconfig_compiler/tests/myprefs.h +++ b/tdecore/kconfig_compiler/tests/myprefs.h @@ -1,7 +1,7 @@ #include <kconfigskeleton.h> -class MyPrefs : public KConfigSkeleton +class MyPrefs : public TDEConfigSkeleton { public: - MyPrefs( const TQString &a ) : KConfigSkeleton( a ) {} + MyPrefs( const TQString &a ) : TDEConfigSkeleton( a ) {} }; diff --git a/tdecore/kconfig_compiler/tests/test1.cpp.ref b/tdecore/kconfig_compiler/tests/test1.cpp.ref index b3050921e..d0b6b76f1 100644 --- a/tdecore/kconfig_compiler/tests/test1.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test1.cpp.ref @@ -4,65 +4,65 @@ #include "test1.h" Test1::Test1( const TQString & transport, const TQString & folder ) - : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) , mParamtransport(transport) , mParamfolder(folder) { setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) ); - KConfigSkeleton::ItemBool *itemOneOption; - itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true ); + TDEConfigSkeleton::ItemBool *itemOneOption; + itemOneOption = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true ); addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) ); - KConfigSkeleton::ItemInt *itemAnotherOption; - itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 ); + TDEConfigSkeleton::ItemInt *itemAnotherOption; + itemAnotherOption = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 ); addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) ); - TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption; + TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesListOption; { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "One" ); valuesListOption.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Two" ); valuesListOption.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Three" ); valuesListOption.append( choice ); } - KConfigSkeleton::ItemEnum *itemListOption; - itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One ); + TDEConfigSkeleton::ItemEnum *itemListOption; + itemListOption = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One ); addItem( itemListOption, TQString::fromLatin1( "ListOption" ) ); setCurrentGroup( TQString::fromLatin1( "MyOptions" ) ); - KConfigSkeleton::ItemString *itemMyString; - itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) ); + TDEConfigSkeleton::ItemString *itemMyString; + itemMyString = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) ); addItem( itemMyString, TQString::fromLatin1( "MyString" ) ); - KConfigSkeleton::ItemPath *itemMyPath; - itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") ); + TDEConfigSkeleton::ItemPath *itemMyPath; + itemMyPath = new TDEConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") ); addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) ); - KConfigSkeleton::ItemInt *itemAnotherOption2; - itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 ); + TDEConfigSkeleton::ItemInt *itemAnotherOption2; + itemAnotherOption2 = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 ); addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) ); TQStringList defaultMyStringList; defaultMyStringList.append( TQString::fromUtf8( "up" ) ); defaultMyStringList.append( TQString::fromUtf8( "down" ) ); - KConfigSkeleton::ItemStringList *itemMyStringList; - itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); + TDEConfigSkeleton::ItemStringList *itemMyStringList; + itemMyStringList = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) ); TQStringList defaultMyStringListHidden; defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) ); defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) ); - KConfigSkeleton::ItemStringList *itemMyStringListHidden; - itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden ); + TDEConfigSkeleton::ItemStringList *itemMyStringListHidden; + itemMyStringListHidden = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden ); addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) ); - KConfigSkeleton::ItemInt *itemMyNumber; - itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 ); + TDEConfigSkeleton::ItemInt *itemMyNumber; + itemMyNumber = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 ); addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test1.h.ref b/tdecore/kconfig_compiler/tests/test1.h.ref index cc2d99c69..584dcb7ff 100644 --- a/tdecore/kconfig_compiler/tests/test1.h.ref +++ b/tdecore/kconfig_compiler/tests/test1.h.ref @@ -7,7 +7,7 @@ #include <kdebug.h> #include <tqdir.h> -class Test1 : public KConfigSkeleton +class Test1 : public TDEConfigSkeleton { public: class EnumListOption diff --git a/tdecore/kconfig_compiler/tests/test1.kcfgc b/tdecore/kconfig_compiler/tests/test1.kcfgc index 3b74d7c51..ecab7b851 100644 --- a/tdecore/kconfig_compiler/tests/test1.kcfgc +++ b/tdecore/kconfig_compiler/tests/test1.kcfgc @@ -3,7 +3,7 @@ ClassName=Test1 # # Singleton=false # -# Inherits=KConfigSkeleton +# Inherits=TDEConfigSkeleton # # IncludeFiles=libtdepim/kpimprefs.h # diff --git a/tdecore/kconfig_compiler/tests/test2.cpp.ref b/tdecore/kconfig_compiler/tests/test2.cpp.ref index 2d56f7545..fe7b8af80 100644 --- a/tdecore/kconfig_compiler/tests/test2.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test2.cpp.ref @@ -10,59 +10,59 @@ Test2::Test2( ) { setCurrentGroup( TQString::fromLatin1( "General" ) ); - mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); + mAutoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") ); mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") ); addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) ); - mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 ); + mAutoSaveIntervalItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 ); mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") ); addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) ); - mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true ); + mConfirmItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true ); mConfirmItem->setLabel( i18n("Confirm deletes") ); addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) ); - mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile ); + mArchiveFileItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile ); mArchiveFileItem->setLabel( i18n("Archive File") ); addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) ); - TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination; + TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesDestination; { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "standardDestination" ); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "askDestination" ); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl1" ); choice.label = i18n("Argl1 Label"); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl2" ); choice.whatsThis = i18n("Argl2 Whatsthis"); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl3" ); choice.label = i18n("Argl3 Label"); choice.whatsThis = i18n("Argl3 Whatsthis"); valuesDestination.append( choice ); } - mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination ); + mDestinationItem = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination ); mDestinationItem->setLabel( i18n("New Events/Todos Should") ); addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) ); setCurrentGroup( TQString::fromLatin1( "Views" ) ); - mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 ); + mHourSizeItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 ); mHourSizeItem->setLabel( i18n("Hour Size") ); addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) ); - mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false ); + mSelectionStartsEditorItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false ); mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") ); addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) ); @@ -72,22 +72,22 @@ Test2::Test2( ) defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) ); defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) ); - mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins ); + mSelectedPluginsItem = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins ); mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") ); addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) ); setCurrentGroup( TQString::fromLatin1( "Colors" ) ); - mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) ); + mHighlightColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) ); mHighlightColorItem->setLabel( i18n("Highlight color") ); addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) ); - mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) ); + mAgendaBgColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) ); mAgendaBgColorItem->setLabel( i18n("Agenda view background color") ); addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) ); setCurrentGroup( TQString::fromLatin1( "Fonts" ) ); - mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont ); + mTimeBarFontItem = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont ); mTimeBarFontItem->setLabel( i18n("Time bar") ); addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test3.cpp.ref b/tdecore/kconfig_compiler/tests/test3.cpp.ref index 11fe6b38f..3bd0eb8c9 100644 --- a/tdecore/kconfig_compiler/tests/test3.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test3.cpp.ref @@ -6,20 +6,20 @@ using namespace TestNameSpace; Test3::Test3( ) - : KConfigSkeleton( TQString::fromLatin1( "test3rc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "test3rc" ) ) { setCurrentGroup( TQString::fromLatin1( "General" ) ); - mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); + mAutoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false ); addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) ); setCurrentGroup( TQString::fromLatin1( "Blah" ) ); - mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 ); + mBlubbItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 ); addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) ); - mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) ); + mBlahBlahItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) ); addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) ); - mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword ); + mMyPasswordItem = new TDEConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword ); addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test3.h.ref b/tdecore/kconfig_compiler/tests/test3.h.ref index 75b1b0929..4c35a138a 100644 --- a/tdecore/kconfig_compiler/tests/test3.h.ref +++ b/tdecore/kconfig_compiler/tests/test3.h.ref @@ -8,7 +8,7 @@ namespace TestNameSpace { -class Test3 : public KConfigSkeleton +class Test3 : public TDEConfigSkeleton { public: diff --git a/tdecore/kconfig_compiler/tests/test4.cpp.ref b/tdecore/kconfig_compiler/tests/test4.cpp.ref index 6918a8c8a..c6b29bec2 100644 --- a/tdecore/kconfig_compiler/tests/test4.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test4.cpp.ref @@ -21,54 +21,54 @@ Test4 *Test4::self() const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" }; Test4::Test4( ) - : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) { mSelf = this; setCurrentGroup( TQString::fromLatin1( "Foo" ) ); TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; - KConfigSkeleton::ItemColor *itemColor[4]; - itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); + TDEConfigSkeleton::ItemColor *itemColor[4]; + itemColor[0] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); addItem( itemColor[0], TQString::fromLatin1( "Color0" ) ); - itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); + itemColor[1] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); addItem( itemColor[1], TQString::fromLatin1( "Color1" ) ); - itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); + itemColor[2] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); addItem( itemColor[2], TQString::fromLatin1( "Color2" ) ); - itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); + itemColor[3] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); addItem( itemColor[3], TQString::fromLatin1( "Color3" ) ); - TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction; + TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesMouseAction; { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Encrypt" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Decrypt" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "CrashNBurn" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "PumpNDump" ); valuesMouseAction.append( choice ); } - KConfigSkeleton::ItemEnum *itemMouseAction[3]; - itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); + TDEConfigSkeleton::ItemEnum *itemMouseAction[3]; + itemMouseAction[0] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) ); - itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); + itemMouseAction[1] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) ); - itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); + itemMouseAction[2] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) ); - KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + TDEConfigSkeleton::ItemString *itemFooBar; + itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); - KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); + TDEConfigSkeleton::ItemInt *itemAge; + itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); addItem( itemAge, TQString::fromLatin1( "Age" ) ); diff --git a/tdecore/kconfig_compiler/tests/test4.h.ref b/tdecore/kconfig_compiler/tests/test4.h.ref index d11dd3aee..9457413a1 100644 --- a/tdecore/kconfig_compiler/tests/test4.h.ref +++ b/tdecore/kconfig_compiler/tests/test4.h.ref @@ -6,7 +6,7 @@ #include <kconfigskeleton.h> #include <kdebug.h> -class Test4 : public KConfigSkeleton +class Test4 : public TDEConfigSkeleton { public: class EnumMouseAction @@ -115,7 +115,7 @@ class Test4 : public KConfigSkeleton static void writeConfig() { - static_cast<KConfigSkeleton*>(self())->writeConfig(); + static_cast<TDEConfigSkeleton*>(self())->writeConfig(); } protected: Test4(); diff --git a/tdecore/kconfig_compiler/tests/test5.cpp.ref b/tdecore/kconfig_compiler/tests/test5.cpp.ref index 8373eb3f6..9e295bc0e 100644 --- a/tdecore/kconfig_compiler/tests/test5.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test5.cpp.ref @@ -21,54 +21,54 @@ Test5 *Test5::self() const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" }; Test5::Test5( ) - : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) { mSelf = this; setCurrentGroup( TQString::fromLatin1( "Foo" ) ); TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; - KConfigSkeleton::ItemColor *itemColor[4]; - itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); + TDEConfigSkeleton::ItemColor *itemColor[4]; + itemColor[0] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] ); addItem( itemColor[0], TQString::fromLatin1( "Color0" ) ); - itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); + itemColor[1] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] ); addItem( itemColor[1], TQString::fromLatin1( "Color1" ) ); - itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); + itemColor[2] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] ); addItem( itemColor[2], TQString::fromLatin1( "Color2" ) ); - itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); + itemColor[3] = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] ); addItem( itemColor[3], TQString::fromLatin1( "Color3" ) ); - TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction; + TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesMouseAction; { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Encrypt" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "Decrypt" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "CrashNBurn" ); valuesMouseAction.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "PumpNDump" ); valuesMouseAction.append( choice ); } - KConfigSkeleton::ItemEnum *itemMouseAction[3]; - itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt ); + TDEConfigSkeleton::ItemEnum *itemMouseAction[3]; + itemMouseAction[0] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt ); addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) ); - itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt ); + itemMouseAction[1] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt ); addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) ); - itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump ); + itemMouseAction[2] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump ); addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) ); - KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + TDEConfigSkeleton::ItemString *itemFooBar; + itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); - KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); + TDEConfigSkeleton::ItemInt *itemAge; + itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); addItem( itemAge, TQString::fromLatin1( "Age" ) ); diff --git a/tdecore/kconfig_compiler/tests/test5.h.ref b/tdecore/kconfig_compiler/tests/test5.h.ref index efb9b448a..274da4761 100644 --- a/tdecore/kconfig_compiler/tests/test5.h.ref +++ b/tdecore/kconfig_compiler/tests/test5.h.ref @@ -6,7 +6,7 @@ #include <kconfigskeleton.h> #include <kdebug.h> -class Test5 : public KConfigSkeleton +class Test5 : public TDEConfigSkeleton { public: enum { Encrypt, Decrypt, CrashNBurn, PumpNDump }; @@ -107,7 +107,7 @@ class Test5 : public KConfigSkeleton static void writeConfig() { - static_cast<KConfigSkeleton*>(self())->writeConfig(); + static_cast<TDEConfigSkeleton*>(self())->writeConfig(); } protected: Test5(); diff --git a/tdecore/kconfig_compiler/tests/test6.cpp.ref b/tdecore/kconfig_compiler/tests/test6.cpp.ref index 51b96d4c4..fc19613a9 100644 --- a/tdecore/kconfig_compiler/tests/test6.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test6.cpp.ref @@ -4,22 +4,22 @@ #include "test6.h" Test6::Test6( const TQString & Number ) - : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "test4rc" ) ) , mParamNumber(Number) { setCurrentGroup( TQString::fromLatin1( "Foo" ) ); - KConfigSkeleton::ItemColor *itemColor; - itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); + TDEConfigSkeleton::ItemColor *itemColor; + itemColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); addItem( itemColor, TQString::fromLatin1( "Color" ) ); setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) ); - KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + TDEConfigSkeleton::ItemString *itemFooBar; + itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); - KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); + TDEConfigSkeleton::ItemInt *itemAge; + itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); addItem( itemAge, TQString::fromLatin1( "Age" ) ); diff --git a/tdecore/kconfig_compiler/tests/test6.h.ref b/tdecore/kconfig_compiler/tests/test6.h.ref index 6743d6064..eee776b5a 100644 --- a/tdecore/kconfig_compiler/tests/test6.h.ref +++ b/tdecore/kconfig_compiler/tests/test6.h.ref @@ -6,7 +6,7 @@ #include <kconfigskeleton.h> #include <kdebug.h> -class Test6 : public KConfigSkeleton +class Test6 : public TDEConfigSkeleton { public: diff --git a/tdecore/kconfig_compiler/tests/test7.cpp.ref b/tdecore/kconfig_compiler/tests/test7.cpp.ref index 91a22e036..81f7de10e 100644 --- a/tdecore/kconfig_compiler/tests/test7.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test7.cpp.ref @@ -4,22 +4,22 @@ #include "test7.h" Test7::Test7( int Number ) - : KConfigSkeleton( TQString::fromLatin1( "test7rc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "test7rc" ) ) , mParamNumber(Number) { setCurrentGroup( TQString::fromLatin1( "Foo" ) ); - KConfigSkeleton::ItemColor *itemColor; - itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); + TDEConfigSkeleton::ItemColor *itemColor; + itemColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) ); addItem( itemColor, TQString::fromLatin1( "Color" ) ); setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) ); - KConfigSkeleton::ItemString *itemFooBar; - itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); + TDEConfigSkeleton::ItemString *itemFooBar; + itemFooBar = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar ); addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) ); - KConfigSkeleton::ItemInt *itemAge; - itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); + TDEConfigSkeleton::ItemInt *itemAge; + itemAge = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); addItem( itemAge, TQString::fromLatin1( "Age" ) ); diff --git a/tdecore/kconfig_compiler/tests/test7.h.ref b/tdecore/kconfig_compiler/tests/test7.h.ref index 8f8808da1..fb6dd6c77 100644 --- a/tdecore/kconfig_compiler/tests/test7.h.ref +++ b/tdecore/kconfig_compiler/tests/test7.h.ref @@ -6,7 +6,7 @@ #include <kconfigskeleton.h> #include <kdebug.h> -class Test7 : public KConfigSkeleton +class Test7 : public TDEConfigSkeleton { public: diff --git a/tdecore/kconfig_compiler/tests/test8a.cpp.ref b/tdecore/kconfig_compiler/tests/test8a.cpp.ref index 413e75c9c..c0267452d 100644 --- a/tdecore/kconfig_compiler/tests/test8a.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test8a.cpp.ref @@ -4,15 +4,15 @@ #include "test8a.h" Test8a::Test8a( KSharedConfig::Ptr config ) - : KConfigSkeleton( config ) + : TDEConfigSkeleton( config ) { setCurrentGroup( TQString::fromLatin1( "Group" ) ); - KConfigSkeleton::ItemFont *itemFont; - itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, TDEGlobalSettings::generalFont() ); + TDEConfigSkeleton::ItemFont *itemFont; + itemFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, TDEGlobalSettings::generalFont() ); addItem( itemFont, TQString::fromLatin1( "Font" ) ); - KConfigSkeleton::ItemFont *itemTitleFont; - itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, TDEGlobalSettings::windowTitleFont() ); + TDEConfigSkeleton::ItemFont *itemTitleFont; + itemTitleFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, TDEGlobalSettings::windowTitleFont() ); addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test8a.h.ref b/tdecore/kconfig_compiler/tests/test8a.h.ref index 0ab182a04..747c6dd58 100644 --- a/tdecore/kconfig_compiler/tests/test8a.h.ref +++ b/tdecore/kconfig_compiler/tests/test8a.h.ref @@ -7,7 +7,7 @@ #include <kconfigskeleton.h> #include <kdebug.h> -class Test8a : public KConfigSkeleton +class Test8a : public TDEConfigSkeleton { public: diff --git a/tdecore/kconfig_compiler/tests/test8b.cpp.ref b/tdecore/kconfig_compiler/tests/test8b.cpp.ref index e29e3c4e7..6a0a16b48 100644 --- a/tdecore/kconfig_compiler/tests/test8b.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test8b.cpp.ref @@ -24,17 +24,17 @@ Test8b::Test8b( ) mSelf = this; setCurrentGroup( TQString::fromLatin1( "Group8b1" ) ); - KConfigSkeleton::ItemUInt *itemSomething; - itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 ); + TDEConfigSkeleton::ItemUInt *itemSomething; + itemSomething = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 ); addItem( itemSomething, TQString::fromLatin1( "Something" ) ); setCurrentGroup( TQString::fromLatin1( "Group8b2" ) ); - KConfigSkeleton::ItemBool *itemFooBoo; - itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false ); + TDEConfigSkeleton::ItemBool *itemFooBoo; + itemFooBoo = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false ); addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) ); - KConfigSkeleton::ItemUInt *itemPort; - itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 ); + TDEConfigSkeleton::ItemUInt *itemPort; + itemPort = new TDEConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 ); addItem( itemPort, TQString::fromLatin1( "Port" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test8b.h.ref b/tdecore/kconfig_compiler/tests/test8b.h.ref index 4ca0d5c7f..052746bfb 100644 --- a/tdecore/kconfig_compiler/tests/test8b.h.ref +++ b/tdecore/kconfig_compiler/tests/test8b.h.ref @@ -75,7 +75,7 @@ class Test8b : public Test8a static void writeConfig() { - static_cast<KConfigSkeleton*>(self())->writeConfig(); + static_cast<TDEConfigSkeleton*>(self())->writeConfig(); } protected: Test8b(); diff --git a/tdecore/kconfig_compiler/tests/test9.cpp.ref b/tdecore/kconfig_compiler/tests/test9.cpp.ref index c5d57e4d1..f6765fb42 100644 --- a/tdecore/kconfig_compiler/tests/test9.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test9.cpp.ref @@ -4,7 +4,7 @@ #include "test9.h" Test9::Test9( const TQString & transport, const TQString & folder ) - : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "examplerc" ) ) , mParamtransport(transport) , mParamfolder(folder) { @@ -14,18 +14,18 @@ Test9::Test9( const TQString & transport, const TQString & folder ) defaultMyStringList.append( TQString::fromUtf8( "up" ) ); defaultMyStringList.append( TQString::fromUtf8( "down" ) ); - KConfigSkeleton::ItemStringList *itemMyStringList; - itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); + TDEConfigSkeleton::ItemStringList *itemMyStringList; + itemMyStringList = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList ); addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) ); TQStringList defaultMyPathList; defaultMyPathList.append( TQString::fromUtf8( "/home" ) ); defaultMyPathList.append( TQString::fromUtf8( "~" ) ); - KConfigSkeleton::ItemPathList *itemMyPathList; - itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList ); + TDEConfigSkeleton::ItemPathList *itemMyPathList; + itemMyPathList = new TDEConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList ); addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) ); - KConfigSkeleton::ItemPathList *itemMyPathsList2; - itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() ); + TDEConfigSkeleton::ItemPathList *itemMyPathsList2; + itemMyPathsList2 = new TDEConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() ); addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) ); } diff --git a/tdecore/kconfig_compiler/tests/test9.h.ref b/tdecore/kconfig_compiler/tests/test9.h.ref index 66a629b48..99d94c957 100644 --- a/tdecore/kconfig_compiler/tests/test9.h.ref +++ b/tdecore/kconfig_compiler/tests/test9.h.ref @@ -7,7 +7,7 @@ #include <kdebug.h> #include <tqdir.h> -class Test9 : public KConfigSkeleton +class Test9 : public TDEConfigSkeleton { public: diff --git a/tdecore/kconfig_compiler/tests/test9.kcfgc b/tdecore/kconfig_compiler/tests/test9.kcfgc index 8f124fc25..0a88064b6 100644 --- a/tdecore/kconfig_compiler/tests/test9.kcfgc +++ b/tdecore/kconfig_compiler/tests/test9.kcfgc @@ -3,7 +3,7 @@ ClassName=Test9 # # Singleton=false # -# Inherits=KConfigSkeleton +# Inherits=TDEConfigSkeleton # # IncludeFiles=libtdepim/kpimprefs.h # diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref b/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref index 7b5f55f03..3aad5b689 100644 --- a/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref +++ b/tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref @@ -33,17 +33,17 @@ class TestDPointerPrivate TQFont timeBarFont; // items - KConfigSkeleton::ItemBool *autoSaveItem; - KConfigSkeleton::ItemInt *autoSaveIntervalItem; - KConfigSkeleton::ItemBool *confirmItem; - KConfigSkeleton::ItemString *archiveFileItem; - KConfigSkeleton::ItemEnum *destinationItem; - KConfigSkeleton::ItemInt *hourSizeItem; - KConfigSkeleton::ItemBool *selectionStartsEditorItem; - KConfigSkeleton::ItemStringList *selectedPluginsItem; - KConfigSkeleton::ItemColor *highlightColorItem; - KConfigSkeleton::ItemColor *agendaBgColorItem; - KConfigSkeleton::ItemFont *timeBarFontItem; + TDEConfigSkeleton::ItemBool *autoSaveItem; + TDEConfigSkeleton::ItemInt *autoSaveIntervalItem; + TDEConfigSkeleton::ItemBool *confirmItem; + TDEConfigSkeleton::ItemString *archiveFileItem; + TDEConfigSkeleton::ItemEnum *destinationItem; + TDEConfigSkeleton::ItemInt *hourSizeItem; + TDEConfigSkeleton::ItemBool *selectionStartsEditorItem; + TDEConfigSkeleton::ItemStringList *selectedPluginsItem; + TDEConfigSkeleton::ItemColor *highlightColorItem; + TDEConfigSkeleton::ItemColor *agendaBgColorItem; + TDEConfigSkeleton::ItemFont *timeBarFontItem; }; TestDPointer *TestDPointer::mSelf = 0; @@ -60,65 +60,65 @@ TestDPointer *TestDPointer::self() } TestDPointer::TestDPointer( ) - : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) ) + : TDEConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) ) { d = new TestDPointerPrivate; mSelf = this; setCurrentGroup( TQString::fromLatin1( "General" ) ); - d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false ); + d->autoSaveItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false ); d->autoSaveItem->setLabel( i18n("Enable automatic saving of calendar") ); d->autoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") ); addItem( d->autoSaveItem, TQString::fromLatin1( "AutoSave" ) ); - d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 ); + d->autoSaveIntervalItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 ); d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") ); addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) ); - d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true ); + d->confirmItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true ); d->confirmItem->setLabel( i18n("Confirm deletes") ); addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) ); - d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile ); + d->archiveFileItem = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile ); d->archiveFileItem->setLabel( i18n("Archive File") ); addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) ); - TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination; + TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesDestination; { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "standardDestination" ); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "askDestination" ); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl1" ); choice.label = i18n("Argl1 Label"); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl2" ); choice.whatsThis = i18n("Argl2 Whatsthis"); valuesDestination.append( choice ); } { - KConfigSkeleton::ItemEnum::Choice choice; + TDEConfigSkeleton::ItemEnum::Choice choice; choice.name = TQString::fromLatin1( "argl3" ); choice.label = i18n("Argl3 Label"); choice.whatsThis = i18n("Argl3 Whatsthis"); valuesDestination.append( choice ); } - d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination ); + d->destinationItem = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination ); d->destinationItem->setLabel( i18n("New Events/Todos Should") ); addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) ); setCurrentGroup( TQString::fromLatin1( "Views" ) ); - d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 ); + d->hourSizeItem = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 ); d->hourSizeItem->setLabel( i18n("Hour Size") ); addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) ); - d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false ); + d->selectionStartsEditorItem = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false ); d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") ); addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) ); @@ -128,22 +128,22 @@ TestDPointer::TestDPointer( ) defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) ); defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) ); - d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins ); + d->selectedPluginsItem = new TDEConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins ); d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") ); addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) ); setCurrentGroup( TQString::fromLatin1( "Colors" ) ); - d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) ); + d->highlightColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) ); d->highlightColorItem->setLabel( i18n("Highlight color") ); addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) ); - d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) ); + d->agendaBgColorItem = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) ); d->agendaBgColorItem->setLabel( i18n("Agenda view background color") ); addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) ); setCurrentGroup( TQString::fromLatin1( "Fonts" ) ); - d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont ); + d->timeBarFontItem = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont ); d->timeBarFontItem->setLabel( i18n("Time bar") ); addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) ); } @@ -160,7 +160,7 @@ bool TestDPointer::autoSave() } -KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem() +TDEConfigSkeleton::ItemBool *TestDPointer::autoSaveItem() { return d->autoSaveItem; } @@ -177,7 +177,7 @@ int TestDPointer::autoSaveInterval() } -KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem() +TDEConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem() { return d->autoSaveIntervalItem; } @@ -194,7 +194,7 @@ bool TestDPointer::confirm() } -KConfigSkeleton::ItemBool *TestDPointer::confirmItem() +TDEConfigSkeleton::ItemBool *TestDPointer::confirmItem() { return d->confirmItem; } @@ -211,7 +211,7 @@ TQString TestDPointer::archiveFile() } -KConfigSkeleton::ItemString *TestDPointer::archiveFileItem() +TDEConfigSkeleton::ItemString *TestDPointer::archiveFileItem() { return d->archiveFileItem; } @@ -228,7 +228,7 @@ int TestDPointer::destination() } -KConfigSkeleton::ItemEnum *TestDPointer::destinationItem() +TDEConfigSkeleton::ItemEnum *TestDPointer::destinationItem() { return d->destinationItem; } @@ -245,7 +245,7 @@ int TestDPointer::hourSize() } -KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem() +TDEConfigSkeleton::ItemInt *TestDPointer::hourSizeItem() { return d->hourSizeItem; } @@ -262,7 +262,7 @@ bool TestDPointer::selectionStartsEditor() } -KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem() +TDEConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem() { return d->selectionStartsEditorItem; } @@ -279,7 +279,7 @@ TQStringList TestDPointer::selectedPlugins() } -KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem() +TDEConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem() { return d->selectedPluginsItem; } @@ -296,7 +296,7 @@ TQColor TestDPointer::highlightColor() } -KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem() +TDEConfigSkeleton::ItemColor *TestDPointer::highlightColorItem() { return d->highlightColorItem; } @@ -313,7 +313,7 @@ TQColor TestDPointer::agendaBgColor() } -KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem() +TDEConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem() { return d->agendaBgColorItem; } @@ -330,7 +330,7 @@ TQFont TestDPointer::timeBarFont() } -KConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem() +TDEConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem() { return d->timeBarFontItem; } diff --git a/tdecore/kconfig_compiler/tests/test_dpointer.h.ref b/tdecore/kconfig_compiler/tests/test_dpointer.h.ref index 81f281e83..d9b7b94c1 100644 --- a/tdecore/kconfig_compiler/tests/test_dpointer.h.ref +++ b/tdecore/kconfig_compiler/tests/test_dpointer.h.ref @@ -8,7 +8,7 @@ class TestDPointerPrivate; -class TestDPointer : public KConfigSkeleton +class TestDPointer : public TDEConfigSkeleton { public: class EnumDestination @@ -210,7 +210,7 @@ class TestDPointer : public KConfigSkeleton static void writeConfig() { - static_cast<KConfigSkeleton*>(self())->writeConfig(); + static_cast<TDEConfigSkeleton*>(self())->writeConfig(); } protected: TestDPointer(); diff --git a/tdecore/kconfigbackend.cpp b/tdecore/kconfigbackend.cpp index 4f217597b..178198509 100644 --- a/tdecore/kconfigbackend.cpp +++ b/tdecore/kconfigbackend.cpp @@ -231,7 +231,7 @@ static TQCString decodeKey(const char* key) return newKey; } -class KConfigBackEnd::KConfigBackEndPrivate +class TDEConfigBackEnd::TDEConfigBackEndPrivate { public: TQDateTime localLastModified; @@ -240,7 +240,7 @@ public: KLockFile::Ptr globalLockFile; }; -void KConfigBackEnd::changeFileName(const TQString &_fileName, +void TDEConfigBackEnd::changeFileName(const TQString &_fileName, const char * _resType, bool _useKDEGlobals) { @@ -270,7 +270,7 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName, d->globalLockFile = 0; } -KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal) +KLockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal) { if (bGlobal) { @@ -297,35 +297,35 @@ KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal) return 0; } -KConfigBackEnd::KConfigBackEnd(KConfigBase *_config, +TDEConfigBackEnd::TDEConfigBackEnd(TDEConfigBase *_config, const TQString &_fileName, const char * _resType, bool _useKDEGlobals) - : pConfig(_config), bFileImmutable(false), mConfigState(KConfigBase::NoAccess), mFileMode(-1) + : pConfig(_config), bFileImmutable(false), mConfigState(TDEConfigBase::NoAccess), mFileMode(-1) { - d = new KConfigBackEndPrivate; + d = new TDEConfigBackEndPrivate; changeFileName(_fileName, _resType, _useKDEGlobals); } -KConfigBackEnd::~KConfigBackEnd() +TDEConfigBackEnd::~TDEConfigBackEnd() { delete d; } -void KConfigBackEnd::setFileWriteMode(int mode) +void TDEConfigBackEnd::setFileWriteMode(int mode) { mFileMode = mode; } -bool KConfigINIBackEnd::parseConfigFiles() +bool TDEConfigINIBackEnd::parseConfigFiles() { // Check if we can write to the local file. - mConfigState = KConfigBase::ReadOnly; + mConfigState = TDEConfigBase::ReadOnly; if (!mLocalFileName.isEmpty() && !pConfig->isReadOnly()) { if (checkAccess(mLocalFileName, W_OK)) { - mConfigState = KConfigBase::ReadWrite; + mConfigState = TDEConfigBase::ReadWrite; } else { @@ -337,7 +337,7 @@ bool KConfigINIBackEnd::parseConfigFiles() if (checkAccess(mLocalFileName, W_OK)) { - mConfigState = KConfigBase::ReadWrite; + mConfigState = TDEConfigBase::ReadWrite; } } TQFileInfo info(mLocalFileName); @@ -426,7 +426,7 @@ bool KConfigINIBackEnd::parseConfigFiles() } } if (bFileImmutable) - mConfigState = KConfigBase::ReadOnly; + mConfigState = TDEConfigBase::ReadOnly; return true; } @@ -447,7 +447,7 @@ extern "C" { extern bool kde_kiosk_exception; -void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile, +void TDEConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile, KEntryMap *pWriteBackMap, bool bGlobal, bool bDefault) { @@ -732,11 +732,11 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1()); } // Look up translations using KLocale // https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde - // This calls KLocale up to 10 times for each config file (and each KConfig has up to 4 files) + // This calls KLocale up to 10 times for each config file (and each TDEConfig has up to 4 files) // so I'll see how much of a performance hit it is // it also only acts on the last group in a file // Ideas: only translate most important fields, only translate "Desktop Entry" files, - // do translation per KConfig not per single file + // do translation per TDEConfig not per single file if (!pWriteBackMap) { TQFile file("file.txt"); if (foundGettextDomain) { @@ -772,7 +772,7 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1()); #endif } -void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) { +void TDEConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) { KEntryKey entryKey = KEntryKey(currentGroup, key); KEntry entry = pConfig->lookupData(entryKey); if (TQString(entry.mValue) != "") { @@ -788,7 +788,7 @@ void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQ } } -void KConfigINIBackEnd::sync(bool bMerge) +void TDEConfigINIBackEnd::sync(bool bMerge) { // write-sync is only necessary if there are dirty entries if (!pConfig->isDirty()) @@ -978,7 +978,7 @@ static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultG } // for loop } -bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, +bool TDEConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, TQFile *mergeFile) { bool bEntriesLeft = false; @@ -1032,7 +1032,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, } /* antlarr: KDE 4.0: make the first parameter "const TQString &" */ -bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal, +bool TDEConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal, bool bMerge) { // is the config object read-only? @@ -1135,7 +1135,7 @@ bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal, return bEntriesLeft; } -void KConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap) +void TDEConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap) { bool firstEntry = true; @@ -1146,13 +1146,13 @@ void KConfigINIBackEnd::writeEntries(FILE *pStream, const KEntryMap &aTempMap) ::writeEntries(pStream, aTempMap, false, firstEntry, localeString); } -void KConfigBackEnd::virtual_hook( int, void* ) +void TDEConfigBackEnd::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KConfigINIBackEnd::virtual_hook( int id, void* data ) -{ KConfigBackEnd::virtual_hook( id, data ); } +void TDEConfigINIBackEnd::virtual_hook( int id, void* data ) +{ TDEConfigBackEnd::virtual_hook( id, data ); } -bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser) +bool TDEConfigBackEnd::checkConfigFilesWritable(bool warnUser) { // WARNING: Do NOT use the event loop as it may not exist at this time. bool allWritable = true; diff --git a/tdecore/kconfigbackend.h b/tdecore/kconfigbackend.h index 03655ab2d..87ddfa3bb 100644 --- a/tdecore/kconfigbackend.h +++ b/tdecore/kconfigbackend.h @@ -29,7 +29,7 @@ #include "tdelibs_export.h" class TQFile; -class KConfigBackEndPrivate; +class TDEConfigBackEndPrivate; /** * Abstract base class for KDE configuration file loading/saving. @@ -45,9 +45,9 @@ class KConfigBackEndPrivate; * Matthias Kalle Dalheimer <kalle@kde.org> * @short KDE Configuration file loading/saving abstract base class */ -class TDECORE_EXPORT KConfigBackEnd +class TDECORE_EXPORT TDEConfigBackEnd { - friend class KConfig; + friend class TDEConfig; friend class KSharedConfig; public: /** @@ -65,13 +65,13 @@ public: * will be imported into the config object. If false, only * the filename specified will be dealt with. */ - KConfigBackEnd(KConfigBase *_config, const TQString &_fileName, + TDEConfigBackEnd(TDEConfigBase *_config, const TQString &_fileName, const char * _resType, bool _useKDEGlobals); /** * Destructs the configuration backend. */ - virtual ~KConfigBackEnd(); + virtual ~TDEConfigBackEnd(); /** * Parses all configuration files for a configuration object. This @@ -108,9 +108,9 @@ public: /** * Returns the state of the app-config object. * - * @see KConfig::getConfigState + * @see TDEConfig::getConfigState */ - virtual KConfigBase::ConfigState getConfigState() const + virtual TDEConfigBase::ConfigState getConfigState() const { return mConfigState; } /** @@ -162,7 +162,7 @@ private: KDE_DEPRECATED TQString filename() const { return mfileName; } protected: - KConfigBase *pConfig; + TDEConfigBase *pConfig; TQString mfileName; TQCString resType; @@ -171,14 +171,14 @@ protected: TQCString localeString; TQString mLocalFileName; TQString mGlobalFileName; - KConfigBase::ConfigState mConfigState; + TDEConfigBase::ConfigState mConfigState; int mFileMode; protected: virtual void virtual_hook( int id, void* data ); protected: - class KConfigBackEndPrivate; - KConfigBackEndPrivate *d; + class TDEConfigBackEndPrivate; + TDEConfigBackEndPrivate *d; }; @@ -188,7 +188,7 @@ protected: * @author Preston Brown <pbrown@kde.org>, * Matthias Kalle Dalheimer <kalle@kde.org> */ -class TDECORE_EXPORT KConfigINIBackEnd : public KConfigBackEnd +class TDECORE_EXPORT TDEConfigINIBackEnd : public TDEConfigBackEnd { public: @@ -207,14 +207,14 @@ public: * will be imported into the config object. If false, only * the filename specified will be dealt with. */ - KConfigINIBackEnd(KConfigBase *_config, const TQString &_fileName, + TDEConfigINIBackEnd(TDEConfigBase *_config, const TQString &_fileName, const char * _resType, bool _useKDEGlobals = true) - : KConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {} + : TDEConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {} /** * Destructs the configuration backend. */ - virtual ~KConfigINIBackEnd() {} + virtual ~TDEConfigINIBackEnd() {} /** * Parses all INI-style configuration files for a config object. @@ -292,8 +292,8 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KConfigINIBackEndPrivate; - KConfigINIBackEndPrivate *not_d; + class TDEConfigINIBackEndPrivate; + TDEConfigINIBackEndPrivate *not_d; }; #endif diff --git a/tdecore/kconfigbase.cpp b/tdecore/kconfigbase.cpp index e13d07782..e65338c50 100644 --- a/tdecore/kconfigbase.cpp +++ b/tdecore/kconfigbase.cpp @@ -38,28 +38,28 @@ #include "kstandarddirs.h" #include "kstringhandler.h" -class KConfigBase::KConfigBasePrivate +class TDEConfigBase::TDEConfigBasePrivate { public: - KConfigBasePrivate() : readDefaults(false) { }; + TDEConfigBasePrivate() : readDefaults(false) { }; public: bool readDefaults; }; -KConfigBase::KConfigBase() +TDEConfigBase::TDEConfigBase() : backEnd(0L), bDirty(false), bLocaleInitialized(false), bReadOnly(false), bExpand(false), d(0) { setGroup(TQString::null); } -KConfigBase::~KConfigBase() +TDEConfigBase::~TDEConfigBase() { delete d; } -void KConfigBase::setLocale() +void TDEConfigBase::setLocale() { bLocaleInitialized = true; @@ -71,12 +71,12 @@ void KConfigBase::setLocale() backEnd->setLocaleString(aLocaleString); } -TQString KConfigBase::locale() const +TQString TDEConfigBase::locale() const { return TQString::fromUtf8(aLocaleString); } -void KConfigBase::setGroup( const TQString& group ) +void TDEConfigBase::setGroup( const TQString& group ) { if ( group.isEmpty() ) mGroup = "<default>"; @@ -84,12 +84,12 @@ void KConfigBase::setGroup( const TQString& group ) mGroup = group.utf8(); } -void KConfigBase::setGroup( const char *pGroup ) +void TDEConfigBase::setGroup( const char *pGroup ) { setGroup(TQCString(pGroup)); } -void KConfigBase::setGroup( const TQCString &group ) +void TDEConfigBase::setGroup( const TQCString &group ) { if ( group.isEmpty() ) mGroup = "<default>"; @@ -97,21 +97,21 @@ void KConfigBase::setGroup( const TQCString &group ) mGroup = group; } -TQString KConfigBase::group() const { +TQString TDEConfigBase::group() const { return TQString::fromUtf8(mGroup); } -void KConfigBase::setDesktopGroup() +void TDEConfigBase::setDesktopGroup() { mGroup = "Desktop Entry"; } -bool KConfigBase::hasKey(const TQString &key) const +bool TDEConfigBase::hasKey(const TQString &key) const { return hasKey(key.utf8().data()); } -bool KConfigBase::hasKey(const char *pKey) const +bool TDEConfigBase::hasKey(const char *pKey) const { KEntryKey aEntryKey(mGroup, 0); aEntryKey.c_key = pKey; @@ -131,7 +131,7 @@ bool KConfigBase::hasKey(const char *pKey) const return !entry.mValue.isNull(); } -bool KConfigBase::hasTranslatedKey(const char* pKey) const +bool TDEConfigBase::hasTranslatedKey(const char* pKey) const { KEntryKey aEntryKey(mGroup, 0); aEntryKey.c_key = pKey; @@ -149,27 +149,27 @@ bool KConfigBase::hasTranslatedKey(const char* pKey) const return false; } -bool KConfigBase::hasGroup(const TQString &group) const +bool TDEConfigBase::hasGroup(const TQString &group) const { return internalHasGroup( group.utf8()); } -bool KConfigBase::hasGroup(const char *_pGroup) const +bool TDEConfigBase::hasGroup(const char *_pGroup) const { return internalHasGroup( TQCString(_pGroup)); } -bool KConfigBase::hasGroup(const TQCString &_pGroup) const +bool TDEConfigBase::hasGroup(const TQCString &_pGroup) const { return internalHasGroup( _pGroup); } -bool KConfigBase::isImmutable() const +bool TDEConfigBase::isImmutable() const { return (getConfigState() != ReadWrite); } -bool KConfigBase::groupIsImmutable(const TQString &group) const +bool TDEConfigBase::groupIsImmutable(const TQString &group) const { if (getConfigState() != ReadWrite) return true; @@ -179,7 +179,7 @@ bool KConfigBase::groupIsImmutable(const TQString &group) const return entry.bImmutable; } -bool KConfigBase::entryIsImmutable(const TQString &key) const +bool TDEConfigBase::entryIsImmutable(const TQString &key) const { if (getConfigState() != ReadWrite) return true; @@ -201,14 +201,14 @@ bool KConfigBase::entryIsImmutable(const TQString &key) const } -TQString KConfigBase::readEntryUntranslated( const TQString& pKey, +TQString TDEConfigBase::readEntryUntranslated( const TQString& pKey, const TQString& aDefault ) const { - return KConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault); + return TDEConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault); } -TQString KConfigBase::readEntryUntranslated( const char *pKey, +TQString TDEConfigBase::readEntryUntranslated( const char *pKey, const TQString& aDefault ) const { TQCString result = readEntryUtf8(pKey); @@ -218,22 +218,22 @@ TQString KConfigBase::readEntryUntranslated( const char *pKey, } -TQString KConfigBase::readEntry( const TQString& pKey, +TQString TDEConfigBase::readEntry( const TQString& pKey, const TQString& aDefault ) const { - return KConfigBase::readEntry(pKey.utf8().data(), aDefault); + return TDEConfigBase::readEntry(pKey.utf8().data(), aDefault); } -TQString KConfigBase::readEntry( const char *pKey, +TQString TDEConfigBase::readEntry( const char *pKey, const TQString& aDefault ) const { // we need to access _locale instead of the method locale() // because calling locale() will create a locale object if it - // doesn't exist, which requires KConfig, which will create a infinite + // doesn't exist, which requires TDEConfig, which will create a infinite // loop, and nobody likes those. if (!bLocaleInitialized && TDEGlobal::_locale) { // get around const'ness. - KConfigBase *that = const_cast<KConfigBase *>(this); + TDEConfigBase *that = const_cast<TDEConfigBase *>(this); that->setLocale(); } @@ -335,7 +335,7 @@ TQString KConfigBase::readEntry( const char *pKey, return aValue; } -TQCString KConfigBase::readEntryUtf8( const char *pKey) const +TQCString TDEConfigBase::readEntryUtf8( const char *pKey) const { // We don't try the localized key KEntryKey entryKey(mGroup, 0); @@ -350,13 +350,13 @@ TQCString KConfigBase::readEntryUtf8( const char *pKey) const return aEntryData.mValue; } -TQVariant KConfigBase::readPropertyEntry( const TQString& pKey, +TQVariant TDEConfigBase::readPropertyEntry( const TQString& pKey, TQVariant::Type type ) const { return readPropertyEntry(pKey.utf8().data(), type); } -TQVariant KConfigBase::readPropertyEntry( const char *pKey, +TQVariant TDEConfigBase::readPropertyEntry( const char *pKey, TQVariant::Type type ) const { TQVariant va; @@ -365,13 +365,13 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey, return readPropertyEntry(pKey, va); } -TQVariant KConfigBase::readPropertyEntry( const TQString& pKey, +TQVariant TDEConfigBase::readPropertyEntry( const TQString& pKey, const TQVariant &aDefault ) const { return readPropertyEntry(pKey.utf8().data(), aDefault); } -TQVariant KConfigBase::readPropertyEntry( const char *pKey, +TQVariant TDEConfigBase::readPropertyEntry( const char *pKey, const TQVariant &aDefault ) const { if ( !hasKey( pKey ) ) return aDefault; @@ -474,13 +474,13 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey, return TQVariant(); } -int KConfigBase::readListEntry( const TQString& pKey, +int TDEConfigBase::readListEntry( const TQString& pKey, TQStrList &list, char sep ) const { return readListEntry(pKey.utf8().data(), list, sep); } -int KConfigBase::readListEntry( const char *pKey, +int TDEConfigBase::readListEntry( const char *pKey, TQStrList &list, char sep ) const { if( !hasKey( pKey ) ) @@ -519,12 +519,12 @@ int KConfigBase::readListEntry( const char *pKey, return list.count(); } -TQStringList KConfigBase::readListEntry( const TQString& pKey, char sep ) const +TQStringList TDEConfigBase::readListEntry( const TQString& pKey, char sep ) const { return readListEntry(pKey.utf8().data(), sep); } -TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const +TQStringList TDEConfigBase::readListEntry( const char *pKey, char sep ) const { static const TQString& emptyString = TDEGlobal::staticQString(""); @@ -565,7 +565,7 @@ TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const return list; } -TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault, +TQStringList TDEConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault, char sep ) const { if ( !hasKey( pKey ) ) @@ -574,12 +574,12 @@ TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& a return readListEntry( pKey, sep ); } -TQValueList<int> KConfigBase::readIntListEntry( const TQString& pKey ) const +TQValueList<int> TDEConfigBase::readIntListEntry( const TQString& pKey ) const { return readIntListEntry(pKey.utf8().data()); } -TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const +TQValueList<int> TDEConfigBase::readIntListEntry( const char *pKey ) const { TQStringList strlist = readListEntry(pKey); TQValueList<int> list; @@ -592,12 +592,12 @@ TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const return list; } -TQString KConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const +TQString TDEConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const { return readPathEntry(pKey.utf8().data(), pDefault); } -TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const +TQString TDEConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const { const bool bExpandSave = bExpand; bExpand = true; @@ -606,12 +606,12 @@ TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault return aValue; } -TQStringList KConfigBase::readPathListEntry( const TQString& pKey, char sep ) const +TQStringList TDEConfigBase::readPathListEntry( const TQString& pKey, char sep ) const { return readPathListEntry(pKey.utf8().data(), sep); } -TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const +TQStringList TDEConfigBase::readPathListEntry( const char *pKey, char sep ) const { const bool bExpandSave = bExpand; bExpand = true; @@ -620,12 +620,12 @@ TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const return aValue; } -int KConfigBase::readNumEntry( const TQString& pKey, int nDefault) const +int TDEConfigBase::readNumEntry( const TQString& pKey, int nDefault) const { return readNumEntry(pKey.utf8().data(), nDefault); } -int KConfigBase::readNumEntry( const char *pKey, int nDefault) const +int TDEConfigBase::readNumEntry( const char *pKey, int nDefault) const { TQCString aValue = readEntryUtf8( pKey ); if( aValue.isNull() ) @@ -641,12 +641,12 @@ int KConfigBase::readNumEntry( const char *pKey, int nDefault) const } -unsigned int KConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const +unsigned int TDEConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const { return readUnsignedNumEntry(pKey.utf8().data(), nDefault); } -unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const +unsigned int TDEConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const { TQCString aValue = readEntryUtf8( pKey ); if( aValue.isNull() ) @@ -660,12 +660,12 @@ unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int n } -long KConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const +long TDEConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const { return readLongNumEntry(pKey.utf8().data(), nDefault); } -long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const +long TDEConfigBase::readLongNumEntry( const char *pKey, long nDefault) const { TQCString aValue = readEntryUtf8( pKey ); if( aValue.isNull() ) @@ -679,12 +679,12 @@ long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const } -unsigned long KConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const +unsigned long TDEConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const { return readUnsignedLongNumEntry(pKey.utf8().data(), nDefault); } -unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const +unsigned long TDEConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const { TQCString aValue = readEntryUtf8( pKey ); if( aValue.isNull() ) @@ -697,12 +697,12 @@ unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned } } -TQ_INT64 KConfigBase::readNum64Entry( const TQString& pKey, TQ_INT64 nDefault) const +TQ_INT64 TDEConfigBase::readNum64Entry( const TQString& pKey, TQ_INT64 nDefault) const { return readNum64Entry(pKey.utf8().data(), nDefault); } -TQ_INT64 KConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const +TQ_INT64 TDEConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const { // Note that TQCString::toLongLong() is missing, we muse use a TQString instead. TQString aValue = readEntry( pKey ); @@ -717,12 +717,12 @@ TQ_INT64 KConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const } -TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault) const +TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault) const { return readUnsignedNum64Entry(pKey.utf8().data(), nDefault); } -TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault) const +TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault) const { // Note that TQCString::toULongLong() is missing, we muse use a TQString instead. TQString aValue = readEntry( pKey ); @@ -736,12 +736,12 @@ TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefa } } -double KConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const +double TDEConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const { return readDoubleNumEntry(pKey.utf8().data(), nDefault); } -double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const +double TDEConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const { TQCString aValue = readEntryUtf8( pKey ); if( aValue.isNull() ) @@ -755,12 +755,12 @@ double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const } -bool KConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const +bool TDEConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const { return readBoolEntry(pKey.utf8().data(), bDefault); } -bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const +bool TDEConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const { TQCString aValue = readEntryUtf8( pKey ); @@ -782,12 +782,12 @@ bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const } } -TQFont KConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const +TQFont TDEConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const { return readFontEntry(pKey.utf8().data(), pDefault); } -TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const +TQFont TDEConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const { TQFont aRetFont; @@ -879,12 +879,12 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co } -TQRect KConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const +TQRect TDEConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const { return readRectEntry(pKey.utf8().data(), pDefault); } -TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const +TQRect TDEConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const { TQCString aValue = readEntryUtf8(pKey); @@ -903,13 +903,13 @@ TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) co } -TQPoint KConfigBase::readPointEntry( const TQString& pKey, +TQPoint TDEConfigBase::readPointEntry( const TQString& pKey, const TQPoint* pDefault ) const { return readPointEntry(pKey.utf8().data(), pDefault); } -TQPoint KConfigBase::readPointEntry( const char *pKey, +TQPoint TDEConfigBase::readPointEntry( const char *pKey, const TQPoint* pDefault ) const { TQCString aValue = readEntryUtf8(pKey); @@ -928,13 +928,13 @@ TQPoint KConfigBase::readPointEntry( const char *pKey, return TQPoint(); } -TQSize KConfigBase::readSizeEntry( const TQString& pKey, +TQSize TDEConfigBase::readSizeEntry( const TQString& pKey, const TQSize* pDefault ) const { return readSizeEntry(pKey.utf8().data(), pDefault); } -TQSize KConfigBase::readSizeEntry( const char *pKey, +TQSize TDEConfigBase::readSizeEntry( const char *pKey, const TQSize* pDefault ) const { TQCString aValue = readEntryUtf8(pKey); @@ -954,13 +954,13 @@ TQSize KConfigBase::readSizeEntry( const char *pKey, } -TQColor KConfigBase::readColorEntry( const TQString& pKey, +TQColor TDEConfigBase::readColorEntry( const TQString& pKey, const TQColor* pDefault ) const { return readColorEntry(pKey.utf8().data(), pDefault); } -TQColor KConfigBase::readColorEntry( const char *pKey, +TQColor TDEConfigBase::readColorEntry( const char *pKey, const TQColor* pDefault ) const { TQColor aRetColor; @@ -1019,14 +1019,14 @@ TQColor KConfigBase::readColorEntry( const char *pKey, } -TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey, +TQDateTime TDEConfigBase::readDateTimeEntry( const TQString& pKey, const TQDateTime* pDefault ) const { return readDateTimeEntry(pKey.utf8().data(), pDefault); } // ### currentDateTime() as fallback ? (Harri) -TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, +TQDateTime TDEConfigBase::readDateTimeEntry( const char *pKey, const TQDateTime* pDefault ) const { if( !hasKey( pKey ) ) @@ -1051,7 +1051,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, return TQDateTime::currentDateTime(); } -void KConfigBase::writeEntry( const TQString& pKey, const TQString& value, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQString& value, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1059,7 +1059,7 @@ void KConfigBase::writeEntry( const TQString& pKey, const TQString& value, writeEntry(pKey.utf8().data(), value, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQString& value, +void TDEConfigBase::writeEntry( const char *pKey, const TQString& value, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1067,13 +1067,13 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value, writeEntry(pKey, value, bPersistent, bGlobal, bNLS, false); } -void KConfigBase::writeEntry( const char *pKey, const TQString& value, +void TDEConfigBase::writeEntry( const char *pKey, const TQString& value, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand ) { - // the KConfig object is dirty now + // the TDEConfig object is dirty now // set this before any IO takes place so that if any derivative // classes do caching, they won't try and flush the cache out // from under us before we read. A race condition is still @@ -1100,7 +1100,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQString& value, putData(entryKey, aEntryData, true); } -void KConfigBase::writePathEntry( const TQString& pKey, const TQString & path, +void TDEConfigBase::writePathEntry( const TQString& pKey, const TQString & path, bool bPersistent, bool bGlobal, bool bNLS) { @@ -1171,21 +1171,21 @@ static TQString translatePath( TQString path ) return path; } -void KConfigBase::writePathEntry( const char *pKey, const TQString & path, +void TDEConfigBase::writePathEntry( const char *pKey, const TQString & path, bool bPersistent, bool bGlobal, bool bNLS) { writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, true); } -void KConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list, +void TDEConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { writePathEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS); } -void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list, +void TDEConfigBase::writePathEntry ( const char *pKey, const TQStringList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1204,18 +1204,18 @@ void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list, writeEntry( pKey, new_list, sep, bPersistent, bGlobal, bNLS, true ); } -void KConfigBase::deleteEntry( const TQString& pKey, +void TDEConfigBase::deleteEntry( const TQString& pKey, bool bNLS, bool bGlobal) { deleteEntry(pKey.utf8().data(), bNLS, bGlobal); } -void KConfigBase::deleteEntry( const char *pKey, +void TDEConfigBase::deleteEntry( const char *pKey, bool bNLS, bool bGlobal) { - // the KConfig object is dirty now + // the TDEConfig object is dirty now // set this before any IO takes place so that if any derivative // classes do caching, they won't try and flush the cache out // from under us before we read. A race condition is still @@ -1237,7 +1237,7 @@ void KConfigBase::deleteEntry( const char *pKey, putData(entryKey, aEntryData, true); } -bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal ) +bool TDEConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal ) { KEntryMap aEntryMap = internalEntryMap(group); @@ -1268,14 +1268,14 @@ bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal ) return true; } -void KConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop, +void TDEConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), prop, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop, +void TDEConfigBase::writeEntry ( const char *pKey, const TQVariant &prop, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1391,14 +1391,14 @@ void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop, Q_ASSERT( 0 ); } -void KConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list, +void TDEConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, +void TDEConfigBase::writeEntry ( const char *pKey, const TQStrList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1431,21 +1431,21 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list, +void TDEConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, +void TDEConfigBase::writeEntry ( const char *pKey, const TQStringList &list, char sep , bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey, list, sep, bPersistent, bGlobal, bNLS, false); } -void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, +void TDEConfigBase::writeEntry ( const char *pKey, const TQStringList &list, char sep, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand ) { @@ -1475,13 +1475,13 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand ); } -void KConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list, +void TDEConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), list, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list, +void TDEConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list, bool bPersistent, bool bGlobal, bool bNLS ) { TQStringList strlist; @@ -1491,14 +1491,14 @@ void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list, writeEntry(pKey, strlist, ',', bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const TQString& pKey, int nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, int nValue, +void TDEConfigBase::writeEntry( const char *pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1506,14 +1506,14 @@ void KConfigBase::writeEntry( const char *pKey, int nValue, } -void KConfigBase::writeEntry( const TQString& pKey, unsigned int nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, unsigned int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, unsigned int nValue, +void TDEConfigBase::writeEntry( const char *pKey, unsigned int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1521,14 +1521,14 @@ void KConfigBase::writeEntry( const char *pKey, unsigned int nValue, } -void KConfigBase::writeEntry( const TQString& pKey, long nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, long nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, long nValue, +void TDEConfigBase::writeEntry( const char *pKey, long nValue, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1536,28 +1536,28 @@ void KConfigBase::writeEntry( const char *pKey, long nValue, } -void KConfigBase::writeEntry( const TQString& pKey, unsigned long nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, unsigned long nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, unsigned long nValue, +void TDEConfigBase::writeEntry( const char *pKey, unsigned long nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const TQString& pKey, TQ_INT64 nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, TQ_INT64 nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue, +void TDEConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1565,21 +1565,21 @@ void KConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue, } -void KConfigBase::writeEntry( const TQString& pKey, TQ_UINT64 nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, TQ_UINT64 nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, TQ_UINT64 nValue, +void TDEConfigBase::writeEntry( const char *pKey, TQ_UINT64 nValue, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const TQString& pKey, double nValue, +void TDEConfigBase::writeEntry( const TQString& pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS ) @@ -1588,7 +1588,7 @@ void KConfigBase::writeEntry( const TQString& pKey, double nValue, bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const char *pKey, double nValue, +void TDEConfigBase::writeEntry( const char *pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS ) @@ -1598,7 +1598,7 @@ void KConfigBase::writeEntry( const char *pKey, double nValue, } -void KConfigBase::writeEntry( const TQString& pKey, bool bValue, +void TDEConfigBase::writeEntry( const TQString& pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1606,7 +1606,7 @@ void KConfigBase::writeEntry( const TQString& pKey, bool bValue, writeEntry(pKey.utf8().data(), bValue, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, bool bValue, +void TDEConfigBase::writeEntry( const char *pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1622,14 +1622,14 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue, } -void KConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), rFont, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont, +void TDEConfigBase::writeEntry( const char *pKey, const TQFont& rFont, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1637,14 +1637,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont, } -void KConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), rRect, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect, +void TDEConfigBase::writeEntry( const char *pKey, const TQRect& rRect, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1659,14 +1659,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect, } -void KConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), rPoint, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint, +void TDEConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1679,14 +1679,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint, } -void KConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), rSize, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize, +void TDEConfigBase::writeEntry( const char *pKey, const TQSize& rSize, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1698,7 +1698,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize, writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1706,7 +1706,7 @@ void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor, writeEntry( pKey.utf8().data(), rColor, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor, +void TDEConfigBase::writeEntry( const char *pKey, const TQColor& rColor, bool bPersistent, bool bGlobal, bool bNLS ) @@ -1720,14 +1720,14 @@ void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor, writeEntry( pKey, aValue, bPersistent, bGlobal, bNLS ); } -void KConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime, +void TDEConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime, bool bPersistent, bool bGlobal, bool bNLS ) { writeEntry(pKey.utf8().data(), rDateTime, bPersistent, bGlobal, bNLS); } -void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime, +void TDEConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime, bool bPersistent, bool bGlobal, bool bNLS ) { @@ -1748,7 +1748,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime, writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS ); } -void KConfigBase::parseConfigFiles() +void TDEConfigBase::parseConfigFiles() { if (!bLocaleInitialized && TDEGlobal::_locale) { setLocale(); @@ -1760,7 +1760,7 @@ void KConfigBase::parseConfigFiles() } } -void KConfigBase::sync() +void TDEConfigBase::sync() { if (isReadOnly()) return; @@ -1771,35 +1771,35 @@ void KConfigBase::sync() rollback(); } -KConfigBase::ConfigState KConfigBase::getConfigState() const { +TDEConfigBase::ConfigState TDEConfigBase::getConfigState() const { if (backEnd) return backEnd->getConfigState(); return ReadOnly; } -void KConfigBase::rollback( bool /*bDeep = true*/ ) +void TDEConfigBase::rollback( bool /*bDeep = true*/ ) { bDirty = false; } -void KConfigBase::setReadDefaults(bool b) +void TDEConfigBase::setReadDefaults(bool b) { if (!d) { if (!b) return; - d = new KConfigBasePrivate(); + d = new TDEConfigBasePrivate(); } d->readDefaults = b; } -bool KConfigBase::readDefaults() const +bool TDEConfigBase::readDefaults() const { return (d && d->readDefaults); } -void KConfigBase::revertToDefault(const TQString &key) +void TDEConfigBase::revertToDefault(const TQString &key) { setDirty(true); @@ -1826,7 +1826,7 @@ void KConfigBase::revertToDefault(const TQString &key) putData(aEntryKey, entry, true); // Revert } -bool KConfigBase::hasDefault(const TQString &key) const +bool TDEConfigBase::hasDefault(const TQString &key) const { KEntryKey aEntryKey(mGroup, key.utf8()); aEntryKey.bDefault = true; @@ -1851,7 +1851,7 @@ bool KConfigBase::hasDefault(const TQString &key) const -KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group) +TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const TQString &group) { mMaster = master; backEnd = mMaster->backEnd; // Needed for getConfigState() @@ -1864,7 +1864,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group) setReadDefaults(mMaster->readDefaults()); } -KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group) +TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const TQCString &group) { mMaster = master; backEnd = mMaster->backEnd; // Needed for getConfigState() @@ -1877,7 +1877,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group) setReadDefaults(mMaster->readDefaults()); } -KConfigGroup::KConfigGroup(KConfigBase *master, const char * group) +TDEConfigGroup::TDEConfigGroup(TDEConfigBase *master, const char * group) { mMaster = master; backEnd = mMaster->backEnd; // Needed for getConfigState() @@ -1890,43 +1890,43 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const char * group) setReadDefaults(mMaster->readDefaults()); } -void KConfigGroup::deleteGroup(bool bGlobal) +void TDEConfigGroup::deleteGroup(bool bGlobal) { - mMaster->deleteGroup(KConfigBase::group(), true, bGlobal); + mMaster->deleteGroup(TDEConfigBase::group(), true, bGlobal); } -bool KConfigGroup::groupIsImmutable() const +bool TDEConfigGroup::groupIsImmutable() const { - return mMaster->groupIsImmutable(KConfigBase::group()); + return mMaster->groupIsImmutable(TDEConfigBase::group()); } -void KConfigGroup::setDirty(bool _bDirty) +void TDEConfigGroup::setDirty(bool _bDirty) { mMaster->setDirty(_bDirty); } -void KConfigGroup::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup) +void TDEConfigGroup::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGroup) { mMaster->putData(_key, _data, _checkGroup); } -KEntry KConfigGroup::lookupData(const KEntryKey &_key) const +KEntry TDEConfigGroup::lookupData(const KEntryKey &_key) const { return mMaster->lookupData(_key); } -void KConfigGroup::sync() +void TDEConfigGroup::sync() { mMaster->sync(); } -void KConfigBase::virtual_hook( int, void* ) +void TDEConfigBase::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } -void KConfigGroup::virtual_hook( int id, void* data ) -{ KConfigBase::virtual_hook( id, data ); } +void TDEConfigGroup::virtual_hook( int id, void* data ) +{ TDEConfigBase::virtual_hook( id, data ); } -bool KConfigBase::checkConfigFilesWritable(bool warnUser) +bool TDEConfigBase::checkConfigFilesWritable(bool warnUser) { if (backEnd) return backEnd->checkConfigFilesWritable(warnUser); diff --git a/tdecore/kconfigbase.h b/tdecore/kconfigbase.h index 1818aadb5..ff02babdd 100644 --- a/tdecore/kconfigbase.h +++ b/tdecore/kconfigbase.h @@ -35,16 +35,16 @@ #include "kconfigdata.h" #include "tdelibs_export.h" -class KConfigBackEnd; -class KConfigBasePrivate; -class KConfigGroup; +class TDEConfigBackEnd; +class TDEConfigBasePrivate; +class TDEConfigGroup; /** * @short KDE Configuration Management abstract base class * * This class forms the base for all %KDE configuration. It is an * abstract base class, meaning that you cannot directly instantiate - * objects of this class. Either use KConfig (for usual %KDE + * objects of this class. Either use TDEConfig (for usual %KDE * configuration) or KSimpleConfig (for special needs as in ksamba), or * even KSharedConfig (stores values in shared memory). * @@ -53,7 +53,7 @@ class KConfigGroup; * entries that do not explicitly specify which group they are in are * in a special group called the default group. * - * If there is a $ character in an entry, KConfigBase tries to expand + * If there is a $ character in an entry, TDEConfigBase tries to expand * environment variable and uses its value instead of its name. You * can avoid this feature by having two consecutive $ characters in * your config file which get expanded to one. @@ -63,29 +63,29 @@ class KConfigGroup; * * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org> * @see TDEGlobal#config() - * @see KConfig + * @see TDEConfig * @see KSimpleConfig * @see KSharedConfig */ -class TDECORE_EXPORT KConfigBase : public TQObject +class TDECORE_EXPORT TDEConfigBase : public TQObject { Q_OBJECT - friend class KConfigBackEnd; - friend class KConfigINIBackEnd; - friend class KConfigGroup; + friend class TDEConfigBackEnd; + friend class TDEConfigINIBackEnd; + friend class TDEConfigGroup; public: /** - * Construct a KConfigBase object. + * Construct a TDEConfigBase object. */ - KConfigBase(); + TDEConfigBase(); /** - * Destructs the KConfigBase object. + * Destructs the TDEConfigBase object. */ - virtual ~KConfigBase(); + virtual ~TDEConfigBase(); /** * Specifies the group in which keys will be read and written. @@ -1670,7 +1670,7 @@ public: /** - * Turns on or off "dollar expansion" (see KConfigBase introduction) + * Turns on or off "dollar expansion" (see TDEConfigBase introduction) * when reading config entries. * Dollar sign expansion is initially OFF. * @@ -1688,13 +1688,13 @@ public: /** * Mark the config object as "clean," i.e. don't write dirty entries * at destruction time. If @p bDeep is false, only the global dirty - * flag of the KConfig object gets cleared. If you then call + * flag of the TDEConfig object gets cleared. If you then call * writeEntry() again, the global dirty flag is set again and all * dirty entries will be written at a subsequent sync() call. * - * Classes that derive from KConfigBase should override this + * Classes that derive from TDEConfigBase should override this * method and implement storage-specific behavior, as well as - * calling the KConfigBase::rollback() explicitly in the initializer. + * calling the TDEConfigBase::rollback() explicitly in the initializer. * * @param bDeep If true, the dirty flags of all entries are cleared, * as well as the global dirty flag. @@ -1901,7 +1901,7 @@ protected: /** * Parses all configuration files for a configuration object. * - * The actual parsing is done by the associated KConfigBackEnd. + * The actual parsing is done by the associated TDEConfigBackEnd. */ virtual void parseConfigFiles(); @@ -1937,7 +1937,7 @@ protected: /** * Inserts a (key/value) pair into the internal storage mechanism of - * the configuration object. Classes that derive from KConfigBase + * the configuration object. Classes that derive from TDEConfigBase * will need to implement this method in a storage-specific manner. * * Do not use this function, the implementation / return type are @@ -1954,7 +1954,7 @@ protected: /** * Looks up an entry in the config object's internal structure. - * Classes that derive from KConfigBase will need to implement this + * Classes that derive from TDEConfigBase will need to implement this * method in a storage-specific manner. * * Do not use this function, the implementation and return type are @@ -1973,7 +1973,7 @@ protected: /** * A back end for loading/saving to disk in a particular format. */ - KConfigBackEnd *backEnd; + TDEConfigBackEnd *backEnd; public: /** * Overloaded public methods: @@ -2008,8 +2008,8 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class KConfigBasePrivate; - KConfigBasePrivate *d; + class TDEConfigBasePrivate; + TDEConfigBasePrivate *d; void writeEntry( const char *pKey, const TQString &rValue, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand ); @@ -2018,14 +2018,14 @@ private: }; -class KConfigGroupSaverPrivate; +class TDEConfigGroupSaverPrivate; /** - * Helper class to facilitate working with KConfig / KSimpleConfig + * Helper class to facilitate working with TDEConfig / KSimpleConfig * groups. * * Careful programmers always set the group of a - * KConfig KSimpleConfig object to the group they want to read from + * TDEConfig KSimpleConfig object to the group they want to read from * and set it back to the old one of afterwards. This is usually * written as: * \code @@ -2039,82 +2039,82 @@ class KConfigGroupSaverPrivate; * \endcode * * In order to facilitate this task, you can use - * KConfigGroupSaver. Simply construct such an object ON THE STACK + * TDEConfigGroupSaver. Simply construct such an object ON THE STACK * when you want to switch to a new group. Then, when the object goes * out of scope, the group will automatically be restored. If you * want to use several different groups within a function or method, - * you can still use KConfigGroupSaver: Simply enclose all work with - * one group (including the creation of the KConfigGroupSaver object) + * you can still use TDEConfigGroupSaver: Simply enclose all work with + * one group (including the creation of the TDEConfigGroupSaver object) * in one block. * * @deprecated This class is deprecated and will be removed in KDE 4. - * KConfigGroup provides similar functionality in a more object oriented + * TDEConfigGroup provides similar functionality in a more object oriented * way. * * @author Matthias Kalle Dalheimer <kalle@kde.org> - * @see KConfigBase, KConfig, KSimpleConfig, KConfigGroup - * @short Helper class for easier use of KConfig/KSimpleConfig groups + * @see TDEConfigBase, TDEConfig, KSimpleConfig, TDEConfigGroup + * @short Helper class for easier use of TDEConfig/KSimpleConfig groups */ -class TDECORE_EXPORT KConfigGroupSaver // KDE4 remove +class TDECORE_EXPORT TDEConfigGroupSaver // KDE4 remove { public: /** - * Constructor. You pass a pointer to the KConfigBase-derived + * Constructor. You pass a pointer to the TDEConfigBase-derived * object you want to work with and a string indicating the _new_ * group. * - * @param config The KConfigBase-derived object this - * KConfigGroupSaver works on. + * @param config The TDEConfigBase-derived object this + * TDEConfigGroupSaver works on. * @param group The new group that the config object should switch to. */ - KConfigGroupSaver( KConfigBase* config, TQString group ) + TDEConfigGroupSaver( TDEConfigBase* config, TQString group ) /* KDE 4 : make the second parameter const TQString & */ : _config(config), _oldgroup(config->group()) { _config->setGroup( group ); } - KConfigGroupSaver( KConfigBase* config, const char *group ) + TDEConfigGroupSaver( TDEConfigBase* config, const char *group ) : _config(config), _oldgroup(config->group()) { _config->setGroup( group ); } - KConfigGroupSaver( KConfigBase* config, const TQCString &group ) + TDEConfigGroupSaver( TDEConfigBase* config, const TQCString &group ) : _config(config), _oldgroup(config->group()) { _config->setGroup( group ); } - ~KConfigGroupSaver() { _config->setGroup( _oldgroup ); } + ~TDEConfigGroupSaver() { _config->setGroup( _oldgroup ); } - KConfigBase* config() { return _config; }; + TDEConfigBase* config() { return _config; }; private: - KConfigBase* _config; + TDEConfigBase* _config; TQString _oldgroup; - KConfigGroupSaver(const KConfigGroupSaver&); - KConfigGroupSaver& operator=(const KConfigGroupSaver&); + TDEConfigGroupSaver(const TDEConfigGroupSaver&); + TDEConfigGroupSaver& operator=(const TDEConfigGroupSaver&); - KConfigGroupSaverPrivate *d; + TDEConfigGroupSaverPrivate *d; }; -class KConfigGroupPrivate; +class TDEConfigGroupPrivate; /** - * A KConfigBase derived class for one specific group in a KConfig object. + * A TDEConfigBase derived class for one specific group in a TDEConfig object. */ -class TDECORE_EXPORT KConfigGroup: public KConfigBase +class TDECORE_EXPORT TDEConfigGroup: public TDEConfigBase { public: /** * Construct a config group corresponding to @p group in @p master. * @p group is the group name encoded in UTF-8. */ - KConfigGroup(KConfigBase *master, const TQCString &group); + TDEConfigGroup(TDEConfigBase *master, const TQCString &group); /** * This is an overloaded constructor provided for convenience. * It behaves essentially like the above function. * * Construct a config group corresponding to @p group in @p master */ - KConfigGroup(KConfigBase *master, const TQString &group); + TDEConfigGroup(TDEConfigBase *master, const TQString &group); /** * This is an overloaded constructor provided for convenience. * It behaves essentially like the above function. @@ -2122,7 +2122,7 @@ public: * Construct a config group corresponding to @p group in @p master * @p group is the group name encoded in UTF-8. */ - KConfigGroup(KConfigBase *master, const char * group); + TDEConfigGroup(TDEConfigBase *master, const char * group); /** * Delete all entries in the entire group @@ -2170,11 +2170,11 @@ private: void getConfigState() { } - KConfigBase *mMaster; + TDEConfigBase *mMaster; protected: virtual void virtual_hook( int id, void* data ); private: - KConfigGroupPrivate* d; + TDEConfigGroupPrivate* d; }; #endif diff --git a/tdecore/kconfigdialogmanager.cpp b/tdecore/kconfigdialogmanager.cpp index 82567ca0b..dfb81853b 100644 --- a/tdecore/kconfigdialogmanager.cpp +++ b/tdecore/kconfigdialogmanager.cpp @@ -37,7 +37,7 @@ #include <assert.h> -class KConfigDialogManager::Private { +class TDEConfigDialogManager::Private { public: Private() : insideGroupBox(false) { } @@ -48,7 +48,7 @@ public: bool insideGroupBox; }; -KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name) +TDEConfigDialogManager::TDEConfigDialogManager(TQWidget *parent, TDEConfigSkeleton *conf, const char *name) : TQObject(parent, name), m_conf(conf), m_dialog(parent) { d = new Private(); @@ -59,12 +59,12 @@ KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *co init(true); } -KConfigDialogManager::~KConfigDialogManager() +TDEConfigDialogManager::~TDEConfigDialogManager() { delete d; } -void KConfigDialogManager::init(bool trackChanges) +void TDEConfigDialogManager::init(bool trackChanges) { if(trackChanges) { @@ -121,12 +121,12 @@ void KConfigDialogManager::init(bool trackChanges) (void) parseChildren(m_dialog, trackChanges); } -void KConfigDialogManager::addWidget(TQWidget *widget) +void TDEConfigDialogManager::addWidget(TQWidget *widget) { (void) parseChildren(widget, true); } -void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *item) +void TDEConfigDialogManager::setupWidget(TQWidget *widget, TDEConfigSkeletonItem *item) { TQVariant minValue = item->minValue(); if (minValue.isValid()) @@ -150,7 +150,7 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it } } -bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges) +bool TDEConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges) { bool valueChanged = false; const TQObjectList listOfChildren = widget->childrenListObject(); @@ -174,7 +174,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang { // This is one of our widgets! TQString configId = widgetName+5; - KConfigSkeletonItem *item = m_conf->findItem(configId); + TDEConfigSkeletonItem *item = m_conf->findItem(configId); if (item) { d->knownWidget.insert(configId, childWidget); @@ -187,7 +187,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang { // If the class name of the widget wasn't in the monitored widgets map, then look for // it again using the super class name. This fixes a problem with using QtRuby/Korundum - // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even + // widgets with TDEConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even // though it was a 'QWidget'. changedIt = changedMap.find(childWidget->metaObject()->superClassName()); } @@ -256,7 +256,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang return valueChanged; } -void KConfigDialogManager::updateWidgets() +void TDEConfigDialogManager::updateWidgets() { bool changed = false; bool bSignalsBlocked = signalsBlocked(); @@ -266,7 +266,7 @@ void KConfigDialogManager::updateWidgets() for( TQDictIterator<TQWidget> it( d->knownWidget ); (widget = it.current()); ++it ) { - KConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); + TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); if (!item) { kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl; @@ -294,14 +294,14 @@ void KConfigDialogManager::updateWidgets() TQTimer::singleShot(0, this, TQT_SIGNAL(widgetModified())); } -void KConfigDialogManager::updateWidgetsDefault() +void TDEConfigDialogManager::updateWidgetsDefault() { bool bUseDefaults = m_conf->useDefaults(true); updateWidgets(); m_conf->useDefaults(bUseDefaults); } -void KConfigDialogManager::updateSettings() +void TDEConfigDialogManager::updateSettings() { bool changed = false; @@ -309,7 +309,7 @@ void KConfigDialogManager::updateSettings() for( TQDictIterator<TQWidget> it( d->knownWidget ); (widget = it.current()); ++it ) { - KConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); + TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); if (!item) { kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl; @@ -330,7 +330,7 @@ void KConfigDialogManager::updateSettings() } } -void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v) +void TDEConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v) { TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w); if (bg) @@ -349,7 +349,7 @@ void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v) propertyMap->setProperty(w, v); } -TQVariant KConfigDialogManager::property(TQWidget *w) +TQVariant TDEConfigDialogManager::property(TQWidget *w) { TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w); if (bg) @@ -362,14 +362,14 @@ TQVariant KConfigDialogManager::property(TQWidget *w) return propertyMap->property(w); } -bool KConfigDialogManager::hasChanged() +bool TDEConfigDialogManager::hasChanged() { TQWidget *widget; for( TQDictIterator<TQWidget> it( d->knownWidget ); (widget = it.current()); ++it ) { - KConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); + TDEConfigSkeletonItem *item = m_conf->findItem(it.currentKey()); if (!item) { kdWarning(178) << "The setting '" << it.currentKey() << "' has disappeared!" << endl; @@ -386,7 +386,7 @@ bool KConfigDialogManager::hasChanged() return false; } -bool KConfigDialogManager::isDefault() +bool TDEConfigDialogManager::isDefault() { bool bUseDefaults = m_conf->useDefaults(true); bool result = !hasChanged(); diff --git a/tdecore/kconfigdialogmanager.h b/tdecore/kconfigdialogmanager.h index cc2238d4c..1b82e9eda 100644 --- a/tdecore/kconfigdialogmanager.h +++ b/tdecore/kconfigdialogmanager.h @@ -25,28 +25,28 @@ #include <tqptrlist.h> #include "tdelibs_export.h" -class KConfigSkeleton; -class KConfigSkeletonItem; +class TDEConfigSkeleton; +class TDEConfigSkeletonItem; class TQWidget; class TQSqlPropertyMap; /** * @short Provides a means of automatically retrieving, - * saving and resetting KConfigSkeleton based settings in a dialog. + * saving and resetting TDEConfigSkeleton based settings in a dialog. * - * The KConfigDialogManager class provides a means of automatically + * The TDEConfigDialogManager class provides a means of automatically * retrieving, saving and resetting basic settings. * It also can emit signals when settings have been changed * (settings were saved) or modified (the user changes a checkbox * from on to off). * * The names of the widgets to be managed have to correspond to the names of the - * configuration entries in the KConfigSkeleton object plus an additional + * configuration entries in the TDEConfigSkeleton object plus an additional * "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be * associated to the configuration entry "MyOption". * - * KConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do - * anything to a widget. Note that KConfigDialogManager doesn't require a + * TDEConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do + * anything to a widget. Note that TDEConfigDialogManager doesn't require a * database, it simply uses the functionality that is built into the * TQSqlPropertyMap class. New widgets can be added to the map using * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any @@ -75,7 +75,7 @@ class TQSqlPropertyMap; * @author Benjamin C Meyer <ben+tdelibs at meyerhome dot net> * @author Waldo Bastian <bastian@kde.org> */ -class TDECORE_EXPORT KConfigDialogManager : public TQObject { +class TDECORE_EXPORT TDEConfigDialogManager : public TQObject { Q_OBJECT @@ -114,12 +114,12 @@ public: * @param conf Object that contains settings * @param name - Object name. */ - KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name=0); + TDEConfigDialogManager(TQWidget *parent, TDEConfigSkeleton *conf, const char *name=0); /** * Destructor. */ - ~KConfigDialogManager(); + ~TDEConfigDialogManager(); /** * Add additional widgets to manage @@ -200,13 +200,13 @@ protected: /** * Setup secondary widget properties */ - void setupWidget(TQWidget *widget, KConfigSkeletonItem *item); + void setupWidget(TQWidget *widget, TDEConfigSkeletonItem *item); protected: /** - * KConfigSkeleton object used to store settings + * TDEConfigSkeleton object used to store settings */ - KConfigSkeleton *m_conf; + TDEConfigSkeleton *m_conf; /** * Dialog being managed @@ -226,7 +226,7 @@ protected: private: class Private; /** - * KConfigDialogManager Private class. + * TDEConfigDialogManager Private class. */ Private *d; diff --git a/tdecore/kconfigskeleton.cpp b/tdecore/kconfigskeleton.cpp index ee873eca2..afc45bb87 100644 --- a/tdecore/kconfigskeleton.cpp +++ b/tdecore/kconfigskeleton.cpp @@ -32,22 +32,22 @@ #include "kconfigskeleton.h" -void KConfigSkeletonItem::readImmutability( KConfig *config ) +void TDEConfigSkeletonItem::readImmutability( TDEConfig *config ) { mIsImmutable = config->entryIsImmutable( mKey ); } -KConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key, TQString &reference, const TQString &defaultValue, Type type ) - : KConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ), + : TDEConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ), mType( type ) { } -void KConfigSkeleton::ItemString::writeConfig( KConfig *config ) +void TDEConfigSkeleton::ItemString::writeConfig( TDEConfig *config ) { if ( mReference != mLoadedValue ) // WABA: Is this test needed? { @@ -64,7 +64,7 @@ void KConfigSkeleton::ItemString::writeConfig( KConfig *config ) } -void KConfigSkeleton::ItemString::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemString::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); @@ -88,39 +88,39 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemString::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemString::setProperty(const TQVariant & p) { mReference = p.toString(); } -TQVariant KConfigSkeleton::ItemString::property() const +TQVariant TDEConfigSkeleton::ItemString::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key, TQString &reference, const TQString &defaultValue) : ItemString( group, key, reference, defaultValue, Password ) { } -KConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key, TQString &reference, const TQString &defaultValue) : ItemString( group, key, reference, defaultValue, Path ) { } -KConfigSkeleton::ItemProperty::ItemProperty( const TQString &group, +TDEConfigSkeleton::ItemProperty::ItemProperty( const TQString &group, const TQString &key, TQVariant &reference, TQVariant defaultValue ) - : KConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemProperty::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemProperty::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readPropertyEntry( mKey, mDefault ); @@ -129,23 +129,23 @@ void KConfigSkeleton::ItemProperty::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemProperty::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemProperty::setProperty(const TQVariant & p) { mReference = p; } -TQVariant KConfigSkeleton::ItemProperty::property() const +TQVariant TDEConfigSkeleton::ItemProperty::property() const { return mReference; } -KConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key, bool &reference, bool defaultValue ) - : KConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemBool::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemBool::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readBoolEntry( mKey, mDefault ); @@ -154,25 +154,25 @@ void KConfigSkeleton::ItemBool::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemBool::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemBool::setProperty(const TQVariant & p) { mReference = p.toBool(); } -TQVariant KConfigSkeleton::ItemBool::property() const +TQVariant TDEConfigSkeleton::ItemBool::property() const { return TQVariant( mReference, 42 /* dummy */ ); } -KConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key, int &reference, int defaultValue ) - : KConfigSkeletonGenericItem<int>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<int>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemInt::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemInt::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readNumEntry( mKey, mDefault ); @@ -185,51 +185,51 @@ void KConfigSkeleton::ItemInt::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemInt::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemInt::setProperty(const TQVariant & p) { mReference = p.toInt(); } -TQVariant KConfigSkeleton::ItemInt::property() const +TQVariant TDEConfigSkeleton::ItemInt::property() const { return TQVariant(mReference); } -TQVariant KConfigSkeleton::ItemInt::minValue() const +TQVariant TDEConfigSkeleton::ItemInt::minValue() const { if (mHasMin) return TQVariant(mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemInt::maxValue() const +TQVariant TDEConfigSkeleton::ItemInt::maxValue() const { if (mHasMax) return TQVariant(mMax); return TQVariant(); } -void KConfigSkeleton::ItemInt::setMinValue(int v) +void TDEConfigSkeleton::ItemInt::setMinValue(int v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemInt::setMaxValue(int v) +void TDEConfigSkeleton::ItemInt::setMaxValue(int v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key, TQ_INT64 &reference, TQ_INT64 defaultValue ) - : KConfigSkeletonGenericItem<TQ_INT64>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQ_INT64>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemInt64::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemInt64::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readNum64Entry( mKey, mDefault ); @@ -242,43 +242,43 @@ void KConfigSkeleton::ItemInt64::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemInt64::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemInt64::setProperty(const TQVariant & p) { mReference = p.toLongLong(); } -TQVariant KConfigSkeleton::ItemInt64::property() const +TQVariant TDEConfigSkeleton::ItemInt64::property() const { return TQVariant(mReference); } -TQVariant KConfigSkeleton::ItemInt64::minValue() const +TQVariant TDEConfigSkeleton::ItemInt64::minValue() const { if (mHasMin) return TQVariant(mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemInt64::maxValue() const +TQVariant TDEConfigSkeleton::ItemInt64::maxValue() const { if (mHasMax) return TQVariant(mMax); return TQVariant(); } -void KConfigSkeleton::ItemInt64::setMinValue(TQ_INT64 v) +void TDEConfigSkeleton::ItemInt64::setMinValue(TQ_INT64 v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemInt64::setMaxValue(TQ_INT64 v) +void TDEConfigSkeleton::ItemInt64::setMaxValue(TQ_INT64 v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key, int &reference, const TQValueList<Choice> &choices, int defaultValue ) @@ -286,7 +286,7 @@ KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key, { } -void KConfigSkeleton::ItemEnum::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemEnum::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); if (!config->hasKey(mKey)) @@ -315,7 +315,7 @@ void KConfigSkeleton::ItemEnum::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config ) +void TDEConfigSkeleton::ItemEnum::writeConfig( TDEConfig *config ) { if ( mReference != mLoadedValue ) // WABA: Is this test needed? { @@ -329,21 +329,21 @@ void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config ) } } -TQValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const +TQValueList<TDEConfigSkeleton::ItemEnum::Choice> TDEConfigSkeleton::ItemEnum::choices() const { return mChoices; } -KConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key, unsigned int &reference, unsigned int defaultValue ) - : KConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemUInt::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemUInt::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readUnsignedNumEntry( mKey, mDefault ); @@ -356,51 +356,51 @@ void KConfigSkeleton::ItemUInt::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemUInt::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemUInt::setProperty(const TQVariant & p) { mReference = p.toUInt(); } -TQVariant KConfigSkeleton::ItemUInt::property() const +TQVariant TDEConfigSkeleton::ItemUInt::property() const { return TQVariant(mReference); } -TQVariant KConfigSkeleton::ItemUInt::minValue() const +TQVariant TDEConfigSkeleton::ItemUInt::minValue() const { if (mHasMin) return TQVariant(mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemUInt::maxValue() const +TQVariant TDEConfigSkeleton::ItemUInt::maxValue() const { if (mHasMax) return TQVariant(mMax); return TQVariant(); } -void KConfigSkeleton::ItemUInt::setMinValue(unsigned int v) +void TDEConfigSkeleton::ItemUInt::setMinValue(unsigned int v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemUInt::setMaxValue(unsigned int v) +void TDEConfigSkeleton::ItemUInt::setMaxValue(unsigned int v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key, TQ_UINT64 &reference, TQ_UINT64 defaultValue ) - : KConfigSkeletonGenericItem<TQ_UINT64>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQ_UINT64>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemUInt64::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readUnsignedNum64Entry( mKey, mDefault ); @@ -413,50 +413,50 @@ void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p) { mReference = p.toULongLong(); } -TQVariant KConfigSkeleton::ItemUInt64::property() const +TQVariant TDEConfigSkeleton::ItemUInt64::property() const { return TQVariant(mReference); } -TQVariant KConfigSkeleton::ItemUInt64::minValue() const +TQVariant TDEConfigSkeleton::ItemUInt64::minValue() const { if (mHasMin) return TQVariant(mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemUInt64::maxValue() const +TQVariant TDEConfigSkeleton::ItemUInt64::maxValue() const { if (mHasMax) return TQVariant(mMax); return TQVariant(); } -void KConfigSkeleton::ItemUInt64::setMinValue(TQ_UINT64 v) +void TDEConfigSkeleton::ItemUInt64::setMinValue(TQ_UINT64 v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemUInt64::setMaxValue(TQ_UINT64 v) +void TDEConfigSkeleton::ItemUInt64::setMaxValue(TQ_UINT64 v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key, long &reference, long defaultValue ) - : KConfigSkeletonGenericItem<long>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<long>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemLong::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemLong::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readLongNumEntry( mKey, mDefault ); @@ -469,52 +469,52 @@ void KConfigSkeleton::ItemLong::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemLong::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemLong::setProperty(const TQVariant & p) { mReference = p.toLongLong(); } -TQVariant KConfigSkeleton::ItemLong::property() const +TQVariant TDEConfigSkeleton::ItemLong::property() const { return TQVariant((TQ_LLONG) mReference); } -TQVariant KConfigSkeleton::ItemLong::minValue() const +TQVariant TDEConfigSkeleton::ItemLong::minValue() const { if (mHasMin) return TQVariant((TQ_LLONG) mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemLong::maxValue() const +TQVariant TDEConfigSkeleton::ItemLong::maxValue() const { if (mHasMax) return TQVariant((TQ_LLONG) mMax); return TQVariant(); } -void KConfigSkeleton::ItemLong::setMinValue(long v) +void TDEConfigSkeleton::ItemLong::setMinValue(long v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemLong::setMaxValue(long v) +void TDEConfigSkeleton::ItemLong::setMaxValue(long v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key, unsigned long &reference, unsigned long defaultValue ) - : KConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemULong::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemULong::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readUnsignedLongNumEntry( mKey, mDefault ); @@ -527,51 +527,51 @@ void KConfigSkeleton::ItemULong::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemULong::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemULong::setProperty(const TQVariant & p) { mReference = p.toULongLong(); } -TQVariant KConfigSkeleton::ItemULong::property() const +TQVariant TDEConfigSkeleton::ItemULong::property() const { return TQVariant((TQ_ULLONG) mReference); } -TQVariant KConfigSkeleton::ItemULong::minValue() const +TQVariant TDEConfigSkeleton::ItemULong::minValue() const { if (mHasMin) return TQVariant((TQ_ULLONG) mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemULong::maxValue() const +TQVariant TDEConfigSkeleton::ItemULong::maxValue() const { if (mHasMax) return TQVariant((TQ_ULLONG) mMax); return TQVariant(); } -void KConfigSkeleton::ItemULong::setMinValue(unsigned long v) +void TDEConfigSkeleton::ItemULong::setMinValue(unsigned long v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemULong::setMaxValue(unsigned long v) +void TDEConfigSkeleton::ItemULong::setMaxValue(unsigned long v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key, double &reference, double defaultValue ) - : KConfigSkeletonGenericItem<double>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<double>( group, key, reference, defaultValue ) ,mHasMin(false), mHasMax(false) { } -void KConfigSkeleton::ItemDouble::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemDouble::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readDoubleNumEntry( mKey, mDefault ); @@ -584,51 +584,51 @@ void KConfigSkeleton::ItemDouble::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemDouble::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemDouble::setProperty(const TQVariant & p) { mReference = p.toDouble(); } -TQVariant KConfigSkeleton::ItemDouble::property() const +TQVariant TDEConfigSkeleton::ItemDouble::property() const { return TQVariant(mReference); } -TQVariant KConfigSkeleton::ItemDouble::minValue() const +TQVariant TDEConfigSkeleton::ItemDouble::minValue() const { if (mHasMin) return TQVariant(mMin); return TQVariant(); } -TQVariant KConfigSkeleton::ItemDouble::maxValue() const +TQVariant TDEConfigSkeleton::ItemDouble::maxValue() const { if (mHasMax) return TQVariant(mMax); return TQVariant(); } -void KConfigSkeleton::ItemDouble::setMinValue(double v) +void TDEConfigSkeleton::ItemDouble::setMinValue(double v) { mHasMin = true; mMin = v; } -void KConfigSkeleton::ItemDouble::setMaxValue(double v) +void TDEConfigSkeleton::ItemDouble::setMaxValue(double v) { mHasMax = true; mMax = v; } -KConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key, TQColor &reference, const TQColor &defaultValue ) - : KConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemColor::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemColor::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readColorEntry( mKey, &mDefault ); @@ -637,25 +637,25 @@ void KConfigSkeleton::ItemColor::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemColor::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemColor::setProperty(const TQVariant & p) { mReference = p.toColor(); } -TQVariant KConfigSkeleton::ItemColor::property() const +TQVariant TDEConfigSkeleton::ItemColor::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key, TQFont &reference, const TQFont &defaultValue ) - : KConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemFont::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemFont::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readFontEntry( mKey, &mDefault ); @@ -664,25 +664,25 @@ void KConfigSkeleton::ItemFont::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemFont::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemFont::setProperty(const TQVariant & p) { mReference = p.toFont(); } -TQVariant KConfigSkeleton::ItemFont::property() const +TQVariant TDEConfigSkeleton::ItemFont::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key, TQRect &reference, const TQRect &defaultValue ) - : KConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemRect::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemRect::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readRectEntry( mKey, &mDefault ); @@ -691,25 +691,25 @@ void KConfigSkeleton::ItemRect::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemRect::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemRect::setProperty(const TQVariant & p) { mReference = p.toRect(); } -TQVariant KConfigSkeleton::ItemRect::property() const +TQVariant TDEConfigSkeleton::ItemRect::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key, TQPoint &reference, const TQPoint &defaultValue ) - : KConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemPoint::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemPoint::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readPointEntry( mKey, &mDefault ); @@ -718,25 +718,25 @@ void KConfigSkeleton::ItemPoint::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemPoint::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemPoint::setProperty(const TQVariant & p) { mReference = p.toPoint(); } -TQVariant KConfigSkeleton::ItemPoint::property() const +TQVariant TDEConfigSkeleton::ItemPoint::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key, TQSize &reference, const TQSize &defaultValue ) - : KConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemSize::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemSize::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readSizeEntry( mKey, &mDefault ); @@ -745,25 +745,25 @@ void KConfigSkeleton::ItemSize::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemSize::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemSize::setProperty(const TQVariant & p) { mReference = p.toSize(); } -TQVariant KConfigSkeleton::ItemSize::property() const +TQVariant TDEConfigSkeleton::ItemSize::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key, TQDateTime &reference, const TQDateTime &defaultValue ) - : KConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemDateTime::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); mReference = config->readDateTimeEntry( mKey, &mDefault ); @@ -772,25 +772,25 @@ void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p) { mReference = p.toDateTime(); } -TQVariant KConfigSkeleton::ItemDateTime::property() const +TQVariant TDEConfigSkeleton::ItemDateTime::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key, TQStringList &reference, const TQStringList &defaultValue ) - : KConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemStringList::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemStringList::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); if ( !config->hasKey( mKey ) ) @@ -802,25 +802,25 @@ void KConfigSkeleton::ItemStringList::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemStringList::setProperty(const TQVariant & p) +void TDEConfigSkeleton::ItemStringList::setProperty(const TQVariant & p) { mReference = p.toStringList(); } -TQVariant KConfigSkeleton::ItemStringList::property() const +TQVariant TDEConfigSkeleton::ItemStringList::property() const { return TQVariant(mReference); } -KConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key, TQStringList &reference, const TQStringList &defaultValue ) : ItemStringList( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemPathList::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemPathList::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); if ( !config->hasKey( mKey ) ) @@ -832,7 +832,7 @@ void KConfigSkeleton::ItemPathList::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config ) +void TDEConfigSkeleton::ItemPathList::writeConfig( TDEConfig *config ) { if ( mReference != mLoadedValue ) // WABA: Is this test needed? { @@ -847,14 +847,14 @@ void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config ) } -KConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key, +TDEConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key, TQValueList<int> &reference, const TQValueList<int> &defaultValue ) - : KConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue ) + : TDEConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue ) { } -void KConfigSkeleton::ItemIntList::readConfig( KConfig *config ) +void TDEConfigSkeleton::ItemIntList::readConfig( TDEConfig *config ) { config->setGroup( mGroup ); if ( !config->hasKey( mKey ) ) @@ -866,22 +866,22 @@ void KConfigSkeleton::ItemIntList::readConfig( KConfig *config ) readImmutability( config ); } -void KConfigSkeleton::ItemIntList::setProperty(const TQVariant &) +void TDEConfigSkeleton::ItemIntList::setProperty(const TQVariant &) { // TODO: Not yet supported } -TQVariant KConfigSkeleton::ItemIntList::property() const +TQVariant TDEConfigSkeleton::ItemIntList::property() const { // TODO: Not yet supported return TQVariant(); } -KConfigSkeleton::KConfigSkeleton( const TQString &configname ) +TDEConfigSkeleton::TDEConfigSkeleton( const TQString &configname ) : mCurrentGroup( "No Group" ), mUseDefaults(false) { - kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl; + kdDebug(177) << "Creating TDEConfigSkeleton (" << (void *)this << ")" << endl; if ( !configname.isEmpty() ) { @@ -893,40 +893,40 @@ KConfigSkeleton::KConfigSkeleton( const TQString &configname ) } } -KConfigSkeleton::KConfigSkeleton(KSharedConfig::Ptr config) +TDEConfigSkeleton::TDEConfigSkeleton(KSharedConfig::Ptr config) : mCurrentGroup( "No Group" ), mUseDefaults(false) { - kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl; + kdDebug(177) << "Creating TDEConfigSkeleton (" << (void *)this << ")" << endl; mConfig = config; } -KConfigSkeleton::~KConfigSkeleton() +TDEConfigSkeleton::~TDEConfigSkeleton() { - KConfigSkeletonItem::List::ConstIterator it; + TDEConfigSkeletonItem::List::ConstIterator it; for( it = mItems.begin(); it != mItems.end(); ++it ) { delete *it; } } -void KConfigSkeleton::setCurrentGroup( const TQString &group ) +void TDEConfigSkeleton::setCurrentGroup( const TQString &group ) { mCurrentGroup = group; } -KConfig *KConfigSkeleton::config() const +TDEConfig *TDEConfigSkeleton::config() const { return mConfig; } -bool KConfigSkeleton::useDefaults(bool b) +bool TDEConfigSkeleton::useDefaults(bool b) { if (b == mUseDefaults) return mUseDefaults; mUseDefaults = b; - KConfigSkeletonItem::List::ConstIterator it; + TDEConfigSkeletonItem::List::ConstIterator it; for( it = mItems.begin(); it != mItems.end(); ++it ) { (*it)->swapDefault(); @@ -936,9 +936,9 @@ bool KConfigSkeleton::useDefaults(bool b) return !mUseDefaults; } -void KConfigSkeleton::setDefaults() +void TDEConfigSkeleton::setDefaults() { - KConfigSkeletonItem::List::ConstIterator it; + TDEConfigSkeletonItem::List::ConstIterator it; for( it = mItems.begin(); it != mItems.end(); ++it ) { (*it)->setDefault(); } @@ -946,14 +946,14 @@ void KConfigSkeleton::setDefaults() usrSetDefaults(); } -void KConfigSkeleton::readConfig() +void TDEConfigSkeleton::readConfig() { - kdDebug(177) << "KConfigSkeleton::readConfig()" << endl; + kdDebug(177) << "TDEConfigSkeleton::readConfig()" << endl; TQString origGroup = mConfig->group(); mConfig->reparseConfiguration(); - KConfigSkeletonItem::List::ConstIterator it; + TDEConfigSkeletonItem::List::ConstIterator it; for( it = mItems.begin(); it != mItems.end(); ++it ) { (*it)->readConfig( mConfig ); @@ -964,13 +964,13 @@ void KConfigSkeleton::readConfig() mConfig->setGroup(origGroup); } -void KConfigSkeleton::writeConfig() +void TDEConfigSkeleton::writeConfig() { - kdDebug(177) << "KConfigSkeleton::writeConfig()" << endl; + kdDebug(177) << "TDEConfigSkeleton::writeConfig()" << endl; TQString origGroup = mConfig->group(); - KConfigSkeletonItem::List::ConstIterator it; + TDEConfigSkeletonItem::List::ConstIterator it; for( it = mItems.begin(); it != mItems.end(); ++it ) { (*it)->writeConfig( mConfig ); @@ -985,7 +985,7 @@ void KConfigSkeleton::writeConfig() mConfig->setGroup(origGroup); } -void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name ) +void TDEConfigSkeleton::addItem( TDEConfigSkeletonItem *item, const TQString &name ) { item->setName( name.isEmpty() ? item->key() : name ); mItems.append( item ); @@ -994,214 +994,214 @@ void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name ) item->readConfig( mConfig ); } -KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const TQString &name, TQString &reference, +TDEConfigSkeleton::ItemString *TDEConfigSkeleton::addItemString( const TQString &name, TQString &reference, const TQString &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemString *item; - item = new KConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key, + TDEConfigSkeleton::ItemString *item; + item = new TDEConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key, reference, defaultValue, - KConfigSkeleton::ItemString::Normal ); + TDEConfigSkeleton::ItemString::Normal ); addItem( item, name ); return item; } -KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const TQString &name, TQString &reference, +TDEConfigSkeleton::ItemPassword *TDEConfigSkeleton::addItemPassword( const TQString &name, TQString &reference, const TQString &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemPassword *item; - item = new KConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemPassword *item; + item = new TDEConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const TQString &name, TQString &reference, +TDEConfigSkeleton::ItemPath *TDEConfigSkeleton::addItemPath( const TQString &name, TQString &reference, const TQString &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemPath *item; - item = new KConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemPath *item; + item = new TDEConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference, +TDEConfigSkeleton::ItemProperty *TDEConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference, const TQVariant &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemProperty *item; - item = new KConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemProperty *item; + item = new TDEConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const TQString &name, bool &reference, +TDEConfigSkeleton::ItemBool *TDEConfigSkeleton::addItemBool( const TQString &name, bool &reference, bool defaultValue, const TQString &key ) { - KConfigSkeleton::ItemBool *item; - item = new KConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemBool *item; + item = new TDEConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const TQString &name, int &reference, +TDEConfigSkeleton::ItemInt *TDEConfigSkeleton::addItemInt( const TQString &name, int &reference, int defaultValue, const TQString &key ) { - KConfigSkeleton::ItemInt *item; - item = new KConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemInt *item; + item = new TDEConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference, +TDEConfigSkeleton::ItemUInt *TDEConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference, unsigned int defaultValue, const TQString &key ) { - KConfigSkeleton::ItemUInt *item; - item = new KConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemUInt *item; + item = new TDEConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, TQ_INT64 &reference, +TDEConfigSkeleton::ItemInt64 *TDEConfigSkeleton::addItemInt64( const TQString &name, TQ_INT64 &reference, TQ_INT64 defaultValue, const TQString &key ) { - KConfigSkeleton::ItemInt64 *item; - item = new KConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemInt64 *item; + item = new TDEConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, TQ_UINT64 &reference, +TDEConfigSkeleton::ItemUInt64 *TDEConfigSkeleton::addItemUInt64( const TQString &name, TQ_UINT64 &reference, TQ_UINT64 defaultValue, const TQString &key ) { - KConfigSkeleton::ItemUInt64 *item; - item = new KConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemUInt64 *item; + item = new TDEConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const TQString &name, long &reference, +TDEConfigSkeleton::ItemLong *TDEConfigSkeleton::addItemLong( const TQString &name, long &reference, long defaultValue, const TQString &key ) { - KConfigSkeleton::ItemLong *item; - item = new KConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemLong *item; + item = new TDEConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference, +TDEConfigSkeleton::ItemULong *TDEConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference, unsigned long defaultValue, const TQString &key ) { - KConfigSkeleton::ItemULong *item; - item = new KConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemULong *item; + item = new TDEConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const TQString &name, double &reference, +TDEConfigSkeleton::ItemDouble *TDEConfigSkeleton::addItemDouble( const TQString &name, double &reference, double defaultValue, const TQString &key ) { - KConfigSkeleton::ItemDouble *item; - item = new KConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemDouble *item; + item = new TDEConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const TQString &name, TQColor &reference, +TDEConfigSkeleton::ItemColor *TDEConfigSkeleton::addItemColor( const TQString &name, TQColor &reference, const TQColor &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemColor *item; - item = new KConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemColor *item; + item = new TDEConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const TQString &name, TQFont &reference, +TDEConfigSkeleton::ItemFont *TDEConfigSkeleton::addItemFont( const TQString &name, TQFont &reference, const TQFont &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemFont *item; - item = new KConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemFont *item; + item = new TDEConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const TQString &name, TQRect &reference, +TDEConfigSkeleton::ItemRect *TDEConfigSkeleton::addItemRect( const TQString &name, TQRect &reference, const TQRect &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemRect *item; - item = new KConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemRect *item; + item = new TDEConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference, +TDEConfigSkeleton::ItemPoint *TDEConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference, const TQPoint &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemPoint *item; - item = new KConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemPoint *item; + item = new TDEConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const TQString &name, TQSize &reference, +TDEConfigSkeleton::ItemSize *TDEConfigSkeleton::addItemSize( const TQString &name, TQSize &reference, const TQSize &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemSize *item; - item = new KConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemSize *item; + item = new TDEConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference, +TDEConfigSkeleton::ItemDateTime *TDEConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference, const TQDateTime &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemDateTime *item; - item = new KConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemDateTime *item; + item = new TDEConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference, +TDEConfigSkeleton::ItemStringList *TDEConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference, const TQStringList &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemStringList *item; - item = new KConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemStringList *item; + item = new TDEConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference, +TDEConfigSkeleton::ItemIntList *TDEConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference, const TQValueList<int> &defaultValue, const TQString &key ) { - KConfigSkeleton::ItemIntList *item; - item = new KConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key, + TDEConfigSkeleton::ItemIntList *item; + item = new TDEConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key, reference, defaultValue ); addItem( item, name ); return item; } -bool KConfigSkeleton::isImmutable(const TQString &name) +bool TDEConfigSkeleton::isImmutable(const TQString &name) { - KConfigSkeletonItem *item = findItem(name); + TDEConfigSkeletonItem *item = findItem(name); return !item || item->isImmutable(); } -KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name) +TDEConfigSkeletonItem *TDEConfigSkeleton::findItem(const TQString &name) { return mItemDict.find(name); } diff --git a/tdecore/kconfigskeleton.h b/tdecore/kconfigskeleton.h index 3ad18d958..30dc98841 100644 --- a/tdecore/kconfigskeleton.h +++ b/tdecore/kconfigskeleton.h @@ -39,20 +39,20 @@ /** * @short Class for storing a preferences setting * @author Cornelius Schumacher - * @see KConfigSkeleton + * @see TDEConfigSkeleton * - * This class represents one preferences setting as used by @ref KConfigSkeleton. - * Subclasses of KConfigSkeletonItem implement storage functions for a certain type of + * This class represents one preferences setting as used by @ref TDEConfigSkeleton. + * Subclasses of TDEConfigSkeletonItem implement storage functions for a certain type of * setting. Normally you don't have to use this class directly. Use the special - * addItem() functions of KConfigSkeleton instead. If you subclass this class you will - * have to register instances with the function KConfigSkeleton::addItem(). + * addItem() functions of TDEConfigSkeleton instead. If you subclass this class you will + * have to register instances with the function TDEConfigSkeleton::addItem(). */ - class TDECORE_EXPORT KConfigSkeletonItem + class TDECORE_EXPORT TDEConfigSkeletonItem { public: - typedef TQValueList < KConfigSkeletonItem * >List; - typedef TQDict < KConfigSkeletonItem > Dict; - typedef TQDictIterator < KConfigSkeletonItem > DictIterator; + typedef TQValueList < TDEConfigSkeletonItem * >List; + typedef TQDict < TDEConfigSkeletonItem > Dict; + typedef TQDictIterator < TDEConfigSkeletonItem > DictIterator; /** * Constructor. @@ -60,7 +60,7 @@ * @param group Config file group. * @param key Config file key. */ - KConfigSkeletonItem(const TQString & group, const TQString & key) + TDEConfigSkeletonItem(const TQString & group, const TQString & key) :mGroup(group),mKey(key), mIsImmutable(true) { } @@ -68,7 +68,7 @@ /** * Destructor. */ - virtual ~KConfigSkeletonItem() + virtual ~TDEConfigSkeletonItem() { } @@ -153,22 +153,22 @@ } /** - * This function is called by @ref KConfigSkeleton to read the value for this setting + * This function is called by @ref TDEConfigSkeleton to read the value for this setting * from a config file. * value. */ - virtual void readConfig(KConfig *) = 0; + virtual void readConfig(TDEConfig *) = 0; /** - * This function is called by @ref KConfigSkeleton to write the value of this setting + * This function is called by @ref TDEConfigSkeleton to write the value of this setting * to a config file. */ - virtual void writeConfig(KConfig *) = 0; + virtual void writeConfig(TDEConfig *) = 0; /** * Read global default value. */ - virtual void readDefault(KConfig *) = 0; + virtual void readDefault(TDEConfig *) = 0; /** * Set item to @p p @@ -197,7 +197,7 @@ /** * Exchanges the current value with the default value - * Used by KConfigSkeleton::useDefaults(bool); + * Used by TDEConfigSkeleton::useDefaults(bool); */ virtual void swapDefault() = 0; @@ -212,9 +212,9 @@ protected: /** * sets mIsImmutable to true if mKey in config is immutable - * @param config KConfig to check if mKey is immutable in + * @param config TDEConfig to check if mKey is immutable in */ - void readImmutability(KConfig *config); + void readImmutability(TDEConfig *config); TQString mGroup; TQString mKey; @@ -228,18 +228,18 @@ }; -template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonItem +template < typename T > class TDEConfigSkeletonGenericItem:public TDEConfigSkeletonItem { public: - KConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference, + TDEConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference, T defaultValue) - : KConfigSkeletonItem(group, key), mReference(reference), + : TDEConfigSkeletonItem(group, key), mReference(reference), mDefault(defaultValue), mLoadedValue(defaultValue) { } /** - * Set value of this KConfigSkeletonItem. + * Set value of this TDEConfigSkeletonItem. */ void setValue(const T & v) { @@ -247,7 +247,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI } /** - * Return value of this KConfigSkeletonItem. + * Return value of this TDEConfigSkeletonItem. */ T & value() { @@ -255,7 +255,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI } /** - * Return const value of this KConfigSkeletonItem. + * Return const value of this TDEConfigSkeletonItem. */ const T & value() const { @@ -275,7 +275,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI mReference = mDefault; } - virtual void writeConfig(KConfig * config) + virtual void writeConfig(TDEConfig * config) { if ( mReference != mLoadedValue ) // Is this needed? { @@ -287,7 +287,7 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI } } - void readDefault(KConfig * config) + void readDefault(TDEConfig * config) { config->setReadDefaults(true); readConfig(config); @@ -311,19 +311,19 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI /** * @short Class for handling preferences settings for an application. * @author Cornelius Schumacher - * @see KConfigSkeletonItem + * @see TDEConfigSkeletonItem * * This class provides an interface to preferences settings. Preferences items * can be registered by the addItem() function corresponding to the data type of - * the seetting. KConfigSkeleton then handles reading and writing of config files and + * the seetting. TDEConfigSkeleton then handles reading and writing of config files and * setting of default values. * - * Normally you will subclass KConfigSkeleton, add data members for the preferences + * Normally you will subclass TDEConfigSkeleton, add data members for the preferences * settings and register the members in the constructor of the subclass. * * Example: * \code - * class MyPrefs : public KConfigSkeleton + * class MyPrefs : public TDEConfigSkeleton * { * public: * MyPrefs() @@ -342,9 +342,9 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI * } * \endcode * - * It might be convenient in many cases to make this subclass of KConfigSkeleton a + * It might be convenient in many cases to make this subclass of TDEConfigSkeleton a * singleton for global access from all over the application without passing - * references to the KConfigSkeleton object around. + * references to the TDEConfigSkeleton object around. * * You can write the data to the configuration file by calling @ref writeConfig() * and read the data from the configuration file by calling @ref readConfig(). @@ -355,21 +355,21 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI * @ref usrWriteConfig(). * * Internally preferences settings are stored in instances of subclasses of - * @ref KConfigSkeletonItem. You can also add KConfigSkeletonItem subclasses + * @ref TDEConfigSkeletonItem. You can also add TDEConfigSkeletonItem subclasses * for your own types and call the generic @ref addItem() to register them. * - * In many cases you don't have to write the specific KConfigSkeleton + * In many cases you don't have to write the specific TDEConfigSkeleton * subclasses yourself, but you can use \ref kconfig_compiler to automatically * generate the C++ code from an XML description of the configuration options. */ -class TDECORE_EXPORT KConfigSkeleton +class TDECORE_EXPORT TDEConfigSkeleton { public: /** * Class for handling a string preferences item. */ - class TDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < TQString > + class TDECORE_EXPORT ItemString:public TDEConfigSkeletonGenericItem < TQString > { public: enum Type { Normal, Password, Path }; @@ -379,8 +379,8 @@ public: const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !! Type type = Normal); - void writeConfig(KConfig * config); - void readConfig(KConfig * config); + void writeConfig(TDEConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; @@ -414,13 +414,13 @@ public: /** * Class for handling a TQVariant preferences item. */ - class TDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < TQVariant > + class TDECORE_EXPORT ItemProperty:public TDEConfigSkeletonGenericItem < TQVariant > { public: ItemProperty(const TQString & group, const TQString & key, TQVariant & reference, TQVariant defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -429,13 +429,13 @@ public: /** * Class for handling a bool preferences item. */ - class TDECORE_EXPORT ItemBool:public KConfigSkeletonGenericItem < bool > + class TDECORE_EXPORT ItemBool:public TDEConfigSkeletonGenericItem < bool > { public: ItemBool(const TQString & group, const TQString & key, bool & reference, bool defaultValue = true); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -444,13 +444,13 @@ public: /** * Class for handling an integer preferences item. */ - class TDECORE_EXPORT ItemInt:public KConfigSkeletonGenericItem < int > + class TDECORE_EXPORT ItemInt:public TDEConfigSkeletonGenericItem < int > { public: ItemInt(const TQString & group, const TQString & key, int &reference, int defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; TQVariant minValue() const; @@ -469,13 +469,13 @@ public: /** * Class for handling an 64-bit integer preferences item. */ - class TDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < TQ_INT64 > + class TDECORE_EXPORT ItemInt64:public TDEConfigSkeletonGenericItem < TQ_INT64 > { public: ItemInt64(const TQString & group, const TQString & key, TQ_INT64 &reference, TQ_INT64 defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; @@ -510,8 +510,8 @@ public: TQValueList<Choice> choices() const; - void readConfig(KConfig * config); - void writeConfig(KConfig * config); + void readConfig(TDEConfig * config); + void writeConfig(TDEConfig * config); private: TQValueList<Choice> mChoices; @@ -521,13 +521,13 @@ public: /** * Class for handling an unsingend integer preferences item. */ - class TDECORE_EXPORT ItemUInt:public KConfigSkeletonGenericItem < unsigned int > + class TDECORE_EXPORT ItemUInt:public TDEConfigSkeletonGenericItem < unsigned int > { public: ItemUInt(const TQString & group, const TQString & key, unsigned int &reference, unsigned int defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; TQVariant minValue() const; @@ -547,13 +547,13 @@ public: /** * Class for hanlding a long integer preferences item. */ - class TDECORE_EXPORT ItemLong:public KConfigSkeletonGenericItem < long > + class TDECORE_EXPORT ItemLong:public TDEConfigSkeletonGenericItem < long > { public: ItemLong(const TQString & group, const TQString & key, long &reference, long defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; TQVariant minValue() const; @@ -573,13 +573,13 @@ public: /** * Class for handling an unsigned long integer preferences item. */ - class TDECORE_EXPORT ItemULong:public KConfigSkeletonGenericItem < unsigned long > + class TDECORE_EXPORT ItemULong:public TDEConfigSkeletonGenericItem < unsigned long > { public: ItemULong(const TQString & group, const TQString & key, unsigned long &reference, unsigned long defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; TQVariant minValue() const; @@ -598,13 +598,13 @@ public: /** * Class for handling unsigned 64-bit integer preferences item. */ - class TDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < TQ_UINT64 > + class TDECORE_EXPORT ItemUInt64:public TDEConfigSkeletonGenericItem < TQ_UINT64 > { public: ItemUInt64(const TQString & group, const TQString & key, TQ_UINT64 &reference, TQ_UINT64 defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; @@ -624,13 +624,13 @@ public: /** * Class for handling a floating point preference item. */ - class TDECORE_EXPORT ItemDouble:public KConfigSkeletonGenericItem < double > + class TDECORE_EXPORT ItemDouble:public TDEConfigSkeletonGenericItem < double > { public: ItemDouble(const TQString & group, const TQString & key, double &reference, double defaultValue = 0); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; TQVariant minValue() const; @@ -650,14 +650,14 @@ public: /** * Class for handling a color preferences item. */ - class TDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < TQColor > + class TDECORE_EXPORT ItemColor:public TDEConfigSkeletonGenericItem < TQColor > { public: ItemColor(const TQString & group, const TQString & key, TQColor & reference, const TQColor & defaultValue = TQColor(128, 128, 128)); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -666,13 +666,13 @@ public: /** * Class for handling a font preferences item. */ - class TDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < TQFont > + class TDECORE_EXPORT ItemFont:public TDEConfigSkeletonGenericItem < TQFont > { public: ItemFont(const TQString & group, const TQString & key, TQFont & reference, const TQFont & defaultValue = TDEGlobalSettings::generalFont()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -681,13 +681,13 @@ public: /** * Class for handling a TQRect preferences item. */ - class TDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < TQRect > + class TDECORE_EXPORT ItemRect:public TDEConfigSkeletonGenericItem < TQRect > { public: ItemRect(const TQString & group, const TQString & key, TQRect & reference, const TQRect & defaultValue = TQRect()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -696,13 +696,13 @@ public: /** * Class for handling a TQPoint preferences item. */ - class TDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < TQPoint > + class TDECORE_EXPORT ItemPoint:public TDEConfigSkeletonGenericItem < TQPoint > { public: ItemPoint(const TQString & group, const TQString & key, TQPoint & reference, const TQPoint & defaultValue = TQPoint()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -711,13 +711,13 @@ public: /** * Class for handling a TQSize preferences item. */ - class TDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < TQSize > + class TDECORE_EXPORT ItemSize:public TDEConfigSkeletonGenericItem < TQSize > { public: ItemSize(const TQString & group, const TQString & key, TQSize & reference, const TQSize & defaultValue = TQSize()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -726,14 +726,14 @@ public: /** * Class for handling a TQDateTime preferences item. */ - class TDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < TQDateTime > + class TDECORE_EXPORT ItemDateTime:public TDEConfigSkeletonGenericItem < TQDateTime > { public: ItemDateTime(const TQString & group, const TQString & key, TQDateTime & reference, const TQDateTime & defaultValue = TQDateTime()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -742,14 +742,14 @@ public: /** * Class for handling a string list preferences item. */ - class TDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < TQStringList > + class TDECORE_EXPORT ItemStringList:public TDEConfigSkeletonGenericItem < TQStringList > { public: ItemStringList(const TQString & group, const TQString & key, TQStringList & reference, const TQStringList & defaultValue = TQStringList()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -765,22 +765,22 @@ public: TQStringList & reference, const TQStringList & defaultValue = TQStringList()); - void readConfig(KConfig * config); - void writeConfig(KConfig * config); + void readConfig(TDEConfig * config); + void writeConfig(TDEConfig * config); }; /** * Class for handling an integer list preferences item. */ - class TDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < TQValueList < int > > + class TDECORE_EXPORT ItemIntList:public TDEConfigSkeletonGenericItem < TQValueList < int > > { public: ItemIntList(const TQString & group, const TQString & key, TQValueList < int >&reference, const TQValueList < int >&defaultValue = TQValueList < int >()); - void readConfig(KConfig * config); + void readConfig(TDEConfig * config); void setProperty(const TQVariant & p); TQVariant property() const; }; @@ -793,19 +793,19 @@ public: * @param configname name of config file. If no name is given, the default * config file as returned by kapp()->config() is used. */ - KConfigSkeleton(const TQString & configname = TQString::null); + TDEConfigSkeleton(const TQString & configname = TQString::null); /** * Constructor. * * @param config configuration object to use. */ - KConfigSkeleton(KSharedConfig::Ptr config); + TDEConfigSkeleton(KSharedConfig::Ptr config); /** * Destructor */ - virtual ~ KConfigSkeleton(); + virtual ~ TDEConfigSkeleton(); /** Set all registered items to their default values. @@ -840,12 +840,12 @@ public: } /** - * Register a custom @ref KConfigSkeletonItem with a given name. If the name - * parameter is null, take the name from KConfigSkeletonItem::key(). + * Register a custom @ref TDEConfigSkeletonItem with a given name. If the name + * parameter is null, take the name from TDEConfigSkeletonItem::key(). * Note that all names must be unique but that multiple entries can have * the same key if they reside in different groups. */ - void addItem(KConfigSkeletonItem *, const TQString & name = TQString::null ); + void addItem(TDEConfigSkeletonItem *, const TQString & name = TQString::null ); /** * Register an item of type TQString. @@ -1154,14 +1154,14 @@ public: const TQString & key = TQString::null); /** - * Return the @ref KConfig object used for reading and writing the settings. + * Return the @ref TDEConfig object used for reading and writing the settings. */ - KConfig *config() const; + TDEConfig *config() const; /** - * Return list of items managed by this KConfigSkeleton object. + * Return list of items managed by this TDEConfigSkeleton object. */ - KConfigSkeletonItem::List items() const + TDEConfigSkeletonItem::List items() const { return mItems; } @@ -1174,7 +1174,7 @@ public: /** * Lookup item by name */ - KConfigSkeletonItem * findItem(const TQString & name); + TDEConfigSkeletonItem * findItem(const TQString & name); /** * Indicate whether this object should reflect the actual @@ -1215,10 +1215,10 @@ protected: private: TQString mCurrentGroup; - KSharedConfig::Ptr mConfig; // pointer to KConfig object + KSharedConfig::Ptr mConfig; // pointer to TDEConfig object - KConfigSkeletonItem::List mItems; - KConfigSkeletonItem::Dict mItemDict; + TDEConfigSkeletonItem::List mItems; + TDEConfigSkeletonItem::Dict mItemDict; bool mUseDefaults; diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index 3d1818592..9813a0e16 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -21,8 +21,8 @@ 174 tdecore (KProcIO) 175 tdecore (TDEProcess) 176 tdecore (KWin) -177 tdecore (KConfigSkeleton) -178 tdecore (KConfigDialogManager) +177 tdecore (TDEConfigSkeleton) +178 tdecore (TDEConfigDialogManager) 179 tdecore (KNetwork resolver) 180 tdecore (tdelibs) 200 tdeui (KMainWindow) @@ -34,7 +34,7 @@ 265 tdecore (KIconEffect) 270 tdeui (KRootPixmap) 280 tdeui (KSharedPixmap) -281 tdeui (KCModule) +281 tdeui (TDECModule) 282 tdeui (KDockWidget) 290 tdeui (KPixmapIO) 291 tdeui (KAboutDialog) @@ -53,9 +53,9 @@ 703 kutils (KPluginInfo) 704 kutils (KSettings::ComponentsDialog) 710 kutils (KCMultiDialog) -711 kutils (KCModuleProxy) -712 kutils (KCModuleInfo) -713 kutils (KCModuleContainer) +711 kutils (TDECModuleProxy) +712 kutils (TDECModuleInfo) +713 kutils (TDECModuleContainer) 750 kspell (tdelibs) 760 kmdi 780 kcmshell (tdelibs) diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index ef76e04f6..e484a3711 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -162,7 +162,7 @@ struct kDebugPrivate { TQCString aAreaName; unsigned int oldarea; - KConfig *config; + TDEConfig *config; }; static kDebugPrivate *kDebug_data = 0; @@ -187,7 +187,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char if (!kDebug_data->config && TDEGlobal::_instance ) { - kDebug_data->config = new KConfig("kdebugrc", false, false); + kDebug_data->config = new TDEConfig("kdebugrc", false, false); kDebug_data->config->setGroup("0"); //AB: this is necessary here, otherwise all output with area 0 won't be diff --git a/tdecore/kdesktopfile.cpp b/tdecore/kdesktopfile.cpp index 29c30f9d9..1b9a49890 100644 --- a/tdecore/kdesktopfile.cpp +++ b/tdecore/kdesktopfile.cpp @@ -42,9 +42,9 @@ KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly, const char * resType) - : KConfig(TQString::fromLatin1(""), bReadOnly, false) + : TDEConfig(TQString::fromLatin1(""), bReadOnly, false) { - // KConfigBackEnd will try to locate the filename that is provided + // TDEConfigBackEnd will try to locate the filename that is provided // based on the resource type specified, _only_ if the filename // is not an absolute path. backEnd->changeFileName(fileName, resType, false); @@ -346,7 +346,7 @@ KDesktopFile::sortOrder() const } void KDesktopFile::virtual_hook( int id, void* data ) -{ KConfig::virtual_hook( id, data ); } +{ TDEConfig::virtual_hook( id, data ); } TQString KDesktopFile::readDocPath() const { @@ -361,7 +361,7 @@ TQString KDesktopFile::readDocPath() const KDesktopFile* KDesktopFile::copyTo(const TQString &file) const { KDesktopFile *config = new KDesktopFile(TQString::null, false); - KConfig::copyTo(file, config); + TDEConfig::copyTo(file, config); config->setDesktopGroup(); return config; } diff --git a/tdecore/kdesktopfile.h b/tdecore/kdesktopfile.h index ff19981cd..28db47842 100644 --- a/tdecore/kdesktopfile.h +++ b/tdecore/kdesktopfile.h @@ -28,10 +28,10 @@ class KDesktopFilePrivate; * KDE Desktop File Management. * * @author Pietro Iglio <iglio@kde.org> - * @see KConfigBase KConfig + * @see TDEConfigBase TDEConfig * @short KDE Desktop File Management class */ -class TDECORE_EXPORT KDesktopFile : public KConfig +class TDECORE_EXPORT KDesktopFile : public TDEConfig { Q_OBJECT diff --git a/tdecore/kdetcompmgr.cpp b/tdecore/kdetcompmgr.cpp index c4a903242..2047a7707 100644 --- a/tdecore/kdetcompmgr.cpp +++ b/tdecore/kdetcompmgr.cpp @@ -51,7 +51,7 @@ int main(int argc, char **argv) TDEApplication app; - KConfig config("twinrc", true); + TDEConfig config("twinrc", true); config.setGroup( "Notification Messages" ); if (!config.readBoolEntry("UseTranslucency",false)) { // Attempt to load the kompmgr pid file @@ -97,7 +97,7 @@ int main(int argc, char **argv) } if (app.detectCompositionManagerAvailable(false, false)) { // Perform a shallow check for the composite extension (a deep check would cause noticeable flicker) - KConfig config2("twinrc", true); + TDEConfig config2("twinrc", true); config2.setGroup( "Notification Messages" ); if (config2.readBoolEntry("UseTranslucency",false)) { app.detectCompositionManagerAvailable(true, true); diff --git a/tdecore/kextsock.cpp b/tdecore/kextsock.cpp index cd74f9ad0..d77d2c561 100644 --- a/tdecore/kextsock.cpp +++ b/tdecore/kextsock.cpp @@ -72,8 +72,8 @@ public: KResolver resLocal; // binding resolution unsigned current; // used by the asynchronous connection - ::KSocketAddress *local; // local socket address - ::KSocketAddress *peer; // peer socket address + ::TDESocketAddress *local; // local socket address + ::TDESocketAddress *peer; // peer socket address TQSocketNotifier *qsnIn, *qsnOut; int inMaxSize, outMaxSize; @@ -718,7 +718,7 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize) * if we have done this already, we return it. Otherwise, we'll have * to find the socket name */ -const ::KSocketAddress *KExtendedSocket::localAddress() +const ::TDESocketAddress *KExtendedSocket::localAddress() { if (d->local != NULL) return d->local; @@ -733,7 +733,7 @@ const ::KSocketAddress *KExtendedSocket::localAddress() * passiveSocket and that we require to be connected already. Also note that * the behavior on connectionless sockets is not defined here. */ -const ::KSocketAddress* KExtendedSocket::peerAddress() +const ::TDESocketAddress* KExtendedSocket::peerAddress() { if (d->peer != NULL) return d->peer; @@ -2002,7 +2002,7 @@ int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, TQString &host, return err; } -int KExtendedSocket::resolve(::KSocketAddress *sock, TQString &host, TQString &port, +int KExtendedSocket::resolve(::TDESocketAddress *sock, TQString &host, TQString &port, int flags) { return resolve(sock->data, sock->datasize, host, port, flags); @@ -2058,7 +2058,7 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt ai->ai->ai_addr = 0; } - ai->addr = ::KSocketAddress::newAddress(ai->ai->ai_addr, ai->ai->ai_addrlen); + ai->addr = ::TDESocketAddress::newAddress(ai->ai->ai_addr, ai->ai->ai_addrlen); l.append(ai); } @@ -2069,9 +2069,9 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt return l; } -::KSocketAddress *KExtendedSocket::localAddress(int fd) +::TDESocketAddress *KExtendedSocket::localAddress(int fd) { - ::KSocketAddress *local; + ::TDESocketAddress *local; struct sockaddr static_sa, *sa = &static_sa; ksocklen_t len = sizeof(static_sa); @@ -2106,20 +2106,20 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt return NULL; } - local = ::KSocketAddress::newAddress(sa, len); + local = ::TDESocketAddress::newAddress(sa, len); free(sa); } else - local = ::KSocketAddress::newAddress(sa, len); + local = ::TDESocketAddress::newAddress(sa, len); return local; } /* This is exactly the same code as localAddress, except * we call getpeername here */ -::KSocketAddress *KExtendedSocket::peerAddress(int fd) +::TDESocketAddress *KExtendedSocket::peerAddress(int fd) { - ::KSocketAddress *peer; + ::TDESocketAddress *peer; struct sockaddr static_sa, *sa = &static_sa; ksocklen_t len = sizeof(static_sa); @@ -2154,11 +2154,11 @@ TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQSt return NULL; } - peer = ::KSocketAddress::newAddress(sa, len); + peer = ::TDESocketAddress::newAddress(sa, len); free(sa); } else - peer = ::KSocketAddress::newAddress(sa, len); + peer = ::TDESocketAddress::newAddress(sa, len); return peer; } @@ -2204,7 +2204,7 @@ KAddressInfo::KAddressInfo(addrinfo *p) ai->ai_addrlen = 0; } - addr = ::KSocketAddress::newAddress(ai->ai_addr, ai->ai_addrlen); + addr = ::TDESocketAddress::newAddress(ai->ai_addr, ai->ai_addrlen); } #endif KAddressInfo::~KAddressInfo() diff --git a/tdecore/kextsock.h b/tdecore/kextsock.h index 080898443..6327d51dc 100644 --- a/tdecore/kextsock.h +++ b/tdecore/kextsock.h @@ -58,8 +58,8 @@ class KExtendedSocketPrivate; /** * The extended socket class. * - * This class should be used instead of KSocket whenever the user needs - * fine-grained control over the socket being created. Unlike KSocket, which + * This class should be used instead of TDESocket whenever the user needs + * fine-grained control over the socket being created. Unlike TDESocket, which * does everything at once, without much intervention, KExtendedSocket allows * intervention at every step of the process and the setting of parameters. * @@ -87,7 +87,7 @@ class KExtendedSocketPrivate; * @deprecated * This class is now deprecated. Please use the classes in KNetwork for * new programs. In particular, this class is replaced by KNetwork::KStreamSocket - * and @ref KNetwork::KServerSocket. + * and @ref KNetwork::TDEServerSocket. * * @author Thiago Macieira <thiago.macieira@kdemail.net> * @short an extended socket @@ -491,7 +491,7 @@ public: * @return the local socket address, can be 0 if the connection has not been established * yet */ - const ::KSocketAddress *localAddress(); + const ::TDESocketAddress *localAddress(); /** * Returns the peer socket address. Use KExtendedSocket::resolve() to @@ -499,7 +499,7 @@ public: * @return the peer address, can be 0 if the connection has not been established yet * or the socket is passive */ - const ::KSocketAddress *peerAddress(); + const ::TDESocketAddress *peerAddress(); /** * Returns the file descriptor @@ -964,7 +964,7 @@ public: * @param flags the same flags as getnameinfo() * @returns 0 on success, nonzero otherwise. */ - static int resolve(::KSocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED; + static int resolve(::TDESocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED; /** @deprecated * This function is now deprecated. Please use @ref KNetwork::KResolver::resolve. @@ -994,7 +994,7 @@ public: * @param fd the file descriptor * @return the local socket address or 0 if an error occurred. Delete after use. */ - static ::KSocketAddress *localAddress(int fd) KDE_DEPRECATED; + static ::TDESocketAddress *localAddress(int fd) KDE_DEPRECATED; /** * Returns the peer socket address. Use KExtendedSocket::resolve() to @@ -1003,7 +1003,7 @@ public: * @param fd the file descriptor * @return the peer socket address or 0 if an error occurred. Delete after use. */ - static ::KSocketAddress *peerAddress(int fd) KDE_DEPRECATED; + static ::TDESocketAddress *peerAddress(int fd) KDE_DEPRECATED; /** * Returns the representing text of this error code @@ -1029,8 +1029,8 @@ protected: private: KExtendedSocketPrivate *d; - friend class KSocket; - friend class KServerSocket; + friend class TDESocket; + friend class TDEServerSocket; }; /** @deprecated @@ -1043,7 +1043,7 @@ class TDECORE_EXPORT KAddressInfo { private: addrinfo *ai; - ::KSocketAddress *addr; + ::TDESocketAddress *addr; inline KAddressInfo() : ai(0), addr(0) { } @@ -1056,10 +1056,10 @@ public: ~KAddressInfo(); /** - * Returns the KAddressInfo's KSocketAddress. + * Returns the KAddressInfo's TDESocketAddress. * Only valid as long as the KAddressInfo exists. */ - inline KDE_DEPRECATED operator const ::KSocketAddress*() const + inline KDE_DEPRECATED operator const ::TDESocketAddress*() const { return addr; } /** @@ -1076,11 +1076,11 @@ public: { return ai; } /** - * Returns the KAddressInfo's KSocketAddress. + * Returns the KAddressInfo's TDESocketAddress. * Only valid as long as the KAddressInfo exists. - * @return the KAddressInfo's KSocketAddress. + * @return the KAddressInfo's TDESocketAddress. */ - inline KDE_DEPRECATED const ::KSocketAddress* address() const + inline KDE_DEPRECATED const ::TDESocketAddress* address() const { return addr; } /** @@ -1116,8 +1116,8 @@ public: const char* canonname() const KDE_DEPRECATED; /** - * Returns the length of the KSocketAddress. - * @return the KSocketAddress's length + * Returns the length of the TDESocketAddress. + * @return the TDESocketAddress's length */ inline int length() const { if (addr) return addr->size(); return 0; } diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp index c51f13e7f..9759edbcf 100644 --- a/tdecore/kglobal.cpp +++ b/tdecore/kglobal.cpp @@ -60,7 +60,7 @@ KStandardDirs *TDEGlobal::dirs() return _instance->dirs(); } -KConfig *TDEGlobal::config() +TDEConfig *TDEGlobal::config() { MYASSERT(_instance); diff --git a/tdecore/kglobal.h b/tdecore/kglobal.h index 361129e2b..22877c8ce 100644 --- a/tdecore/kglobal.h +++ b/tdecore/kglobal.h @@ -22,7 +22,7 @@ #include <kinstance.h> // KDE4: class TDEInstance is enough here class KCharsets; -class KConfig; +class TDEConfig; class KSharedConfig; class KIconLoader; class TDEHardwareDevices; @@ -65,7 +65,7 @@ public: * Returns the general config object. * @return the global configuration object. */ - static KConfig *config(); + static TDEConfig *config(); /** * Returns the general config object. diff --git a/tdecore/kglobalaccel.cpp b/tdecore/kglobalaccel.cpp index f5fb71027..3d759466f 100644 --- a/tdecore/kglobalaccel.cpp +++ b/tdecore/kglobalaccel.cpp @@ -119,11 +119,11 @@ const TQString& TDEGlobalAccel::configGroup() const void TDEGlobalAccel::setConfigGroup( const TQString& s ) { d->setConfigGroup( s ); } -bool TDEGlobalAccel::readSettings( KConfigBase* pConfig ) +bool TDEGlobalAccel::readSettings( TDEConfigBase* pConfig ) { d->readSettings( pConfig ); return true; } -bool TDEGlobalAccel::writeSettings( KConfigBase* pConfig ) const +bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig ) const { d->writeSettings( pConfig ); return true; } -bool TDEGlobalAccel::writeSettings( KConfigBase* pConfig, bool bGlobal ) const +bool TDEGlobalAccel::writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const { d->setConfigGlobal( bGlobal ); d->writeSettings( pConfig ); diff --git a/tdecore/kglobalaccel.h b/tdecore/kglobalaccel.h index 1389386c4..fdda08f5a 100644 --- a/tdecore/kglobalaccel.h +++ b/tdecore/kglobalaccel.h @@ -27,7 +27,7 @@ class TQPopupMenu; class TQWidget; class KAccelAction; class KAccelActions; -class KConfigBase; +class TDEConfigBase; class TDEGlobalAccelPrivate; @@ -157,14 +157,14 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject /** * Returns the configuration group that is used to save the accelerators. * @return the configuration group - * @see KConfig + * @see TDEConfig */ const TQString& configGroup() const; /** * Sets the configuration group that is used to save the accelerators. * @param cg the configuration group - * @see KConfig + * @see TDEConfig */ void setConfigGroup( const TQString &cg ); @@ -176,7 +176,7 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * configuration file * @return true if successful, false otherwise */ - bool readSettings( KConfigBase* pConfig = 0 ); + bool readSettings( TDEConfigBase* pConfig = 0 ); /** * Write the current shortcuts to @p pConfig, @@ -187,7 +187,7 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @return true if successful, false otherwise * @since 3.1 */ - bool writeSettings( KConfigBase* pConfig = 0 ) const; + bool writeSettings( TDEConfigBase* pConfig = 0 ) const; // BCI: merge these two writeSettings methods in KDE 4.0 /** * Write the current shortcuts to @p pConfig, @@ -199,7 +199,7 @@ class TDECORE_EXPORT TDEGlobalAccel : public TQObject * @param bGlobal if true write the configuration to the kde global settings * @return true if successful, false otherwise */ - bool writeSettings( KConfigBase* pConfig, bool bGlobal ) const; + bool writeSettings( TDEConfigBase* pConfig, bool bGlobal ) const; /** * @internal -- this a wrapper function to diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index f654608ac..8e617b06a 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -108,19 +108,19 @@ void readXdgUserDirs(TQString *desktop, TQString *documents) int TDEGlobalSettings::dndEventDelay() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readNumEntry("StartDragDist", TQApplication::startDragDistance()); } bool TDEGlobalSettings::singleClick() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); } bool TDEGlobalSettings::iconUseRoundedRect() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("IconUseRoundedRect", KDE_DEFAULT_ICONTEXTROUNDED); } @@ -128,7 +128,7 @@ TDEGlobalSettings::TearOffHandle TDEGlobalSettings::insertTearOffHandle() { int tearoff; bool effectsenabled; - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); effectsenabled = g.readBoolEntry( "EffectsEnabled", false); tearoff = g.readNumEntry("InsertTearOffHandle", KDE_DEFAULT_INSERTTEAROFFHANDLES); return effectsenabled ? (TearOffHandle) tearoff : Disable; @@ -136,19 +136,19 @@ TDEGlobalSettings::TearOffHandle TDEGlobalSettings::insertTearOffHandle() bool TDEGlobalSettings::changeCursorOverIcon() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ChangeCursor", KDE_DEFAULT_CHANGECURSOR); } bool TDEGlobalSettings::visualActivate() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("VisualActivate", KDE_DEFAULT_VISUAL_ACTIVATE); } unsigned int TDEGlobalSettings::visualActivateSpeed() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry( "VisualActivateSpeed", @@ -160,14 +160,14 @@ unsigned int TDEGlobalSettings::visualActivateSpeed() int TDEGlobalSettings::autoSelectDelay() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry("AutoSelectDelay", KDE_DEFAULT_AUTOSELECTDELAY); } TDEGlobalSettings::Completion TDEGlobalSettings::completionMode() { int completion; - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); completion = g.readNumEntry("completionMode", -1); if ((completion < (int) CompletionNone) || (completion > (int) CompletionPopupAuto)) @@ -179,13 +179,13 @@ TDEGlobalSettings::Completion TDEGlobalSettings::completionMode() bool TDEGlobalSettings::showContextMenusOnPress () { - KConfigGroup g(TDEGlobal::config(), "ContextMenus"); + TDEConfigGroup g(TDEGlobal::config(), "ContextMenus"); return g.readBoolEntry("ShowOnPress", true); } int TDEGlobalSettings::contextMenuKey () { - KConfigGroup g(TDEGlobal::config(), "Shortcuts"); + TDEConfigGroup g(TDEGlobal::config(), "Shortcuts"); KShortcut cut (g.readEntry ("PopupMenuContext", "Menu")); return cut.keyCodeQt(); } @@ -193,7 +193,7 @@ int TDEGlobalSettings::contextMenuKey () TQColor TDEGlobalSettings::toolBarHighlightColor() { initColors(); - KConfigGroup g( TDEGlobal::config(), "Toolbar style" ); + TDEConfigGroup g( TDEGlobal::config(), "Toolbar style" ); return g.readColorEntry("HighlightColor", _trinity4Blue); } @@ -204,7 +204,7 @@ TQColor TDEGlobalSettings::inactiveTitleColor() #else if (!_inactiveBackground) _inactiveBackground = new TQColor(157, 170, 186); - KConfigGroup g( TDEGlobal::config(), "WM" ); + TDEConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "inactiveBackground", _inactiveBackground ); #endif } @@ -216,7 +216,7 @@ TQColor TDEGlobalSettings::inactiveTextColor() #else if (!_inactiveForeground) _inactiveForeground = new TQColor(221,221,221); - KConfigGroup g( TDEGlobal::config(), "WM" ); + TDEConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "inactiveForeground", _inactiveForeground ); #endif } @@ -229,7 +229,7 @@ TQColor TDEGlobalSettings::activeTitleColor() initColors(); if (!_activeBackground) _activeBackground = new TQColor(65,142,220); - KConfigGroup g( TDEGlobal::config(), "WM" ); + TDEConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "activeBackground", _activeBackground); #endif } @@ -239,14 +239,14 @@ TQColor TDEGlobalSettings::activeTextColor() #ifdef Q_WS_WIN return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)); #else - KConfigGroup g( TDEGlobal::config(), "WM" ); + TDEConfigGroup g( TDEGlobal::config(), "WM" ); return g.readColorEntry( "activeForeground", tqwhiteptr ); #endif } int TDEGlobalSettings::contrast() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry( "contrast", 7 ); } @@ -254,13 +254,13 @@ TQColor TDEGlobalSettings::buttonBackground() { if (!_buttonBackground) _buttonBackground = new TQColor(221,223,228); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "buttonBackground", _buttonBackground ); } TQColor TDEGlobalSettings::buttonTextColor() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "buttonForeground", tqblackptr ); } @@ -269,7 +269,7 @@ TQColor TDEGlobalSettings::buttonTextColor() // TDEApplication::kdisplaySetPalette() TQColor TDEGlobalSettings::baseColor() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "windowBackground", tqwhiteptr ); } @@ -278,7 +278,7 @@ TQColor TDEGlobalSettings::baseColor() // TDEApplication::kdisplaySetPalette() TQColor TDEGlobalSettings::textColor() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "windowForeground", tqblackptr ); } @@ -287,7 +287,7 @@ TQColor TDEGlobalSettings::textColor() // TDEApplication::kdisplaySetPalette() TQColor TDEGlobalSettings::highlightedTextColor() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "selectForeground", tqwhiteptr ); } @@ -299,14 +299,14 @@ TQColor TDEGlobalSettings::highlightColor() initColors(); if (!_selectBackground) _selectBackground = new TQColor(103,141,178); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "selectBackground", _selectBackground ); } TQColor TDEGlobalSettings::alternateBackgroundColor() { initColors(); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *alternateColor = calculateAlternateBackgroundColor( baseColor() ); return g.readColorEntry( "alternateBackground", alternateColor ); } @@ -330,7 +330,7 @@ TQColor TDEGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base bool TDEGlobalSettings::shadeSortColumn() { - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readBoolEntry( "shadeSortColumn", KDE_DEFAULT_SHADE_SORT_COLUMN ); } @@ -339,7 +339,7 @@ TQColor TDEGlobalSettings::linkColor() initColors(); if (!_linkColor) _linkColor = new TQColor(0,0,238); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "linkColor", _linkColor ); } @@ -347,7 +347,7 @@ TQColor TDEGlobalSettings::visitedLinkColor() { if (!_visitedLinkColor) _visitedLinkColor = new TQColor(82,24,139); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); return g.readColorEntry( "visitedLinkColor", _visitedLinkColor ); } @@ -361,7 +361,7 @@ TQFont TDEGlobalSettings::generalFont() _generalFont->setPointSize(10); _generalFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *_generalFont = g.readFontEntry("font", _generalFont); return *_generalFont; @@ -377,7 +377,7 @@ TQFont TDEGlobalSettings::fixedFont() _fixedFont->setPointSize(10); _fixedFont->setStyleHint(TQFont::TypeWriter); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *_fixedFont = g.readFontEntry("fixed", _fixedFont); return *_fixedFont; @@ -393,7 +393,7 @@ TQFont TDEGlobalSettings::toolBarFont() _toolBarFont->setPointSize(10); _toolBarFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *_toolBarFont = g.readFontEntry("toolBarFont", _toolBarFont); return *_toolBarFont; @@ -409,7 +409,7 @@ TQFont TDEGlobalSettings::menuFont() _menuFont->setPointSize(10); _menuFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *_menuFont = g.readFontEntry("menuFont", _menuFont); return *_menuFont; @@ -425,7 +425,7 @@ TQFont TDEGlobalSettings::windowTitleFont() _windowTitleFont->setPointSize(10); _windowTitleFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( TDEGlobal::config(), "WM" ); + TDEConfigGroup g( TDEGlobal::config(), "WM" ); *_windowTitleFont = g.readFontEntry("activeFont", _windowTitleFont); // inconsistency return *_windowTitleFont; @@ -441,7 +441,7 @@ TQFont TDEGlobalSettings::taskbarFont() _taskbarFont->setPointSize(10); _taskbarFont->setStyleHint(TQFont::SansSerif); - KConfigGroup g( TDEGlobal::config(), "General" ); + TDEConfigGroup g( TDEGlobal::config(), "General" ); *_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont); return *_taskbarFont; @@ -516,7 +516,7 @@ void TDEGlobalSettings::initStatic() // should be called initPaths(). Don't put s_trashPath = new TQString(); s_documentPath = new TQString(); - KConfigGroup g( TDEGlobal::config(), "Paths" ); + TDEConfigGroup g( TDEGlobal::config(), "Paths" ); // Read desktop and documents path using XDG_USER_DIRS readXdgUserDirs(s_desktopPath, s_documentPath); @@ -613,7 +613,7 @@ TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings() KMouseSettings & s = *s_mouseSettings; // for convenience #ifndef Q_WS_WIN - KConfigGroup g( TDEGlobal::config(), "Mouse" ); + TDEConfigGroup g( TDEGlobal::config(), "Mouse" ); TQString setting = g.readEntry("MouseButtonMapping"); if (setting == "RightHanded") s.handed = KMouseSettings::RightHanded; @@ -678,7 +678,7 @@ bool TDEGlobalSettings::isMultiHead() bool TDEGlobalSettings::wheelMouseZooms() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM ); } @@ -687,7 +687,7 @@ TQRect TDEGlobalSettings::splashScreenDesktopGeometry() TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(TDEGlobal::config(), "Windows"); + TDEConfigGroup group(TDEGlobal::config(), "Windows"); int scr = group.readNumEntry("Unmanaged", -3); if (group.readBoolEntry("XineramaEnabled", true) && scr != -2) { if (scr == -3) @@ -706,7 +706,7 @@ TQRect TDEGlobalSettings::desktopGeometry(const TQPoint& point) TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(TDEGlobal::config(), "Windows"); + TDEConfigGroup group(TDEGlobal::config(), "Windows"); if (group.readBoolEntry("XineramaEnabled", true) && group.readBoolEntry("XineramaPlacementEnabled", true)) { return dw->screenGeometry(dw->screenNumber(point)); @@ -723,7 +723,7 @@ TQRect TDEGlobalSettings::desktopGeometry(TQWidget* w) TQDesktopWidget *dw = TQApplication::desktop(); if (dw->isVirtualDesktop()) { - KConfigGroup group(TDEGlobal::config(), "Windows"); + TDEConfigGroup group(TDEGlobal::config(), "Windows"); if (group.readBoolEntry("XineramaEnabled", true) && group.readBoolEntry("XineramaPlacementEnabled", true)) { if (w) @@ -739,14 +739,14 @@ TQRect TDEGlobalSettings::desktopGeometry(TQWidget* w) bool TDEGlobalSettings::showIconsOnPushButtons() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ShowIconsOnPushButtons", KDE_DEFAULT_ICON_ON_PUSHBUTTON); } bool TDEGlobalSettings::showFilePreview(const KURL &url) { - KConfigGroup g(TDEGlobal::config(), "PreviewSettings"); + TDEConfigGroup g(TDEGlobal::config(), "PreviewSettings"); TQString protocol = url.protocol(); bool defaultSetting = KProtocolInfo::showFilePreview( protocol ); return g.readBoolEntry(protocol, defaultSetting ); @@ -754,21 +754,21 @@ bool TDEGlobalSettings::showFilePreview(const KURL &url) bool TDEGlobalSettings::showKonqIconActivationEffect() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("ShowKonqIconActivationEffect", KDE_DEFAULT_KONQ_ACTIVATION_EFFECT); } bool TDEGlobalSettings::opaqueResize() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readBoolEntry("OpaqueResize", KDE_DEFAULT_OPAQUE_RESIZE); } int TDEGlobalSettings::buttonLayout() { - KConfigGroup g( TDEGlobal::config(), "KDE" ); + TDEConfigGroup g( TDEGlobal::config(), "KDE" ); return g.readNumEntry("ButtonLayout", KDE_DEFAULT_BUTTON_LAYOUT); } diff --git a/tdecore/kglobalsettings.h b/tdecore/kglobalsettings.h index 2d3adc5e1..7a9c42900 100644 --- a/tdecore/kglobalsettings.h +++ b/tdecore/kglobalsettings.h @@ -241,7 +241,7 @@ class TDECORE_EXPORT TDEGlobalSettings /** * DEPRECATED (starting from kde-3.4). * This isn't where the trash contents is, anymore. - * Use KIO::trash() to trash files, "trash:/" to list the trash contents. + * Use TDEIO::trash() to trash files, "trash:/" to list the trash contents. */ static TQString trashPath() { initStatic(); return *s_trashPath; } // KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index 546ef99eb..4fd16a49a 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -63,7 +63,7 @@ KIconEffect::~KIconEffect() void KIconEffect::init() { - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); int i, j, effect=-1; TQStringList groups; @@ -86,7 +86,7 @@ void KIconEffect::init() TQString _none("none"); TQString _tomonochrome("tomonochrome"); - KConfigGroupSaver cs(config, "default"); + TDEConfigGroupSaver cs(config, "default"); for (it=groups.begin(), i=0; it!=groups.end(); it++, i++) { diff --git a/tdecore/kiconloader.cpp b/tdecore/kiconloader.cpp index 01aaa84fd..127f8eaba 100644 --- a/tdecore/kiconloader.cpp +++ b/tdecore/kiconloader.cpp @@ -214,8 +214,8 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) // These have to match the order in kicontheme.h static const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", "Panel", 0L }; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs(config, "dummy"); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs(config, "dummy"); // loading config and default sizes d->mpGroups = new KIconGroup[(int) KIcon::LastGroup]; diff --git a/tdecore/kiconloader.h b/tdecore/kiconloader.h index 9cac06c5d..2357aef13 100644 --- a/tdecore/kiconloader.h +++ b/tdecore/kiconloader.h @@ -33,7 +33,7 @@ struct KIconGroup; class KIconThemeNode; -class KConfig; +class TDEConfig; struct KIconLoaderPrivate; class KStandardDirs; class KIconEffect; diff --git a/tdecore/kicontheme.cpp b/tdecore/kicontheme.cpp index 103d37a05..853c0ab78 100644 --- a/tdecore/kicontheme.cpp +++ b/tdecore/kicontheme.cpp @@ -52,7 +52,7 @@ public: class KIconThemeDir { public: - KIconThemeDir(const TQString& dir, const KConfigBase *config); + KIconThemeDir(const TQString& dir, const TDEConfigBase *config); bool isValid() const { return mbValid; } TQString iconPath(const TQString& name) const; @@ -139,7 +139,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) // Use KSharedConfig to avoid parsing the file many times, from each kinstance. // Need to keep a ref to it to make this useful d->sharedConfig = KSharedConfig::openConfig( fileName, true /*readonly*/, false /*useKDEGlobals*/ ); - KConfig& cfg = *d->sharedConfig; + TDEConfig& cfg = *d->sharedConfig; //was: KSimpleConfig cfg(fileName); cfg.setGroup(mainSection); @@ -448,8 +448,8 @@ TQString KIconTheme::current() return *_theme; _theme = new TQString(); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver(config, "Icons"); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver(config, "Icons"); *_theme = config->readEntry("Theme",defaultThemeName()); if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName(); /* if (_theme->isEmpty()) @@ -516,7 +516,7 @@ TQString KIconTheme::defaultThemeName() /*** KIconThemeDir ***/ -KIconThemeDir::KIconThemeDir(const TQString& dir, const KConfigBase *config) +KIconThemeDir::KIconThemeDir(const TQString& dir, const TDEConfigBase *config) { mbValid = false; mDir = dir; diff --git a/tdecore/kicontheme.h b/tdecore/kicontheme.h index 9aa4d8e32..b20dd6340 100644 --- a/tdecore/kicontheme.h +++ b/tdecore/kicontheme.h @@ -19,7 +19,7 @@ #include <tqvaluelist.h> #include "tdelibs_export.h" -class KConfig; +class TDEConfig; class KIconThemeDir; class KIconThemePrivate; diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp index 13e29c049..9b4b7c2c7 100644 --- a/tdecore/kinstance.cpp +++ b/tdecore/kinstance.cpp @@ -195,7 +195,7 @@ void TDEInstance::setConfigReadOnly(bool ro) m_configReadOnly = ro; } -KConfig *TDEInstance::config() const +TDEConfig *TDEInstance::config() const { DEBUG_CHECK_ALIVE if( _config == 0 ) { diff --git a/tdecore/kinstance.h b/tdecore/kinstance.h index 775fe3bdf..8178fe9c5 100644 --- a/tdecore/kinstance.h +++ b/tdecore/kinstance.h @@ -20,7 +20,7 @@ class KStandardDirs; class TDEAboutData; -class KConfig; +class TDEConfig; class KIconLoader; class KCharsets; class TQFont; @@ -86,13 +86,13 @@ class TDECORE_EXPORT TDEInstance /** * Returns the general config object ("appnamerc"). - * @return the KConfig object for the instance. + * @return the TDEConfig object for the instance. */ - KConfig *config() const; + TDEConfig *config() const; /** * Returns the general config object ("appnamerc"). - * @return the KConfig object for the instance. + * @return the TDEConfig object for the instance. */ KSharedConfig *sharedConfig() const; @@ -165,7 +165,7 @@ protected: private: mutable KStandardDirs *_dirs; - mutable KConfig *_config; + mutable TDEConfig *_config; mutable KIconLoader *_iconLoader; mutable TDEHardwareDevices *_hardwaredevices; diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index d0ec7583d..e7673debb 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -361,7 +361,7 @@ bool initializeMods() XFreeModifiermap( xmk ); - //KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + //TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); // read in mod that win should be attached to g_bInitializedMods = true; @@ -380,7 +380,7 @@ static void initializeVariations() static void intializeKKeyLabels() { - KConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); + TDEConfigGroupSaver cgs( TDEGlobal::config(), "Keyboard" ); g_rgModInfo[0].sLabel = TDEGlobal::config()->readEntry( "Label Shift", i18n(g_rgModInfo[0].psName) ); g_rgModInfo[1].sLabel = TDEGlobal::config()->readEntry( "Label Ctrl", i18n(g_rgModInfo[1].psName) ); g_rgModInfo[2].sLabel = TDEGlobal::config()->readEntry( "Label Alt", i18n(g_rgModInfo[2].psName) ); diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index 6b64abbd8..4c60bed43 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -62,12 +62,12 @@ public: TQValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language TQString encoding; TQTextCodec * codecForEncoding; - KConfig * config; + TDEConfig * config; bool formatInited; int /*TQPrinter::PageSize*/ pageSize; KLocale::MeasureSystem measureSystem; TQStringList langTwoAlpha; - KConfig *languages; + TDEConfig *languages; TQString calendarType; KCalendarSystem * calendar; @@ -81,7 +81,7 @@ public: static KLocale *this_klocale = 0; -KLocale::KLocale( const TQString & catalog, KConfig * config ) +KLocale::KLocale( const TQString & catalog, TDEConfig * config ) { d = new KLocalePrivate; d->config = config; @@ -92,7 +92,7 @@ KLocale::KLocale( const TQString & catalog, KConfig * config ) initEncoding(0); initFileNameEncoding(0); - KConfig *cfg = d->config; + TDEConfig *cfg = d->config; this_klocale = this; if (!cfg) cfg = TDEGlobal::instance()->config(); this_klocale = 0; @@ -103,12 +103,12 @@ KLocale::KLocale( const TQString & catalog, KConfig * config ) initMainCatalogues(catalog); } -TQString KLocale::_initLanguage(KConfigBase *config) +TQString KLocale::_initLanguage(TDEConfigBase *config) { if (this_klocale) { // ### HPB Why this cast?? - this_klocale->initLanguageList((KConfig *) config, true); + this_klocale->initLanguageList((TDEConfig *) config, true); // todo: adapt current catalog list: remove unused languages, insert main catalogs, if not already found return this_klocale->language(); } @@ -144,9 +144,9 @@ void KLocale::initMainCatalogues(const TQString & catalog) } } -void KLocale::initLanguageList(KConfig * config, bool useEnv) +void KLocale::initLanguageList(TDEConfig * config, bool useEnv) { - KConfigGroupSaver saver(config, "Locale"); + TDEConfigGroupSaver saver(config, "Locale"); m_country = config->readEntry( "Country" ); if ( m_country.isEmpty() ) @@ -297,19 +297,19 @@ void KLocale::doFormatInit() const void KLocale::initFormat() { - KConfig *config = d->config; + TDEConfig *config = d->config; if (!config) config = TDEGlobal::instance()->config(); Q_ASSERT( config ); kdDebug(173) << "KLocale::initFormat" << endl; // make sure the config files are read using the correct locale - // ### Why not add a KConfigBase::setLocale( const KLocale * )? + // ### Why not add a TDEConfigBase::setLocale( const KLocale * )? // ### Then we could remove this hack KLocale *lsave = TDEGlobal::_locale; TDEGlobal::_locale = this; - KConfigGroupSaver saver(config, "Locale"); + TDEConfigGroupSaver saver(config, "Locale"); KSimpleConfig entry(locate("locale", TQString::fromLatin1("l10n/%1/entry.desktop") @@ -2054,7 +2054,7 @@ bool KLocale::useDefaultLanguage() const return language() == defaultLanguage(); } -void KLocale::initEncoding(KConfig *) +void KLocale::initEncoding(TDEConfig *) { const int mibDefault = 4; // ISO 8859-1 @@ -2070,7 +2070,7 @@ void KLocale::initEncoding(KConfig *) Q_ASSERT( d->codecForEncoding ); } -void KLocale::initFileNameEncoding(KConfig *) +void KLocale::initFileNameEncoding(TDEConfig *) { // If the following environment variable is set, assume all filenames // are in UTF-8 regardless of the current C locale. @@ -2325,7 +2325,7 @@ TQStringList KLocale::languagesTwoAlpha() const TQStringList result; - KConfig config(TQString::fromLatin1("language.codes"), true, false); + TDEConfig config(TQString::fromLatin1("language.codes"), true, false); config.setGroup("TwoLetterCodes"); for ( TQStringList::ConstIterator it = origList.begin(); @@ -2359,7 +2359,7 @@ TQStringList KLocale::languagesTwoAlpha() const TQStringList KLocale::allLanguagesTwoAlpha() const { if (!d->languages) - d->languages = new KConfig("all_languages", true, false, "locale"); + d->languages = new TDEConfig("all_languages", true, false, "locale"); return d->languages->groupList(); } @@ -2367,7 +2367,7 @@ TQStringList KLocale::allLanguagesTwoAlpha() const TQString KLocale::twoAlphaToLanguageName(const TQString &code) const { if (!d->languages) - d->languages = new KConfig("all_languages", true, false, "locale"); + d->languages = new TDEConfig("all_languages", true, false, "locale"); TQString groupName = code; const int i = groupName.find('_'); @@ -2393,7 +2393,7 @@ TQStringList KLocale::allCountriesTwoAlpha() const TQString KLocale::twoAlphaToCountryName(const TQString &code) const { - KConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale"); + TDEConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale"); cfg.setGroup("KCM Locale"); return cfg.readEntry("Name"); } diff --git a/tdecore/klocale.h b/tdecore/klocale.h index 42619afd4..7a8e05e98 100644 --- a/tdecore/klocale.h +++ b/tdecore/klocale.h @@ -32,8 +32,8 @@ class TQTime; class TQDateTime; class TDEGlobal; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KLocalePrivate; class KCatalogue; class KCalendarSystem; @@ -141,7 +141,7 @@ public: * @param catalog The name of the main language file * @param config The configuration file to use. */ - KLocale( const TQString& catalog, KConfig *config = 0 ); + KLocale( const TQString& catalog, TDEConfig *config = 0 ); /** * Copy constructor. @@ -1138,9 +1138,9 @@ public: /** - * @internal Called from KConfigBackend to initialize language. + * @internal Called from TDEConfigBackend to initialize language. */ - static TQString _initLanguage(KConfigBase *config); + static TQString _initLanguage(TDEConfigBase *config); #ifdef KDE_NO_COMPAT private: @@ -1185,7 +1185,7 @@ private: * * @param config The configuration object used for init. */ - void initFormat(KConfig *config); + void initFormat(TDEConfig *config); /** * @internal Initializes the catalogs appname, tdelibs and kio for all chosen languages. @@ -1203,20 +1203,20 @@ private: * @param config The configuration object used for init * @param useEnv True if we should use environment variables */ - void initLanguageList(KConfig * config, bool useEnv); + void initLanguageList(TDEConfig * config, bool useEnv); /** * @internal Figures out which encoding the user prefers. * * @param config The configuration object used for init */ - void initEncoding(KConfig * config); + void initEncoding(TDEConfig * config); /** * @internal Figures out which encoding the user prefers for filenames * and sets up the appropriate TQFile encoding and decoding functions. */ - void initFileNameEncoding(KConfig *config); + void initFileNameEncoding(TDEConfig *config); /** * @internal A TQFile filename encoding function (TQFile::encodeFn). diff --git a/tdecore/knotifyclient.cpp b/tdecore/knotifyclient.cpp index e84c8c44a..e5d088dcb 100644 --- a/tdecore/knotifyclient.cpp +++ b/tdecore/knotifyclient.cpp @@ -51,12 +51,12 @@ static bool canAvoidStartupEvent( const TQString& event, const TQString& appname return false; } // starttde event is in global events file - static KConfig* configfile = appname != "ksmserver" - ? new KConfig( appname + ".eventsrc", true, false ) - : new KConfig( "knotify.eventsrc", true, false ); - static KConfig* eventsfile = appname != "ksmserver" - ? new KConfig( appname + "/eventsrc", true, false, "data" ) - : new KConfig( "knotify/eventsrc", true, false, "data" ); + static TDEConfig* configfile = appname != "ksmserver" + ? new TDEConfig( appname + ".eventsrc", true, false ) + : new TDEConfig( "knotify.eventsrc", true, false ); + static TDEConfig* eventsfile = appname != "ksmserver" + ? new TDEConfig( appname + "/eventsrc", true, false, "data" ) + : new TDEConfig( "knotify/eventsrc", true, false, "data" ); configfile->setGroup( event ); eventsfile->setGroup( event ); int ev1 = configfile->readNumEntry( "presentation", -2 ); @@ -178,7 +178,7 @@ int KNotifyClient::getPresentation(const TQString &eventname) int present; if (eventname.isEmpty()) return Default; - KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false); + TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false); eventsfile.setGroup(eventname); present=eventsfile.readNumEntry("presentation", -1); @@ -190,7 +190,7 @@ TQString KNotifyClient::getFile(const TQString &eventname, int present) { if (eventname.isEmpty()) return TQString::null; - KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false); + TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false); eventsfile.setGroup(eventname); switch (present) @@ -209,7 +209,7 @@ int KNotifyClient::getDefaultPresentation(const TQString &eventname) int present; if (eventname.isEmpty()) return Default; - KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data"); + TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data"); eventsfile.setGroup(eventname); present=eventsfile.readNumEntry("default_presentation", -1); @@ -221,7 +221,7 @@ TQString KNotifyClient::getDefaultFile(const TQString &eventname, int present) { if (eventname.isEmpty()) return TQString::null; - KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data"); + TDEConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data"); eventsfile.setGroup(eventname); switch (present) @@ -332,8 +332,8 @@ KNotifyClient::Instance::Instance(TDEInstance *instance) d->instance = instance; instances()->push(this); - KConfig *config = instance->config(); - KConfigGroupSaver cs( config, "General" ); + TDEConfig *config = instance->config(); + TDEConfigGroupSaver cs( config, "General" ); d->useSystemBell = config->readBoolEntry( "UseSystemBell", false ); } diff --git a/tdecore/krootprop.h b/tdecore/krootprop.h index 002790ca4..f1a72d265 100644 --- a/tdecore/krootprop.h +++ b/tdecore/krootprop.h @@ -33,14 +33,14 @@ class KRootPropPrivate; /** * Access KDE desktop resources stored on the root window. * -* A companion to the KConfig class. +* A companion to the TDEConfig class. * * The KRootProp class is used for reading and writing configuration entries * to properties on the root window. * * All configuration entries are of the form "key=value". * -* @see KConfig::KConfig +* @see TDEConfig::TDEConfig * @author Mark Donohoe (donohe@kde.org) */ class TDECORE_EXPORT KRootProp diff --git a/tdecore/kshortcutlist.cpp b/tdecore/kshortcutlist.cpp index 9666f7aab..fcfc48b48 100644 --- a/tdecore/kshortcutlist.cpp +++ b/tdecore/kshortcutlist.cpp @@ -68,7 +68,7 @@ bool KShortcutList::setOther( Other, uint, TQVariant ) return false; } -bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) +bool KShortcutList::readSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) @@ -84,7 +84,7 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo kdDebug(125) << "\treadSettings( \"" << sGroup << "\", " << pConfig << " )" << endl; if( !pConfig->hasGroup( sGroup ) ) return true; - KConfigGroupSaver cgs( pConfig, sGroup ); + TDEConfigGroupSaver cgs( pConfig, sGroup ); uint nSize = count(); for( uint i = 0; i < nSize; i++ ) { @@ -106,7 +106,7 @@ bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pCo return true; } -bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const +bool KShortcutList::writeSettings( const TQString &sConfigGroup, TDEConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const { kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl; if( !pConfig ) @@ -118,7 +118,7 @@ bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pC if( pConfig->hasGroup( "Keys" ) ) pConfig->deleteGroup( "Keys", true ); - KConfigGroupSaver cs( pConfig, sGroup ); + TDEConfigGroupSaver cs( pConfig, sGroup ); uint nSize = count(); for( uint i = 0; i < nSize; i++ ) { diff --git a/tdecore/kshortcutlist.h b/tdecore/kshortcutlist.h index 497bfaf15..7f4caa079 100644 --- a/tdecore/kshortcutlist.h +++ b/tdecore/kshortcutlist.h @@ -25,7 +25,7 @@ #include "tdelibs_export.h" class TQVariant; -class KConfigBase; +class TDEConfigBase; class TDEInstance; class KKeySequence; class KShortcut; @@ -162,7 +162,7 @@ class TDECORE_EXPORT KShortcutList * @param pConfig the configuration file to load from * @return true if successful, false otherwise */ - virtual bool readSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ); + virtual bool readSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ); /** * Writes the shortcuts to the given configuration file. @@ -173,7 +173,7 @@ class TDECORE_EXPORT KShortcutList * @param bGlobal true to write to the global configuration file * @return true if successful, false otherwise */ - virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0, + virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0, bool bWriteAll = false, bool bGlobal = false ) const; protected: diff --git a/tdecore/ksimpleconfig.cpp b/tdecore/ksimpleconfig.cpp index 5c17b665d..5c0203a9f 100644 --- a/tdecore/ksimpleconfig.cpp +++ b/tdecore/ksimpleconfig.cpp @@ -38,9 +38,9 @@ #include "ksimpleconfig.h" KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly) - : KConfig(TQString::fromLatin1(""), bReadOnly, false) + : TDEConfig(TQString::fromLatin1(""), bReadOnly, false) { - // the difference between KConfig and KSimpleConfig is just that + // the difference between TDEConfig and KSimpleConfig is just that // for KSimpleConfig an absolute filename is guaranteed if (!fileName.isNull() && TQDir::isRelativePath(fileName)) { backEnd->changeFileName( TDEGlobal::dirs()-> @@ -52,16 +52,16 @@ KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly) reparseConfiguration(); } -KSimpleConfig::KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly) - : KConfig(backEnd, bReadOnly) +KSimpleConfig::KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly) + : TDEConfig(backEnd, bReadOnly) {} KSimpleConfig::~KSimpleConfig() { // we need to call the KSimpleConfig version of sync. Relying on the - // regular KConfig sync is bad, because the KSimpleConfig sync has + // regular TDEConfig sync is bad, because the KSimpleConfig sync has // different behavior. Syncing here will insure that the sync() call - // in the KConfig destructor doesn't actually do anything. + // in the TDEConfig destructor doesn't actually do anything. sync(); } @@ -76,6 +76,6 @@ void KSimpleConfig::sync() } void KSimpleConfig::virtual_hook( int id, void* data ) -{ KConfig::virtual_hook( id, data ); } +{ TDEConfig::virtual_hook( id, data ); } #include "ksimpleconfig.moc" diff --git a/tdecore/ksimpleconfig.h b/tdecore/ksimpleconfig.h index c7efeecfa..326fc8094 100644 --- a/tdecore/ksimpleconfig.h +++ b/tdecore/ksimpleconfig.h @@ -28,17 +28,17 @@ class KSimpleConfigPrivate; /** * KDE Configuration entries * - * This is a trivial extension of KConfig for applications that need + * This is a trivial extension of TDEConfig for applications that need * only one configuration file and no default system. - * A difference with KConfig is that when the data in memory is written back + * A difference with TDEConfig is that when the data in memory is written back * it is not merged with what is on disk. * Whatever is in memory simply replaces what is on disk entirely. * * @author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org> - * @see KConfigBase KConfig + * @see TDEConfigBase TDEConfig * @short KDE Configuration Management class with deletion ability */ -class TDECORE_EXPORT KSimpleConfig : public KConfig +class TDECORE_EXPORT KSimpleConfig : public TDEConfig { Q_OBJECT @@ -55,7 +55,7 @@ public: */ KSimpleConfig( const TQString &fileName, bool bReadOnly = false); - KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly = false); + KSimpleConfig(TDEConfigBackEnd *backEnd, bool bReadOnly = false); /** * Destructor. diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index 9552c4104..08d686beb 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -214,7 +214,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() delayRemove = false; m_ref = 0; - KConfigGroup config(TDEGlobal::config(), TQCString("DirWatch")); + TDEConfigGroup config(TDEGlobal::config(), TQCString("DirWatch")); m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000); m_PollInterval = config.readNumEntry("PollInterval", 500); diff --git a/tdecore/ksock.cpp b/tdecore/ksock.cpp index 10c694512..96526463a 100644 --- a/tdecore/ksock.cpp +++ b/tdecore/ksock.cpp @@ -89,21 +89,21 @@ extern "C" { #include "tqwindowdefs.h" #endif -class KSocketPrivate +class TDESocketPrivate { public: TQSocketNotifier *readNotifier; TQSocketNotifier *writeNotifier; - KSocketPrivate() : + TDESocketPrivate() : readNotifier(0), writeNotifier(0) { } }; // I moved this into here so we could accurately detect the domain, for // posterity. Really. -KSocket::KSocket( int _sock) - : sock(_sock), d(new KSocketPrivate) +TDESocket::TDESocket( int _sock) + : sock(_sock), d(new TDESocketPrivate) { struct sockaddr_in sin; ksocklen_t len = sizeof(sin); @@ -116,19 +116,19 @@ KSocket::KSocket( int _sock) KSocks::self()->getsockname(_sock, (struct sockaddr *)&sin, &len); } -KSocket::KSocket( const char *_host, unsigned short int _port, int _timeout ) : - sock( -1 ), d(new KSocketPrivate) +TDESocket::TDESocket( const char *_host, unsigned short int _port, int _timeout ) : + sock( -1 ), d(new TDESocketPrivate) { connect( _host, _port, _timeout ); } -KSocket::KSocket( const char *_path ) : - sock( -1 ), d(new KSocketPrivate) +TDESocket::TDESocket( const char *_path ) : + sock( -1 ), d(new TDESocketPrivate) { connect( _path ); } -void KSocket::enableRead( bool _state ) +void TDESocket::enableRead( bool _state ) { if ( _state ) { @@ -144,7 +144,7 @@ void KSocket::enableRead( bool _state ) d->readNotifier->setEnabled( false ); } -void KSocket::enableWrite( bool _state ) +void TDESocket::enableWrite( bool _state ) { if ( _state ) { @@ -161,7 +161,7 @@ void KSocket::enableWrite( bool _state ) d->writeNotifier->setEnabled( false ); } -void KSocket::slotRead( int ) +void TDESocket::slotRead( int ) { char buffer[2]; @@ -172,7 +172,7 @@ void KSocket::slotRead( int ) emit readEvent( this ); } -void KSocket::slotWrite( int ) +void TDESocket::slotWrite( int ) { emit writeEvent( this ); } @@ -180,7 +180,7 @@ void KSocket::slotWrite( int ) /* * Connects the PF_UNIX domain socket to _path. */ -bool KSocket::connect( const char *_path ) +bool TDESocket::connect( const char *_path ) { KExtendedSocket ks(TQString::null, _path, KExtendedSocket::unixSocket); @@ -194,7 +194,7 @@ bool KSocket::connect( const char *_path ) /* * Connects the socket to _host, _port. */ -bool KSocket::connect( const TQString& _host, unsigned short int _port, int _timeout ) +bool TDESocket::connect( const TQString& _host, unsigned short int _port, int _timeout ) { KExtendedSocket ks(_host, _port, KExtendedSocket::inetSocket); ks.setTimeout(_timeout, 0); @@ -208,10 +208,10 @@ bool KSocket::connect( const TQString& _host, unsigned short int _port, int _tim // only for doxygen - the define is always true as defined above #ifdef KSOCK_NO_BROKEN -unsigned long KSocket::ipv4_addr() +unsigned long TDESocket::ipv4_addr() { unsigned long retval = 0; - KSocketAddress *sa = KExtendedSocket::peerAddress(sock); + TDESocketAddress *sa = KExtendedSocket::peerAddress(sock); if (sa == NULL) return 0; @@ -230,12 +230,12 @@ unsigned long KSocket::ipv4_addr() return retval; } -bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, unsigned short int port, int domain) +bool TDESocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, unsigned short int port, int domain) { // This function is now IPv4 only // if you want something better, you should use KExtendedSocket::lookup yourself - kdWarning(170) << "deprecated KSocket::initSockaddr called" << endl; + kdWarning(170) << "deprecated TDESocket::initSockaddr called" << endl; if (domain != PF_INET) return false; @@ -255,13 +255,13 @@ bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, uns return false; memcpy(server_name, sin->addressV4(), sizeof(*server_name)); - kdDebug(170) << "KSocket::initSockaddr: returning " << sin->pretty() << endl; + kdDebug(170) << "TDESocket::initSockaddr: returning " << sin->pretty() << endl; return true; } #endif -KSocket::~KSocket() +TDESocket::~TDESocket() { // Coolo says delete 0 is ok :) -thiago delete d->readNotifier; @@ -274,7 +274,7 @@ KSocket::~KSocket() } } -class KServerSocketPrivate +class TDEServerSocketPrivate { public: bool bind; @@ -284,25 +284,25 @@ public: }; -KServerSocket::KServerSocket( const char *_path, bool _bind ) : +TDEServerSocket::TDEServerSocket( const char *_path, bool _bind ) : sock( -1 ) { - d = new KServerSocketPrivate(); + d = new TDEServerSocketPrivate(); d->bind = _bind; init ( _path ); } -KServerSocket::KServerSocket( unsigned short int _port, bool _bind ) : +TDEServerSocket::TDEServerSocket( unsigned short int _port, bool _bind ) : sock( -1 ) { - d = new KServerSocketPrivate(); + d = new TDEServerSocketPrivate(); d->bind = _bind; init ( _port ); } -bool KServerSocket::init( const char *_path ) +bool TDEServerSocket::init( const char *_path ) { unlink(_path ); d->path = _path; @@ -317,7 +317,7 @@ bool KServerSocket::init( const char *_path ) } -bool KServerSocket::init( unsigned short int _port ) +bool TDEServerSocket::init( unsigned short int _port ) { d->port = _port; KExtendedSocket *ks; @@ -330,7 +330,7 @@ bool KServerSocket::init( unsigned short int _port ) return true; } -bool KServerSocket::bindAndListen() +bool TDEServerSocket::bindAndListen() { if (d == NULL || d->ks == NULL) return false; @@ -354,11 +354,11 @@ bool KServerSocket::bindAndListen() } -unsigned short int KServerSocket::port() +unsigned short int TDEServerSocket::port() { if (d == NULL || d->ks == NULL || sock == -1) return 0; - const KSocketAddress *sa = d->ks->localAddress(); + const TDESocketAddress *sa = d->ks->localAddress(); if (sa == NULL) return 0; @@ -378,11 +378,11 @@ unsigned short int KServerSocket::port() return 0; // not a port we know } -unsigned long KServerSocket::ipv4_addr() +unsigned long TDEServerSocket::ipv4_addr() { if (d == NULL || d->ks == NULL || sock == -1) return 0; - const KSocketAddress *sa = d->ks->localAddress(); + const TDESocketAddress *sa = d->ks->localAddress(); const sockaddr_in *sin = (sockaddr_in*)sa->address(); @@ -401,7 +401,7 @@ unsigned long KServerSocket::ipv4_addr() return 0; // this is dumb, isn't it? } -void KServerSocket::slotAccept( int ) +void TDEServerSocket::slotAccept( int ) { if (d == NULL || d->ks == NULL || sock == -1) return; // nothing! @@ -417,10 +417,10 @@ void KServerSocket::slotAccept( int ) s->release(); // we're getting rid of the KExtendedSocket delete s; - emit accepted( new KSocket( new_sock ) ); + emit accepted( new TDESocket( new_sock ) ); } -KServerSocket::~KServerSocket() +TDEServerSocket::~TDEServerSocket() { if (d != NULL) { diff --git a/tdecore/ksock.h b/tdecore/ksock.h index d6e4515ea..cdf4ad1ac 100644 --- a/tdecore/ksock.h +++ b/tdecore/ksock.h @@ -65,8 +65,8 @@ typedef sockaddr_in ksockaddr_in; #define KSOCK_DEFAULT_DOMAIN PF_INET -class KSocketPrivate; -class KServerSocketPrivate; +class TDESocketPrivate; +class TDEServerSocketPrivate; /** @deprecated * You can connect this socket to any Internet address. @@ -79,7 +79,7 @@ class KServerSocketPrivate; * Using socket() you get a file descriptor * which you can use with the usual UNIX function like write() or * read(). - * If you have already such a socket identifier you can construct a KSocket + * If you have already such a socket identifier you can construct a TDESocket * on this identifier. * * If socket() delivers a value of -1 or less, the connection @@ -88,33 +88,33 @@ class KServerSocketPrivate; * @author Torben Weis <weis@uni-frankfurt.de> * @short A TCP/IP client socket. */ -class TDECORE_EXPORT KSocket : public TQObject +class TDECORE_EXPORT TDESocket : public TQObject { Q_OBJECT public: /** - * Constructs a KSocket with the provided file descriptor. + * Constructs a TDESocket with the provided file descriptor. * @param _sock The file descriptor to use. */ - KSocket( int _sock ) KDE_DEPRECATED; + TDESocket( int _sock ) KDE_DEPRECATED; /** * Creates a socket and connects to a host. * @param _host The remote host to which to connect. * @param _port The port on the remote host. * @param timeOut The number of seconds waiting for connect (default 30). */ - KSocket( const char *_host, unsigned short int _port, int timeOut = 30) KDE_DEPRECATED; + TDESocket( const char *_host, unsigned short int _port, int timeOut = 30) KDE_DEPRECATED; /** * Connects to a UNIX domain socket. * @param _path The filename of the socket. */ - KSocket( const char * _path ) KDE_DEPRECATED; + TDESocket( const char * _path ) KDE_DEPRECATED; /** * Destructor. Closes the socket if it is still open. */ - virtual ~KSocket(); + virtual ~TDESocket(); /** * Returns a file descriptor for this socket. @@ -171,9 +171,9 @@ signals: * * This signal will only be raised if enableRead( @p true ) was called * first. - * @param s the KSocket that triggered the event + * @param s the TDESocket that triggered the event */ - void readEvent( KSocket *s ); + void readEvent( TDESocket *s ); /** * Socket is ready for writing. @@ -184,15 +184,15 @@ signals: * Warning: If you forget to call enableWrite(false) when you are * not ready to send data, you will get lots of writeEvent() signals, * in the order of thousands a second ! - * @param s the KSocket that triggered the event + * @param s the TDESocket that triggered the event */ - void writeEvent( KSocket *s ); + void writeEvent( TDESocket *s ); /** * Raised when the connection is broken. - * @param s the KSocket that triggered the event + * @param s the TDESocket that triggered the event */ - void closeEvent( KSocket *s ); + void closeEvent( TDESocket *s ); public slots: /** @@ -224,10 +224,10 @@ protected: int sock; private: - KSocket(const KSocket&); - KSocket& operator=(const KSocket&); + TDESocket(const TDESocket&); + TDESocket& operator=(const TDESocket&); - KSocketPrivate *d; + TDESocketPrivate *d; }; @@ -239,19 +239,19 @@ private: * This class is deprecated and will be removed in the future. * Please use the classes in KNetwork for new programs. * In special, this class is replaced by KNetwork::KStreamSocket - * and KNetwork::KServerSocket. + * and KNetwork::TDEServerSocket. * - * You can use a KServerSocket to listen on a port for incoming - * connections. When a connection arrived in the port, a KSocket + * You can use a TDEServerSocket to listen on a port for incoming + * connections. When a connection arrived in the port, a TDESocket * is created and the signal accepted is raised. Make sure you * always connect to this signal. If you don't the ServerSocket will - * create new KSocket's and no one will delete them! + * create new TDESocket's and no one will delete them! * * If socket() is -1 or less the socket was not created properly. * * @author Torben Weis <weis@stud.uni-frankfurt.de> */ -class TDECORE_EXPORT KServerSocket : public TQObject +class TDECORE_EXPORT TDEServerSocket : public TQObject { Q_OBJECT public: @@ -262,7 +262,7 @@ public: * This gives you the opportunity to set options on the * socket. */ - KServerSocket( unsigned short int _port, bool _bind = true ); + TDEServerSocket( unsigned short int _port, bool _bind = true ); /** * Creates a UNIX domain server socket. @@ -271,12 +271,12 @@ public: * This gives you the opportunity to set options on the * socket. */ - KServerSocket( const char *_path, bool _bind = true); + TDEServerSocket( const char *_path, bool _bind = true); /** * Destructor. Closes the socket if it was not already closed. */ - virtual ~KServerSocket(); + virtual ~TDEServerSocket(); /** * Binds the socket and start listening. This should only be called @@ -319,14 +319,14 @@ public slots: signals: /** * A connection has been accepted. - * It is your task to delete the KSocket if it is no longer needed. + * It is your task to delete the TDESocket if it is no longer needed. * * WARNING: this signal is always emitted, even if you don't connect - * anything to it. That would mean memory loss, because the KSockets + * anything to it. That would mean memory loss, because the TDESockets * created go to oblivion. * @param s the socket that accepted */ - void accepted( KSocket*s ); + void accepted( TDESocket*s ); protected: bool init( unsigned short int ); @@ -339,10 +339,10 @@ protected: int sock; private: - KServerSocket(const KServerSocket&); - KServerSocket& operator=(const KServerSocket&); + TDEServerSocket(const TDEServerSocket&); + TDEServerSocket& operator=(const TDEServerSocket&); - KServerSocketPrivate *d; + TDEServerSocketPrivate *d; }; #endif //Q_OS_UNIX diff --git a/tdecore/ksockaddr.cpp b/tdecore/ksockaddr.cpp index 899f32dba..cd2f9c93c 100644 --- a/tdecore/ksockaddr.cpp +++ b/tdecore/ksockaddr.cpp @@ -77,10 +77,10 @@ /** - * Class KSocketAddress + * Class TDESocketAddress */ -KSocketAddress::KSocketAddress(const sockaddr* sa, ksocklen_t size) +TDESocketAddress::TDESocketAddress(const sockaddr* sa, ksocklen_t size) { if ( !sa ) init(); @@ -94,44 +94,44 @@ KSocketAddress::KSocketAddress(const sockaddr* sa, ksocklen_t size) } } -void KSocketAddress::init() +void TDESocketAddress::init() { data = NULL; datasize = 0; owndata = false; } -KSocketAddress::~KSocketAddress() +TDESocketAddress::~TDESocketAddress() { if (owndata && data != NULL) free(data); } -TQString KSocketAddress::pretty() const +TQString TDESocketAddress::pretty() const { return i18n("<unknown socket>"); } -int KSocketAddress::family() const +int TDESocketAddress::family() const { if (data != NULL) return data->sa_family; return AF_UNSPEC; } -// This creates a new KSocketAddress with given sockaddr -KSocketAddress* KSocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t size) +// This creates a new TDESocketAddress with given sockaddr +TDESocketAddress* TDESocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t size) { if (size == 0) { - kdWarning() << "KSocketAddress::newAddress called with size = 0!\n"; + kdWarning() << "TDESocketAddress::newAddress called with size = 0!\n"; return NULL; } // make sure we have the right stuff if (size < MIN_SOCKADDR_LEN) { - kdWarning() << "KSocketAddress::newAddress called with invalid size\n"; + kdWarning() << "TDESocketAddress::newAddress called with invalid size\n"; return NULL; } @@ -153,10 +153,10 @@ KSocketAddress* KSocketAddress::newAddress(const struct sockaddr* sa, ksocklen_t return new KUnixSocketAddress((const sockaddr_un*)sa, size); } - return new KSocketAddress(sa, size); + return new TDESocketAddress(sa, size); } -bool KSocketAddress::isEqual(const KSocketAddress& other) const +bool TDESocketAddress::isEqual(const TDESocketAddress& other) const { switch(family()) { @@ -176,7 +176,7 @@ bool KSocketAddress::isEqual(const KSocketAddress& other) const return memcmp(data, other.data, datasize) == 0; } -bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const +bool TDESocketAddress::isCoreEqual(const TDESocketAddress& other) const { switch(family()) { @@ -193,17 +193,17 @@ bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const return false; } -TQString KSocketAddress::nodeName() const +TQString TDESocketAddress::nodeName() const { return TQString::null; } -TQString KSocketAddress::serviceName() const +TQString TDESocketAddress::serviceName() const { return TQString::null; } -int KSocketAddress::ianaFamily(int af) +int TDESocketAddress::ianaFamily(int af) { switch (af) { @@ -218,7 +218,7 @@ int KSocketAddress::ianaFamily(int af) } } -int KSocketAddress::fromIanaFamily(int iana) +int TDESocketAddress::fromIanaFamily(int iana) { switch (iana) { @@ -274,7 +274,7 @@ KInetSocketAddress::KInetSocketAddress() : } KInetSocketAddress::KInetSocketAddress(const KInetSocketAddress &other) : - KSocketAddress(), d(new KInetSocketAddressPrivate) + TDESocketAddress(), d(new KInetSocketAddressPrivate) { setAddress(other); } @@ -313,7 +313,7 @@ KInetSocketAddress::~KInetSocketAddress() { delete d; - // KSocketAddress::~KSocketAddress(); + // TDESocketAddress::~TDESocketAddress(); } bool KInetSocketAddress::setAddress(const KInetSocketAddress &other) @@ -626,7 +626,7 @@ ksocklen_t KInetSocketAddress::size() const return 0; } -bool KInetSocketAddress::areEqualInet(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly) +bool KInetSocketAddress::areEqualInet(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly) { if (s1.family() != s2.family()) return false; @@ -643,7 +643,7 @@ bool KInetSocketAddress::areEqualInet(const KSocketAddress &s1, const KSocketAdd (memcmp(&sin1->sin_addr, &sin2->sin_addr, sizeof(struct in_addr)) == 0); } -bool KInetSocketAddress::areEqualInet6(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly) +bool KInetSocketAddress::areEqualInet6(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly) { #ifdef AF_INET6 if (s1.family() != s2.family()) @@ -688,7 +688,7 @@ void KInetSocketAddress::fromV4() # endif #endif - // data == KSocketAddress::data + // data == TDESocketAddress::data data = (sockaddr*)&d->sin; datasize = sizeof( sockaddr_in ); } @@ -864,7 +864,7 @@ const sockaddr_un* KUnixSocketAddress::address() const return d->m_sun; } -bool KUnixSocketAddress::areEqualUnix(const KSocketAddress &s1, const KSocketAddress &s2, bool /* coreOnly */) +bool KUnixSocketAddress::areEqualUnix(const TDESocketAddress &s1, const TDESocketAddress &s2, bool /* coreOnly */) { if (s1.family() != s2.family()) return false; @@ -881,14 +881,14 @@ bool KUnixSocketAddress::areEqualUnix(const KSocketAddress &s1, const KSocketAdd return (strcmp(sun1->sun_path, sun2->sun_path) == 0); } -void KSocketAddress::virtual_hook( int, void* ) +void TDESocketAddress::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KInetSocketAddress::virtual_hook( int id, void* data ) -{ KSocketAddress::virtual_hook( id, data ); } +{ TDESocketAddress::virtual_hook( id, data ); } void KUnixSocketAddress::virtual_hook( int id, void* data ) -{ KSocketAddress::virtual_hook( id, data ); } +{ TDESocketAddress::virtual_hook( id, data ); } #include "ksockaddr.moc" diff --git a/tdecore/ksockaddr.h b/tdecore/ksockaddr.h index fd73e722a..d3eb62d0d 100644 --- a/tdecore/ksockaddr.h +++ b/tdecore/ksockaddr.h @@ -34,7 +34,7 @@ struct sockaddr; class KExtendedSocket; // No need to define it fully -class KSocketAddressPrivate; +class TDESocketAddressPrivate; /** * A socket address. * @@ -43,27 +43,27 @@ class KSocketAddressPrivate; * @author Thiago Macieira <thiago.macieira@kdemail.net> * @short a socket address. */ -class TDECORE_EXPORT KSocketAddress: public TQObject +class TDECORE_EXPORT TDESocketAddress: public TQObject { Q_OBJECT protected: /** * Creates an empty class */ - KSocketAddress() { init(); } + TDESocketAddress() { init(); } /** * Creates with given data * @param sa a sockaddr structure * @param size the size of @p sa */ - KSocketAddress(const sockaddr* sa, ksocklen_t size); + TDESocketAddress(const sockaddr* sa, ksocklen_t size); public: /** * Destructor. */ - virtual ~KSocketAddress(); + virtual ~TDESocketAddress(); /** * Returns a string representation of this socket. @@ -112,15 +112,15 @@ public: * @param other the other socket * @return true if both sockets are equal */ - virtual bool isEqual(const KSocketAddress& other) const; - bool isEqual(const KSocketAddress* other) const + virtual bool isEqual(const TDESocketAddress& other) const; + bool isEqual(const TDESocketAddress* other) const { return isEqual(*other); } /** * Overloaded == operator. * @see isEqual() */ - bool operator==(const KSocketAddress& other) const + bool operator==(const TDESocketAddress& other) const { return isEqual(other); } /** @@ -133,7 +133,7 @@ public: * @param other the other socket * @return true if the code part is equal */ - bool isCoreEqual(const KSocketAddress& other) const; + bool isCoreEqual(const TDESocketAddress& other) const; /** * Some sockets may differ in such things as services or port numbers, @@ -145,7 +145,7 @@ public: * @param other the other socket * @return true if the code part is equal */ - bool isCoreEqual(const KSocketAddress* other) const + bool isCoreEqual(const TDESocketAddress* other) const { return isCoreEqual(*other); } /** @@ -174,18 +174,18 @@ protected: private: void init(); /* No copy constructor */ - KSocketAddress(KSocketAddress&); - KSocketAddress& operator=(KSocketAddress&); + TDESocketAddress(TDESocketAddress&); + TDESocketAddress& operator=(TDESocketAddress&); public: /** - * Creates a new KSocketAddress or descendant class from given + * Creates a new TDESocketAddress or descendant class from given * raw socket address. * @param sa new socket address * @param size new socket address's length - * @return the new KSocketAddress, or 0 if the function failed + * @return the new TDESocketAddress, or 0 if the function failed */ - static KSocketAddress* newAddress(const struct sockaddr *sa, ksocklen_t size); + static TDESocketAddress* newAddress(const struct sockaddr *sa, ksocklen_t size); /** * Returns the IANA family number of the given address family. @@ -206,7 +206,7 @@ public: protected: virtual void virtual_hook( int id, void* data ); private: - KSocketAddressPrivate* d; + TDESocketAddressPrivate* d; }; /* @@ -224,13 +224,13 @@ class KInetSocketAddressPrivate; * * This is an IPv4 or IPv6 address of the Internet * - * This class inherits most of the functionality from KSocketAddress, but + * This class inherits most of the functionality from TDESocketAddress, but * is targeted specifically to Internet addresses * * @author Thiago Macieira <thiago.macieira@kdemail.net> * @short an Internet socket address */ -class TDECORE_EXPORT KInetSocketAddress: public ::KSocketAddress +class TDECORE_EXPORT KInetSocketAddress: public ::TDESocketAddress { Q_OBJECT public: @@ -485,10 +485,10 @@ public: * the address) * @return true if the given addresses are equal. * @see areEqualInet6() - * @see KSocketAddress::isEqual() - * @see KSocketAddress::isCoreEqual() + * @see TDESocketAddress::isEqual() + * @see TDESocketAddress::isCoreEqual() */ - static bool areEqualInet(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly); + static bool areEqualInet(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly); /** * Compares two IPv6 addresses. @@ -498,10 +498,10 @@ public: * the address) * @return true if the given addresses are equal. * @see areEqualInet() - * @see KSocketAddress::isEqual() - * @see KSocketAddress::isCoreEqual() + * @see TDESocketAddress::isEqual() + * @see TDESocketAddress::isCoreEqual() */ - static bool areEqualInet6(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly); + static bool areEqualInet6(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly); /* operators */ @@ -581,7 +581,7 @@ class KUnixSocketAddressPrivate; * @author Thiago Macieira <thiago.macieira@kdemail.net> * @short a Unix socket address */ -class TDECORE_EXPORT KUnixSocketAddress: public ::KSocketAddress +class TDECORE_EXPORT KUnixSocketAddress: public ::TDESocketAddress { Q_OBJECT public: @@ -665,10 +665,10 @@ public: * @param coreOnly true if only core parts should be compared (currently * unused) * @return true if the given addresses are equal. - * @see KSocketAddress::isEqual() - * @see KSocketAddress::isCoreEqual() + * @see TDESocketAddress::isEqual() + * @see TDESocketAddress::isCoreEqual() */ - static bool areEqualUnix(const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly); + static bool areEqualUnix(const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly); private: void init(); diff --git a/tdecore/ksocks.cpp b/tdecore/ksocks.cpp index 3de74bd88..eb00b1cec 100644 --- a/tdecore/ksocks.cpp +++ b/tdecore/ksocks.cpp @@ -213,7 +213,7 @@ KSocks *KSocks::self() { // Note that we don't use a static deleter here. It makes no sense and tends to cause crashes. if (!_me) { if (kapp) { - KConfigGroup cfg(kapp->config(), "Socks"); + TDEConfigGroup cfg(kapp->config(), "Socks"); _me = new KSocks(&cfg); } else { _disabled = true; @@ -223,7 +223,7 @@ KSocks *KSocks::self() { return _me; } -void KSocks::setConfig(KConfigBase *config) +void KSocks::setConfig(TDEConfigBase *config) { // We can change the config from disabled to enabled // but not the other way around. @@ -239,7 +239,7 @@ void KSocks::setConfig(KConfigBase *config) bool KSocks::activated() { return (_me != 0L); } -KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) { +KSocks::KSocks(TDEConfigBase *config) : _socksLib(0L), _st(0L) { _hasSocks = false; _useSocks = false; diff --git a/tdecore/ksocks.h b/tdecore/ksocks.h index 14067c0f3..b55829941 100644 --- a/tdecore/ksocks.h +++ b/tdecore/ksocks.h @@ -29,7 +29,7 @@ class KSocksTable; class KSocksPrivate; class KLibrary; -class KConfigBase; +class TDEConfigBase; struct sockaddr; typedef unsigned ksocklen_t; @@ -185,10 +185,10 @@ public: * Set this before the first call to KSocks::self() and it will use * @p config to read its configuration from. */ - static void setConfig(KConfigBase *config); + static void setConfig(TDEConfigBase *config); private: - KSocks(KConfigBase *config); + KSocks(TDEConfigBase *config); ~KSocks(); void stopSocks(); diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index 85d6e4249..c902cd6f1 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -1534,13 +1534,13 @@ static TQStringList lookupProfiles(const TQString &mapFile) extern bool kde_kiosk_admin; -bool KStandardDirs::addCustomized(KConfig *config) +bool KStandardDirs::addCustomized(TDEConfig *config) { if (addedCustoms && !d->checkRestrictions) // there are already customized entries return false; // we just quit and hope they are the right ones // save the numbers of config directories. If this changes, - // we will return true to give KConfig a chance to reparse + // we will return true to give TDEConfig a chance to reparse uint configdirs = resourceDirs("config").count(); // Remember original group diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h index 8d026682c..b561c78d5 100644 --- a/tdecore/kstandarddirs.h +++ b/tdecore/kstandarddirs.h @@ -28,7 +28,7 @@ #include <tqstringlist.h> #include <kglobal.h> -class KConfig; +class TDEConfig; class KStandardDirsPrivate; /** @@ -427,7 +427,7 @@ public: * @return true if new config paths have been added * from @p config. **/ - bool addCustomized(KConfig *config); + bool addCustomized(TDEConfig *config); /** * This function is used internally by almost all other function as diff --git a/tdecore/kstdaccel.cpp b/tdecore/kstdaccel.cpp index fa3abd5af..5bda8ebf5 100644 --- a/tdecore/kstdaccel.cpp +++ b/tdecore/kstdaccel.cpp @@ -126,7 +126,7 @@ static KStdAccelInfo* infoPtr( StdAccel id ) */ static void initialize( StdAccel id ) { - KConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" ); + TDEConfigGroupSaver saver( TDEGlobal::config(), "Shortcuts" ); KStdAccelInfo* pInfo = infoPtr( id ); if( !pInfo ) { diff --git a/tdecore/ktempdir.h b/tdecore/ktempdir.h index f5b2f8026..de4b97f6c 100644 --- a/tdecore/ktempdir.h +++ b/tdecore/ktempdir.h @@ -133,7 +133,7 @@ public: * * @note This function is more meant for removing a directory * not created by the user. For user-created directories, - * using KIO::NetAccess::del is recommended instead, + * using TDEIO::NetAccess::del is recommended instead, * especially as it has user feedback for long operations. * * @param path Path of the directory to delete diff --git a/tdecore/kuniqueapplication.cpp b/tdecore/kuniqueapplication.cpp index 708a9efb0..d8b69eade 100644 --- a/tdecore/kuniqueapplication.cpp +++ b/tdecore/kuniqueapplication.cpp @@ -356,7 +356,7 @@ TDEInstance* KUniqueApplication::initHack( bool configUnique ) TDEInstance* inst = new TDEInstance( TDECmdLineArgs::about ); if (configUnique) { - KConfigGroupSaver saver( inst->config(), "KDE" ); + TDEConfigGroupSaver saver( inst->config(), "KDE" ); s_multipleInstances = inst->config()->readBoolEntry("MultipleInstances", false); } if( !start()) diff --git a/tdecore/kurldrag.h b/tdecore/kurldrag.h index 45a0e5945..ccaf86e1a 100644 --- a/tdecore/kurldrag.h +++ b/tdecore/kurldrag.h @@ -95,7 +95,7 @@ public: * This is an alternative way of setting the metadata: * either use the constructor to pass it all at once, or use * drag->metaData()["key"] = data; - * @see KIO::TransferJob + * @see TDEIO::TransferJob */ TQMap<TQString, TQString> &metaData() { return m_metaData; } diff --git a/tdecore/network/kbufferedsocket.cpp b/tdecore/network/kbufferedsocket.cpp index 3566bde93..1b08d121e 100644 --- a/tdecore/network/kbufferedsocket.cpp +++ b/tdecore/network/kbufferedsocket.cpp @@ -38,7 +38,7 @@ using namespace KNetwork::Internal; class KNetwork::KBufferedSocketPrivate { public: - mutable KSocketBuffer *input, *output; + mutable TDESocketBuffer *input, *output; KBufferedSocketPrivate() { @@ -64,7 +64,7 @@ KBufferedSocket::~KBufferedSocket() delete d; } -void KBufferedSocket::setSocketDevice(KSocketDevice* device) +void KBufferedSocket::setSocketDevice(TDESocketDevice* device) { KStreamSocket::setSocketDevice(device); device->setBlocking(false); @@ -134,7 +134,7 @@ TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen) return KStreamSocket::tqreadBlock(data, maxlen); } -TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from) +TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from) { from = peerAddress(); return tqreadBlock(data, maxlen); @@ -156,7 +156,7 @@ TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen) return KStreamSocket::peekBlock(data, maxlen); } -TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) +TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) { from = peerAddress(); return peekBlock(data, maxlen); @@ -193,7 +193,7 @@ TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len } TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG maxlen, - const KSocketAddress&) + const TDESocketAddress&) { // ignore the third parameter return tqwriteBlock(data, maxlen); @@ -256,7 +256,7 @@ void KBufferedSocket::setInputBuffering(bool enable) } else if (d->input == 0L) { - d->input = new KSocketBuffer; + d->input = new TDESocketBuffer; } } @@ -275,7 +275,7 @@ void KBufferedSocket::setOutputBuffering(bool enable) } else if (d->output == 0L) { - d->output = new KSocketBuffer; + d->output = new TDESocketBuffer; } } diff --git a/tdecore/network/kbufferedsocket.h b/tdecore/network/kbufferedsocket.h index 93bee08f3..158a5a434 100644 --- a/tdecore/network/kbufferedsocket.h +++ b/tdecore/network/kbufferedsocket.h @@ -52,7 +52,7 @@ class KBufferedSocketPrivate; * imposed by Qt's TQSocketNotifier. If you want to use a socket * in an auxiliary thread, please use KStreamSocket. * - * @see KNetwork::KStreamSocket, KNetwork::KServerSocket + * @see KNetwork::KStreamSocket, KNetwork::TDEServerSocket * @author Thiago Macieira <thiago@kde.org> */ class TDECORE_EXPORT KBufferedSocket: public KStreamSocket @@ -79,7 +79,7 @@ public: /** * Be sure to catch new devices. */ - virtual void setSocketDevice(KSocketDevice* device); + virtual void setSocketDevice(TDESocketDevice* device); protected: /** @@ -122,7 +122,7 @@ public: * * The @p from parameter is always set to @ref peerAddress() */ - virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from); + virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from); /** * Peeks data from the socket. @@ -135,7 +135,7 @@ public: * * The @p from parameter is always set to @ref peerAddress() */ - virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from); /** * Writes data to the socket. @@ -148,7 +148,7 @@ public: * * The @p to parameter is discarded. */ - virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to); + virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to); /** * Catch changes. diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp index 780a5ec71..eb8e4883b 100644 --- a/tdecore/network/kclientsocketbase.cpp +++ b/tdecore/network/kclientsocketbase.cpp @@ -83,7 +83,7 @@ void KClientSocketBase::setState(SocketState state) bool KClientSocketBase::setSocketOptions(int opts) { TQMutexLocker locker(mutex()); - KSocketBase::setSocketOptions(opts); // call parent + TDESocketBase::setSocketOptions(opts); // call parent // don't create the device unnecessarily if (hasDevice()) @@ -323,7 +323,7 @@ TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen) return retval; } -TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from) +TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from) { resetError(); TQ_LONG retval = socketDevice()->tqreadBlock(data, maxlen, from); @@ -347,7 +347,7 @@ TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen) return retval; } -TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) +TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) { resetError(); TQ_LONG retval = socketDevice()->peekBlock(data, maxlen, from); @@ -371,7 +371,7 @@ TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG l return retval; } -TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to) +TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to) { resetError(); TQ_LONG retval = socketDevice()->tqwriteBlock(data, len, to); @@ -383,12 +383,12 @@ TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG l return retval; } -KSocketAddress KClientSocketBase::localAddress() const +TDESocketAddress KClientSocketBase::localAddress() const { return socketDevice()->localAddress(); } -KSocketAddress KClientSocketBase::peerAddress() const +TDESocketAddress KClientSocketBase::peerAddress() const { return socketDevice()->peerAddress(); } diff --git a/tdecore/network/kclientsocketbase.h b/tdecore/network/kclientsocketbase.h index 59da43511..68c45dd28 100644 --- a/tdecore/network/kclientsocketbase.h +++ b/tdecore/network/kclientsocketbase.h @@ -115,7 +115,7 @@ public: protected: /** - * Sets the socket options. Reimplemented from KSocketBase. + * Sets the socket options. Reimplemented from TDESocketBase. */ virtual bool setSocketOptions(int opts); @@ -160,7 +160,7 @@ public: * * This is useful, for instance, when IP addresses are in * their string representation (such as "1.2.3.4") or come - * from other sources like @ref KSocketAddress. + * from other sources like @ref TDESocketAddress. * * @param enable whether to enable */ @@ -186,7 +186,7 @@ public: * emitted (only once, even if we're doing a double lookup). * If the lookup failed (for any of the two lookups) the * @ref gotError signal will be emitted with the appropriate - * error condition (see @ref KSocketBase::SocketError). + * error condition (see @ref TDESocketBase::SocketError). * * This function returns true on success and false on error. Note that * this is not the lookup result! @@ -216,7 +216,7 @@ public: const TQString& service = TQString::null) = 0; /** - * Reimplemented from KSocketBase. Connect this socket to this + * Reimplemented from TDESocketBase. Connect this socket to this * specific address. * * Unlike @ref bind(const TQString&, const TQString&) above, this function @@ -258,7 +258,7 @@ public: /** * @overload - * Reimplemented from KSocketBase. + * Reimplemented from TDESocketBase. */ virtual bool connect(const KResolverEntry& address); @@ -300,7 +300,7 @@ public: /** * Returns the number of bytes available on this socket. - * Reimplemented from KSocketBase. + * Reimplemented from TDESocketBase. */ #ifdef USE_QT3 virtual TQ_LONG bytesAvailable() const; @@ -310,52 +310,52 @@ public: #endif /** - * Waits for more data. Reimplemented from KSocketBase. + * Waits for more data. Reimplemented from TDESocketBase. */ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L); /** - * Reads data from a socket. Reimplemented from KSocketBase. + * Reads data from a socket. Reimplemented from TDESocketBase. */ virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen); /** * @overload - * Reads data from a socket. Reimplemented from KSocketBase. + * Reads data from a socket. Reimplemented from TDESocketBase. */ - virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from); + virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from); /** - * Peeks data from the socket. Reimplemented from KSocketBase. + * Peeks data from the socket. Reimplemented from TDESocketBase. */ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); /** * @overload - * Peeks data from the socket. Reimplemented from KSocketBase. + * Peeks data from the socket. Reimplemented from TDESocketBase. */ - virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from); /** - * Writes data to the socket. Reimplemented from KSocketBase. + * Writes data to the socket. Reimplemented from TDESocketBase. */ virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len); /** * @overload - * Writes data to the socket. Reimplemented from KSocketBase. + * Writes data to the socket. Reimplemented from TDESocketBase. */ - virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to); + virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to); /** - * Returns the local socket address. Reimplemented from KSocketBase. + * Returns the local socket address. Reimplemented from TDESocketBase. */ - virtual KSocketAddress localAddress() const; + virtual TDESocketAddress localAddress() const; /** - * Returns the peer socket address. Reimplemented from KSocketBase. + * Returns the peer socket address. Reimplemented from TDESocketBase. */ - virtual KSocketAddress peerAddress() const; + virtual TDESocketAddress peerAddress() const; /** * Returns true if the readyRead signal is set to be emitted. diff --git a/tdecore/network/kdatagramsocket.cpp b/tdecore/network/kdatagramsocket.cpp index c5a1562a4..ac8e526ee 100644 --- a/tdecore/network/kdatagramsocket.cpp +++ b/tdecore/network/kdatagramsocket.cpp @@ -153,7 +153,7 @@ KDatagramPacket KDatagramSocket::receive() } TQByteArray data(size); - KSocketAddress address; + TDESocketAddress address; // now do the reading size = tqreadBlock(data.data(), size, address); @@ -170,7 +170,7 @@ TQ_LONG KDatagramSocket::send(const KDatagramPacket& packet) return tqwriteBlock(packet.data(), packet.size(), packet.address()); } -TQ_LONG KDatagramSocket::tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) +TQ_LONG KDatagramSocket::tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to) { if (to.family() != AF_UNSPEC) { diff --git a/tdecore/network/kdatagramsocket.h b/tdecore/network/kdatagramsocket.h index c51fea1ef..fd12a0d97 100644 --- a/tdecore/network/kdatagramsocket.h +++ b/tdecore/network/kdatagramsocket.h @@ -51,7 +51,7 @@ class KResolverEntry; class TDECORE_EXPORT KDatagramPacket { TQByteArray m_data; - KSocketAddress m_address; + TDESocketAddress m_address; public: /** @@ -78,14 +78,14 @@ public: /** * Constructs the datagram with the specified content and address. */ - KDatagramPacket(const TQByteArray& content, const KSocketAddress& addr) + KDatagramPacket(const TQByteArray& content, const TDESocketAddress& addr) : m_data(content), m_address(addr) { } /** * Constructs the datagram with the specified content and address. */ - KDatagramPacket(const char *content, uint length, const KSocketAddress& addr) + KDatagramPacket(const char *content, uint length, const TDESocketAddress& addr) : m_address(addr) { setData(content, length); } @@ -134,13 +134,13 @@ public: /** * Returns the socket address */ - const KSocketAddress& address() const + const TDESocketAddress& address() const { return m_address; } /** * Sets the address stored to the given value. */ - void setAddress(const KSocketAddress& addr) + void setAddress(const TDESocketAddress& addr) { m_address = addr; } /** @@ -241,7 +241,7 @@ public: /** * Writes data to the socket. Reimplemented from KClientSocketBase. */ - virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); + virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to); /** * Receives one datagram from the stream. The reading process is guaranteed diff --git a/tdecore/network/khttpproxysocketdevice.cpp b/tdecore/network/khttpproxysocketdevice.cpp index 42d65326b..e4529f28a 100644 --- a/tdecore/network/khttpproxysocketdevice.cpp +++ b/tdecore/network/khttpproxysocketdevice.cpp @@ -45,15 +45,15 @@ public: KResolverEntry proxy; TQCString request; TQCString reply; - KSocketAddress peer; + TDESocketAddress peer; KHttpProxySocketDevicePrivate() : proxy(KHttpProxySocketDevice::defaultProxy) { } }; -KHttpProxySocketDevice::KHttpProxySocketDevice(const KSocketBase* parent) - : KSocketDevice(parent), d(new KHttpProxySocketDevicePrivate) +KHttpProxySocketDevice::KHttpProxySocketDevice(const TDESocketBase* parent) + : TDESocketDevice(parent), d(new KHttpProxySocketDevicePrivate) { } @@ -66,7 +66,7 @@ KHttpProxySocketDevice::KHttpProxySocketDevice(const KResolverEntry& proxy) KHttpProxySocketDevice::~KHttpProxySocketDevice() { // nothing special to be done during closing - // KSocketDevice::~KSocketDevice closes the socket + // TDESocketDevice::~TDESocketDevice closes the socket delete d; } @@ -90,27 +90,27 @@ void KHttpProxySocketDevice::setProxyServer(const KResolverEntry& proxy) void KHttpProxySocketDevice::close() { d->reply = d->request = TQCString(); - d->peer = KSocketAddress(); - KSocketDevice::close(); + d->peer = TDESocketAddress(); + TDESocketDevice::close(); } -KSocketAddress KHttpProxySocketDevice::peerAddress() const +TDESocketAddress KHttpProxySocketDevice::peerAddress() const { if (isOpen()) return d->peer; - return KSocketAddress(); + return TDESocketAddress(); } -KSocketAddress KHttpProxySocketDevice::externalAddress() const +TDESocketAddress KHttpProxySocketDevice::externalAddress() const { - return KSocketAddress(); + return TDESocketAddress(); } bool KHttpProxySocketDevice::connect(const KResolverEntry& address) { if (d->proxy.family() == AF_UNSPEC) // no proxy server set ! - return KSocketDevice::connect(address); + return TDESocketDevice::connect(address); if (isOpen()) { @@ -148,7 +148,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi if (m_sockfd == -1) { // must create the socket - if (!KSocketDevice::connect(d->proxy)) + if (!TDESocketDevice::connect(d->proxy)) return false; // also unable to contact proxy server setState(0); // unset open flag @@ -170,7 +170,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi bool KHttpProxySocketDevice::parseServerReply() { // make sure we're connected - if (!KSocketDevice::connect(d->proxy)) + if (!TDESocketDevice::connect(d->proxy)) if (error() == InProgress) return true; else if (error() != NoError) diff --git a/tdecore/network/khttpproxysocketdevice.h b/tdecore/network/khttpproxysocketdevice.h index 903d7aa6f..dc5faef93 100644 --- a/tdecore/network/khttpproxysocketdevice.h +++ b/tdecore/network/khttpproxysocketdevice.h @@ -35,18 +35,18 @@ class KHttpProxySocketDevicePrivate; * @class KHttpProxySocketDevice khttpproxysocketdevice.h khttproxysocketdevice.h * @brief The low-level backend for HTTP proxying. * - * This class derives from @ref KSocketDevice and implements the necessary + * This class derives from @ref TDESocketDevice and implements the necessary * calls to make a connection through an HTTP proxy. * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KHttpProxySocketDevice: public KSocketDevice +class TDECORE_EXPORT KHttpProxySocketDevice: public TDESocketDevice { public: /** * Constructor. */ - KHttpProxySocketDevice(const KSocketBase* = 0L); + KHttpProxySocketDevice(const TDESocketBase* = 0L); /** * Constructor with proxy server's address. @@ -92,13 +92,13 @@ public: /** * Return the peer address. */ - virtual KSocketAddress peerAddress() const; + virtual TDESocketAddress peerAddress() const; /** * Return the externally visible address. We can't tell what that address is, * so this function always returns an empty object. */ - virtual KSocketAddress externalAddress() const; + virtual TDESocketAddress externalAddress() const; private: /** diff --git a/tdecore/network/kmulticastsocket.h b/tdecore/network/kmulticastsocket.h index 848e64491..8fe413283 100644 --- a/tdecore/network/kmulticastsocket.h +++ b/tdecore/network/kmulticastsocket.h @@ -78,14 +78,14 @@ public: * @param group the multicast group to join * @returns true on success */ - virtual bool joinGroup(const KSocketAddress& group); + virtual bool joinGroup(const TDESocketAddress& group); /** * @overload * Joins a multicast group. This function also specifies the network interface * to be used. */ - virtual bool joinGroup(const KSocketAddress& group, + virtual bool joinGroup(const TDESocketAddress& group, const KNetworkInterface& iface); /** @@ -95,13 +95,13 @@ public: * @param group the group to leave * @returns true on successful leaving the group */ - virtual bool leaveGroup(const KSocketAddress& group); + virtual bool leaveGroup(const TDESocketAddress& group); /** * @overload * Leaves a multicast group. */ - virtual bool leaveGroup(const KSocketAddress& group, + virtual bool leaveGroup(const TDESocketAddress& group, const KNetworkInterface& iface); private: diff --git a/tdecore/network/kmulticastsocketdevice.h b/tdecore/network/kmulticastsocketdevice.h index ffb567ff1..a24ba326a 100644 --- a/tdecore/network/kmulticastsocketdevice.h +++ b/tdecore/network/kmulticastsocketdevice.h @@ -42,13 +42,13 @@ class KMulticastSocketImplPrivate; * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class KMulticastSocketImpl: public KSocketDevice +class KMulticastSocketImpl: public TDESocketDevice { public: /** * Constructor. */ - KMulticastSocketImpl(const KSocketBase* = 0L); + KMulticastSocketImpl(const TDESocketBase* = 0L); /** * Destructor @@ -117,14 +117,14 @@ public: * @param group the multicast group to join * @returns true on success */ - virtual bool joinGroup(const KSocketAddress& group); + virtual bool joinGroup(const TDESocketAddress& group); /** * @overload * Joins a multicast group. This function also specifies the network interface * to be used. */ - virtual bool joinGroup(const KSocketAddress& group, + virtual bool joinGroup(const TDESocketAddress& group, const KNetworkInterface& iface); /** @@ -134,13 +134,13 @@ public: * @param group the group to leave * @returns true on successful leaving the group */ - virtual bool leaveGroup(const KSocketAddress& group); + virtual bool leaveGroup(const TDESocketAddress& group); /** * @overload * Leaves a multicast group. */ - virtual bool leaveGroup(const KSocketAddress& group, + virtual bool leaveGroup(const TDESocketAddress& group, const KNetworkInterface& iface); private: KMulticastSocketImplPrivate *d; diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index a6ca8e45c..1c32e80ec 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -75,7 +75,7 @@ using namespace KNetwork::Internal; class KNetwork::KResolverEntryPrivate: public TQShared { public: - KSocketAddress addr; + TDESocketAddress addr; int socktype; int protocol; TQString canonName; @@ -93,7 +93,7 @@ KResolverEntry::KResolverEntry() : } // constructor with stuff -KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int protocol, +KResolverEntry::KResolverEntry(const TDESocketAddress& addr, int socktype, int protocol, const TQString& canonName, const TQCString& encodedName) : d(new KResolverEntryPrivate) { @@ -110,7 +110,7 @@ KResolverEntry::KResolverEntry(const struct sockaddr* sa, TQ_UINT16 salen, int s const TQCString& encodedName) : d(new KResolverEntryPrivate) { - d->addr = KSocketAddress(sa, salen); + d->addr = TDESocketAddress(sa, salen); d->socktype = socktype; d->protocol = protocol; d->canonName = canonName; @@ -135,9 +135,9 @@ KResolverEntry::~KResolverEntry() } // returns the socket address -KSocketAddress KResolverEntry::address() const +TDESocketAddress KResolverEntry::address() const { - return d ? d->addr : KSocketAddress(); + return d ? d->addr : TDESocketAddress(); } // returns the length diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h index 5e20e174a..3de19acd3 100644 --- a/tdecore/network/kresolver.h +++ b/tdecore/network/kresolver.h @@ -73,10 +73,10 @@ public: KResolverEntry(); /** - * Constructs a new KResolverEntry from a KSocketAddress + * Constructs a new KResolverEntry from a TDESocketAddress * and other data. * - * The KSocketAddress @p addr parameter will be deep-copied. + * The TDESocketAddress @p addr parameter will be deep-copied. * * @param addr the address that was resolved * @param socktype the socket type of the resolved address @@ -84,7 +84,7 @@ public: * @param canonName the canonical name of the resolved hostname * @param encodedName the ASCII-compatible encoding of the hostname */ - KResolverEntry(const KSocketAddress& addr, int socktype, int protocol, + KResolverEntry(const TDESocketAddress& addr, int socktype, int protocol, const TQString& canonName = TQString::null, const TQCString& encodedName = TQCString()); @@ -92,7 +92,7 @@ public: * Constructs a new KResolverEntry from raw forms of * socket addresses and other data. * - * This constructor instead creates an internal KSocketAddress object. + * This constructor instead creates an internal TDESocketAddress object. * * @param sa the sockaddr structure containing the raw address * @param salen the length of the sockaddr structure @@ -123,7 +123,7 @@ public: /** * Retrieves the socket address associated with this entry. */ - KSocketAddress address() const; + TDESocketAddress address() const; /** * Retrieves the length of the socket address structure. diff --git a/tdecore/network/kreverseresolver.cpp b/tdecore/network/kreverseresolver.cpp index 20ec41b1d..fc172c2ff 100644 --- a/tdecore/network/kreverseresolver.cpp +++ b/tdecore/network/kreverseresolver.cpp @@ -55,7 +55,7 @@ namespace class ReverseThread: public KResolverWorkerBase { public: - ReverseThread(const KSocketAddress& addr, int flags) + ReverseThread(const TDESocketAddress& addr, int flags) : m_addr(addr), m_flags(flags), m_parent(0L) { } @@ -68,7 +68,7 @@ namespace virtual bool postprocess(); // input: - KSocketAddress m_addr; + TDESocketAddress m_addr; int m_flags; KReverseResolver *m_parent; @@ -99,18 +99,18 @@ class KNetwork::KReverseResolverPrivate public: TQString node; TQString service; - KSocketAddress addr; + TDESocketAddress addr; int flags; ReverseThread* worker; bool success; - inline KReverseResolverPrivate(const KSocketAddress& _addr) + inline KReverseResolverPrivate(const TDESocketAddress& _addr) : addr(_addr), worker(0L), success(false) { } }; -KReverseResolver::KReverseResolver(const KSocketAddress& addr, int flags, +KReverseResolver::KReverseResolver(const TDESocketAddress& addr, int flags, TQObject *parent, const char* name) : TQObject(parent, name), d(new KReverseResolverPrivate(addr)) { @@ -148,7 +148,7 @@ TQString KReverseResolver::service() const return d->service; } -const KSocketAddress& KReverseResolver::address() const +const TDESocketAddress& KReverseResolver::address() const { return d->addr; } @@ -190,7 +190,7 @@ bool KReverseResolver::event(TQEvent *e) return true; } -bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node, +bool KReverseResolver::resolve(const TDESocketAddress& addr, TQString& node, TQString& serv, int flags) { ReverseThread th(addr, flags); @@ -206,7 +206,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node, bool KReverseResolver::resolve(const struct sockaddr* sa, TQ_UINT16 salen, TQString& node, TQString& serv, int flags) { - return resolve(KSocketAddress(sa, salen), node, serv, flags); + return resolve(TDESocketAddress(sa, salen), node, serv, flags); } bool ReverseThread::run() diff --git a/tdecore/network/kreverseresolver.h b/tdecore/network/kreverseresolver.h index 21a17b0a5..4a3fa4bdd 100644 --- a/tdecore/network/kreverseresolver.h +++ b/tdecore/network/kreverseresolver.h @@ -88,7 +88,7 @@ public: * @param addr the address to resolve * @param flags the flags to use, see @ref Flags */ - KReverseResolver(const KSocketAddress& addr, int flags = 0, + KReverseResolver(const TDESocketAddress& addr, int flags = 0, TQObject * = 0L, const char * = 0L); /** @@ -128,7 +128,7 @@ public: /** * Returns the socket address which was subject to resolution. */ - const KSocketAddress& address() const; + const TDESocketAddress& address() const; /** * Starts the resolution. This function returns 'true' @@ -165,7 +165,7 @@ public: * @return true if the resolution succeeded, false if not * @see ReverseFlags for the possible values for @p flags */ - static bool resolve(const KSocketAddress& addr, TQString& node, + static bool resolve(const TDESocketAddress& addr, TQString& node, TQString& serv, int flags = 0); /** diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp index 007258f6b..d5a1b90bb 100644 --- a/tdecore/network/kserversocket.cpp +++ b/tdecore/network/kserversocket.cpp @@ -37,7 +37,7 @@ using namespace KNetwork; -class KNetwork::KServerSocketPrivate +class KNetwork::TDEServerSocketPrivate { public: KResolver resolver; @@ -49,7 +49,7 @@ public: bool bindWhenFound : 1, listenWhenBound : 1, useKBufferedSocket : 1; - KServerSocketPrivate() + TDEServerSocketPrivate() : state(None), timeout(0), bindWhenFound(false), listenWhenBound(false), useKBufferedSocket(true) { @@ -58,56 +58,56 @@ public: } }; -KServerSocket::KServerSocket(TQObject* parent, const char *name) - : TQObject(parent, name), d(new KServerSocketPrivate) +TDEServerSocket::TDEServerSocket(TQObject* parent, const char *name) + : TQObject(parent, name), d(new TDEServerSocketPrivate) { TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), this, TQT_SLOT(lookupFinishedSlot())); } -KServerSocket::KServerSocket(const TQString& service, TQObject* parent, const char *name) - : TQObject(parent, name), d(new KServerSocketPrivate) +TDEServerSocket::TDEServerSocket(const TQString& service, TQObject* parent, const char *name) + : TQObject(parent, name), d(new TDEServerSocketPrivate) { TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), this, TQT_SLOT(lookupFinishedSlot())); d->resolver.setServiceName(service); } -KServerSocket::KServerSocket(const TQString& node, const TQString& service, +TDEServerSocket::TDEServerSocket(const TQString& node, const TQString& service, TQObject* parent, const char* name) - : TQObject(parent, name), d(new KServerSocketPrivate) + : TQObject(parent, name), d(new TDEServerSocketPrivate) { TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), this, TQT_SLOT(lookupFinishedSlot())); setAddress(node, service); } -KServerSocket::~KServerSocket() +TDEServerSocket::~TDEServerSocket() { close(); delete d; } -bool KServerSocket::setSocketOptions(int opts) +bool TDEServerSocket::setSocketOptions(int opts) { TQMutexLocker locker(mutex()); - KSocketBase::setSocketOptions(opts); // call parent + TDESocketBase::setSocketOptions(opts); // call parent bool result = socketDevice()->setSocketOptions(opts); // and set the implementation copyError(); return result; } -KResolver& KServerSocket::resolver() const +KResolver& TDEServerSocket::resolver() const { return d->resolver; } -const KResolverResults& KServerSocket::resolverResults() const +const KResolverResults& TDEServerSocket::resolverResults() const { return d->resolverResults; } -void KServerSocket::setResolutionEnabled(bool enable) +void TDEServerSocket::setResolutionEnabled(bool enable) { if (enable) d->resolver.setFlags(d->resolver.flags() & ~KResolver::NoResolve); @@ -115,41 +115,41 @@ void KServerSocket::setResolutionEnabled(bool enable) d->resolver.setFlags(d->resolver.flags() | KResolver::NoResolve); } -void KServerSocket::setFamily(int families) +void TDEServerSocket::setFamily(int families) { d->resolver.setFamily(families); } -void KServerSocket::setAddress(const TQString& service) +void TDEServerSocket::setAddress(const TQString& service) { d->resolver.setNodeName(TQString::null); d->resolver.setServiceName(service); d->resolverResults.empty(); - if (d->state <= KServerSocketPrivate::LookupDone) - d->state = KServerSocketPrivate::None; + if (d->state <= TDEServerSocketPrivate::LookupDone) + d->state = TDEServerSocketPrivate::None; } -void KServerSocket::setAddress(const TQString& node, const TQString& service) +void TDEServerSocket::setAddress(const TQString& node, const TQString& service) { d->resolver.setNodeName(node); d->resolver.setServiceName(service); d->resolverResults.empty(); - if (d->state <= KServerSocketPrivate::LookupDone) - d->state = KServerSocketPrivate::None; + if (d->state <= TDEServerSocketPrivate::LookupDone) + d->state = TDEServerSocketPrivate::None; } -void KServerSocket::setTimeout(int msec) +void TDEServerSocket::setTimeout(int msec) { d->timeout = msec; } -bool KServerSocket::lookup() +bool TDEServerSocket::lookup() { setError(NoError); if (d->resolver.isRunning() && !blocking()) return true; // already doing lookup - if (d->state >= KServerSocketPrivate::LookupDone) + if (d->state >= TDEServerSocketPrivate::LookupDone) return true; // results are already available // make sure we have at least one parameter for lookup @@ -179,13 +179,13 @@ bool KServerSocket::lookup() return true; } -bool KServerSocket::bind(const KResolverEntry& address) +bool TDEServerSocket::bind(const KResolverEntry& address) { if (socketDevice()->bind(address)) { setError(NoError); - d->state = KServerSocketPrivate::Bound; + d->state = TDEServerSocketPrivate::Bound; emit bound(address); return true; } @@ -193,30 +193,30 @@ bool KServerSocket::bind(const KResolverEntry& address) return false; } -bool KServerSocket::bind(const TQString& node, const TQString& service) +bool TDEServerSocket::bind(const TQString& node, const TQString& service) { setAddress(node, service); return bind(); } -bool KServerSocket::bind(const TQString& service) +bool TDEServerSocket::bind(const TQString& service) { setAddress(service); return bind(); } -bool KServerSocket::bind() +bool TDEServerSocket::bind() { - if (d->state >= KServerSocketPrivate::Bound) + if (d->state >= TDEServerSocketPrivate::Bound) return true; - if (d->state < KServerSocketPrivate::LookupDone) + if (d->state < TDEServerSocketPrivate::LookupDone) { if (!blocking()) { d->bindWhenFound = true; bool ok = lookup(); // will call doBind - if (d->state >= KServerSocketPrivate::Bound) + if (d->state >= TDEServerSocketPrivate::Bound) d->bindWhenFound = false; return ok; } @@ -229,19 +229,19 @@ bool KServerSocket::bind() return doBind(); } -bool KServerSocket::listen(int backlog) +bool TDEServerSocket::listen(int backlog) { // WARNING // this function has to be reentrant // due to the mechanisms used for binding, this function might // end up calling itself - if (d->state == KServerSocketPrivate::Listening) + if (d->state == TDEServerSocketPrivate::Listening) return true; // already listening d->backlog = backlog; - if (d->state < KServerSocketPrivate::Bound) + if (d->state < TDEServerSocketPrivate::Bound) { // we must bind // note that we can end up calling ourselves here @@ -252,7 +252,7 @@ bool KServerSocket::listen(int backlog) return false; } - if (d->state < KServerSocketPrivate::Bound) + if (d->state < TDEServerSocketPrivate::Bound) // asynchronous lookup in progress... // we can't be blocking here anyways return true; @@ -260,29 +260,29 @@ bool KServerSocket::listen(int backlog) d->listenWhenBound = false; } - if (d->state < KServerSocketPrivate::Listening) + if (d->state < TDEServerSocketPrivate::Listening) return doListen(); return true; } -void KServerSocket::close() +void TDEServerSocket::close() { socketDevice()->close(); if (d->resolver.isRunning()) d->resolver.cancel(false); - d->state = KServerSocketPrivate::None; + d->state = TDEServerSocketPrivate::None; emit closed(); } -void KServerSocket::setAcceptBuffered(bool enable) +void TDEServerSocket::setAcceptBuffered(bool enable) { d->useKBufferedSocket = enable; } -KActiveSocketBase* KServerSocket::accept() +KActiveSocketBase* TDEServerSocket::accept() { - if (d->state < KServerSocketPrivate::Listening) + if (d->state < TDEServerSocketPrivate::Listening) { if (!blocking()) { @@ -310,7 +310,7 @@ KActiveSocketBase* KServerSocket::accept() } // we're listening here - KSocketDevice* accepted = socketDevice()->accept(); + TDESocketDevice* accepted = socketDevice()->accept(); if (!accepted) { // error happened during accept @@ -334,19 +334,19 @@ KActiveSocketBase* KServerSocket::accept() return streamsocket; } -KSocketAddress KServerSocket::localAddress() const +TDESocketAddress TDEServerSocket::localAddress() const { return socketDevice()->localAddress(); } -KSocketAddress KServerSocket::externalAddress() const +TDESocketAddress TDEServerSocket::externalAddress() const { return socketDevice()->externalAddress(); } -void KServerSocket::lookupFinishedSlot() +void TDEServerSocket::lookupFinishedSlot() { - if (d->resolver.isRunning() || d->state > KServerSocketPrivate::LookupDone) + if (d->resolver.isRunning() || d->state > TDEServerSocketPrivate::LookupDone) return; if (d->resolver.status() < 0) @@ -354,25 +354,25 @@ void KServerSocket::lookupFinishedSlot() setError(LookupFailure); emit gotError(LookupFailure); d->bindWhenFound = d->listenWhenBound = false; - d->state = KServerSocketPrivate::None; + d->state = TDEServerSocketPrivate::None; return; } // lookup succeeded d->resolverResults = d->resolver.results(); - d->state = KServerSocketPrivate::LookupDone; + d->state = TDEServerSocketPrivate::LookupDone; emit hostFound(); if (d->bindWhenFound) doBind(); } -void KServerSocket::copyError() +void TDEServerSocket::copyError() { setError(socketDevice()->error()); } -bool KServerSocket::doBind() +bool TDEServerSocket::doBind() { d->bindWhenFound = false; // loop through the results and bind to the first that works @@ -393,7 +393,7 @@ bool KServerSocket::doBind() return false; } -bool KServerSocket::doListen() +bool TDEServerSocket::doListen() { if (!socketDevice()->listen(d->backlog)) { @@ -405,7 +405,7 @@ bool KServerSocket::doListen() // set up ready accept signal TQObject::connect(socketDevice()->readNotifier(), TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(readyAccept())); - d->state = KServerSocketPrivate::Listening; + d->state = TDEServerSocketPrivate::Listening; return true; } diff --git a/tdecore/network/kserversocket.h b/tdecore/network/kserversocket.h index 4f1af33b9..6821a886a 100644 --- a/tdecore/network/kserversocket.h +++ b/tdecore/network/kserversocket.h @@ -30,14 +30,14 @@ namespace KNetwork { -class KSocketDevice; +class TDESocketDevice; class KStreamSocket; class KResolver; class KResolverResults; -class KServerSocketPrivate; +class TDEServerSocketPrivate; /** - * @class KServerSocket kserversocket.h kserversocket.h + * @class TDEServerSocket kserversocket.h kserversocket.h * @brief A server socket for accepting connections. * * This class provides functionality for creating a socket to @@ -49,7 +49,7 @@ class KServerSocketPrivate; * A typical example would look like: * \code * TQString service = "http"; - * KServerSocket *ss = new KServerSocket(service); + * TDEServerSocket *ss = new TDEServerSocket(service); * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); * ss->listen(); @@ -70,14 +70,14 @@ class KServerSocketPrivate; * * For another example of usage, this below code attempts to make a connection on any port within a range: * \code - * KServerSocket *ss = new KServerSocket(); + * TDEServerSocket *ss = new TDEServerSocket(); * ss->setFamily(KResolver::InetFamily); * bool found = false; * for( unsigned int port = firstport; port <= lastport; ++port) { * ss->setAddress( TQString::number( port ) ); * bool success = ss->listen(); * if( found = ( success && ss->error() == - * KSocketBase::NoError ) ) + * TDESocketBase::NoError ) ) * break; * ss->close(); * } @@ -98,13 +98,13 @@ class KServerSocketPrivate; * KNetwork::KBufferedSocket (default). If you want to accept a * non-buffered socket, you must first call setAcceptBuffered. * - * @warning If you use KServerSocket in an auxiliary (non-GUI) thread, + * @warning If you use TDEServerSocket in an auxiliary (non-GUI) thread, * you need to accept only KNetwork::KStreamSocket objects. * * @see KNetwork::KStreamSocket, KNetwork::KBufferedSocket * @author Thiago Macieira <thiago@kde.org> */ -class TDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase +class TDECORE_EXPORT TDEServerSocket: public TQObject, public KPassiveSocketBase { Q_OBJECT @@ -119,7 +119,7 @@ public: * @param parent the parent TQObject object * @param name the name of this object */ - KServerSocket(TQObject* parent = 0L, const char *name = 0L); + TDEServerSocket(TQObject* parent = 0L, const char *name = 0L); /** * Construct this object specifying the service to listen on. @@ -138,7 +138,7 @@ public: * @param parent the parent TQObject object * @param name the name of this object */ - KServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L); + TDEServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L); /** * Construct this object specifying the node and service names to listen on. @@ -158,7 +158,7 @@ public: * @param parent the parent TQObject object * @param name the name of this object */ - KServerSocket(const TQString& node, const TQString& service, + TDEServerSocket(const TQString& node, const TQString& service, TQObject* parent = 0L, const char *name = 0L); /** @@ -167,11 +167,11 @@ public: * Note, however, that accepted sockets do not get closed when this * object closes. */ - ~KServerSocket(); + ~TDEServerSocket(); protected: /** - * Sets the socket options. Reimplemented from KSocketBase. + * Sets the socket options. Reimplemented from TDESocketBase. */ virtual bool setSocketOptions(int opts); @@ -201,7 +201,7 @@ public: * * This is useful, for instance, when IP addresses are in * their string representation (such as "1.2.3.4") or come - * from other sources like @ref KSocketAddress. + * from other sources like @ref TDESocketAddress. * * @param enable whether to enable */ @@ -268,7 +268,7 @@ public: * emitted (only once, even if we're doing a double lookup). * If the lookup failed (for any of the two lookups) the * @ref gotError signal will be emitted with the appropriate - * error condition (see @ref KSocketBase::SocketError). + * error condition (see @ref TDESocketBase::SocketError). * * This function returns true on success and false on error. Note that * this is not the lookup result! @@ -306,7 +306,7 @@ public: virtual bool bind(); /** - * Connect this socket to this specific address. Reimplemented from KSocketBase. + * Connect this socket to this specific address. Reimplemented from TDESocketBase. * * Unlike @ref bind(const TQString&, const TQString&) above, this function * really does bind the socket. No lookup is performed. The @ref bound signal @@ -369,12 +369,12 @@ public: /** * Returns this socket's local address. */ - virtual KSocketAddress localAddress() const; + virtual TDESocketAddress localAddress() const; /** * Returns this socket's externally-visible address if know. */ - virtual KSocketAddress externalAddress() const; + virtual TDESocketAddress externalAddress() const; private slots: void lookupFinishedSlot(); @@ -425,10 +425,10 @@ private: bool doListen(); private: - KServerSocket(const KServerSocket&); - KServerSocket& operator=(const KServerSocket&); + TDEServerSocket(const TDEServerSocket&); + TDEServerSocket& operator=(const TDEServerSocket&); - KServerSocketPrivate *d; + TDEServerSocketPrivate *d; }; } // namespace KNetwork diff --git a/tdecore/network/ksockssocketdevice.cpp b/tdecore/network/ksockssocketdevice.cpp index 6a60ce0a3..c1649c340 100644 --- a/tdecore/network/ksockssocketdevice.cpp +++ b/tdecore/network/ksockssocketdevice.cpp @@ -43,15 +43,15 @@ using namespace KNetwork; // constructor // nothing to do -KSocksSocketDevice::KSocksSocketDevice(const KSocketBase* obj) - : KSocketDevice(obj) +KSocksSocketDevice::KSocksSocketDevice(const TDESocketBase* obj) + : TDESocketDevice(obj) { } // constructor with argument // nothing to do KSocksSocketDevice::KSocksSocketDevice(int fd) - : KSocketDevice(fd) + : TDESocketDevice(fd) { } @@ -67,7 +67,7 @@ int KSocksSocketDevice::capabilities() const return 0; // can do everything! } -// From here on, the code is almost exactly a copy of KSocketDevice +// From here on, the code is almost exactly a copy of TDESocketDevice // the differences are the use of KSocks where appropriate bool KSocksSocketDevice::bind(const KResolverEntry& address) @@ -190,7 +190,7 @@ KSocksSocketDevice* KSocksSocketDevice::accept() return new KSocksSocketDevice(newfd); } -static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) +static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, TDESocketAddress* from, ssize_t &retval, bool peek = false) { kde_socklen_t len; if (from) @@ -204,9 +204,9 @@ static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAdd if (retval == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) - return KSocketDevice::WouldBlock; + return TDESocketDevice::WouldBlock; else - return KSocketDevice::UnknownError; + return TDESocketDevice::UnknownError; } if (from) @@ -235,7 +235,7 @@ TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen) return retval; } -TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from) +TQ_LONG KSocksSocketDevice::tqreadBlock(char *data, TQ_ULONG maxlen, TDESocketAddress &from) { resetError(); if (m_sockfd == -1) @@ -277,7 +277,7 @@ TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen) return retval; } -TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) +TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) { resetError(); if (m_sockfd == -1) @@ -300,10 +300,10 @@ TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddres TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len) { - return tqwriteBlock(data, len, KSocketAddress()); + return tqwriteBlock(data, len, TDESocketAddress()); } -TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) +TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to) { resetError(); if (m_sockfd == -1) @@ -325,17 +325,17 @@ TQ_LONG KSocksSocketDevice::tqwriteBlock(const char *data, TQ_ULONG len, const K return retval; } -KSocketAddress KSocksSocketDevice::localAddress() const +TDESocketAddress KSocksSocketDevice::localAddress() const { if (m_sockfd == -1) - return KSocketAddress(); // not open, empty value + return TDESocketAddress(); // not open, empty value kde_socklen_t len; - KSocketAddress localAddress; + TDESocketAddress localAddress; localAddress.setLength(len = 32); // arbitrary value if (KSocks::self()->getsockname(m_sockfd, localAddress.address(), &len) == -1) // error! - return KSocketAddress(); + return TDESocketAddress(); if (len <= localAddress.length()) { @@ -349,22 +349,22 @@ KSocketAddress KSocksSocketDevice::localAddress() const localAddress.setLength(len); if (KSocks::self()->getsockname(m_sockfd, localAddress.address(), &len) == -1) // error! - return KSocketAddress(); + return TDESocketAddress(); return localAddress; } -KSocketAddress KSocksSocketDevice::peerAddress() const +TDESocketAddress KSocksSocketDevice::peerAddress() const { if (m_sockfd == -1) - return KSocketAddress(); // not open, empty value + return TDESocketAddress(); // not open, empty value kde_socklen_t len; - KSocketAddress peerAddress; + TDESocketAddress peerAddress; peerAddress.setLength(len = 32); // arbitrary value if (KSocks::self()->getpeername(m_sockfd, peerAddress.address(), &len) == -1) // error! - return KSocketAddress(); + return TDESocketAddress(); if (len <= peerAddress.length()) { @@ -378,15 +378,15 @@ KSocketAddress KSocksSocketDevice::peerAddress() const peerAddress.setLength(len); if (KSocks::self()->getpeername(m_sockfd, peerAddress.address(), &len) == -1) // error! - return KSocketAddress(); + return TDESocketAddress(); return peerAddress; } -KSocketAddress KSocksSocketDevice::externalAddress() const +TDESocketAddress KSocksSocketDevice::externalAddress() const { // return empty, indicating unknown external address - return KSocketAddress(); + return TDESocketAddress(); } bool KSocksSocketDevice::poll(bool *input, bool *output, bool *exception, @@ -474,13 +474,13 @@ void KSocksSocketDevice::initSocks() init = true; if (KSocks::self()->hasSocks()) - delete KSocketDevice::setDefaultImpl(new KSocketDeviceFactory<KSocksSocketDevice>); + delete TDESocketDevice::setDefaultImpl(new TDESocketDeviceFactory<KSocksSocketDevice>); } #if 0 static bool register() { - KSocketDevice::addNewImpl(new KSocketDeviceFactory<KSocksSocketDevice>, 0); + TDESocketDevice::addNewImpl(new TDESocketDeviceFactory<KSocksSocketDevice>, 0); } static bool register = registered(); diff --git a/tdecore/network/ksockssocketdevice.h b/tdecore/network/ksockssocketdevice.h index 5c93b6d8c..2a83c0adc 100644 --- a/tdecore/network/ksockssocketdevice.h +++ b/tdecore/network/ksockssocketdevice.h @@ -28,7 +28,7 @@ namespace KNetwork { * @class KSocksSocketDevice ksockssocketdevice.h ksockssocketdevice.h * @brief The low-level class for SOCKS proxying. * - * This class reimplements several functions from @ref KSocketDevice in order + * This class reimplements several functions from @ref TDESocketDevice in order * to implement SOCKS support. * * This works by using KSocks. @@ -37,13 +37,13 @@ namespace KNetwork { * * @warning This code is untested! */ -class TDECORE_EXPORT KSocksSocketDevice: public KSocketDevice +class TDECORE_EXPORT KSocksSocketDevice: public TDESocketDevice { public: /** * Constructor. */ - KSocksSocketDevice(const KSocketBase* = 0L); + KSocksSocketDevice(const TDESocketBase* = 0L); /** * Construct from a file descriptor. @@ -84,34 +84,34 @@ public: * Overrides reading. */ virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen); - virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG tqreadBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from); /** * Overrides peeking. */ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); - virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from); /** * Overrides writing. */ virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len); - virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); + virtual TQ_LONG tqwriteBlock(const char *data, TQ_ULONG len, const TDESocketAddress& to); /** * Overrides getting socket address. */ - virtual KSocketAddress localAddress() const; + virtual TDESocketAddress localAddress() const; /** * Overrides getting peer address. */ - virtual KSocketAddress peerAddress() const; + virtual TDESocketAddress peerAddress() const; /** * Overrides getting external address. */ - virtual KSocketAddress externalAddress() const; + virtual TDESocketAddress externalAddress() const; /** * Overrides polling. @@ -121,7 +121,7 @@ public: private: static void initSocks(); - friend class KSocketDevice; + friend class TDESocketDevice; }; } // namespace KNetwork diff --git a/tdecore/network/kstreamsocket.h b/tdecore/network/kstreamsocket.h index ab90e923a..d077296c1 100644 --- a/tdecore/network/kstreamsocket.h +++ b/tdecore/network/kstreamsocket.h @@ -34,7 +34,7 @@ namespace KNetwork { class KResolverEntry; class KResolverResults; -class KServerSocket; +class TDEServerSocket; class KBufferedSocket; class KStreamSocketPrivate; @@ -91,7 +91,7 @@ class KStreamSocketPrivate; * } * \endcode * - * @see KNetwork::KBufferedSocket, KNetwork::KServerSocket + * @see KNetwork::KBufferedSocket, KNetwork::TDEServerSocket * @author Thiago Macieira <thiago@kde.org> */ class TDECORE_EXPORT KStreamSocket: public KClientSocketBase @@ -241,7 +241,7 @@ private: KStreamSocketPrivate *d; - friend class KServerSocket; + friend class TDEServerSocket; friend class KBufferedSocket; }; diff --git a/tdecore/network/tdesocketaddress.cpp b/tdecore/network/tdesocketaddress.cpp index d1234044b..ff97699c8 100644 --- a/tdecore/network/tdesocketaddress.cpp +++ b/tdecore/network/tdesocketaddress.cpp @@ -238,7 +238,7 @@ struct our_sockaddr_in6 #define MIN_SOCKADDR_UN_LEN (sizeof(TQ_UINT16) + sizeof(char)) -class KNetwork::KSocketAddressData +class KNetwork::TDESocketAddressData { public: /* @@ -249,7 +249,7 @@ public: class QMixSocketAddressRef : public KInetSocketAddress, public KUnixSocketAddress { public: - QMixSocketAddressRef(KSocketAddressData* d) + QMixSocketAddressRef(TDESocketAddressData* d) : KInetSocketAddress(d), KUnixSocketAddress(d) { } @@ -265,7 +265,7 @@ public: } addr; TQ_UINT16 curlen, reallen; - KSocketAddressData() + TDESocketAddressData() : ref(this) { addr.generic = 0L; @@ -273,7 +273,7 @@ public: invalidate(); } - ~KSocketAddressData() + ~TDESocketAddressData() { if (addr.generic != 0L) free(addr.generic); @@ -343,7 +343,7 @@ public: }; // create duplicates of -void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) +void TDESocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) { if (len < MIN_SOCKADDR_LEN) { @@ -405,30 +405,30 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) } // default constructor -KSocketAddress::KSocketAddress() - : d(new KSocketAddressData) +TDESocketAddress::TDESocketAddress() + : d(new TDESocketAddressData) { } // constructor from binary data -KSocketAddress::KSocketAddress(const sockaddr *sa, TQ_UINT16 len) - : d(new KSocketAddressData) +TDESocketAddress::TDESocketAddress(const sockaddr *sa, TQ_UINT16 len) + : d(new TDESocketAddressData) { setAddress(sa, len); } -KSocketAddress::KSocketAddress(const KSocketAddress& other) - : d(new(KSocketAddressData)) +TDESocketAddress::TDESocketAddress(const TDESocketAddress& other) + : d(new(TDESocketAddressData)) { *this = other; } -KSocketAddress::KSocketAddress(KSocketAddressData *d2) +TDESocketAddress::TDESocketAddress(TDESocketAddressData *d2) : d(d2) { } -KSocketAddress::~KSocketAddress() +TDESocketAddress::~TDESocketAddress() { // prevent double-deletion, since we're already being deleted if (d) @@ -439,7 +439,7 @@ KSocketAddress::~KSocketAddress() } } -KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other) +TDESocketAddress& TDESocketAddress::operator =(const TDESocketAddress& other) { if (other.d && !other.d->invalid()) d->dup(other.d->addr.generic, other.d->reallen); @@ -448,21 +448,21 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other) return *this; } -const sockaddr* KSocketAddress::address() const +const sockaddr* TDESocketAddress::address() const { if (d->invalid()) return 0L; return d->addr.generic; } -sockaddr* KSocketAddress::address() +sockaddr* TDESocketAddress::address() { if (d->invalid()) return 0L; return d->addr.generic; } -KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) +TDESocketAddress& TDESocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) { if (sa != 0L && len >= MIN_SOCKADDR_LEN) d->dup(sa, len); @@ -472,28 +472,28 @@ KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) return *this; } -TQ_UINT16 KSocketAddress::length() const +TQ_UINT16 TDESocketAddress::length() const { if (d->invalid()) return 0; return d->reallen; } -KSocketAddress& KSocketAddress::setLength(TQ_UINT16 len) +TDESocketAddress& TDESocketAddress::setLength(TQ_UINT16 len) { d->dup((sockaddr*)0L, len, false); return *this; } -int KSocketAddress::family() const +int TDESocketAddress::family() const { if (d->invalid()) return AF_UNSPEC; return d->addr.generic->sa_family; } -KSocketAddress& KSocketAddress::setFamily(int family) +TDESocketAddress& TDESocketAddress::setFamily(int family) { if (d->invalid()) d->dup((sockaddr*)0L, MIN_SOCKADDR_LEN); @@ -502,7 +502,7 @@ KSocketAddress& KSocketAddress::setFamily(int family) return *this; } -bool KSocketAddress::operator ==(const KSocketAddress& other) const +bool TDESocketAddress::operator ==(const TDESocketAddress& other) const { // if this is invalid, it's only equal if the other one is invalid as well if (d->invalid()) @@ -559,7 +559,7 @@ bool KSocketAddress::operator ==(const KSocketAddress& other) const return false; // not equal in any other case } -TQString KSocketAddress::nodeName() const +TQString TDESocketAddress::nodeName() const { if (d->invalid()) return TQString::null; @@ -585,7 +585,7 @@ TQString KSocketAddress::nodeName() const return TQString::null; } -TQString KSocketAddress::serviceName() const +TQString TDESocketAddress::serviceName() const { if (d->invalid()) return TQString::null; @@ -605,7 +605,7 @@ TQString KSocketAddress::serviceName() const return TQString::null; } -TQString KSocketAddress::toString() const +TQString TDESocketAddress::toString() const { if (d->invalid()) return TQString::null; @@ -627,27 +627,27 @@ TQString KSocketAddress::toString() const return fmt.arg(nodeName()).arg(serviceName()); } -KInetSocketAddress& KSocketAddress::asInet() +KInetSocketAddress& TDESocketAddress::asInet() { return d->ref; } -KInetSocketAddress KSocketAddress::asInet() const +KInetSocketAddress TDESocketAddress::asInet() const { return d->ref; } -KUnixSocketAddress& KSocketAddress::asUnix() +KUnixSocketAddress& TDESocketAddress::asUnix() { return d->ref; } -KUnixSocketAddress KSocketAddress::asUnix() const +KUnixSocketAddress TDESocketAddress::asUnix() const { return d->ref; } -int KSocketAddress::ianaFamily(int af) +int TDESocketAddress::ianaFamily(int af) { switch (af) { @@ -664,7 +664,7 @@ int KSocketAddress::ianaFamily(int af) } } -int KSocketAddress::fromIanaFamily(int iana) +int TDESocketAddress::fromIanaFamily(int iana) { switch (iana) { @@ -688,7 +688,7 @@ KInetSocketAddress::KInetSocketAddress() // binary data constructor KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len) - : KSocketAddress(sa, len) + : TDESocketAddress(sa, len) { if (!d->invalid()) update(); @@ -703,21 +703,21 @@ KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port) // copy constructor KInetSocketAddress::KInetSocketAddress(const KInetSocketAddress& other) - : KSocketAddress(other) + : TDESocketAddress(other) { } // special copy constructor -KInetSocketAddress::KInetSocketAddress(const KSocketAddress& other) - : KSocketAddress(other) +KInetSocketAddress::KInetSocketAddress(const TDESocketAddress& other) + : TDESocketAddress(other) { if (!d->invalid()) update(); } // special constructor -KInetSocketAddress::KInetSocketAddress(KSocketAddressData *d) - : KSocketAddress(d) +KInetSocketAddress::KInetSocketAddress(TDESocketAddressData *d) + : TDESocketAddress(d) { } @@ -730,7 +730,7 @@ KInetSocketAddress::~KInetSocketAddress() // copy operator KInetSocketAddress& KInetSocketAddress::operator =(const KInetSocketAddress& other) { - KSocketAddress::operator =(other); + TDESocketAddress::operator =(other); return *this; } @@ -905,14 +905,14 @@ KUnixSocketAddress::KUnixSocketAddress() } KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len) - : KSocketAddress(sa, len) + : TDESocketAddress(sa, len) { if (!d->invalid() && d->addr.un->sun_family != AF_UNIX) d->invalidate(); } KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other) - : KSocketAddress(other) + : TDESocketAddress(other) { } @@ -921,8 +921,8 @@ KUnixSocketAddress::KUnixSocketAddress(const TQString& pathname) setPathname(pathname); } -KUnixSocketAddress::KUnixSocketAddress(KSocketAddressData* d) - : KSocketAddress(d) +KUnixSocketAddress::KUnixSocketAddress(TDESocketAddressData* d) + : TDESocketAddress(d) { } @@ -932,7 +932,7 @@ KUnixSocketAddress::~KUnixSocketAddress() KUnixSocketAddress& KUnixSocketAddress::operator =(const KUnixSocketAddress& other) { - KSocketAddress::operator =(other); + TDESocketAddress::operator =(other); return *this; } diff --git a/tdecore/network/tdesocketaddress.h b/tdecore/network/tdesocketaddress.h index 885bb77cb..100e05fb2 100644 --- a/tdecore/network/tdesocketaddress.h +++ b/tdecore/network/tdesocketaddress.h @@ -38,7 +38,7 @@ struct sockaddr_un; namespace KNetwork { class KIpAddress; -class KSocketAddress; +class TDESocketAddress; class KInetSocketAddress; class KUnixSocketAddress; @@ -412,15 +412,15 @@ public: }; -class KSocketAddressData; -/** @class KSocketAddress tdesocketaddress.h tdesocketaddress.h +class TDESocketAddressData; +/** @class TDESocketAddress tdesocketaddress.h tdesocketaddress.h * @brief A generic socket address. * * This class holds one generic socket address. * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KSocketAddress +class TDECORE_EXPORT TDESocketAddress { public: /** @@ -428,7 +428,7 @@ public: * * Creates an empty object */ - KSocketAddress(); + TDESocketAddress(); /** * Creates this object with the given data. @@ -437,7 +437,7 @@ public: * @param sa the socket address structure * @param len the socket address length */ - KSocketAddress(const sockaddr* sa, TQ_UINT16 len); + TDESocketAddress(const sockaddr* sa, TQ_UINT16 len); /** * Copy constructor. This creates a copy of the other @@ -447,12 +447,12 @@ public: * * @param other the object to copy from */ - KSocketAddress(const KSocketAddress& other); + TDESocketAddress(const TDESocketAddress& other); /** * Destructor. Frees any associated resources. */ - virtual ~KSocketAddress(); + virtual ~TDESocketAddress(); /** * Performs a shallow copy of the other object into this one. @@ -460,7 +460,7 @@ public: * * @param other the object to copy from */ - KSocketAddress& operator =(const KSocketAddress& other); + TDESocketAddress& operator =(const TDESocketAddress& other); /** * Returns the socket address structure, to be passed down to @@ -490,7 +490,7 @@ public: * @param sa the socket address structure * @param len the socket address length */ - KSocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len); + TDESocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len); /** * Returns the socket address structure, to be passed down to @@ -517,14 +517,14 @@ public: * the family: * * \code - * KSocketAddress qsa; + * TDESocketAddress qsa; * [...] * qsa.setFamily(AF_UNSPEC).setLength(newlen); * \endcode * * @param len the new length */ - KSocketAddress& setLength(TQ_UINT16 len); + TDESocketAddress& setLength(TQ_UINT16 len); /** * Returns the family of this address. @@ -540,7 +540,7 @@ public: * * @param family the new family to set */ - virtual KSocketAddress& setFamily(int family); + virtual TDESocketAddress& setFamily(int family); /** * Returns the IANA family number of this address. @@ -558,7 +558,7 @@ public: * @param other the other socket * @return true if both sockets are equal */ - bool operator ==(const KSocketAddress& other) const; + bool operator ==(const TDESocketAddress& other) const; /** * Returns the node name of this socket. @@ -615,11 +615,11 @@ public: protected: /// @internal /// private data - KSocketAddressData *d; + TDESocketAddressData *d; /// @internal /// extra constructor - KSocketAddress(KSocketAddressData* d); + TDESocketAddress(TDESocketAddressData* d); public: // static /** @@ -648,9 +648,9 @@ public: // static * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KInetSocketAddress: public KSocketAddress +class TDECORE_EXPORT KInetSocketAddress: public TDESocketAddress { - friend class KSocketAddress; + friend class TDESocketAddress; public: /** * Public constructor. Creates an empty object. @@ -693,7 +693,7 @@ public: * * @param other the other object */ - KInetSocketAddress(const KSocketAddress& other); + KInetSocketAddress(const TDESocketAddress& other); /** * Destroys this object. @@ -817,7 +817,7 @@ public: protected: /// @internal /// extra constructor - KInetSocketAddress(KSocketAddressData* d); + KInetSocketAddress(TDESocketAddressData* d); private: void update(); @@ -837,9 +837,9 @@ private: * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KUnixSocketAddress: public KSocketAddress +class TDECORE_EXPORT KUnixSocketAddress: public TDESocketAddress { - friend class KSocketAddress; + friend class TDESocketAddress; public: /** * Default constructor. Creates an empty object. @@ -904,7 +904,7 @@ public: protected: /// @internal /// extra constructor - KUnixSocketAddress(KSocketAddressData* d); + KUnixSocketAddress(TDESocketAddressData* d); }; } // namespace KNetwork diff --git a/tdecore/network/tdesocketbase.cpp b/tdecore/network/tdesocketbase.cpp index 9be0d6e52..0eb31bbc1 100644 --- a/tdecore/network/tdesocketbase.cpp +++ b/tdecore/network/tdesocketbase.cpp @@ -31,24 +31,24 @@ using namespace KNetwork; -class KNetwork::KSocketBasePrivate +class KNetwork::TDESocketBasePrivate { public: int socketOptions; int socketError; int capabilities; - mutable KSocketDevice* device; + mutable TDESocketDevice* device; TQMutex mutex; - KSocketBasePrivate() + TDESocketBasePrivate() : mutex(true) // create recursive { } }; -KSocketBase::KSocketBase() - : d(new KSocketBasePrivate) +TDESocketBase::TDESocketBase() + : d(new TDESocketBasePrivate) { d->socketOptions = Blocking; d->socketError = 0; @@ -56,64 +56,64 @@ KSocketBase::KSocketBase() d->capabilities = 0; } -KSocketBase::~KSocketBase() +TDESocketBase::~TDESocketBase() { delete d->device; delete d; } -bool KSocketBase::setSocketOptions(int opts) +bool TDESocketBase::setSocketOptions(int opts) { d->socketOptions = opts; return true; } -int KSocketBase::socketOptions() const +int TDESocketBase::socketOptions() const { return d->socketOptions; } -bool KSocketBase::setBlocking(bool enable) +bool TDESocketBase::setBlocking(bool enable) { return setSocketOptions((socketOptions() & ~Blocking) | (enable ? Blocking : 0)); } -bool KSocketBase::blocking() const +bool TDESocketBase::blocking() const { return socketOptions() & Blocking; } -bool KSocketBase::setAddressReuseable(bool enable) +bool TDESocketBase::setAddressReuseable(bool enable) { return setSocketOptions((socketOptions() & ~AddressReuseable) | (enable ? AddressReuseable : 0)); } -bool KSocketBase::addressReuseable() const +bool TDESocketBase::addressReuseable() const { return socketOptions() & AddressReuseable; } -bool KSocketBase::setIPv6Only(bool enable) +bool TDESocketBase::setIPv6Only(bool enable) { return setSocketOptions((socketOptions() & ~IPv6Only) | (enable ? IPv6Only : 0)); } -bool KSocketBase::isIPv6Only() const +bool TDESocketBase::isIPv6Only() const { return socketOptions() & IPv6Only; } -bool KSocketBase::setBroadcast(bool enable) +bool TDESocketBase::setBroadcast(bool enable) { return setSocketOptions((socketOptions() & ~Broadcast) | (enable ? Broadcast : 0)); } -bool KSocketBase::broadcast() const +bool TDESocketBase::broadcast() const { return socketOptions() & Broadcast; } -KSocketDevice* KSocketBase::socketDevice() const +TDESocketDevice* TDESocketBase::socketDevice() const { if (d->device) return d->device; @@ -123,47 +123,47 @@ KSocketDevice* KSocketBase::socketDevice() const if (d->device) return d->device; - KSocketBase* that = const_cast<KSocketBase*>(this); - KSocketDevice* dev = 0; + TDESocketBase* that = const_cast<TDESocketBase*>(this); + TDESocketDevice* dev = 0; if (d->capabilities) - dev = KSocketDevice::createDefault(that, d->capabilities); + dev = TDESocketDevice::createDefault(that, d->capabilities); if (!dev) - dev = KSocketDevice::createDefault(that); + dev = TDESocketDevice::createDefault(that); that->setSocketDevice(dev); return d->device; } -void KSocketBase::setSocketDevice(KSocketDevice* device) +void TDESocketBase::setSocketDevice(TDESocketDevice* device) { TQMutexLocker locker(mutex()); if (d->device == 0L) d->device = device; } -int KSocketBase::setRequestedCapabilities(int add, int remove) +int TDESocketBase::setRequestedCapabilities(int add, int remove) { d->capabilities |= add; d->capabilities &= ~remove; return d->capabilities; } -bool KSocketBase::hasDevice() const +bool TDESocketBase::hasDevice() const { return d->device != 0L; } -void KSocketBase::setError(SocketError error) +void TDESocketBase::setError(SocketError error) { d->socketError = error; } -KSocketBase::SocketError KSocketBase::error() const +TDESocketBase::SocketError TDESocketBase::error() const { - return static_cast<KSocketBase::SocketError>(d->socketError); + return static_cast<TDESocketBase::SocketError>(d->socketError); } // static -TQString KSocketBase::errorString(KSocketBase::SocketError code) +TQString TDESocketBase::errorString(TDESocketBase::SocketError code) { TQString reason; switch (code) @@ -256,7 +256,7 @@ TQString KSocketBase::errorString(KSocketBase::SocketError code) } // static -bool KSocketBase::isFatalError(int code) +bool TDESocketBase::isFatalError(int code) { switch (code) { @@ -270,12 +270,12 @@ bool KSocketBase::isFatalError(int code) return true; } -void KSocketBase::unsetSocketDevice() +void TDESocketBase::unsetSocketDevice() { d->device = 0L; } -TQMutex* KSocketBase::mutex() const +TQMutex* TDESocketBase::mutex() const { return &d->mutex; } @@ -308,13 +308,13 @@ int KActiveSocketBase::putch(int ch) void KActiveSocketBase::setError(int status, SocketError error) { - KSocketBase::setError(error); + TDESocketBase::setError(error); setStatus(status); } void KActiveSocketBase::resetError() { - KSocketBase::setError(NoError); + TDESocketBase::setError(NoError); resetStatus(); } diff --git a/tdecore/network/tdesocketbase.h b/tdecore/network/tdesocketbase.h index 48ae15e05..bd0828408 100644 --- a/tdecore/network/tdesocketbase.h +++ b/tdecore/network/tdesocketbase.h @@ -80,10 +80,10 @@ class TQMutex; namespace KNetwork { class KResolverEntry; -class KSocketDevice; +class TDESocketDevice; -class KSocketBasePrivate; -/** @class KSocketBase tdesocketbase.h tdesocketbase.h +class TDESocketBasePrivate; +/** @class TDESocketBase tdesocketbase.h tdesocketbase.h * @brief Basic socket functionality. * * This class provides the basic socket functionlity for descended classes. @@ -94,7 +94,7 @@ class KSocketBasePrivate; * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KSocketBase +class TDECORE_EXPORT TDESocketBase { public: /** @@ -175,12 +175,12 @@ public: /** * Default constructor. */ - KSocketBase(); + TDESocketBase(); /** * Destructor. */ - virtual ~KSocketBase(); + virtual ~TDESocketBase(); /* * The following functions are shared by all descended classes and will have @@ -316,7 +316,7 @@ public: * This function creates the device if none has been set * using the default factory. */ - KSocketDevice* socketDevice() const; + TDESocketDevice* socketDevice() const; /** * Sets the socket implementation to be used on this socket. @@ -331,7 +331,7 @@ public: * This function is called by @ref socketDevice above when the socket is * first created. */ - virtual void setSocketDevice(KSocketDevice* device); + virtual void setSocketDevice(TDESocketDevice* device); /** * Sets the internally requested capabilities for a socket device. @@ -341,16 +341,16 @@ public: * implementation. By using this function, derived classes can request * that a backend with those capabilities be created when necessary. * - * For the possible flags, see @ref KSocketDevice::Capabilities. However, note + * For the possible flags, see @ref TDESocketDevice::Capabilities. However, note * that only the Can* flags make sense in this context. * * @note Since socketDevice must always return a valid backend object, it * is is possible that the created device does not conform to all * requirements requested. Implementations sensitive to this fact * should test the object returned by @ref socketDevice (through - * @ref KSocketDevice::capabilities, for instance) the availability. + * @ref TDESocketDevice::capabilities, for instance) the availability. * - * @param add mask of @ref KSocketDevice::Capabilities to add + * @param add mask of @ref TDESocketDevice::Capabilities to add * @param remove mask of bits to remove from the requirements * @return the current mask of requested capabilities */ @@ -420,15 +420,15 @@ public: private: /// @internal - /// called by KSocketDevice + /// called by TDESocketDevice void unsetSocketDevice(); - KSocketBase(const KSocketBase&); - KSocketBase& operator =(const KSocketBase&); + TDESocketBase(const TDESocketBase&); + TDESocketBase& operator =(const TDESocketBase&); - KSocketBasePrivate *d; + TDESocketBasePrivate *d; - friend class KSocketDevice; + friend class TDESocketDevice; }; /** @@ -440,7 +440,7 @@ private: * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public KSocketBase +class TDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public TDESocketBase { public: /** @@ -575,7 +575,7 @@ public: * @param from the address of the sender will be stored here * @returns the actual number of bytes read */ - virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from) = 0; + virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from) = 0; /** * Peeks the data in the socket. @@ -602,7 +602,7 @@ public: * @param from the address of the sender will be stored here * @returns the actual number of bytes copied into @p data */ - virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0; + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) = 0; /** * Writes the given data to the socket. @@ -623,7 +623,7 @@ public: * @param to the address to send to * @returns the number of bytes actually sent */ - virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to) = 0; + virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to) = 0; /** * Reads one character from the socket. @@ -647,14 +647,14 @@ public: /** * Returns this socket's local address. */ - virtual KSocketAddress localAddress() const = 0; + virtual TDESocketAddress localAddress() const = 0; /** * Return this socket's peer address, if we are connected. * If the address cannot be retrieved, the returned object will contain * an invalid address. */ - virtual KSocketAddress peerAddress() const = 0; + virtual TDESocketAddress peerAddress() const = 0; // FIXME KDE 4.0: // enable this function @@ -662,7 +662,7 @@ public: /** * Returns this socket's externally-visible address, if known. */ - virtual KSocketAddress externalAddress() const = 0; + virtual TDESocketAddress externalAddress() const = 0; #endif protected: @@ -689,7 +689,7 @@ protected: * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KPassiveSocketBase: virtual public KSocketBase +class TDECORE_EXPORT KPassiveSocketBase: virtual public TDESocketBase { public: /** @@ -754,12 +754,12 @@ public: /** * Returns this socket's local address. */ - virtual KSocketAddress localAddress() const = 0; + virtual TDESocketAddress localAddress() const = 0; /** * Returns this socket's externally-visible address if known. */ - virtual KSocketAddress externalAddress() const = 0; + virtual TDESocketAddress externalAddress() const = 0; private: KPassiveSocketBase(const KPassiveSocketBase&); diff --git a/tdecore/network/tdesocketbuffer.cpp b/tdecore/network/tdesocketbuffer.cpp index 0ba18b77b..52988d344 100644 --- a/tdecore/network/tdesocketbuffer.cpp +++ b/tdecore/network/tdesocketbuffer.cpp @@ -33,23 +33,23 @@ using namespace KNetwork; using namespace KNetwork::Internal; -KSocketBuffer::KSocketBuffer(TQ_LONG size) +TDESocketBuffer::TDESocketBuffer(TQ_LONG size) : m_mutex(true), m_offset(0), m_size(size), m_length(0) { } -KSocketBuffer::KSocketBuffer(const KSocketBuffer& other) +TDESocketBuffer::TDESocketBuffer(const TDESocketBuffer& other) : KIOBufferBase(other), m_mutex(true) { *this = other; } -KSocketBuffer::~KSocketBuffer() +TDESocketBuffer::~TDESocketBuffer() { // TQValueList takes care of deallocating memory } -KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other) +TDESocketBuffer& TDESocketBuffer::operator=(const TDESocketBuffer& other) { TQMutexLocker locker1(&m_mutex); TQMutexLocker locker2(&other.m_mutex); @@ -64,7 +64,7 @@ KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other) return *this; } -bool KSocketBuffer::canReadLine() const +bool TDESocketBuffer::canReadLine() const { TQMutexLocker locker(&m_mutex); @@ -85,7 +85,7 @@ bool KSocketBuffer::canReadLine() const return false; // not found } -TQCString KSocketBuffer::readLine() +TQCString TDESocketBuffer::readLine() { if (!canReadLine()) return TQCString(); // empty @@ -120,17 +120,17 @@ TQCString KSocketBuffer::readLine() return result; } -TQ_LONG KSocketBuffer::length() const +TQ_LONG TDESocketBuffer::length() const { return m_length; } -TQ_LONG KSocketBuffer::size() const +TQ_LONG TDESocketBuffer::size() const { return m_size; } -bool KSocketBuffer::setSize(TQ_LONG size) +bool TDESocketBuffer::setSize(TQ_LONG size) { m_size = size; if (size == -1 || m_length < m_size) @@ -147,7 +147,7 @@ bool KSocketBuffer::setSize(TQ_LONG size) return (m_length - m_size) == consumeBuffer(0L, m_length - m_size, true); } -TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len) +TQ_LONG TDESocketBuffer::feedBuffer(const char *data, TQ_LONG len) { if (data == 0L || len == 0) return 0; // nothing to write @@ -168,7 +168,7 @@ TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len) return len; } -TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard) +TQ_LONG TDESocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard) { if (maxlen == 0 || isEmpty()) return 0; @@ -220,7 +220,7 @@ TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool disc return copied; } -void KSocketBuffer::clear() +void TDESocketBuffer::clear() { TQMutexLocker locker(&m_mutex); m_list.clear(); @@ -228,7 +228,7 @@ void KSocketBuffer::clear() m_length = 0; } -TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len) +TQ_LONG TDESocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len) { if (len == 0 || isEmpty()) return 0; @@ -293,7 +293,7 @@ TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len) return written; } -TQ_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len) +TQ_LONG TDESocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len) { if (len == 0 || isFull()) return 0; diff --git a/tdecore/network/tdesocketbuffer_p.h b/tdecore/network/tdesocketbuffer_p.h index b2c5dc6b2..be71f462e 100644 --- a/tdecore/network/tdesocketbuffer_p.h +++ b/tdecore/network/tdesocketbuffer_p.h @@ -38,14 +38,14 @@ class KActiveSocketBase; /** * @internal - * @class KSocketBuffer tdesocketbuffer_p.h tdesocketbuffer_p.h + * @class TDESocketBuffer tdesocketbuffer_p.h tdesocketbuffer_p.h * @brief generic socket buffering code * * This class implements generic buffering used by @ref KBufferedSocket. * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class KSocketBuffer: public KIOBufferBase +class TDESocketBuffer: public KIOBufferBase { public: /** @@ -53,22 +53,22 @@ public: * * @param size the maximum size of the buffer */ - KSocketBuffer(TQ_LONG size = -1); + TDESocketBuffer(TQ_LONG size = -1); /** * Copy constructor. */ - KSocketBuffer(const KSocketBuffer& other); + TDESocketBuffer(const TDESocketBuffer& other); /** * Virtual destructor. Frees the buffer and discards its contents. */ - virtual ~KSocketBuffer(); + virtual ~TDESocketBuffer(); /** * Assignment operator. */ - KSocketBuffer& operator=(const KSocketBuffer& other); + TDESocketBuffer& operator=(const TDESocketBuffer& other); /** * Returns true if a line can be read from the buffer. diff --git a/tdecore/network/tdesocketdevice.cpp b/tdecore/network/tdesocketdevice.cpp index 064b66b08..e4802bb7c 100644 --- a/tdecore/network/tdesocketdevice.cpp +++ b/tdecore/network/tdesocketdevice.cpp @@ -60,14 +60,14 @@ using namespace KNetwork; -class KNetwork::KSocketDevicePrivate +class KNetwork::TDESocketDevicePrivate { public: mutable TQSocketNotifier *input, *output, *exception; - KSocketAddress local, peer; + TDESocketAddress local, peer; int af; - inline KSocketDevicePrivate() + inline TDESocketDevicePrivate() { input = output = exception = 0L; af = 0; @@ -75,16 +75,16 @@ public: }; -KSocketDevice::KSocketDevice(const KSocketBase* parent) - : m_sockfd(-1), d(new KSocketDevicePrivate) +TDESocketDevice::TDESocketDevice(const TDESocketBase* parent) + : m_sockfd(-1), d(new TDESocketDevicePrivate) { setSocketDevice(this); if (parent) setSocketOptions(parent->socketOptions()); } -KSocketDevice::KSocketDevice(int fd) - : m_sockfd(fd), d(new KSocketDevicePrivate) +TDESocketDevice::TDESocketDevice(int fd) + : m_sockfd(fd), d(new TDESocketDevicePrivate) { setState(IO_Open); setFlags(IO_Sequential | IO_Raw | IO_ReadWrite); @@ -92,26 +92,26 @@ KSocketDevice::KSocketDevice(int fd) d->af = localAddress().family(); } -KSocketDevice::KSocketDevice(bool, const KSocketBase* parent) - : m_sockfd(-1), d(new KSocketDevicePrivate) +TDESocketDevice::TDESocketDevice(bool, const TDESocketBase* parent) + : m_sockfd(-1), d(new TDESocketDevicePrivate) { // do not set parent if (parent) setSocketOptions(parent->socketOptions()); } -KSocketDevice::~KSocketDevice() +TDESocketDevice::~TDESocketDevice() { close(); // deletes the notifiers unsetSocketDevice(); // prevent double deletion delete d; } -bool KSocketDevice::setSocketOptions(int opts) +bool TDESocketDevice::setSocketOptions(int opts) { // must call parent TQMutexLocker locker(mutex()); - KSocketBase::setSocketOptions(opts); + TDESocketBase::setSocketOptions(opts); if (m_sockfd == -1) return true; // flags are stored @@ -171,13 +171,13 @@ bool KSocketDevice::setSocketOptions(int opts) return true; // all went well } -bool KSocketDevice::open(TQ_OpenMode) +bool TDESocketDevice::open(TQ_OpenMode) { resetError(); return false; } -void KSocketDevice::close() +void TDESocketDevice::close() { resetError(); if (m_sockfd != -1) @@ -198,7 +198,7 @@ void KSocketDevice::close() m_sockfd = -1; } -bool KSocketDevice::create(int family, int type, int protocol) +bool TDESocketDevice::create(int family, int type, int protocol) { resetError(); @@ -224,12 +224,12 @@ bool KSocketDevice::create(int family, int type, int protocol) return true; // successfully created } -bool KSocketDevice::create(const KResolverEntry& address) +bool TDESocketDevice::create(const KResolverEntry& address) { return create(address.family(), address.socketType(), address.protocol()); } -bool KSocketDevice::bind(const KResolverEntry& address) +bool TDESocketDevice::bind(const KResolverEntry& address) { resetError(); @@ -252,7 +252,7 @@ bool KSocketDevice::bind(const KResolverEntry& address) return true; } -bool KSocketDevice::listen(int backlog) +bool TDESocketDevice::listen(int backlog) { if (m_sockfd != -1) { @@ -273,7 +273,7 @@ bool KSocketDevice::listen(int backlog) return false; } -bool KSocketDevice::connect(const KResolverEntry& address) +bool TDESocketDevice::connect(const KResolverEntry& address) { resetError(); @@ -306,7 +306,7 @@ bool KSocketDevice::connect(const KResolverEntry& address) return true; // all is well } -KSocketDevice* KSocketDevice::accept() +TDESocketDevice* TDESocketDevice::accept() { if (m_sockfd == -1) { @@ -327,17 +327,17 @@ KSocketDevice* KSocketDevice::accept() return NULL; } - return new KSocketDevice(newfd); + return new TDESocketDevice(newfd); } -bool KSocketDevice::disconnect() +bool TDESocketDevice::disconnect() { resetError(); if (m_sockfd == -1) return false; // can't create - KSocketAddress address; + TDESocketAddress address; address.setFamily(AF_UNSPEC); if (kde_connect(m_sockfd, address.address(), address.length()) == -1) { @@ -365,10 +365,10 @@ bool KSocketDevice::disconnect() } #ifdef USE_QT3 -TQ_LONG KSocketDevice::bytesAvailable() const +TQ_LONG TDESocketDevice::bytesAvailable() const #endif #ifdef USE_QT4 -qint64 KSocketDevice::bytesAvailable() const +qint64 TDESocketDevice::bytesAvailable() const #endif { if (m_sockfd == -1) @@ -381,7 +381,7 @@ qint64 KSocketDevice::bytesAvailable() const return nchars; } -TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout) +TQ_LONG TDESocketDevice::waitForMore(int msecs, bool *timeout) { if (m_sockfd == -1) return -1; // there won't ever be anything to read... @@ -393,7 +393,7 @@ TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout) return bytesAvailable(); } -static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) +static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, TDESocketAddress* from, ssize_t &retval, bool peek = false) { socklen_t len; if (from) @@ -407,19 +407,19 @@ static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddres if (retval == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) - return KSocketDevice::WouldBlock; + return TDESocketDevice::WouldBlock; else - return KSocketDevice::UnknownError; + return TDESocketDevice::UnknownError; } if (retval == 0) - return KSocketDevice::RemotelyDisconnected; + return TDESocketDevice::RemotelyDisconnected; if (from) from->setLength(len); return 0; } -TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen) +TQT_TQIO_LONG TDESocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -440,7 +440,7 @@ TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen) return retval; } -TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress &from) +TQT_TQIO_LONG TDESocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress &from) { resetError(); if (m_sockfd == -1) @@ -461,7 +461,7 @@ TQT_TQIO_LONG KSocketDevice::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSoc return retval; } -TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen) +TQ_LONG TDESocketDevice::peekBlock(char *data, TQ_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -482,7 +482,7 @@ TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen) return retval; } -TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) +TQ_LONG TDESocketDevice::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from) { resetError(); if (m_sockfd == -1) @@ -503,12 +503,12 @@ TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& fr return retval; } -TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len) +TQT_TQIO_LONG TDESocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len) { - return tqwriteBlock(data, len, KSocketAddress()); + return tqwriteBlock(data, len, TDESocketAddress()); } -TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to) +TQT_TQIO_LONG TDESocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to) { resetError(); if (m_sockfd == -1) @@ -532,20 +532,20 @@ TQT_TQIO_LONG KSocketDevice::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, return retval; } -KSocketAddress KSocketDevice::localAddress() const +TDESocketAddress TDESocketDevice::localAddress() const { if (m_sockfd == -1) - return KSocketAddress(); // not open, empty value + return TDESocketAddress(); // not open, empty value if (d->local.family() != AF_UNSPEC) return d->local; socklen_t len; - KSocketAddress localAddress; + TDESocketAddress localAddress; localAddress.setLength(len = 32); // arbitrary value if (kde_getsockname(m_sockfd, localAddress.address(), &len) == -1) // error! - return d->local = KSocketAddress(); + return d->local = TDESocketAddress(); #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN len = localAddress.address()->sa_len; @@ -563,25 +563,25 @@ KSocketAddress KSocketDevice::localAddress() const localAddress.setLength(len); if (kde_getsockname(m_sockfd, localAddress.address(), &len) == -1) // error! - return d->local = KSocketAddress(); + return d->local = TDESocketAddress(); return d->local = localAddress; } -KSocketAddress KSocketDevice::peerAddress() const +TDESocketAddress TDESocketDevice::peerAddress() const { if (m_sockfd == -1) - return KSocketAddress(); // not open, empty value + return TDESocketAddress(); // not open, empty value if (d->peer.family() != AF_UNSPEC) return d->peer; socklen_t len; - KSocketAddress peerAddress; + TDESocketAddress peerAddress; peerAddress.setLength(len = 32); // arbitrary value if (kde_getpeername(m_sockfd, peerAddress.address(), &len) == -1) // error! - return d->peer = KSocketAddress(); + return d->peer = TDESocketAddress(); #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN len = peerAddress.address()->sa_len; @@ -599,19 +599,19 @@ KSocketAddress KSocketDevice::peerAddress() const peerAddress.setLength(len); if (kde_getpeername(m_sockfd, peerAddress.address(), &len) == -1) // error! - return d->peer = KSocketAddress(); + return d->peer = TDESocketAddress(); return d->peer = peerAddress; } -KSocketAddress KSocketDevice::externalAddress() const +TDESocketAddress TDESocketDevice::externalAddress() const { // for normal sockets, the externally visible address is the same // as the local address return localAddress(); } -TQSocketNotifier* KSocketDevice::readNotifier() const +TQSocketNotifier* TDESocketDevice::readNotifier() const { if (d->input) return d->input; @@ -629,7 +629,7 @@ TQSocketNotifier* KSocketDevice::readNotifier() const return d->input = createNotifier(TQSocketNotifier::Read); } -TQSocketNotifier* KSocketDevice::writeNotifier() const +TQSocketNotifier* TDESocketDevice::writeNotifier() const { if (d->output) return d->output; @@ -647,7 +647,7 @@ TQSocketNotifier* KSocketDevice::writeNotifier() const return d->output = createNotifier(TQSocketNotifier::Write); } -TQSocketNotifier* KSocketDevice::exceptionNotifier() const +TQSocketNotifier* TDESocketDevice::exceptionNotifier() const { if (d->exception) return d->exception; @@ -665,7 +665,7 @@ TQSocketNotifier* KSocketDevice::exceptionNotifier() const return d->exception = createNotifier(TQSocketNotifier::Exception); } -bool KSocketDevice::poll(bool *input, bool *output, bool *exception, +bool TDESocketDevice::poll(bool *input, bool *output, bool *exception, int timeout, bool* timedout) { if (m_sockfd == -1) @@ -787,13 +787,13 @@ bool KSocketDevice::poll(bool *input, bool *output, bool *exception, #endif } -bool KSocketDevice::poll(int timeout, bool *timedout) +bool TDESocketDevice::poll(int timeout, bool *timedout) { bool input, output, exception; return poll(&input, &output, &exception, timeout, timedout); } -TQSocketNotifier* KSocketDevice::createNotifier(TQSocketNotifier::Type type) const +TQSocketNotifier* TDESocketDevice::createNotifier(TQSocketNotifier::Type type) const { if (m_sockfd == -1) return 0L; @@ -836,14 +836,14 @@ namespace }; } -static KSocketDeviceFactoryBase* defaultImplFactory; +static TDESocketDeviceFactoryBase* defaultImplFactory; static TQMutex defaultImplFactoryMutex; -typedef TQMap<int, KSocketDeviceFactoryBase* > factoryMap; +typedef TQMap<int, TDESocketDeviceFactoryBase* > factoryMap; static factoryMap factories; -KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent) +TDESocketDevice* TDESocketDevice::createDefault(TDESocketBase* parent) { - KSocketDevice* device = dynamic_cast<KSocketDevice*>(parent); + TDESocketDevice* device = dynamic_cast<TDESocketDevice*>(parent); if (device != 0L) return device; @@ -853,12 +853,12 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent) return defaultImplFactory->create(parent); // the really default - return new KSocketDevice(parent); + return new TDESocketDevice(parent); } -KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilities) +TDESocketDevice* TDESocketDevice::createDefault(TDESocketBase* parent, int capabilities) { - KSocketDevice* device = dynamic_cast<KSocketDevice*>(parent); + TDESocketDevice* device = dynamic_cast<TDESocketDevice*>(parent); if (device != 0L) return device; @@ -872,16 +872,16 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie return 0L; // no default } -KSocketDeviceFactoryBase* -KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory) +TDESocketDeviceFactoryBase* +TDESocketDevice::setDefaultImpl(TDESocketDeviceFactoryBase* factory) { TQMutexLocker locker(&defaultImplFactoryMutex); - KSocketDeviceFactoryBase* old = defaultImplFactory; + TDESocketDeviceFactoryBase* old = defaultImplFactory; defaultImplFactory = factory; return old; } -void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities) +void TDESocketDevice::addNewImpl(TDESocketDeviceFactoryBase* factory, int capabilities) { TQMutexLocker locker(&defaultImplFactoryMutex); if (factories.contains(capabilities)) diff --git a/tdecore/network/tdesocketdevice.h b/tdecore/network/tdesocketdevice.h index 10856716d..52fe18709 100644 --- a/tdecore/network/tdesocketdevice.h +++ b/tdecore/network/tdesocketdevice.h @@ -30,32 +30,32 @@ namespace KNetwork { -class KSocketDevice; -class KSocketDeviceFactoryBase; +class TDESocketDevice; +class TDESocketDeviceFactoryBase; -class KSocketDevicePrivate; -/** @class KSocketDevice tdesocketdevice.h tdesocketdevice.h +class TDESocketDevicePrivate; +/** @class TDESocketDevice tdesocketdevice.h tdesocketdevice.h * @brief Low-level socket functionality. * * This class provides low-level socket functionality. * * Most users will prefer "cooked" interfaces like those of @ref KStreamSocket or - * @ref KServerSocket. + * @ref TDEServerSocket. * * Descended classes from this one provide some other kinds of socket functionality, * like proxying or specific socket types. * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KSocketDevice: public KActiveSocketBase, public KPassiveSocketBase +class TDECORE_EXPORT TDESocketDevice: public KActiveSocketBase, public KPassiveSocketBase { public: /** * Capabilities for the socket implementation. * - * KSocketDevice-derived classes can implement certain capabilities that are not + * TDESocketDevice-derived classes can implement certain capabilities that are not * available in the default class. These capabilities are described by these flags. - * The default KSocketDevice class has none of these capabilities. + * The default TDESocketDevice class has none of these capabilities. * * For the negative capabilities (inabilities, the CanNot* forms), when a capability * is not present, the implementation will default to the original behaviour. @@ -101,7 +101,7 @@ public: * The parameter is used to specify which socket this object is used as * a device for. */ - explicit KSocketDevice(const KSocketBase* = 0L); + explicit TDESocketDevice(const TDESocketBase* = 0L); /** * Constructs a new object around an already-open socket. @@ -109,12 +109,12 @@ public: * Note: you should write programs that create sockets through * the classes whenever possible. */ - explicit KSocketDevice(int fd); + explicit TDESocketDevice(int fd); /** * Destructor. This closes the socket if it's open. */ - virtual ~KSocketDevice(); + virtual ~TDESocketDevice(); /** * Returns the file descriptor for this socket. @@ -186,9 +186,9 @@ public: /** * Accepts a new incoming connection. - * Note: this function returns a socket of type KSocketDevice. + * Note: this function returns a socket of type TDESocketDevice. */ - virtual KSocketDevice* accept(); + virtual TDESocketDevice* accept(); /** * Disconnects this socket. @@ -221,7 +221,7 @@ public: /** * Reads data and the source address from this socket. */ - virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, KSocketAddress& from); + virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from); /** * Peeks data in the socket. @@ -231,7 +231,7 @@ public: /** * Peeks the data in the socket and the source address. */ - virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from); /** * Writes data to the socket. @@ -241,18 +241,18 @@ public: /** * Writes the given data to the given destination address. */ - virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const KSocketAddress& to); + virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to); /** * Returns this socket's local address. */ - virtual KSocketAddress localAddress() const; + virtual TDESocketAddress localAddress() const; /** * Returns this socket's peer address. If this implementation does proxying * of some sort, this is the real external address, not the proxy's address. */ - virtual KSocketAddress peerAddress() const; + virtual TDESocketAddress peerAddress() const; /** * Returns this socket's externally visible local address. @@ -265,10 +265,10 @@ public: * addresses different from the local socket values. The default implementation * returns the same value as @ref localAddress. * - * @note This function may return an empty KSocketAddress. In that case, the + * @note This function may return an empty TDESocketAddress. In that case, the * externally visible address could/can not be determined. */ - virtual KSocketAddress externalAddress() const; + virtual TDESocketAddress externalAddress() const; /** * Returns a socket notifier for input on this socket. @@ -337,7 +337,7 @@ protected: * * @param parent the parent, if any */ - KSocketDevice(bool, const KSocketBase* parent = 0L); + TDESocketDevice(bool, const TDESocketBase* parent = 0L); /** * Creates a socket notifier of the given type. @@ -358,16 +358,16 @@ protected: public: /** - * Creates a new default KSocketDevice object given + * Creates a new default TDESocketDevice object given * the parent object. * * The capabilities flag indicates the desired capabilities the object being * created should possess. Those capabilities are not guaranteed: if no factory * can provide such an object, a default object will be created. * - * @param parent the KSocketBase parent + * @param parent the TDESocketBase parent */ - static KSocketDevice* createDefault(KSocketBase* parent); + static TDESocketDevice* createDefault(TDESocketBase* parent); /** * @overload @@ -377,40 +377,40 @@ public: * @param parent the parent * @param capabilities the requested capabilities */ - static KSocketDevice* createDefault(KSocketBase* parent, int capabilities); + static TDESocketDevice* createDefault(TDESocketBase* parent, int capabilities); /** - * Sets the default KSocketDevice implementation to use and + * Sets the default TDESocketDevice implementation to use and * return the old factory. * * @param factory the factory object for the implementation */ - static KSocketDeviceFactoryBase* setDefaultImpl(KSocketDeviceFactoryBase* factory); + static TDESocketDeviceFactoryBase* setDefaultImpl(TDESocketDeviceFactoryBase* factory); /** - * Adds a factory of KSocketDevice objects to the list, along with its + * Adds a factory of TDESocketDevice objects to the list, along with its * capabilities flag. */ - static void addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities); + static void addNewImpl(TDESocketDeviceFactoryBase* factory, int capabilities); private: - KSocketDevice(const KSocketDevice&); - KSocketDevice& operator=(const KSocketDevice&); + TDESocketDevice(const TDESocketDevice&); + TDESocketDevice& operator=(const TDESocketDevice&); - KSocketDevicePrivate *d; + TDESocketDevicePrivate *d; }; /** @internal * This class provides functionality for creating and registering * socket implementations. */ -class KSocketDeviceFactoryBase +class TDESocketDeviceFactoryBase { public: - KSocketDeviceFactoryBase() {} - virtual ~KSocketDeviceFactoryBase() {} + TDESocketDeviceFactoryBase() {} + virtual ~TDESocketDeviceFactoryBase() {} - virtual KSocketDevice* create(KSocketBase*) const = 0; + virtual TDESocketDevice* create(TDESocketBase*) const = 0; }; /** @@ -418,13 +418,13 @@ public: * socket implementations. */ template<class Impl> -class KSocketDeviceFactory: public KSocketDeviceFactoryBase +class TDESocketDeviceFactory: public TDESocketDeviceFactoryBase { public: - KSocketDeviceFactory() {} - virtual ~KSocketDeviceFactory() {} + TDESocketDeviceFactory() {} + virtual ~TDESocketDeviceFactory() {} - virtual KSocketDevice* create(KSocketBase* parent) const + virtual TDESocketDevice* create(TDESocketBase* parent) const { return new Impl(parent); } }; diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp index 7c253ee34..206e75737 100644 --- a/tdecore/networkbackends/network-manager/network-manager.cpp +++ b/tdecore/networkbackends/network-manager/network-manager.cpp @@ -4828,7 +4828,7 @@ TDENetworkVPNTypeList TDENetworkConnectionManager_BackendNM::availableVPNTypes() // read in all available Services for (TQStringList::Iterator i = services.begin (); i != services.end (); ++i) { TQString service = NM_PLUGIN_SERVICE_DIR + TQString ("/") + *i; - KConfig* kconfig = new KConfig (service, true, true, "config"); + TDEConfig* kconfig = new TDEConfig (service, true, true, "config"); kconfig->setGroup ("VPN Connection"); TQString serviceName = kconfig->readEntry("name", TQString()); diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index 372f779c1..bd5ee6ec6 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -1217,7 +1217,7 @@ bool TDERootSystemDevice::canPowerOff() { // Can we power down this system? // This should probably be checked via DCOP and therefore interface with KDM - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->reparseConfiguration(); // config may have changed in the KControl module config->setGroup("General" ); @@ -2766,7 +2766,7 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ // KStandardDirs::kde_default -typedef TQMap<TQString, TQString> KConfigMap; +typedef TQMap<TQString, TQString> TDEConfigMap; TQString readUdevAttribute(udev_device* dev, TQString attr) { return TQString(udev_device_get_property_value(dev, attr.ascii())); @@ -3070,7 +3070,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_ TQString hardware_info_directory; // Scan the hardware_info_directory for configuration files - // For each one, open it with KConfig() and apply its rules to classify the device + // For each one, open it with TDEConfig() and apply its rules to classify the device // FIXME // Should this also scan up to <n> subdirectories for the files? That feature might end up being too expensive... @@ -3092,10 +3092,10 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_ bool match = true; // Open the rules file - KConfig rulesFile(fi->absFilePath(), true, false); + TDEConfig rulesFile(fi->absFilePath(), true, false); rulesFile.setGroup("Conditions"); - KConfigMap conditionmap = rulesFile.entryMap("Conditions"); - KConfigMap::Iterator cndit; + TDEConfigMap conditionmap = rulesFile.entryMap("Conditions"); + TDEConfigMap::Iterator cndit; for (cndit = conditionmap.begin(); cndit != conditionmap.end(); ++cndit) { TQStringList conditionList = TQStringList::split(',', cndit.data(), false); bool atleastonematch = false; diff --git a/tdecore/tests/kconfigtest.cpp b/tdecore/tests/kconfigtest.cpp index 384a328cc..e4768119c 100644 --- a/tdecore/tests/kconfigtest.cpp +++ b/tdecore/tests/kconfigtest.cpp @@ -22,7 +22,7 @@ #include <kconfig.h> -class KConfigTest : public KUnitTest::Tester +class TDEConfigTest : public KUnitTest::Tester { public: void allTests(); @@ -31,8 +31,8 @@ private: void revertEntries(); }; -KUNITTEST_MODULE( kunittest_kconfig, "KConfigTest" ) -KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest ) +KUNITTEST_MODULE( kunittest_kconfig, "TDEConfigTest" ) +KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigTest ) // test data #define BOOLENTRY1 true @@ -50,9 +50,9 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest ) #define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) ) #define STRINGLISTENTRY TQStringList( "Hello," ) -void KConfigTest::writeConfigFile() +void TDEConfigTest::writeConfigFile() { - KConfig sc( "kconfigtest" ); + TDEConfig sc( "kconfigtest" ); sc.setGroup("AAA"); sc.writeEntry("stringEntry1", STRINGENTRY1, true, true); @@ -86,10 +86,10 @@ void KConfigTest::writeConfigFile() } // ### TODO: call this, and test the state of things afterwards -void KConfigTest::revertEntries() +void TDEConfigTest::revertEntries() { tqWarning("Reverting entries"); - KConfig sc( "kconfigtest" ); + TDEConfig sc( "kconfigtest" ); sc.setGroup("Hello"); sc.revertToDefault( "boolEntry1"); @@ -105,13 +105,13 @@ void KConfigTest::revertEntries() sc.sync(); } -void KConfigTest::allTests() +void TDEConfigTest::allTests() { writeConfigFile(); - KConfig sc2( "kconfigtest" ); + TDEConfig sc2( "kconfigtest" ); - KConfigGroup sc3( &sc2, "AAA"); + TDEConfigGroup sc3( &sc2, "AAA"); bool bImmutable = sc3.entryIsImmutable("stringEntry1"); CHECK( bImmutable, false ); diff --git a/tdecore/tests/kconfigtestgui.cpp b/tdecore/tests/kconfigtestgui.cpp index 6f8c6e0e0..776082bfb 100644 --- a/tdecore/tests/kconfigtestgui.cpp +++ b/tdecore/tests/kconfigtestgui.cpp @@ -23,7 +23,7 @@ // // configtest.cpp: libKDEcore example // -// demonstrates use of KConfig class +// demonstrates use of TDEConfig class // // adapted from Qt widgets demo @@ -56,10 +56,10 @@ #endif // -// Construct the KConfigTestView with buttons +// Construct the TDEConfigTestView with buttons // -KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) +TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) : TQDialog( parent, name ), pConfig( 0L ), pFile( 0L ), @@ -67,7 +67,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) { // Set the window caption/title - setCaption( "KConfig test" ); + setCaption( "TDEConfig test" ); // Label and edit for the app config file pAppFileLabel = new TQLabel( this, "appconfiglabel" ); @@ -123,18 +123,18 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) pQuitButton->setGeometry( 340, 60, 60, 60 ); connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) ); - // create a default KConfig object in order to be able to start right away - pConfig = new KConfig( TQString::null ); + // create a default TDEConfig object in order to be able to start right away + pConfig = new TDEConfig( TQString::null ); } -KConfigTestView::~KConfigTestView() +TDEConfigTestView::~TDEConfigTestView() { delete pConfig; delete pFile; delete pStream; } -void KConfigTestView::appConfigEditReturnPressed() +void TDEConfigTestView::appConfigEditReturnPressed() { // if there already was a config object, delete it and its associated data delete pConfig; @@ -146,12 +146,12 @@ void KConfigTestView::appConfigEditReturnPressed() // create a new config object if( !pAppFileEdit->text().isEmpty() ) - pConfig = new KConfig( pAppFileEdit->text() ); + pConfig = new TDEConfig( pAppFileEdit->text() ); pInfoLabel2->setText( "New config object created." ); } -void KConfigTestView::groupEditReturnPressed() +void TDEConfigTestView::groupEditReturnPressed() { pConfig->setGroup( pGroupEdit->text() ); // according to the Qt doc, this is begging for trouble, but for a @@ -162,7 +162,7 @@ void KConfigTestView::groupEditReturnPressed() pInfoLabel2->setText( aText ); } -void KConfigTestView::keyEditReturnPressed() +void TDEConfigTestView::keyEditReturnPressed() { TQString aValue = pConfig->readEntry( pKeyEdit->text() ); // just checking aValue.isNull() would be easier here, but this is @@ -181,7 +181,7 @@ void KConfigTestView::keyEditReturnPressed() } } -void KConfigTestView::writeButtonClicked() +void TDEConfigTestView::writeButtonClicked() { pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) ); pInfoLabel2->setText( "Entry written" ); @@ -194,7 +194,7 @@ int main( int argc, char **argv ) { TDEApplication a( argc, argv, "bla" ); - KConfigTestView *w = new KConfigTestView(); + TDEConfigTestView *w = new TDEConfigTestView(); a.setMainWidget( w ); return w->exec(); } diff --git a/tdecore/tests/kconfigtestgui.h b/tdecore/tests/kconfigtestgui.h index 7655c8142..f5bbfd659 100644 --- a/tdecore/tests/kconfigtestgui.h +++ b/tdecore/tests/kconfigtestgui.h @@ -36,15 +36,15 @@ #include <kconfig.h> // -// KConfigTestView contains lots of Qt widgets. +// TDEConfigTestView contains lots of Qt widgets. // -class KConfigTestView : public TQDialog +class TDEConfigTestView : public TQDialog { Q_OBJECT public: - KConfigTestView( TQWidget *parent=0, const char *name=0 ); - ~KConfigTestView(); + TDEConfigTestView( TQWidget *parent=0, const char *name=0 ); + ~TDEConfigTestView(); private slots: void appConfigEditReturnPressed(); @@ -64,7 +64,7 @@ private: TQLabel* pInfoLabel1, *pInfoLabel2; TQPushButton* pQuitButton; - KConfig* pConfig; + TDEConfig* pConfig; TQFile* pFile; TQTextStream* pStream; }; diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp index c5640dc09..6e1a3080f 100644 --- a/tdecore/tests/kresolvertest.cpp +++ b/tdecore/tests/kresolvertest.cpp @@ -213,7 +213,7 @@ bool testKernel() printf("succeeded\n"); - KSocketAddress *ksin = KExtendedSocket::localAddress(sock); + TDESocketAddress *ksin = KExtendedSocket::localAddress(sock); if (ksin != NULL) { printf("\tWe got socket %s\n", (const char*)ksin->pretty().latin1()); diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp index 48420acfc..e038cbd2c 100644 --- a/tdecore/tests/ksocktest.cpp +++ b/tdecore/tests/ksocktest.cpp @@ -100,7 +100,7 @@ main(int argc, char *argv[]) printf("FD %d\n", sock2->fd()); - KSocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() ); + TDESocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() ); check( "peerAddress:", addr->nodeName().latin1(), "213.203.58.36" ); check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? "TRUE" : "FALSE", "TRUE"); diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/kstddirstest.cpp index 973402ffc..fa7191cce 100644 --- a/tdecore/tests/kstddirstest.cpp +++ b/tdecore/tests/kstddirstest.cpp @@ -8,7 +8,7 @@ int main(int argc, char **argv) { TDEApplication a(argc, argv, "whatever", false); KStandardDirs t; - KConfig config; // to add custom entries - a bit tricky :/ + TDEConfig config; // to add custom entries - a bit tricky :/ TQStringList list; TQString s; diff --git a/tdeprint/cups/cupsdconf2/cupsdconf.cpp b/tdeprint/cups/cupsdconf2/cupsdconf.cpp index 971da38ff..a05e44d6f 100644 --- a/tdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/tdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -607,7 +607,7 @@ bool CupsdConf::parseOption(const TQString& line) bool CupsdConf::loadAvailableResources() { - KConfig conf("tdeprintrc"); + TDEConfig conf("tdeprintrc"); conf.setGroup("CUPS"); TQString host = conf.readEntry("Host",cupsServer()); int port = conf.readNumEntry("Port",ippPort()); diff --git a/tdeprint/cups/cupsdconf2/cupsddialog.cpp b/tdeprint/cups/cupsdconf2/cupsddialog.cpp index 5e6d4659d..ada83d362 100644 --- a/tdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -95,7 +95,7 @@ const char* getPassword(const char*) TQString user(cupsUser()); TQString pass; - if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == TQDialog::Accepted) + if (TDEIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == TQDialog::Accepted) { cupsSetUser(user.latin1()); pass_string = pass; diff --git a/tdeprint/cups/cupsinfos.cpp b/tdeprint/cups/cupsinfos.cpp index 2f7031503..7962b13ef 100644 --- a/tdeprint/cups/cupsinfos.cpp +++ b/tdeprint/cups/cupsinfos.cpp @@ -117,7 +117,7 @@ const char* CupsInfos::getPasswordCB() void CupsInfos::load() { - KConfig *conf_ = KMFactory::self()->printConfig(); + TDEConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer())); port_ = conf_->readNumEntry("Port",ippPort()); @@ -141,7 +141,7 @@ void CupsInfos::load() void CupsInfos::save() { - KConfig *conf_ = KMFactory::self()->printConfig(); + TDEConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); conf_->writeEntry("Host",host_); conf_->writeEntry("Port",port_); diff --git a/tdeprint/cups/kmconfigcups.cpp b/tdeprint/cups/kmconfigcups.cpp index 7e03dae01..55a96d9d5 100644 --- a/tdeprint/cups/kmconfigcups.cpp +++ b/tdeprint/cups/kmconfigcups.cpp @@ -40,12 +40,12 @@ KMConfigCups::KMConfigCups(TQWidget *parent) lay0->addStretch(1); } -void KMConfigCups::loadConfig(KConfig *) +void KMConfigCups::loadConfig(TDEConfig *) { m_widget->load(); } -void KMConfigCups::saveConfig(KConfig *conf) +void KMConfigCups::saveConfig(TDEConfig *conf) { m_widget->saveConfig(conf); } diff --git a/tdeprint/cups/kmconfigcups.h b/tdeprint/cups/kmconfigcups.h index c0f1ab2ba..5d7032403 100644 --- a/tdeprint/cups/kmconfigcups.h +++ b/tdeprint/cups/kmconfigcups.h @@ -29,8 +29,8 @@ class KMConfigCups : public KMConfigPage public: KMConfigCups(TQWidget *parent = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: KMCupsConfigWidget *m_widget; diff --git a/tdeprint/cups/kmconfigcupsdir.cpp b/tdeprint/cups/kmconfigcupsdir.cpp index fbec34f2a..2fe66d787 100644 --- a/tdeprint/cups/kmconfigcupsdir.cpp +++ b/tdeprint/cups/kmconfigcupsdir.cpp @@ -52,7 +52,7 @@ KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent) m_stddir->setChecked(true); } -void KMConfigCupsDir::loadConfig(KConfig *conf) +void KMConfigCupsDir::loadConfig(TDEConfig *conf) { conf->setGroup("CUPS"); QString dir = conf->readPathEntry("InstallDir"); @@ -60,7 +60,7 @@ void KMConfigCupsDir::loadConfig(KConfig *conf) m_installdir->setURL(dir); } -void KMConfigCupsDir::saveConfig(KConfig *conf) +void KMConfigCupsDir::saveConfig(TDEConfig *conf) { conf->setGroup("CUPS"); conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? TQString::null : m_installdir->url())); diff --git a/tdeprint/cups/kmconfigcupsdir.h b/tdeprint/cups/kmconfigcupsdir.h index 352388c99..6affa62b0 100644 --- a/tdeprint/cups/kmconfigcupsdir.h +++ b/tdeprint/cups/kmconfigcupsdir.h @@ -30,8 +30,8 @@ class KMConfigCupsDir : public KMConfigPage public: KMConfigCupsDir(TQWidget *parent = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: KURLRequester *m_installdir; diff --git a/tdeprint/cups/kmcupsconfigwidget.cpp b/tdeprint/cups/kmcupsconfigwidget.cpp index ca2f4aedb..ce005fc3b 100644 --- a/tdeprint/cups/kmcupsconfigwidget.cpp +++ b/tdeprint/cups/kmcupsconfigwidget.cpp @@ -143,7 +143,7 @@ void KMCupsConfigWidget::save(bool sync) if (sync) inf->save(); } -void KMCupsConfigWidget::saveConfig(KConfig *conf) +void KMCupsConfigWidget::saveConfig(TDEConfig *conf) { conf->setGroup("CUPS"); conf->writeEntry("Host",m_host->text()); diff --git a/tdeprint/cups/kmcupsconfigwidget.h b/tdeprint/cups/kmcupsconfigwidget.h index 7eee42d80..b8e253ba8 100644 --- a/tdeprint/cups/kmcupsconfigwidget.h +++ b/tdeprint/cups/kmcupsconfigwidget.h @@ -24,7 +24,7 @@ class TQLineEdit; class TQCheckBox; -class KConfig; +class TDEConfig; class KMCupsConfigWidget : public TQWidget { @@ -33,7 +33,7 @@ public: void load(); void save(bool sync = true); - void saveConfig(KConfig*); + void saveConfig(TDEConfig*); protected: TQLineEdit *m_host, *m_port, *m_login, *m_password; diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index e5630652e..b0d61b8ac 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -111,7 +111,7 @@ TQString KMCupsManager::driverDirectory() TQString KMCupsManager::cupsInstallDir() { - KConfig *conf= KMFactory::self()->printConfig(); + TDEConfig *conf= KMFactory::self()->printConfig(); conf->setGroup("CUPS"); TQString dir = conf->readPathEntry("InstallDir"); return dir; @@ -1055,14 +1055,14 @@ void KMCupsManager::slotConnectionFailed( int errcode ) TQString einfo; switch (errcode) { - case KNetwork::KSocketBase::ConnectionRefused: - case KNetwork::KSocketBase::ConnectionTimedOut: + case KNetwork::TDESocketBase::ConnectionRefused: + case KNetwork::TDESocketBase::ConnectionTimedOut: einfo = i18n("connection refused") + TQString(" (%1)").arg(errcode); break; - case KNetwork::KSocketBase::LookupFailure: + case KNetwork::TDESocketBase::LookupFailure: einfo = i18n("host not found") + TQString(" (%1)").arg(errcode); break; - case KNetwork::KSocketBase::WouldBlock: + case KNetwork::TDESocketBase::WouldBlock: default: einfo = i18n("read failed (%1)").arg(errcode); break; diff --git a/tdeprint/kmfactory.cpp b/tdeprint/kmfactory.cpp index 661d97764..a1b4ad4ee 100644 --- a/tdeprint/kmfactory.cpp +++ b/tdeprint/kmfactory.cpp @@ -224,11 +224,11 @@ void KMFactory::loadFactory(const TQString& syst) } } -KConfig* KMFactory::printConfig(const TQString& group) +TDEConfig* KMFactory::printConfig(const TQString& group) { if (!m_printconfig) { - m_printconfig = new KConfig("tdeprintrc"); + m_printconfig = new TDEConfig("tdeprintrc"); TQ_CHECK_PTR(m_printconfig); } if (!group.isEmpty()) @@ -238,7 +238,7 @@ KConfig* KMFactory::printConfig(const TQString& group) TQString KMFactory::printSystem() { - KConfig *conf = printConfig(); + TDEConfig *conf = printConfig(); conf->setGroup("General"); TQString sys = conf->readEntry("PrintSystem"); if (sys.isEmpty()) @@ -276,7 +276,7 @@ void KMFactory::reload(const TQString& syst, bool saveSyst) unload(); if (saveSyst) { - KConfig *conf = printConfig(); + TDEConfig *conf = printConfig(); conf->setGroup("General"); conf->writeEntry("PrintSystem", syst); conf->sync(); @@ -403,7 +403,7 @@ void KMFactory::slot_configChanged() void KMFactory::saveConfig() { - KConfig *conf = printConfig(); + TDEConfig *conf = printConfig(); conf->sync(); kdDebug(500) << "KMFactory (" << getpid() << ") emitting DCOP signal configChanged()" << endl; emit configChanged(); diff --git a/tdeprint/kmfactory.h b/tdeprint/kmfactory.h index 8bfc9961d..baaf48477 100644 --- a/tdeprint/kmfactory.h +++ b/tdeprint/kmfactory.h @@ -39,7 +39,7 @@ class KXmlCommandManager; class KMSpecialManager; class KPrinterImpl; class KLibFactory; -class KConfig; +class TDEConfig; class KPReloadObject; class TDEPRINT_EXPORT KMFactory : public TQObject, public DCOPObject @@ -72,7 +72,7 @@ public: KMSpecialManager* specialManager(); KXmlCommandManager* commandManager(); KPrinterImpl* printerImplementation(); - KConfig* printConfig(const TQString& group = TQString::null); + TDEConfig* printConfig(const TQString& group = TQString::null); TQString printSystem(); TQValueList<PluginInfo> pluginList(); PluginInfo pluginInfo(const TQString& name); @@ -121,7 +121,7 @@ private: KPrinterImpl *m_implementation; KLibFactory *m_factory; - KConfig *m_printconfig; + TDEConfig *m_printconfig; Settings *m_settings; TQPtrList<KPReloadObject> m_objects; }; diff --git a/tdeprint/kmjobmanager.cpp b/tdeprint/kmjobmanager.cpp index 30a1fb993..3496cdb1d 100644 --- a/tdeprint/kmjobmanager.cpp +++ b/tdeprint/kmjobmanager.cpp @@ -242,14 +242,14 @@ bool KMJobManager::doPluginAction(int, const TQPtrList<KMJob>&) void KMJobManager::setLimit(int val) { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("Jobs"); conf->writeEntry("Limit", val); } int KMJobManager::limit() { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("Jobs"); return conf->readNumEntry("Limit", 0); } diff --git a/tdeprint/kmmanager.cpp b/tdeprint/kmmanager.cpp index 115f3fd02..57e06994d 100644 --- a/tdeprint/kmmanager.cpp +++ b/tdeprint/kmmanager.cpp @@ -418,7 +418,7 @@ bool KMManager::configureServer(TQWidget*) TQString KMManager::testPage() { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); QString tpage = conf->readPathEntry("TestPage"); if (tpage.isEmpty()) diff --git a/tdeprint/kprintdialog.cpp b/tdeprint/kprintdialog.cpp index 5e77f890a..06a61e1c0 100644 --- a/tdeprint/kprintdialog.cpp +++ b/tdeprint/kprintdialog.cpp @@ -439,7 +439,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) } else { - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("KPrinter Settings"); expandDialog(!config->readBoolEntry("DialogReduced", (KMFactory::self()->settings()->application != KPrinter::StandAlone))); } @@ -447,7 +447,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) KPrintDialog::~KPrintDialog() { - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("KPrinter Settings"); config->writeEntry("DialogReduced", d->m_reduced); @@ -730,19 +730,19 @@ bool KPrintDialog::checkOutputFile() { //value = (KMessageBox::warningYesNo(this,i18n("File \"%1\" already exists. Overwrite?").arg(f.absFilePath())) == KMessageBox::Yes); time_t mtimeDest = f.lastModified().toTime_t(); - KIO::RenameDlg dlg( this, i18n( "Print" ), TQString::null, d->m_file->url(), - KIO::M_OVERWRITE, ( time_t ) -1, f.size(), ( time_t ) -1, f.created().toTime_t() , mtimeDest+1, mtimeDest, true ); + TDEIO::RenameDlg dlg( this, i18n( "Print" ), TQString::null, d->m_file->url(), + TDEIO::M_OVERWRITE, ( time_t ) -1, f.size(), ( time_t ) -1, f.created().toTime_t() , mtimeDest+1, mtimeDest, true ); int result = dlg.exec(); switch ( result ) { - case KIO::R_OVERWRITE: + case TDEIO::R_OVERWRITE: value = true; break; default: - case KIO::R_CANCEL: + case TDEIO::R_CANCEL: value = false; break; - case KIO::R_RENAME: + case TDEIO::R_RENAME: url = dlg.newDestURL(); d->m_file->setURL( url.path() ); value = true; diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp index e62bf635b..3664b4157 100644 --- a/tdeprint/kprinter.cpp +++ b/tdeprint/kprinter.cpp @@ -174,7 +174,7 @@ void KPrinter::loadSettings() setSearchName(option("kde-searchname")); d->m_options.remove("kde-searchname"); - KConfig *conf = TDEGlobal::config(), *pconf = KMFactory::self()->printConfig(); + TDEConfig *conf = TDEGlobal::config(), *pconf = KMFactory::self()->printConfig(); conf->setGroup("KPrinter Settings"); pconf->setGroup("General"); @@ -199,7 +199,7 @@ void KPrinter::saveSettings() } // save latest used printer to config file - KConfig *conf = TDEGlobal::config(); + TDEConfig *conf = TDEGlobal::config(); conf->setGroup("KPrinter Settings"); conf->writeEntry("Printer",searchName()); // latest used print command diff --git a/tdeprint/kprinterimpl.cpp b/tdeprint/kprinterimpl.cpp index 9c62d25f8..5c3d840a0 100644 --- a/tdeprint/kprinterimpl.cpp +++ b/tdeprint/kprinterimpl.cpp @@ -223,7 +223,7 @@ int KPrinterImpl::dcopPrint(const TQString& cmd, const TQStringList& files, bool void KPrinterImpl::statusMessage(const TQString& msg, KPrinter *printer) { kdDebug(500) << "tdeprint: status message: " << msg << endl; - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); if (!conf->readBoolEntry("ShowStatusMsg", true)) return; @@ -583,7 +583,7 @@ void KPrinterImpl::saveOptions(const TQMap<TQString,TQString>& opts) void KPrinterImpl::loadAppOptions() { - KConfig *conf = TDEGlobal::config(); + TDEConfig *conf = TDEGlobal::config(); conf->setGroup("KPrinter Settings"); TQStringList opts = conf->readListEntry("ApplicationOptions"); for (uint i=0; i<opts.count(); i+=2) @@ -598,7 +598,7 @@ void KPrinterImpl::saveAppOptions() if (it.key().startsWith("app-")) optlist << it.key() << it.data(); - KConfig *conf = TDEGlobal::config(); + TDEConfig *conf = TDEGlobal::config(); conf->setGroup("KPrinter Settings"); conf->writeEntry("ApplicationOptions", optlist); } diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index bd812b939..19270727e 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -244,7 +244,7 @@ bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId if ( !isPS ) kdDebug( 500 ) << "Previewing a non PostScript file, built-in preview disabled" << endl; - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); KLibFactory *factory(0); bool externalPreview = conf->readBoolEntry("ExternalPreview", false); diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index a38aa4e26..5251b990a 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -273,7 +273,7 @@ void KMLpdManager::listPrinters() TQString KMLpdManager::programName(int f) { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("LPD"); switch (f) { diff --git a/tdeprint/lpr/kmconfiglpr.cpp b/tdeprint/lpr/kmconfiglpr.cpp index f43a8da2d..b5c43ebef 100644 --- a/tdeprint/lpr/kmconfiglpr.cpp +++ b/tdeprint/lpr/kmconfiglpr.cpp @@ -45,12 +45,12 @@ KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name) l0->addStretch(1); } -void KMConfigLpr::loadConfig(KConfig*) +void KMConfigLpr::loadConfig(TDEConfig*) { m_mode->setCurrentItem(LprSettings::self()->mode()); } -void KMConfigLpr::saveConfig(KConfig *conf) +void KMConfigLpr::saveConfig(TDEConfig *conf) { LprSettings::self()->setMode((LprSettings::Mode)(m_mode->currentItem())); diff --git a/tdeprint/lpr/kmconfiglpr.h b/tdeprint/lpr/kmconfiglpr.h index 7f3d50857..fa7a0ae26 100644 --- a/tdeprint/lpr/kmconfiglpr.h +++ b/tdeprint/lpr/kmconfiglpr.h @@ -29,8 +29,8 @@ class KMConfigLpr : public KMConfigPage public: KMConfigLpr(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: TQComboBox *m_mode; diff --git a/tdeprint/lpr/lprsettings.cpp b/tdeprint/lpr/lprsettings.cpp index 0c1cec2a9..30b650c17 100644 --- a/tdeprint/lpr/lprsettings.cpp +++ b/tdeprint/lpr/lprsettings.cpp @@ -53,7 +53,7 @@ LprSettings* LprSettings::self() void LprSettings::init() { // LPR/LPRng mode - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("LPR"); TQString modestr = conf->readEntry("Mode"); if (modestr == "LPRng") diff --git a/tdeprint/management/kmconfigdialog.cpp b/tdeprint/management/kmconfigdialog.cpp index cd823d540..ee63e9eeb 100644 --- a/tdeprint/management/kmconfigdialog.cpp +++ b/tdeprint/management/kmconfigdialog.cpp @@ -47,7 +47,7 @@ KMConfigDialog::KMConfigDialog(TQWidget *parent, const char *name) KMFactory::self()->uiManager()->setupConfigDialog(this); // initialize pages - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); TQPtrListIterator<KMConfigPage> it(m_pages); for (;it.current();++it) it.current()->loadConfig(conf); @@ -77,7 +77,7 @@ void KMConfigDialog::addConfigPage(KMConfigPage *page) void KMConfigDialog::slotOk() { // save configuration - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); TQPtrListIterator<KMConfigPage> it(m_pages); for (;it.current();++it) it.current()->saveConfig(conf); diff --git a/tdeprint/management/kmconfigfilter.cpp b/tdeprint/management/kmconfigfilter.cpp index 29d5107e0..2eea53b0e 100644 --- a/tdeprint/management/kmconfigfilter.cpp +++ b/tdeprint/management/kmconfigfilter.cpp @@ -88,7 +88,7 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) m_remove->setEnabled(false); } -void KMConfigFilter::loadConfig(KConfig *conf) +void KMConfigFilter::loadConfig(TDEConfig *conf) { conf->setGroup("Filter"); TQStringList m_plist = conf->readListEntry("Printers"); @@ -106,7 +106,7 @@ void KMConfigFilter::loadConfig(KConfig *conf) m_locationre->setText(conf->readEntry("LocationRe")); } -void KMConfigFilter::saveConfig(KConfig *conf) +void KMConfigFilter::saveConfig(TDEConfig *conf) { conf->setGroup("Filter"); TQStringList plist; diff --git a/tdeprint/management/kmconfigfilter.h b/tdeprint/management/kmconfigfilter.h index 9571f0d54..298c83de2 100644 --- a/tdeprint/management/kmconfigfilter.h +++ b/tdeprint/management/kmconfigfilter.h @@ -32,8 +32,8 @@ class KMConfigFilter : public KMConfigPage public: KMConfigFilter(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); protected slots: void slotSelectionChanged(); diff --git a/tdeprint/management/kmconfigfonts.cpp b/tdeprint/management/kmconfigfonts.cpp index 183d0b621..b933cab00 100644 --- a/tdeprint/management/kmconfigfonts.cpp +++ b/tdeprint/management/kmconfigfonts.cpp @@ -103,7 +103,7 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) m_down->setEnabled(false); } -void KMConfigFonts::loadConfig(KConfig *) +void KMConfigFonts::loadConfig(TDEConfig *) { TQSettings settings; m_embedfonts->setChecked(settings.readBoolEntry("/qt/embedFonts", true)); @@ -113,7 +113,7 @@ void KMConfigFonts::loadConfig(KConfig *) item = new TQListViewItem(m_fontpath, item, *it); } -void KMConfigFonts::saveConfig(KConfig *) +void KMConfigFonts::saveConfig(TDEConfig *) { TQSettings settings; settings.writeEntry("/qt/embedFonts", m_embedfonts->isChecked()); diff --git a/tdeprint/management/kmconfigfonts.h b/tdeprint/management/kmconfigfonts.h index a93a26d75..dd65d3901 100644 --- a/tdeprint/management/kmconfigfonts.h +++ b/tdeprint/management/kmconfigfonts.h @@ -33,8 +33,8 @@ class KMConfigFonts : public KMConfigPage public: KMConfigFonts(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); protected slots: void slotUp(); diff --git a/tdeprint/management/kmconfiggeneral.cpp b/tdeprint/management/kmconfiggeneral.cpp index 2298d7485..f02cfa854 100644 --- a/tdeprint/management/kmconfiggeneral.cpp +++ b/tdeprint/management/kmconfiggeneral.cpp @@ -104,7 +104,7 @@ void KMConfigGeneral::setEnabledPreviewButton(bool b) m_preview->setEnabled(!m_testpage->url().isEmpty() && b); } -void KMConfigGeneral::loadConfig(KConfig *conf) +void KMConfigGeneral::loadConfig(TDEConfig *conf) { conf->setGroup("General"); m_timer->setValue(conf->readNumEntry("TimerDelay",5)); @@ -118,7 +118,7 @@ void KMConfigGeneral::loadConfig(KConfig *conf) m_uselast->setChecked(conf->readBoolEntry("UseLast", true)); } -void KMConfigGeneral::saveConfig(KConfig *conf) +void KMConfigGeneral::saveConfig(TDEConfig *conf) { conf->setGroup("General"); conf->writeEntry("TimerDelay",m_timer->value()); diff --git a/tdeprint/management/kmconfiggeneral.h b/tdeprint/management/kmconfiggeneral.h index 8fc6fa5ab..b82a91daa 100644 --- a/tdeprint/management/kmconfiggeneral.h +++ b/tdeprint/management/kmconfiggeneral.h @@ -32,8 +32,8 @@ class KMConfigGeneral : public KMConfigPage public: KMConfigGeneral(TQWidget *parent = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); protected slots: void slotTestPagePreview(); diff --git a/tdeprint/management/kmconfigjobs.cpp b/tdeprint/management/kmconfigjobs.cpp index 1088e1b3a..0fb40fb7b 100644 --- a/tdeprint/management/kmconfigjobs.cpp +++ b/tdeprint/management/kmconfigjobs.cpp @@ -48,13 +48,13 @@ KMConfigJobs::KMConfigJobs(TQWidget *parent, const char *name) l1->addWidget(m_limit); } -void KMConfigJobs::loadConfig(KConfig *conf) +void KMConfigJobs::loadConfig(TDEConfig *conf) { conf->setGroup("Jobs"); m_limit->setValue(conf->readNumEntry("Limit", 0)); } -void KMConfigJobs::saveConfig(KConfig *conf) +void KMConfigJobs::saveConfig(TDEConfig *conf) { conf->setGroup("Jobs"); conf->writeEntry("Limit", m_limit->value()); diff --git a/tdeprint/management/kmconfigjobs.h b/tdeprint/management/kmconfigjobs.h index 34be5b1ef..29818d68a 100644 --- a/tdeprint/management/kmconfigjobs.h +++ b/tdeprint/management/kmconfigjobs.h @@ -30,8 +30,8 @@ class KMConfigJobs : public KMConfigPage public: KMConfigJobs(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: KIntNumInput *m_limit; diff --git a/tdeprint/management/kmconfigpage.cpp b/tdeprint/management/kmconfigpage.cpp index fb967e05d..6a259a062 100644 --- a/tdeprint/management/kmconfigpage.cpp +++ b/tdeprint/management/kmconfigpage.cpp @@ -26,11 +26,11 @@ KMConfigPage::KMConfigPage(TQWidget *parent, const char *name) m_header = "Header"; } -void KMConfigPage::loadConfig(KConfig*) +void KMConfigPage::loadConfig(TDEConfig*) { } -void KMConfigPage::saveConfig(KConfig*) +void KMConfigPage::saveConfig(TDEConfig*) { } #include "kmconfigpage.moc" diff --git a/tdeprint/management/kmconfigpage.h b/tdeprint/management/kmconfigpage.h index 59b93fb3d..f29b8a23e 100644 --- a/tdeprint/management/kmconfigpage.h +++ b/tdeprint/management/kmconfigpage.h @@ -24,7 +24,7 @@ #include <tdelibs_export.h> -class KConfig; +class TDEConfig; class TDEPRINT_EXPORT KMConfigPage : public TQWidget { @@ -32,8 +32,8 @@ class TDEPRINT_EXPORT KMConfigPage : public TQWidget public: KMConfigPage(TQWidget *parent = 0, const char *name = 0); - virtual void loadConfig(KConfig*); - virtual void saveConfig(KConfig*); + virtual void loadConfig(TDEConfig*); + virtual void saveConfig(TDEConfig*); TQString pageName() const { return m_name; } TQString pageHeader() const { return m_header; } diff --git a/tdeprint/management/kmconfigpreview.cpp b/tdeprint/management/kmconfigpreview.cpp index 316925d48..548968701 100644 --- a/tdeprint/management/kmconfigpreview.cpp +++ b/tdeprint/management/kmconfigpreview.cpp @@ -59,14 +59,14 @@ KMConfigPreview::KMConfigPreview(TQWidget *parent, const char *name) m_program->setEnabled(false); } -void KMConfigPreview::loadConfig(KConfig *conf) +void KMConfigPreview::loadConfig(TDEConfig *conf) { conf->setGroup("General"); m_useext->setChecked(conf->readBoolEntry("ExternalPreview", false)); m_program->setURL(conf->readPathEntry("PreviewCommand", "gv")); } -void KMConfigPreview::saveConfig(KConfig *conf) +void KMConfigPreview::saveConfig(TDEConfig *conf) { conf->setGroup("General"); conf->writeEntry("ExternalPreview", m_useext->isChecked()); diff --git a/tdeprint/management/kmconfigpreview.h b/tdeprint/management/kmconfigpreview.h index a9c826c98..b8b5ab097 100644 --- a/tdeprint/management/kmconfigpreview.h +++ b/tdeprint/management/kmconfigpreview.h @@ -30,8 +30,8 @@ class KMConfigPreview : public KMConfigPage public: KMConfigPreview(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: TQCheckBox *m_useext; diff --git a/tdeprint/management/kmdriverdbwidget.cpp b/tdeprint/management/kmdriverdbwidget.cpp index 579cae5df..704a20db5 100644 --- a/tdeprint/management/kmdriverdbwidget.cpp +++ b/tdeprint/management/kmdriverdbwidget.cpp @@ -234,7 +234,7 @@ void KMDriverDbWidget::slotOtherClicked() if ( !url.isEmpty() ) { TQString filename; - if ( KIO::NetAccess::download( url, filename, this ) ) + if ( TDEIO::NetAccess::download( url, filename, this ) ) { DrMain *driver = KMFactory::self()->manager()->loadFileDriver(filename); if (driver) @@ -255,7 +255,7 @@ void KMDriverDbWidget::slotOtherClicked() } else { - KIO::NetAccess::removeTempFile( filename ); + TDEIO::NetAccess::removeTempFile( filename ); KMessageBox::error(this,"<qt>"+i18n("Wrong driver format.")+"<p>"+KMManager::self()->errorMsg()+"</p></qt>"); } } diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index 19c46224f..da8a98016 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/management/kmjobviewer.cpp @@ -99,7 +99,7 @@ KMJobViewer::KMJobViewer(TQWidget *parent, const char *name) if (m_standalone) { setCaption(i18n("No Printer")); - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); TQSize defSize( 550, 250 ); conf->setGroup( "Jobs" ); resize( conf->readSizeEntry( "Size", &defSize ) ); @@ -111,7 +111,7 @@ KMJobViewer::~KMJobViewer() if (m_standalone) { kdDebug( 500 ) << "Destroying stand-alone job viewer window" << endl; - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup( "Jobs" ); conf->writeEntry( "Size", size() ); emit viewerDestroyed(this); @@ -700,7 +700,7 @@ void KMJobViewer::slotConfigure() KMConfigJobs *w = new KMConfigJobs(&dlg); dlg.setMainWidget(w); dlg.resize(300, 10); - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); w->loadConfig(conf); if (dlg.exec()) { @@ -727,7 +727,7 @@ void KMJobViewer::slotDropped( TQDropEvent *e, TQListViewItem* ) for ( KURL::List::ConstIterator it = uris.begin(); it != uris.end(); ++it) { - if ( KIO::NetAccess::download( *it, target, 0 ) ) + if ( TDEIO::NetAccess::download( *it, target, 0 ) ) files << target; } diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp index 22b9ac8e9..daafbff97 100644 --- a/tdeprint/management/kmmainview.cpp +++ b/tdeprint/management/kmmainview.cpp @@ -145,7 +145,7 @@ void KMMainView::loadParameters() void KMMainView::restoreSettings() { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); setViewType((KMPrinterView::ViewType)conf->readNumEntry("ViewType",KMPrinterView::Icons)); setOrientation(conf->readNumEntry("Orientation", Qt::Vertical)); @@ -162,7 +162,7 @@ void KMMainView::restoreSettings() void KMMainView::saveSettings() { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); conf->writeEntry("ViewType",(int)m_printerview->viewType()); conf->writeEntry("Orientation",(int)orientation()); diff --git a/tdeprint/management/kmtimer.cpp b/tdeprint/management/kmtimer.cpp index 4a7f611d8..5acc27351 100644 --- a/tdeprint/management/kmtimer.cpp +++ b/tdeprint/management/kmtimer.cpp @@ -86,7 +86,7 @@ void KMTimer::startTimer(int t) { if (t == -1) { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("General"); t = conf->readNumEntry("TimerDelay", 5) * 1000; } diff --git a/tdeprint/management/kmwdrivertest.cpp b/tdeprint/management/kmwdrivertest.cpp index d4652878f..0e0cd306b 100644 --- a/tdeprint/management/kmwdrivertest.cpp +++ b/tdeprint/management/kmwdrivertest.cpp @@ -105,7 +105,7 @@ void KMWDriverTest::initPrinter(KMPrinter *p) { m_driver = KMFactory::self()->manager()->loadFileDriver(drfile); /* remove the temp file if it has been downloaded */ - KIO::NetAccess::removeTempFile( drfile ); + TDEIO::NetAccess::removeTempFile( drfile ); } else if (p->dbEntry() != NULL) m_driver = KMFactory::self()->manager()->loadDbDriver(p->dbEntry()); diff --git a/tdeprint/management/kmwsocketutil.cpp b/tdeprint/management/kmwsocketutil.cpp index e667d1fa1..04556c07b 100644 --- a/tdeprint/management/kmwsocketutil.cpp +++ b/tdeprint/management/kmwsocketutil.cpp @@ -148,7 +148,7 @@ bool KMWSocketUtil::checkPrinter(const TQString& IPstr, int port, TQString* host if (hostname) { TQString portname; - KExtendedSocket::resolve((KSocketAddress*)(sock.peerAddress()), *hostname, portname); + KExtendedSocket::resolve((TDESocketAddress*)(sock.peerAddress()), *hostname, portname); } result = true; } diff --git a/tdeprint/management/networkscanner.cpp b/tdeprint/management/networkscanner.cpp index a49a77877..1943f9354 100644 --- a/tdeprint/management/networkscanner.cpp +++ b/tdeprint/management/networkscanner.cpp @@ -241,9 +241,9 @@ void NetworkScanner::slotConnectionSuccess() { kdDebug() << "Success" << endl; #ifdef USE_QSOCKET - KSocketAddress *addr = KExtendedSocket::peerAddress( d->socket->socket() ); + TDESocketAddress *addr = KExtendedSocket::peerAddress( d->socket->socket() ); #else - KSocketAddress *addr = const_cast<KSocketAddress*>( d->socket->peerAddress() ); + TDESocketAddress *addr = const_cast<TDESocketAddress*>( d->socket->peerAddress() ); #endif kdDebug() << "Connection success: " << ( addr ? addr->pretty() : TQString( "ERROR" ) ) << endl; kdDebug() << "Socket: " << d->socket->socket() << endl; diff --git a/tdeprint/printerfilter.cpp b/tdeprint/printerfilter.cpp index 7e46139ef..c30409e66 100644 --- a/tdeprint/printerfilter.cpp +++ b/tdeprint/printerfilter.cpp @@ -38,7 +38,7 @@ PrinterFilter::~PrinterFilter() void PrinterFilter::update() { - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("Filter"); m_locationRe.setPattern(conf->readEntry("LocationRe")); m_printers = conf->readListEntry("Printers"); @@ -52,7 +52,7 @@ void PrinterFilter::update() void PrinterFilter::setEnabled(bool on) { m_enabled = on; - KConfig *conf = TDEGlobal::config(); + TDEConfig *conf = TDEGlobal::config(); conf->setGroup("KPrinter Settings"); conf->writeEntry("FilterEnabled", m_enabled); } diff --git a/tdeprint/rlpr/kmconfigproxy.cpp b/tdeprint/rlpr/kmconfigproxy.cpp index 0f8ca3743..78513dad3 100644 --- a/tdeprint/rlpr/kmconfigproxy.cpp +++ b/tdeprint/rlpr/kmconfigproxy.cpp @@ -36,12 +36,12 @@ KMConfigProxy::KMConfigProxy(TQWidget *parent) lay0->addStretch(1); } -void KMConfigProxy::loadConfig(KConfig *conf) +void KMConfigProxy::loadConfig(TDEConfig *conf) { m_widget->loadConfig(conf); } -void KMConfigProxy::saveConfig(KConfig *conf) +void KMConfigProxy::saveConfig(TDEConfig *conf) { m_widget->saveConfig(conf); } diff --git a/tdeprint/rlpr/kmconfigproxy.h b/tdeprint/rlpr/kmconfigproxy.h index 6f3b7ef42..e3f92808c 100644 --- a/tdeprint/rlpr/kmconfigproxy.h +++ b/tdeprint/rlpr/kmconfigproxy.h @@ -23,15 +23,15 @@ #include "kmconfigpage.h" class KMProxyWidget; -class KConfig; +class TDEConfig; class KMConfigProxy : public KMConfigPage { public: KMConfigProxy(TQWidget *parent = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: KMProxyWidget *m_widget; diff --git a/tdeprint/rlpr/kmproxywidget.cpp b/tdeprint/rlpr/kmproxywidget.cpp index e4a761519..763282ecd 100644 --- a/tdeprint/rlpr/kmproxywidget.cpp +++ b/tdeprint/rlpr/kmproxywidget.cpp @@ -55,7 +55,7 @@ KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name) lay0->addWidget(m_proxyport,2,1); } -void KMProxyWidget::loadConfig(KConfig *conf) +void KMProxyWidget::loadConfig(TDEConfig *conf) { conf->setGroup("RLPR"); m_proxyhost->setText(conf->readEntry("ProxyHost",TQString::null)); @@ -63,7 +63,7 @@ void KMProxyWidget::loadConfig(KConfig *conf) m_useproxy->setChecked(!m_proxyhost->text().isEmpty()); } -void KMProxyWidget::saveConfig(KConfig *conf) +void KMProxyWidget::saveConfig(TDEConfig *conf) { conf->setGroup("RLPR"); conf->writeEntry("ProxyHost",(m_useproxy->isChecked() ? m_proxyhost->text() : TQString::null)); diff --git a/tdeprint/rlpr/kmproxywidget.h b/tdeprint/rlpr/kmproxywidget.h index 0c1a5079b..a698889a9 100644 --- a/tdeprint/rlpr/kmproxywidget.h +++ b/tdeprint/rlpr/kmproxywidget.h @@ -22,7 +22,7 @@ #include <tqgroupbox.h> -class KConfig; +class TDEConfig; class TQLineEdit; class TQCheckBox; @@ -31,8 +31,8 @@ class KMProxyWidget : public TQGroupBox public: KMProxyWidget(TQWidget *parent = 0, const char *name = 0); - void loadConfig(KConfig*); - void saveConfig(KConfig*); + void loadConfig(TDEConfig*); + void saveConfig(TDEConfig*); private: TQLineEdit *m_proxyhost; diff --git a/tdeprint/rlpr/krlprprinterimpl.cpp b/tdeprint/rlpr/krlprprinterimpl.cpp index 2833c9598..628205a31 100644 --- a/tdeprint/rlpr/krlprprinterimpl.cpp +++ b/tdeprint/rlpr/krlprprinterimpl.cpp @@ -57,7 +57,7 @@ bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) cmd = TQString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies()); // proxy settings - KConfig *conf = KMFactory::self()->printConfig(); + TDEConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("RLPR"); QString host = conf->readEntry("ProxyHost",TQString::null), port = conf->readEntry("ProxyPort",TQString::null); if (!host.isEmpty()) diff --git a/tdeprint/tdeprintcheck.cpp b/tdeprint/tdeprintcheck.cpp index 1b5cc691a..92178f0f4 100644 --- a/tdeprint/tdeprintcheck.cpp +++ b/tdeprint/tdeprintcheck.cpp @@ -53,7 +53,7 @@ static const char* const config_stddirs[] = { 0 }; -bool KdeprintChecker::check(KConfig *conf, const TQString& group) +bool KdeprintChecker::check(TDEConfig *conf, const TQString& group) { if (!group.isEmpty()) conf->setGroup(group); diff --git a/tdeprint/tdeprintcheck.h b/tdeprint/tdeprintcheck.h index 0bb28cc28..bb839063f 100644 --- a/tdeprint/tdeprintcheck.h +++ b/tdeprint/tdeprintcheck.h @@ -28,7 +28,7 @@ class TDEPRINT_EXPORT KdeprintChecker { public: - static bool check(KConfig *conf, const TQString& group = TQString::null); + static bool check(TDEConfig *conf, const TQString& group = TQString::null); static bool check(const TQStringList& uris); private: diff --git a/tdeprint/tdeprintd.cpp b/tdeprint/tdeprintd.cpp index 7777e19ce..617fddf8f 100644 --- a/tdeprint/tdeprintd.cpp +++ b/tdeprint/tdeprintd.cpp @@ -162,7 +162,7 @@ void KDEPrintd::slotPrintError( KPrintProcess *proc, const TQString& msg ) TQString KDEPrintd::openPassDlg(const TQString& user) { TQString user_(user), pass_, result; - if (KIO::PasswordDialog::getNameAndPassword(user_, pass_, NULL) == KDialog::Accepted) + if (TDEIO::PasswordDialog::getNameAndPassword(user_, pass_, NULL) == KDialog::Accepted) result.append(user_).append(":").append(pass_); return result; } @@ -252,7 +252,7 @@ void KDEPrintd::processRequest() return; Request *req = m_requestsPending.first(); - KIO::AuthInfo info; + TDEIO::AuthInfo info; TQByteArray params, reply; TQCString replyType; TQString authString( "::" ); @@ -264,13 +264,13 @@ void KDEPrintd::processRequest() TQDataStream input( params, IO_WriteOnly ); input << info << TQString(i18n( "Authentication failed (user name=%1)" ).arg( info.username )) << 0L << (long int) req->seqNbr; - if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,TQString,long int,long int)", + if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(TDEIO::AuthInfo,TQString,long int,long int)", params, replyType, reply ) ) { - if ( replyType == "KIO::AuthInfo" ) + if ( replyType == "TDEIO::AuthInfo" ) { TQDataStream output( reply, IO_ReadOnly ); - KIO::AuthInfo result; + TDEIO::AuthInfo result; int seqNbr; output >> result >> seqNbr; @@ -278,7 +278,7 @@ void KDEPrintd::processRequest() authString = result.username + ":" + result.password + ":" + TQString::number( seqNbr ); } else - kdWarning( 500 ) << "DCOP returned type error, expected KIO::AuthInfo, received " << replyType << endl; + kdWarning( 500 ) << "DCOP returned type error, expected TDEIO::AuthInfo, received " << replyType << endl; } else kdWarning( 500 ) << "Cannot communicate with kded_kpasswdserver" << endl; @@ -298,7 +298,7 @@ void KDEPrintd::initPassword( const TQString& user, const TQString& passwd, cons { TQByteArray params, reply; TQCString replyType; - KIO::AuthInfo info; + TDEIO::AuthInfo info; info.username = user; info.password = passwd; @@ -307,7 +307,7 @@ void KDEPrintd::initPassword( const TQString& user, const TQString& passwd, cons TQDataStream input( params, IO_WriteOnly ); input << info << ( long int )0; - if ( !callingDcopClient()->call( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo,long int)", + if ( !callingDcopClient()->call( "kded", "kpasswdserver", "addAuthInfo(TDEIO::AuthInfo,long int)", params, replyType, reply ) ) kdWarning( 500 ) << "Unable to initialize password, cannot communicate with kded_kpasswdserver" << endl; } diff --git a/tdesu/process.cpp b/tdesu/process.cpp index f1b353396..2d8e9a14f 100644 --- a/tdesu/process.cpp +++ b/tdesu/process.cpp @@ -74,7 +74,7 @@ int PtyProcess::waitMS(int fd,int ms) */ bool PtyProcess::checkPid(pid_t pid) { - KConfig* config = TDEGlobal::config(); + TDEConfig* config = TDEGlobal::config(); config->setGroup("super-user-command"); TQString superUserCommand = config->readEntry("super-user-command", DEFAULT_SUPER_USER_COMMAND); //sudo does not accept signals from user so we except it diff --git a/tdesu/su.cpp b/tdesu/su.cpp index 5f8d24832..60a1abeb6 100644 --- a/tdesu/su.cpp +++ b/tdesu/su.cpp @@ -55,7 +55,7 @@ SuProcess::SuProcess(const TQCString &user, const TQCString &command) m_User = user; m_Command = command; - KConfig* config = TDEGlobal::config(); + TDEConfig* config = TDEGlobal::config(); config->setGroup("super-user-command"); superUserCommand = config->readEntry("super-user-command", DEFAULT_SUPER_USER_COMMAND); if ( superUserCommand != "sudo" && superUserCommand != "su" ) { diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 7d64d96b1..61087b1f0 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -10,7 +10,7 @@ Maintainer of KPixmapEffect, KStyle, KThemeStyle, and KThemeBase - as well as general misc coding here and there. Matthias Kalle Dalheimer <kalle@kde.org>: -classes TDEApplication, KConfig, KTextStream, KColorSet, +classes TDEApplication, TDEConfig, KTextStream, KColorSet, automake, autoconf, maintenance Richard Moore <moorer@cs.man.ac.uk>: @@ -23,7 +23,7 @@ Steffen Hansen <stefh@dit.ou.dk>: KURL class Torben Weis <weis@stud.uni-frankfurt.de> -DnD stuff, KSocket and KServerSocket classes, KPixmap +DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, diff --git a/tdeui/kaction.h b/tdeui/kaction.h index a6ebbfb9d..f2860679f 100644 --- a/tdeui/kaction.h +++ b/tdeui/kaction.h @@ -45,8 +45,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index 4be388afe..605ac8379 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -1164,7 +1164,7 @@ void KRecentFilesAction::clearURLList() d->m_urls.clear(); } -void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) +void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) { TQString key; TQString value; @@ -1209,7 +1209,7 @@ void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) config->setGroup( oldGroup ); } -void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname ) +void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) { TQString key; TQString value; diff --git a/tdeui/kactionclasses.h b/tdeui/kactionclasses.h index 0a6a105f0..ec63cd36b 100644 --- a/tdeui/kactionclasses.h +++ b/tdeui/kactionclasses.h @@ -48,8 +48,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; @@ -834,22 +834,22 @@ public slots: void setMaxItems( uint maxItems ); /** - * Loads the recent files entries from a given KConfig object. + * Loads the recent files entries from a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are load from a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void loadEntries( KConfig* config, TQString groupname=TQString::null ); + void loadEntries( TDEConfig* config, TQString groupname=TQString::null ); /** - * Saves the current recent files entries to a given KConfig object. + * Saves the current recent files entries to a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are saved to a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void saveEntries( KConfig* config, TQString groupname=TQString::null ); + void saveEntries( TDEConfig* config, TQString groupname=TQString::null ); /** * Add URL to recent files list. diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index 9654d0ffd..c841b2730 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -405,12 +405,12 @@ KAction* KActionCollection::action( int index ) const // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) +bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) const +bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } diff --git a/tdeui/kactioncollection.h b/tdeui/kactioncollection.h index 28c9e530e..35dd5dc2d 100644 --- a/tdeui/kactioncollection.h +++ b/tdeui/kactioncollection.h @@ -46,8 +46,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; @@ -191,11 +191,11 @@ public: /** * Used for reading shortcut configuration from a non-XML rc file. */ - bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ); + bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ); /** * Used for writing shortcut configuration to a non-XML rc file. */ - bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ) const; + bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ) const; void setInstance( TDEInstance *instance ); /** The instance with which this class is associated. */ diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index 3e63af8f9..ab36f83d7 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -338,7 +338,7 @@ void KBugReport::slotSetFrom() m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::fromLatin1("emaildefaults") ); + TDEConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile emailConf.setGroup( TQString::fromLatin1("Defaults") ); diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index 0745bccd9..5af7b6de6 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -35,7 +35,7 @@ KContextMenuManager* KContextMenuManager::manager = 0; KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { - KConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; + TDEConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); diff --git a/tdeui/kcmodule.cpp b/tdeui/kcmodule.cpp index bba0e5247..904c1cdc4 100644 --- a/tdeui/kcmodule.cpp +++ b/tdeui/kcmodule.cpp @@ -34,10 +34,10 @@ #include "kcmodule.h" #include "kcmodule.moc" -class KCModulePrivate +class TDECModulePrivate { public: - KCModulePrivate(): + TDECModulePrivate(): _about( 0 ), _useRootOnlyMsg( false ), _hasOwnInstance( true ), @@ -49,17 +49,17 @@ public: TQString _rootOnlyMsg; bool _useRootOnlyMsg; bool _hasOwnInstance; - TQPtrList<KConfigDialogManager> managers; + TQPtrList<TDEConfigDialogManager> managers; TQString _quickHelp; // this member is used to record the state on non-automatically - // managed widgets, allowing for mixed KConfigXT-drive and manual + // managed widgets, allowing for mixed TDEConfigXT-drive and manual // widgets to coexist peacefully and do the correct thing with // the changed(bool) signal bool _unmanagedWidgetChangeState; }; -KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &) +TDECModule::TDECModule(TQWidget *parent, const char *name, const TQStringList &) : TQWidget(parent, name) { init(); @@ -74,7 +74,7 @@ KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &) } -KCModule::KCModule(TDEInstance *instance, TQWidget *parent, const TQStringList & ) +TDECModule::TDECModule(TDEInstance *instance, TQWidget *parent, const TQStringList & ) : TQWidget(parent, instance ? instance->instanceName().data() : 0) { init(); @@ -89,21 +89,21 @@ KCModule::KCModule(TDEInstance *instance, TQWidget *parent, const TQStringList & TDEGlobal::setActiveInstance(this->instance()); } -void KCModule::init() +void TDECModule::init() { - d = new KCModulePrivate; + d = new TDECModulePrivate; _btn = Help|Default|Apply; } -KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, TQWidget* widget ) +TDEConfigDialogManager* TDECModule::addConfig( TDEConfigSkeleton *config, TQWidget* widget ) { - KConfigDialogManager* manager = new KConfigDialogManager( widget, config, name() ); + TDEConfigDialogManager* manager = new TDEConfigDialogManager( widget, config, name() ); connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() )); d->managers.append( manager ); return manager; } -KCModule::~KCModule() +TDECModule::~TDECModule() { if (d->_hasOwnInstance) delete d->_instance; @@ -111,36 +111,36 @@ KCModule::~KCModule() delete d; } -void KCModule::load() +void TDECModule::load() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgets(); } -void KCModule::save() +void TDECModule::save() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateSettings(); emit( changed( false )); } -void KCModule::defaults() +void TDECModule::defaults() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgetsDefault(); } -void KCModule::widgetChanged() +void TDECModule::widgetChanged() { emit changed(d->_unmanagedWidgetChangeState || managedWidgetChangeState()); } -bool KCModule::managedWidgetChangeState() const +bool TDECModule::managedWidgetChangeState() const { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) { if ( manager->hasChanged() ) @@ -150,71 +150,71 @@ bool KCModule::managedWidgetChangeState() const return false; } -void KCModule::unmanagedWidgetChangeState(bool changed) +void TDECModule::unmanagedWidgetChangeState(bool changed) { d->_unmanagedWidgetChangeState = changed; widgetChanged(); } -const TDEAboutData *KCModule::aboutData() const +const TDEAboutData *TDECModule::aboutData() const { return d->_about; } -void KCModule::setAboutData( TDEAboutData* about ) +void TDECModule::setAboutData( TDEAboutData* about ) { delete d->_about; d->_about = about; } -void KCModule::setRootOnlyMsg(const TQString& msg) +void TDECModule::setRootOnlyMsg(const TQString& msg) { d->_rootOnlyMsg = msg; } -TQString KCModule::rootOnlyMsg() const +TQString TDECModule::rootOnlyMsg() const { return d->_rootOnlyMsg; } -void KCModule::setUseRootOnlyMsg(bool on) +void TDECModule::setUseRootOnlyMsg(bool on) { d->_useRootOnlyMsg = on; } -bool KCModule::useRootOnlyMsg() const +bool TDECModule::useRootOnlyMsg() const { return d->_useRootOnlyMsg; } -void KCModule::changed() +void TDECModule::changed() { emit changed(true); } -TDEInstance *KCModule::instance() const +TDEInstance *TDECModule::instance() const { return d->_instance; } -void KCModule::setQuickHelp( const TQString& help ) +void TDECModule::setQuickHelp( const TQString& help ) { d->_quickHelp = help; emit( quickHelpChanged() ); } -TQString KCModule::quickHelp() const +TQString TDECModule::quickHelp() const { return d->_quickHelp; } -const TQPtrList<KConfigDialogManager>& KCModule::configs() const +const TQPtrList<TDEConfigDialogManager>& TDECModule::configs() const { return d->managers; } -void KCModule::virtual_hook( int, void* ) +void TDECModule::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } // vim: sw=4 et sts=4 diff --git a/tdeui/kcmodule.h b/tdeui/kcmodule.h index c237ad163..41d8d095e 100644 --- a/tdeui/kcmodule.h +++ b/tdeui/kcmodule.h @@ -30,9 +30,9 @@ class TQStringList; class TDEAboutData; -class KConfigDialogManager; -class KConfigSkeleton; -class KCModulePrivate; +class TDEConfigDialogManager; +class TDEConfigSkeleton; +class TDECModulePrivate; class TDEInstance; /** @@ -54,8 +54,8 @@ class TDEInstance; * \code * #include <kgenericfactory.h> * - * typedef KGenericFactory<YourKCModule, TQWidget> YourKCModuleFactory; - * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourKCModuleFactory("name_of_the_po_file") ); + * typedef KGenericFactory<YourTDECModule, TQWidget> YourTDECModuleFactory; + * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourTDECModuleFactory("name_of_the_po_file") ); * \endcode * * The parameter "name_of_the_po_file" has to correspond with the messages target @@ -66,7 +66,7 @@ class TDEInstance; * * @author Matthias Hoelzer-Kluepfel <hoelzer@kde.org> */ -class TDEUI_EXPORT KCModule : public TQWidget +class TDEUI_EXPORT TDECModule : public TQWidget { Q_OBJECT @@ -76,7 +76,7 @@ public: * An enumeration type for the buttons used by this module. * You should only use Help, Default and Apply. The rest is obsolete. * - * @see KCModule::buttons @see KCModule::setButtons + * @see TDECModule::buttons @see TDECModule::setButtons */ enum Button {Help=1, Default=2, Apply=16, Reset=4, /* obsolete, do not use! */ @@ -89,14 +89,14 @@ public: * Make sure you have a TQStringList argument in your * implementation. */ - KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); + TDECModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); - KCModule(TDEInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); + TDECModule(TDEInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); /* * Destroys the module. */ - ~KCModule(); + ~TDECModule(); /** * Load the configuration data into the module. @@ -111,9 +111,9 @@ public: * center, to undo all of his changes and restore the currently valid * settings. * - * If you use KConfigXT, loading is taken care of automatically and + * If you use TDEConfigXT, loading is taken care of automatically and * you do not need to do it manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function otherwise the loading of KConfigXT + * also are using TDEConfigXT, you must call this function otherwise the loading of TDEConfigXT * options will not work. * */ @@ -134,9 +134,9 @@ public: * * save is called when the user clicks "Apply" or "Ok". * - * If you use KConfigXT, saving is taken care off automatically and + * If you use TDEConfigXT, saving is taken care off automatically and * you do not need to load manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function, otherwise the saving of KConfigXT + * also are using TDEConfigXT, you must call this function, otherwise the saving of TDEConfigXT * options will not work. Call it at the very end of your reimplementation, to avoid * changed() signals getting emitted when you modify widgets. */ @@ -148,9 +148,9 @@ public: * This method is called when the user clicks the "Default" * button. It should set the display to useful values. * - * If you use KConfigXT, you do not have to reimplement this function since + * If you use TDEConfigXT, you do not have to reimplement this function since * the fetching and settings of default values is done automatically. However, if you - * reimplement and also are using KConfigXT, remember to call the base function at the + * reimplement and also are using TDEConfigXT, remember to call the base function at the * very end of your reimplementation. */ virtual void defaults(); @@ -198,7 +198,7 @@ public: * The return value is a value or'ed together from * the Button enumeration type. * - * @see KCModule::setButtons + * @see TDECModule::setButtons */ int buttons() const { return _btn; } @@ -212,7 +212,7 @@ public: * customized message. If none has been set, a default message * will be used. * - * @see KCModule::setRootOnlyMsg + * @see TDECModule::setRootOnlyMsg */ TQString rootOnlyMsg() const; @@ -224,30 +224,30 @@ public: * appear (for example if it has already one). This function * tells KControl if a RootOnly message should be shown * - * @see KCModule::setUseRootOnlyMsg + * @see TDECModule::setUseRootOnlyMsg */ bool useRootOnlyMsg() const; TDEInstance *instance() const; /** - * @return a list of @ref KConfigDialogManager's in use, if any. + * @return a list of @ref TDEConfigDialogManager's in use, if any. * @since 3.4 */ - const TQPtrList<KConfigDialogManager>& configs() const; + const TQPtrList<TDEConfigDialogManager>& configs() const; protected: /** - * Adds a KConfigskeleton @p config to watch the widget @p widget + * Adds a TDEConfigskeleton @p config to watch the widget @p widget * * This function is useful if you need to handle multiple configuration files. * * @since 3.3 - * @return a pointer to the KConfigDialogManager in use - * @param config the KConfigSkeleton to use + * @return a pointer to the TDEConfigDialogManager in use + * @param config the TDEConfigSkeleton to use * @param widget the widget to watch */ - KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget ); + TDEConfigDialogManager* addConfig( TDEConfigSkeleton *config, TQWidget* widget ); /** * Sets the quick help. @@ -304,7 +304,7 @@ protected: * * If Apply is not specified, kcmshell will show a "Close" button. * - * @see KCModule::buttons + * @see TDECModule::buttons */ void setButtons(int btn) { _btn = btn; } @@ -315,7 +315,7 @@ protected: * corresponding desktop file contains the line X-TDE-RootOnly=true. * If no message is set, a default one will be used. * - * @see KCModule::rootOnlyMsg + * @see TDECModule::rootOnlyMsg */ void setRootOnlyMsg(const TQString& msg); @@ -325,7 +325,7 @@ protected: * Following the value of @p on, the RootOnly message will be * shown or not. * - * @see KCModule::useRootOnlyMsg + * @see TDECModule::useRootOnlyMsg */ void setUseRootOnlyMsg(bool on); @@ -348,7 +348,7 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - KCModulePrivate *d; + TDECModulePrivate *d; /** * Internal function for initialization of the class. diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 7db3807a7..2651fd05d 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -1254,7 +1254,7 @@ void KColorDialog::slotDefaultColorClicked() void KColorDialog::readSettings() { - KConfigGroup group( TDEGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = group.readEntry("CurrentPalette"); d->table->setPalette(palette); @@ -1263,7 +1263,7 @@ KColorDialog::readSettings() void KColorDialog::slotWriteSettings() { - KConfigGroup group( TDEGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = d->table->palette(); if (!group.hasDefault("CurrentPalette") && diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index 41963a56b..e0ff8e6e4 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -599,7 +599,7 @@ public: * You won't have the benefit of weighted completion though, so normally * you should do something like * \code - * KConfig *config = kapp->config(); + * TDEConfig *config = kapp->config(); * TQStringList list; * * // load the history and completion list after creating the history combo @@ -618,7 +618,7 @@ public: * config->writeEntry( "History list", list ); * \endcode * - * Be sure to use different names for saving with KConfig if you have more + * Be sure to use different names for saving with TDEConfig if you have more * than one KHistoryCombo. * * Note: When @p setCompletionList is true, the items are inserted into the diff --git a/tdeui/kconfigdialog.cpp b/tdeui/kconfigdialog.cpp index ccbba1cf0..9707bc26a 100644 --- a/tdeui/kconfigdialog.cpp +++ b/tdeui/kconfigdialog.cpp @@ -31,30 +31,30 @@ #include <tqvbox.h> #include <tqmap.h> -TQAsciiDict<KConfigDialog> KConfigDialog::openDialogs; +TQAsciiDict<TDEConfigDialog> TDEConfigDialog::openDialogs; // This class is here purly so we don't break binary compatibility down the road. -class KConfigDialog::KConfigDialogPrivate +class TDEConfigDialog::TDEConfigDialogPrivate { public: - KConfigDialogPrivate(KDialogBase::DialogType t) + TDEConfigDialogPrivate(KDialogBase::DialogType t) : shown(false), type(t), manager(0) { } bool shown; KDialogBase::DialogType type; - KConfigDialogManager *manager; - TQMap<TQWidget *, KConfigDialogManager *> managerForPage; + TDEConfigDialogManager *manager; + TQMap<TQWidget *, TDEConfigDialogManager *> managerForPage; }; -KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, +TDEConfigDialog::TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal ) : KDialogBase( dialogType, (WFlags)TQt::WStyle_DialogBorder, parent, name, modal, i18n("Configure"), dialogButtons, defaultButton ), - d(new KConfigDialogPrivate(dialogType)) + d(new TDEConfigDialogPrivate(dialogType)) { if ( name ) { openDialogs.insert(name, this); @@ -71,19 +71,19 @@ KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault())); connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons())); - d->manager = new KConfigDialogManager(this, config); + d->manager = new TDEConfigDialogManager(this, config); setupManagerConnections(d->manager); enableButton(Apply, false); } -KConfigDialog::~KConfigDialog() +TDEConfigDialog::~TDEConfigDialog() { openDialogs.remove(name()); delete d; } -void KConfigDialog::addPage(TQWidget *page, +void TDEConfigDialog::addPage(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header, @@ -94,25 +94,25 @@ void KConfigDialog::addPage(TQWidget *page, d->manager->addWidget(page); } -void KConfigDialog::addPage(TQWidget *page, - KConfigSkeleton *config, +void TDEConfigDialog::addPage(TQWidget *page, + TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header) { addPageInternal(page, itemName, pixmapName, header); - d->managerForPage[page] = new KConfigDialogManager(page, config); + d->managerForPage[page] = new TDEConfigDialogManager(page, config); setupManagerConnections(d->managerForPage[page]); } -void KConfigDialog::addPageInternal(TQWidget *page, +void TDEConfigDialog::addPageInternal(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header) { if(d->shown) { - kdDebug(240) << "KConfigDialog::addPage: can not add a page after the dialog has been shown."; + kdDebug(240) << "TDEConfigDialog::addPage: can not add a page after the dialog has been shown."; return; } switch(d->type) @@ -144,11 +144,11 @@ void KConfigDialog::addPageInternal(TQWidget *page, break; default: - kdDebug(240) << "KConfigDialog::addpage: unknown type."; + kdDebug(240) << "TDEConfigDialog::addpage: unknown type."; } } -void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) +void TDEConfigDialog::setupManagerConnections(TDEConfigDialogManager *manager) { connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot())); connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons())); @@ -158,26 +158,26 @@ void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault())); } -KConfigDialog* KConfigDialog::exists(const char* name) +TDEConfigDialog* TDEConfigDialog::exists(const char* name) { return openDialogs.find(name); } -bool KConfigDialog::showDialog(const char* name) +bool TDEConfigDialog::showDialog(const char* name) { - KConfigDialog *dialog = exists(name); + TDEConfigDialog *dialog = exists(name); if(dialog) dialog->show(); return (dialog != NULL); } -void KConfigDialog::updateButtons() +void TDEConfigDialog::updateButtons() { static bool only_once = false; if (only_once) return; only_once = true; - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; bool has_changed = d->manager->hasChanged() || hasChanged(); for (it = d->managerForPage.begin(); @@ -203,7 +203,7 @@ void KConfigDialog::updateButtons() only_once = false; } -void KConfigDialog::settingsChangedSlot() +void TDEConfigDialog::settingsChangedSlot() { // Update the buttons updateButtons(); @@ -211,9 +211,9 @@ void KConfigDialog::settingsChangedSlot() emit settingsChanged(name()); } -void KConfigDialog::show() +void TDEConfigDialog::show() { - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; updateWidgets(); d->manager->updateWidgets(); @@ -243,15 +243,15 @@ void KConfigDialog::show() KDialogBase::show(); } -void KConfigDialog::updateSettings() +void TDEConfigDialog::updateSettings() { } -void KConfigDialog::updateWidgets() +void TDEConfigDialog::updateWidgets() { } -void KConfigDialog::updateWidgetsDefault() +void TDEConfigDialog::updateWidgetsDefault() { } diff --git a/tdeui/kconfigdialog.h b/tdeui/kconfigdialog.h index 9268ab1f2..f7cc10e26 100644 --- a/tdeui/kconfigdialog.h +++ b/tdeui/kconfigdialog.h @@ -21,35 +21,35 @@ #ifndef KCONFIGDIALOG_H #define KCONFIGDIALOG_H -class KConfig; -class KConfigSkeleton; -class KConfigDialogManager; +class TDEConfig; +class TDEConfigSkeleton; +class TDEConfigDialogManager; #include <kdialogbase.h> #include <tqasciidict.h> /** * \short Standard %KDE configuration dialog class * - * The KConfigDialog class provides an easy and uniform means of displaying - * a settings dialog using KDialogBase, KConfigDialogManager and a - * KConfigSkeleton derived settings class. + * The TDEConfigDialog class provides an easy and uniform means of displaying + * a settings dialog using KDialogBase, TDEConfigDialogManager and a + * TDEConfigSkeleton derived settings class. * - * KConfigDialog handles the enabling and disabling of buttons, creation + * TDEConfigDialog handles the enabling and disabling of buttons, creation * of the dialog, and deletion of the widgets. Because of - * KConfigDialogManager, this class also manages: restoring + * TDEConfigDialogManager, this class also manages: restoring * the settings, reseting them to the default values, and saving them. This * requires that the names of the widgets corresponding to configuration entries * have to have the same name plus an additional "kcfg_" prefix. For example the * widget named "kcfg_MyOption" would be associated with the configuration entry * "MyOption". * - * Here is an example usage of KConfigDialog: + * Here is an example usage of TDEConfigDialog: * * \code * void KCoolApp::showSettings(){ - * if(KConfigDialog::showDialog("settings")) + * if(TDEConfigDialog::showDialog("settings")) * return; - * KConfigDialog *dialog = new KConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); + * TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); * dialog->addPage(new General(0, "General"), i18n("General") ); * dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") ); * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings())); @@ -65,11 +65,11 @@ class KConfigDialogManager; * Please note that using the setMainWidget method inherited from KDialogBase * currently yields broken behaviour at runtime; use @ref addPage() instead. * - * @see KConfigSkeleton + * @see TDEConfigSkeleton * @author Waldo Bastian <bastian@kde.org> * @since 3.2 */ -class TDEUI_EXPORT KConfigDialog : public KDialogBase { +class TDEUI_EXPORT TDEConfigDialog : public KDialogBase { Q_OBJECT signals: @@ -87,7 +87,7 @@ signals: /** * One or more of the settings have been permanently changed such as if * the user clicked on the Apply or Ok button. - * This signal is useful when using KConfigDialog to configure + * This signal is useful when using TDEConfigDialog to configure * items in a list. When emitted the main class would then know what * item in the list was actually changed. * @param dialogName the name of the dialog. @@ -116,12 +116,12 @@ public: * @param modal - Whether the dialog should be modal. To prevent more than one * non-modal settings dialog from showing the static function showDialog() can be * used in determining if the settings dialog already exists before creating - * a new KConfigDialog object. + * a new TDEConfigDialog object. */ // KDE4: Add the "separator" parameter as in KDialogBase // Make "dialogType" an int - KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, + TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType = IconList, int dialogButtons = Default|Ok|Apply|Cancel|Help, ButtonCode defaultButton = Ok, @@ -132,10 +132,10 @@ public: * Deletes private class. * @see exists() */ - ~KConfigDialog(); + ~TDEConfigDialog(); /** - * Adds page to the dialog and to KConfigDialogManager. When an + * Adds page to the dialog and to TDEConfigDialogManager. When an * application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -146,7 +146,7 @@ public: * @param pixmapName - Name of the pixmap that should be used if needed. * @param header - Header text use in the list modes. Ignored in Tabbed * mode. If empty, the itemName text is used when needed. - * @param manage - Whether KConfigDialogManager should manage the page or not. + * @param manage - Whether TDEConfigDialogManager should manage the page or not. */ // KDE4: Add a default value for itemName & pixmapName void addPage( TQWidget *page, const TQString &itemName, @@ -155,9 +155,9 @@ public: bool manage=true ); /** - * Adds page to the dialog that is managed by a custom KConfigDialogManager. + * Adds page to the dialog that is managed by a custom TDEConfigDialogManager. * This is useful for dialogs that contain settings spread over more than - * one configuration file and thus have/need more than one KConfigSkeleton. + * one configuration file and thus have/need more than one TDEConfigSkeleton. * When an application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -171,7 +171,7 @@ public: * mode. If empty, the itemName text is used when needed. */ // KDE4: Add a default value for itemName & pixmapName - void addPage( TQWidget *page, KConfigSkeleton *config, + void addPage( TQWidget *page, TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header=TQString::null ); @@ -182,7 +182,7 @@ public: * @param name - Dialog name to look for. * @return Pointer to widget or NULL if it does not exist. */ - static KConfigDialog* exists( const char* name ); + static TDEConfigDialog* exists( const char* name ); /** * Attempts to show the dialog with the name 'name'. @@ -260,19 +260,19 @@ private: * Sets the connections from a manager to the dialog (and the other * way round) up. */ - void setupManagerConnections(KConfigDialogManager *manager); + void setupManagerConnections(TDEConfigDialogManager *manager); private: /** * The list of existing dialogs. */ - static TQAsciiDict<KConfigDialog> openDialogs; + static TQAsciiDict<TDEConfigDialog> openDialogs; - class KConfigDialogPrivate; + class TDEConfigDialogPrivate; /** * Private class. */ - KConfigDialogPrivate *d; + TDEConfigDialogPrivate *d; }; #endif //KCONFIGDIALOG_H diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index d09b4e9ee..4bd337c35 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -46,8 +46,8 @@ TQCursor KCursor::handCursor() if (!hand_cursor) { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "General" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "General" ); #ifndef Q_WS_WIN // this mask doesn't work too well on win32 if ( config->readEntry("handCursorStyle", "Windows") == "Windows" ) @@ -369,8 +369,8 @@ KCursorPrivate::KCursorPrivate() { hideCursorDelay = 5000; // 5s default value - KConfig *kc = TDEGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); enabled = kc->readBoolEntry( TQString::fromLatin1("Autohiding cursor enabled"), true ); } diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 0b99c550c..3821e6a26 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -178,7 +178,7 @@ void KDialog::resizeLayout( TQLayoutItem *lay, int margin, int spacing ) static TQRect screenRect( TQWidget *w, int screen ) { TQDesktopWidget *desktop = TQApplication::desktop(); - KConfig gc("kdeglobals", false, false); + TDEConfig gc("kdeglobals", false, false); gc.setGroup("Windows"); if (desktop->isVirtualDesktop() && gc.readBoolEntry("XineramaEnabled", true) && diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index c18bead0a..3a7be7a94 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -1744,7 +1744,7 @@ TQSize KDialogBase::configDialogSize( const TQString& groupName ) const } -TQSize KDialogBase::configDialogSize( KConfig& config, +TQSize KDialogBase::configDialogSize( TDEConfig& config, const TQString& groupName ) const { int w, h; @@ -1754,7 +1754,7 @@ TQSize KDialogBase::configDialogSize( KConfig& config, w = sizeHint().width(); h = sizeHint().height(); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w ); h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h ); @@ -1768,13 +1768,13 @@ void KDialogBase::saveDialogSize( const TQString& groupName, bool global ) } -void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName, +void KDialogBase::saveDialogSize( TDEConfig& config, const TQString& groupName, bool global ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); TQSize sizeToSave = size(); config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()), diff --git a/tdeui/kdialogbase.h b/tdeui/kdialogbase.h index 893e049f7..1bc910fd6 100644 --- a/tdeui/kdialogbase.h +++ b/tdeui/kdialogbase.h @@ -839,12 +839,12 @@ class TDEUI_EXPORT KDialogBase : public KDialog * read the dialogs size from the configuration according to the screen size. * If no size is saved for one dimension of the screen, sizeHint() is returned. * - * @param config The KConfig object to read from + * @param config The TDEConfig object to read from * @param groupName Name of the group to read from. The old group * of TDEGlobal::config is preserved. * @since 3.2 */ - TQSize configDialogSize( KConfig& config, const TQString& groupName ) const; + TQSize configDialogSize( TDEConfig& config, const TQString& groupName ) const; /** * save the dialogs size dependant on the screen dimension either to the @@ -860,14 +860,14 @@ class TDEUI_EXPORT KDialogBase : public KDialog /** * save the dialogs size dependant on the screen dimension. * - * @param config The KConfig object to write to. + * @param config The TDEConfig object to write to. * @param groupName The group to which the dialogs size is saved. See * configDialogSize to read the size. * @param global Set to true if the entry should go to the global config. * Default is false. * @since 3.2 */ - void saveDialogSize( KConfig& config, const TQString& groupName, + void saveDialogSize( TDEConfig& config, const TQString& groupName, bool global=false ) const; /** diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 192c24b05..a1ef8aad1 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -165,12 +165,12 @@ void KDockMainWindow::readDockConfig(TQDomElement &base) } #ifndef NO_KDE2 -void KDockMainWindow::writeDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockMainWindow::readDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -420,12 +420,12 @@ void KDockWidgetHeader::setDragEnabled(bool b) } #ifndef NO_KDE2 -void KDockWidgetHeader::saveConfig( KConfig* c ) +void KDockWidgetHeader::saveConfig( TDEConfig* c ) { c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); } -void KDockWidgetHeader::loadConfig( KConfig* c ) +void KDockWidgetHeader::loadConfig( TDEConfig* c ) { setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); } @@ -2528,7 +2528,7 @@ void KDockManager::setReadDockConfigMode(int mode) } #ifndef NO_KDE2 -void KDockManager::writeConfig( KConfig* c, TQString group ) +void KDockManager::writeConfig( TDEConfig* c, TQString group ) { //debug("BEGIN Write Config"); if ( !c ) c = TDEGlobal::config(); @@ -2670,7 +2670,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) //debug("END Write Config"); } #include <tqmessagebox.h> -void KDockManager::readConfig( KConfig* c, TQString group ) +void KDockManager::readConfig( TDEConfig* c, TQString group ) { if ( !c ) c = TDEGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; @@ -3134,12 +3134,12 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) } #ifndef NO_KDE2 -void KDockArea::writeDockConfig( KConfig* c, TQString group ) +void KDockArea::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockArea::readDockConfig( KConfig* c, TQString group ) +void KDockArea::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -3261,8 +3261,8 @@ void KDockContainer::removeWidget (KDockWidget *dw){ void KDockContainer::undockWidget (KDockWidget *){;} void KDockContainer::setToolTip(KDockWidget *, TQString &){;} void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;} -void KDockContainer::load (KConfig*, const TQString&){;} -void KDockContainer::save (KConfig*, const TQString&){;} +void KDockContainer::load (TDEConfig*, const TQString&){;} +void KDockContainer::save (TDEConfig*, const TQString&){;} void KDockContainer::load (TQDomElement&){;} void KDockContainer::save (TQDomElement&){;} void KDockContainer::prepareSave(TQStringList &names) diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index 8f5c288ec..27b7f2b74 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -81,7 +81,7 @@ class TQPixmap; #ifndef NO_KDE2 class KToolBar; -class KConfig; +class TDEConfig; #else class TQToolBar; #endif @@ -128,12 +128,12 @@ public: /** * Provides saving the current configuration. Must be overridden by an inheriting class. */ - virtual void saveConfig( KConfig* ){} + virtual void saveConfig( TDEConfig* ){} /** * Provides loading the current configuration. Must be overridden by an inheriting class */ - virtual void loadConfig( KConfig* ){} + virtual void loadConfig( TDEConfig* ){} #endif protected: @@ -291,14 +291,14 @@ public: * * @param c the configuration safe */ - virtual void saveConfig( KConfig* c); + virtual void saveConfig( TDEConfig* c); /** * Loads the current button state from a KDE config container object. * * @param c the configuration safe */ - virtual void loadConfig( KConfig* c); + virtual void loadConfig( TDEConfig* c); #endif /*@since 3.2 @@ -906,7 +906,7 @@ private: * that can be called within a KDockMainWindow or a KDockWidget . * * An important feature is the ability to read or save the current state of all things concerning to - * dockwidgets to KConfig . + * dockwidgets to TDEConfig . * * The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found. * @@ -954,9 +954,9 @@ public: * last but not least some necessary things for recovering the dockmainwindow state. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** * Like writeConfig but reads the whole stuff in. @@ -972,9 +972,9 @@ public: * to work, each widget must have a unique name. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /// @since 3.1 @@ -1390,20 +1390,20 @@ public: #ifndef NO_KDE2 /** - * It writes the current dock state in the given section of KConfig. + * It writes the current dock state in the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** - * It reads the current dock state from the given section of KConfig. + * It reads the current dock state from the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /** @@ -1509,8 +1509,8 @@ public: void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif diff --git a/tdeui/kdockwidget_p.h b/tdeui/kdockwidget_p.h index 9ee9e8e73..471c4d9b2 100644 --- a/tdeui/kdockwidget_p.h +++ b/tdeui/kdockwidget_p.h @@ -50,9 +50,9 @@ public: virtual void showWidget(KDockWidget *); virtual void removeWidget(KDockWidget*); virtual void undockWidget(KDockWidget*); - virtual void save(KConfig *cfg,const TQString& group_or_prefix); + virtual void save(TDEConfig *cfg,const TQString& group_or_prefix); virtual void save(TQDomElement& dockElement); - virtual void load(KConfig *cfg,const TQString& group_or_prefix); + virtual void load(TDEConfig *cfg,const TQString& group_or_prefix); virtual void load(TQDomElement& dockElement); virtual void setToolTip (KDockWidget *, TQString &); virtual void setPixmap(KDockWidget*,const TQPixmap&); diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index 54b2932aa..1923f6cb9 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -373,7 +373,7 @@ void KFontCombo::updateFonts() bool KFontCombo::displayFonts() { - KConfigGroupSaver saver(TDEGlobal::config(), "KDE"); + TDEConfigGroupSaver saver(TDEGlobal::config(), "KDE"); return TDEGlobal::config()->readBoolEntry("DisplayFontItems", true); } diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index 23d514092..01073521d 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -330,8 +330,8 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, if( sizeIsRelativeState && sizeIsRelativeCheckBox ) setSizeIsRelative( *sizeIsRelativeState ); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver(config, TQString::fromLatin1("General")); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver(config, TQString::fromLatin1("General")); showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index d9ae693f3..b83cc6d53 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -675,12 +675,12 @@ void KKeyChooser::listSync() }*/ } -void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ) +void KKeyChooser::syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ) { kdDebug(125) << "KKeyChooser::syncToConfig( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); - KConfigGroupSaver cgs( pConfig, sConfigGroup ); + TDEConfigGroupSaver cgs( pConfig, sConfigGroup ); TQListViewItemIterator it( d->pList ); for( ; it.current(); ++it ) { @@ -1094,7 +1094,7 @@ KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } @@ -1106,14 +1106,14 @@ KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } KKeyDialog::~KKeyDialog() { - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); group.writeEntry( "Dialog Size", size(), true, true ); } diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index b457f133b..eba8d0069 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -34,7 +34,7 @@ class TQRadioButton; class KAccel; class KAccelActions; class KActionCollection; -class KConfigBase; +class TDEConfigBase; class TDEGlobalAccel; class KKeySequence; class KShortcut; @@ -98,7 +98,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget */ bool insert( KActionCollection *, const TQString &title); - void syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ); + void syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ); /** * This function writes any shortcut changes back to the original @@ -337,7 +337,7 @@ public: /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function, except that settings - * are saved to a *.rc file using KConfig. + * are saved to a *.rc file using TDEConfig. */ static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index ece9a3ffe..d70485b09 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -62,7 +62,7 @@ public: if ( !initialized ) { - KConfigGroup config( TDEGlobal::config(), "General" ); + TDEConfigGroup config( TDEGlobal::config(), "General" ); backspacePerformsCompletion = config.readBoolEntry( "Backspace performs completion", false ); initialized = true; diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index 8aff145b8..b604658f1 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -2015,9 +2015,9 @@ bool KListView::shadeSortColumn() const return d->shadeSortColumn; } -void KListView::saveLayout(KConfig *config, const TQString &group) const +void KListView::saveLayout(TDEConfig *config, const TQString &group) const { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList widths, order; const int colCount = columns(); @@ -2033,9 +2033,9 @@ void KListView::saveLayout(KConfig *config, const TQString &group) const config->writeEntry("SortAscending", d->sortAscending); } -void KListView::restoreLayout(KConfig *config, const TQString &group) +void KListView::restoreLayout(TDEConfig *config, const TQString &group) { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList cols = config->readListEntry("ColumnWidths"); int i = 0; { // scope the iterators diff --git a/tdeui/klistview.h b/tdeui/klistview.h index e60ae70b8..ee283aa5f 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -26,7 +26,7 @@ #include <tdelibs_export.h> class TQDragObject; -class KConfig; +class TDEConfig; class KLineEdit; /** * This Widget extends the functionality of TQListView to honor the system @@ -350,20 +350,20 @@ public: /** * Saves the list view's layout (column widtsh, column order, sort column) - * to a KConfig group + * to a TDEConfig group * - * @param config the KConfig object to write to + * @param config the TDEConfig object to write to * @param group the config group to use */ - void saveLayout(KConfig *config, const TQString &group) const; + void saveLayout(TDEConfig *config, const TQString &group) const; /** - * Reads the list view's layout from a KConfig group as stored with + * Reads the list view's layout from a TDEConfig group as stored with * saveLayout * - * @param config the KConfig object to read from + * @param config the TDEConfig object to read from * @param group the config group to use */ - void restoreLayout(KConfig *config, const TQString &group); + void restoreLayout(TDEConfig *config, const TQString &group); /** * Reimplemented to remember the current sort column and order. * @param column is the column to be sorted, or -1 to sort in order of diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index 487d4f197..14f6f6bea 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -92,7 +92,7 @@ public: } bool saveState( TQSessionManager& ) { - KConfig* config = TDEApplication::kApplication()->sessionConfig(); + TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); if ( KMainWindow::memberList->first() ){ // According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this // hook is useful for better document orientation @@ -353,7 +353,7 @@ bool KMainWindow::canBeRestored( int number ) { if ( !kapp->isRestored() ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return false; config->setGroup( TQString::fromLatin1("Number") ); @@ -365,7 +365,7 @@ const TQString KMainWindow::classNameOfToplevel( int number ) { if ( !kapp->isRestored() ) return TQString::null; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return TQString::null; TQString s; @@ -412,7 +412,7 @@ bool KMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) KMainWindow::show(); @@ -671,11 +671,11 @@ bool KMainWindow::queryClose() return true; } -void KMainWindow::saveGlobalProperties( KConfig* ) +void KMainWindow::saveGlobalProperties( TDEConfig* ) { } -void KMainWindow::readGlobalProperties( KConfig* ) +void KMainWindow::readGlobalProperties( TDEConfig* ) { } @@ -689,7 +689,7 @@ void KMainWindow::showAboutApplication() { } -void KMainWindow::savePropertiesInternal( KConfig *config, int number ) +void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) { bool oldASWS = d->autoSaveWindowSize; d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size @@ -713,7 +713,7 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number ) d->autoSaveWindowSize = oldASWS; } -void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &configGroup) +void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) { kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl; TQString oldGroup; @@ -802,7 +802,7 @@ void KMainWindow::createStandardStatusBarAction(){ } } -bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) +bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) { if ( number == 1 ) readGlobalProperties( config ); @@ -826,16 +826,16 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) return true; } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup) +void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) { return applyMainWindowSettings(config,configGroup,false); } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup,bool force) +void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) { kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl; - KConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); + TDEConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); restoreWindowSize(config); @@ -899,7 +899,7 @@ void KMainWindow::finalizeGUI( bool force ) d->settingsDirty = false; } -void KMainWindow::saveWindowSize( KConfig * config ) const +void KMainWindow::saveWindowSize( TDEConfig * config ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -931,7 +931,7 @@ void KMainWindow::saveWindowSize( KConfig * config ) const config->writeEntry(heightString, h ); } -void KMainWindow::restoreWindowSize( KConfig * config ) +void KMainWindow::restoreWindowSize( TDEConfig * config ) { if (d->care_about_geometry) { parseGeometry(true); diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index a90d3dc12..a66eb8327 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -30,7 +30,7 @@ class KPopupMenu; class KXMLGUIFactory; -class KConfig; +class TDEConfig; class KHelpMenu; class KStatusBar; class TQStatusBar; @@ -489,9 +489,9 @@ public: * group name is used. * @param force if set, even default settings are re-applied */ - void applyMainWindowSettings(KConfig *config, const TQString &groupName, bool force); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName, bool force); // KDE4 merge with force=false - void applyMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** * Save settings for statusbar, menubar and toolbar to their respective @@ -501,7 +501,7 @@ public: * @param groupName Group name to use. If not specified, the last used * group name is used */ - void saveMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void saveMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** * Sets whether KMainWindow should provide a menu that allows showing/hiding @@ -881,12 +881,12 @@ protected: * in this function! * */ - virtual void saveProperties( KConfig* ) {} + virtual void saveProperties( TDEConfig* ) {} /** * Read your instance-specific properties. */ - virtual void readProperties( KConfig* ) {} + virtual void readProperties( TDEConfig* ) {} /** * Save your application-wide properties. The function is @@ -904,16 +904,16 @@ protected: * * Default implementation does nothing. */ - virtual void saveGlobalProperties( KConfig* sessionConfig ); + virtual void saveGlobalProperties( TDEConfig* sessionConfig ); /** * The counterpart of saveGlobalProperties(). * * Read the application-specific properties in again. */ - virtual void readGlobalProperties( KConfig* sessionConfig ); - void savePropertiesInternal( KConfig*, int ); - bool readPropertiesInternal( KConfig*, int ); + virtual void readGlobalProperties( TDEConfig* sessionConfig ); + void savePropertiesInternal( TDEConfig*, int ); + bool readPropertiesInternal( TDEConfig*, int ); /** * For inherited classes @@ -927,13 +927,13 @@ protected: * For inherited classes * Note that the group must be set before calling */ - void saveWindowSize( KConfig * config ) const; + void saveWindowSize( TDEConfig * config ) const; /** * For inherited classes * Note that the group must be set before calling, and that * a -geometry on the command line has priority. */ - void restoreWindowSize( KConfig * config ); + void restoreWindowSize( TDEConfig * config ); /// parse the geometry from the geometry command line argument void parseGeometry(bool parsewidth); diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index 7266d8d91..f6cac81ab 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -235,8 +235,8 @@ void KMenuBar::show() void KMenuBar::slotReadConfig() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "KDE" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE" ); setTopLevelMenuInternal( config->readBoolEntry( "macStyle", false ) ); } @@ -329,7 +329,7 @@ void KMenuBar::selectionTimeout() if ( d->topLevel ) { d->fallback_mode = true; // KMenuBar is handling its position itself - KConfigGroup xineramaConfig(TDEGlobal::config(),"Xinerama"); + TDEConfigGroup xineramaConfig(TDEGlobal::config(),"Xinerama"); int screen = xineramaConfig.readNumEntry("MenubarScreen", TQApplication::desktop()->screenNumber(TQPoint(0,0)) ); TQRect area; diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 4037ffdcc..524636089 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -343,8 +343,8 @@ KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); TQString dontAsk = config->readEntry(dontShowAgainName).lower(); if (dontAsk == "yes") { result = Yes; @@ -362,8 +362,8 @@ KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); return config->readBoolEntry(dontShowAgainName, true); } @@ -373,8 +373,8 @@ KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':')); config->sync(); } @@ -384,15 +384,15 @@ KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':')); config->sync(); } -KConfig* KMessageBox::againConfig = NULL; +TDEConfig* KMessageBox::againConfig = NULL; void -KMessageBox::setDontShowAskAgainConfig(KConfig* cfg) +KMessageBox::setDontShowAskAgainConfig(TDEConfig* cfg) { againConfig = cfg; } @@ -935,12 +935,12 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri void KMessageBox::enableAllMessages() { - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); typedef TQMap<TQString, TQString> configMap; @@ -955,12 +955,12 @@ KMessageBox::enableAllMessages() void KMessageBox::enableMessage(const TQString &dontShowAgainName) { - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->deleteEntry(dontShowAgainName); config->sync(); diff --git a/tdeui/kmessagebox.h b/tdeui/kmessagebox.h index 574ae9ea8..b7724f5ce 100644 --- a/tdeui/kmessagebox.h +++ b/tdeui/kmessagebox.h @@ -27,7 +27,7 @@ class TQWidget; class TQStringList; -class KConfig; +class TDEConfig; class KDialogBase; /** @@ -1097,7 +1097,7 @@ public: * If @p cfg is 0 (default) TDEGlobal::config() will be used. * @since 3.2 */ - static void setDontShowAskAgainConfig(KConfig* cfg); + static void setDontShowAskAgainConfig(TDEConfig* cfg); /** * Create content and layout of a standard dialog @@ -1160,7 +1160,7 @@ public: TQMessageBox::Icon notifyType=TQMessageBox::Information); private: - static KConfig* againConfig; + static TDEConfig* againConfig; }; #endif diff --git a/tdeui/kpanelapplet.h b/tdeui/kpanelapplet.h index 50a16fd27..2ef893927 100644 --- a/tdeui/kpanelapplet.h +++ b/tdeui/kpanelapplet.h @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqframe.h> #include <kconfig.h> -class KConfig; +class TDEConfig; class TQPopupMenu; /** @@ -176,7 +176,7 @@ public: virtual int heightForWidth(int width) const { return width; } /** - * Always use this KConfig object to save/load your applet's configuration. + * Always use this TDEConfig object to save/load your applet's configuration. * * For unique applets this config object will write to a config file called * \<appletname\>rc in the user's local %KDE directory. @@ -184,7 +184,7 @@ public: * For normal applets this config object will write to a instance specific config file * called \<appletname\>\<instanceid\>rc in the user's local %KDE directory. **/ - KConfig* config() const { return _config; } + TDEConfig* config() const { return _config; } KSharedConfig::Ptr sharedConfig() const; /** @@ -384,7 +384,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelextension.cpp b/tdeui/kpanelextension.cpp index 47ddd7d95..aae989c2e 100644 --- a/tdeui/kpanelextension.cpp +++ b/tdeui/kpanelextension.cpp @@ -55,7 +55,7 @@ KPanelExtension::KPanelExtension(const TQString& configFile, Type type, { d = new KPanelExtensionPrivate; setFrameStyle(NoFrame); - _config = new KConfig(configFile); + _config = new TDEConfig(configFile); } KPanelExtension::~KPanelExtension() diff --git a/tdeui/kpanelextension.h b/tdeui/kpanelextension.h index 437f3795e..f97e85482 100644 --- a/tdeui/kpanelextension.h +++ b/tdeui/kpanelextension.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelibs_export.h> class TQPopupMenu; -class KConfig; +class TDEConfig; class KPanelExtensionPrivate; /** @@ -139,7 +139,7 @@ public: virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; } /** - * Always use this KConfig object to save/load your extensions configuration. + * Always use this TDEConfig object to save/load your extensions configuration. * * For unique extensions this config object will write to a config file called * \<extensionname\>rc in the users local KDE directory. @@ -147,7 +147,7 @@ public: * For normal extensions this config object will write to a instance specific config file * called \<extensionname\>\<instanceid\>rc in the users local KDE directory. **/ - KConfig* config() const { return _config; } + TDEConfig* config() const { return _config; } /** * @return Type indicating the extensions type. @@ -334,7 +334,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index 194801ff2..101d2aba0 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -63,7 +63,7 @@ void KPanelMenu::init(const TQString& path) connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); // setup cache timer - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("menus"); d->clearDelay = config->readNumEntry("MenuCacheTime", 60000); // 1 minute diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 3b3d74be2..5803ca477 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -110,8 +110,8 @@ KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name) { init(); - KConfig* const cfg = TDEGlobal::config(); - KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + TDEConfigGroupSaver saver(cfg, "Passwords"); const TQString val = cfg->readEntry("EchoMode", "OneStar"); if (val == "ThreeStars") @@ -338,8 +338,8 @@ void KPasswordDialog::init() { m_Row = 0; - KConfig* const cfg = TDEGlobal::config(); - const KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + const TDEConfigGroupSaver saver(cfg, "Passwords"); bool def = ( qstrcmp( tqAppName(), "tdesu" ) == 0 ? defKeep : false ); if (m_Keep && cfg->readBoolEntry("Keep", def)) ++m_Keep; diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 4164e7db2..004a51349 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -87,7 +87,7 @@ KPixmapIO::KPixmapIO() #ifdef HAVE_MITSHM setShmPolicy(ShmDontKeep); - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (!config->readBoolEntry("UseMitShm", true)) return; diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index 824e92bfc..c5ec9dcf0 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -181,7 +181,7 @@ KSpellConfig::dictFromList() const bool KSpellConfig::readGlobalSettings() { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); setNoRootAffix ( kc->readNumEntry("KSpell_NoRootAffix", 0) ); setRunTogether ( kc->readNumEntry("KSpell_RunTogether", 0) ); @@ -196,7 +196,7 @@ KSpellConfig::readGlobalSettings() bool KSpellConfig::writeGlobalSettings () { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); kc->writeEntry ("KSpell_NoRootAffix",(int) noRootAffix(), true, true); kc->writeEntry ("KSpell_RunTogether", (int) runTogether(), true, true); diff --git a/tdeui/ksconfig.h b/tdeui/ksconfig.h index b9cabe220..941405854 100644 --- a/tdeui/ksconfig.h +++ b/tdeui/ksconfig.h @@ -28,7 +28,7 @@ class TQCheckBox; class TQComboBox; class TQLabel; -class KConfig; +class TDEConfig; class KSpellConfigPrivate; /** @@ -264,7 +264,7 @@ class TDEUI_EXPORT KSpellConfig : public TQWidget TQString qspdict; // -p [dict] TQStringList ignorelist; enum {rdictlist=3, rencoding=4, rhelp=6}; - KConfig *kc; + TDEConfig *kc; int iclient; // defaults to ispell, may be aspell, too TQCheckBox *cb1, *cb2; diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 5750c8832..fe865d31e 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -54,7 +54,7 @@ KScrollView::~KScrollView() void KScrollView::scrollBy(int dx, int dy) { - KConfigGroup cfg( TDEGlobal::config(), "KDE" ); + TDEConfigGroup cfg( TDEGlobal::config(), "KDE" ); if( !cfg.readBoolEntry( "SmoothScrolling", true )) { TQScrollView::scrollBy( dx, dy ); return; diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index 1ed3b7df7..c93194e77 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -119,7 +119,7 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T setShortcut( shortcut ); resize( 0, 0 ); - s_showMore = KConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); + s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); updateDetails(); #ifdef Q_WS_X11 @@ -129,7 +129,7 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T KShortcutDialog::~KShortcutDialog() { - KConfigGroup group(TDEGlobal::config(), "General"); + TDEConfigGroup group(TDEGlobal::config(), "General"); group.writeEntry("ShowAlternativeShortcutConfig", s_showMore); } diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 444f34c6b..7d7856a34 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -63,7 +63,7 @@ KStatusBar::KStatusBar( TQWidget *parent, const char *name ) { // make the size grip stuff configurable // ...but off by default (sven) - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQString group(config->group()); config->setGroup(TQString::fromLatin1("StatusBar style")); bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false); diff --git a/tdeui/kstdguiitem.h b/tdeui/kstdguiitem.h index 3014737ab..0a59d5969 100644 --- a/tdeui/kstdguiitem.h +++ b/tdeui/kstdguiitem.h @@ -86,7 +86,7 @@ public: static KGuiItem overwrite(); /** * Returns a KGuiItem suiting for cases where code or functionality - * runs under root privileges. Used in conjunction with KConfig Modules. + * runs under root privileges. Used in conjunction with TDEConfig Modules. */ static KGuiItem adminMode(); diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index 5ce1bc074..f86083d0a 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -207,12 +207,12 @@ void KSwitchLanguageDialog::slotOk() first = false; } - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (d->applicationLanguageList().join(":") != languageString) { //list is different from defaults or saved languages list - KConfigGroup group(config, "Locale"); + TDEConfigGroup group(config, "Locale"); group.writeEntry("Language", languageString); config->sync(); @@ -258,12 +258,12 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList() { - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQStringList languagesList; if (config->hasGroup("Locale")) { - KConfigGroupSaver saver(config, "Locale"); + TDEConfigGroupSaver saver(config, "Locale"); if (config->hasKey("Language")) { diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 66b43e26f..50f594c89 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -290,8 +290,8 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, d->checksDone = 0; d->completeRehighlightRequired = false; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); d->disablePercentage = config->readNumEntry( "KSpell_AsYouTypeDisablePercentage", 42 ); d->disablePercentage = QMIN( d->disablePercentage, 101 ); d->disableWordCount = config->readNumEntry( "KSpell_AsYouTypeDisableWordCount", 100 ); @@ -335,7 +335,7 @@ KDictSpellingHighlighter::~KDictSpellingHighlighter() void KDictSpellingHighlighter::slotSpellReady( KSpell *spell ) { kdDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )" << endl; - KConfigGroup cg( TDEGlobal::config(),"KSpell" ); + TDEConfigGroup cg( TDEGlobal::config(),"KSpell" ); if ( cg.readEntry("KSpell_DoSpellChecking") != "0" ) { if ( d->globalConfig ) { @@ -539,8 +539,8 @@ void KDictSpellingHighlighter::slotLocalSpellConfigChanged() TQString KDictSpellingHighlighter::spellKey() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); config->reparseConfiguration(); TQString key; key += TQString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 )); diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index e24fde38a..717d5c574 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -314,8 +314,8 @@ KActionCollection* KSystemTray::actionCollection() TQPixmap KSystemTray::loadIcon( const TQString &icon, TDEInstance *instance ) { - KConfig *appCfg = kapp->config(); - KConfigGroupSaver configSaver(appCfg, "System Tray"); + TDEConfig *appCfg = kapp->config(); + TDEConfigGroupSaver configSaver(appCfg, "System Tray"); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); } diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index 1be5985ad..aff96f9a5 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -42,7 +42,7 @@ public: KTabWidgetPrivate() { m_automaticResizeTabs = false; - KConfigGroupSaver groupsaver(TDEGlobal::config(), "General"); + TDEConfigGroupSaver groupsaver(TDEGlobal::config(), "General"); m_maxLength = TDEGlobal::config()->readNumEntry("MaximumTabLength", 30); m_minLength = TDEGlobal::config()->readNumEntry("MinimumTabLength", 3); m_CurrentMaxLength = m_minLength; diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index b9e3bc594..085aba857 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -301,7 +301,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) ok->setDefault(true); hbox2->addWidget(ok); - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true)); connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip())); @@ -332,7 +332,7 @@ void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force) { - KConfigGroup configGroup(kapp->config(), "TipOfDay"); + TDEConfigGroup configGroup(kapp->config(), "TipOfDay"); const bool runOnStart = configGroup.readBoolEntry("RunOnStart", true); @@ -418,7 +418,7 @@ static TQString fixTip(TQString tip) void KTipDialog::setShowOnStart(bool on) { - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); config.writeEntry("RunOnStart", on); config.sync(); } diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index b6c67568d..41d416f01 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -1020,7 +1020,7 @@ void KToolBar::saveState() } // if that didn't work, we save to the config file - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); saveSettings(config, TQString::null); config->sync(); } @@ -1040,7 +1040,7 @@ TQString KToolBar::settingsGroup() const return configGroup; } -void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) +void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) { TQString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1053,7 +1053,7 @@ void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) //kdDebug(220) << name() << " position=" << position << " index=" << index << " offset=" << offset() << " newLine=" << newLine() << endl; - KConfigGroupSaver saver(config, configGroup); + TDEConfigGroupSaver saver(config, configGroup); if(!config->hasDefault("Position") && position == d->PositionDefault ) config->revertToDefault("Position"); @@ -1487,7 +1487,7 @@ void KToolBar::slotAppearanceChanged() bool KToolBar::highlightSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); } @@ -1495,7 +1495,7 @@ bool KToolBar::highlightSetting() bool KToolBar::transparentSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); } @@ -1503,7 +1503,7 @@ bool KToolBar::transparentSetting() KToolBar::IconText KToolBar::iconTextSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); TQString icontext = TDEGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); if ( icontext == "IconTextRight" ) return IconTextRight; @@ -1515,7 +1515,7 @@ KToolBar::IconText KToolBar::iconTextSetting() return IconOnly; } -void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal) +void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) { TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl; @@ -1527,7 +1527,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // This is the reason for the xmlgui tests below. bool xmlgui = d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty(); - KConfig *gconfig = TDEGlobal::config(); + TDEConfig *gconfig = TDEGlobal::config(); static const TQString &attrIconText = TDEGlobal::staticQString("IconText"); static const TQString &attrHighlight = TDEGlobal::staticQString("Highlighting"); @@ -1547,8 +1547,8 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // this is the first iteration TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - { // start block for KConfigGroupSaver - KConfigGroupSaver saver(gconfig, grpToolbar); + { // start block for TDEConfigGroupSaver + TDEConfigGroupSaver saver(gconfig, grpToolbar); // first, get the generic settings highlight = gconfig->readBoolEntry(attrHighlight, true); @@ -1590,7 +1590,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG } // revert back to the old group - } // end block for KConfigGroupSaver + } // end block for TDEConfigGroupSaver bool doUpdate = false; @@ -1637,12 +1637,12 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG updateGeometry(); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup) +void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) { return applySettings(config,_configGroup,false); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool force) +void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) { //kdDebug(220) << name() << " applySettings group=" << _configGroup << endl; @@ -1654,7 +1654,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool Global config / <appnamerc> user settings if no XMLGUI is used Global config / App-XML attributes / <appnamerc> user settings if XMLGUI is used - So in the first case, we simply read everything from KConfig as below, + So in the first case, we simply read everything from TDEConfig as below, but in the second case we don't do anything here if there is no app-specific config, and the XMLGUI-related code (loadState()) uses the static methods of this class to get the global defaults. @@ -1668,7 +1668,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool // ...and now the position stuff if ( config->hasGroup(configGroup) || force ) { - KConfigGroupSaver cgs(config, configGroup); + TDEConfigGroupSaver cgs(config, configGroup); static const TQString &attrPosition = TDEGlobal::staticQString("Position"); static const TQString &attrIndex = TDEGlobal::staticQString("Index"); @@ -1801,9 +1801,9 @@ void KToolBar::loadState( const TQDomElement &element ) This method is called in order to load toolbar settings from XML. However this can be used in two rather different cases: - for the initial loading of the app's XML. In that case the settings - are only the defaults, the user's KConfig settings will override them + are only the defaults, the user's TDEConfig settings will override them (KDE4 TODO: how about saving those user settings into the local XML file instead? - Then this whole thing would be simpler, no KConfig settings to apply afterwards. + Then this whole thing would be simpler, no TDEConfig settings to apply afterwards. OTOH we'd have to migrate those settings when the .rc version increases, like we do for shortcuts) diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 5fffdd592..2a86b0687 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -905,20 +905,20 @@ public: /** * Save the toolbar settings to group @p configGroup in @p config. */ - void saveSettings(KConfig *config, const TQString &configGroup); + void saveSettings(TDEConfig *config, const TQString &configGroup); /** * Read the toolbar settings from group @p configGroup in @p config * and apply them. Even default settings are re-applied if @p force is set. */ - void applySettings(KConfig *config, const TQString &configGroup,bool force); + void applySettings(TDEConfig *config, const TQString &configGroup,bool force); // KDE4 merge with force=false - void applySettings(KConfig *config, const TQString &configGroup); + void applySettings(TDEConfig *config, const TQString &configGroup); /* * Tell the toolbar what XML-GUI resource file it should use to save * it's state. The state of the toolbar (position, size, etc) is - * saved in KConfig files if the application does not use XML-GUI + * saved in TDEConfig files if the application does not use XML-GUI * but if the app does, then it's saved the XML file. This function * allows this to happen. * @@ -1090,7 +1090,7 @@ protected: void showEvent( TQShowEvent *e ); void resizeEvent( TQResizeEvent *e ); bool event( TQEvent *e ); - void applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal = false); + void applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal = false); TQString settingsGroup() const; private slots: diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index 83f29a70e..a6dadcfd3 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -29,7 +29,7 @@ int main( int argc, char *argv[] ) KLocale::setMainCatalogue("tdelibs"); TQApplication::setColorMode( TQApplication::CustomColors ); TDEApplication a( argc, argv, "KColorDialogTest" ); - KConfig aConfig; + TDEConfig aConfig; aConfig.setGroup( "KColorDialog-test" ); color = aConfig.readColorEntry( "Chosen" ); diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index 1720ca09a..8b2ecb829 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -81,7 +81,7 @@ static const char *preview_xpm[] = { SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name ) :TQDialog(0L,name,true) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); @@ -166,7 +166,7 @@ void SFileDialog::dockChange() SFileDialog::~SFileDialog() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writeEntry( "Bookmarks", fd->getBookmark() ); @@ -188,7 +188,7 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d ) void SFileDialog::changeDir( const TQString& f ) { if ( !f.isEmpty() ){ - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writePathEntry( "InitiallyDir", f ); } diff --git a/tdeui/tests/kfontdialogtest.cpp b/tdeui/tests/kfontdialogtest.cpp index 4ef49fec7..14edee074 100644 --- a/tdeui/tests/kfontdialogtest.cpp +++ b/tdeui/tests/kfontdialogtest.cpp @@ -33,7 +33,7 @@ { TDEApplication app( argc, argv, "KFontDialogTest" ); - KConfig aConfig; + TDEConfig aConfig; aConfig.setGroup( "KFontDialog-test" ); app.setFont(TQFont("Helvetica",12)); |