mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +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:
parent
92d346ae78
commit
c1af91aab1
|
@ -555,10 +555,10 @@ void Dolphin::deleteItems()
|
||||||
) == KMessageBox::Continue;
|
) == KMessageBox::Continue;
|
||||||
if (del) {
|
if (del) {
|
||||||
KIO::Job* job = KIO::del(list);
|
KIO::Job* job = KIO::del(list);
|
||||||
connect(job, SIGNAL(result(KIO::Job*)),
|
connect(job, SIGNAL(result(KJob*)),
|
||||||
this, SLOT(slotHandleJobError(KIO::Job*)));
|
this, SLOT(slotHandleJobError(KJob*)));
|
||||||
connect(job, SIGNAL(result(KIO::Job*)),
|
connect(job, SIGNAL(result(KJob*)),
|
||||||
this, SLOT(slotDeleteFileFinished(KIO::Job*)));
|
this, SLOT(slotDeleteFileFinished(KJob*)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ void Dolphin::quit()
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dolphin::slotHandleJobError(KIO::Job* job)
|
void Dolphin::slotHandleJobError(KJob* job)
|
||||||
{
|
{
|
||||||
if (job->error() != 0) {
|
if (job->error() != 0) {
|
||||||
m_activeView->statusBar()->setMessage(job->errorString(),
|
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) {
|
if (job->error() == 0) {
|
||||||
m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
|
m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
|
||||||
|
@ -1000,7 +1000,7 @@ void Dolphin::editSettings()
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dolphin::addUndoOperation(KIO::Job* job)
|
void Dolphin::addUndoOperation(KJob* job)
|
||||||
{
|
{
|
||||||
if (job->error() != 0) {
|
if (job->error() != 0) {
|
||||||
slotHandleJobError(job);
|
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
|
// 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,
|
// 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".
|
// 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 newSourceUrls;
|
||||||
|
|
||||||
KUrl::List sourceUrls = command.source();
|
KUrl::List sourceUrls = command.source();
|
||||||
|
@ -1613,8 +1618,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job,
|
||||||
const KUrl::List& source,
|
const KUrl::List& source,
|
||||||
const KUrl& dest)
|
const KUrl& dest)
|
||||||
{
|
{
|
||||||
connect(job, SIGNAL(result(KIO::Job*)),
|
connect(job, SIGNAL(result(KJob*)),
|
||||||
this, SLOT(addUndoOperation(KIO::Job*)));
|
this, SLOT(addUndoOperation(KJob*)));
|
||||||
|
|
||||||
UndoInfo undoInfo;
|
UndoInfo undoInfo;
|
||||||
undoInfo.id = job->progressId();
|
undoInfo.id = job->progressId();
|
||||||
|
|
|
@ -215,13 +215,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(KJob* 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(KJob* job);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the state of the 'Undo' menu action dependent
|
* Updates the state of the 'Undo' menu action dependent
|
||||||
|
@ -366,7 +366,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(KJob* job);
|
||||||
|
|
||||||
|
|
||||||
void toggleSidebar();
|
void toggleSidebar();
|
||||||
|
|
|
@ -313,8 +313,8 @@ 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, SIGNAL(percent(KIO::Job*, unsigned long)),
|
connect(job, SIGNAL(percent(KJob*, unsigned long)),
|
||||||
this, SLOT(slotPercent(KIO::Job*, unsigned long)));
|
this, SLOT(slotPercent(KJob*, unsigned long)));
|
||||||
KIO::NetAccess::synchronousRun(job, &dolphin);
|
KIO::NetAccess::synchronousRun(job, &dolphin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ QString UndoManager::commandText(const DolphinCommand& command) const
|
||||||
return text;
|
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
|
// 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.
|
||||||
|
|
|
@ -165,7 +165,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(KJob* job, unsigned long percent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the progress information of the statusbar
|
* Updates the progress information of the statusbar
|
||||||
|
|
|
@ -282,7 +282,7 @@ void UrlNavigatorButton::startListJob()
|
||||||
|
|
||||||
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
|
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
|
||||||
this, SLOT(entriesList(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)
|
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();
|
m_subdirs.sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UrlNavigatorButton::listJobFinished(KIO::Job* job)
|
void UrlNavigatorButton::listJobFinished(KJob* job)
|
||||||
{
|
{
|
||||||
if (job != m_listJob) {
|
if (job != m_listJob) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -75,7 +75,7 @@ private slots:
|
||||||
void stopPopupDelay();
|
void stopPopupDelay();
|
||||||
void startListJob();
|
void startListJob();
|
||||||
void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
|
void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
|
||||||
void listJobFinished(KIO::Job* job);
|
void listJobFinished(KJob* job);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int arrowWidth() const;
|
int arrowWidth() const;
|
||||||
|
|
Loading…
Reference in a new issue