diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index b5bdf0543..339fd8457 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -54,7 +54,7 @@ public: for( auto job : m_jobs ) { emitProgress(); - cLog() << "Starting job" << job->prettyName(); + cDebug() << "Starting job" << job->prettyName(); connect( job.data(), &Job::progress, this, &JobThread::emitProgress ); JobResult result = job->exec(); if ( !result ) diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 2c8cb0809..2da602d23 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -41,7 +41,7 @@ namespace Logger class DLLEXPORT CLog : public QDebug { public: - CLog( unsigned int debugLevel = 0 ); + explicit CLog( unsigned int debugLevel ); virtual ~CLog(); private: @@ -79,7 +79,6 @@ namespace Logger DLLEXPORT void setupLogLevel( unsigned int level ); } -#define cLog Logger::CLog #define cDebug Logger::CDebug #define cWarning() Logger::CDebug(Logger::LOGWARNING) << "WARNING:" #define cError() Logger::CDebug(Logger::LOGERROR) << "ERROR:" diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp index 2be3e3832..e597bf6a3 100644 --- a/src/libcalamaresui/ViewManager.cpp +++ b/src/libcalamaresui/ViewManager.cpp @@ -150,9 +150,9 @@ ViewManager::insertViewStep( int before, ViewStep* step ) void ViewManager::onInstallationFailed( const QString& message, const QString& details ) { - cLog() << "Installation failed:"; - cLog() << "- message:" << message; - cLog() << "- details:" << details; + cError() << "Installation failed:"; + cDebug() << "- message:" << message; + cDebug() << "- details:" << details; QMessageBox* msgBox = new QMessageBox(); msgBox->setIcon( QMessageBox::Critical ); @@ -167,7 +167,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail msgBox->setInformativeText( text ); connect( msgBox, &QMessageBox::buttonClicked, qApp, &QApplication::quit ); - cLog() << "Calamares will quit when the dialog closes."; + cDebug() << "Calamares will quit when the dialog closes."; msgBox->show(); } diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp index bf61843d0..0265da29d 100644 --- a/src/modules/partition/core/PartitionModel.cpp +++ b/src/modules/partition/core/PartitionModel.cpp @@ -115,7 +115,7 @@ PartitionModel::parent( const QModelIndex& child ) const return createIndex( row, 0, parentNode ); ++row; } - cLog() << "No parent found!"; + cWarning() << "No parent found!"; return QModelIndex(); } diff --git a/src/modules/users/SetHostNameJob.cpp b/src/modules/users/SetHostNameJob.cpp index 948f78d17..87c89c3b8 100644 --- a/src/modules/users/SetHostNameJob.cpp +++ b/src/modules/users/SetHostNameJob.cpp @@ -57,21 +57,21 @@ Calamares::JobResult SetHostNameJob::exec() if ( !gs || !gs->contains( "rootMountPoint" ) ) { - cLog() << "No rootMountPoint in global storage"; + cError() << "No rootMountPoint in global storage"; return Calamares::JobResult::error( tr( "Internal Error" ) ); } QString destDir = gs->value( "rootMountPoint" ).toString(); if ( !QDir( destDir ).exists() ) { - cLog() << "rootMountPoint points to a dir which does not exist"; + cError() << "rootMountPoint points to a dir which does not exist"; return Calamares::JobResult::error( tr( "Internal Error" ) ); } QFile hostfile( destDir + "/etc/hostname" ); if ( !hostfile.open( QFile::WriteOnly ) ) { - cLog() << "Can't write to hostname file"; + cError() << "Can't write to hostname file"; return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) ); } @@ -82,7 +82,7 @@ Calamares::JobResult SetHostNameJob::exec() QFile hostsfile( destDir + "/etc/hosts" ); if ( !hostsfile.open( QFile::WriteOnly ) ) { - cLog() << "Can't write to hosts file"; + cError() << "Can't write to hosts file"; return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) ); }