diff options
Diffstat (limited to 'src/filehandler.cpp')
-rw-r--r-- | src/filehandler.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/filehandler.cpp b/src/filehandler.cpp index 10c5405..96a1ef9 100644 --- a/src/filehandler.cpp +++ b/src/filehandler.cpp @@ -37,9 +37,9 @@ using Tellico::FileHandler; class FileHandler::ItemDeleter : public TQObject { public: - ItemDeleter(KIO::Job* job, KFileItem* item) : TQObject(), m_job(job), m_item(item) { + ItemDeleter(TDEIO::Job* job, KFileItem* item) : TQObject(), m_job(job), m_item(item) { FileHandler::s_deleterList.append(this); - connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(deleteLater())); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(deleteLater())); } ~ItemDeleter() { FileHandler::s_deleterList.removeRef(this); @@ -47,7 +47,7 @@ public: delete m_item; m_item = 0; } private: - TQGuardedPtr<KIO::Job> m_job; + TQGuardedPtr<TDEIO::Job> m_job; KFileItem* m_item; }; @@ -60,7 +60,7 @@ FileHandler::FileRef::FileRef(const KURL& url_, bool quiet_, bool allowCompresse if(!Tellico::NetAccess::download(url_, m_filename, Kernel::self()->widget())) { myDebug() << "FileRef::FileRef() - can't download " << url_ << endl; - TQString s = KIO::NetAccess::lastErrorString(); + TQString s = TDEIO::NetAccess::lastErrorString(); if(!s.isEmpty()) { myDebug() << s << endl; } @@ -183,10 +183,10 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_, tmpURL.setPath(tmpFile.name()); tmpFile.setAutoDelete(true); - KIO::Job* job = KIO::file_copy(url_, tmpURL, -1, true /* overwrite */); + TDEIO::Job* job = TDEIO::file_copy(url_, tmpURL, -1, true /* overwrite */); job->addMetaData(TQString::fromLatin1("referrer"), referrer_.url()); - if(!KIO::NetAccess::synchronousRun(job, Kernel::self()->widget())) { + if(!TDEIO::NetAccess::synchronousRun(job, Kernel::self()->widget())) { if(!quiet_) { Kernel::self()->sorry(i18n(errorLoad).arg(url_.fileName())); } @@ -210,7 +210,7 @@ Tellico::Data::Image* FileHandler::readImageFile(const KURL& url_, bool quiet_) } bool FileHandler::queryExists(const KURL& url_) { - if(url_.isEmpty() || !KIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { + if(url_.isEmpty() || !TDEIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { return true; } @@ -238,7 +238,7 @@ bool FileHandler::queryExists(const KURL& url_) { KFileItemList list; int perm = -1; TQString grp; - if(KIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { + if(TDEIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url_, true); perm = item.permissions(); grp = item.group(); @@ -250,12 +250,12 @@ bool FileHandler::queryExists(const KURL& url_) { success = KSaveFile::backupFile(url_.path()); if(!list.isEmpty()) { // have to leave the user alone - KIO::Job* job = KIO::chmod(list, perm, 0, TQString(), grp, true, false); + TDEIO::Job* job = TDEIO::chmod(list, perm, 0, TQString(), grp, true, false); new ItemDeleter(job, list.first()); } } else { - KIO::NetAccess::del(backup, Kernel::self()->widget()); // might fail if backup doesn't exist, that's ok - success = KIO::NetAccess::file_copy(url_, backup, -1 /* permissions */, true /* overwrite */, + TDEIO::NetAccess::del(backup, Kernel::self()->widget()); // might fail if backup doesn't exist, that's ok + success = TDEIO::NetAccess::file_copy(url_, backup, -1 /* permissions */, true /* overwrite */, false /* resume */, Kernel::self()->widget()); } if(!success) { @@ -278,7 +278,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc KFileItemList list; int perm = -1; TQString grp; - if(KIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { + if(TDEIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { KFileItem* item = new KFileItem(KFileItem::Unknown, KFileItem::Unknown, url_, true); list.append(item); perm = item->permissions(); @@ -295,7 +295,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc bool success = FileHandler::writeTextFile(f, text_, encodeUTF8_); if(!list.isEmpty()) { // have to leave the user alone - KIO::Job* job = KIO::chmod(list, perm, 0, TQString(), grp, true, false); + TDEIO::Job* job = TDEIO::chmod(list, perm, 0, TQString(), grp, true, false); new ItemDeleter(job, list.first()); } return success; @@ -314,7 +314,7 @@ bool FileHandler::writeTextURL(const KURL& url_, const TQString& text_, bool enc bool success = FileHandler::writeTextFile(f, text_, encodeUTF8_); if(success) { - bool uploaded = KIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget()); + bool uploaded = TDEIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget()); if(!uploaded) { tempfile.unlink(); if(!quiet_) { @@ -359,7 +359,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool KFileItemList list; int perm = -1; TQString grp; - if(KIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { + if(TDEIO::NetAccess::exists(url_, false, Kernel::self()->widget())) { KFileItem* item = new KFileItem(KFileItem::Unknown, KFileItem::Unknown, url_, true); list.append(item); perm = item->permissions(); @@ -376,7 +376,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool bool success = FileHandler::writeDataFile(f, data_); if(!list.isEmpty()) { // have to leave the user alone - KIO::Job* job = KIO::chmod(list, perm, 0, TQString(), grp, true, false); + TDEIO::Job* job = TDEIO::chmod(list, perm, 0, TQString(), grp, true, false); new ItemDeleter(job, list.first()); } return success; @@ -394,7 +394,7 @@ bool FileHandler::writeDataURL(const KURL& url_, const TQByteArray& data_, bool bool success = FileHandler::writeDataFile(f, data_); if(success) { - success = KIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget()); + success = TDEIO::NetAccess::upload(tempfile.name(), url_, Kernel::self()->widget()); if(!success && !quiet_) { Kernel::self()->sorry(i18n(errorUpload).arg(url_.fileName())); } |