Make logging more useful
- Do not log progress percent but log job names. - Log install failures.
This commit is contained in:
parent
d175d199eb
commit
70a13fc588
@ -55,6 +55,7 @@ public:
|
||||
for( auto job : m_jobs )
|
||||
{
|
||||
emitProgress();
|
||||
cLog() << "Starting job" << job->prettyName();
|
||||
connect( job.data(), &Job::progress, this, &JobThread::emitProgress );
|
||||
JobResult result = job->exec();
|
||||
if ( !result )
|
||||
@ -86,7 +87,6 @@ private:
|
||||
: tr( "Done" );
|
||||
|
||||
qreal percent = ( m_jobIndex + jobPercent ) / qreal( jobCount );
|
||||
cLog() << Q_FUNC_INFO << "percent=" << percent * 100 << message;
|
||||
|
||||
QMetaObject::invokeMethod( m_queue, "progress", Qt::QueuedConnection,
|
||||
Q_ARG( qreal, percent ),
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
#include "InstallationViewStep.h"
|
||||
#include "JobQueue.h"
|
||||
@ -119,6 +120,10 @@ ViewManager::insertViewStep( int before, ViewStep* step)
|
||||
void
|
||||
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
||||
{
|
||||
cLog() << "Installation failed:";
|
||||
cLog() << "- message:" << message;
|
||||
cLog() << "- details:" << details;
|
||||
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon( QMessageBox::Critical );
|
||||
msgBox.setWindowTitle( tr("Error") );
|
||||
|
Loading…
Reference in New Issue
Block a user