From: Kevin Ottens Date: Wed, 18 Nov 2020 14:58:07 +0000 (+0100) Subject: Please the clang-tidy overlord X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~46^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4906353f2e1817cf4f97a253d19e07a874a5f21f;p=nextcloud-desktop.git Please the clang-tidy overlord Signed-off-by: Kevin Ottens --- diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp index 3c379e9c3..fe6d45513 100644 --- a/src/gui/updater/ocupdater.cpp +++ b/src/gui/updater/ocupdater.cpp @@ -427,7 +427,7 @@ void NSISUpdater::showNoUrlDialog(const UpdateInfo &info) void NSISUpdater::showUpdateErrorDialog(const QString &targetVersion) { - QDialog *msgBox = new QDialog; + auto msgBox = new QDialog; msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setWindowFlags(msgBox->windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -436,16 +436,16 @@ void NSISUpdater::showUpdateErrorDialog(const QString &targetVersion) msgBox->setWindowIcon(infoIcon); - QVBoxLayout *layout = new QVBoxLayout(msgBox); - QHBoxLayout *hlayout = new QHBoxLayout; + auto layout = new QVBoxLayout(msgBox); + auto hlayout = new QHBoxLayout; layout->addLayout(hlayout); msgBox->setWindowTitle(tr("Update Failed")); - QLabel *ico = new QLabel; + auto ico = new QLabel; ico->setFixedSize(iconSize, iconSize); ico->setPixmap(infoIcon.pixmap(iconSize)); - QLabel *lbl = new QLabel; + auto lbl = new QLabel; QString txt = tr("

A new version of the %1 Client is available but the updating process failed.

" "

%2 has been downloaded. The installed version is %3.

") .arg(Utility::escape(Theme::instance()->appNameGUI()), @@ -458,11 +458,11 @@ void NSISUpdater::showUpdateErrorDialog(const QString &targetVersion) hlayout->addWidget(ico); hlayout->addWidget(lbl); - QDialogButtonBox *bb = new QDialogButtonBox; - QPushButton *skip = bb->addButton(tr("Skip this version"), QDialogButtonBox::ResetRole); - QPushButton *askagain = bb->addButton(tr("Ask again later"), QDialogButtonBox::ResetRole); - QPushButton *retry = bb->addButton(tr("Restart and update"), QDialogButtonBox::AcceptRole); - QPushButton *getupdate = bb->addButton(tr("Update manually"), QDialogButtonBox::AcceptRole); + auto bb = new QDialogButtonBox; + auto skip = bb->addButton(tr("Skip this version"), QDialogButtonBox::ResetRole); + auto askagain = bb->addButton(tr("Ask again later"), QDialogButtonBox::ResetRole); + auto retry = bb->addButton(tr("Restart and update"), QDialogButtonBox::AcceptRole); + auto getupdate = bb->addButton(tr("Update manually"), QDialogButtonBox::AcceptRole); connect(skip, &QAbstractButton::clicked, msgBox, &QDialog::reject); connect(askagain, &QAbstractButton::clicked, msgBox, &QDialog::reject);