Return const reference from OperationDetail::get_progressbar()
The only use of the reference returned from OperationDetail::get_progressbar() is to call const methods ProgressBar::running(), ::get_fraction() and ::get_text(). Therefore make OperationDetail::get_progressbar() return a const reference.
This commit is contained in:
parent
3cbedad693
commit
f5ba53fb3e
|
@ -82,7 +82,7 @@ private:
|
|||
void add_child_implement( const OperationDetail & operationdetail );
|
||||
void on_update( const OperationDetail & operationdetail ) ;
|
||||
void cancel( bool force );
|
||||
ProgressBar & get_progressbar() const;
|
||||
const ProgressBar& get_progressbar() const;
|
||||
|
||||
Glib::ustring description ;
|
||||
OperationDetailStatus status ;
|
||||
|
|
|
@ -165,7 +165,7 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
|
|||
if ( operationdetail .get_status() == STATUS_EXECUTE )
|
||||
label_current_sub_text = operationdetail .get_description() ;
|
||||
|
||||
ProgressBar & progressbar_src = operationdetail.get_progressbar();
|
||||
const ProgressBar& progressbar_src = operationdetail.get_progressbar();
|
||||
if ( progressbar_src.running() )
|
||||
{
|
||||
if ( pulsetimer.connected() )
|
||||
|
|
|
@ -227,7 +227,7 @@ void OperationDetail::cancel( bool force )
|
|||
signal_cancel.emit( force );
|
||||
}
|
||||
|
||||
ProgressBar & OperationDetail::get_progressbar() const
|
||||
const ProgressBar& OperationDetail::get_progressbar() const
|
||||
{
|
||||
return single_progressbar;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue