mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
Use the new KJob signals
svn path=/trunk/KDE/kdebase/konqueror/; revision=533362
This commit is contained in:
parent
d96f536492
commit
c8bf8fa9a1
|
@ -582,7 +582,7 @@ bool clientApp::doIt()
|
|||
KIO::Job * job = KIO::move( srcLst, args->url(argc - 1) );
|
||||
if ( !s_interactive )
|
||||
job->setInteractive( false );
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ), &app, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( job, SIGNAL( result( KJob * ) ), &app, SLOT( slotResult( KJob * ) ) );
|
||||
app.exec();
|
||||
return m_ok;
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ bool clientApp::doIt()
|
|||
KIO::Job * job = KIO::copy( srcLst, dsturl );
|
||||
if ( !s_interactive )
|
||||
job->setInteractive( false );
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ), &app, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( job, SIGNAL( result( KJob * ) ), &app, SLOT( slotResult( KJob * ) ) );
|
||||
app.exec();
|
||||
return m_ok;
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ bool clientApp::doIt()
|
|||
KIO::Job * job = KIO::copy( srcLst, args->url(argc - 1) );
|
||||
if ( !s_interactive )
|
||||
job->setInteractive( false );
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ), &app, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( job, SIGNAL( result( KJob * ) ), &app, SLOT( slotResult( KJob * ) ) );
|
||||
app.exec();
|
||||
return m_ok;
|
||||
}
|
||||
|
@ -666,10 +666,10 @@ bool clientApp::doIt()
|
|||
return true;
|
||||
}
|
||||
|
||||
void clientApp::slotResult( KIO::Job * job )
|
||||
void clientApp::slotResult( KJob * job )
|
||||
{
|
||||
if (job->error() && s_interactive)
|
||||
job->showErrorDialog();
|
||||
static_cast<KIO::Job*>(job)->showErrorDialog();
|
||||
m_ok = !job->error();
|
||||
quit();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
static bool openProfile(const QString & profile, const QString & url, const QString & mimetype = QString());
|
||||
|
||||
protected Q_SLOTS:
|
||||
void slotResult( KIO::Job * );
|
||||
void slotResult( KJob * );
|
||||
void delayedQuit();
|
||||
void slotDialogCanceled();
|
||||
|
||||
|
|
|
@ -151,8 +151,8 @@ void KonqRun::init()
|
|||
// (in case it goes to scanFile, this will be done below)
|
||||
KIO::StatJob *job = dynamic_cast<KIO::StatJob*>( m_job );
|
||||
if ( job && !job->error() && m_pView ) {
|
||||
connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
|
||||
m_pView, SLOT( slotInfoMessage(KIO::Job*, const QString& ) ) );
|
||||
connect( job, SIGNAL( infoMessage( KJob*, const QString& ) ),
|
||||
m_pView, SLOT( slotInfoMessage(KJob*, const QString& ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,8 @@ void KonqRun::scanFile()
|
|||
connect( job, SIGNAL( redirection( KIO::Job *, const KUrl& )),
|
||||
SLOT( slotRedirection( KIO::Job *, const KUrl& ) ));
|
||||
if ( m_pView && m_pView->service()->desktopEntryName() != "konq_sidebartng") {
|
||||
connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
|
||||
m_pView, SLOT( slotInfoMessage(KIO::Job*, const QString& ) ) );
|
||||
connect( job, SIGNAL( infoMessage( KJob*, const QString& ) ),
|
||||
m_pView, SLOT( slotInfoMessage(KJob*, const QString& ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -533,9 +533,9 @@ void KonqView::slotStarted( KIO::Job * job )
|
|||
kDebug(7035) << "slotStarted: Window ID = " << m_pMainWindow->topLevelWidget()->winId() << endl;
|
||||
job->setWindow (m_pMainWindow->topLevelWidget ());
|
||||
|
||||
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 ) ) );
|
||||
connect( job, SIGNAL( speed( KIO::Job *, unsigned long ) ), this, SLOT( slotSpeed( KIO::Job *, unsigned long ) ) );
|
||||
connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ), this, SLOT( slotInfoMessage( KIO::Job *, const QString & ) ) );
|
||||
connect( job, SIGNAL( infoMessage( KJob *, const QString & ) ), this, SLOT( slotInfoMessage( KJob *, const QString & ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -555,7 +555,7 @@ void KonqView::setLoading( bool loading, bool hasPending /*= false*/)
|
|||
m_pMainWindow->viewManager()->setLoading( this, loading || hasPending );
|
||||
}
|
||||
|
||||
void KonqView::slotPercent( KIO::Job *, unsigned long percent )
|
||||
void KonqView::slotPercent( KJob *, unsigned long percent )
|
||||
{
|
||||
m_pKonqFrame->statusbar()->slotLoadingProgress( percent );
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ void KonqView::slotSpeed( KIO::Job *, unsigned long bytesPerSecond )
|
|||
m_pKonqFrame->statusbar()->slotSpeedProgress( bytesPerSecond );
|
||||
}
|
||||
|
||||
void KonqView::slotInfoMessage( KIO::Job *, const QString &msg )
|
||||
void KonqView::slotInfoMessage( KJob *, const QString &msg )
|
||||
{
|
||||
m_pKonqFrame->statusbar()->message( msg );
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@ public Q_SLOTS:
|
|||
|
||||
// connected to the KROP's KIO::Job
|
||||
// but also to KonqRun's job
|
||||
void slotInfoMessage( KIO::Job *, const QString &msg );
|
||||
void slotInfoMessage( KJob *, const QString &msg );
|
||||
|
||||
protected Q_SLOTS:
|
||||
// connected to the KROP's KIO::Job
|
||||
|
@ -374,7 +374,7 @@ protected Q_SLOTS:
|
|||
void slotCompleted();
|
||||
void slotCompleted( bool );
|
||||
void slotCanceled( const QString & errMsg );
|
||||
void slotPercent( KIO::Job *, unsigned long percent );
|
||||
void slotPercent( KJob *, unsigned long percent );
|
||||
void slotSpeed( KIO::Job *, unsigned long bytesPerSecond );
|
||||
|
||||
/**
|
||||
|
|
|
@ -244,7 +244,7 @@ void KonqInfoListViewWidget::slotNewItems( const KFileItemList& entries )
|
|||
m_metaInfoJob = KIO::fileMetaInfo( entries );
|
||||
connect( m_metaInfoJob, SIGNAL( gotMetaInfo( const KFileItem*)),
|
||||
this, SLOT( slotMetaInfo( const KFileItem*)));
|
||||
connect( m_metaInfoJob, SIGNAL( result( KIO::Job*)),
|
||||
connect( m_metaInfoJob, SIGNAL( result( KJob*)),
|
||||
this, SLOT( slotMetaInfoResult()));
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ void KonqInfoListViewWidget::slotRefreshItems( const KFileItemList& entries )
|
|||
m_metaInfoJob = KIO::fileMetaInfo( entries );
|
||||
connect( m_metaInfoJob, SIGNAL( gotMetaInfo( const KFileItem*)),
|
||||
this, SLOT( slotMetaInfo( const KFileItem*)));
|
||||
connect( m_metaInfoJob, SIGNAL( result( KIO::Job*)),
|
||||
connect( m_metaInfoJob, SIGNAL( result( KJob*)),
|
||||
this, SLOT( slotMetaInfoResult()));
|
||||
}
|
||||
KonqBaseListViewWidget::slotRefreshItems( entries );
|
||||
|
@ -322,7 +322,7 @@ void KonqInfoListViewWidget::slotMetaInfoResult()
|
|||
m_metaInfoJob = KIO::fileMetaInfo(m_metaInfoTodo);
|
||||
connect( m_metaInfoJob, SIGNAL( gotMetaInfo( const KFileItem*)),
|
||||
this, SLOT( slotMetaInfo( const KFileItem*)));
|
||||
connect( m_metaInfoJob, SIGNAL( result( KIO::Job*)),
|
||||
connect( m_metaInfoJob, SIGNAL( result( KJob*)),
|
||||
this, SLOT( slotMetaInfoResult()));
|
||||
m_metaInfoTodo.clear();
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ bool DesktopPathConfig::moveDir( const KUrl & src, const KUrl & dest, const QStr
|
|||
else
|
||||
{
|
||||
KIO::Job * job = KIO::move( src, dest );
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( job, SIGNAL( result( KJob * ) ), this, SLOT( slotResult( KJob * ) ) );
|
||||
// wait for job
|
||||
qApp->enter_loop();
|
||||
}
|
||||
|
@ -316,13 +316,13 @@ void DesktopPathConfig::slotEntries( KIO::Job * job, const KIO::UDSEntryList& li
|
|||
}
|
||||
|
||||
KIO::Job * moveJob = KIO::move( file.url(), m_copyToDest );
|
||||
connect( moveJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( moveJob, SIGNAL( result( KJob * ) ), this, SLOT( slotResult( KJob * ) ) );
|
||||
qApp->enter_loop();
|
||||
}
|
||||
qApp->exit_loop();
|
||||
}
|
||||
|
||||
void DesktopPathConfig::slotResult( KIO::Job * job )
|
||||
void DesktopPathConfig::slotResult( KJob * job )
|
||||
{
|
||||
if (job->error())
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ void DesktopPathConfig::slotResult( KIO::Job * job )
|
|||
// If the source doesn't exist, no wonder we couldn't move the dir.
|
||||
// In that case, trust the user and set the new setting in any case.
|
||||
|
||||
job->showErrorDialog(this);
|
||||
static_cast<KIO::Job*>(job)->showErrorDialog(this);
|
||||
}
|
||||
qApp->exit_loop();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ class QPushButton;
|
|||
|
||||
class KConfig;
|
||||
class K3ListView;
|
||||
class KJob;
|
||||
class KUrlRequester;
|
||||
|
||||
namespace KIO { class Job; }
|
||||
|
@ -57,7 +58,7 @@ private:
|
|||
KUrl m_copyFromSrc;
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotResult( KIO::Job * job );
|
||||
void slotResult( KJob * job );
|
||||
};
|
||||
|
||||
#endif // __ROOT_OPTIONS_H
|
||||
|
|
|
@ -271,7 +271,7 @@ void KonqFileTip::startDelayed()
|
|||
m_previewJob = KIO::filePreview( oneItem, 256, 256, 64, 70, true, true, 0);
|
||||
connect( m_previewJob, SIGNAL( gotPreview( const KFileItem *, const QPixmap & ) ),
|
||||
this, SLOT( gotPreview( const KFileItem *, const QPixmap & ) ) );
|
||||
connect( m_previewJob, SIGNAL( result( KIO::Job * ) ),
|
||||
connect( m_previewJob, SIGNAL( result( KJob * ) ),
|
||||
this, SLOT( gotPreviewResult() ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -94,8 +94,8 @@ KonqCommandRecorder::KonqCommandRecorder( KonqCommand::Type op, const KUrl::List
|
|||
d->m_cmd.m_valid = true;
|
||||
d->m_cmd.m_src = src;
|
||||
d->m_cmd.m_dst = dst;
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( job, SIGNAL( result( KJob * ) ),
|
||||
this, SLOT( slotResult( KJob * ) ) );
|
||||
|
||||
if ( op != KonqCommand::MKDIR ) {
|
||||
connect( job, SIGNAL( copyingDone( KIO::Job *, const KUrl &, const KUrl &, bool, bool ) ),
|
||||
|
@ -113,7 +113,7 @@ KonqCommandRecorder::~KonqCommandRecorder()
|
|||
delete d;
|
||||
}
|
||||
|
||||
void KonqCommandRecorder::slotResult( KIO::Job *job )
|
||||
void KonqCommandRecorder::slotResult( KJob *job )
|
||||
{
|
||||
if ( job->error() )
|
||||
return;
|
||||
|
@ -352,12 +352,12 @@ void KonqUndoManager::stopUndo( bool step )
|
|||
undoStep();
|
||||
}
|
||||
|
||||
void KonqUndoManager::slotResult( KIO::Job *job )
|
||||
void KonqUndoManager::slotResult( KJob *job )
|
||||
{
|
||||
d->m_uiserver->jobFinished( d->m_uiserverJobId );
|
||||
if ( job->error() )
|
||||
{
|
||||
job->showErrorDialog( 0L );
|
||||
static_cast<KIO::Job*>(job)->showErrorDialog( 0L );
|
||||
d->m_currentJob = 0;
|
||||
stopUndo( false );
|
||||
if ( d->m_undoJob )
|
||||
|
@ -394,8 +394,8 @@ void KonqUndoManager::undoStep()
|
|||
undoRemovingDirectories();
|
||||
|
||||
if ( d->m_currentJob )
|
||||
connect( d->m_currentJob, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
connect( d->m_currentJob, SIGNAL( result( KJob * ) ),
|
||||
this, SLOT( slotResult( KJob * ) ) );
|
||||
}
|
||||
|
||||
void KonqUndoManager::undoMakingDirectories()
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace KIO
|
|||
}
|
||||
|
||||
class KonqUndoJob;
|
||||
class KJob;
|
||||
|
||||
struct KonqBasicOperation
|
||||
{
|
||||
|
@ -76,7 +77,7 @@ public:
|
|||
virtual ~KonqCommandRecorder();
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotResult( KIO::Job *job );
|
||||
void slotResult( KJob *job );
|
||||
|
||||
void slotCopyingDone( KIO::Job *, const KUrl &from, const KUrl &to, bool directory, bool renamed );
|
||||
void slotCopyingLinkDone( KIO::Job *, const KUrl &from, const QString &target, const KUrl &to );
|
||||
|
@ -129,7 +130,7 @@ k_dcop:
|
|||
virtual KonqCommand::Stack get() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotResult( KIO::Job *job );
|
||||
void slotResult( KJob *job );
|
||||
|
||||
private:
|
||||
void undoStep();
|
||||
|
|
Loading…
Reference in a new issue