PropagatorJob: Remove unneccessary pointer #5453

This commit is contained in:
Christian Kamm 2017-01-17 14:33:54 +01:00 committed by ckamm
parent 29b39acfbe
commit cd9e88ad22
2 changed files with 9 additions and 4 deletions

View file

@ -573,9 +573,16 @@ OwncloudPropagator::DiskSpaceResult OwncloudPropagator::diskSpaceCheck() const
// ================================================================================
PropagatorJob::PropagatorJob(OwncloudPropagator *propagator)
: QObject(propagator)
, _state(NotYetStarted)
{
}
OwncloudPropagator *PropagatorJob::propagator() const
{
return _propagator;
return qobject_cast<OwncloudPropagator*>(parent());
}
PropagatorJob::JobParallelism PropagateDirectory::parallelism()

View file

@ -56,11 +56,9 @@ class OwncloudPropagator;
*/
class PropagatorJob : public QObject {
Q_OBJECT
private:
OwncloudPropagator *_propagator;
public:
explicit PropagatorJob(OwncloudPropagator* propagator) : _propagator(propagator), _state(NotYetStarted) {}
explicit PropagatorJob(OwncloudPropagator* propagator);
enum JobState {
NotYetStarted,