summaryrefslogtreecommitdiffstats
path: root/khtml/misc
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/misc')
-rw-r--r--khtml/misc/knsplugininstaller.cpp32
-rw-r--r--khtml/misc/knsplugininstaller.h12
-rw-r--r--khtml/misc/loader.cpp42
-rw-r--r--khtml/misc/loader.h26
4 files changed, 56 insertions, 56 deletions
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: