summaryrefslogtreecommitdiffstats
path: root/kioslave/media
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-01-25 00:30:47 -0600
committerTimothy Pearson <[email protected]>2013-01-25 00:30:47 -0600
commitcc74f360bb40da3d79f58048f8e8611804980aa6 (patch)
treec4385d2c16b904757b1c8bb998a4aec6993373f7 /kioslave/media
parent79b21d47bce1ee428affc97534cd8b257232a871 (diff)
downloadtdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.tar.gz
tdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kioslave/media')
-rw-r--r--kioslave/media/kcmodule/main.cpp2
-rw-r--r--kioslave/media/kcmodule/main.h6
-rw-r--r--kioslave/media/kcmodule/managermodule.cpp12
-rw-r--r--kioslave/media/kcmodule/managermodule.h2
-rw-r--r--kioslave/media/kcmodule/notifiermodule.cpp2
-rw-r--r--kioslave/media/kcmodule/notifiermodule.h2
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.cpp4
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.h6
-rw-r--r--kioslave/media/kio_media.cpp26
-rw-r--r--kioslave/media/kio_media.h2
-rw-r--r--kioslave/media/libmediacommon/medium.cpp4
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.cpp2
-rw-r--r--kioslave/media/mediaimpl.cpp118
-rw-r--r--kioslave/media/mediaimpl.h20
-rw-r--r--kioslave/media/mediamanager/fstabbackend.cpp8
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp20
-rw-r--r--kioslave/media/mediamanager/halbackend.h8
-rw-r--r--kioslave/media/mediamanager/tdehardwarebackend.cpp12
-rw-r--r--kioslave/media/mediamanager/tdehardwarebackend.h6
-rw-r--r--kioslave/media/medianotifier/medianotifier.cpp12
-rw-r--r--kioslave/media/medianotifier/medianotifier.h4
-rw-r--r--kioslave/media/medianotifier/notificationdialog.cpp2
22 files changed, 140 insertions, 140 deletions
diff --git a/kioslave/media/kcmodule/main.cpp b/kioslave/media/kcmodule/main.cpp
index 29c48d990..9036583df 100644
--- a/kioslave/media/kcmodule/main.cpp
+++ b/kioslave/media/kcmodule/main.cpp
@@ -37,7 +37,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_media, MediaFactory( "kcmmedia" ) )
MediaModule::MediaModule( TQWidget *parent, const char *name, const TQStringList& )
- : KCModule(MediaFactory::instance(), parent, name )
+ : TDECModule(MediaFactory::instance(), parent, name )
{
TDEGlobal::locale()->insertCatalogue("kio_media");
TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
diff --git a/kioslave/media/kcmodule/main.h b/kioslave/media/kcmodule/main.h
index 14e747bd9..b5297aed5 100644
--- a/kioslave/media/kcmodule/main.h
+++ b/kioslave/media/kcmodule/main.h
@@ -22,7 +22,7 @@
#include <kcmodule.h>
-class MediaModule : public KCModule
+class MediaModule : public TDECModule
{
Q_OBJECT
@@ -38,8 +38,8 @@ protected slots:
void moduleChanged( bool state );
private:
- KCModule *m_notifierModule;
- KCModule *m_managerModule;
+ TDECModule *m_notifierModule;
+ TDECModule *m_managerModule;
};
#endif
diff --git a/kioslave/media/kcmodule/managermodule.cpp b/kioslave/media/kcmodule/managermodule.cpp
index 712b026f4..4c9859889 100644
--- a/kioslave/media/kcmodule/managermodule.cpp
+++ b/kioslave/media/kcmodule/managermodule.cpp
@@ -34,7 +34,7 @@
#include "mediamanagersettings.h"
ManagerModule::ManagerModule( TQWidget* parent, const char* name )
- : KCModule( parent, name )
+ : TDECModule( parent, name )
{
view = new ManagerModuleView( this );
@@ -71,9 +71,9 @@ ManagerModule::ManagerModule( TQWidget* parent, const char* name )
void ManagerModule::load()
{
- KCModule::load();
+ TDECModule::load();
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup("DefaultOptions");
view->option_automount->setChecked( config.readBoolEntry("automount", false) );
@@ -109,9 +109,9 @@ void ManagerModule::load()
void ManagerModule::save()
{
- KCModule::save();
+ TDECModule::save();
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup("DefaultOptions");
config.writeEntry("automount", view->option_automount->isChecked());
@@ -152,7 +152,7 @@ void ManagerModule::save()
void ManagerModule::defaults()
{
- KCModule::defaults();
+ TDECModule::defaults();
view->option_automount->setChecked(false);
view->option_ro->setChecked(false);
diff --git a/kioslave/media/kcmodule/managermodule.h b/kioslave/media/kcmodule/managermodule.h
index e34610c7e..a26c7a24a 100644
--- a/kioslave/media/kcmodule/managermodule.h
+++ b/kioslave/media/kcmodule/managermodule.h
@@ -25,7 +25,7 @@
class ManagerModuleView;
-class ManagerModule : public KCModule
+class ManagerModule : public TDECModule
{
Q_OBJECT
diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp
index c7871c953..4146c514f 100644
--- a/kioslave/media/kcmodule/notifiermodule.cpp
+++ b/kioslave/media/kcmodule/notifiermodule.cpp
@@ -32,7 +32,7 @@
#include "mimetypelistboxitem.h"
NotifierModule::NotifierModule(TQWidget *parent, const char *name)
- : KCModule(parent, name)
+ : TDECModule(parent, name)
{
TQBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
diff --git a/kioslave/media/kcmodule/notifiermodule.h b/kioslave/media/kcmodule/notifiermodule.h
index 88f06c97b..391feb47f 100644
--- a/kioslave/media/kcmodule/notifiermodule.h
+++ b/kioslave/media/kcmodule/notifiermodule.h
@@ -26,7 +26,7 @@
#include "notifiersettings.h"
#include "notifiermoduleview.h"
-class NotifierModule : public KCModule
+class NotifierModule : public TDECModule
{
Q_OBJECT
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
index eff311b0d..c6174da81 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
@@ -121,8 +121,8 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
if ( ::statvfs(TQFile::encodeName(mount_point), &vfs) != -1 )
{
- m_total = static_cast<KIO::filesize_t>(vfs.f_blocks) * static_cast<KIO::filesize_t>(vfs.f_frsize);
- m_free = static_cast<KIO::filesize_t>(vfs.f_bavail) * static_cast<KIO::filesize_t>(vfs.f_frsize);
+ m_total = static_cast<TDEIO::filesize_t>(vfs.f_blocks) * static_cast<TDEIO::filesize_t>(vfs.f_frsize);
+ m_free = static_cast<TDEIO::filesize_t>(vfs.f_bavail) * static_cast<TDEIO::filesize_t>(vfs.f_frsize);
m_used = m_total - m_free;
int percent = 0;
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.h b/kioslave/media/kfile-plugin/kfilemediaplugin.h
index 7799ffc3d..df99c46c1 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.h
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.h
@@ -39,9 +39,9 @@ private:
void addMimeType(const char *mimeType);
const Medium askMedium(KFileMetaInfo &info);
- KIO::filesize_t m_total;
- KIO::filesize_t m_used;
- KIO::filesize_t m_free;
+ TDEIO::filesize_t m_total;
+ TDEIO::filesize_t m_used;
+ TDEIO::filesize_t m_free;
};
#endif
diff --git a/kioslave/media/kio_media.cpp b/kioslave/media/kio_media.cpp
index 113d1b311..d1647c6fc 100644
--- a/kioslave/media/kio_media.cpp
+++ b/kioslave/media/kio_media.cpp
@@ -76,7 +76,7 @@ bool MediaProtocol::rewriteURL(const KURL &url, KURL &newUrl)
if ( !m_impl.parseURL(url, name, path) )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return false;
}
@@ -100,7 +100,7 @@ void MediaProtocol::put(const KURL &url, int permissions,
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
+ error(TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
}
else
{
@@ -145,7 +145,7 @@ void MediaProtocol::mkdir(const KURL &url, int permissions)
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_COULD_NOT_MKDIR, url.prettyURL());
+ error(TDEIO::ERR_COULD_NOT_MKDIR, url.prettyURL());
}
else
{
@@ -162,7 +162,7 @@ void MediaProtocol::del(const KURL &url, bool isFile)
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_CANNOT_DELETE, url.prettyURL());
+ error(TDEIO::ERR_CANNOT_DELETE, url.prettyURL());
}
else
{
@@ -177,7 +177,7 @@ void MediaProtocol::stat(const KURL &url)
if( path.isEmpty() || path == "/" )
{
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
m_impl.createTopLevelEntry( entry );
statEntry( entry );
finished();
@@ -189,13 +189,13 @@ void MediaProtocol::stat(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
if( path.isEmpty() )
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if ( m_impl.statMedium(name, entry)
|| m_impl.statMediumByLabel(name, entry) )
@@ -205,7 +205,7 @@ void MediaProtocol::stat(const KURL &url)
}
else
{
- error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
}
else
@@ -229,7 +229,7 @@ void MediaProtocol::listDir(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
@@ -238,9 +238,9 @@ void MediaProtocol::listDir(const KURL &url)
void MediaProtocol::listRoot()
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
- KIO::UDSEntryList media_entries;
+ TDEIO::UDSEntryList media_entries;
bool ok = m_impl.listMedia(media_entries);
if (!ok)
@@ -254,8 +254,8 @@ void MediaProtocol::listRoot()
m_impl.createTopLevelEntry(entry);
listEntry(entry, false);
- KIO::UDSEntryListIterator it = media_entries.begin();
- KIO::UDSEntryListIterator end = media_entries.end();
+ TDEIO::UDSEntryListIterator it = media_entries.begin();
+ TDEIO::UDSEntryListIterator end = media_entries.end();
for(; it!=end; ++it)
{
diff --git a/kioslave/media/kio_media.h b/kioslave/media/kio_media.h
index 80da4a6cc..8a4cd86fb 100644
--- a/kioslave/media/kio_media.h
+++ b/kioslave/media/kio_media.h
@@ -24,7 +24,7 @@
#include "mediaimpl.h"
-class MediaProtocol : public KIO::ForwardingSlaveBase
+class MediaProtocol : public TDEIO::ForwardingSlaveBase
{
Q_OBJECT
public:
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp
index 031e56788..38d68725b 100644
--- a/kioslave/media/libmediacommon/medium.cpp
+++ b/kioslave/media/libmediacommon/medium.cpp
@@ -147,7 +147,7 @@ void Medium::setHidden(bool state)
void Medium::setUserLabel(const TQString &label)
{
- KConfig cfg("mediamanagerrc");
+ TDEConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
TQString entry_name = m_properties[UUID];
@@ -166,7 +166,7 @@ void Medium::setUserLabel(const TQString &label)
void Medium::loadUserLabel()
{
- KConfig cfg("mediamanagerrc");
+ TDEConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
TQString entry_name = m_properties[UUID];
diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp
index cc90e5ef7..254e591cb 100644
--- a/kioslave/media/libmediacommon/notifiersettings.cpp
+++ b/kioslave/media/libmediacommon/notifiersettings.cpp
@@ -227,7 +227,7 @@ void NotifierSettings::reload()
m_actions.append( nothing );
m_idMap[ nothing->id() ] = nothing;
- KConfig config( "medianotifierrc", true );
+ TDEConfig config( "medianotifierrc", true );
TQMap<TQString,TQString> auto_actions_map = config.entryMap( "Auto Actions" );
TQMap<TQString,TQString>::iterator auto_it = auto_actions_map.begin();
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index 8729c832d..8f132776b 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -75,7 +75,7 @@ bool MediaImpl::realURL(const TQString &name, const TQString &path, KURL &url)
}
-bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
+bool MediaImpl::statMedium(const TQString &name, TDEIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMedium: " << name << endl;
@@ -84,7 +84,7 @@ bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -102,7 +102,7 @@ bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
return true;
}
-bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
+bool MediaImpl::statMediumByLabel(const TQString &label, TDEIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMediumByLabel: " << label << endl;
@@ -111,7 +111,7 @@ bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -128,7 +128,7 @@ bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
}
-bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list)
+bool MediaImpl::listMedia(TQValueList<TDEIO::UDSEntry> &list)
{
kdDebug(1219) << "MediaImpl::listMedia" << endl;
@@ -137,14 +137,14 @@ bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
const Medium::MList media = Medium::createList(reply);
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
Medium::MList::const_iterator it = media.begin();
Medium::MList::const_iterator end = media.end();
@@ -173,7 +173,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -183,7 +183,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if (!returned_name.isEmpty()
&& returned_name!=name)
{
- m_lastErrorCode = KIO::ERR_DIR_ALREADY_EXIST;
+ m_lastErrorCode = TDEIO::ERR_DIR_ALREADY_EXIST;
m_lastErrorMessage = i18n("This media name already exists.");
return false;
}
@@ -193,7 +193,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -214,7 +214,7 @@ const Medium MediaImpl::findMediumByName(const TQString &name, bool &ok)
}
else
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
ok = false;
}
@@ -226,7 +226,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
{
if (medium.id().isEmpty())
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("No such medium.");
return false;
}
@@ -234,7 +234,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
#ifdef COMPILE_HALBACKEND
if ( medium.isEncrypted() && medium.clearDeviceUdi().isEmpty() )
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("The drive is encrypted.");
return false;
}
@@ -248,14 +248,14 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
/*
- KIO::Job* job = KIO::mount(false, 0,
+ TDEIO::Job* job = TDEIO::mount(false, 0,
medium.deviceNode(),
medium.mountPoint());
job->setAutoWarningHandlingEnabled(false);
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- this, TQT_SLOT( slotMountResult( KIO::Job * ) ) );
- connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
- this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ this, TQT_SLOT( slotMountResult( TDEIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( warning( TDEIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( TDEIO::Job *, const TQString & ) ) );
*/
kapp->dcopClient()
->connectDCOPSignal("kded", "mediamanager",
@@ -271,7 +271,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
else
m_lastErrorMessage = i18n("Internal Error");
if (!m_lastErrorMessage.isEmpty())
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
else {
tqApp->eventLoop()->enterLoop();
}
@@ -289,7 +289,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
if (medium.id().isEmpty())
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("No such medium.");
return false;
}
@@ -297,12 +297,12 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return true;
}
-void MediaImpl::slotWarning( KIO::Job * /*job*/, const TQString &msg )
+void MediaImpl::slotWarning( TDEIO::Job * /*job*/, const TQString &msg )
{
emit warning( msg );
}
-void MediaImpl::slotMountResult(KIO::Job *job)
+void MediaImpl::slotMountResult(TDEIO::Job *job)
{
kdDebug(1219) << "MediaImpl::slotMountResult" << endl;
@@ -327,10 +327,10 @@ void MediaImpl::slotMediumChanged(const TQString &name)
}
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -338,55 +338,55 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void MediaImpl::createTopLevelEntry(KIO::UDSEntry& entry) const
+void MediaImpl::createTopLevelEntry(TDEIO::UDSEntry& entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_URL, 0, "media:/");
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "blockdevice");
+ addAtom(entry, TDEIO::UDS_URL, 0, "media:/");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "blockdevice");
}
-void MediaImpl::slotStatResult(KIO::Job *job)
+void MediaImpl::slotStatResult(TDEIO::Job *job)
{
if ( job->error() == 0)
{
- KIO::StatJob *stat_job = static_cast<KIO::StatJob *>(job);
+ TDEIO::StatJob *stat_job = static_cast<TDEIO::StatJob *>(job);
m_entryBuffer = stat_job->statResult();
}
tqApp->eventLoop()->exitLoop();
}
-KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
+TDEIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
{
m_entryBuffer.clear();
- KIO::StatJob *job = KIO::stat(url, false);
+ TDEIO::StatJob *job = TDEIO::stat(url, false);
job->setAutoWarningHandlingEnabled( false );
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( slotStatResult(KIO::Job *) ) );
- connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
- this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( slotStatResult(TDEIO::Job *) ) );
+ connect( job, TQT_SIGNAL( warning( TDEIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( TDEIO::Job *, const TQString & ) ) );
tqApp->eventLoop()->enterLoop();
- KIO::UDSEntry::iterator it = m_entryBuffer.begin();
- KIO::UDSEntry::iterator end = m_entryBuffer.end();
+ TDEIO::UDSEntry::iterator it = m_entryBuffer.begin();
+ TDEIO::UDSEntry::iterator end = m_entryBuffer.end();
- KIO::UDSEntry infos;
+ TDEIO::UDSEntry infos;
for(; it!=end; ++it)
{
switch( (*it).m_uds )
{
- case KIO::UDS_ACCESS:
- case KIO::UDS_USER:
- case KIO::UDS_GROUP:
- case KIO::UDS_CREATION_TIME:
- case KIO::UDS_MODIFICATION_TIME:
- case KIO::UDS_ACCESS_TIME:
+ case TDEIO::UDS_ACCESS:
+ case TDEIO::UDS_USER:
+ case TDEIO::UDS_GROUP:
+ case TDEIO::UDS_CREATION_TIME:
+ case TDEIO::UDS_MODIFICATION_TIME:
+ case TDEIO::UDS_ACCESS_TIME:
infos.append(*it);
break;
default:
@@ -396,14 +396,14 @@ KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
if (url.isLocalFile())
{
- addAtom(infos, KIO::UDS_LOCAL_PATH, 0, url.path());
+ addAtom(infos, TDEIO::UDS_LOCAL_PATH, 0, url.path());
}
return infos;
}
-void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
+void MediaImpl::createMediumEntry(TDEIO::UDSEntry& entry,
const Medium &medium)
{
kdDebug(1219) << "MediaProtocol::createMedium" << endl;
@@ -414,30 +414,30 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
entry.clear();
- addAtom(entry, KIO::UDS_URL, 0, url);
+ addAtom(entry, TDEIO::UDS_URL, 0, url);
- TQString label = KIO::encodeFileName( medium.prettyLabel() );
- addAtom(entry, KIO::UDS_NAME, 0, label);
+ TQString label = TDEIO::encodeFileName( medium.prettyLabel() );
+ addAtom(entry, TDEIO::UDS_NAME, 0, label);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, medium.mimeType());
- addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, medium.mimeType());
+ addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, "inode/directory");
if (!medium.iconName().isEmpty())
{
- addAtom(entry, KIO::UDS_ICON_NAME, 0, medium.iconName());
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, medium.iconName());
}
else
{
TQString mime = medium.mimeType();
TQString icon = KMimeType::mimeType(mime)->icon(mime, false);
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
}
if (medium.needMounting())
{
- addAtom(entry, KIO::UDS_ACCESS, 0400);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0400);
}
else
{
diff --git a/kioslave/media/mediaimpl.h b/kioslave/media/mediaimpl.h
index 92b1d0202..4675ee2f9 100644
--- a/kioslave/media/mediaimpl.h
+++ b/kioslave/media/mediaimpl.h
@@ -39,12 +39,12 @@ public:
bool parseURL(const KURL &url, TQString &name, TQString &path) const;
bool realURL(const TQString &name, const TQString &path, KURL &url);
- bool statMedium(const TQString &name, KIO::UDSEntry &entry);
- bool statMediumByLabel(const TQString &label, KIO::UDSEntry &entry);
- bool listMedia(TQValueList<KIO::UDSEntry> &list);
+ bool statMedium(const TQString &name, TDEIO::UDSEntry &entry);
+ bool statMediumByLabel(const TQString &label, TDEIO::UDSEntry &entry);
+ bool listMedia(TQValueList<TDEIO::UDSEntry> &list);
bool setUserLabel(const TQString &name, const TQString &label);
- void createTopLevelEntry(KIO::UDSEntry& entry) const;
+ void createTopLevelEntry(TDEIO::UDSEntry& entry) const;
int lastErrorCode() const { return m_lastErrorCode; }
TQString lastErrorMessage() const { return m_lastErrorMessage; }
@@ -56,18 +56,18 @@ signals:
void warning(const TQString &msg);
private slots:
- void slotWarning(KIO::Job *job, const TQString &msg);
- void slotMountResult(KIO::Job *job);
- void slotStatResult(KIO::Job *job);
+ void slotWarning(TDEIO::Job *job, const TQString &msg);
+ void slotMountResult(TDEIO::Job *job);
+ void slotStatResult(TDEIO::Job *job);
private:
const Medium findMediumByName(const TQString &name, bool &ok);
bool ensureMediumMounted(Medium &medium);
- KIO::UDSEntry extractUrlInfos(const KURL &url);
- KIO::UDSEntry m_entryBuffer;
+ TDEIO::UDSEntry extractUrlInfos(const KURL &url);
+ TDEIO::UDSEntry m_entryBuffer;
- void createMediumEntry(KIO::UDSEntry& entry,
+ void createMediumEntry(TDEIO::UDSEntry& entry,
const Medium &medium);
Medium *mp_mounting;
diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp
index 0ae99228e..b15e26683 100644
--- a/kioslave/media/mediamanager/fstabbackend.cpp
+++ b/kioslave/media/mediamanager/fstabbackend.cpp
@@ -102,8 +102,8 @@ TQString FstabBackend::mount( const TQString &_udi )
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
- KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint());
- KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::mount( false, 0, medium->deviceNode(), medium->mountPoint());
+ TDEIO::NetAccess::synchronousRun( job, 0 );
return TQString::null;
}
@@ -112,8 +112,8 @@ TQString FstabBackend::unmount( const TQString &_udi )
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
- KIO::Job* job = KIO::unmount( medium->mountPoint(), false);
- KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::unmount( medium->mountPoint(), false);
+ TDEIO::NetAccess::synchronousRun( job, 0 );
return TQString::null;
}
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index 9ebf0ade7..072c6cc3a 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/media/mediamanager/halbackend.cpp
@@ -927,7 +927,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
}
}
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
bool use_defaults = true;
if (config.hasGroup(name))
@@ -1097,7 +1097,7 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio
{
kdDebug() << "setMountoptions " << name << " " << options << endl;
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup(name);
TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options);
@@ -1368,7 +1368,7 @@ TQString HALBackend::killUsingProcesses(const Medium* medium)
}
}
-void HALBackend::slotResult(KIO::Job *job)
+void HALBackend::slotResult(TDEIO::Job *job)
{
kdDebug() << "slotResult " << mount_jobs[job] << endl;
@@ -1376,7 +1376,7 @@ void HALBackend::slotResult(KIO::Job *job)
TQString& qerror = data->errorMessage;
const Medium* medium = data->medium;
- if (job->error() == KIO::ERR_COULD_NOT_UNMOUNT) {
+ if (job->error() == TDEIO::ERR_COULD_NOT_UNMOUNT) {
TQString proclist(listUsingProcesses(medium));
qerror = "<qt>";
@@ -1443,9 +1443,9 @@ TQString HALBackend::mount(const Medium *medium)
data.medium = medium;
kdDebug() << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl;
- KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint );
- connect(job, TQT_SIGNAL( result (KIO::Job *)),
- TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::mount( false, 0, medium->deviceNode(), mountPoint );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)),
+ TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be mounted when the function
// completes. Thus block until the job completes.
@@ -1608,9 +1608,9 @@ TQString HALBackend::unmount(const TQString &_udi)
data.medium = medium;
kdDebug() << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl;
- KIO::Job *job = KIO::unmount( medium->mountPoint(), false );
- connect(job, TQT_SIGNAL( result (KIO::Job *)),
- TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::unmount( medium->mountPoint(), false );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)),
+ TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be unmounted when the function
// completes. Thus block until the job completes.
diff --git a/kioslave/media/mediamanager/halbackend.h b/kioslave/media/mediamanager/halbackend.h
index 18de7ea3c..8c8bbfce6 100644
--- a/kioslave/media/mediamanager/halbackend.h
+++ b/kioslave/media/mediamanager/halbackend.h
@@ -45,7 +45,7 @@
#include <libhal.h>
#include <libhal-storage.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -148,7 +148,7 @@ private:
static TQString killUsingProcesses(const Medium *medium);
private slots:
- void slotResult(KIO::Job *job);
+ void slotResult(TDEIO::Job *job);
/* Hal call-backs -- from gvm*/
public:
@@ -220,13 +220,13 @@ private:
const Medium* medium;
// [in,out] Should be set to true when the job completes
bool completed;
- // [out] KIO::Error if an error occured during operation. Otherwise, 0
+ // [out] TDEIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
TQString errorMessage;
};
- TQMap<KIO::Job *, struct mount_job_data*> mount_jobs;
+ TQMap<TDEIO::Job *, struct mount_job_data*> mount_jobs;
};
#endif /* _HALBACKEND_H_ */
diff --git a/kioslave/media/mediamanager/tdehardwarebackend.cpp b/kioslave/media/mediamanager/tdehardwarebackend.cpp
index 1086a3e77..65c6431cf 100644
--- a/kioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/kioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -728,7 +728,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name)
TQString drive_udi = driveUDIFromDeviceUID(medium->id());
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
bool use_defaults = true;
if (config.hasGroup(drive_udi)) {
@@ -893,7 +893,7 @@ bool TDEBackend::setMountoptions(const TQString &name, const TQStringList &optio
kdDebug(1219) << "setMountoptions " << name << " " << options << endl;
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup(drive_udi);
TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options);
@@ -948,8 +948,8 @@ TQString TDEBackend::mount(const Medium *medium)
data.completed = false;
data.medium = medium;
- KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint );
- connect(job, TQT_SIGNAL( result (KIO::Job *)), TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::mount( false, 0, medium->deviceNode(), mountPoint );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)), TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be mounted when the function
// completes. Thus block until the job completes.
@@ -1148,8 +1148,8 @@ TQString TDEBackend::unmount(const TQString &_udi)
data.completed = false;
data.medium = medium;
- KIO::Job *job = KIO::unmount( medium->mountPoint(), false );
- connect(job, TQT_SIGNAL( result (KIO::Job *)), TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::unmount( medium->mountPoint(), false );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)), TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be unmounted when the function
// completes. Thus block until the job completes.
diff --git a/kioslave/media/mediamanager/tdehardwarebackend.h b/kioslave/media/mediamanager/tdehardwarebackend.h
index 190d06e41..9b5407d8f 100644
--- a/kioslave/media/mediamanager/tdehardwarebackend.h
+++ b/kioslave/media/mediamanager/tdehardwarebackend.h
@@ -36,7 +36,7 @@
#include <tdehardwaredevices.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -157,13 +157,13 @@ private:
const Medium* medium;
// [in,out] Should be set to true when the job completes
bool completed;
- // [out] KIO::Error if an error occured during operation. Otherwise, 0
+ // [out] TDEIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
TQString errorMessage;
};
- TQMap<KIO::Job *, struct mount_job_data*> mount_jobs;
+ TQMap<TDEIO::Job *, struct mount_job_data*> mount_jobs;
TQStringList m_ignoreDeviceChangeEvents;
};
diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp
index 94ee0e8c2..de6a56645 100644
--- a/kioslave/media/medianotifier/medianotifier.cpp
+++ b/kioslave/media/medianotifier/medianotifier.cpp
@@ -80,25 +80,25 @@ void MediaNotifier::onMediumChange( const TQString &name, bool allowNotification
KURL url( "system:/media/"+name );
- KIO::SimpleJob *job = KIO::stat( url, false );
+ TDEIO::SimpleJob *job = TDEIO::stat( url, false );
job->setInteractive( false );
m_allowNotificationMap[job] = allowNotification;
- 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 * ) ) );
}
-void MediaNotifier::slotStatResult( KIO::Job *job )
+void MediaNotifier::slotStatResult( TDEIO::Job *job )
{
bool allowNotification = m_allowNotificationMap[job];
m_allowNotificationMap.remove( job );
if ( job->error() != 0 ) return;
- KIO::StatJob *stat_job = static_cast<KIO::StatJob *>( job );
+ TDEIO::StatJob *stat_job = static_cast<TDEIO::StatJob *>( job );
- KIO::UDSEntry entry = stat_job->statResult();
+ TDEIO::UDSEntry entry = stat_job->statResult();
KURL url = stat_job->url();
KFileItem medium( entry, url );
diff --git a/kioslave/media/medianotifier/medianotifier.h b/kioslave/media/medianotifier/medianotifier.h
index 23f203f97..acbb23505 100644
--- a/kioslave/media/medianotifier/medianotifier.h
+++ b/kioslave/media/medianotifier/medianotifier.h
@@ -43,7 +43,7 @@ k_dcop:
void onMediumChange( const TQString &name, bool allowNotification );
private slots:
- void slotStatResult( KIO::Job *job );
+ void slotStatResult( TDEIO::Job *job );
void checkFreeDiskSpace();
void slotFreeFinished( KMessageBox::ButtonCode );
void slotFreeContinue();
@@ -58,7 +58,7 @@ private:
bool execAutoopen( const KFileItem &medium, const TQString &path,
const TQString &autoopenFile );
- TQMap<KIO::Job*,bool> m_allowNotificationMap;
+ TQMap<TDEIO::Job*,bool> m_allowNotificationMap;
TQTimer * m_freeTimer;
KDialogBase * m_freeDialog;
};
diff --git a/kioslave/media/medianotifier/notificationdialog.cpp b/kioslave/media/medianotifier/notificationdialog.cpp
index 7ba172601..29cf6b4f2 100644
--- a/kioslave/media/medianotifier/notificationdialog.cpp
+++ b/kioslave/media/medianotifier/notificationdialog.cpp
@@ -37,7 +37,7 @@ NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *sett
: KDialogBase( parent, name, false, i18n( "Medium Detected" ), Ok|Cancel|User1, Ok, true),
m_medium(medium), m_settings( settings )
{
- setCaption( KIO::decodeFileName(m_medium.name()) );
+ setCaption( TDEIO::decodeFileName(m_medium.name()) );
clearWState( WState_Polished );
TQWidget *page = new TQWidget( this );