1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-07 10:51:45 +00:00

Let's remove the connect errors because of the KJob/KIO::Job split.

svn path=/trunk/playground/utils/dolphin/; revision=607764
This commit is contained in:
Kevin Ottens 2006-11-25 17:30:07 +00:00
parent 92d346ae78
commit c1af91aab1
6 changed files with 25 additions and 20 deletions

View File

@ -555,10 +555,10 @@ void Dolphin::deleteItems()
) == KMessageBox::Continue;
if (del) {
KIO::Job* job = KIO::del(list);
connect(job, SIGNAL(result(KIO::Job*)),
this, SLOT(slotHandleJobError(KIO::Job*)));
connect(job, SIGNAL(result(KIO::Job*)),
this, SLOT(slotDeleteFileFinished(KIO::Job*)));
connect(job, SIGNAL(result(KJob*)),
this, SLOT(slotHandleJobError(KJob*)));
connect(job, SIGNAL(result(KJob*)),
this, SLOT(slotDeleteFileFinished(KJob*)));
}
}
@ -586,7 +586,7 @@ void Dolphin::quit()
close();
}
void Dolphin::slotHandleJobError(KIO::Job* job)
void Dolphin::slotHandleJobError(KJob* job)
{
if (job->error() != 0) {
m_activeView->statusBar()->setMessage(job->errorString(),
@ -594,7 +594,7 @@ void Dolphin::slotHandleJobError(KIO::Job* job)
}
}
void Dolphin::slotDeleteFileFinished(KIO::Job* job)
void Dolphin::slotDeleteFileFinished(KJob* job)
{
if (job->error() == 0) {
m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
@ -1000,7 +1000,7 @@ void Dolphin::editSettings()
dlg.exec();
}
void Dolphin::addUndoOperation(KIO::Job* job)
void Dolphin::addUndoOperation(KJob* job)
{
if (job->error() != 0) {
slotHandleJobError(job);
@ -1028,7 +1028,12 @@ void Dolphin::addUndoOperation(KIO::Job* job)
// all source Urls must be updated with the trash Url. E. g. when moving
// a file "test.txt" and a second file "test.txt" to the trash,
// then the filenames in the trash are "0-test.txt" and "1-test.txt".
QMap<QString, QString> metaData = job->metaData();
QMap<QString, QString> metaData;
KIO::Job *kiojob = qobject_cast<KIO::Job*>( job );
if ( kiojob )
{
metaData = kiojob->metaData();
}
KUrl::List newSourceUrls;
KUrl::List sourceUrls = command.source();
@ -1613,8 +1618,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job,
const KUrl::List& source,
const KUrl& dest)
{
connect(job, SIGNAL(result(KIO::Job*)),
this, SLOT(addUndoOperation(KIO::Job*)));
connect(job, SIGNAL(result(KJob*)),
this, SLOT(addUndoOperation(KJob*)));
UndoInfo undoInfo;
undoInfo.id = job->progressId();

View File

@ -215,13 +215,13 @@ private slots:
* Shows the error information of the job \a job
* in the status bar.
*/
void slotHandleJobError(KIO::Job* job);
void slotHandleJobError(KJob* 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(KJob* job);
/**
* Updates the state of the 'Undo' menu action dependent
@ -366,7 +366,7 @@ private slots:
* Adds the undo operation given by \a job
* to the UndoManager.
*/
void addUndoOperation(KIO::Job* job);
void addUndoOperation(KJob* job);
void toggleSidebar();

View File

@ -313,8 +313,8 @@ void UndoManager::redo()
if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar.
connect(job, SIGNAL(percent(KIO::Job*, unsigned long)),
this, SLOT(slotPercent(KIO::Job*, unsigned long)));
connect(job, SIGNAL(percent(KJob*, unsigned long)),
this, SLOT(slotPercent(KJob*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &dolphin);
}
@ -358,7 +358,7 @@ QString UndoManager::commandText(const DolphinCommand& command) const
return text;
}
void UndoManager::slotPercent(KIO::Job* /* job */, unsigned long /* percent */)
void UndoManager::slotPercent(KJob* /* job */, unsigned long /* percent */)
{
// It is not allowed to update the progress indicator in the context
// of this slot, hence do an asynchronous triggering.

View File

@ -165,7 +165,7 @@ private slots:
* Delegates the updating of the progress information
* to UndoManager::updateProgress().
*/
void slotPercent(KIO::Job* job, unsigned long percent);
void slotPercent(KJob* job, unsigned long percent);
/**
* Updates the progress information of the statusbar

View File

@ -282,7 +282,7 @@ void UrlNavigatorButton::startListJob()
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
this, SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&)));
connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*)));
connect(m_listJob, SIGNAL(result(KJob*)), this, SLOT(listJobFinished(KJob*)));
}
void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries)
@ -330,7 +330,7 @@ void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
m_subdirs.sort();
}
void UrlNavigatorButton::listJobFinished(KIO::Job* job)
void UrlNavigatorButton::listJobFinished(KJob* job)
{
if (job != m_listJob) {
return;

View File

@ -75,7 +75,7 @@ private slots:
void stopPopupDelay();
void startListJob();
void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
void listJobFinished(KIO::Job* job);
void listJobFinished(KJob* job);
private:
int arrowWidth() const;