From kde-commits Tue Sep 11 17:31:11 2018 From: Yuri Chornoivan Date: Tue, 11 Sep 2018 17:31:11 +0000 To: kde-commits Subject: [knotifications] /: Fix minor EBN issues Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=153668708309347 Git commit 7c8e332d885363ba58c41a6def78d94f99fedea6 by Yuri Chornoivan. Committed on 11/09/2018 at 17:30. Pushed by yurchor into branch 'master'. Fix minor EBN issues M +5 -0 autotests/fake_notifications_server.h M +3 -3 src/knotification.h M +1 -1 src/knotificationmanager.cpp M +1 -1 src/knotificationrestrictions.cpp M +2 -2 src/kstatusnotifieritem.h M +3 -3 src/notifybyaudio_phonon.cpp M +1 -1 src/notifybyflatpak.cpp M +1 -1 src/notifybyflatpak.h M +2 -2 src/notifybypopup.cpp M +1 -1 src/notifybypopup.h https://commits.kde.org/knotifications/7c8e332d885363ba58c41a6def78d94f99fe= dea6 diff --git a/autotests/fake_notifications_server.h b/autotests/fake_notific= ations_server.h index 75cd401..a0241db 100644 --- a/autotests/fake_notifications_server.h +++ b/autotests/fake_notifications_server.h @@ -16,6 +16,9 @@ Boston, MA 02110-1301, USA. */ = +#ifndef FAKE_NOTIFICATION_SERVER_H +#define FAKE_NOTIFICATION_SERVER_H + #include #include #include @@ -67,3 +70,5 @@ Q_SIGNALS: = void newNotification(); }; + +#endif diff --git a/src/knotification.h b/src/knotification.h index 3e899d2..12f6b94 100644 --- a/src/knotification.h +++ b/src/knotification.h @@ -134,7 +134,7 @@ class QDBusError; * KNotification as plugins, by deriving from KNotificationPlugin. * At the time of writing, the following actions are available: Taskbar, * Sound, Popup, Logfile, TTS, Execute. - * Actions can be combined by seperating them with '|'. + * Actions can be combined by separating them with '|'. * * Contexts is a comma separated list of possible context for this event. * @@ -317,7 +317,7 @@ public: /** * @brief the widget associated to the notification * - * If the widget is destroyed, the notification will be automatically = cancelled. + * If the widget is destroyed, the notification will be automatically = canceled. * If the widget is activated, the notification will be automatically = closed if the NotificationFlags specify that * * When the notification is activated, the widget might be raised. @@ -532,7 +532,7 @@ Q_SIGNALS: * The parameter passed by the signal is the index of the action * in the QStringList set by setActions() call. * - * @param action will be 0 if the default aciton was activated, or the= index of the action in the actions QStringList + * @param action will be 0 if the default action was activated, or the= index of the action in the actions QStringList */ void activated(unsigned int action); = diff --git a/src/knotificationmanager.cpp b/src/knotificationmanager.cpp index 71eda6f..4b426a0 100644 --- a/src/knotificationmanager.cpp +++ b/src/knotificationmanager.cpp @@ -126,7 +126,7 @@ KNotificationPlugin *KNotificationManager::pluginForAct= ion(const QString &action = // Load plugin. // We have a series of built-ins up first, and fall back to trying - // to instanciate an externally supplied plugin. + // to instantiate an externally supplied plugin. if (action =3D=3D QLatin1String("Popup")) { if (d->inSandbox && d->portalDBusServiceExists) { plugin =3D new NotifyByFlatpak(this); diff --git a/src/knotificationrestrictions.cpp b/src/knotificationrestricti= ons.cpp index 8c55c34..e0697c5 100644 --- a/src/knotificationrestrictions.cpp +++ b/src/knotificationrestrictions.cpp @@ -155,7 +155,7 @@ void KNotificationRestrictions::Private::startScreenSav= erPrevention() = qCDebug(LOG_KNOTIFICATIONS) << "---- using XTest"; // send a fake event right away in case this got started after a perio= d of - // innactivity leading to the screensaver set to activate in <55s + // inactivity leading to the screensaver set to activate in <55s screensaverFakeKeyEvent(); screensaverTimer->start(55000); #endif // HAVE_XTEST diff --git a/src/kstatusnotifieritem.h b/src/kstatusnotifieritem.h index 9b6e35b..aed0f18 100644 --- a/src/kstatusnotifieritem.h +++ b/src/kstatusnotifieritem.h @@ -360,7 +360,7 @@ public: * usually you don't need to call this unless you want to use * a custom QMenu subclass as context menu. * - * The KStatusNotifierItem instance takes ownerhip of the menu, + * The KStatusNotifierItem instance takes ownership of the menu, * and will delete it upon its destruction. */ void setContextMenu(QMenu *menu); @@ -460,7 +460,7 @@ Q_SIGNALS: * Inform the host application that an activation has been requested, * for instance left mouse click, but this is not guaranteed= since * it's dependent from the visualization - * @param active if it's true the application asked for the activatin + * @param active if it's true the application asked for the activation * of the main window, if it's false it asked for hiding * @param pos the position in the screen where the user clicked to * trigger this signal, QPoint() if it's not the consequence of a mou= se click. diff --git a/src/notifybyaudio_phonon.cpp b/src/notifybyaudio_phonon.cpp index ae3c97a..4d3b64a 100644 --- a/src/notifybyaudio_phonon.cpp +++ b/src/notifybyaudio_phonon.cpp @@ -94,12 +94,12 @@ void NotifyByAudio::notify(KNotification *notification,= KNotifyConfig *config) m->play(); = if (notification->flags() & KNotification::LoopSound) { - // Enqueing essentially prevents the subsystem pipeline from parti= al teardown + // Enqueuing essentially prevents the subsystem pipeline from part= ial teardown // which is the most desired thing in terms of load and delay betw= een loop cycles. // All of this is timing dependent, which is why we want at least = one source queued; // in reality the shorter the source the more sources we want to b= e queued to prevent // the MO from running out of sources. - // Point being that all phonon signals are forcefully queued (becu= ase qthread has problems detecting !pthread threads), + // Point being that all phonon signals are forcefully queued (beca= use qthread has problems detecting !pthread threads), // so when you get for example the aboutToFinish signal the MO mig= ht already have stopped playing. // // And so we queue it three times at least; doesn't cost anything = and keeps us safe. @@ -145,7 +145,7 @@ void NotifyByAudio::onAudioFinished() if (!notification) { // This means that close was called already so there's nothing els= e to do. // Ideally we should not be getting here if close has already been= called - // since stoping a mediaobject means it won't emit finished() *BUT* + // since stopping a mediaobject means it won't emit finished() *BU= T* // since the finished signal is a queued connection in phonon it c= an happen // that the playing had already finished and we just had not got t= he signal yet return; diff --git a/src/notifybyflatpak.cpp b/src/notifybyflatpak.cpp index e16e0db..1d9966d 100644 --- a/src/notifybyflatpak.cpp +++ b/src/notifybyflatpak.cpp @@ -131,7 +131,7 @@ void NotifyByFlatpak::notify(KNotification *notificatio= n, const KNotifyConfig &n // check if Notifications DBus service exists on bus, use it if it does if (d->dbusServiceExists) { if (!d->sendNotificationToPortal(notification, notifyConfig)) { - finish(notification); //an error ocurred. + finish(notification); //an error occurred. } } } diff --git a/src/notifybyflatpak.h b/src/notifybyflatpak.h index cf8620b..43beab3 100644 --- a/src/notifybyflatpak.h +++ b/src/notifybyflatpak.h @@ -46,7 +46,7 @@ public: = private Q_SLOTS: = - // slot to catch appearance or dissapearance of org.freedesktop.Deskto= p DBus service + // slot to catch appearance or disappearance of org.freedesktop.Deskto= p DBus service void onServiceOwnerChanged(const QString &, const QString &, const QSt= ring &); = void onPortalNotificationActionInvoked(const QString &, const QString = &, const QVariantList &); diff --git a/src/notifybypopup.cpp b/src/notifybypopup.cpp index 6e6f2ac..8cdf93a 100644 --- a/src/notifybypopup.cpp +++ b/src/notifybypopup.cpp @@ -218,7 +218,7 @@ void NotifyByPopup::notify(KNotification *notification,= KNotifyConfig *notifyCon void NotifyByPopup::notify(KNotification *notification, const KNotifyConfi= g ¬ifyConfig) { if (d->passivePopups.contains(notification) || d->galagoNotifications.= contains(notification->id())) { - // notification is alrady on the screen, do nothing + // notification is already on the screen, do nothing finish(notification); return; } @@ -233,7 +233,7 @@ void NotifyByPopup::notify(KNotification *notification,= const KNotifyConfig ¬ d->queryPopupServerCapabilities(); } else { if (!d->sendNotificationToGalagoServer(notification, notifyCon= fig)) { - finish(notification); //an error ocurred. + finish(notification); //an error occurred. } } return; diff --git a/src/notifybypopup.h b/src/notifybypopup.h index f992d39..66d9bdf 100644 --- a/src/notifybypopup.h +++ b/src/notifybypopup.h @@ -51,7 +51,7 @@ protected: private Q_SLOTS: void onPassivePopupDestroyed(); void onPassivePopupLinkClicked(const QString &link); - // slot to catch appearance or dissapearance of Notifications DBus ser= vice + // slot to catch appearance or disappearance of Notifications DBus ser= vice void onServiceOwnerChanged(const QString &, const QString &, const QSt= ring &); // slot which gets called when DBus signals that some notification act= ion was invoked void onGalagoNotificationActionInvoked(uint notificationId, const QStr= ing &actionKey);