[libcalamaresui] Run clang-format
This commit is contained in:
parent
2dd77ee828
commit
2f2a418cc4
@ -17,6 +17,7 @@
|
||||
#include "JobQueue.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#include "utils/ErrorDialog/ErrorDialog.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Paste.h"
|
||||
#include "utils/Retranslator.h"
|
||||
@ -25,15 +26,14 @@
|
||||
#include "viewpages/ExecutionViewStep.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
#include "widgets/TranslationFix.h"
|
||||
#include "utils/ErrorDialog/ErrorDialog.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBoxLayout>
|
||||
#include <QClipboard>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QMetaObject>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
#define UPDATE_BUTTON_PROPERTY( name, value ) \
|
||||
do \
|
||||
@ -172,7 +172,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
||||
errorDialog->show();
|
||||
|
||||
cDebug() << "Calamares will quit when the dialog closes.";
|
||||
connect( errorDialog, &QDialog::finished, [errorDialog]( int result ) {
|
||||
connect( errorDialog,
|
||||
&QDialog::finished,
|
||||
[ errorDialog ]( int result )
|
||||
{
|
||||
if ( result == QDialog::Accepted && errorDialog->shouldOfferWebPaste() )
|
||||
{
|
||||
CalamaresUtils::Paste::doLogUploadUI( errorDialog );
|
||||
|
@ -1,16 +1,17 @@
|
||||
#include "ErrorDialog.h"
|
||||
#include "ui_ErrorDialog.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QDialogButtonBox>
|
||||
#include "widgets/TranslationFix.h"
|
||||
#include <QDialogButtonBox>
|
||||
#include <QIcon>
|
||||
|
||||
namespace Calamares {
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
|
||||
ErrorDialog::ErrorDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ErrorDialog)
|
||||
ErrorDialog::ErrorDialog( QWidget* parent )
|
||||
: QDialog( parent )
|
||||
, ui( new Ui::ErrorDialog )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
ui->iconLabel->setPixmap( QIcon::fromTheme( "dialog-error" ).pixmap( 64 ) );
|
||||
@ -24,22 +25,26 @@ ErrorDialog::~ErrorDialog()
|
||||
}
|
||||
|
||||
|
||||
QString ErrorDialog::heading() const
|
||||
QString
|
||||
ErrorDialog::heading() const
|
||||
{
|
||||
return ui->headingLabel->text();
|
||||
}
|
||||
|
||||
QString ErrorDialog::informativeText() const
|
||||
QString
|
||||
ErrorDialog::informativeText() const
|
||||
{
|
||||
return ui->informativeTextLabel->text();
|
||||
}
|
||||
|
||||
QString ErrorDialog::details() const
|
||||
QString
|
||||
ErrorDialog::details() const
|
||||
{
|
||||
return ui->detailsBrowser->toPlainText();
|
||||
}
|
||||
|
||||
void ErrorDialog::setHeading(const QString &newHeading)
|
||||
void
|
||||
ErrorDialog::setHeading( const QString& newHeading )
|
||||
{
|
||||
if ( ui->headingLabel->text() == newHeading )
|
||||
return;
|
||||
@ -47,7 +52,8 @@ void ErrorDialog::setHeading(const QString &newHeading)
|
||||
emit headingChanged();
|
||||
}
|
||||
|
||||
void ErrorDialog::setInformativeText(const QString &newInformativeText)
|
||||
void
|
||||
ErrorDialog::setInformativeText( const QString& newInformativeText )
|
||||
{
|
||||
if ( ui->informativeTextLabel->text() == newInformativeText )
|
||||
return;
|
||||
@ -55,7 +61,8 @@ void ErrorDialog::setInformativeText(const QString &newInformativeText)
|
||||
emit informativeTextChanged();
|
||||
}
|
||||
|
||||
void ErrorDialog::setDetails(const QString &newDetails)
|
||||
void
|
||||
ErrorDialog::setDetails( const QString& newDetails )
|
||||
{
|
||||
if ( ui->detailsBrowser->toPlainText() == newDetails )
|
||||
return;
|
||||
@ -66,12 +73,14 @@ void ErrorDialog::setDetails(const QString &newDetails)
|
||||
emit detailsChanged();
|
||||
}
|
||||
|
||||
bool ErrorDialog::shouldOfferWebPaste() const
|
||||
bool
|
||||
ErrorDialog::shouldOfferWebPaste() const
|
||||
{
|
||||
return m_shouldOfferWebPaste;
|
||||
}
|
||||
|
||||
void ErrorDialog::setShouldOfferWebPaste(bool newShouldOfferWebPaste)
|
||||
void
|
||||
ErrorDialog::setShouldOfferWebPaste( bool newShouldOfferWebPaste )
|
||||
{
|
||||
if ( m_shouldOfferWebPaste == newShouldOfferWebPaste )
|
||||
return;
|
||||
@ -79,8 +88,7 @@ void ErrorDialog::setShouldOfferWebPaste(bool newShouldOfferWebPaste)
|
||||
|
||||
ui->offerWebPasteLabel->setVisible( m_shouldOfferWebPaste );
|
||||
|
||||
ui->buttonBox->setStandardButtons( m_shouldOfferWebPaste
|
||||
? (QDialogButtonBox::Yes | QDialogButtonBox::No)
|
||||
ui->buttonBox->setStandardButtons( m_shouldOfferWebPaste ? ( QDialogButtonBox::Yes | QDialogButtonBox::No )
|
||||
: QDialogButtonBox::Close );
|
||||
|
||||
fixButtonLabels( ui->buttonBox );
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class ErrorDialog;
|
||||
}
|
||||
class QDialogButtonBox;
|
||||
@ -17,7 +18,8 @@ class ErrorDialog : public QDialog
|
||||
Q_PROPERTY( QString heading READ heading WRITE setHeading NOTIFY headingChanged )
|
||||
Q_PROPERTY( QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged )
|
||||
Q_PROPERTY( QString details READ details WRITE setDetails NOTIFY detailsChanged )
|
||||
Q_PROPERTY(bool shouldOfferWebPaste READ shouldOfferWebPaste WRITE setShouldOfferWebPaste NOTIFY shouldOfferWebPasteChanged)
|
||||
Q_PROPERTY( bool shouldOfferWebPaste READ shouldOfferWebPaste WRITE setShouldOfferWebPaste NOTIFY
|
||||
shouldOfferWebPasteChanged )
|
||||
|
||||
public:
|
||||
explicit ErrorDialog( QWidget* parent = nullptr );
|
||||
|
Loading…
Reference in New Issue
Block a user