Merge branch 'development' into 3.2.x-stable
This commit is contained in:
commit
d37abf561f
14
CHANGES
14
CHANGES
@ -3,6 +3,20 @@ contributors are listed. Note that Calamares does not have a historical
|
|||||||
changelog -- this log starts with version 3.2.0. The release notes on the
|
changelog -- this log starts with version 3.2.0. The release notes on the
|
||||||
website will have to do for older versions.
|
website will have to do for older versions.
|
||||||
|
|
||||||
|
# 3.2.21 (unreleased) #
|
||||||
|
|
||||||
|
This release contains contributions from (alphabetically by first name):
|
||||||
|
- No external contributors yet
|
||||||
|
|
||||||
|
## Core ##
|
||||||
|
- Python job modules (such as *unpackfs* or *packages*) can now provide
|
||||||
|
a `pretty_status_message()` function, like the existing `pretty_name()`
|
||||||
|
function, that is used to update the status during install. #1330
|
||||||
|
|
||||||
|
## Modules ##
|
||||||
|
- *packages* now reports more details in the installation progress-bar.
|
||||||
|
|
||||||
|
|
||||||
# 3.2.20 (2020-02-27) #
|
# 3.2.20 (2020-02-27) #
|
||||||
|
|
||||||
This release contains contributions from (alphabetically by first name):
|
This release contains contributions from (alphabetically by first name):
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
|
|
||||||
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
||||||
project( CALAMARES
|
project( CALAMARES
|
||||||
VERSION 3.2.20
|
VERSION 3.2.21
|
||||||
LANGUAGES C CXX )
|
LANGUAGES C CXX )
|
||||||
|
|
||||||
set( CALAMARES_VERSION_RC 0 ) # Set to 0 during release cycle, 1 during development
|
set( CALAMARES_VERSION_RC 1 ) # Set to 0 during release cycle, 1 during development
|
||||||
|
|
||||||
### OPTIONS
|
### OPTIONS
|
||||||
#
|
#
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
# You can pass in directory names, in which case the files
|
# You can pass in directory names, in which case the files
|
||||||
# in that directory (NOT below it) are processed.
|
# in that directory (NOT below it) are processed.
|
||||||
#
|
#
|
||||||
|
LANG=C
|
||||||
|
LC_ALL=C
|
||||||
|
LC_NUMERIC=C
|
||||||
|
export LANG LC_ALL LC_NUMERIC
|
||||||
|
|
||||||
AS=$( which astyle )
|
AS=$( which astyle )
|
||||||
|
|
||||||
for _cf in clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format
|
for _cf in clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format
|
||||||
|
@ -105,8 +105,20 @@ public:
|
|||||||
* how much work is (relatively) done.
|
* how much work is (relatively) done.
|
||||||
*/
|
*/
|
||||||
virtual qreal getJobWeight() const;
|
virtual qreal getJobWeight() const;
|
||||||
|
/** @brief The human-readable name of this job
|
||||||
|
*
|
||||||
|
* This should be a very short statement of what the job does.
|
||||||
|
* For status and state information, see prettyStatusMessage().
|
||||||
|
*/
|
||||||
virtual QString prettyName() const = 0;
|
virtual QString prettyName() const = 0;
|
||||||
|
// TODO: Unused
|
||||||
virtual QString prettyDescription() const;
|
virtual QString prettyDescription() const;
|
||||||
|
/** @brief A human-readable status for progress reporting
|
||||||
|
*
|
||||||
|
* This is called from the JobQueue when progress is made, and should
|
||||||
|
* return a not-too-long description of the job's status. This
|
||||||
|
* is made visible in the progress bar of the execution view step.
|
||||||
|
*/
|
||||||
virtual QString prettyStatusMessage() const;
|
virtual QString prettyStatusMessage() const;
|
||||||
virtual JobResult exec() = 0;
|
virtual JobResult exec() = 0;
|
||||||
|
|
||||||
|
@ -204,8 +204,6 @@ variantHashFromPyDict( const boost::python::dict& pyDict )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Helper* Helper::s_instance = nullptr;
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
add_if_lib_exists( const QDir& dir, const char* name, QStringList& list )
|
add_if_lib_exists( const QDir& dir, const char* name, QStringList& list )
|
||||||
{
|
{
|
||||||
@ -221,12 +219,10 @@ add_if_lib_exists( const QDir& dir, const char* name, QStringList& list )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper::Helper( QObject* parent )
|
Helper::Helper()
|
||||||
: QObject( parent )
|
: QObject( nullptr )
|
||||||
{
|
{
|
||||||
// Let's make extra sure we only call Py_Initialize once
|
// Let's make extra sure we only call Py_Initialize once
|
||||||
if ( !s_instance )
|
|
||||||
{
|
|
||||||
if ( !Py_IsInitialized() )
|
if ( !Py_IsInitialized() )
|
||||||
{
|
{
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
@ -248,21 +244,21 @@ Helper::Helper( QObject* parent )
|
|||||||
bp::str dir = path.toLocal8Bit().data();
|
bp::str dir = path.toLocal8Bit().data();
|
||||||
sys.attr( "path" ).attr( "append" )( dir );
|
sys.attr( "path" ).attr( "append" )( dir );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cWarning() << "creating PythonHelper more than once. This is very bad.";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
s_instance = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Helper::~Helper()
|
Helper::~Helper() {}
|
||||||
|
|
||||||
|
Helper*
|
||||||
|
Helper::instance()
|
||||||
{
|
{
|
||||||
s_instance = nullptr;
|
static Helper* s_helper = nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
|
if ( !s_helper )
|
||||||
|
{
|
||||||
|
s_helper = new Helper;
|
||||||
|
}
|
||||||
|
return s_helper;
|
||||||
|
}
|
||||||
|
|
||||||
boost::python::dict
|
boost::python::dict
|
||||||
Helper::createCleanNamespace()
|
Helper::createCleanNamespace()
|
||||||
|
@ -50,16 +50,15 @@ class Helper : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
virtual ~Helper();
|
|
||||||
|
|
||||||
boost::python::dict createCleanNamespace();
|
boost::python::dict createCleanNamespace();
|
||||||
|
|
||||||
QString handleLastError();
|
QString handleLastError();
|
||||||
|
|
||||||
|
static Helper* instance();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend Helper* Calamares::PythonJob::helper();
|
virtual ~Helper();
|
||||||
explicit Helper( QObject* parent = nullptr );
|
explicit Helper();
|
||||||
static Helper* s_instance;
|
|
||||||
|
|
||||||
boost::python::object m_mainModule;
|
boost::python::object m_mainModule;
|
||||||
boost::python::object m_mainNamespace;
|
boost::python::object m_mainNamespace;
|
||||||
|
@ -165,6 +165,10 @@ BOOST_PYTHON_MODULE( libcalamares )
|
|||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
|
struct PythonJob::Private
|
||||||
|
{
|
||||||
|
bp::object m_prettyStatusMessage;
|
||||||
|
};
|
||||||
|
|
||||||
PythonJob::PythonJob( const ModuleSystem::InstanceKey& instance,
|
PythonJob::PythonJob( const ModuleSystem::InstanceKey& instance,
|
||||||
const QString& scriptFile,
|
const QString& scriptFile,
|
||||||
@ -172,6 +176,7 @@ PythonJob::PythonJob( const ModuleSystem::InstanceKey& instance,
|
|||||||
const QVariantMap& moduleConfiguration,
|
const QVariantMap& moduleConfiguration,
|
||||||
QObject* parent )
|
QObject* parent )
|
||||||
: Job( parent )
|
: Job( parent )
|
||||||
|
, m_d( std::make_unique< Private >() )
|
||||||
, m_scriptFile( scriptFile )
|
, m_scriptFile( scriptFile )
|
||||||
, m_workingPath( workingPath )
|
, m_workingPath( workingPath )
|
||||||
, m_description()
|
, m_description()
|
||||||
@ -199,6 +204,7 @@ PythonJob::prettyName() const
|
|||||||
QString
|
QString
|
||||||
PythonJob::prettyStatusMessage() const
|
PythonJob::prettyStatusMessage() const
|
||||||
{
|
{
|
||||||
|
// The description is updated when progress is reported, see emitProgress()
|
||||||
if ( m_description.isEmpty() )
|
if ( m_description.isEmpty() )
|
||||||
{
|
{
|
||||||
return tr( "Running %1 operation." ).arg( QDir( m_workingPath ).dirName() );
|
return tr( "Running %1 operation." ).arg( QDir( m_workingPath ).dirName() );
|
||||||
@ -209,6 +215,18 @@ PythonJob::prettyStatusMessage() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString
|
||||||
|
pythonStringMethod( bp::dict& script, const char* funcName )
|
||||||
|
{
|
||||||
|
bp::object func = script.get( funcName, bp::object() );
|
||||||
|
if ( !func.is_none() )
|
||||||
|
{
|
||||||
|
bp::extract< std::string > result( func() );
|
||||||
|
return result.check() ? QString::fromStdString( result() ).trimmed() : QString();
|
||||||
|
}
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
JobResult
|
JobResult
|
||||||
PythonJob::exec()
|
PythonJob::exec()
|
||||||
@ -233,7 +251,7 @@ PythonJob::exec()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bp::dict scriptNamespace = helper()->createCleanNamespace();
|
bp::dict scriptNamespace = CalamaresPython::Helper::instance()->createCleanNamespace();
|
||||||
|
|
||||||
bp::object calamaresModule = bp::import( "libcalamares" );
|
bp::object calamaresModule = bp::import( "libcalamares" );
|
||||||
bp::dict calamaresNamespace = bp::extract< bp::dict >( calamaresModule.attr( "__dict__" ) );
|
bp::dict calamaresNamespace = bp::extract< bp::dict >( calamaresModule.attr( "__dict__" ) );
|
||||||
@ -242,27 +260,13 @@ PythonJob::exec()
|
|||||||
calamaresNamespace[ "globalstorage" ]
|
calamaresNamespace[ "globalstorage" ]
|
||||||
= CalamaresPython::GlobalStoragePythonWrapper( JobQueue::instance()->globalStorage() );
|
= CalamaresPython::GlobalStoragePythonWrapper( JobQueue::instance()->globalStorage() );
|
||||||
|
|
||||||
|
cDebug() << "Job file" << scriptFI.absoluteFilePath();
|
||||||
bp::object execResult
|
bp::object execResult
|
||||||
= bp::exec_file( scriptFI.absoluteFilePath().toLocal8Bit().data(), scriptNamespace, scriptNamespace );
|
= bp::exec_file( scriptFI.absoluteFilePath().toLocal8Bit().data(), scriptNamespace, scriptNamespace );
|
||||||
|
|
||||||
bp::object entryPoint = scriptNamespace[ "run" ];
|
bp::object entryPoint = scriptNamespace[ "run" ];
|
||||||
bp::object prettyNameFunc = scriptNamespace.get( "pretty_name", bp::object() );
|
|
||||||
|
|
||||||
cDebug() << "Job file" << scriptFI.absoluteFilePath();
|
|
||||||
if ( !prettyNameFunc.is_none() )
|
|
||||||
{
|
|
||||||
bp::extract< std::string > prettyNameResult( prettyNameFunc() );
|
|
||||||
if ( prettyNameResult.check() )
|
|
||||||
{
|
|
||||||
m_description = QString::fromStdString( prettyNameResult() ).trimmed();
|
|
||||||
}
|
|
||||||
if ( !m_description.isEmpty() )
|
|
||||||
{
|
|
||||||
cDebug() << "Job description from pretty_name" << prettyName() << "=" << m_description;
|
|
||||||
emit progress( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
m_d->m_prettyStatusMessage = scriptNamespace.get( "pretty_status_message", bp::object() );
|
||||||
|
m_description = pythonStringMethod( scriptNamespace, "pretty_name" );
|
||||||
if ( m_description.isEmpty() )
|
if ( m_description.isEmpty() )
|
||||||
{
|
{
|
||||||
bp::extract< std::string > entryPoint_doc_attr( entryPoint.attr( "__doc__" ) );
|
bp::extract< std::string > entryPoint_doc_attr( entryPoint.attr( "__doc__" ) );
|
||||||
@ -275,10 +279,14 @@ PythonJob::exec()
|
|||||||
{
|
{
|
||||||
m_description.truncate( i_newline );
|
m_description.truncate( i_newline );
|
||||||
}
|
}
|
||||||
cDebug() << "Job description from __doc__" << prettyName() << "=" << m_description;
|
cDebug() << "Job description from __doc__" << prettyName() << '=' << m_description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cDebug() << "Job description from pretty_name" << prettyName() << '=' << m_description;
|
||||||
|
}
|
||||||
emit progress( 0 );
|
emit progress( 0 );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bp::object runResult = entryPoint();
|
bp::object runResult = entryPoint();
|
||||||
|
|
||||||
@ -299,7 +307,7 @@ PythonJob::exec()
|
|||||||
QString msg;
|
QString msg;
|
||||||
if ( PyErr_Occurred() )
|
if ( PyErr_Occurred() )
|
||||||
{
|
{
|
||||||
msg = helper()->handleLastError();
|
msg = CalamaresPython::Helper::instance()->handleLastError();
|
||||||
}
|
}
|
||||||
bp::handle_exception();
|
bp::handle_exception();
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
@ -312,20 +320,21 @@ PythonJob::exec()
|
|||||||
void
|
void
|
||||||
PythonJob::emitProgress( qreal progressValue )
|
PythonJob::emitProgress( qreal progressValue )
|
||||||
{
|
{
|
||||||
|
// This is called from the JobApi (and only from there) from the Job thread,
|
||||||
|
// so it is safe to call into the Python interpreter. Update the description
|
||||||
|
// as needed (don't call this from prettyStatusMessage(), which can be
|
||||||
|
// called from other threads as well).
|
||||||
|
if ( m_d && !m_d->m_prettyStatusMessage.is_none() )
|
||||||
|
{
|
||||||
|
QString r;
|
||||||
|
bp::extract< std::string > result( m_d->m_prettyStatusMessage() );
|
||||||
|
r = result.check() ? QString::fromStdString( result() ).trimmed() : QString();
|
||||||
|
if ( !r.isEmpty() )
|
||||||
|
{
|
||||||
|
m_description = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
emit progress( progressValue );
|
emit progress( progressValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CalamaresPython::Helper*
|
|
||||||
PythonJob::helper()
|
|
||||||
{
|
|
||||||
auto ptr = CalamaresPython::Helper::s_instance;
|
|
||||||
if ( !ptr )
|
|
||||||
{
|
|
||||||
ptr = new CalamaresPython::Helper;
|
|
||||||
}
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
@ -53,11 +53,12 @@ public:
|
|||||||
virtual qreal getJobWeight() const override;
|
virtual qreal getJobWeight() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class CalamaresPython::Helper;
|
struct Private;
|
||||||
|
|
||||||
friend class CalamaresPython::PythonJobInterface;
|
friend class CalamaresPython::PythonJobInterface;
|
||||||
void emitProgress( double progressValue );
|
void emitProgress( double progressValue );
|
||||||
|
|
||||||
CalamaresPython::Helper* helper();
|
std::unique_ptr< Private > m_d;
|
||||||
QString m_scriptFile;
|
QString m_scriptFile;
|
||||||
QString m_workingPath;
|
QString m_workingPath;
|
||||||
QString m_description;
|
QString m_description;
|
||||||
|
@ -171,7 +171,7 @@ PythonJobInterface::PythonJobInterface( Calamares::PythonJob* parent )
|
|||||||
void
|
void
|
||||||
PythonJobInterface::setprogress( qreal progress )
|
PythonJobInterface::setprogress( qreal progress )
|
||||||
{
|
{
|
||||||
if ( progress >= 0 && progress <= 1 )
|
if ( progress >= 0.0 && progress <= 1.0 )
|
||||||
{
|
{
|
||||||
m_parent->emitProgress( progress );
|
m_parent->emitProgress( progress );
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,10 @@ static unsigned int s_threshold =
|
|||||||
#endif
|
#endif
|
||||||
static QMutex s_mutex;
|
static QMutex s_mutex;
|
||||||
|
|
||||||
|
static const char s_Continuation[] = "\n ";
|
||||||
|
static const char s_SubEntry[] = " .. ";
|
||||||
|
|
||||||
|
|
||||||
namespace Logger
|
namespace Logger
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -172,22 +176,39 @@ setupLogfile()
|
|||||||
qInstallMessageHandler( CalamaresLogHandler );
|
qInstallMessageHandler( CalamaresLogHandler );
|
||||||
}
|
}
|
||||||
|
|
||||||
CLog::CLog( unsigned int debugLevel )
|
CDebug::CDebug( unsigned int debugLevel, const char* func )
|
||||||
: QDebug( &m_msg )
|
: QDebug( &m_msg )
|
||||||
, m_debugLevel( debugLevel )
|
, m_debugLevel( debugLevel )
|
||||||
|
, m_funcinfo( func )
|
||||||
{
|
{
|
||||||
|
if ( debugLevel <= LOGERROR )
|
||||||
|
{
|
||||||
|
m_msg = QStringLiteral( "ERROR:" );
|
||||||
|
}
|
||||||
|
else if ( debugLevel <= LOGWARNING )
|
||||||
|
{
|
||||||
|
m_msg = QStringLiteral( "WARNING:" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CLog::~CLog()
|
CDebug::~CDebug()
|
||||||
{
|
{
|
||||||
|
if ( m_funcinfo )
|
||||||
|
{
|
||||||
|
m_msg.prepend( s_Continuation ); // Prepending, so back-to-front
|
||||||
|
m_msg.prepend( m_funcinfo );
|
||||||
|
}
|
||||||
log( m_msg.toUtf8().data(), m_debugLevel );
|
log( m_msg.toUtf8().data(), m_debugLevel );
|
||||||
}
|
}
|
||||||
|
|
||||||
CDebug::~CDebug() {}
|
constexpr FuncSuppressor::FuncSuppressor( const char s[] )
|
||||||
|
: m_s( s )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const char Continuation[] = "\n ";
|
const constexpr FuncSuppressor Continuation( s_Continuation );
|
||||||
const char SubEntry[] = " .. ";
|
const constexpr FuncSuppressor SubEntry( s_SubEntry );
|
||||||
|
|
||||||
QString
|
QString
|
||||||
toString( const QVariant& v )
|
toString( const QVariant& v )
|
||||||
|
@ -27,8 +27,14 @@
|
|||||||
|
|
||||||
namespace Logger
|
namespace Logger
|
||||||
{
|
{
|
||||||
DLLEXPORT extern const char Continuation[];
|
struct FuncSuppressor
|
||||||
DLLEXPORT extern const char SubEntry[];
|
{
|
||||||
|
explicit constexpr FuncSuppressor( const char[] );
|
||||||
|
const char* m_s;
|
||||||
|
};
|
||||||
|
|
||||||
|
DLLEXPORT extern const FuncSuppressor Continuation;
|
||||||
|
DLLEXPORT extern const FuncSuppressor SubEntry;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -41,34 +47,32 @@ enum
|
|||||||
LOGVERBOSE = 8
|
LOGVERBOSE = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLLEXPORT CLog : public QDebug
|
class DLLEXPORT CDebug : public QDebug
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CLog( unsigned int debugLevel );
|
explicit CDebug( unsigned int debugLevel = LOGDEBUG, const char* func = nullptr );
|
||||||
virtual ~CLog();
|
virtual ~CDebug();
|
||||||
|
|
||||||
|
friend QDebug& operator<<( CDebug&&, const FuncSuppressor& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_msg;
|
QString m_msg;
|
||||||
unsigned int m_debugLevel;
|
unsigned int m_debugLevel;
|
||||||
|
const char* m_funcinfo = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DLLEXPORT CDebug : public CLog
|
inline QDebug&
|
||||||
|
operator<<( CDebug&& s, const FuncSuppressor& f )
|
||||||
{
|
{
|
||||||
public:
|
s.m_funcinfo = nullptr;
|
||||||
CDebug( unsigned int debugLevel = LOGDEBUG )
|
return s << f.m_s;
|
||||||
: CLog( debugLevel )
|
}
|
||||||
{
|
|
||||||
if ( debugLevel <= LOGERROR )
|
inline QDebug&
|
||||||
{
|
operator<<( QDebug& s, const FuncSuppressor& f )
|
||||||
*this << "ERROR:";
|
{
|
||||||
}
|
return s << f.m_s;
|
||||||
else if ( debugLevel <= LOGWARNING )
|
}
|
||||||
{
|
|
||||||
*this << "WARNING:";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
virtual ~CDebug();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The full path of the log file.
|
* @brief The full path of the log file.
|
||||||
@ -219,8 +223,8 @@ operator<<( QDebug& s, const DebugMap& t )
|
|||||||
}
|
}
|
||||||
} // namespace Logger
|
} // namespace Logger
|
||||||
|
|
||||||
#define cDebug() (Logger::CDebug( Logger::LOGDEBUG ) << Q_FUNC_INFO << Logger::Continuation)
|
#define cDebug() Logger::CDebug( Logger::LOGDEBUG, Q_FUNC_INFO )
|
||||||
#define cWarning() Logger::CDebug( Logger::LOGWARNING )
|
#define cWarning() Logger::CDebug( Logger::LOGWARNING, Q_FUNC_INFO )
|
||||||
#define cError() Logger::CDebug( Logger::LOGERROR )
|
#define cError() Logger::CDebug( Logger::LOGERROR, Q_FUNC_INFO )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,14 +26,8 @@
|
|||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
// #include <QTemporaryFile>
|
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
// #include <fcntl.h>
|
|
||||||
// #include <sys/stat.h>
|
|
||||||
// #include <unistd.h>
|
|
||||||
|
|
||||||
class TestPaths : public QObject
|
class TestPaths : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
#include "ImageRegistry.h"
|
#include "ImageRegistry.h"
|
||||||
|
|
||||||
|
#include <QIcon>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QSvgRenderer>
|
#include <QSvgRenderer>
|
||||||
#include <qicon.h>
|
|
||||||
|
|
||||||
static QHash< QString, QHash< int, QHash< qint64, QPixmap > > > s_cache;
|
static QHash< QString, QHash< int, QHash< qint64, QPixmap > > > s_cache;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef EXECUTIONVIEWSTEP_H
|
#ifndef EXECUTIONVIEWSTEP_H
|
||||||
#define EXECUTIONVIEWSTEP_H
|
#define EXECUTIONVIEWSTEP_H
|
||||||
|
|
||||||
#include <viewpages/ViewStep.h>
|
#include "ViewStep.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <CppJob.h>
|
#include "CppJob.h"
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob
|
class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob
|
||||||
{
|
{
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <CppJob.h>
|
#include "CppJob.h"
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class PLUGINDLLEXPORT DummyCppJob : public Calamares::CppJob
|
class PLUGINDLLEXPORT DummyCppJob : public Calamares::CppJob
|
||||||
{
|
{
|
||||||
|
@ -43,6 +43,10 @@ _ = gettext.translation("calamares-python",
|
|||||||
def pretty_name():
|
def pretty_name():
|
||||||
return _("Dummy python job.")
|
return _("Dummy python job.")
|
||||||
|
|
||||||
|
status = _("Dummy python step {}").format(0)
|
||||||
|
|
||||||
|
def pretty_status_message():
|
||||||
|
return status
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
"""Dummy python job."""
|
"""Dummy python job."""
|
||||||
@ -92,8 +96,10 @@ def run():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
configlist = ["no list"]
|
configlist = ["no list"]
|
||||||
|
|
||||||
|
global status
|
||||||
c = 1
|
c = 1
|
||||||
for k in configlist:
|
for k in configlist:
|
||||||
|
status = _("Dummy python step {}").format(str(c) + ":" + repr(k))
|
||||||
libcalamares.utils.debug(_("Dummy python step {}").format(str(k)))
|
libcalamares.utils.debug(_("Dummy python step {}").format(str(k)))
|
||||||
sleep(1)
|
sleep(1)
|
||||||
libcalamares.job.setprogress(c * 1.0 / len(configlist))
|
libcalamares.job.setprogress(c * 1.0 / len(configlist))
|
||||||
|
@ -22,13 +22,13 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <CppJob.h>
|
#include "CppJob.h"
|
||||||
|
|
||||||
#include "partition/KPMManager.h"
|
#include "partition/KPMManager.h"
|
||||||
#include "partition/PartitionSize.h"
|
#include "partition/PartitionSize.h"
|
||||||
#include "utils/PluginFactory.h"
|
#include "utils/PluginFactory.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class CoreBackend; // From KPMCore
|
class CoreBackend; // From KPMCore
|
||||||
class Device; // From KPMCore
|
class Device; // From KPMCore
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <KF5/KService/kservice.h>
|
#include <KService>
|
||||||
#include <KF5/KParts/kde_terminal_interface.h>
|
#include <KParts/kde_terminal_interface.h>
|
||||||
#include <KF5/KParts/kparts/readonlypart.h>
|
#include <KParts/ReadOnlyPart>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class InteractiveTerminalPage;
|
class InteractiveTerminalPage;
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class KeyboardPage;
|
class KeyboardPage;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <SetKeyboardLayoutJob.h>
|
#include "SetKeyboardLayoutJob.h"
|
||||||
|
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef SETKEYBOARDLAYOUTJOB_H
|
#ifndef SETKEYBOARDLAYOUTJOB_H
|
||||||
#define SETKEYBOARDLAYOUTJOB_H
|
#define SETKEYBOARDLAYOUTJOB_H
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
|
|
||||||
class SetKeyboardLayoutJob : public Calamares::Job
|
class SetKeyboardLayoutJob : public Calamares::Job
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
#ifndef LICENSEPAGEPLUGIN_H
|
#ifndef LICENSEPAGEPLUGIN_H
|
||||||
#define LICENSEPAGEPLUGIN_H
|
#define LICENSEPAGEPLUGIN_H
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <SetTimezoneJob.h>
|
#include "SetTimezoneJob.h"
|
||||||
|
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef SETTIMEZONEJOB_H
|
#ifndef SETTIMEZONEJOB_H
|
||||||
#define SETTIMEZONEJOB_H
|
#define SETTIMEZONEJOB_H
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
|
|
||||||
class SetTimezoneJob : public Calamares::Job
|
class SetTimezoneJob : public Calamares::Job
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <CppJob.h>
|
#include "CppJob.h"
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class PLUGINDLLEXPORT MachineIdJob : public Calamares::CppJob
|
class PLUGINDLLEXPORT MachineIdJob : public Calamares::CppJob
|
||||||
{
|
{
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
#ifndef OEMVIEWSTEP_H
|
#ifndef OEMVIEWSTEP_H
|
||||||
#define OEMVIEWSTEP_H
|
#define OEMVIEWSTEP_H
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
|
@ -56,6 +56,10 @@ def _change_mode(mode):
|
|||||||
|
|
||||||
|
|
||||||
def pretty_name():
|
def pretty_name():
|
||||||
|
return _("Install packages.")
|
||||||
|
|
||||||
|
|
||||||
|
def pretty_status_message():
|
||||||
if not group_packages:
|
if not group_packages:
|
||||||
if (total_packages > 0):
|
if (total_packages > 0):
|
||||||
# Outside the context of an operation
|
# Outside the context of an operation
|
||||||
@ -332,19 +336,23 @@ class PMDummy(PackageManager):
|
|||||||
backend = "dummy"
|
backend = "dummy"
|
||||||
|
|
||||||
def install(self, pkgs, from_local=False):
|
def install(self, pkgs, from_local=False):
|
||||||
libcalamares.utils.debug("Installing " + str(pkgs))
|
from time import sleep
|
||||||
|
libcalamares.utils.debug("Dummy backend: Installing " + str(pkgs))
|
||||||
|
sleep(3)
|
||||||
|
|
||||||
def remove(self, pkgs):
|
def remove(self, pkgs):
|
||||||
libcalamares.utils.debug("Removing " + str(pkgs))
|
from time import sleep
|
||||||
|
libcalamares.utils.debug("Dummy backend: Removing " + str(pkgs))
|
||||||
|
sleep(3)
|
||||||
|
|
||||||
def update_db(self):
|
def update_db(self):
|
||||||
libcalamares.utils.debug("Updating DB")
|
libcalamares.utils.debug("Dummy backend: Updating DB")
|
||||||
|
|
||||||
def update_system(self):
|
def update_system(self):
|
||||||
libcalamares.utils.debug("Updating System")
|
libcalamares.utils.debug("Dummy backend: Updating System")
|
||||||
|
|
||||||
def run(self, script):
|
def run(self, script):
|
||||||
libcalamares.utils.debug("Running script '" + str(script) + "'")
|
libcalamares.utils.debug("Dummy backend: Running script '" + str(script) + "'")
|
||||||
|
|
||||||
|
|
||||||
class PMPisi(PackageManager):
|
class PMPisi(PackageManager):
|
||||||
@ -502,7 +510,7 @@ def run_operations(pkgman, entry):
|
|||||||
libcalamares.utils.warning("Unknown package-operation key {!s}".format(key))
|
libcalamares.utils.warning("Unknown package-operation key {!s}".format(key))
|
||||||
completed_packages += len(package_list)
|
completed_packages += len(package_list)
|
||||||
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
|
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
|
||||||
libcalamares.utils.debug(pretty_name())
|
libcalamares.utils.debug("Pretty name: {!s}, setting progress..".format(pretty_name()))
|
||||||
|
|
||||||
group_packages = 0
|
group_packages = 0
|
||||||
_change_mode(None)
|
_change_mode(None)
|
||||||
|
@ -587,19 +587,19 @@ ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current,
|
|||||||
void
|
void
|
||||||
ChoicePage::onEncryptWidgetStateChanged()
|
ChoicePage::onEncryptWidgetStateChanged()
|
||||||
{
|
{
|
||||||
EncryptWidget::State state = m_encryptWidget->state();
|
EncryptWidget::Encryption state = m_encryptWidget->state();
|
||||||
if ( m_choice == Erase )
|
if ( m_choice == Erase )
|
||||||
{
|
{
|
||||||
if ( state == EncryptWidget::EncryptionConfirmed ||
|
if ( state == EncryptWidget::Encryption::Confirmed ||
|
||||||
state == EncryptWidget::EncryptionDisabled )
|
state == EncryptWidget::Encryption::Disabled )
|
||||||
applyActionChoice( m_choice );
|
applyActionChoice( m_choice );
|
||||||
}
|
}
|
||||||
else if ( m_choice == Replace )
|
else if ( m_choice == Replace )
|
||||||
{
|
{
|
||||||
if ( m_beforePartitionBarsView &&
|
if ( m_beforePartitionBarsView &&
|
||||||
m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() &&
|
m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() &&
|
||||||
( state == EncryptWidget::EncryptionConfirmed ||
|
( state == EncryptWidget::Encryption::Confirmed ||
|
||||||
state == EncryptWidget::EncryptionDisabled ) )
|
state == EncryptWidget::Encryption::Disabled ) )
|
||||||
{
|
{
|
||||||
doReplaceSelectedPartition( m_beforePartitionBarsView->
|
doReplaceSelectedPartition( m_beforePartitionBarsView->
|
||||||
selectionModel()->
|
selectionModel()->
|
||||||
@ -1474,7 +1474,7 @@ ChoicePage::updateNextEnabled()
|
|||||||
|
|
||||||
if ( m_choice != Manual &&
|
if ( m_choice != Manual &&
|
||||||
m_encryptWidget->isVisible() &&
|
m_encryptWidget->isVisible() &&
|
||||||
m_encryptWidget->state() == EncryptWidget::EncryptionUnconfirmed )
|
m_encryptWidget->state() == EncryptWidget::Encryption::Unconfirmed )
|
||||||
enabled = false;
|
enabled = false;
|
||||||
|
|
||||||
if ( enabled == m_nextEnabled )
|
if ( enabled == m_nextEnabled )
|
||||||
|
@ -204,7 +204,7 @@ CreatePartitionDialog::createPartition()
|
|||||||
|
|
||||||
Partition* partition = nullptr;
|
Partition* partition = nullptr;
|
||||||
QString luksPassphrase = m_ui->encryptWidget->passphrase();
|
QString luksPassphrase = m_ui->encryptWidget->passphrase();
|
||||||
if ( m_ui->encryptWidget->state() == EncryptWidget::EncryptionConfirmed &&
|
if ( m_ui->encryptWidget->state() == EncryptWidget::Encryption::Confirmed &&
|
||||||
!luksPassphrase.isEmpty() )
|
!luksPassphrase.isEmpty() )
|
||||||
{
|
{
|
||||||
partition = KPMHelpers::createNewEncryptedPartition(
|
partition = KPMHelpers::createNewEncryptedPartition(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,42 +20,45 @@
|
|||||||
|
|
||||||
#include "EncryptWidget.h"
|
#include "EncryptWidget.h"
|
||||||
|
|
||||||
#include <utils/CalamaresUtilsGui.h>
|
#include "ui_EncryptWidget.h"
|
||||||
|
|
||||||
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
|
#include "utils/Retranslator.h"
|
||||||
|
|
||||||
EncryptWidget::EncryptWidget( QWidget* parent )
|
EncryptWidget::EncryptWidget( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, m_state( EncryptionDisabled )
|
, m_ui( new Ui::EncryptWidget )
|
||||||
|
, m_state( Encryption::Disabled )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
m_ui->setupUi( this );
|
||||||
|
|
||||||
m_iconLabel->setFixedWidth( m_iconLabel->height() );
|
m_ui->m_iconLabel->setFixedWidth( m_ui->m_iconLabel->height() );
|
||||||
m_passphraseLineEdit->hide();
|
m_ui->m_passphraseLineEdit->hide();
|
||||||
m_confirmLineEdit->hide();
|
m_ui->m_confirmLineEdit->hide();
|
||||||
m_iconLabel->hide();
|
m_ui->m_iconLabel->hide();
|
||||||
|
|
||||||
connect( m_encryptCheckBox, &QCheckBox::stateChanged,
|
connect( m_ui->m_encryptCheckBox, &QCheckBox::stateChanged, this, &EncryptWidget::onCheckBoxStateChanged );
|
||||||
this, &EncryptWidget::onCheckBoxStateChanged );
|
connect( m_ui->m_passphraseLineEdit, &QLineEdit::textEdited, this, &EncryptWidget::onPassphraseEdited );
|
||||||
connect( m_passphraseLineEdit, &QLineEdit::textEdited,
|
connect( m_ui->m_confirmLineEdit, &QLineEdit::textEdited, this, &EncryptWidget::onPassphraseEdited );
|
||||||
this, &EncryptWidget::onPassphraseEdited );
|
|
||||||
connect( m_confirmLineEdit, &QLineEdit::textEdited,
|
|
||||||
this, &EncryptWidget::onPassphraseEdited );
|
|
||||||
|
|
||||||
setFixedHeight( m_passphraseLineEdit->height() ); // Avoid jumping up and down
|
setFixedHeight( m_ui->m_passphraseLineEdit->height() ); // Avoid jumping up and down
|
||||||
updateState();
|
updateState();
|
||||||
|
|
||||||
|
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EncryptWidget::reset()
|
EncryptWidget::reset()
|
||||||
{
|
{
|
||||||
m_passphraseLineEdit->clear();
|
m_ui->m_passphraseLineEdit->clear();
|
||||||
m_confirmLineEdit->clear();
|
m_ui->m_confirmLineEdit->clear();
|
||||||
|
|
||||||
m_encryptCheckBox->setChecked( false );
|
m_ui->m_encryptCheckBox->setChecked( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EncryptWidget::State
|
EncryptWidget::Encryption
|
||||||
EncryptWidget::state() const
|
EncryptWidget::state() const
|
||||||
{
|
{
|
||||||
return m_state;
|
return m_state;
|
||||||
@ -64,53 +68,48 @@ EncryptWidget::state() const
|
|||||||
void
|
void
|
||||||
EncryptWidget::setText( const QString& text )
|
EncryptWidget::setText( const QString& text )
|
||||||
{
|
{
|
||||||
m_encryptCheckBox->setText( text );
|
m_ui->m_encryptCheckBox->setText( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString
|
QString
|
||||||
EncryptWidget::passphrase() const
|
EncryptWidget::passphrase() const
|
||||||
{
|
{
|
||||||
if ( m_state == EncryptionConfirmed )
|
if ( m_state == Encryption::Confirmed )
|
||||||
return m_passphraseLineEdit->text();
|
{
|
||||||
|
return m_ui->m_passphraseLineEdit->text();
|
||||||
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EncryptWidget::changeEvent( QEvent* e )
|
EncryptWidget::retranslate()
|
||||||
{
|
{
|
||||||
QWidget::changeEvent( e );
|
m_ui->retranslateUi( this );
|
||||||
switch ( e->type() )
|
onPassphraseEdited(); // For the tooltip
|
||||||
{
|
|
||||||
case QEvent::LanguageChange:
|
|
||||||
retranslateUi( this );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EncryptWidget::updateState()
|
EncryptWidget::updateState()
|
||||||
{
|
{
|
||||||
State newState;
|
Encryption newState;
|
||||||
if ( m_encryptCheckBox->isChecked() )
|
if ( m_ui->m_encryptCheckBox->isChecked() )
|
||||||
{
|
{
|
||||||
if ( !m_passphraseLineEdit->text().isEmpty() &&
|
if ( !m_ui->m_passphraseLineEdit->text().isEmpty()
|
||||||
m_passphraseLineEdit->text() == m_confirmLineEdit->text() )
|
&& m_ui->m_passphraseLineEdit->text() == m_ui->m_confirmLineEdit->text() )
|
||||||
{
|
{
|
||||||
newState = EncryptionConfirmed;
|
newState = Encryption::Confirmed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newState = EncryptionUnconfirmed;
|
newState = Encryption::Unconfirmed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newState = EncryptionDisabled;
|
newState = Encryption::Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( newState != m_state )
|
if ( newState != m_state )
|
||||||
@ -120,35 +119,38 @@ EncryptWidget::updateState()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///@brief Give @p label the @p pixmap from the standard-pixmaps
|
||||||
|
static void
|
||||||
|
applyPixmap( QLabel* label, CalamaresUtils::ImageType pixmap )
|
||||||
|
{
|
||||||
|
label->setFixedWidth( label->height() );
|
||||||
|
label->setPixmap( CalamaresUtils::defaultPixmap( pixmap, CalamaresUtils::Original, label->size() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EncryptWidget::onPassphraseEdited()
|
EncryptWidget::onPassphraseEdited()
|
||||||
{
|
{
|
||||||
if ( !m_iconLabel->isVisible() )
|
if ( !m_ui->m_iconLabel->isVisible() )
|
||||||
m_iconLabel->show();
|
{
|
||||||
|
m_ui->m_iconLabel->show();
|
||||||
|
}
|
||||||
|
|
||||||
QString p1 = m_passphraseLineEdit->text();
|
QString p1 = m_ui->m_passphraseLineEdit->text();
|
||||||
QString p2 = m_confirmLineEdit->text();
|
QString p2 = m_ui->m_confirmLineEdit->text();
|
||||||
|
|
||||||
m_iconLabel->setToolTip( QString() );
|
m_ui->m_iconLabel->setToolTip( QString() );
|
||||||
if ( p1.isEmpty() && p2.isEmpty() )
|
if ( p1.isEmpty() && p2.isEmpty() )
|
||||||
{
|
{
|
||||||
m_iconLabel->clear();
|
m_ui->m_iconLabel->clear();
|
||||||
}
|
}
|
||||||
else if ( p1 == p2 )
|
else if ( p1 == p2 )
|
||||||
{
|
{
|
||||||
m_iconLabel->setFixedWidth( m_iconLabel->height() );
|
applyPixmap( m_ui->m_iconLabel, CalamaresUtils::Yes );
|
||||||
m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::Yes,
|
|
||||||
CalamaresUtils::Original,
|
|
||||||
m_iconLabel->size() ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_iconLabel->setFixedWidth( m_iconLabel->height() );
|
applyPixmap( m_ui->m_iconLabel, CalamaresUtils::No );
|
||||||
m_iconLabel->setPixmap( CalamaresUtils::defaultPixmap( CalamaresUtils::No,
|
m_ui->m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) );
|
||||||
CalamaresUtils::Original,
|
|
||||||
m_iconLabel->size() ) );
|
|
||||||
m_iconLabel->setToolTip( tr( "Please enter the same passphrase in both boxes." ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateState();
|
updateState();
|
||||||
@ -156,14 +158,15 @@ EncryptWidget::onPassphraseEdited()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
EncryptWidget::onCheckBoxStateChanged( int state )
|
EncryptWidget::onCheckBoxStateChanged( int checked )
|
||||||
{
|
{
|
||||||
m_passphraseLineEdit->setVisible( state );
|
// @p checked is a Qt::CheckState, 0 is "unchecked" and 2 is "checked"
|
||||||
m_confirmLineEdit->setVisible( state );
|
m_ui->m_passphraseLineEdit->setVisible( checked );
|
||||||
m_iconLabel->setVisible( state );
|
m_ui->m_confirmLineEdit->setVisible( checked );
|
||||||
m_passphraseLineEdit->clear();
|
m_ui->m_iconLabel->setVisible( checked );
|
||||||
m_confirmLineEdit->clear();
|
m_ui->m_passphraseLineEdit->clear();
|
||||||
m_iconLabel->clear();
|
m_ui->m_confirmLineEdit->clear();
|
||||||
|
m_ui->m_iconLabel->clear();
|
||||||
|
|
||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,41 +21,46 @@
|
|||||||
#ifndef ENCRYPTWIDGET_H
|
#ifndef ENCRYPTWIDGET_H
|
||||||
#define ENCRYPTWIDGET_H
|
#define ENCRYPTWIDGET_H
|
||||||
|
|
||||||
#include "ui_EncryptWidget.h"
|
#include <QWidget>
|
||||||
|
|
||||||
class EncryptWidget : public QWidget, private Ui::EncryptWidget
|
namespace Ui
|
||||||
|
{
|
||||||
|
class EncryptWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class EncryptWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum State : unsigned short
|
enum class Encryption : unsigned short
|
||||||
{
|
{
|
||||||
EncryptionDisabled = 0,
|
Disabled = 0,
|
||||||
EncryptionUnconfirmed,
|
Unconfirmed,
|
||||||
EncryptionConfirmed
|
Confirmed
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit EncryptWidget( QWidget* parent = nullptr );
|
explicit EncryptWidget( QWidget* parent = nullptr );
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
State state() const;
|
Encryption state() const;
|
||||||
void setText( const QString& text );
|
void setText( const QString& text );
|
||||||
|
|
||||||
QString passphrase() const;
|
QString passphrase() const;
|
||||||
|
|
||||||
signals:
|
void retranslate();
|
||||||
void stateChanged( State );
|
|
||||||
|
|
||||||
protected:
|
signals:
|
||||||
void changeEvent( QEvent* e );
|
void stateChanged( Encryption );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateState();
|
void updateState();
|
||||||
void onPassphraseEdited();
|
void onPassphraseEdited();
|
||||||
void onCheckBoxStateChanged( int state );
|
void onCheckBoxStateChanged( int checked );
|
||||||
|
|
||||||
State m_state;
|
Ui::EncryptWidget* m_ui;
|
||||||
|
Encryption m_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ENCRYPTWIDGET_H
|
#endif // ENCRYPTWIDGET_H
|
||||||
|
@ -18,16 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "gui/PartitionBarsView.h"
|
#include "gui/PartitionBarsView.h"
|
||||||
|
|
||||||
#include <core/PartitionModel.h>
|
#include "core/PartitionModel.h"
|
||||||
#include <core/ColorUtils.h>
|
#include "core/ColorUtils.h"
|
||||||
|
|
||||||
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <kpmcore/core/device.h>
|
#include <kpmcore/core/device.h>
|
||||||
|
|
||||||
#include <utils/CalamaresUtilsGui.h>
|
|
||||||
#include <utils/Logger.h>
|
|
||||||
|
|
||||||
|
|
||||||
// Qt
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
#ifndef PARTITIONVIEWSTEP_H
|
#ifndef PARTITIONVIEWSTEP_H
|
||||||
#define PARTITIONVIEWSTEP_H
|
#define PARTITIONVIEWSTEP_H
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include "core/PartitionActions.h"
|
#include "core/PartitionActions.h"
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ CreatePartitionTableJob::prettyStatusMessage() const
|
|||||||
|
|
||||||
|
|
||||||
static inline QDebug&
|
static inline QDebug&
|
||||||
operator <<( QDebug& s, PartitionIterator& it )
|
operator <<( QDebug&& s, PartitionIterator& it )
|
||||||
{
|
{
|
||||||
s << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) );
|
s << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) );
|
||||||
return s;
|
return s;
|
||||||
|
@ -18,23 +18,21 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <PartitionJobTests.h>
|
#include "PartitionJobTests.h"
|
||||||
|
|
||||||
|
#include "core/KPMHelpers.h"
|
||||||
|
#include "jobs/CreatePartitionJob.h"
|
||||||
|
#include "jobs/CreatePartitionTableJob.h"
|
||||||
|
#include "jobs/ResizePartitionJob.h"
|
||||||
|
|
||||||
#include "partition/KPMManager.h"
|
#include "partition/KPMManager.h"
|
||||||
#include "partition/PartitionQuery.h"
|
#include "partition/PartitionQuery.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Units.h"
|
#include "utils/Units.h"
|
||||||
|
|
||||||
#include <core/KPMHelpers.h>
|
|
||||||
#include <jobs/CreatePartitionJob.h>
|
|
||||||
#include <jobs/CreatePartitionTableJob.h>
|
|
||||||
#include <jobs/ResizePartitionJob.h>
|
|
||||||
|
|
||||||
// CalaPM
|
|
||||||
#include <backend/corebackend.h>
|
#include <backend/corebackend.h>
|
||||||
#include <fs/filesystemfactory.h>
|
#include <fs/filesystemfactory.h>
|
||||||
|
|
||||||
// Qt
|
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef PARTITIONJOBTESTS_H
|
#ifndef PARTITIONJOBTESTS_H
|
||||||
#define PARTITIONJOBTESTS_H
|
#define PARTITIONJOBTESTS_H
|
||||||
|
|
||||||
#include <JobQueue.h>
|
#include "JobQueue.h"
|
||||||
|
|
||||||
// CalaPM
|
// CalaPM
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
class PlasmaLnfJob : public Calamares::Job
|
class PlasmaLnfJob : public Calamares::Job
|
||||||
{
|
{
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
#ifndef PLASMALNFVIEWSTEP_H
|
#ifndef PLASMALNFVIEWSTEP_H
|
||||||
#define PLASMALNFVIEWSTEP_H
|
#define PLASMALNFVIEWSTEP_H
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
9
src/modules/removeuser/CMakeLists.txt
Normal file
9
src/modules/removeuser/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
calamares_add_plugin( removeuser
|
||||||
|
TYPE job
|
||||||
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||||
|
SOURCES
|
||||||
|
RemoveUserJob.cpp
|
||||||
|
LINK_PRIVATE_LIBRARIES
|
||||||
|
calamares
|
||||||
|
SHARED_LIB
|
||||||
|
)
|
74
src/modules/removeuser/RemoveUserJob.cpp
Normal file
74
src/modules/removeuser/RemoveUserJob.cpp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
|
*
|
||||||
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2017. Alf Gaida <agaida@siduction.org>
|
||||||
|
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||||
|
*
|
||||||
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Calamares is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "RemoveUserJob.h"
|
||||||
|
|
||||||
|
#include "GlobalStorage.h"
|
||||||
|
#include "JobQueue.h"
|
||||||
|
#include "utils/CalamaresUtilsSystem.h"
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/Variant.h"
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
|
|
||||||
|
RemoveUserJob::RemoveUserJob( QObject* parent )
|
||||||
|
: Calamares::CppJob( parent )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RemoveUserJob::~RemoveUserJob() {}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
RemoveUserJob::prettyName() const
|
||||||
|
{
|
||||||
|
return tr( "Remove live user from target system" );
|
||||||
|
}
|
||||||
|
|
||||||
|
Calamares::JobResult
|
||||||
|
RemoveUserJob::exec()
|
||||||
|
{
|
||||||
|
if ( m_username.isEmpty() )
|
||||||
|
{
|
||||||
|
cWarning() << "Ignoring an empty username.";
|
||||||
|
return Calamares::JobResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
auto* s = CalamaresUtils::System::instance();
|
||||||
|
auto r = s->targetEnvCommand( { QStringLiteral( "userdel" ),
|
||||||
|
QStringLiteral( "-f" ), // force
|
||||||
|
QStringLiteral( "-r" ), // remove home-dir and mail
|
||||||
|
m_username } );
|
||||||
|
if ( r.getExitCode() != 0 )
|
||||||
|
{
|
||||||
|
cWarning() << "Cannot remove user" << m_username << "userdel terminated with exit code" << r.getExitCode();
|
||||||
|
}
|
||||||
|
return Calamares::JobResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
RemoveUserJob::setConfigurationMap( const QVariantMap& map )
|
||||||
|
{
|
||||||
|
m_username = CalamaresUtils::getString( map, "username" );
|
||||||
|
}
|
||||||
|
|
||||||
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( RemoveUserJobFactory, registerPlugin< RemoveUserJob >(); )
|
49
src/modules/removeuser/RemoveUserJob.h
Normal file
49
src/modules/removeuser/RemoveUserJob.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
|
*
|
||||||
|
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||||
|
*
|
||||||
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Calamares is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef REMOVEUSERJOB_H
|
||||||
|
#define REMOVEUSERJOB_H
|
||||||
|
|
||||||
|
#include "CppJob.h"
|
||||||
|
#include "DllMacro.h"
|
||||||
|
#include "utils/PluginFactory.h"
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QVariantMap>
|
||||||
|
|
||||||
|
class PLUGINDLLEXPORT RemoveUserJob : public Calamares::CppJob
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RemoveUserJob( QObject* parent = nullptr );
|
||||||
|
virtual ~RemoveUserJob() override;
|
||||||
|
|
||||||
|
QString prettyName() const override;
|
||||||
|
|
||||||
|
Calamares::JobResult exec() override;
|
||||||
|
|
||||||
|
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString m_username;
|
||||||
|
};
|
||||||
|
|
||||||
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( RemoveUserJobFactory )
|
||||||
|
|
||||||
|
#endif // REMOVEUSERJOB_H
|
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# === This file is part of Calamares - <https://github.com/calamares> ===
|
|
||||||
#
|
|
||||||
# Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
|
||||||
# Copyright 2017. Alf Gaida <agaida@siduction.org>
|
|
||||||
# Copyright 2019, Adriaan de Groot <groot@kde.org>
|
|
||||||
#
|
|
||||||
# Calamares is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Calamares is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import libcalamares
|
|
||||||
|
|
||||||
import gettext
|
|
||||||
_ = gettext.translation("calamares-python",
|
|
||||||
localedir=libcalamares.utils.gettext_path(),
|
|
||||||
languages=libcalamares.utils.gettext_languages(),
|
|
||||||
fallback=True).gettext
|
|
||||||
|
|
||||||
|
|
||||||
def pretty_name():
|
|
||||||
return _("Remove live user from target system")
|
|
||||||
|
|
||||||
|
|
||||||
def run():
|
|
||||||
"""
|
|
||||||
Remove live user from target system
|
|
||||||
"""
|
|
||||||
username = libcalamares.job.configuration["username"]
|
|
||||||
|
|
||||||
try:
|
|
||||||
libcalamares.utils.check_target_env_call(["userdel", "-f",
|
|
||||||
"-r", username])
|
|
||||||
except subprocess.CalledProcessError as e:
|
|
||||||
libcalamares.utils.debug("Cannot remove user. "
|
|
||||||
"'userdel' terminated with exit code "
|
|
||||||
"{}.".format(e.returncode))
|
|
||||||
return None
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
type: "job"
|
|
||||||
name: "removeuser"
|
|
||||||
interface: "python"
|
|
||||||
requires: []
|
|
||||||
script: "main.py"
|
|
@ -1,6 +1,10 @@
|
|||||||
# Removes a single user (with userdel) from the system.
|
# Removes a single user (with userdel) from the system.
|
||||||
# This is typically used in OEM setups or if the live user
|
# This is typically used in OEM setups or if the live user
|
||||||
# spills into the target system.
|
# spills into the target system.
|
||||||
|
#
|
||||||
|
# The module never fails; if userdel fails, this is logged
|
||||||
|
# but the module still reports success and installation / setup
|
||||||
|
# continues as normal.
|
||||||
---
|
---
|
||||||
# Username in the target system to be removed.
|
# Username in the target system to be removed.
|
||||||
username: live
|
username: live
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
class SummaryPage;
|
class SummaryPage;
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
|
|
||||||
#include "TrackingType.h"
|
#include "TrackingType.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CreateUserJob.h>
|
#include "CreateUserJob.h"
|
||||||
|
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef CREATEUSERJOB_H
|
#ifndef CREATEUSERJOB_H
|
||||||
#define CREATEUSERJOB_H
|
#define CREATEUSERJOB_H
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef SETHOSTNAMEJOB_CPP_H
|
#ifndef SETHOSTNAMEJOB_CPP_H
|
||||||
#define SETHOSTNAMEJOB_CPP_H
|
#define SETHOSTNAMEJOB_CPP_H
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
class SetHostNameJob : public Calamares::Job
|
class SetHostNameJob : public Calamares::Job
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <SetPasswordJob.h>
|
#include "SetPasswordJob.h"
|
||||||
|
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef SETPASSWORDJOB_H
|
#ifndef SETPASSWORDJOB_H
|
||||||
#define SETPASSWORDJOB_H
|
#define SETPASSWORDJOB_H
|
||||||
|
|
||||||
#include <Job.h>
|
#include "Job.h"
|
||||||
|
|
||||||
|
|
||||||
class SetPasswordJob : public Calamares::Job
|
class SetPasswordJob : public Calamares::Job
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
#include "WebViewConfig.h"
|
#include "WebViewConfig.h"
|
||||||
|
|
||||||
#include <utils/PluginFactory.h>
|
#include "utils/PluginFactory.h"
|
||||||
#include <viewpages/ViewStep.h>
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <DllMacro.h>
|
#include "DllMacro.h"
|
||||||
|
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
|
@ -19,14 +19,11 @@
|
|||||||
#ifndef WELCOMEPAGEPLUGIN_H
|
#ifndef WELCOMEPAGEPLUGIN_H
|
||||||
#define WELCOMEPAGEPLUGIN_H
|
#define WELCOMEPAGEPLUGIN_H
|
||||||
|
|
||||||
|
#include "DllMacro.h"
|
||||||
|
#include "utils/PluginFactory.h"
|
||||||
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <modulesystem/Requirement.h>
|
|
||||||
#include <utils/PluginFactory.h>
|
|
||||||
#include <viewpages/ViewStep.h>
|
|
||||||
|
|
||||||
#include <DllMacro.h>
|
|
||||||
|
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
class WelcomePage;
|
class WelcomePage;
|
||||||
|
Loading…
Reference in New Issue
Block a user