From 786a11eeb03d2e72b4f37367f04f1274f72a768a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 23 Dec 2022 03:05:33 +0200 Subject: [PATCH] kdeui: format and indent kdialogjobuidelegate source and header files Signed-off-by: Ivailo Monev --- kdeui/jobs/kdialogjobuidelegate.cpp | 24 ++++++++++++------------ kdeui/jobs/kdialogjobuidelegate.h | 4 +--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/kdeui/jobs/kdialogjobuidelegate.cpp b/kdeui/jobs/kdialogjobuidelegate.cpp index 49d5cacc..4b71d5d6 100644 --- a/kdeui/jobs/kdialogjobuidelegate.cpp +++ b/kdeui/jobs/kdialogjobuidelegate.cpp @@ -43,7 +43,7 @@ public: KDialogJobUiDelegate::KDialogJobUiDelegate() : d(new Private()) { - d->errorParentWidget = 0L; + d->errorParentWidget = nullptr; #if defined Q_WS_X11 d->userTimestamp = QX11Info::appUserTime(); #endif @@ -64,11 +64,12 @@ QWidget *KDialogJobUiDelegate::window() const return d->errorParentWidget; } -void KDialogJobUiDelegate::updateUserTimestamp( unsigned long time ) +void KDialogJobUiDelegate::updateUserTimestamp(unsigned long time) { #if defined Q_WS_X11 - if( d->userTimestamp == 0 || NET::timestampCompare( time, d->userTimestamp ) > 0 ) - d->userTimestamp = time; + if (d->userTimestamp == 0 || NET::timestampCompare(time, d->userTimestamp) > 0) { + d->userTimestamp = time; + } #endif } @@ -79,19 +80,18 @@ unsigned long KDialogJobUiDelegate::userTimestamp() const void KDialogJobUiDelegate::showErrorMessage() { - if ( job()->error() != KJob::KilledJobError ) - { - KMessageBox::queuedMessageBox( d->errorParentWidget, KMessageBox::Error, job()->errorString() ); + if (job()->error() != KJob::KilledJobError) { + KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Error, job()->errorString()); } } -void KDialogJobUiDelegate::slotWarning(KJob* /*job*/, const QString &plain, const QString &/*rich*/) +void KDialogJobUiDelegate::slotWarning(KJob* job, const QString &plain, const QString &rich) { - if (isAutoWarningHandlingEnabled()) - { - KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Information, plain); + Q_UNUSED(job); + Q_UNUSED(rich); + if (isAutoWarningHandlingEnabled()) { + KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Information, plain); } } - #include "moc_kdialogjobuidelegate.cpp" diff --git a/kdeui/jobs/kdialogjobuidelegate.h b/kdeui/jobs/kdialogjobuidelegate.h index 186f160a..743634f9 100644 --- a/kdeui/jobs/kdialogjobuidelegate.h +++ b/kdeui/jobs/kdialogjobuidelegate.h @@ -44,8 +44,6 @@ public: */ virtual ~KDialogJobUiDelegate(); -public: - /** * Associate this job with a window given by @p window. * @param window the window to associate to @@ -64,7 +62,7 @@ public: * Updates the last user action timestamp to the given time. * See KApplication::updateUserTimestamp(). */ - void updateUserTimestamp( unsigned long time ); + void updateUserTimestamp(unsigned long time); /** * @internal