diff options
Diffstat (limited to 'kmobile')
-rw-r--r-- | kmobile/devices/gnokii/gnokii_mobile.cpp | 30 | ||||
-rw-r--r-- | kmobile/devices/gnokii/gnokii_mobile.h | 4 | ||||
-rw-r--r-- | kmobile/devices/skeleton/skeleton.cpp | 6 | ||||
-rw-r--r-- | kmobile/kioslave/kio_mobile.cpp | 82 | ||||
-rw-r--r-- | kmobile/kioslave/kio_mobile.h | 2 | ||||
-rw-r--r-- | kmobile/kmobile.cpp | 6 | ||||
-rw-r--r-- | kmobile/kmobile.h | 8 | ||||
-rw-r--r-- | kmobile/kmobiledevice.cpp | 78 | ||||
-rw-r--r-- | kmobile/kmobiledevice.h | 34 | ||||
-rw-r--r-- | kmobile/kmobileitem.cpp | 6 | ||||
-rw-r--r-- | kmobile/kmobileitem.h | 6 | ||||
-rw-r--r-- | kmobile/kmobileview.cpp | 6 | ||||
-rw-r--r-- | kmobile/kmobileview.h | 8 |
13 files changed, 138 insertions, 138 deletions
diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp index 1271d3ce7..95a014a6c 100644 --- a/kmobile/devices/gnokii/gnokii_mobile.cpp +++ b/kmobile/devices/gnokii/gnokii_mobile.cpp @@ -154,7 +154,7 @@ bool KMobileGnokii::setGnokiiStateMachine() return true; } -bool KMobileGnokii::saveConfig( KConfig &conf, TQString group ) +bool KMobileGnokii::saveConfig( TDEConfig &conf, TQString group ) { conf.setGroup(group); conf.writeEntry("model", m_modelnr ); @@ -170,7 +170,7 @@ bool KMobileGnokii::saveConfig( KConfig &conf, TQString group ) return true; } -bool KMobileGnokii::loadConfig( KConfig &conf, TQString group ) +bool KMobileGnokii::loadConfig( TDEConfig &conf, TQString group ) { conf.setGroup(group); m_modelnr = conf.readEntry("model", m_modelnr ); @@ -182,13 +182,13 @@ bool KMobileGnokii::loadConfig( KConfig &conf, TQString group ) bool KMobileGnokii::saveGnokiiConfiguration() { - KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", false, false, "" ); + TDEConfig conf( TQDir::homeDirPath() + "/.gnokiirc", false, false, "" ); return saveConfig( conf, "global" ); } bool KMobileGnokii::loadGnokiiConfiguration() { - KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", true, false, "" ); + TDEConfig conf( TQDir::homeDirPath() + "/.gnokiirc", true, false, "" ); return loadConfig( conf, "global" ); } @@ -341,19 +341,19 @@ static int gn_error2kio_error( gn_error err ) case GN_ERR_INVALIDMEMORYTYPE: case GN_ERR_INVALIDLOCATION: case GN_ERR_EMPTYLOCATION: - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; case GN_ERR_MEMORYFULL: - return KIO::ERR_OUT_OF_MEMORY; + return TDEIO::ERR_OUT_OF_MEMORY; case GN_ERR_NOLINK: - return KIO::ERR_COULD_NOT_CONNECT; + return TDEIO::ERR_COULD_NOT_CONNECT; case GN_ERR_TIMEOUT: - return KIO::ERR_SERVER_TIMEOUT; + return TDEIO::ERR_SERVER_TIMEOUT; case GN_ERR_ENTRYTOOLONG: case GN_ERR_WRONGDATAFORMAT: case GN_ERR_INVALIDSIZE: - return KIO::ERR_COULD_NOT_WRITE; + return TDEIO::ERR_COULD_NOT_WRITE; default: - return KIO::ERR_INTERNAL; + return TDEIO::ERR_INTERNAL; } } @@ -590,7 +590,7 @@ int KMobileGnokii::readAddress( int index, KABC::Addressee &addr ) PRINT_DEBUG << TQString("############ GET ADDRESS #%1\n").arg(index); // index is zero-based, but in gnokii the first address starts at 1 if (index<0 || index>=numAddresses()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; // now get our addressbook entry @@ -610,7 +610,7 @@ int KMobileGnokii::readAddress( int index, KABC::Addressee &addr ) int KMobileGnokii::storeAddress( int, const KABC::Addressee &, bool ) { /* XXX: this is a read-only device */ - return KIO::ERR_WRITE_ACCESS_DENIED; + return TDEIO::ERR_WRITE_ACCESS_DENIED; } @@ -683,7 +683,7 @@ int KMobileGnokii::numCalendarEntries() int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event ) { if (index < 0 || index >= GN_CALNOTE_MAX_NUMBER) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; gn_data_clear(&data); gn_calnote entry; @@ -764,7 +764,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event ) int KMobileGnokii::storeCalendarEntry( int index, const KCal::Event &event ) { if (index < 0 || index >= GN_CALNOTE_MAX_NUMBER) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; gn_error error; gn_calnote entry; @@ -862,7 +862,7 @@ int KMobileGnokii::readNote( int index, TQString ¬e ) { // index is zero-based, and we only have one simulated note if (index<0 || index>=numNotes()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; note = TQString("NOTE #%1\n" "--------\n" diff --git a/kmobile/devices/gnokii/gnokii_mobile.h b/kmobile/devices/gnokii/gnokii_mobile.h index 782c2b92d..fbcb3cb6a 100644 --- a/kmobile/devices/gnokii/gnokii_mobile.h +++ b/kmobile/devices/gnokii/gnokii_mobile.h @@ -77,8 +77,8 @@ signals: protected: bool setGnokiiStateMachine(); - bool saveConfig( KConfig &conf, TQString group ); - bool loadConfig( KConfig &conf, TQString group ); + bool saveConfig( TDEConfig &conf, TQString group ); + bool loadConfig( TDEConfig &conf, TQString group ); bool saveGnokiiConfiguration(); bool loadGnokiiConfiguration(); bool saveDeviceConfiguration(); diff --git a/kmobile/devices/skeleton/skeleton.cpp b/kmobile/devices/skeleton/skeleton.cpp index 5c05f3d9e..3a7c77b07 100644 --- a/kmobile/devices/skeleton/skeleton.cpp +++ b/kmobile/devices/skeleton/skeleton.cpp @@ -109,7 +109,7 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr ) { // index is zero-based if (index<0 || index>=numAddresses()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; // now build our own sample name addr.setFamilyName(TQString("Meyer_%1").arg(index+1)); @@ -133,7 +133,7 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr ) int KMobileSkeleton::storeAddress( int, const KABC::Addressee &, bool ) { /* this is a read-only device */ - return KIO::ERR_WRITE_ACCESS_DENIED; + return TDEIO::ERR_WRITE_ACCESS_DENIED; } /* @@ -148,7 +148,7 @@ int KMobileSkeleton::readNote( int index, TQString ¬e ) { // index is zero-based, and we only have one simulated note if (index<0 || index>=numNotes()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; note = TQString("NOTE #%1\n" "--------\n" diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp index 8c4e3853f..e8cff4fa1 100644 --- a/kmobile/kioslave/kio_mobile.cpp +++ b/kmobile/kioslave/kio_mobile.cpp @@ -35,7 +35,7 @@ #include <tdepimmacros.h> -using namespace KIO; +using namespace TDEIO; #define KIO_MOBILE_DEBUG_AREA 7126 #define PRINT_DEBUG kdDebug(KIO_MOBILE_DEBUG_AREA) << "kio_mobile: " @@ -115,14 +115,14 @@ int KMobileProtocol::getDeviceAndRessource(const TQString &_path, return 0; } - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; } static -void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) +void addAtom(TDEIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) { - KIO::UDSAtom atom; + TDEIO::UDSAtom atom; atom.m_uds = ID; atom.m_long = l; atom.m_str = s; @@ -130,35 +130,35 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = } static -void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) +void createDirEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); - addAtom(entry, KIO::UDS_ACCESS, 0500); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - addAtom(entry, KIO::UDS_URL, 0, url); - addAtom(entry, KIO::UDS_USER, 0, getenv("USER")); - addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, TDEIO::UDS_ACCESS, 0500); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_USER, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_GROUP, 0, getenv("USER")); PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url); -// addAtom(entry, KIO::UDS_SIZE, 0); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); +// addAtom(entry, TDEIO::UDS_SIZE, 0); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); } static -void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, +void createFileEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const unsigned long size = 0) { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); - addAtom(entry, KIO::UDS_URL, 0, url); - addAtom(entry, KIO::UDS_ACCESS, 0400); - addAtom(entry, KIO::UDS_USER, 0, getenv("USER")); - addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER")); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - if (size) addAtom(entry, KIO::UDS_SIZE, size); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, TDEIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_ACCESS, 0400); + addAtom(entry, TDEIO::UDS_USER, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_GROUP, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + if (size) addAtom(entry, TDEIO::UDS_SIZE, size); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime); } @@ -181,7 +181,7 @@ void KMobileProtocol::get(const KURL &url) } if (devName.isEmpty() || resource.isEmpty()) { - error(KIO::ERR_DOES_NOT_EXIST, url.path()); + error(TDEIO::ERR_DOES_NOT_EXIST, url.path()); return; } @@ -197,7 +197,7 @@ void KMobileProtocol::get(const KURL &url) break; case KMobileDevice::hasFileStorage: err = getFileStorage(devName, result, mime, devPath); break; - default: err = KIO::ERR_CANNOT_ENTER_DIRECTORY; /* TODO */ + default: err = TDEIO::ERR_CANNOT_ENTER_DIRECTORY; /* TODO */ } if (err) { @@ -209,7 +209,7 @@ void KMobileProtocol::get(const KURL &url) mimeType(mime); // tell the length - KIO::filesize_t processed_size = result.length(); + TDEIO::filesize_t processed_size = result.length(); totalSize(processed_size); // tell the contents of the URL @@ -233,7 +233,7 @@ void KMobileProtocol::listRoot(const KURL& url) { PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol()); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; TQStringList deviceNames = m_dev.deviceNames(); unsigned int dirs = deviceNames.count(); @@ -314,7 +314,7 @@ void KMobileProtocol::listTopDeviceDir(const TQString &devName) { PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; unsigned int caps = m_dev.capabilities(devName); for (int i=0; i<31; i++) { @@ -362,7 +362,7 @@ void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &r { PRINT_DEBUG << TQString("listAddressBook(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int fieldwidth; int entries = m_dev.numAddresses(devName); @@ -409,11 +409,11 @@ int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQStr if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numAddresses(devName)) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; TQString str = m_dev.readAddress(devName, index); if (str.isEmpty()) - return KIO::ERR_INTERNAL; + return TDEIO::ERR_INTERNAL; result = str.utf8(); mime = entryMimeType(KMobileDevice::hasAddressBook); // setMetaData("plugin", "const TQString &key, const TQString &value); @@ -427,7 +427,7 @@ void KMobileProtocol::listCalendar( const TQString &devName, const TQString &res { PRINT_DEBUG << TQString("listCalendar(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int entries = m_dev.numCalendarEntries(devName); totalSize(entries); @@ -455,7 +455,7 @@ int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQ /* TODO */ Q_UNUSED(result); Q_UNUSED(mime); - return KIO::ERR_CANNOT_ENTER_DIRECTORY; + return TDEIO::ERR_CANNOT_ENTER_DIRECTORY; } @@ -466,7 +466,7 @@ void KMobileProtocol::listNotes( const TQString &devName, const TQString &resour { PRINT_DEBUG << TQString("listNotes(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int entries = m_dev.numNotes(devName); totalSize(entries); @@ -498,11 +498,11 @@ int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQStri if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numNotes(devName)) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; TQString note = m_dev.readNote(devName, index); if (note.isEmpty()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; result = note.utf8(); mime = entryMimeType(KMobileDevice::hasNotes); @@ -517,7 +517,7 @@ void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &r PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath); /* TODO */ - error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) ); + error( TDEIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) ); } /* @@ -531,7 +531,7 @@ int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result, Q_UNUSED(devName); Q_UNUSED(result); Q_UNUSED(mime); - return KIO::ERR_CANNOT_ENTER_DIRECTORY; + return TDEIO::ERR_CANNOT_ENTER_DIRECTORY; } @@ -602,7 +602,7 @@ void KMobileProtocol::listDir(const KURL &url) PRINT_DEBUG << TQString("listDir(%1)\n").arg(url.path()); if (!m_dev.isKMobileAvailable()) { - error( KIO::ERR_CONNECTION_BROKEN, i18n("TDE Mobile Device Manager") ); + error( TDEIO::ERR_CONNECTION_BROKEN, i18n("TDE Mobile Device Manager") ); return; } @@ -622,7 +622,7 @@ void KMobileProtocol::listDir(const KURL &url) #if 0 if (!dev) { - error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) ); + error( TDEIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) ); return; } #endif diff --git a/kmobile/kioslave/kio_mobile.h b/kmobile/kioslave/kio_mobile.h index eb053d599..f534514f3 100644 --- a/kmobile/kioslave/kio_mobile.h +++ b/kmobile/kioslave/kio_mobile.h @@ -26,7 +26,7 @@ #include <kmobiledevice.h> #include <kmobileclient.h> -class KMobileProtocol : public KIO::SlaveBase +class KMobileProtocol : public TDEIO::SlaveBase { public: KMobileProtocol( const TQCString &pool, const TQCString &app ); diff --git a/kmobile/kmobile.cpp b/kmobile/kmobile.cpp index 4c46b8903..2453b3bac 100644 --- a/kmobile/kmobile.cpp +++ b/kmobile/kmobile.cpp @@ -55,7 +55,7 @@ KMobile::KMobile() : KMainWindow( 0, "kmobile" ) { - m_config = new KConfig("kmobilerc"); + m_config = new TDEConfig("kmobilerc"); m_view = new KMobileView(this, m_config); @@ -168,14 +168,14 @@ void KMobile::fileSave() } -void KMobile::saveProperties(KConfig *) +void KMobile::saveProperties(TDEConfig *) { // the 'config' object points to the session managed // config file. anything you write here will be available // later when this app is restored } -void KMobile::readProperties(KConfig *config) +void KMobile::readProperties(TDEConfig *config) { // the 'config' object points to the session managed // config file. this function is automatically called whenever diff --git a/kmobile/kmobile.h b/kmobile/kmobile.h index f9bfefb38..58d3f4c23 100644 --- a/kmobile/kmobile.h +++ b/kmobile/kmobile.h @@ -42,14 +42,14 @@ protected: * This function is called when it is time for the app to save its * properties for session management purposes. */ - void saveProperties(KConfig *); + void saveProperties(TDEConfig *); /** - * This function is called when this app is restored. The KConfig + * This function is called when this app is restored. The TDEConfig * object points to the session management config file that was saved * with @ref saveProperties */ - void readProperties(KConfig *); + void readProperties(TDEConfig *); public slots: @@ -87,7 +87,7 @@ private: bool queryClose(); private: - KConfig *m_config; + TDEConfig *m_config; KMobileView *m_view; SystemTray *m_systemTray; diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp index 36c6bacb7..d1e031324 100644 --- a/kmobile/kmobiledevice.cpp +++ b/kmobile/kmobiledevice.cpp @@ -60,9 +60,9 @@ KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList // set the config file name m_configFileName = args[0]; if (m_configFileName.isEmpty()) - m_config = new KConfig(); + m_config = new TDEConfig(); else - m_config = new KConfig(m_configFileName); + m_config = new TDEConfig(m_configFileName); PRINT_DEBUG << TQString("name of config file is %1\n").arg(m_configFileName); } @@ -178,9 +178,9 @@ const TQString KMobileDevice::nameForCap(int cap) const } // returns an error string for the given error code -TQString KMobileDevice::buildErrorString(KIO::Error err, const TQString &errorText) const +TQString KMobileDevice::buildErrorString(TDEIO::Error err, const TQString &errorText) const { - return KIO::buildErrorString( err, errorText); + return TDEIO::buildErrorString( err, errorText); } /* @@ -193,12 +193,12 @@ int KMobileDevice::numAddresses() int KMobileDevice::readAddress( int, KABC::Addressee & ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } int KMobileDevice::storeAddress( int, const KABC::Addressee &, bool ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } /* @@ -211,12 +211,12 @@ int KMobileDevice::numCalendarEntries() int KMobileDevice::readCalendarEntry( int, KCal::Event & ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } int KMobileDevice::storeCalendarEntry( int, const KCal::Event & ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } /* @@ -229,12 +229,12 @@ int KMobileDevice::numNotes() int KMobileDevice::readNote( int, TQString & ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } int KMobileDevice::storeNote( int, const TQString & ) { - return KIO::ERR_UNSUPPORTED_ACTION; + return TDEIO::ERR_UNSUPPORTED_ACTION; } /* @@ -243,96 +243,96 @@ int KMobileDevice::storeNote( int, const TQString & ) */ static -void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) +void addAtom(TDEIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) { - KIO::UDSAtom atom; + TDEIO::UDSAtom atom; atom.m_uds = ID; atom.m_long = l; atom.m_str = s; entry.append(atom); } -void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const +void KMobileDevice::createDirEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); - addAtom(entry, KIO::UDS_ACCESS, 0500); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - addAtom(entry, KIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, TDEIO::UDS_ACCESS, 0500); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_URL, 0, url); PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url); -// addAtom(entry, KIO::UDS_SIZE, 0); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); +// addAtom(entry, TDEIO::UDS_SIZE, 0); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); } -void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, +void KMobileDevice::createFileEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const unsigned long size) const { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); - addAtom(entry, KIO::UDS_URL, 0, url); - addAtom(entry, KIO::UDS_ACCESS, 0400); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - if (size) addAtom(entry, KIO::UDS_SIZE, size); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, TDEIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_ACCESS, 0400); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + if (size) addAtom(entry, TDEIO::UDS_SIZE, size); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime); } void KMobileDevice::listDir( const TQString & ) { - emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,TQString()); + emit error(TDEIO::ERR_CANNOT_ENTER_DIRECTORY,TQString()); } void KMobileDevice::mkdir( const TQString &, int ) { - emit error(KIO::ERR_COULD_NOT_MKDIR, TQString()); + emit error(TDEIO::ERR_COULD_NOT_MKDIR, TQString()); } void KMobileDevice::rename( const TQString &, const TQString &, bool ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::symlink( const TQString &, const TQString &, bool ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::del( const TQString &, bool ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::stat( const TQString & ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::chmod( const TQString &, int ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::get( const TQString & ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::put( const TQString &, int, bool, bool ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::mimetype( const TQString & ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } void KMobileDevice::special( const TQByteArray & ) { - emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString()); + emit error(TDEIO::ERR_UNSUPPORTED_ACTION, TQString()); } diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h index f8e36ba57..111a26e5d 100644 --- a/kmobile/kmobiledevice.h +++ b/kmobile/kmobiledevice.h @@ -35,7 +35,7 @@ #include <libkcal/event.h> -class KConfig; +class TDEConfig; #define KMOBILE_MIMETYPE_DEVICE "kdedevice/mobiledevice" #define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) TQString("kdedevice/kmobile_%1").arg(name) @@ -171,8 +171,8 @@ public: const TQString nameForCap(int cap) const; // returns an error string for the given error code - // See KIO::buildErrorString() - TQString buildErrorString(KIO::Error err, const TQString &errorText) const; + // See TDEIO::buildErrorString() + TQString buildErrorString(TDEIO::Error err, const TQString &errorText) const; public: /* @@ -208,9 +208,9 @@ public: /** * helper functions for the kmobile device drivers */ - void createDirEntry(KIO::UDSEntry& entry, const TQString& name, + void createDirEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const; - void createFileEntry(KIO::UDSEntry& entry, const TQString& name, + void createFileEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const unsigned long size = 0) const; /** @@ -321,7 +321,7 @@ signals: * mimetype, etc. * @param _entry The UDSEntry containing all of the object attributes. */ - void statEntry( const KIO::UDSEntry &_entry ); + void statEntry( const TDEIO::UDSEntry &_entry ); /** * internal function to be called by the slave. @@ -333,7 +333,7 @@ signals: * @param ready set to true after emitting all items. _entry is not * used in this case */ - void listEntry( const KIO::UDSEntry& _entry, bool ready); + void listEntry( const TDEIO::UDSEntry& _entry, bool ready); /** * Internal function to transmit meta data to the application. @@ -349,7 +349,7 @@ signals: * simple example: * * <pre> - * KIO::AuthInfo authInfo; + * TDEIO::AuthInfo authInfo; * if ( openPassDlg( authInfo ) ) * { * kdDebug() << TQString::fromLatin1("User: ") @@ -363,7 +363,7 @@ signals: * comment as follows: * * <pre> - * KIO::AuthInfo authInfo; + * TDEIO::AuthInfo authInfo; * authInfo.caption= "Acme Password Dialog"; * authInfo.username= "Wile E. Coyote"; * TQString errorMsg = "You entered an incorrect password."; @@ -384,7 +384,7 @@ signals: * @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 ); /** * Call this in @ref #mimetype, when you know the mimetype. @@ -396,7 +396,7 @@ signals: * 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 @@ -404,9 +404,9 @@ signals: * 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 ); @@ -458,13 +458,13 @@ signals: * of the file * Call in @ref 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 @ref #get and @ref #copy, once in a while, * to give some info about the current state. * Don't emit it in @ref #listDir, @ref #listEntries speaks for itself. */ - void processedSize( KIO::filesize_t _bytes ); + void processedSize( TDEIO::filesize_t _bytes ); signals: @@ -474,7 +474,7 @@ protected: // only available to sub-classed device drivers: void setClassType( enum ClassType ct ); void setCapabilities( int caps ); - KConfig *config() const { return m_config; }; + TDEConfig *config() const { return m_config; }; TQString configFileName() const { return m_configFileName; }; @@ -489,7 +489,7 @@ protected: protected: TQMutex m_mutex; // mutex to syncronize DCOP accesses to this device TQString m_configFileName; - KConfig *m_config; // this is where this device should store it's configuration + TDEConfig *m_config; // this is where this device should store it's configuration enum ClassType m_classType; TQString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer" TQString m_deviceName; // e.g. "Nokia 6310", "Opie" diff --git a/kmobile/kmobileitem.cpp b/kmobile/kmobileitem.cpp index 2471f667e..dec9924a4 100644 --- a/kmobile/kmobileitem.cpp +++ b/kmobile/kmobileitem.cpp @@ -29,7 +29,7 @@ #define PRINT_DEBUG kdDebug() << "KMobileItem: " -KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, KService::Ptr service) +KMobileItem::KMobileItem(TQIconView *parent, TDEConfig *_config, KService::Ptr service) : TQObject(parent), TQIconViewItem(parent), m_dev(0L) { config = _config; @@ -51,7 +51,7 @@ KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, KService::Ptr ser } /* restore this item from the config file */ -KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, int reload_index) +KMobileItem::KMobileItem(TQIconView *parent, TDEConfig *_config, int reload_index) : TQObject(parent), TQIconViewItem(parent), m_dev(0L) { config = _config; @@ -129,7 +129,7 @@ void KMobileItem::writeKonquMimeFile() const if (comment.isEmpty()) comment = KMobileDevice::defaultClassName(KMobileDevice::Unclassified); - KConfig conf( getKonquMimeType()+".desktop", false, true, "mime" ); + TDEConfig conf( getKonquMimeType()+".desktop", false, true, "mime" ); conf.setDesktopGroup(); conf.writeEntry("Encoding", "UTF-8"); conf.writeEntry("Comment", comment ); diff --git a/kmobile/kmobileitem.h b/kmobile/kmobileitem.h index 81878c8d0..d3dc1761e 100644 --- a/kmobile/kmobileitem.h +++ b/kmobile/kmobileitem.h @@ -16,8 +16,8 @@ class KMobileItem : public TQObject, public TQIconViewItem friend class KMobileView; public: - KMobileItem(TQIconView *parent, KConfig *config, KService::Ptr service); - KMobileItem(TQIconView *parent, KConfig *config, int reload_index); + KMobileItem(TQIconView *parent, TDEConfig *config, KService::Ptr service); + KMobileItem(TQIconView *parent, TDEConfig *config, int reload_index); virtual ~KMobileItem(); void configSave() const; @@ -42,7 +42,7 @@ signals: private slots: private: - KConfig *config; + TDEConfig *config; TQString m_deviceConfigFile; TQString m_deviceDesktopFile; diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp index 89395bddb..0080b57a0 100644 --- a/kmobile/kmobileview.cpp +++ b/kmobile/kmobileview.cpp @@ -32,7 +32,7 @@ #include "kmobileitem.h" -KMobileView::KMobileView(TQWidget *parent, KConfig *_config) +KMobileView::KMobileView(TQWidget *parent, TDEConfig *_config) : DCOPObject("kmobileIface"), TQIconView(parent) { m_config = _config; @@ -47,7 +47,7 @@ KMobileView::~KMobileView() { } -bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service) +bool KMobileView::addNewDevice(TDEConfig *config, KService::Ptr service) { kdDebug() << "New mobile device item:\n"; kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n") @@ -425,7 +425,7 @@ TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName) mountList << name; mountList << " "; - mountList << TQString("mobile:/%1").arg(name); // KIO::encodeFileName() + mountList << TQString("mobile:/%1").arg(name); // TDEIO::encodeFileName() mountList << mime; mountList << "true"; // mountState mountList << "---"; diff --git a/kmobile/kmobileview.h b/kmobile/kmobileview.h index ccb207ed8..39e2a53e0 100644 --- a/kmobile/kmobileview.h +++ b/kmobile/kmobileview.h @@ -10,7 +10,7 @@ #include "kmobileiface.h" #include <tdepimmacros.h> -class KConfig; +class TDEConfig; class KMobileItem; /** @@ -25,10 +25,10 @@ class KDE_EXPORT KMobileView : public TQIconView, public kmobileIface Q_OBJECT public: - KMobileView(TQWidget *parent, KConfig *_config); + KMobileView(TQWidget *parent, TDEConfig *_config); virtual ~KMobileView(); - bool addNewDevice(KConfig *config, KService::Ptr service); + bool addNewDevice(TDEConfig *config, KService::Ptr service); bool startKonqueror(const TQString &devName); /** @@ -83,7 +83,7 @@ signals: void signalChangeStatusbar(const TQString& text); private: - KConfig *m_config; + TDEConfig *m_config; }; |