mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d51ed7beb4
commit
f672dcd69c
3 changed files with 18 additions and 17 deletions
|
@ -71,7 +71,7 @@ struct KNotification::Private
|
|||
|
||||
KNotification::KNotification(const QString &eventId, QWidget *parent, const NotificationFlags &flags)
|
||||
: QObject(parent),
|
||||
d(new Private)
|
||||
d(new Private())
|
||||
{
|
||||
d->eventId = eventId;
|
||||
d->flags = flags;
|
||||
|
@ -83,7 +83,7 @@ KNotification::KNotification(const QString &eventId, QWidget *parent, const Noti
|
|||
|
||||
KNotification::KNotification( const QString& eventId, const NotificationFlags& flags, QObject *parent)
|
||||
: QObject(parent),
|
||||
d(new Private)
|
||||
d(new Private())
|
||||
{
|
||||
d->eventId = eventId;
|
||||
d->flags = flags;
|
||||
|
@ -244,7 +244,8 @@ void KNotification::close()
|
|||
if (d->id >= 0) {
|
||||
KNotificationManager::self()->close(d->id);
|
||||
}
|
||||
if (d->id != -1) { // still waiting for receiving the id
|
||||
if (d->id != -1) {
|
||||
// still waiting for receiving the id
|
||||
deleteLater();
|
||||
}
|
||||
d->id = -2;
|
||||
|
@ -260,9 +261,9 @@ void KNotification::raiseWidget()
|
|||
Private::raiseWidget(d->widget);
|
||||
}
|
||||
|
||||
//TODO this function is far from finished.
|
||||
void KNotification::Private::raiseWidget(QWidget *w)
|
||||
{
|
||||
//TODO this function is far from finished.
|
||||
if (w->isTopLevel()) {
|
||||
w->raise();
|
||||
KWindowSystem::activateWindow(w->winId());
|
||||
|
@ -314,8 +315,8 @@ KNotification* KNotification::event(StandardEvent eventid , const QString &title
|
|||
message = QLatin1String("catastrophe");
|
||||
break;
|
||||
}
|
||||
case Notification: { // fall through
|
||||
default:
|
||||
case Notification: // fall through
|
||||
default: {
|
||||
message = QLatin1String("notification");
|
||||
break;
|
||||
}
|
||||
|
@ -366,7 +367,7 @@ void KNotification::sendEvent()
|
|||
} else if (d->id > 0) {
|
||||
KNotificationManager::self()->reemit(this, d->id);
|
||||
} else if (d->id == -1) {
|
||||
//schedule an update.
|
||||
// schedule an update.
|
||||
d->needUpdate = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ private Q_SLOTS:
|
|||
private:
|
||||
struct Private;
|
||||
Private *const d;
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* reimplemented for internal reasons
|
||||
|
@ -571,14 +571,14 @@ public:
|
|||
const NotificationFlags &flags = CloseOnTimeout);
|
||||
|
||||
/**
|
||||
* This is a simple substitution for QApplication::beep()
|
||||
*
|
||||
* @param reason a short text explaining what has happened (may be empty)
|
||||
* @param widget the widget the notification refers to
|
||||
*/
|
||||
* This is a simple substitution for QApplication::beep()
|
||||
*
|
||||
* @param reason a short text explaining what has happened (may be empty)
|
||||
* @param widget the widget the notification refers to
|
||||
*/
|
||||
static void beep(const QString &reason = QString() , QWidget *widget = nullptr);
|
||||
|
||||
//prevent warning
|
||||
// prevent warning
|
||||
using QObject::event;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
class KNotificationManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
static KNotificationManager* self();
|
||||
~KNotificationManager();
|
||||
|
@ -40,8 +40,8 @@ public:
|
|||
/**
|
||||
* send the dbus call to the knotify server
|
||||
*/
|
||||
bool notify(KNotification *n, const QPixmap& pix, const QStringList &action,
|
||||
const KNotification::ContextList& contexts, const QString &appname);
|
||||
bool notify(KNotification *n, const QPixmap &pix, const QStringList &action,
|
||||
const KNotification::ContextList &contexts, const QString &appname);
|
||||
|
||||
/**
|
||||
* send the close dcop call to the knotify server for the notification with the identifier @p id .
|
||||
|
|
Loading…
Add table
Reference in a new issue