diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 62fa3477d..68233b492 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -42,7 +42,7 @@ BOOST_PYTHON_MODULE( libcalamares ) bp::scope().attr( "version" ) = CALAMARES_VERSION; bp::scope().attr( "shortVersion" ) = CALAMARES_VERSION_SHORT; - bp::class_< CalamaresPython::PythonJobInterface >( "job", bp::init< const Calamares::PythonJob* >() ) + bp::class_< CalamaresPython::PythonJobInterface >( "job", bp::init< Calamares::PythonJob* >() ) .def_readonly( "prettyName", &CalamaresPython::PythonJobInterface::prettyName ) .def_readonly( "workingPath", &CalamaresPython::PythonJobInterface::workingPath ) .def_readonly( "configuration", &CalamaresPython::PythonJobInterface::configuration ) @@ -150,9 +150,9 @@ PythonJob::exec() void -PythonJob::emitProgress( double progressValue ) const +PythonJob::emitProgress( qreal progressValue ) { - //emit progress( progressValue ); + emit progress( progressValue ); } diff --git a/src/libcalamares/PythonJob.h b/src/libcalamares/PythonJob.h index 11a572b45..7e056a970 100644 --- a/src/libcalamares/PythonJob.h +++ b/src/libcalamares/PythonJob.h @@ -47,7 +47,7 @@ public: private: friend class CalamaresPython::Helper; friend class CalamaresPython::PythonJobInterface; - void emitProgress( double progressValue ) const; + void emitProgress( double progressValue ); CalamaresPython::Helper* helper(); QString m_scriptFile; diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index 0d88a66c0..179f8146b 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -23,7 +23,7 @@ namespace CalamaresPython { -PythonJobInterface::PythonJobInterface( const Calamares::PythonJob* parent ) +PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent ) : m_parent( parent ) { prettyName = m_parent->prettyName().toStdString(); @@ -33,7 +33,7 @@ PythonJobInterface::PythonJobInterface( const Calamares::PythonJob* parent ) void -PythonJobInterface::setprogress( double progress ) +PythonJobInterface::setprogress( qreal progress ) { if ( progress >= 0 && progress <= 1 ) m_parent->emitProgress( progress ); diff --git a/src/libcalamares/PythonJobApi.h b/src/libcalamares/PythonJobApi.h index 916f475a6..ff42c04d4 100644 --- a/src/libcalamares/PythonJobApi.h +++ b/src/libcalamares/PythonJobApi.h @@ -32,17 +32,17 @@ namespace CalamaresPython class PythonJobInterface { public: - explicit PythonJobInterface( const Calamares::PythonJob* parent ); + explicit PythonJobInterface( Calamares::PythonJob* parent ); std::string prettyName; std::string workingPath; boost::python::dict configuration; - void setprogress( double progress ); + void setprogress( qreal progress ); private: - const Calamares::PythonJob* m_parent; + Calamares::PythonJob* m_parent; }; }