mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[libcalamaresui] Unrelated typedef for JobList
This commit is contained in:
parent
eed207ae2e
commit
2d31e987c0
20 changed files with 31 additions and 29 deletions
|
@ -46,7 +46,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
void setJobs( const QList< job_ptr >& jobs )
|
||||
void setJobs( const JobList& jobs )
|
||||
{
|
||||
m_jobs = jobs;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
QList< job_ptr > m_jobs;
|
||||
JobList m_jobs;
|
||||
JobQueue* m_queue;
|
||||
int m_jobIndex;
|
||||
|
||||
|
@ -164,7 +164,7 @@ JobQueue::enqueue( const job_ptr& job )
|
|||
|
||||
|
||||
void
|
||||
JobQueue::enqueue( const QList< job_ptr >& jobs )
|
||||
JobQueue::enqueue( const JobList& jobs )
|
||||
{
|
||||
Q_ASSERT( !m_thread->isRunning() );
|
||||
m_jobs.append( jobs );
|
||||
|
|
|
@ -42,11 +42,11 @@ public:
|
|||
GlobalStorage* globalStorage() const;
|
||||
|
||||
void enqueue( const job_ptr& job );
|
||||
void enqueue( const QList< job_ptr >& jobs );
|
||||
void enqueue( const JobList& jobs );
|
||||
void start();
|
||||
|
||||
signals:
|
||||
void queueChanged( const QList< job_ptr >& jobs );
|
||||
void queueChanged( const JobList& jobs );
|
||||
void progress( qreal percent, const QString& prettyName );
|
||||
void finished();
|
||||
void failed( const QString& message, const QString& details );
|
||||
|
@ -54,7 +54,7 @@ signals:
|
|||
private:
|
||||
static JobQueue* s_instance;
|
||||
|
||||
QList< job_ptr > m_jobs;
|
||||
JobList m_jobs;
|
||||
JobThread* m_thread;
|
||||
GlobalStorage* m_storage;
|
||||
};
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef TYPEDEFS_H
|
||||
#define TYPEDEFS_H
|
||||
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace Calamares
|
||||
|
@ -26,6 +27,7 @@ namespace Calamares
|
|||
class Job;
|
||||
|
||||
typedef QSharedPointer< Job > job_ptr;
|
||||
using JobList = QList< job_ptr >;
|
||||
|
||||
enum ModuleAction : char
|
||||
{
|
||||
|
|
|
@ -148,10 +148,10 @@ ExecutionViewStep::onActivate()
|
|||
}
|
||||
|
||||
|
||||
QList< Calamares::job_ptr >
|
||||
JobList
|
||||
ExecutionViewStep::jobs() const
|
||||
{
|
||||
return QList< Calamares::job_ptr >();
|
||||
return JobList();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
void onActivate() override;
|
||||
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
void appendJobModuleInstanceKey( const QString& instanceKey );
|
||||
|
||||
|
|
|
@ -75,10 +75,10 @@ CppJobModule::loadSelf()
|
|||
}
|
||||
|
||||
|
||||
QList< job_ptr >
|
||||
JobList
|
||||
CppJobModule::jobs() const
|
||||
{
|
||||
return QList< job_ptr >() << m_job;
|
||||
return JobList() << m_job;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
Interface interface() const override;
|
||||
|
||||
void loadSelf() override;
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
protected:
|
||||
void initFrom( const QVariantMap& moduleDescriptor ) override;
|
||||
|
|
|
@ -70,7 +70,6 @@ public:
|
|||
ProcessInterface,
|
||||
PythonQtInterface
|
||||
};
|
||||
virtual ~Module();
|
||||
|
||||
/**
|
||||
* @brief fromDescriptor creates a new Module object of the correct type.
|
||||
|
@ -84,6 +83,7 @@ public:
|
|||
const QString& instanceId,
|
||||
const QString& configFileName,
|
||||
const QString& moduleDirectory );
|
||||
virtual ~Module();
|
||||
|
||||
/**
|
||||
* @brief name returns the name of this module.
|
||||
|
@ -159,7 +159,7 @@ public:
|
|||
* @brief jobs returns any jobs exposed by this module.
|
||||
* @return a list of jobs (can be empty).
|
||||
*/
|
||||
virtual QList< job_ptr > jobs() const = 0;
|
||||
virtual JobList jobs() const = 0;
|
||||
|
||||
/**
|
||||
* @brief configurationMap returns the contents of the configuration file for
|
||||
|
|
|
@ -53,10 +53,10 @@ ProcessJobModule::loadSelf()
|
|||
}
|
||||
|
||||
|
||||
QList< job_ptr >
|
||||
JobList
|
||||
ProcessJobModule::jobs() const
|
||||
{
|
||||
return QList< job_ptr >() << m_job;
|
||||
return JobList() << m_job;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
Interface interface() const override;
|
||||
|
||||
void loadSelf() override;
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
protected:
|
||||
void initFrom( const QVariantMap& moduleDescriptor ) override;
|
||||
|
|
|
@ -53,10 +53,10 @@ PythonJobModule::loadSelf()
|
|||
}
|
||||
|
||||
|
||||
QList< job_ptr >
|
||||
JobList
|
||||
PythonJobModule::jobs() const
|
||||
{
|
||||
return QList< job_ptr >() << m_job;
|
||||
return JobList() << m_job;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
Interface interface() const override;
|
||||
|
||||
void loadSelf() override;
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
protected:
|
||||
void initFrom( const QVariantMap& moduleDescriptor ) override;
|
||||
|
|
|
@ -171,7 +171,7 @@ PythonQtViewModule::loadSelf()
|
|||
}
|
||||
|
||||
|
||||
QList< job_ptr >
|
||||
JobList
|
||||
PythonQtViewModule::jobs() const
|
||||
{
|
||||
return m_viewStep->jobs();
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
Interface interface() const override;
|
||||
|
||||
void loadSelf() override;
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
protected:
|
||||
void initFrom( const QVariantMap& moduleDescriptor ) override;
|
||||
|
|
|
@ -76,7 +76,7 @@ ViewModule::loadSelf()
|
|||
}
|
||||
|
||||
|
||||
QList< job_ptr >
|
||||
JobList
|
||||
ViewModule::jobs() const
|
||||
{
|
||||
return m_viewStep->jobs();
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
Interface interface() const override;
|
||||
|
||||
void loadSelf() override;
|
||||
QList< job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
protected:
|
||||
void initFrom( const QVariantMap& moduleDescriptor ) override;
|
||||
|
|
|
@ -62,7 +62,7 @@ DebugWindow::DebugWindow()
|
|||
// JobQueue page
|
||||
jobQueueText->setReadOnly( true );
|
||||
connect( JobQueue::instance(), &JobQueue::queueChanged,
|
||||
this, [ this ]( const QList< Calamares::job_ptr >& jobs )
|
||||
this, [ this ]( const JobList& jobs )
|
||||
{
|
||||
QStringList text;
|
||||
for ( const auto &job : jobs )
|
||||
|
|
|
@ -159,10 +159,10 @@ PythonQtViewStep::isAtEnd() const
|
|||
}
|
||||
|
||||
|
||||
QList< Calamares::job_ptr >
|
||||
JobList
|
||||
PythonQtViewStep::jobs() const
|
||||
{
|
||||
QList< Calamares::job_ptr > jobs;
|
||||
JobList jobs;
|
||||
|
||||
PythonQtObjectPtr jobsCallable = PythonQt::self()->lookupCallable( m_obj, "jobs" );
|
||||
if ( jobsCallable.isNull() )
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
bool isAtBeginning() const override;
|
||||
bool isAtEnd() const override;
|
||||
|
||||
QList< Calamares::job_ptr > jobs() const override;
|
||||
JobList jobs() const override;
|
||||
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
*/
|
||||
virtual void onLeave();
|
||||
|
||||
virtual QList< job_ptr > jobs() const = 0;
|
||||
virtual JobList jobs() const = 0;
|
||||
|
||||
void setModuleInstanceKey( const QString& instanceKey );
|
||||
QString moduleInstanceKey() const
|
||||
|
|
Loading…
Add table
Reference in a new issue