summaryrefslogtreecommitdiffstats
path: root/src/dolphin.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:05:59 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:05:59 -0600
commite32adbca5bcb755fbed588660b6b690089210aa6 (patch)
treece5e108577236bc2d1a21d8773b8acf5bbfb0fa2 /src/dolphin.cpp
parent6d3902bd20c24613b2f13f5c04294ff83f104006 (diff)
downloaddolphin-e32adbca5bcb755fbed588660b6b690089210aa6.tar.gz
dolphin-e32adbca5bcb755fbed588660b6b690089210aa6.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'src/dolphin.cpp')
-rw-r--r--src/dolphin.cpp58
1 files changed, 29 insertions, 29 deletions
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();