Review Request 122927: Added a baseclass for the plugins' KCMs and a class for the plugins' config
Albert Vaca Cintora
albertvaka at gmail.com
Sat Mar 14 04:19:19 UTC 2015
> On mar. 14, 2015, 3:55 a.m., Aleix Pol Gonzalez wrote:
> > core/kdeconnectpluginconfig.cpp, line 59
> > <https://git.reviewboard.kde.org/r/122927/diff/1/?file=354736#file354736line59>
> >
> > Calling sync() every time before reading is a bit odd...
> >
> > Also sync'ing every time after writing.
> >
> > Maybe you can reduce it into a sync when the dialog is accepted?
The KCM and the plugin itself are in separate processes, so they don't know when counterpart has changed the config. I wanted to solve this in a transparent way from the plugin developer point of view. This is a very simple solution, and QSettings is good enough to not reload the file if the timestamp hasn't changed:
https://qt.gitorious.org/qt/qt/source/7853af34ec991a1ff2d0b23f09439d34663e47b1:src/corelib/io/qsettings.cpp#L1427
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122927/#review77448
-----------------------------------------------------------
On mar. 13, 2015, 8:05 a.m., Albert Vaca Cintora wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122927/
> -----------------------------------------------------------
>
> (Updated mar. 13, 2015, 8:05 a.m.)
>
>
> Review request for kdeconnect and Aleix Pol Gonzalez.
>
>
> Repository: kdeconnect-kde
>
>
> Description
> -------
>
> Centralizing the plugins' config will ensure that all the plugins store it
> the same way (ie: not in random files scattered around, like until now).
> The base KCM class, together with the already existing base plugin class,
> will give easy access to all the plugins to this centralized config. Also,
> now the settings are not shared across devices (that is: every device can
> have different config for a same plugin).
>
>
> Diffs
> -----
>
> core/CMakeLists.txt 95b8bd84fb995ccf9dda3f953378beac8cd285ed
> core/kdeconnectconfig.h d1e721a1e3d4851a8a5b769654e6cc69af9fd6d1
> core/kdeconnectconfig.cpp b165f4dbbf082b709bc51a05becc7d799c48e44e
> core/kdeconnectplugin.h 564786c296a2643d5e9d1b0c131aa5276668bea2
> core/kdeconnectplugin.cpp e7f72c60b032843af296de6fcdc0edb70d8ad593
> core/kdeconnectpluginconfig.h PRE-CREATION
> core/kdeconnectpluginconfig.cpp PRE-CREATION
> core/pluginloader.cpp 37bd4baacc08d56f036cd7c74c4b65fb4ab3a97e
> kcm/CMakeLists.txt 03796a06ab377a0b997badc81abc0bc250ff0297
> kcm/kcm.cpp 8c377fa8c3ec54010c8d50880ca0e1dbb96bbeb0
> kcmplugin/CMakeLists.txt PRE-CREATION
> kcmplugin/kdeconnectpluginkcm.h PRE-CREATION
> kcmplugin/kdeconnectpluginkcm.cpp PRE-CREATION
> plugins/pausemusic/CMakeLists.txt 44d0902f6a9bc229cdb5b06352e8388bfb24f58d
> plugins/pausemusic/pausemusic_config.h 075e2958d7f0198c9402456c81f02fc11f5999e3
> plugins/pausemusic/pausemusic_config.cpp 03dacf9ab79b1f1ef3d0c12adf675e710de94821
> plugins/pausemusic/pausemusicplugin.cpp a9cdc681183e372f3ff029a263024f3e99468385
> plugins/share/CMakeLists.txt 4783864902773106afa40f7d7b55706a879bab27
> plugins/share/share_config.h 7743fcc9c1f0f8d162a66dfbc048cdd71610b826
> plugins/share/share_config.cpp 397547ac15e2cc1578359b7e0dee0bbf1abeb429
> plugins/share/shareplugin.cpp 2c1566bd11a080dd711e01b75cd5d93bc722ee44
>
> Diff: https://git.reviewboard.kde.org/r/122927/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Albert Vaca Cintora
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150314/dedc2337/attachment-0001.html>
More information about the KDEConnect
mailing list