Commit e3956369 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

clang-tidy: modernize-use-auto

parent 71765c00
......@@ -28,7 +28,7 @@ AboutBugReportingDialog::AboutBugReportingDialog(QWidget *parent)
setWindowIcon(QIcon::fromTheme(QStringLiteral("help-hint")));
setWindowTitle(i18nc("@title title of the dialog", "About Bug Reporting - Help"));
QVBoxLayout *layout = new QVBoxLayout(this);
auto *layout = new QVBoxLayout(this);
m_textBrowser = new QTextBrowser(this);
m_textBrowser->setMinimumSize(QSize(600, 300));
connect(m_textBrowser, &QTextBrowser::anchorClicked, this, &AboutBugReportingDialog::handleInternalLinks);
......@@ -222,7 +222,7 @@ AboutBugReportingDialog::AboutBugReportingDialog(QWidget *parent)
layout->addWidget(m_textBrowser);
QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Close, this);
auto *box = new QDialogButtonBox(QDialogButtonBox::Close, this);
connect(box->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &AboutBugReportingDialog::close);
layout->addWidget(box);
......
......@@ -139,7 +139,7 @@ private Q_SLOTS:
// in the wrong thread!) and may fail assertions inside Qt when built
// in debug mode as destruction entails posting events, which is ENOGOOD
// across threads.
QTcpServer *server = new QTcpServer;
auto *server = new QTcpServer;
server->moveToThread(&thread);
QString readBlob; // lambda member essentially
......
......@@ -12,7 +12,7 @@ namespace Bugzilla
{
QList<int> AttachmentClient::createAttachment(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
auto ary = job->object().value(QStringLiteral("ids")).toArray();
// It's unclear if this can happen. When the ids would be empty there was
......
......@@ -10,7 +10,7 @@ namespace Bugzilla
{
QList<Bug::Ptr> BugClient::search(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
auto ary = job->object().value(QStringLiteral("bugs")).toArray();
......@@ -29,7 +29,7 @@ KJob *BugClient::search(const BugSearch &search)
qint64 BugClient::create(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
qint64 ret = job->object().value(QStringLiteral("id")).toInt(-1);
Q_ASSERT(ret != -1);
......@@ -43,7 +43,7 @@ KJob *BugClient::create(const NewBug &bug)
qint64 BugClient::update(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
auto ary = job->object().value(QStringLiteral("bugs")).toArray();
// It's unclear if this can happen. When the ids would be empty there was
......
......@@ -15,7 +15,7 @@ KJob *BugFieldClient::getFields(const QString &idOrName)
QList<BugField::Ptr> BugFieldClient::getFields(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
const auto ary = job->object().value(QStringLiteral("fields")).toArray();
......
......@@ -40,7 +40,7 @@ QVariantHash JsonCommand::toVariantHash() const
// If this is a nested representation, serialize it and glue it in.
if (value.canConvert<JsonCommand *>()) {
JsonCommand *repValue = value.value<JsonCommand *>();
auto *repValue = value.value<JsonCommand *>();
hash.insert(name, repValue->toVariantHash());
continue;
}
......
......@@ -12,7 +12,7 @@ namespace Bugzilla
{
QList<Comment::Ptr> CommentClient::getFromBug(KJob *kjob)
{
APIJob *job = qobject_cast<APIJob *>(kjob);
auto *job = qobject_cast<APIJob *>(kjob);
QJsonObject bugs = job->object().value(QStringLiteral("bugs")).toObject();
// The API should never return anything other than the single bug we asked for.
......
......@@ -54,9 +54,9 @@ ReportAssistantDialog::ReportAssistantDialog(QWidget *parent)
const bool skipIntroduction = group.readEntry("SkipIntroduction", false);
if (!skipIntroduction) {
IntroductionPage *m_introduction = new IntroductionPage(this);
auto *m_introduction = new IntroductionPage(this);
KPageWidgetItem *m_introductionPage = new KPageWidgetItem(m_introduction, QLatin1String(PAGE_INTRODUCTION_ID));
auto *m_introductionPage = new KPageWidgetItem(m_introduction, QLatin1String(PAGE_INTRODUCTION_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_INTRODUCTION_ID), m_introductionPage);
m_introductionPage->setHeader(i18nc("@title", "Welcome to the Reporting Assistant"));
m_introductionPage->setIcon(QIcon::fromTheme(QStringLiteral("tools-report-bug")));
......@@ -64,77 +64,77 @@ ReportAssistantDialog::ReportAssistantDialog(QWidget *parent)
}
//-Bug Awareness Page
BugAwarenessPage *m_awareness = new BugAwarenessPage(this);
auto *m_awareness = new BugAwarenessPage(this);
connectSignals(m_awareness);
KPageWidgetItem *m_awarenessPage = new KPageWidgetItem(m_awareness, QLatin1String(PAGE_AWARENESS_ID));
auto *m_awarenessPage = new KPageWidgetItem(m_awareness, QLatin1String(PAGE_AWARENESS_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_AWARENESS_ID), m_awarenessPage);
m_awarenessPage->setHeader(i18nc("@title", "What do you know about the crash?"));
m_awarenessPage->setIcon(QIcon::fromTheme(QStringLiteral("checkbox")));
//-Crash Information Page
CrashInformationPage *m_backtrace = new CrashInformationPage(this);
auto *m_backtrace = new CrashInformationPage(this);
connectSignals(m_backtrace);
KPageWidgetItem *m_backtracePage = new KPageWidgetItem(m_backtrace, QLatin1String(PAGE_CRASHINFORMATION_ID));
auto *m_backtracePage = new KPageWidgetItem(m_backtrace, QLatin1String(PAGE_CRASHINFORMATION_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_CRASHINFORMATION_ID), m_backtracePage);
m_backtracePage->setHeader(i18nc("@title", "Fetching the Backtrace (Automatic Crash Information)"));
m_backtracePage->setIcon(QIcon::fromTheme(QStringLiteral("run-build")));
//-Results Page
ConclusionPage *m_conclusions = new ConclusionPage(this);
auto *m_conclusions = new ConclusionPage(this);
connectSignals(m_conclusions);
KPageWidgetItem *m_conclusionsPage = new KPageWidgetItem(m_conclusions, QLatin1String(PAGE_CONCLUSIONS_ID));
auto *m_conclusionsPage = new KPageWidgetItem(m_conclusions, QLatin1String(PAGE_CONCLUSIONS_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_CONCLUSIONS_ID), m_conclusionsPage);
m_conclusionsPage->setHeader(i18nc("@title", "Results of the Analyzed Crash Details"));
m_conclusionsPage->setIcon(QIcon::fromTheme(QStringLiteral("dialog-information")));
connect(m_conclusions, &ConclusionPage::finished, this, &ReportAssistantDialog::assistantFinished);
// Version check page
BugzillaVersionPage *versionPage = new BugzillaVersionPage(this);
auto *versionPage = new BugzillaVersionPage(this);
m_pageWidgetMap.insert(QLatin1String(PAGE_BZVERSION_ID), versionPage->item());
//-Bugzilla Login
BugzillaLoginPage *m_bugzillaLogin = new BugzillaLoginPage(this);
auto *m_bugzillaLogin = new BugzillaLoginPage(this);
connectSignals(m_bugzillaLogin);
KPageWidgetItem *m_bugzillaLoginPage = new KPageWidgetItem(m_bugzillaLogin, QLatin1String(PAGE_BZLOGIN_ID));
auto *m_bugzillaLoginPage = new KPageWidgetItem(m_bugzillaLogin, QLatin1String(PAGE_BZLOGIN_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_BZLOGIN_ID), m_bugzillaLoginPage);
m_bugzillaLoginPage->setHeader(i18nc("@title", "Login into %1", i18n(KDE_BUGZILLA_DESCRIPTION)));
m_bugzillaLoginPage->setIcon(QIcon::fromTheme(QStringLiteral("user-identity")));
connect(m_bugzillaLogin, &BugzillaLoginPage::loggedTurnToNextPage, this, &ReportAssistantDialog::loginFinished);
//-Bugzilla duplicates
BugzillaDuplicatesPage *m_bugzillaDuplicates = new BugzillaDuplicatesPage(this);
auto *m_bugzillaDuplicates = new BugzillaDuplicatesPage(this);
connectSignals(m_bugzillaDuplicates);
KPageWidgetItem *m_bugzillaDuplicatesPage = new KPageWidgetItem(m_bugzillaDuplicates, QLatin1String(PAGE_BZDUPLICATES_ID));
auto *m_bugzillaDuplicatesPage = new KPageWidgetItem(m_bugzillaDuplicates, QLatin1String(PAGE_BZDUPLICATES_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_BZDUPLICATES_ID), m_bugzillaDuplicatesPage);
m_bugzillaDuplicatesPage->setHeader(i18nc("@title", "Look for Possible Duplicate Reports"));
m_bugzillaDuplicatesPage->setIcon(QIcon::fromTheme(QStringLiteral("repository")));
//-Bugzilla information
BugzillaInformationPage *m_bugzillaInformation = new BugzillaInformationPage(this);
auto *m_bugzillaInformation = new BugzillaInformationPage(this);
connectSignals(m_bugzillaInformation);
KPageWidgetItem *m_bugzillaInformationPage = new KPageWidgetItem(m_bugzillaInformation, QLatin1String(PAGE_BZDETAILS_ID));
auto *m_bugzillaInformationPage = new KPageWidgetItem(m_bugzillaInformation, QLatin1String(PAGE_BZDETAILS_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_BZDETAILS_ID), m_bugzillaInformationPage);
m_bugzillaInformationPage->setHeader(i18nc("@title", "Enter the Details about the Crash"));
m_bugzillaInformationPage->setIcon(QIcon::fromTheme(QStringLiteral("document-edit")));
//-Bugzilla Report Preview
BugzillaPreviewPage *m_bugzillaPreview = new BugzillaPreviewPage(this);
auto *m_bugzillaPreview = new BugzillaPreviewPage(this);
KPageWidgetItem *m_bugzillaPreviewPage = new KPageWidgetItem(m_bugzillaPreview, QLatin1String(PAGE_BZPREVIEW_ID));
auto *m_bugzillaPreviewPage = new KPageWidgetItem(m_bugzillaPreview, QLatin1String(PAGE_BZPREVIEW_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_BZPREVIEW_ID), m_bugzillaPreviewPage);
m_bugzillaPreviewPage->setHeader(i18nc("@title", "Preview the Report"));
m_bugzillaPreviewPage->setIcon(QIcon::fromTheme(QStringLiteral("document-preview")));
//-Bugzilla commit
BugzillaSendPage *m_bugzillaSend = new BugzillaSendPage(this);
auto *m_bugzillaSend = new BugzillaSendPage(this);
KPageWidgetItem *m_bugzillaSendPage = new KPageWidgetItem(m_bugzillaSend, QLatin1String(PAGE_BZSEND_ID));
auto *m_bugzillaSendPage = new KPageWidgetItem(m_bugzillaSend, QLatin1String(PAGE_BZSEND_ID));
m_pageWidgetMap.insert(QLatin1String(PAGE_BZSEND_ID), m_bugzillaSendPage);
m_bugzillaSendPage->setHeader(i18nc("@title", "Sending the Crash Report"));
m_bugzillaSendPage->setIcon(QIcon::fromTheme(QStringLiteral("applications-internet")));
......@@ -193,13 +193,13 @@ void ReportAssistantDialog::currentPageChanged_slot(KPageWidgetItem *current, KP
// Save data of the previous page
if (before) {
ReportAssistantPage *beforePage = qobject_cast<ReportAssistantPage *>(before->widget());
auto *beforePage = qobject_cast<ReportAssistantPage *>(before->widget());
beforePage->aboutToHide();
}
// Load data of the current(new) page
if (current) {
ReportAssistantPage *currentPage = qobject_cast<ReportAssistantPage *>(current->widget());
auto *currentPage = qobject_cast<ReportAssistantPage *>(current->widget());
if (!currentPage->isAppropriate()) {
// The page is inappropriate. Find where to go next. This is extra exhausting because
......@@ -314,7 +314,7 @@ void ReportAssistantDialog::next()
// just skip over the page).
// Allow the widget to Ask a question to the user before changing the page
ReportAssistantPage *page = qobject_cast<ReportAssistantPage *>(currentPage()->widget());
auto *page = qobject_cast<ReportAssistantPage *>(currentPage()->widget());
if (page && !page->showNextPage()) {
return;
}
......
......@@ -48,7 +48,7 @@ CrashInformationPage::CrashInformationPage(ReportAssistantDialog *parent)
m_backtraceWidget = new BacktraceWidget(DrKonqi::debuggerManager()->backtraceGenerator(), this, true);
connect(m_backtraceWidget, &BacktraceWidget::stateChanged, this, &CrashInformationPage::emitCompleteChanged);
QVBoxLayout *layout = new QVBoxLayout(this);
auto *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_backtraceWidget);
layout->addSpacing(10); // We need this for better usability until we get something better
......@@ -464,7 +464,7 @@ ReportInformationDialog::ReportInformationDialog(const QString &reportText)
ui.setupUi(this);
ui.m_reportInformationBrowser->setPlainText(reportText);
QPushButton *saveButton = new QPushButton(ui.buttonBox);
auto *saveButton = new QPushButton(ui.buttonBox);
KGuiItem::assign(saveButton,
KGuiItem2(i18nc("@action:button", "&Save to File..."),
QIcon::fromTheme(QStringLiteral("document-save")),
......
......@@ -44,9 +44,8 @@ BugzillaDuplicatesPage::BugzillaDuplicatesPage(ReportAssistantDialog *parent)
header->setSectionResizeMode(1, QHeaderView::Interactive);
// Create manual bug report entry (first one)
QTreeWidgetItem *customBugItem =
new QTreeWidgetItem(QStringList() << i18nc("@item:intable custom/manaul bug report number", "Manual")
<< i18nc("@item:intable custom bug report number description", "Manually enter a bug report ID"));
auto *customBugItem = new QTreeWidgetItem(QStringList() << i18nc("@item:intable custom/manaul bug report number", "Manual")
<< i18nc("@item:intable custom bug report number description", "Manually enter a bug report ID"));
customBugItem->setData(0, Qt::UserRole, QLatin1String("custom"));
customBugItem->setIcon(1, QIcon::fromTheme(QStringLiteral("edit-rename")));
......@@ -329,7 +328,7 @@ void BugzillaDuplicatesPage::searchFinished(const QList<Bugzilla::Bug::Ptr> &lis
QStringList fields = QStringList() << QString::number(bug->id()) << title;
QTreeWidgetItem *item = new QTreeWidgetItem(fields);
auto *item = new QTreeWidgetItem(fields);
item->setToolTip(0, bug->summary());
item->setToolTip(1, bug->summary());
......@@ -338,7 +337,7 @@ void BugzillaDuplicatesPage::searchFinished(const QList<Bugzilla::Bug::Ptr> &lis
if (!m_foundDuplicate) {
markAsSearching(true);
DuplicateFinderJob *job = new DuplicateFinderJob(list, bugzillaManager(), this);
auto *job = new DuplicateFinderJob(list, bugzillaManager(), this);
connect(job, &KJob::result, this, &BugzillaDuplicatesPage::analyzedDuplicates);
job->start();
}
......@@ -401,7 +400,7 @@ void BugzillaDuplicatesPage::analyzedDuplicates(KJob *j)
{
markAsSearching(false);
DuplicateFinderJob *job = static_cast<DuplicateFinderJob *>(j);
auto *job = static_cast<DuplicateFinderJob *>(j);
m_result = job->result();
m_foundDuplicate = m_result.parentDuplicate;
reportInterface()->setDuplicateId(m_result.parentDuplicate);
......@@ -520,7 +519,7 @@ void BugzillaDuplicatesPage::showReportInformationDialog(int bugNumber, bool rel
return;
}
BugzillaReportInformationDialog *infoDialog = new BugzillaReportInformationDialog(this);
auto *infoDialog = new BugzillaReportInformationDialog(this);
connect(infoDialog, &BugzillaReportInformationDialog::possibleDuplicateSelected, this, &BugzillaDuplicatesPage::addPossibleDuplicateNumber);
connect(infoDialog, &BugzillaReportInformationDialog::attachToBugReportSelected, this, &BugzillaDuplicatesPage::attachToBugReport);
......@@ -809,7 +808,7 @@ void BugzillaReportInformationDialog::onCommentsFetched(QList<Bugzilla::Comment:
Q_ASSERT(m_bug);
// Generate html for comments (with proper numbering)
QLatin1String duplicatesMark = QLatin1String("has been marked as a duplicate of this bug.");
auto duplicatesMark = QLatin1String("has been marked as a duplicate of this bug.");
// TODO: the way comment objects are turned into comment strings is fairly
// awkward and does not particularly object-centric. May benefit from a
......@@ -828,7 +827,7 @@ void BugzillaReportInformationDialog::onCommentsFetched(QList<Bugzilla::Comment:
comments +=
i18nc("comment $number to use as subtitle", "<h4>Comment %1:</h4>", (i + 1)) + QStringLiteral("<p>") + comment + QStringLiteral("</p><hr />");
// Count the inline attached crashes (DrKonqi feature)
QLatin1String attachedCrashMark = QLatin1String("New crash information added by DrKonqi");
auto attachedCrashMark = QLatin1String("New crash information added by DrKonqi");
if (comment.contains(attachedCrashMark)) {
m_duplicatesCount++;
}
......@@ -910,7 +909,7 @@ void BugzillaReportInformationDialog::cancelAssistant()
void BugzillaReportInformationDialog::relatedReportClicked()
{
BugzillaReportConfirmationDialog *confirmation = new BugzillaReportConfirmationDialog(m_bugNumber, (m_duplicatesCount >= 10), m_closedStateString, this);
auto *confirmation = new BugzillaReportConfirmationDialog(m_bugNumber, (m_duplicatesCount >= 10), m_closedStateString, this);
confirmation->show();
}
......
......@@ -98,7 +98,7 @@ void DebuggerManager::onDebuggerFinished()
void DebuggerManager::onDebuggerInvalidated()
{
AbstractDebuggerLauncher *launcher = qobject_cast<AbstractDebuggerLauncher *>(sender());
auto *launcher = qobject_cast<AbstractDebuggerLauncher *>(sender());
Q_ASSERT(launcher);
int index = d->externalDebuggers.indexOf(launcher);
Q_ASSERT(index >= 0);
......
......@@ -44,7 +44,7 @@ DrKonqiDialog::DrKonqiDialog(QWidget *parent)
setWindowTitle(DrKonqi::crashedApplication()->name());
setWindowIcon(QIcon::fromTheme(QStringLiteral("tools-report-bug")));
QVBoxLayout *l = new QVBoxLayout(this);
auto *l = new QVBoxLayout(this);
m_tabWidget = new QTabWidget(this);
l->addWidget(m_tabWidget);
m_buttonBox = new QDialogButtonBox(this);
......@@ -205,7 +205,7 @@ void DrKonqiDialog::buildDialogButtons()
connect(debuggerManager, &DebuggerManager::debuggerRunning, this, &DrKonqiDialog::enableDebugMenu);
// Report bug button: User1
QPushButton *reportButton = new QPushButton(m_buttonBox);
auto *reportButton = new QPushButton(m_buttonBox);
KGuiItem2 reportItem(i18nc("@action:button", "Report &Bug"),
QIcon::fromTheme(QStringLiteral("tools-report-bug")),
i18nc("@info:tooltip", "Starts the bug report assistant."));
......@@ -238,9 +238,9 @@ void DrKonqiDialog::buildDialogButtons()
void DrKonqiDialog::addDebugger(AbstractDebuggerLauncher *launcher)
{
QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("applications-development")),
i18nc("@action:inmenu 1 is the debugger name", "Debug in %1", launcher->name()),
m_debugMenu);
auto *action = new QAction(QIcon::fromTheme(QStringLiteral("applications-development")),
i18nc("@action:inmenu 1 is the debugger name", "Debug in %1", launcher->name()),
m_debugMenu);
m_debugMenu->addAction(action);
connect(action, &QAction::triggered, launcher, &AbstractDebuggerLauncher::start);
m_debugMenuActions.insert(launcher, action);
......@@ -286,7 +286,7 @@ void DrKonqiDialog::enableDebugMenu(bool debuggerRunning)
void DrKonqiDialog::startBugReportAssistant()
{
ReportAssistantDialog *bugReportAssistant = new ReportAssistantDialog();
auto *bugReportAssistant = new ReportAssistantDialog();
bugReportAssistant->show();
connect(bugReportAssistant, &QObject::destroyed, this, &DrKonqiDialog::reject);
......
......@@ -48,7 +48,7 @@ namespace
{
void openDrKonqiDialog()
{
DrKonqiDialog *w = new DrKonqiDialog();
auto *w = new DrKonqiDialog();
QObject::connect(qApp, &QCoreApplication::aboutToQuit, w, &QObject::deleteLater);
QObject::connect(w, &DrKonqiDialog::rejected, qApp, &QApplication::quit);
w->show();
......@@ -59,7 +59,7 @@ void openDrKonqiDialog()
void requestDrKonqiDialog(bool restarted, bool interactionAllowed)
{
StatusNotifier *statusNotifier = new StatusNotifier();
auto *statusNotifier = new StatusNotifier();
statusNotifier->setActivationAllowed(interactionAllowed);
if (interactionAllowed) {
statusNotifier->show();
......
......@@ -65,8 +65,8 @@ void StatusNotifier::show()
// you cannot turn off that "Do you really want to quit?" message, so we'll add our own below
m_sni->setStandardActionsEnabled(false);
QMenu *sniMenu = new QMenu();
QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("tools-report-bug")), i18n("Report &Bug"), nullptr);
auto *sniMenu = new QMenu();
auto *action = new QAction(QIcon::fromTheme(QStringLiteral("tools-report-bug")), i18n("Report &Bug"), nullptr);
connect(action, &QAction::triggered, this, &StatusNotifier::activated);
sniMenu->addAction(action);
sniMenu->setDefaultAction(action);
......
......@@ -33,7 +33,7 @@ StatusWidget::StatusWidget(QWidget *parent)
m_statusLabel->setTextFormat(Qt::RichText);
// m_statusLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
QHBoxLayout *statusLayout = new QHBoxLayout();
auto *statusLayout = new QHBoxLayout();
statusLayout->setContentsMargins(0, 0, 0, 0);
m_statusPage->setLayout(statusLayout);
......@@ -46,7 +46,7 @@ StatusWidget::StatusWidget(QWidget *parent)
m_busyLabel = new WrapLabel();
// m_busyLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
QHBoxLayout *busyLayout = new QHBoxLayout();
auto *busyLayout = new QHBoxLayout();
busyLayout->setContentsMargins(0, 0, 0, 0);
m_busyPage->setLayout(busyLayout);
......@@ -75,7 +75,7 @@ void StatusWidget::setIdle(const QString &idleMessage)
void StatusWidget::addCustomStatusWidget(QWidget *widget)
{
QHBoxLayout *statusLayout = static_cast<QHBoxLayout *>(m_statusPage->layout());
auto *statusLayout = static_cast<QHBoxLayout *>(m_statusPage->layout());
statusLayout->addWidget(widget);
statusLayout->setAlignment(widget, Qt::AlignVCenter);
......
......@@ -117,7 +117,7 @@ void SystemInformation::tryToSetBugzillaPlatformFromExternalInfo()
QString lsb_release = m_infoConfig.lsbReleasePath;
if (!lsb_release.isEmpty()) {
qCDebug(DRKONQI_LOG) << "found lsb_release";
KProcess *process = new KProcess();
auto *process = new KProcess();
process->setOutputChannelMode(KProcess::OnlyStdoutChannel);
process->setEnv(QStringLiteral("LC_ALL"), QStringLiteral("C"));
*process << lsb_release << QStringLiteral("-sd");
......@@ -134,7 +134,7 @@ void SystemInformation::tryToSetBugzillaPlatformFromExternalInfo()
void SystemInformation::lsbReleaseFinished()
{
KProcess *process = qobject_cast<KProcess *>(sender());
auto *process = qobject_cast<KProcess *>(sender());
Q_ASSERT(process);
m_distributionPrettyName = QString::fromLocal8Bit(process->readAllStandardOutput().trimmed());
process->deleteLater();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment