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 )
|
for( auto job : m_jobs )
|
||||||
{
|
{
|
||||||
emitProgress();
|
emitProgress();
|
||||||
|
cLog() << "Starting job" << job->prettyName();
|
||||||
connect( job.data(), &Job::progress, this, &JobThread::emitProgress );
|
connect( job.data(), &Job::progress, this, &JobThread::emitProgress );
|
||||||
JobResult result = job->exec();
|
JobResult result = job->exec();
|
||||||
if ( !result )
|
if ( !result )
|
||||||
@ -86,7 +87,6 @@ private:
|
|||||||
: tr( "Done" );
|
: tr( "Done" );
|
||||||
|
|
||||||
qreal percent = ( m_jobIndex + jobPercent ) / qreal( jobCount );
|
qreal percent = ( m_jobIndex + jobPercent ) / qreal( jobCount );
|
||||||
cLog() << Q_FUNC_INFO << "percent=" << percent * 100 << message;
|
|
||||||
|
|
||||||
QMetaObject::invokeMethod( m_queue, "progress", Qt::QueuedConnection,
|
QMetaObject::invokeMethod( m_queue, "progress", Qt::QueuedConnection,
|
||||||
Q_ARG( qreal, percent ),
|
Q_ARG( qreal, percent ),
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
|
|
||||||
|
#include "utils/Logger.h"
|
||||||
#include "viewpages/ViewStep.h"
|
#include "viewpages/ViewStep.h"
|
||||||
#include "InstallationViewStep.h"
|
#include "InstallationViewStep.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
@ -119,6 +120,10 @@ ViewManager::insertViewStep( int before, ViewStep* step)
|
|||||||
void
|
void
|
||||||
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
||||||
{
|
{
|
||||||
|
cLog() << "Installation failed:";
|
||||||
|
cLog() << "- message:" << message;
|
||||||
|
cLog() << "- details:" << details;
|
||||||
|
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setIcon( QMessageBox::Critical );
|
msgBox.setIcon( QMessageBox::Critical );
|
||||||
msgBox.setWindowTitle( tr("Error") );
|
msgBox.setWindowTitle( tr("Error") );
|
||||||
|
Loading…
Reference in New Issue
Block a user