Merge branch 'master' into annoy-sitter
This commit is contained in:
commit
ef065c1183
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -39,6 +40,7 @@ FinishedPage::FinishedPage( QWidget* parent )
|
||||
, ui( new Ui::FinishedPage )
|
||||
, m_restartSetUp( false )
|
||||
{
|
||||
cDebug() << "FinishedPage()";
|
||||
ui->setupUi( this );
|
||||
|
||||
ui->mainText->setAlignment( Qt::AlignCenter );
|
||||
@ -83,6 +85,7 @@ FinishedPage::setRestartNowCommand( const QString& command )
|
||||
void
|
||||
FinishedPage::setUpRestart()
|
||||
{
|
||||
cDebug() << "FinishedPage::setUpRestart()";
|
||||
if ( !m_restartSetUp )
|
||||
{
|
||||
connect( qApp, &QApplication::aboutToQuit,
|
||||
@ -102,3 +105,15 @@ FinishedPage::focusInEvent( QFocusEvent* e )
|
||||
e->accept();
|
||||
}
|
||||
|
||||
void
|
||||
FinishedPage::onInstallationFailed( const QString& message, const QString& details )
|
||||
{
|
||||
Q_UNUSED( message );
|
||||
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
|
||||
"%1 has not been installed on your computer.<br/>"
|
||||
"The error message was: %2." )
|
||||
.arg(Calamares::Branding::instance()->
|
||||
string( Calamares::Branding::VersionedName ) )
|
||||
.arg( details ) );
|
||||
setRestartNowEnabled( false );
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -38,6 +39,9 @@ public:
|
||||
|
||||
void setUpRestart();
|
||||
|
||||
public slots:
|
||||
void onInstallationFailed( const QString& message, const QString& details );
|
||||
|
||||
protected:
|
||||
void focusInEvent( QFocusEvent* e ) override; //choose the child widget to focus
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,8 +18,10 @@
|
||||
*/
|
||||
|
||||
#include "FinishedViewStep.h"
|
||||
|
||||
#include "FinishedPage.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
@ -26,6 +29,11 @@ FinishedViewStep::FinishedViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
, m_widget( new FinishedPage() )
|
||||
{
|
||||
cDebug() << "FinishedViewStep()";
|
||||
|
||||
connect( Calamares::JobQueue::instance(), &Calamares::JobQueue::failed,
|
||||
m_widget, &FinishedPage::onInstallationFailed );
|
||||
|
||||
emit nextStatusChanged( true );
|
||||
}
|
||||
|
||||
@ -47,6 +55,7 @@ FinishedViewStep::prettyName() const
|
||||
QWidget*
|
||||
FinishedViewStep::widget()
|
||||
{
|
||||
cDebug() << "FinishedViewStep::widget()";
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
@ -94,6 +103,7 @@ FinishedViewStep::isAtEnd() const
|
||||
void
|
||||
FinishedViewStep::onActivate()
|
||||
{
|
||||
cDebug() << "FinishedViewStep::onActivate()";
|
||||
m_widget->setUpRestart();
|
||||
}
|
||||
|
||||
@ -101,6 +111,7 @@ FinishedViewStep::onActivate()
|
||||
QList< Calamares::job_ptr >
|
||||
FinishedViewStep::jobs() const
|
||||
{
|
||||
cDebug() << "FinishedViewStep::jobs";
|
||||
return QList< Calamares::job_ptr >();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user