Style fixes
Run calamaresstyle over new classes
This commit is contained in:
parent
4a4dc74f5c
commit
a0a3b4dc49
@ -25,15 +25,15 @@
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
SetHostNameJob::SetHostNameJob(const QString& hostname)
|
||||
SetHostNameJob::SetHostNameJob( const QString& hostname )
|
||||
: Calamares::Job()
|
||||
, m_hostname(hostname)
|
||||
, m_hostname( hostname )
|
||||
{
|
||||
}
|
||||
|
||||
QString SetHostNameJob::prettyName() const
|
||||
{
|
||||
return tr( "Set hostname %1" ).arg( m_hostname );
|
||||
return tr( "Set hostname %1" ).arg( m_hostname );
|
||||
}
|
||||
|
||||
Calamares::JobResult SetHostNameJob::exec()
|
||||
@ -53,14 +53,14 @@ Calamares::JobResult SetHostNameJob::exec()
|
||||
return Calamares::JobResult::error( tr( "Internal Error" ) );
|
||||
}
|
||||
|
||||
QFile hostfile(destDir + "/etc/hostname");
|
||||
if (!hostfile.open(QFile::WriteOnly))
|
||||
QFile hostfile( destDir + "/etc/hostname" );
|
||||
if ( !hostfile.open( QFile::WriteOnly ) )
|
||||
{
|
||||
cLog() << "Can't write to hostname file";
|
||||
return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) );
|
||||
}
|
||||
|
||||
QTextStream out(&hostfile);
|
||||
QTextStream out( &hostfile );
|
||||
out << m_hostname << "\n";
|
||||
hostfile.close();
|
||||
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
class SetHostNameJob : public Calamares::Job
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
SetHostNameJob(const QString &hostname);
|
||||
SetHostNameJob( const QString& hostname );
|
||||
QString prettyName() const override;
|
||||
Calamares::JobResult exec() override;
|
||||
private:
|
||||
const QString m_hostname;
|
||||
const QString m_hostname;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user