From aa62ca639b071755789adce99677af5ca31947f8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 9 Mar 2020 10:32:41 -0500 Subject: [PATCH] [libcalamares] Start getting prettyDescription from Python --- src/libcalamares/PythonJob.cpp | 6 ++++++ src/libcalamares/PythonJob.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 11a963df0..dd0ea47c1 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -165,6 +165,11 @@ BOOST_PYTHON_MODULE( libcalamares ) namespace Calamares { +struct PythonJob::Private +{ + bp::object m_prettyStatusMessage; + bp::object m_prettyName; +}; PythonJob::PythonJob( const ModuleSystem::InstanceKey& instance, const QString& scriptFile, @@ -172,6 +177,7 @@ PythonJob::PythonJob( const ModuleSystem::InstanceKey& instance, const QVariantMap& moduleConfiguration, QObject* parent ) : Job( parent ) + , m_d( std::make_unique< Private >() ) , m_scriptFile( scriptFile ) , m_workingPath( workingPath ) , m_description() diff --git a/src/libcalamares/PythonJob.h b/src/libcalamares/PythonJob.h index ba2b0a75f..6f8c50a9f 100644 --- a/src/libcalamares/PythonJob.h +++ b/src/libcalamares/PythonJob.h @@ -53,10 +53,12 @@ public: virtual qreal getJobWeight() const override; private: - friend class CalamaresPython::Helper; + struct Private; + friend class CalamaresPython::PythonJobInterface; void emitProgress( double progressValue ); + std::unique_ptr< Private > m_d; QString m_scriptFile; QString m_workingPath; QString m_description;