D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-05 Thread Méven Car
meven marked 2 inline comments as done. meven added inline comments. INLINE COMMENTS > jgrulich wrote in wirelessdevice.h:143 > Please do, you can push it directly, it's just a function rename. https://cgit.kde.org/networkmanager-qt.git/commit/?id=af98fdba63e32c38008592774436ae6c9b61cd90

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-04 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > meven wrote in wirelessdevice.h:143 > I chose lastRequestScanTime to have RequestScan in the name, that is the > function, it keeps the last time called from. > > The Time suffix does not feel great indeed. > > I can make an adjustment to

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-04 Thread Méven Car
meven added inline comments. INLINE COMMENTS > jgrulich wrote in wirelessdevice.h:143 > Thinking about it now, wouldn't be this wording better? > > QDateTime lastScanRequestTime() const; > > Maybe even without the "Time" at the end so it's consistent with "lastScan". I chose

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-04 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > wirelessdevice.h:143 > + */ > +QDateTime lastRequestScanTime() const; > /** Thinking about it now, wouldn't be this wording better? QDateTime lastScanRequestTime() const; Maybe even without the "Time" at the end so it's consistent

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Méven Car
meven added a comment. D23578 is the next step, but it is not in great shape. To do things properly, it will require quite some changes I fear. REPOSITORY R282 NetworkManagerQt REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Méven Car
This revision was automatically updated to reflect the committed changes. Closed by commit R282:d9cb570cbef4: Add property lastScanTime and lastRequestTime to WirelessDevice (authored by meven). REPOSITORY R282 NetworkManagerQt CHANGES SINCE LAST UPDATE

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Méven Car
meven edited the summary of this revision. REPOSITORY R282 NetworkManagerQt BRANCH master REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Jan Grulich
jgrulich accepted this revision. REPOSITORY R282 NetworkManagerQt BRANCH master REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Méven Car
meven updated this revision to Diff 65208. meven added a comment. Add a ref to the returned date REPOSITORY R282 NetworkManagerQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23576?vs=65204=65208 BRANCH master REVISION DETAIL https://phabricator.kde.org/D23576 AFFECTED

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Jan Grulich
jgrulich accepted this revision. jgrulich added a comment. This revision is now accepted and ready to land. Sorry, I missed that last one. Once it's fixed it's ready to go. INLINE COMMENTS > wirelessdevice.h:232 > + */ > +void lastScanChanged(const QDateTime timestamp); > const

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Méven Car
meven updated this revision to Diff 65204. meven marked an inline comment as done. meven added a comment. Review, remove incorrect doc REPOSITORY R282 NetworkManagerQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23576?vs=65002=65204 BRANCH master REVISION DETAIL

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-09-02 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > utils.h:86 > + > +QDateTime clockBootTimeToQDateTime(const qlonglong ); > } 1. Missing NETWORKMANAGERQT_EXPORT 2. I would remove 'Q' from the name → clockBootTimeToDateTime 3. just qlonglong clockBoottime, no const and & REPOSITORY R282

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven marked 4 inline comments as done. meven added a comment. I have implemented the CLOCK_BOOTTIME conversion to QDateTime in `QDateTime NetworkManager::clockBootTimeToQDateTime` REPOSITORY R282 NetworkManagerQt REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven updated this revision to Diff 65002. meven added a comment. Convert the LastScan value to a QDateTime, update function and doc in consequence REPOSITORY R282 NetworkManagerQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23576?vs=64987=65002 BRANCH master REVISION

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven added inline comments. INLINE COMMENTS > jgrulich wrote in wirelessdevice.cpp:250 > Then cannot you work with it as with qlonglong? It shouldn't matter then if > it's in CLOCK_BOOTIME . I need to be able to know the elapsed time since LastScan. So it doesn't matter as long as I manage

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > meven wrote in wirelessdevice.cpp:250 > LastScan is in CLOCK_BOOTIME which is complicated to work with. > So I use naively the signal time rather than the LastScan value. > This will need a bit of work just to work with it: >

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven marked 2 inline comments as done. REPOSITORY R282 NetworkManagerQt REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven updated this revision to Diff 64987. meven added a comment. Mention nm version limitation REPOSITORY R282 NetworkManagerQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23576?vs=64983=64987 BRANCH master REVISION DETAIL https://phabricator.kde.org/D23576 AFFECTED

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven added a comment. In D23576#522341 , @jgrulich wrote: > In D23576#522340 , @meven wrote: > > > I am hesitant to add a second field "previousScan" that would store the previous lastScan

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > wirelessdevice.h:133 > + * The time when the last "LastScan" property change was received > + * @since 5.62.0 > + * @return Add something like: @note will always return invalid QDateTime when runtime NM < 1.12 > wirelessdevice.h:228

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Jan Grulich
jgrulich added inline comments. INLINE COMMENTS > wirelessdevice.cpp:250 > +} else if (property == QLatin1String("LastScan")) { > +lastScanTime = QDateTime::currentDateTime(); > +Q_EMIT q->lastScanTimeChanged(lastScanTime); Don't use QDateTime::currentDateTime() as it might

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven added a dependent revision: D23578: Before requesting a scan, check the time threshold. REPOSITORY R282 NetworkManagerQt REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven retitled this revision from "Add property lastScan to WirelessDevice and associated change signal" to "Add property lastScanTime and lastRequestTime to WirelessDevice". meven edited the summary of this revision. REPOSITORY R282 NetworkManagerQt REVISION DETAIL

D23576: Add property lastScanTime and lastRequestTime to WirelessDevice

2019-08-30 Thread Méven Car
meven edited the summary of this revision. REPOSITORY R282 NetworkManagerQt REVISION DETAIL https://phabricator.kde.org/D23576 To: meven, jgrulich Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns