diff options
-rw-r--r-- | src/README | 2 | ||||
-rw-r--r-- | src/dolphin.cpp | 58 | ||||
-rw-r--r-- | src/dolphin.h | 14 | ||||
-rw-r--r-- | src/dolphindetailsview.cpp | 4 | ||||
-rw-r--r-- | src/dolphindetailsviewsettings.cpp | 4 | ||||
-rw-r--r-- | src/dolphindirlister.cpp | 2 | ||||
-rw-r--r-- | src/dolphindirlister.h | 2 | ||||
-rw-r--r-- | src/dolphiniconsviewsettings.cpp | 6 | ||||
-rw-r--r-- | src/dolphiniconsviewsettings.h | 2 | ||||
-rw-r--r-- | src/dolphinsettings.cpp | 4 | ||||
-rw-r--r-- | src/dolphinview.cpp | 24 | ||||
-rw-r--r-- | src/infosidebarpage.cpp | 4 | ||||
-rw-r--r-- | src/infosidebarpage.h | 2 | ||||
-rw-r--r-- | src/sidebarssettings.cpp | 8 | ||||
-rw-r--r-- | src/statusbarspaceinfo.cpp | 4 | ||||
-rw-r--r-- | src/undomanager.cpp | 46 | ||||
-rw-r--r-- | src/undomanager.h | 2 | ||||
-rw-r--r-- | src/urlnavigatorbutton.cpp | 26 | ||||
-rw-r--r-- | src/urlnavigatorbutton.h | 8 |
19 files changed, 111 insertions, 111 deletions
@@ -42,7 +42,7 @@ For more details, consult : http://devel-home.kde.org/~larrosa/tutorial/p9.html http://developer.kde.org/documentation/tutorials/xmlui/preface.html -* Use KConfig XT to create your configuration dialogs and make +* Use TDEConfig XT to create your configuration dialogs and make them more maintainable. For more details, consult : diff --git a/src/dolphin.cpp b/src/dolphin.cpp index 00cc57a..53cee90 100644 --- a/src/dolphin.cpp +++ b/src/dolphin.cpp @@ -156,7 +156,7 @@ void Dolphin::dropURLs(const KURL::List& urls, case 2: { // 'Link Here' has been selected - KIO::Job* job = KIO::link(urls, destination); + TDEIO::Job* job = TDEIO::link(urls, destination); addPendingUndoJob(job, DolphinCommand::Link, urls, destination); break; } @@ -294,7 +294,7 @@ void Dolphin::slotSelectionChanged() void Dolphin::closeEvent(TQCloseEvent* event) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("General"); config->writeEntry("First Run", false); @@ -320,7 +320,7 @@ void Dolphin::closeEvent(TQCloseEvent* event) KMainWindow::closeEvent(event); } -void Dolphin::saveProperties(KConfig* config) +void Dolphin::saveProperties(TDEConfig* config) { config->setGroup("Primary view"); config->writeEntry("URL", m_view[PrimaryIdx]->url().url()); @@ -332,7 +332,7 @@ void Dolphin::saveProperties(KConfig* config) } } -void Dolphin::readProperties(KConfig* config) +void Dolphin::readProperties(TDEConfig* config) { config->setGroup("Primary view"); m_view[PrimaryIdx]->setURL(config->readEntry("URL")); @@ -365,7 +365,7 @@ void Dolphin::createFolder() TQString name(i18n("New Folder")); if (baseURL.isLocalFile() && TQFileInfo(baseURL.path(+1) + name).exists()) { - name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder")); + name = TDEIO::RenameDlg::suggestName(baseURL, i18n("New Folder")); } bool ok = false; @@ -387,11 +387,11 @@ void Dolphin::createFolder() url.setPath(KShell::tildeExpand(name)); } else { - name = KIO::encodeFileName(name); + name = TDEIO::encodeFileName(name); url = baseURL; url.addPath(name); } - ok = KIO::NetAccess::mkdir(url, this); + ok = TDEIO::NetAccess::mkdir(url, this); // TODO: provide message type hint if (ok) { @@ -404,7 +404,7 @@ void Dolphin::createFolder() else { // Creating of the folder has been failed. Check whether the creating // has been failed because a folder with the same name exists... - if (KIO::NetAccess::exists(url, true, this)) { + if (TDEIO::NetAccess::exists(url, true, this)) { statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()), DolphinStatusBar::Error); } @@ -468,9 +468,9 @@ void Dolphin::createFile() // a unique file name (e. g. "HTML File" will be replaced by "HTML File_1"). const KURL viewURL(m_activeView->url()); const bool fileExists = viewURL.isLocalFile() && - TQFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists(); + TQFileInfo(viewURL.path(+1) + TDEIO::encodeFileName(name)).exists(); if (fileExists) { - name = KIO::RenameDlg::suggestName(viewURL, name); + name = TDEIO::RenameDlg::suggestName(viewURL, name); } // let the user change the suggested file name @@ -487,9 +487,9 @@ void Dolphin::createFile() // before copying the template to the destination path check whether a file // with the given name already exists - const TQString destPath(viewURL.prettyURL() + "/" + KIO::encodeFileName(name)); + const TQString destPath(viewURL.prettyURL() + "/" + TDEIO::encodeFileName(name)); const KURL destURL(destPath); - if (KIO::NetAccess::exists(destURL, false, this)) { + if (TDEIO::NetAccess::exists(destURL, false, this)) { statusBar->setMessage(i18n("A file named %1 already exists.").arg(name), DolphinStatusBar::Error); return; @@ -497,9 +497,9 @@ void Dolphin::createFile() // copy the template to the destination path const KURL sourceURL(sourcePath); - KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL); + TDEIO::CopyJob* job = TDEIO::copyAs(sourceURL, destURL); job->setDefaultPermissions(true); - if (KIO::NetAccess::synchronousRun(job, this)) { + if (TDEIO::NetAccess::synchronousRun(job, this)) { statusBar->setMessage(i18n("Created file %1.").arg(name), DolphinStatusBar::OperationCompleted); @@ -525,7 +525,7 @@ void Dolphin::moveToTrash() { clearStatusBar(); KURL::List selectedURLs = m_activeView->selectedURLs(); - KIO::Job* job = KIO::trash(selectedURLs); + TDEIO::Job* job = TDEIO::trash(selectedURLs); addPendingUndoJob(job, DolphinCommand::Trash, selectedURLs, m_activeView->url()); } @@ -552,11 +552,11 @@ void Dolphin::deleteItems() KGuiItem(i18n("Delete"), SmallIcon("editdelete")) ) == KMessageBox::Continue; if (del) { - KIO::Job* job = KIO::del(list); - connect(job, TQT_SIGNAL(result(KIO::Job*)), - this, TQT_SLOT(slotHandleJobError(KIO::Job*))); - connect(job, TQT_SIGNAL(result(KIO::Job*)), - this, TQT_SLOT(slotDeleteFileFinished(KIO::Job*))); + TDEIO::Job* job = TDEIO::del(list); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotHandleJobError(TDEIO::Job*))); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotDeleteFileFinished(TDEIO::Job*))); } } @@ -583,7 +583,7 @@ void Dolphin::quit() close(); } -void Dolphin::slotHandleJobError(KIO::Job* job) +void Dolphin::slotHandleJobError(TDEIO::Job* job) { if (job->error() != 0) { m_activeView->statusBar()->setMessage(job->errorString(), @@ -591,7 +591,7 @@ void Dolphin::slotHandleJobError(KIO::Job* job) } } -void Dolphin::slotDeleteFileFinished(KIO::Job* job) +void Dolphin::slotDeleteFileFinished(TDEIO::Job* job) { if (job->error() == 0) { m_activeView->statusBar()->setMessage(i18n("Delete operation completed."), @@ -996,7 +996,7 @@ void Dolphin::editSettings() dlg.exec(); } -void Dolphin::addUndoOperation(KIO::Job* job) +void Dolphin::addUndoOperation(TDEIO::Job* job) { if (job->error() != 0) { slotHandleJobError(job); @@ -1089,7 +1089,7 @@ void Dolphin::init() { // Check whether Dolphin runs the first time. If yes then // a proper default window size is given at the end of Dolphin::init(). - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("General"); const bool firstRun = config->readBoolEntry("First Run", true); @@ -1581,23 +1581,23 @@ void Dolphin::updateViewProperties(const KURL::List& urls) void Dolphin::copyURLs(const KURL::List& source, const KURL& dest) { - KIO::Job* job = KIO::copy(source, dest); + TDEIO::Job* job = TDEIO::copy(source, dest); addPendingUndoJob(job, DolphinCommand::Copy, source, dest); } void Dolphin::moveURLs(const KURL::List& source, const KURL& dest) { - KIO::Job* job = KIO::move(source, dest); + TDEIO::Job* job = TDEIO::move(source, dest); addPendingUndoJob(job, DolphinCommand::Move, source, dest); } -void Dolphin::addPendingUndoJob(KIO::Job* job, +void Dolphin::addPendingUndoJob(TDEIO::Job* job, DolphinCommand::Type commandType, const KURL::List& source, const KURL& dest) { - connect(job, TQT_SIGNAL(result(KIO::Job*)), - this, TQT_SLOT(addUndoOperation(KIO::Job*))); + connect(job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(addUndoOperation(TDEIO::Job*))); UndoInfo undoInfo; undoInfo.id = job->progressId(); diff --git a/src/dolphin.h b/src/dolphin.h index 1ed1f12..779b5d7 100644 --- a/src/dolphin.h +++ b/src/dolphin.h @@ -175,14 +175,14 @@ protected: * This method is called when it is time for the app to save its * properties for session management purposes. */ - void saveProperties(KConfig*); + void saveProperties(TDEConfig*); /** - * This method is called when this app is restored. The KConfig + * This method 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*); private slots: /** Opens an input dialog for creating a new folder. */ @@ -214,13 +214,13 @@ private slots: * Shows the error information of the job \a job * in the status bar. */ - void slotHandleJobError(KIO::Job* job); + void slotHandleJobError(TDEIO::Job* job); /** * Indicates in the status bar that the delete operation * of the job \a job has been finished. */ - void slotDeleteFileFinished(KIO::Job* job); + void slotDeleteFileFinished(TDEIO::Job* job); /** * Updates the state of the 'Undo' menu action dependent @@ -363,7 +363,7 @@ private slots: * Adds the undo operation given by \a job * to the UndoManager. */ - void addUndoOperation(KIO::Job* job); + void addUndoOperation(TDEIO::Job* job); void toggleleftSidebar(); @@ -391,7 +391,7 @@ private: void updateViewProperties(const KURL::List& urls); void copyURLs(const KURL::List& source, const KURL& dest); void moveURLs(const KURL::List& source, const KURL& dest); - void addPendingUndoJob(KIO::Job* job, + void addPendingUndoJob(TDEIO::Job* job, DolphinCommand::Type commandType, const KURL::List& source, const KURL& dest); diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 8c1077d..de1ba2f 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -135,7 +135,7 @@ void DolphinDetailsView::insertItem(KFileItem* fileItem) TQDir::SortSpec spec = KFileView::sorting(); if (spec & TQDir::Time) { - item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME), + item->setKey(sortingKey(fileItem->time(TDEIO::UDS_MODIFICATION_TIME), fileItem->isDir(), spec)); } @@ -683,7 +683,7 @@ DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(TQListView* parent, setText(SizeColumn, " - "); } else { - TQString sizeText(KIO::convertSize(fileItem->size())); + TQString sizeText(TDEIO::convertSize(fileItem->size())); sizeText.append(" "); setText(SizeColumn, sizeText); } diff --git a/src/dolphindetailsviewsettings.cpp b/src/dolphindetailsviewsettings.cpp index eda6043..a8088c9 100644 --- a/src/dolphindetailsviewsettings.cpp +++ b/src/dolphindetailsviewsettings.cpp @@ -28,7 +28,7 @@ DolphinDetailsViewSettings::DolphinDetailsViewSettings() : m_iconSize(0), m_fontSize(0) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("Details Mode"); // read which columns should be shown @@ -87,7 +87,7 @@ bool DolphinDetailsViewSettings::isColumnEnabled(int column) const void DolphinDetailsViewSettings::save() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("Details Mode"); config->writeEntry("Show Name", diff --git a/src/dolphindirlister.cpp b/src/dolphindirlister.cpp index 897b4b4..cf870e6 100644 --- a/src/dolphindirlister.cpp +++ b/src/dolphindirlister.cpp @@ -33,7 +33,7 @@ DolphinDirLister::~DolphinDirLister() { } -void DolphinDirLister::handleError(KIO::Job* job) +void DolphinDirLister::handleError(TDEIO::Job* job) { // TODO: some error texts should be adjusted manually emit errorMessage(job->errorString()); diff --git a/src/dolphindirlister.h b/src/dolphindirlister.h index 2d6bf59..84e9cda 100644 --- a/src/dolphindirlister.h +++ b/src/dolphindirlister.h @@ -43,7 +43,7 @@ signals: void errorMessage(const TQString& msg); protected: - virtual void handleError(KIO::Job* job); + virtual void handleError(TDEIO::Job* job); }; #endif diff --git a/src/dolphiniconsviewsettings.cpp b/src/dolphiniconsviewsettings.cpp index 5fa4960..6b3e9c5 100644 --- a/src/dolphiniconsviewsettings.cpp +++ b/src/dolphiniconsviewsettings.cpp @@ -35,7 +35,7 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode m_fontSize(0), m_textlinesCount(2) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); setConfigGroup(config); // read icon size @@ -117,7 +117,7 @@ void DolphinIconsViewSettings::setGridSpacing(int spacing) void DolphinIconsViewSettings::save() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); setConfigGroup(config); config->writeEntry("Icon Size", m_iconSize); @@ -187,7 +187,7 @@ int DolphinIconsViewSettings::textWidthHint() const return hint; } -void DolphinIconsViewSettings::setConfigGroup(KConfig* config) +void DolphinIconsViewSettings::setConfigGroup(TDEConfig* config) { if (m_layoutMode == DolphinIconsView::Previews) { config->setGroup("Previews Mode"); diff --git a/src/dolphiniconsviewsettings.h b/src/dolphiniconsviewsettings.h index 1642117..e58f186 100644 --- a/src/dolphiniconsviewsettings.h +++ b/src/dolphiniconsviewsettings.h @@ -120,7 +120,7 @@ private: int m_textlinesCount; TQString m_fontFamily; - void setConfigGroup(KConfig* config); + void setConfigGroup(TDEConfig* config); }; #endif diff --git a/src/dolphinsettings.cpp b/src/dolphinsettings.cpp index 8c26889..2d7b828 100644 --- a/src/dolphinsettings.cpp +++ b/src/dolphinsettings.cpp @@ -53,7 +53,7 @@ DolphinSettings::DolphinSettings() : m_isViewSplit(false), m_isURLEditable(false) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("General"); m_homeURL = KURL(config->readEntry("Home URL", TQDir::homeDirPath())); m_defaultMode = static_cast<DolphinView::Mode>(config->readNumEntry("Default View Mode", DolphinView::IconsView)); @@ -118,7 +118,7 @@ KBookmarkManager* DolphinSettings::bookmarkManager() const void DolphinSettings::save() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("General"); config->writeEntry("Version", 1); // internal version config->writeEntry("Home URL", m_homeURL.prettyURL()); diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 67db2ee..a33becd 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -244,7 +244,7 @@ void DolphinView::renameSelectedItems() KURL dest(source.upURL()); dest.addPath(name); - const bool destExists = KIO::NetAccess::exists(dest, false, view); + const bool destExists = TDEIO::NetAccess::exists(dest, false, view); if (destExists) { delete progressIndicator; progressIndicator = 0; @@ -252,7 +252,7 @@ void DolphinView::renameSelectedItems() DolphinStatusBar::Error); break; } - else if (KIO::NetAccess::file_move(source, dest)) { + else if (TDEIO::NetAccess::file_move(source, dest)) { // TODO: From the users point of view he executed one 'rename n files' operation, // but internally we store it as n 'rename 1 file' operations for the undo mechanism. DolphinCommand command(DolphinCommand::Rename, source, dest); @@ -538,27 +538,27 @@ void DolphinView::rename(const KURL& source, const TQString& newName) KURL dest(source.upURL()); dest.addPath(newName); - const bool destExists = KIO::NetAccess::exists(dest, + const bool destExists = TDEIO::NetAccess::exists(dest, false, Dolphin::mainWin().activeView()); if (destExists) { // the destination already exists, hence ask the user // how to proceed... - KIO::RenameDlg renameDialog(this, + TDEIO::RenameDlg renameDialog(this, i18n("File Already Exists"), source.path(), dest.path(), - KIO::M_OVERWRITE); + TDEIO::M_OVERWRITE); switch (renameDialog.exec()) { - case KIO::R_OVERWRITE: + case TDEIO::R_OVERWRITE: // the destination should be overwritten - ok = KIO::NetAccess::file_move(source, dest, -1, true); + ok = TDEIO::NetAccess::file_move(source, dest, -1, true); break; - case KIO::R_RENAME: { + case TDEIO::R_RENAME: { // a new name for the destination has been used KURL newDest(renameDialog.newDestURL()); - ok = KIO::NetAccess::file_move(source, newDest); + ok = TDEIO::NetAccess::file_move(source, newDest); break; } @@ -571,7 +571,7 @@ void DolphinView::rename(const KURL& source, const TQString& newName) else { // no destination exists, hence just move the file to // do the renaming - ok = KIO::NetAccess::file_move(source, dest); + ok = TDEIO::NetAccess::file_move(source, dest); } if (ok) { @@ -971,7 +971,7 @@ TQString DolphinView::selectionStatusBarText() const int fileCount = 0; int folderCount = 0; - KIO::filesize_t byteSize = 0; + TDEIO::filesize_t byteSize = 0; for (KFileItemListIterator it(*list); it.current() != 0; ++it) { KFileItem* item = it.current(); if (item->isDir()) { @@ -992,7 +992,7 @@ TQString DolphinView::selectionStatusBarText() const } if (fileCount > 0) { - const TQString sizeText(KIO::convertSize(byteSize)); + const TQString sizeText(TDEIO::convertSize(byteSize)); text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText); } diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index f713bd1..95b1b84 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -170,7 +170,7 @@ void InfoSidebarPage::showItemInfo() m_pendingPreview = true; m_preview->setPixmap(TQPixmap()); - KIO::PreviewJob* job = KIO::filePreview(list, + TDEIO::PreviewJob* job = TDEIO::filePreview(list, m_preview->width(), KIcon::SizeEnormous); connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), @@ -285,7 +285,7 @@ void InfoSidebarPage::createMetaInfo() else { addInfoLine(i18n("Type:"), fileItem.mimeComment()); - TQString sizeText(KIO::convertSize(fileItem.size())); + TQString sizeText(TDEIO::convertSize(fileItem.size())); addInfoLine(i18n("Size:"), sizeText); addInfoLine(i18n("Modified:"), fileItem.timeString()); diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index 6986fc8..126a981 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -29,7 +29,7 @@ #include <ksortablevaluelist.h> #include <kmimetype.h> -namespace KIO { +namespace TDEIO { class Job; }; diff --git a/src/sidebarssettings.cpp b/src/sidebarssettings.cpp index 01ca5c6..b80227d 100644 --- a/src/sidebarssettings.cpp +++ b/src/sidebarssettings.cpp @@ -27,7 +27,7 @@ leftSidebarSettings::leftSidebarSettings() : m_visible(true), m_width(0) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("leftSidebar"); m_visible = config->readBoolEntry("Visible", true); @@ -51,7 +51,7 @@ void leftSidebarSettings::setWidth(int width) void leftSidebarSettings::save() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("leftSidebar"); config->writeEntry("Visible", m_visible); @@ -63,7 +63,7 @@ rightSidebarSettings::rightSidebarSettings() : m_visible(true), m_width(0) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("rightSidebar"); m_visible = config->readBoolEntry("Visible", true); @@ -87,7 +87,7 @@ void rightSidebarSettings::setWidth(int width) void rightSidebarSettings::save() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup("rightSidebar"); config->writeEntry("Visible", m_visible); diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index a93deeb..ab8b463 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -90,7 +90,7 @@ void StatusBarSpaceInfo::paintEvent(TQPaintEvent* /* event */) painter.drawRect(TQRect(left, barTop + 2, right, barHeight - 2)); text = i18n("%1 free") - .arg(KIO::convertSizeFromKB(m_kBAvailable)); + .arg(TDEIO::convertSizeFromKB(m_kBAvailable)); } else { if (m_gettingSize) { @@ -147,7 +147,7 @@ void StatusBarSpaceInfo::refresh() m_kBSize = 0; m_kBAvailable = 0; - const TQString mountPoint(KIO::findPathMountPoint(m_url.path())); + const TQString mountPoint(TDEIO::findPathMountPoint(m_url.path())); KDiskFreeSp* job = new KDiskFreeSp(TQT_TQOBJECT(this)); connect(job, TQT_SIGNAL(foundMountPoint(const unsigned long&, diff --git a/src/undomanager.cpp b/src/undomanager.cpp index 0f4ac43..93dc1b2 100644 --- a/src/undomanager.cpp +++ b/src/undomanager.cpp @@ -149,7 +149,7 @@ void UndoManager::undo() const KURL::List::Iterator end = sourceURLs.end(); const TQString destURL(command.destination().prettyURL(+1)); - KIO::Job* job = 0; + TDEIO::Job* job = 0; switch (command.type()) { case DolphinCommand::Link: case DolphinCommand::Copy: { @@ -159,7 +159,7 @@ void UndoManager::undo() list.append(deleteURL); ++it; } - job = KIO::del(list, false, false); + job = TDEIO::del(list, false, false); break; } @@ -171,23 +171,23 @@ void UndoManager::undo() list.append(newSourceURL); ++it; } - job = KIO::move(list, newDestURL, false); + job = TDEIO::move(list, newDestURL, false); break; } case DolphinCommand::Rename: { assert(sourceURLs.count() == 1); - KIO::NetAccess::move(command.destination(), (*it)); + TDEIO::NetAccess::move(command.destination(), (*it)); break; } case DolphinCommand::Trash: { while (it != end) { - // TODO: use KIO::special for accessing the trash protocol. See + // TODO: use TDEIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. const TQString originalFileName((*it).filename().section('-', 1)); KURL newDestURL(destURL + originalFileName); - KIO::NetAccess::move(*it, newDestURL); + TDEIO::NetAccess::move(*it, newDestURL); ++it; m_progressIndicator->execOperation(); @@ -197,7 +197,7 @@ void UndoManager::undo() case DolphinCommand::CreateFolder: case DolphinCommand::CreateFile: { - KIO::NetAccess::del(command.destination(), &Dolphin::mainWin()); + TDEIO::NetAccess::del(command.destination(), &Dolphin::mainWin()); break; } } @@ -205,9 +205,9 @@ void UndoManager::undo() if (job != 0) { // Execute the jobs in a synchronous manner and forward the progress // information to the Dolphin statusbar. - connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), - this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); - KIO::NetAccess::synchronousRun(job, &Dolphin::mainWin()); + connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)), + this, TQT_SLOT(slotPercent(TDEIO::Job*, unsigned long))); + TDEIO::NetAccess::synchronousRun(job, &Dolphin::mainWin()); } m_progressIndicator->execOperation(); @@ -256,33 +256,33 @@ void UndoManager::redo() KURL::List::Iterator it = sourceURLs.begin(); const KURL::List::Iterator end = sourceURLs.end(); - KIO::Job* job = 0; + TDEIO::Job* job = 0; switch (command.type()) { case DolphinCommand::Link: { - job = KIO::link(sourceURLs, command.destination(), false); + job = TDEIO::link(sourceURLs, command.destination(), false); break; } case DolphinCommand::Copy: { - job = KIO::copy(sourceURLs, command.destination(), false); + job = TDEIO::copy(sourceURLs, command.destination(), false); break; } case DolphinCommand::Rename: case DolphinCommand::Move: { - job = KIO::move(sourceURLs, command.destination(), false); + job = TDEIO::move(sourceURLs, command.destination(), false); break; } case DolphinCommand::Trash: { const TQString destURL(command.destination().prettyURL()); while (it != end) { - // TODO: use KIO::special for accessing the trash protocol. See + // TODO: use TDEIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. const TQString originalFileName((*it).filename().section('-', 1)); KURL originalSourceURL(destURL + "/" + originalFileName); - KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL); - KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); + TDEIO::Job* moveToTrashJob = TDEIO::trash(originalSourceURL); + TDEIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); ++it; m_progressIndicator->execOperation(); @@ -291,7 +291,7 @@ void UndoManager::redo() } case DolphinCommand::CreateFolder: { - KIO::NetAccess::mkdir(command.destination(), &dolphin); + TDEIO::NetAccess::mkdir(command.destination(), &dolphin); break; } @@ -299,7 +299,7 @@ void UndoManager::redo() m_progressIndicator->execOperation(); KURL::List::Iterator it = sourceURLs.begin(); assert(sourceURLs.count() == 1); - KIO::CopyJob* copyJob = KIO::copyAs(*it, command.destination(), false); + TDEIO::CopyJob* copyJob = TDEIO::copyAs(*it, command.destination(), false); copyJob->setDefaultPermissions(true); job = copyJob; break; @@ -309,9 +309,9 @@ void UndoManager::redo() if (job != 0) { // Execute the jobs in a synchronous manner and forward the progress // information to the Dolphin statusbar. - connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), - this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); - KIO::NetAccess::synchronousRun(job, &dolphin); + connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)), + this, TQT_SLOT(slotPercent(TDEIO::Job*, unsigned long))); + TDEIO::NetAccess::synchronousRun(job, &dolphin); } ++m_historyIndex; @@ -354,7 +354,7 @@ TQString UndoManager::commandText(const DolphinCommand& command) const return text; } -void UndoManager::slotPercent(KIO::Job* /* job */, unsigned long /* percent */) +void UndoManager::slotPercent(TDEIO::Job* /* job */, unsigned long /* percent */) { // It is not allowed to update the progress indicator in the context // of this slot, hence do an asynchronous triggering. diff --git a/src/undomanager.h b/src/undomanager.h index 74587ae..d6b02cf 100644 --- a/src/undomanager.h +++ b/src/undomanager.h @@ -166,7 +166,7 @@ private slots: * Delegates the updating of the progress information * to UndoManager::updateProgress(). */ - void slotPercent(KIO::Job* job, unsigned long percent); + void slotPercent(TDEIO::Job* job, unsigned long percent); /** * Updates the progress information of the statusbar diff --git a/src/urlnavigatorbutton.cpp b/src/urlnavigatorbutton.cpp index ae97d46..ea53e30 100644 --- a/src/urlnavigatorbutton.cpp +++ b/src/urlnavigatorbutton.cpp @@ -260,35 +260,35 @@ void URLNavigatorButton::startListJob() } KURL url = urlNavigator()->url(m_index); - m_listJob = KIO::listDir(url, false, false); + m_listJob = TDEIO::listDir(url, false, false); m_subdirs.clear(); // just to be ++safe - connect(m_listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)), - this, TQT_SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&))); - connect(m_listJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(listJobFinished(KIO::Job*))); + connect(m_listJob, TQT_SIGNAL(entries(TDEIO::Job*, const TDEIO::UDSEntryList &)), + this, TQT_SLOT(entriesList(TDEIO::Job*, const TDEIO::UDSEntryList&))); + connect(m_listJob, TQT_SIGNAL(result(TDEIO::Job*)), this, TQT_SLOT(listJobFinished(TDEIO::Job*))); } -void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries) +void URLNavigatorButton::entriesList(TDEIO::Job* job, const TDEIO::UDSEntryList& entries) { if (job != m_listJob) { return; } - KIO::UDSEntryList::const_iterator it = entries.constBegin(); - KIO::UDSEntryList::const_iterator itEnd = entries.constEnd(); + TDEIO::UDSEntryList::const_iterator it = entries.constBegin(); + TDEIO::UDSEntryList::const_iterator itEnd = entries.constEnd(); while (it != itEnd) { TQString name; bool isDir = false; - KIO::UDSEntry entry = *it; - KIO::UDSEntry::const_iterator atomIt = entry.constBegin(); - KIO::UDSEntry::const_iterator atomEndIt = entry.constEnd(); + TDEIO::UDSEntry entry = *it; + TDEIO::UDSEntry::const_iterator atomIt = entry.constBegin(); + TDEIO::UDSEntry::const_iterator atomEndIt = entry.constEnd(); while (atomIt != atomEndIt) { switch ((*atomIt).m_uds) { - case KIO::UDS_NAME: + case TDEIO::UDS_NAME: name = (*atomIt).m_str; break; - case KIO::UDS_FILE_TYPE: + case TDEIO::UDS_FILE_TYPE: isDir = S_ISDIR((*atomIt).m_long); break; default: @@ -307,7 +307,7 @@ void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent m_subdirs.sort(); } -void URLNavigatorButton::listJobFinished(KIO::Job* job) +void URLNavigatorButton::listJobFinished(TDEIO::Job* job) { if (job != m_listJob) { return; diff --git a/src/urlnavigatorbutton.h b/src/urlnavigatorbutton.h index 843201a..365c041 100644 --- a/src/urlnavigatorbutton.h +++ b/src/urlnavigatorbutton.h @@ -30,7 +30,7 @@ class KURL; class URLNavigator; class TQPainter; -namespace KIO +namespace TDEIO { class Job; } @@ -71,8 +71,8 @@ private slots: void startPopupDelay(); void stopPopupDelay(); void startListJob(); - void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries); - void listJobFinished(KIO::Job* job); + void entriesList(TDEIO::Job* job, const TDEIO::UDSEntryList& entries); + void listJobFinished(TDEIO::Job* job); private: int arrowWidth() const; @@ -81,7 +81,7 @@ private: int m_index; TQTimer* m_popupDelay; - KIO::Job* m_listJob; + TDEIO::Job* m_listJob; TQStringList m_subdirs; TQPoint dragPos; }; |