Commit graph

22 commits

Author SHA1 Message Date
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
Lamarque V. Souza
208c11de1a Fix battery widget not appearing after kdeconnectd restarts.
I also added a workaround to prevent memory leak described in
0f38eb34a4.

REVIEW: 124361
2015-07-17 00:40:45 -03:00
Aleix Pol
43451d6ae1 Simplify Device::id management
Removes the id->row mapping. It was broken as the indices weren't updated
when a row was added or removed.
Stop exposing Device::id through dbus, just store it in the interface
class.
* It's redundant as it's part of the interface definition
* If we keep it it will save us quite some dbus round-trips
* It will be reliable, as nowadays id() sometimes QString() if the dbus
connection is invalid.

REVIEW: 124158
2015-06-24 20:57:17 +02:00
Albert Vaca
9fa8538bf1 Removed some assertions that could not be true if using the model filter
Also fixed ugly hack where the KCM updated the model
2015-06-21 20:20:40 -07:00
Albert Vaca
fd65570487 Some TODOs done :)
Also renamed the Status flags enum to make it more understandable
2015-06-21 19:42:16 -07:00
Aleix Pol
6ddac08978 Introduce a device Role
REVIEW: 124067
2015-06-11 16:47:53 +02:00
Aleix Pol
05491442e6 Make it possible to fetch the device from the DevicesModel from QML
Uses the row as the argument instead of the QModelIndex.
Defines the Device type so it can be used from QML.

REVIEW: 123361
2015-04-15 13:00:23 +02:00
Aleix Pol
fda4556dfc Take into account the integrated filter in the DevicesModel 2015-03-16 02:31:59 +01:00
Aleix Pol
6fe7a9b158 Make it possible for the DevicesModel to react to device name changes 2015-03-14 04:28:54 +01:00
Aleix Pol
b99cba1949 Make the DevicesModel::deviceAdded code more robust
If deviceAdded is reported even though it's already in the model, don't
add it twice.
2015-03-14 03:40:01 +01:00
Aleix Pol
a4ccc93518 Make the devices list a vector
It's the suggested data type to use according to:
https://marcmutz.wordpress.com/effective-qt/containers/
2015-03-14 03:25:14 +01:00
Aleix Pol
7af7dbdc2f Improve DevicesModel::receivedDeviceList
Make the population asynchronous on dbus. Wait for the device list and
don't populate it until it's ready. There's no reason to block.
Don't emit after endInsertRows. It doesn't help, as the views will have
already refreshed.
2015-03-14 02:30:35 +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
Aleix Pol
968ccb22c6 Port away from deprecated setRoleNames 2014-09-23 19:27:47 +02:00
Albert Vaca
d72ebc4cf7 Workaround to make devices be correctly filtered again.
Flags in QML are not working correctly (as they are in Qt5), so we will
use integer values for the flags for now.
2014-07-01 01:26:07 +02:00
Aleix Pol
446dbbc230 Remove IsPairedRole
It was not a good idea
2014-06-27 16:16:45 +02:00
Aleix Pol
e227c61cf8 Expose flags so that the plasmoid doesn't need to use magic numbers 2014-06-27 16:09:01 +02:00
Aleix Pol
dc2f9c0f3c Introduce a IsPaired role in the DevicesModel
Reviewed by Albert Vaca
2014-06-23 18:13:43 +02:00
Aleix Pol
b7420146eb Expose the icon name from the device instance 2014-06-14 19:42:34 +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/devicesmodel.h (Browse further)