kdeui: format and indent kdialogjobuidelegate source and header files

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-23 03:05:33 +02:00
parent 9a2e49d59a
commit 786a11eeb0
2 changed files with 13 additions and 15 deletions

View file

@ -43,7 +43,7 @@ public:
KDialogJobUiDelegate::KDialogJobUiDelegate() KDialogJobUiDelegate::KDialogJobUiDelegate()
: d(new Private()) : d(new Private())
{ {
d->errorParentWidget = 0L; d->errorParentWidget = nullptr;
#if defined Q_WS_X11 #if defined Q_WS_X11
d->userTimestamp = QX11Info::appUserTime(); d->userTimestamp = QX11Info::appUserTime();
#endif #endif
@ -64,11 +64,12 @@ QWidget *KDialogJobUiDelegate::window() const
return d->errorParentWidget; return d->errorParentWidget;
} }
void KDialogJobUiDelegate::updateUserTimestamp( unsigned long time ) void KDialogJobUiDelegate::updateUserTimestamp(unsigned long time)
{ {
#if defined Q_WS_X11 #if defined Q_WS_X11
if( d->userTimestamp == 0 || NET::timestampCompare( time, d->userTimestamp ) > 0 ) if (d->userTimestamp == 0 || NET::timestampCompare(time, d->userTimestamp) > 0) {
d->userTimestamp = time; d->userTimestamp = time;
}
#endif #endif
} }
@ -79,19 +80,18 @@ unsigned long KDialogJobUiDelegate::userTimestamp() const
void KDialogJobUiDelegate::showErrorMessage() void KDialogJobUiDelegate::showErrorMessage()
{ {
if ( job()->error() != KJob::KilledJobError ) if (job()->error() != KJob::KilledJobError) {
{ KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Error, job()->errorString());
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()) Q_UNUSED(job);
{ Q_UNUSED(rich);
if (isAutoWarningHandlingEnabled()) {
KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Information, plain); KMessageBox::queuedMessageBox(d->errorParentWidget, KMessageBox::Information, plain);
} }
} }
#include "moc_kdialogjobuidelegate.cpp" #include "moc_kdialogjobuidelegate.cpp"

View file

@ -44,8 +44,6 @@ public:
*/ */
virtual ~KDialogJobUiDelegate(); virtual ~KDialogJobUiDelegate();
public:
/** /**
* Associate this job with a window given by @p window. * Associate this job with a window given by @p window.
* @param window the window to associate to * @param window the window to associate to
@ -64,7 +62,7 @@ public:
* Updates the last user action timestamp to the given time. * Updates the last user action timestamp to the given time.
* See KApplication::updateUserTimestamp(). * See KApplication::updateUserTimestamp().
*/ */
void updateUserTimestamp( unsigned long time ); void updateUserTimestamp(unsigned long time);
/** /**
* @internal * @internal