Commit graph

27 commits

Author SHA1 Message Date
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
Nicolas Fella
fbf8852d6f Fix Notifications in Plasmoid
Summary:
Fixed Issues mentioned in https://phabricator.kde.org/T6729
This patch also fixes a crash when the filetransfer of the icon fails

Test Plan:
Receive a notification with a previously unknown icon -> icon in Plasmoid is displayed correctly
Receive a notification with an already existing id -> notification in Plasmoid is updated

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: albertvaka, broulik, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7209
2017-11-06 04:15:50 +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
Nicolas Fella
5d4821fb9c Only show notification title in plasmoid if different to app name
Summary: Like we do for the notifications in the plugin already. Passing the title and text separately to the plasmoid could be useful later as well.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7457
2017-08-22 18:18:34 +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
Julian Wolff
8aaa18848e show icon and reply toolbutton in plasmoid
Summary:
Show an icon for each notification which has an icon.

	Show a toolbutton which can be used to reply to notifications which offer a quick reply.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Maniphest Tasks: T4674, T4658

Differential Revision: https://phabricator.kde.org/D6058
2017-06-01 16:17:45 +02:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Albert Vaca
a1340c8042 Fixed old style connects with clazy 2016-11-26 15:14:19 +01:00
Albert Vaca
7c0fbbc034 Unused include cleanup 2016-07-05 14:13:48 +02:00
David Kahles
aefa51fa86 Remove notifications from plasmoid, if the notifications plugin gets disabled
Therefore notify the client that we're deleting all notifications.
Otherwise the client wouldn't notice this and the notifications would still
be available in the plasmoid.

REVIEW: 127582
2016-04-06 02:30:50 +02:00
David Kahles
12ccbaef98 Improve NotificationsModel
Don't refresh the whole notification list, if a notification is added or
removed.

REVIEW: 127565
2016-04-05 23:33:45 +02:00
David Kahles
a8bd062baf Stop clearing the notification list twice
There were two clearNotifications() calls when refreshing the notification
list. As there happens nothing relevant in between them, the second call is
useless.

REVIEW: 127542
2016-04-05 23:33:45 +02:00
Aleix Pol
b1692142b1 Polish NotificationsModel::isAnyDismissable proprety
Let qml know it's computed on every call.
Consider it might have changed whenever a new notification enters as well.
2015-11-12 12:27:30 +01:00
Aleix Pol
d58f6314fe run Clang Modernize
Minus the auto change
2015-09-08 10:47:37 +02:00
Boris Egorov
1924173df2 Fix various krazy2 warnings
Fix following krazy2 warning types:
[explicit], [endswithnewline], [doublequote_chars], [includes], [normalize],
[postfixop], [spelling]

See http://ebn.kde.org/krazy/reports/playground/base/kdeconnect-kde/index.html
for details.

SLOT/SIGNAL normalization done with Qt normalize utility:
https://github.com/qtproject/qtrepotools/tree/master/util/normalize

REVIEW: 124857
2015-08-21 22:38:54 +06:00
Aleix Pol
06493a8192 Keep track of whether the daemon is alive
Listen to dbus registrations. Remove all devices if the service dies,
create all devices back when restored.
Same for the NotificationsModel.

REVIEW: 124183
2015-06-25 21:19:23 +02:00
Albert Vaca
f21746cfae Returning a QIcon instead of a fixed size QPixmap for DecorationRole. 2015-04-19 22:21:37 -07:00
Aleix Pol
28bc226e5d Make the NotificationsModel also async
The code was almost identical to the one in DevicesModel, so I did the same
2015-03-14 05:37:16 +01:00
Albert Vaca
6cc6d287fc Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/filetransferjob.cpp
	core/filetransferjob.h
	interfaces/notificationsmodel.cpp
	plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h
	plugins/sftp/sftpplugin.cpp
2015-01-20 22:44:31 -08:00
Albert Vaca
da1cb4c354 Coding style 2015-01-20 22:22:14 -08:00
Albert Vaca
91d4a03258 Made notification id accessible from QML 2015-01-20 22:17:01 -08:00
Aleix Pol
968ccb22c6 Port away from deprecated setRoleNames 2014-09-23 19:27:47 +02:00
Àlex Fiestas
02fd748f41 Interfaces no longer depend on kdelibs4support
Also since fileitemactionplugin was using them (and inhering
kdelibs4support) not we have tu explicitly link against it in there.
2014-09-22 00:16:39 +02:00
Àlex Fiestas
42269a9dda Port from KIcon to QIcon
Executed kcm and some notifications, icons are still shown.
2014-09-13 01:04:48 +02:00
Lukáš Tinkl
994057af0e fix the Configure action
display the kdeconnect kcm
2014-09-10 10:19:44 +02:00
Albert Vaca
12411da360 Added some debug info to devices and notifications models 2014-07-01 01:26:08 +02:00
Aleix Pol
b88897847b Reorganize sources
We broke kded into core and kded, core contains the library with the backends
and plugins.
Also we renamed libkdeconnect to interfaces.
2014-06-14 15:22:40 +02:00
Renamed from libkdeconnect/notificationsmodel.cpp (Browse further)