Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 6d3902bd20
commit e32adbca5b

@ -42,7 +42,7 @@ For more details, consult :
http://devel-home.kde.org/~larrosa/tutorial/p9.html http://devel-home.kde.org/~larrosa/tutorial/p9.html
http://developer.kde.org/documentation/tutorials/xmlui/preface.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. them more maintainable.
For more details, consult : For more details, consult :

@ -156,7 +156,7 @@ void Dolphin::dropURLs(const KURL::List& urls,
case 2: { case 2: {
// 'Link Here' has been selected // '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); addPendingUndoJob(job, DolphinCommand::Link, urls, destination);
break; break;
} }
@ -294,7 +294,7 @@ void Dolphin::slotSelectionChanged()
void Dolphin::closeEvent(TQCloseEvent* event) void Dolphin::closeEvent(TQCloseEvent* event)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
config->writeEntry("First Run", false); config->writeEntry("First Run", false);
@ -320,7 +320,7 @@ void Dolphin::closeEvent(TQCloseEvent* event)
KMainWindow::closeEvent(event); KMainWindow::closeEvent(event);
} }
void Dolphin::saveProperties(KConfig* config) void Dolphin::saveProperties(TDEConfig* config)
{ {
config->setGroup("Primary view"); config->setGroup("Primary view");
config->writeEntry("URL", m_view[PrimaryIdx]->url().url()); 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"); config->setGroup("Primary view");
m_view[PrimaryIdx]->setURL(config->readEntry("URL")); m_view[PrimaryIdx]->setURL(config->readEntry("URL"));
@ -365,7 +365,7 @@ void Dolphin::createFolder()
TQString name(i18n("New Folder")); TQString name(i18n("New Folder"));
if (baseURL.isLocalFile() && TQFileInfo(baseURL.path(+1) + name).exists()) { 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; bool ok = false;
@ -387,11 +387,11 @@ void Dolphin::createFolder()
url.setPath(KShell::tildeExpand(name)); url.setPath(KShell::tildeExpand(name));
} }
else { else {
name = KIO::encodeFileName(name); name = TDEIO::encodeFileName(name);
url = baseURL; url = baseURL;
url.addPath(name); url.addPath(name);
} }
ok = KIO::NetAccess::mkdir(url, this); ok = TDEIO::NetAccess::mkdir(url, this);
// TODO: provide message type hint // TODO: provide message type hint
if (ok) { if (ok) {
@ -404,7 +404,7 @@ void Dolphin::createFolder()
else { else {
// Creating of the folder has been failed. Check whether the creating // Creating of the folder has been failed. Check whether the creating
// has been failed because a folder with the same name exists... // 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()), statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()),
DolphinStatusBar::Error); DolphinStatusBar::Error);
} }
@ -468,9 +468,9 @@ void Dolphin::createFile()
// a unique file name (e. g. "HTML File" will be replaced by "HTML File_1"). // a unique file name (e. g. "HTML File" will be replaced by "HTML File_1").
const KURL viewURL(m_activeView->url()); const KURL viewURL(m_activeView->url());
const bool fileExists = viewURL.isLocalFile() && const bool fileExists = viewURL.isLocalFile() &&
TQFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists(); TQFileInfo(viewURL.path(+1) + TDEIO::encodeFileName(name)).exists();
if (fileExists) { if (fileExists) {
name = KIO::RenameDlg::suggestName(viewURL, name); name = TDEIO::RenameDlg::suggestName(viewURL, name);
} }
// let the user change the suggested file 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 // before copying the template to the destination path check whether a file
// with the given name already exists // 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); 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), statusBar->setMessage(i18n("A file named %1 already exists.").arg(name),
DolphinStatusBar::Error); DolphinStatusBar::Error);
return; return;
@ -497,9 +497,9 @@ void Dolphin::createFile()
// copy the template to the destination path // copy the template to the destination path
const KURL sourceURL(sourcePath); const KURL sourceURL(sourcePath);
KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL); TDEIO::CopyJob* job = TDEIO::copyAs(sourceURL, destURL);
job->setDefaultPermissions(true); job->setDefaultPermissions(true);
if (KIO::NetAccess::synchronousRun(job, this)) { if (TDEIO::NetAccess::synchronousRun(job, this)) {
statusBar->setMessage(i18n("Created file %1.").arg(name), statusBar->setMessage(i18n("Created file %1.").arg(name),
DolphinStatusBar::OperationCompleted); DolphinStatusBar::OperationCompleted);
@ -525,7 +525,7 @@ void Dolphin::moveToTrash()
{ {
clearStatusBar(); clearStatusBar();
KURL::List selectedURLs = m_activeView->selectedURLs(); 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()); addPendingUndoJob(job, DolphinCommand::Trash, selectedURLs, m_activeView->url());
} }
@ -552,11 +552,11 @@ void Dolphin::deleteItems()
KGuiItem(i18n("Delete"), SmallIcon("editdelete")) KGuiItem(i18n("Delete"), SmallIcon("editdelete"))
) == KMessageBox::Continue; ) == KMessageBox::Continue;
if (del) { if (del) {
KIO::Job* job = KIO::del(list); TDEIO::Job* job = TDEIO::del(list);
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotHandleJobError(KIO::Job*))); this, TQT_SLOT(slotHandleJobError(TDEIO::Job*)));
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotDeleteFileFinished(KIO::Job*))); this, TQT_SLOT(slotDeleteFileFinished(TDEIO::Job*)));
} }
} }
@ -583,7 +583,7 @@ void Dolphin::quit()
close(); close();
} }
void Dolphin::slotHandleJobError(KIO::Job* job) void Dolphin::slotHandleJobError(TDEIO::Job* job)
{ {
if (job->error() != 0) { if (job->error() != 0) {
m_activeView->statusBar()->setMessage(job->errorString(), 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) { if (job->error() == 0) {
m_activeView->statusBar()->setMessage(i18n("Delete operation completed."), m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
@ -996,7 +996,7 @@ void Dolphin::editSettings()
dlg.exec(); dlg.exec();
} }
void Dolphin::addUndoOperation(KIO::Job* job) void Dolphin::addUndoOperation(TDEIO::Job* job)
{ {
if (job->error() != 0) { if (job->error() != 0) {
slotHandleJobError(job); slotHandleJobError(job);
@ -1089,7 +1089,7 @@ void Dolphin::init()
{ {
// Check whether Dolphin runs the first time. If yes then // Check whether Dolphin runs the first time. If yes then
// a proper default window size is given at the end of Dolphin::init(). // a proper default window size is given at the end of Dolphin::init().
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
const bool firstRun = config->readBoolEntry("First Run", true); 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) 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); addPendingUndoJob(job, DolphinCommand::Copy, source, dest);
} }
void Dolphin::moveURLs(const KURL::List& source, const KURL& 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); addPendingUndoJob(job, DolphinCommand::Move, source, dest);
} }
void Dolphin::addPendingUndoJob(KIO::Job* job, void Dolphin::addPendingUndoJob(TDEIO::Job* job,
DolphinCommand::Type commandType, DolphinCommand::Type commandType,
const KURL::List& source, const KURL::List& source,
const KURL& dest) const KURL& dest)
{ {
connect(job, TQT_SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(addUndoOperation(KIO::Job*))); this, TQT_SLOT(addUndoOperation(TDEIO::Job*)));
UndoInfo undoInfo; UndoInfo undoInfo;
undoInfo.id = job->progressId(); undoInfo.id = job->progressId();

@ -175,14 +175,14 @@ protected:
* This method is called when it is time for the app to save its * This method is called when it is time for the app to save its
* properties for session management purposes. * 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 * object points to the session management config file that was saved
* with @ref saveProperties * with @ref saveProperties
*/ */
void readProperties(KConfig*); void readProperties(TDEConfig*);
private slots: private slots:
/** Opens an input dialog for creating a new folder. */ /** Opens an input dialog for creating a new folder. */
@ -214,13 +214,13 @@ private slots:
* Shows the error information of the job \a job * Shows the error information of the job \a job
* in the status bar. * in the status bar.
*/ */
void slotHandleJobError(KIO::Job* job); void slotHandleJobError(TDEIO::Job* job);
/** /**
* Indicates in the status bar that the delete operation * Indicates in the status bar that the delete operation
* of the job \a job has been finished. * 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 * Updates the state of the 'Undo' menu action dependent
@ -363,7 +363,7 @@ private slots:
* Adds the undo operation given by \a job * Adds the undo operation given by \a job
* to the UndoManager. * to the UndoManager.
*/ */
void addUndoOperation(KIO::Job* job); void addUndoOperation(TDEIO::Job* job);
void toggleleftSidebar(); void toggleleftSidebar();
@ -391,7 +391,7 @@ private:
void updateViewProperties(const KURL::List& urls); void updateViewProperties(const KURL::List& urls);
void copyURLs(const KURL::List& source, const KURL& dest); void copyURLs(const KURL::List& source, const KURL& dest);
void moveURLs(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, DolphinCommand::Type commandType,
const KURL::List& source, const KURL::List& source,
const KURL& dest); const KURL& dest);

@ -135,7 +135,7 @@ void DolphinDetailsView::insertItem(KFileItem* fileItem)
TQDir::SortSpec spec = KFileView::sorting(); TQDir::SortSpec spec = KFileView::sorting();
if (spec & TQDir::Time) { if (spec & TQDir::Time) {
item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME), item->setKey(sortingKey(fileItem->time(TDEIO::UDS_MODIFICATION_TIME),
fileItem->isDir(), fileItem->isDir(),
spec)); spec));
} }
@ -683,7 +683,7 @@ DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(TQListView* parent,
setText(SizeColumn, " - "); setText(SizeColumn, " - ");
} }
else { else {
TQString sizeText(KIO::convertSize(fileItem->size())); TQString sizeText(TDEIO::convertSize(fileItem->size()));
sizeText.append(" "); sizeText.append(" ");
setText(SizeColumn, sizeText); setText(SizeColumn, sizeText);
} }

@ -28,7 +28,7 @@ DolphinDetailsViewSettings::DolphinDetailsViewSettings() :
m_iconSize(0), m_iconSize(0),
m_fontSize(0) m_fontSize(0)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("Details Mode"); config->setGroup("Details Mode");
// read which columns should be shown // read which columns should be shown
@ -87,7 +87,7 @@ bool DolphinDetailsViewSettings::isColumnEnabled(int column) const
void DolphinDetailsViewSettings::save() void DolphinDetailsViewSettings::save()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("Details Mode"); config->setGroup("Details Mode");
config->writeEntry("Show Name", config->writeEntry("Show Name",

@ -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 // TODO: some error texts should be adjusted manually
emit errorMessage(job->errorString()); emit errorMessage(job->errorString());

@ -43,7 +43,7 @@ signals:
void errorMessage(const TQString& msg); void errorMessage(const TQString& msg);
protected: protected:
virtual void handleError(KIO::Job* job); virtual void handleError(TDEIO::Job* job);
}; };
#endif #endif

@ -35,7 +35,7 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode
m_fontSize(0), m_fontSize(0),
m_textlinesCount(2) m_textlinesCount(2)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
setConfigGroup(config); setConfigGroup(config);
// read icon size // read icon size
@ -117,7 +117,7 @@ void DolphinIconsViewSettings::setGridSpacing(int spacing)
void DolphinIconsViewSettings::save() void DolphinIconsViewSettings::save()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
setConfigGroup(config); setConfigGroup(config);
config->writeEntry("Icon Size", m_iconSize); config->writeEntry("Icon Size", m_iconSize);
@ -187,7 +187,7 @@ int DolphinIconsViewSettings::textWidthHint() const
return hint; return hint;
} }
void DolphinIconsViewSettings::setConfigGroup(KConfig* config) void DolphinIconsViewSettings::setConfigGroup(TDEConfig* config)
{ {
if (m_layoutMode == DolphinIconsView::Previews) { if (m_layoutMode == DolphinIconsView::Previews) {
config->setGroup("Previews Mode"); config->setGroup("Previews Mode");

@ -120,7 +120,7 @@ private:
int m_textlinesCount; int m_textlinesCount;
TQString m_fontFamily; TQString m_fontFamily;
void setConfigGroup(KConfig* config); void setConfigGroup(TDEConfig* config);
}; };
#endif #endif

@ -53,7 +53,7 @@ DolphinSettings::DolphinSettings() :
m_isViewSplit(false), m_isViewSplit(false),
m_isURLEditable(false) m_isURLEditable(false)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
m_homeURL = KURL(config->readEntry("Home URL", TQDir::homeDirPath())); m_homeURL = KURL(config->readEntry("Home URL", TQDir::homeDirPath()));
m_defaultMode = static_cast<DolphinView::Mode>(config->readNumEntry("Default View Mode", DolphinView::IconsView)); m_defaultMode = static_cast<DolphinView::Mode>(config->readNumEntry("Default View Mode", DolphinView::IconsView));
@ -118,7 +118,7 @@ KBookmarkManager* DolphinSettings::bookmarkManager() const
void DolphinSettings::save() void DolphinSettings::save()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
config->writeEntry("Version", 1); // internal version config->writeEntry("Version", 1); // internal version
config->writeEntry("Home URL", m_homeURL.prettyURL()); config->writeEntry("Home URL", m_homeURL.prettyURL());

@ -244,7 +244,7 @@ void DolphinView::renameSelectedItems()
KURL dest(source.upURL()); KURL dest(source.upURL());
dest.addPath(name); dest.addPath(name);
const bool destExists = KIO::NetAccess::exists(dest, false, view); const bool destExists = TDEIO::NetAccess::exists(dest, false, view);
if (destExists) { if (destExists) {
delete progressIndicator; delete progressIndicator;
progressIndicator = 0; progressIndicator = 0;
@ -252,7 +252,7 @@ void DolphinView::renameSelectedItems()
DolphinStatusBar::Error); DolphinStatusBar::Error);
break; 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, // 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. // but internally we store it as n 'rename 1 file' operations for the undo mechanism.
DolphinCommand command(DolphinCommand::Rename, source, dest); DolphinCommand command(DolphinCommand::Rename, source, dest);
@ -538,27 +538,27 @@ void DolphinView::rename(const KURL& source, const TQString& newName)
KURL dest(source.upURL()); KURL dest(source.upURL());
dest.addPath(newName); dest.addPath(newName);
const bool destExists = KIO::NetAccess::exists(dest, const bool destExists = TDEIO::NetAccess::exists(dest,
false, false,
Dolphin::mainWin().activeView()); Dolphin::mainWin().activeView());
if (destExists) { if (destExists) {
// the destination already exists, hence ask the user // the destination already exists, hence ask the user
// how to proceed... // how to proceed...
KIO::RenameDlg renameDialog(this, TDEIO::RenameDlg renameDialog(this,
i18n("File Already Exists"), i18n("File Already Exists"),
source.path(), source.path(),
dest.path(), dest.path(),
KIO::M_OVERWRITE); TDEIO::M_OVERWRITE);
switch (renameDialog.exec()) { switch (renameDialog.exec()) {
case KIO::R_OVERWRITE: case TDEIO::R_OVERWRITE:
// the destination should be overwritten // the destination should be overwritten
ok = KIO::NetAccess::file_move(source, dest, -1, true); ok = TDEIO::NetAccess::file_move(source, dest, -1, true);
break; break;
case KIO::R_RENAME: { case TDEIO::R_RENAME: {
// a new name for the destination has been used // a new name for the destination has been used
KURL newDest(renameDialog.newDestURL()); KURL newDest(renameDialog.newDestURL());
ok = KIO::NetAccess::file_move(source, newDest); ok = TDEIO::NetAccess::file_move(source, newDest);
break; break;
} }
@ -571,7 +571,7 @@ void DolphinView::rename(const KURL& source, const TQString& newName)
else { else {
// no destination exists, hence just move the file to // no destination exists, hence just move the file to
// do the renaming // do the renaming
ok = KIO::NetAccess::file_move(source, dest); ok = TDEIO::NetAccess::file_move(source, dest);
} }
if (ok) { if (ok) {
@ -971,7 +971,7 @@ TQString DolphinView::selectionStatusBarText() const
int fileCount = 0; int fileCount = 0;
int folderCount = 0; int folderCount = 0;
KIO::filesize_t byteSize = 0; TDEIO::filesize_t byteSize = 0;
for (KFileItemListIterator it(*list); it.current() != 0; ++it) { for (KFileItemListIterator it(*list); it.current() != 0; ++it) {
KFileItem* item = it.current(); KFileItem* item = it.current();
if (item->isDir()) { if (item->isDir()) {
@ -992,7 +992,7 @@ TQString DolphinView::selectionStatusBarText() const
} }
if (fileCount > 0) { 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); text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText);
} }

@ -170,7 +170,7 @@ void InfoSidebarPage::showItemInfo()
m_pendingPreview = true; m_pendingPreview = true;
m_preview->setPixmap(TQPixmap()); m_preview->setPixmap(TQPixmap());
KIO::PreviewJob* job = KIO::filePreview(list, TDEIO::PreviewJob* job = TDEIO::filePreview(list,
m_preview->width(), m_preview->width(),
KIcon::SizeEnormous); KIcon::SizeEnormous);
connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
@ -285,7 +285,7 @@ void InfoSidebarPage::createMetaInfo()
else { else {
addInfoLine(i18n("Type:"), fileItem.mimeComment()); addInfoLine(i18n("Type:"), fileItem.mimeComment());
TQString sizeText(KIO::convertSize(fileItem.size())); TQString sizeText(TDEIO::convertSize(fileItem.size()));
addInfoLine(i18n("Size:"), sizeText); addInfoLine(i18n("Size:"), sizeText);
addInfoLine(i18n("Modified:"), fileItem.timeString()); addInfoLine(i18n("Modified:"), fileItem.timeString());

@ -29,7 +29,7 @@
#include <ksortablevaluelist.h> #include <ksortablevaluelist.h>
#include <kmimetype.h> #include <kmimetype.h>
namespace KIO { namespace TDEIO {
class Job; class Job;
}; };

@ -27,7 +27,7 @@ leftSidebarSettings::leftSidebarSettings() :
m_visible(true), m_visible(true),
m_width(0) m_width(0)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("leftSidebar"); config->setGroup("leftSidebar");
m_visible = config->readBoolEntry("Visible", true); m_visible = config->readBoolEntry("Visible", true);
@ -51,7 +51,7 @@ void leftSidebarSettings::setWidth(int width)
void leftSidebarSettings::save() void leftSidebarSettings::save()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("leftSidebar"); config->setGroup("leftSidebar");
config->writeEntry("Visible", m_visible); config->writeEntry("Visible", m_visible);
@ -63,7 +63,7 @@ rightSidebarSettings::rightSidebarSettings() :
m_visible(true), m_visible(true),
m_width(0) m_width(0)
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("rightSidebar"); config->setGroup("rightSidebar");
m_visible = config->readBoolEntry("Visible", true); m_visible = config->readBoolEntry("Visible", true);
@ -87,7 +87,7 @@ void rightSidebarSettings::setWidth(int width)
void rightSidebarSettings::save() void rightSidebarSettings::save()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("rightSidebar"); config->setGroup("rightSidebar");
config->writeEntry("Visible", m_visible); config->writeEntry("Visible", m_visible);

@ -90,7 +90,7 @@ void StatusBarSpaceInfo::paintEvent(TQPaintEvent* /* event */)
painter.drawRect(TQRect(left, barTop + 2, right, barHeight - 2)); painter.drawRect(TQRect(left, barTop + 2, right, barHeight - 2));
text = i18n("%1 free") text = i18n("%1 free")
.arg(KIO::convertSizeFromKB(m_kBAvailable)); .arg(TDEIO::convertSizeFromKB(m_kBAvailable));
} }
else { else {
if (m_gettingSize) { if (m_gettingSize) {
@ -147,7 +147,7 @@ void StatusBarSpaceInfo::refresh()
m_kBSize = 0; m_kBSize = 0;
m_kBAvailable = 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)); KDiskFreeSp* job = new KDiskFreeSp(TQT_TQOBJECT(this));
connect(job, TQT_SIGNAL(foundMountPoint(const unsigned long&, connect(job, TQT_SIGNAL(foundMountPoint(const unsigned long&,

@ -149,7 +149,7 @@ void UndoManager::undo()
const KURL::List::Iterator end = sourceURLs.end(); const KURL::List::Iterator end = sourceURLs.end();
const TQString destURL(command.destination().prettyURL(+1)); const TQString destURL(command.destination().prettyURL(+1));
KIO::Job* job = 0; TDEIO::Job* job = 0;
switch (command.type()) { switch (command.type()) {
case DolphinCommand::Link: case DolphinCommand::Link:
case DolphinCommand::Copy: { case DolphinCommand::Copy: {
@ -159,7 +159,7 @@ void UndoManager::undo()
list.append(deleteURL); list.append(deleteURL);
++it; ++it;
} }
job = KIO::del(list, false, false); job = TDEIO::del(list, false, false);
break; break;
} }
@ -171,23 +171,23 @@ void UndoManager::undo()
list.append(newSourceURL); list.append(newSourceURL);
++it; ++it;
} }
job = KIO::move(list, newDestURL, false); job = TDEIO::move(list, newDestURL, false);
break; break;
} }
case DolphinCommand::Rename: { case DolphinCommand::Rename: {
assert(sourceURLs.count() == 1); assert(sourceURLs.count() == 1);
KIO::NetAccess::move(command.destination(), (*it)); TDEIO::NetAccess::move(command.destination(), (*it));
break; break;
} }
case DolphinCommand::Trash: { case DolphinCommand::Trash: {
while (it != end) { 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. // also Dolphin::slotJobResult() for further details.
const TQString originalFileName((*it).filename().section('-', 1)); const TQString originalFileName((*it).filename().section('-', 1));
KURL newDestURL(destURL + originalFileName); KURL newDestURL(destURL + originalFileName);
KIO::NetAccess::move(*it, newDestURL); TDEIO::NetAccess::move(*it, newDestURL);
++it; ++it;
m_progressIndicator->execOperation(); m_progressIndicator->execOperation();
@ -197,7 +197,7 @@ void UndoManager::undo()
case DolphinCommand::CreateFolder: case DolphinCommand::CreateFolder:
case DolphinCommand::CreateFile: { case DolphinCommand::CreateFile: {
KIO::NetAccess::del(command.destination(), &Dolphin::mainWin()); TDEIO::NetAccess::del(command.destination(), &Dolphin::mainWin());
break; break;
} }
} }
@ -205,9 +205,9 @@ void UndoManager::undo()
if (job != 0) { if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress // Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar. // information to the Dolphin statusbar.
connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)),
this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); this, TQT_SLOT(slotPercent(TDEIO::Job*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &Dolphin::mainWin()); TDEIO::NetAccess::synchronousRun(job, &Dolphin::mainWin());
} }
m_progressIndicator->execOperation(); m_progressIndicator->execOperation();
@ -256,33 +256,33 @@ void UndoManager::redo()
KURL::List::Iterator it = sourceURLs.begin(); KURL::List::Iterator it = sourceURLs.begin();
const KURL::List::Iterator end = sourceURLs.end(); const KURL::List::Iterator end = sourceURLs.end();
KIO::Job* job = 0; TDEIO::Job* job = 0;
switch (command.type()) { switch (command.type()) {
case DolphinCommand::Link: { case DolphinCommand::Link: {
job = KIO::link(sourceURLs, command.destination(), false); job = TDEIO::link(sourceURLs, command.destination(), false);
break; break;
} }
case DolphinCommand::Copy: { case DolphinCommand::Copy: {
job = KIO::copy(sourceURLs, command.destination(), false); job = TDEIO::copy(sourceURLs, command.destination(), false);
break; break;
} }
case DolphinCommand::Rename: case DolphinCommand::Rename:
case DolphinCommand::Move: { case DolphinCommand::Move: {
job = KIO::move(sourceURLs, command.destination(), false); job = TDEIO::move(sourceURLs, command.destination(), false);
break; break;
} }
case DolphinCommand::Trash: { case DolphinCommand::Trash: {
const TQString destURL(command.destination().prettyURL()); const TQString destURL(command.destination().prettyURL());
while (it != end) { 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. // also Dolphin::slotJobResult() for further details.
const TQString originalFileName((*it).filename().section('-', 1)); const TQString originalFileName((*it).filename().section('-', 1));
KURL originalSourceURL(destURL + "/" + originalFileName); KURL originalSourceURL(destURL + "/" + originalFileName);
KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL); TDEIO::Job* moveToTrashJob = TDEIO::trash(originalSourceURL);
KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); TDEIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin);
++it; ++it;
m_progressIndicator->execOperation(); m_progressIndicator->execOperation();
@ -291,7 +291,7 @@ void UndoManager::redo()
} }
case DolphinCommand::CreateFolder: { case DolphinCommand::CreateFolder: {
KIO::NetAccess::mkdir(command.destination(), &dolphin); TDEIO::NetAccess::mkdir(command.destination(), &dolphin);
break; break;
} }
@ -299,7 +299,7 @@ void UndoManager::redo()
m_progressIndicator->execOperation(); m_progressIndicator->execOperation();
KURL::List::Iterator it = sourceURLs.begin(); KURL::List::Iterator it = sourceURLs.begin();
assert(sourceURLs.count() == 1); 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); copyJob->setDefaultPermissions(true);
job = copyJob; job = copyJob;
break; break;
@ -309,9 +309,9 @@ void UndoManager::redo()
if (job != 0) { if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress // Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar. // information to the Dolphin statusbar.
connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), connect(job, TQT_SIGNAL(percent(TDEIO::Job*, unsigned long)),
this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); this, TQT_SLOT(slotPercent(TDEIO::Job*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &dolphin); TDEIO::NetAccess::synchronousRun(job, &dolphin);
} }
++m_historyIndex; ++m_historyIndex;
@ -354,7 +354,7 @@ TQString UndoManager::commandText(const DolphinCommand& command) const
return text; 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 // It is not allowed to update the progress indicator in the context
// of this slot, hence do an asynchronous triggering. // of this slot, hence do an asynchronous triggering.

@ -166,7 +166,7 @@ private slots:
* Delegates the updating of the progress information * Delegates the updating of the progress information
* to UndoManager::updateProgress(). * 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 * Updates the progress information of the statusbar

@ -260,35 +260,35 @@ void URLNavigatorButton::startListJob()
} }
KURL url = urlNavigator()->url(m_index); 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 m_subdirs.clear(); // just to be ++safe
connect(m_listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)), connect(m_listJob, TQT_SIGNAL(entries(TDEIO::Job*, const TDEIO::UDSEntryList &)),
this, TQT_SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&))); this, TQT_SLOT(entriesList(TDEIO::Job*, const TDEIO::UDSEntryList&)));
connect(m_listJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(listJobFinished(KIO::Job*))); 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) { if (job != m_listJob) {
return; return;
} }
KIO::UDSEntryList::const_iterator it = entries.constBegin(); TDEIO::UDSEntryList::const_iterator it = entries.constBegin();
KIO::UDSEntryList::const_iterator itEnd = entries.constEnd(); TDEIO::UDSEntryList::const_iterator itEnd = entries.constEnd();
while (it != itEnd) { while (it != itEnd) {
TQString name; TQString name;
bool isDir = false; bool isDir = false;
KIO::UDSEntry entry = *it; TDEIO::UDSEntry entry = *it;
KIO::UDSEntry::const_iterator atomIt = entry.constBegin(); TDEIO::UDSEntry::const_iterator atomIt = entry.constBegin();
KIO::UDSEntry::const_iterator atomEndIt = entry.constEnd(); TDEIO::UDSEntry::const_iterator atomEndIt = entry.constEnd();
while (atomIt != atomEndIt) { while (atomIt != atomEndIt) {
switch ((*atomIt).m_uds) { switch ((*atomIt).m_uds) {
case KIO::UDS_NAME: case TDEIO::UDS_NAME:
name = (*atomIt).m_str; name = (*atomIt).m_str;
break; break;
case KIO::UDS_FILE_TYPE: case TDEIO::UDS_FILE_TYPE:
isDir = S_ISDIR((*atomIt).m_long); isDir = S_ISDIR((*atomIt).m_long);
break; break;
default: default:
@ -307,7 +307,7 @@ void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
m_subdirs.sort(); m_subdirs.sort();
} }
void URLNavigatorButton::listJobFinished(KIO::Job* job) void URLNavigatorButton::listJobFinished(TDEIO::Job* job)
{ {
if (job != m_listJob) { if (job != m_listJob) {
return; return;

@ -30,7 +30,7 @@ class KURL;
class URLNavigator; class URLNavigator;
class TQPainter; class TQPainter;
namespace KIO namespace TDEIO
{ {
class Job; class Job;
} }
@ -71,8 +71,8 @@ private slots:
void startPopupDelay(); void startPopupDelay();
void stopPopupDelay(); void stopPopupDelay();
void startListJob(); void startListJob();
void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries); void entriesList(TDEIO::Job* job, const TDEIO::UDSEntryList& entries);
void listJobFinished(KIO::Job* job); void listJobFinished(TDEIO::Job* job);
private: private:
int arrowWidth() const; int arrowWidth() const;
@ -81,7 +81,7 @@ private:
int m_index; int m_index;
TQTimer* m_popupDelay; TQTimer* m_popupDelay;
KIO::Job* m_listJob; TDEIO::Job* m_listJob;
TQStringList m_subdirs; TQStringList m_subdirs;
TQPoint dragPos; TQPoint dragPos;
}; };

Loading…
Cancel
Save