Commit graph

21 commits

Author SHA1 Message Date
Simon Redman
9453e640b3 Refactor testdevice 2019-06-05 02:42:06 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Albert Vaca Cintora
9d7fe401f8 This should do 2019-02-13 00:29:05 +01:00
Albert Vaca Cintora
a424140216 Trying to fix test for FreeBSD 2019-02-13 00:22:38 +01:00
Yuri Chornoivan
5fe74ce041 Fix minor EBN issues and typos 2018-10-07 21:23:20 +03:00
Nicolas Fella
81cc275f5b Fix NotificationListener Test 2018-08-03 02:40:34 +02:00
Albert Vaca
f47f517827 Rename NetworkPackage -> NetworkPacket
Summary: KDE Connect, now with correct naming!

Test Plan: It still builds.

Reviewers: #kde_connect, apol, nicolasfella

Reviewed By: #kde_connect, apol, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D11036
2018-03-05 20:03:23 +01:00
Jean Vincent
72535ecf48 Make member variable names, & placement and * placement more coherent
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.

Basically:
 - mFoo -> m_foo
 - foo -> m_foo (if it is a member variable)
 - Type &ref -> Type& ref
 - Type *ptr -> Type* ptr

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, nicolasfella, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7312
2017-09-03 21:45:08 +02:00
Jean Vincent
c864267f04 Replace Q_FOREACH with C++11 range-for
Summary:
The use of Q_FOREACH is advised against (https://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH) since Qt 5.7 and will eventually be removed from Qt.

I replaced all occurrences with the range-for loop introduced in C++11 (except for the one in daemon.cpp in deviceIdByName which might have a bug / typo in it).

I added const to the container or casted it with qAsConst when appropriate to avoid unnecessary copies.

(This is my first submission. I did all the unit tests, and they all passed but I don't know how to show it here.)

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: albertvaka, apol, nicolasfella

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6724
2017-07-21 09:57:19 +02:00
Pino Toscano
b6f280aedb tests: fix memory access in testnotificationlistener
set the image data as QByteArray of the right size, otherwise
referencing a stack-based char data will be problematic when the
function is out of scope
2017-05-27 06:14:00 +02:00
Albert Vaca
beeae63086 Missing Q_OBJECT macro 2016-11-26 16:36:34 +01:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Holger Kaelberer
c122312c65 sendnotifications: also sync icon-data from notfication hints
According to the priorities defined in the notifications spec
version 1.2

REVIEW: 126722
2016-08-27 13:59:25 +02:00
Albert Vaca
e880e14ed5 Preffer Q_FOREACH to foreach 2016-06-21 14:50:17 +02:00
Aleix Pol
bfd698af36 Fix issues detected by clazy
Don't use for(:) on Qt containers. It detaches without need.
2016-06-20 19:22:29 +02:00
Aleix Pol
596e4484f4 Clean up use of virtual and override keywords
Only use virtual when actually virtual, to override just use override.
2016-06-20 19:22:29 +02:00
Albert Vaca
0b5fbe00bb Split plugins for sending and receiving notifications
CCMAIL: holger.k@elberer.de
2016-05-25 12:49:13 -06:00
Holger Kaelberer
4b5bde4858 notifications: synchronize icons if possible and requested
Configurably attach icons as payload to notification packages. By
design and due to restrictions on mobile devices *only* png is sent.
As KIconLoader preferably returns svg icons from iconPath() we fall
back to loading from "hicolor" using KIconTheme directly. Otherwise
*many* icons are dropped because of svg format.

This also improves slightly the test-case to use a tweaked TestDevice
to allow for inspecting sent NetworkPackage-s.

REVIEW: 126666
2016-01-11 20:12:43 +01:00
Holger Kaelberer
548508d6e6 notifications: don't register proxied notifications internally
REVIEW: 126645
2016-01-07 13:22:10 +01:00
Aleix Pol
70f55d0ebc Fix compilation and a couple of warnings
CCMAIL: holger.k@elberer.de
2015-12-07 03:21:35 +01:00
Holger Kaelberer
4fc39601dd tests: add test-case for NotificationsListener 2015-12-05 23:23:22 +01:00