64 |
64 |
65 /* |
65 /* |
66 * Constructs one operation Service with \a parent. |
66 * Constructs one operation Service with \a parent. |
67 */ |
67 */ |
68 FmOperationService::FmOperationService( QObject *parent ) : QObject( parent ), |
68 FmOperationService::FmOperationService( QObject *parent ) : QObject( parent ), |
69 mCurrentOperation( 0 ), mBackupRestoreHandler( 0 ) |
69 mBackupRestoreHandler( 0 ), mCurrentOperation( 0 ) |
70 { |
70 { |
71 mThread = new FmOperationThread( this ); |
71 mThread = new FmOperationThread( this ); |
72 mThread->setObjectName( "operationThread" ); |
72 mThread->setObjectName( "operationThread" ); |
73 mOperationResultProcesser = new FmOperationResultProcesser( this ); |
73 mOperationResultProcesser = new FmOperationResultProcesser( this ); |
74 |
74 |
351 * Connects \a operation's sinals to slots |
351 * Connects \a operation's sinals to slots |
352 */ |
352 */ |
353 void FmOperationService::connectSignalsAndSlots( FmOperationBase *operation ) |
353 void FmOperationService::connectSignalsAndSlots( FmOperationBase *operation ) |
354 { |
354 { |
355 |
355 |
356 connect( operation, SIGNAL( showNote( QString ) ), |
356 connect( operation, SIGNAL( showNote( QString ) ), // blocking because need wait for show note |
357 this, SLOT( on_operation_showNote( QString )), Qt::BlockingQueuedConnection ); |
357 this, SLOT( on_operation_showNote( QString )), Qt::BlockingQueuedConnection ); |
|
358 connect( operation, SIGNAL( notifyPreparing( bool ) ), // blocking to show waiting note immediately |
|
359 this, SLOT( on_operation_notifyPreparing( bool )), Qt::BlockingQueuedConnection ); |
|
360 connect( operation, SIGNAL( notifyProgress( int ) ), // blocking to make progress more accurate |
|
361 this, SLOT( on_operation_notifyProgress( int ) ), Qt::BlockingQueuedConnection ); |
|
362 connect( operation, SIGNAL( notifyStart( bool, int ) ), // blocking to show waiting note immediately |
|
363 this, SLOT( on_operation_notifyStart( bool, int ) ), Qt::BlockingQueuedConnection ); |
|
364 connect( operation, SIGNAL( notifyWaiting( bool ) ), // blocking to show waiting note immediately |
|
365 this, SLOT( on_operation_notifyWaiting( bool )), Qt::BlockingQueuedConnection ); |
|
366 connect( operation, SIGNAL( notifyFinish() ), |
|
367 this, SLOT( on_operation_notifyFinish()) ); |
358 connect( operation, SIGNAL( notifyError( int, QString ) ), |
368 connect( operation, SIGNAL( notifyError( int, QString ) ), |
359 this, SLOT( on_operation_notifyError( int, QString ) ) ); |
369 this, SLOT( on_operation_notifyError( int, QString ) ) ); |
360 connect( operation, SIGNAL( notifyStart( bool, int ) ), |
|
361 this, SLOT( on_operation_notifyStart( bool, int ) ) ); |
|
362 connect( operation, SIGNAL( notifyProgress( int ) ), |
|
363 this, SLOT( on_operation_notifyProgress( int ) ) ); |
|
364 connect( operation, SIGNAL( notifyFinish() ), |
|
365 this, SLOT( on_operation_notifyFinish()) ); |
|
366 connect( operation, SIGNAL( notifyWaiting( bool ) ), |
|
367 this, SLOT( on_operation_notifyWaiting( bool )) ); |
|
368 |
|
369 } |
370 } |
370 |
371 |
371 /* |
372 /* |
372 * Responds to mCurrentOperation's askForRename signal. |
373 * Responds to mCurrentOperation's askForRename signal. |
373 * \a srcFile the source file. |
374 * \a srcFile the source file. |