D17425: dcb settings

2018-12-08 Thread Pranav Gade
pranavgade created this revision.
pranavgade added a reviewer: jgrulich.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
pranavgade requested review of this revision.

REVISION SUMMARY
  added dcb settings according to :
  https://developer.gnome.org/NetworkManager/stable/settings-dcb.html

REPOSITORY
  R282 NetworkManagerQt

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-08 Thread Pranav Gade
pranavgade updated this revision to Diff 47139.
pranavgade added a comment.


  Alternate way to do a part of the task

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47092&id=47139

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-08 Thread Pranav Gade
pranavgade added a comment.


  Hey!
  Could you please check and let me know which of the first two commits you 
prefer?
  Thanks!

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-09 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> setting.h:98
>  
> +enum DcbFlagType {
> +// None = 0,

This flags should be defined in dcbsetting.h, there is no reason to have them 
defined here.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-09 Thread Pranav Gade
pranavgade updated this revision to Diff 47235.
pranavgade marked an inline comment as done.
pranavgade added a comment.


  added settings with datatype 'array of uint32'

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47139&id=47235

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-09 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsetting.cpp:31
> +, appFipPriority(-1)
> +, appIscsiPriority(-1)
> +{ }

You can initialize also all the lists here, because they have default values as 
well.

> dcbsetting.cpp:197
> +if (userPriority < 8) {
> +if (userPriority < d->priorityFlowControl.size()) {
> +d->priorityFlowControl.replace(userPriority, enabled);

If you initialize the list at the beginning, you will not need to have this 
check and also do this weird thing below. Simply have the first check and 
otherwise you can do just d->priorityFlowControl[userPriority] = enabled.

> dcbsetting.cpp:212
> +
> +if (userPriority < d->priorityFlowControl.size() && userPriority < 8) {
> +return d->priorityFlowControl.value(userPriority);

Check just if userPriority is < 8.

> dcbsetting.cpp:224
> +if (userPriority < 8) {
> +if (userPriority < d->priorityBandwidth.size()) {
> +d->priorityBandwidth.replace(userPriority, bandwidthPercent);

Same as for setPriorityFlowControl()

> dcbsetting.cpp:239
> +
> +if (userPriority < d->priorityBandwidth.size() && userPriority < 8) {
> +return d->priorityBandwidth.value(userPriority);

Same as for priorityFlowControl()

> dcbsetting.cpp:251
> +if (groupId < 8) {
> +if (groupId < d->priorityGroupBandwidth.size()) {
> +d->priorityGroupBandwidth.replace(groupId, bandwidthPercent);

Same here.

> dcbsetting.cpp:266
> +
> +if (groupId < d->priorityGroupBandwidth.size() && groupId < 8) {
> +return d->priorityGroupBandwidth.value(groupId);

Same here.

> dcbsetting.cpp:277
> +
> +if (userPriority < 8) {
> +if (userPriority < d->priorityGroupId.size()) {

Here.

> dcbsetting.cpp:294
> +if (userPriority < d->priorityGroupId.size() && userPriority < 8) {
> +return d->priorityGroupId.value(userPriority);
> +} else {

Here.

> dcbsetting.cpp:304
> +
> +if (userPriority < 8) {
> +if (userPriority < d->priorityStrictBandwidth.size()) {

Also here.

> dcbsetting.cpp:320
> +
> +if (userPriority < d->priorityStrictBandwidth.size() && userPriority < 
> 8) {
> +return d->priorityStrictBandwidth.value(userPriority);

Also here.

> dcbsetting.cpp:330
> +Q_D(DcbSetting);
> +
> +if (userPriority < 8) {

Also here.

> dcbsetting.cpp:347
> +
> +if (userPriority < d->priorityTrafficClass.size() && userPriority < 8) {
> +return d->priorityTrafficClass.value(userPriority);

And last one.

> dcbsetting.cpp:356
> +{
> +// if (setting.contains(QLatin1String(NM_SETTING_DCB_APP_FCOE_MODE))) {
> +
> setAppFcoeMode(setting.value(QLatin1String(NM_SETTING_DCB_APP_FCOE_MODE)).toString());

Remove comments.

> dcbsetting.cpp:393
> +if 
> (setting.contains(QLatin1String(NM_SETTING_DCB_PRIORITY_FLOW_CONTROL))) {
> +QList list = 
> qdbus_cast>(setting.value(QLatin1String(NM_SETTING_DCB_PRIORITY_FLOW_CONTROL)));
> +for (int i = 0; i < list.size(); ++i) setPriorityFlowControl(i, 
> list.at(i));

You can directly assign whole UintList. Same for the rest of options below.

> dcbsetting.cpp:427
> +
> +// if (!appFcoeMode().isEmpty()) {
> +setting.insert(QLatin1String(NM_SETTING_DCB_APP_FCOE_MODE), "vn2vn");

Remove comments.

> dcbsetting.cpp:428
> +// if (!appFcoeMode().isEmpty()) {
> +setting.insert(QLatin1String(NM_SETTING_DCB_APP_FCOE_MODE), "vn2vn");
> +// }

Shouldn't it save appFcoeMode() instead?

> dcbsetting.cpp:447
> +
> +if ((int)appFipFlags() >= 0) {
> +setting.insert(QLatin1String(NM_SETTING_DCB_APP_FIP_FLAGS), 
> (int)appFipFlags());

You can probably insert flags all the time.

> dcbsetting.cpp:464
> +if (priorityFlowControl(7) > 0) {
> +QList list;
> +for (int i = 0; i < 8; ++i) list.append(priorityFlowControl(i));

You can directly push the list there. Same for the lists below.

> dcbsetting.h:49
> +};
> +
> +DcbSetting();

You are missing Q_DECLARE_FLAGS()

> dcbsetting.h:83
> +
> +void setPriorityFlowControl(quint32 userPriority, quint32 enabled);
> +quint32 priorityFlowControl(quint32 userPriority) const;

Here it would probably make more sense to accept second parameter as bool.

> dcbsetting.h:95
> +
> +void setPriorityStrictBandwidth(quint32 userPriority, quint32 strict);
> +quint32 priorityStrictBandwidth(quint32 userPriority) const;

Make second parameter as bool.

> dcbsetting_p.h:46
> +NetworkManager::DcbSetting::DcbFlags priorityFlowControlFlags;
> +QList priorityFlowControl;
> +QList priorityBandwidth;

You can use our "UintList" defined data type for these.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47243.
pranavgade marked 7 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47235&id=47243

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade marked an inline comment as done.
pranavgade added inline comments.

INLINE COMMENTS

> jgrulich wrote in dcbsetting.cpp:31
> You can initialize also all the lists here, because they have default values 
> as well.

how do i do that?
i am getting this error:
error: class ‘NetworkManager::DcbSettingPrivate’ does not have any field named 
‘setPriorityFlowControl’

> jgrulich wrote in dcbsetting.cpp:197
> If you initialize the list at the beginning, you will not need to have this 
> check and also do this weird thing below. Simply have the first check and 
> otherwise you can do just d->priorityFlowControl[userPriority] = enabled.

I think it is better to have this as a safety measure, and initialising so many 
values manually wold take 8*6=48 lines in the beginning of the file

> jgrulich wrote in dcbsetting.cpp:212
> Check just if userPriority is < 8.

that may lead to a malloc assertion error sometimes, and thus a crash which is 
confusing to understand

> jgrulich wrote in dcbsetting.cpp:393
> You can directly assign whole UintList. Same for the rest of options below.

I get a type casting error

> jgrulich wrote in dcbsetting.cpp:427
> Remove comments.

oops, i was debugging it

> jgrulich wrote in dcbsetting.cpp:428
> Shouldn't it save appFcoeMode() instead?

yeah, i uploaded some unfinished code

> jgrulich wrote in dcbsetting.cpp:464
> You can directly push the list there. Same for the lists below.

How?

> jgrulich wrote in dcbsetting.h:49
> You are missing Q_DECLARE_FLAGS()

I tried to do it in the same way as in ipv6 settings, so should i add 
Q_DECLARE_FLAGS() ?

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsetting.cpp:53
> +
> +for (int i = 0; i < 8; ++i) setPriorityFlowControl(i, 
> other->priorityFlowControl(i));
> +for (int i = 0; i < 8; ++i) setPriorityBandwidth(i, 
> other->priorityBandwidth(i));

Not this way.

> pranavgade wrote in dcbsetting.cpp:31
> how do i do that?
> i am getting this error:
> error: class ‘NetworkManager::DcbSettingPrivate’ does not have any field 
> named ‘setPriorityFlowControl’

something like priorityFlowControl({0, 0, 0, 0, 0, 0, 0, 0, 0}) should work, or 
not? Same for othe lists.

> pranavgade wrote in dcbsetting.cpp:197
> I think it is better to have this as a safety measure, and initialising so 
> many values manually wold take 8*6=48 lines in the beginning of the file

It should simple by just:

  Q_D(DcbSetting)
  
  if (userPriority < 8) {
 d->priorityFlowControl[userPriority] = enabled;
  }

> pranavgade wrote in dcbsetting.cpp:212
> that may lead to a malloc assertion error sometimes, and thus a crash which 
> is confusing to understand

Not if you initialize it at the beginning as it should be.

> pranavgade wrote in dcbsetting.cpp:393
> I get a type casting error

You can have Q_D(DcbSetting) at the beginning of fromMap() function and then 
instead of setFoo() have d->foo = list.

> pranavgade wrote in dcbsetting.cpp:464
> How?

Oh, right, you don't have methods for that. In that case you can again use 
Q_D(const DcbSetting) and push there d->priorityFlowControl and others.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47253.
pranavgade marked 15 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47243&id=47253

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade added inline comments.

INLINE COMMENTS

> jgrulich wrote in dcbsetting.cpp:464
> Oh, right, you don't have methods for that. In that case you can again use 
> Q_D(const DcbSetting) and push there d->priorityFlowControl and others.

I can use Q_D in fromMap, but i get this error in toMap:

error: invalid conversion from ‘const NetworkManager::DcbSettingPrivate*’ to 
‘NetworkManager::DcbSettingPrivate*’ [-fpermissive] Q_D(DcbSetting);

so, changed frommap, but keeping this as is.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade marked 12 inline comments as done.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsetting.cpp:59
> +
> +for (int i = 0; i < 8; ++i) setPriorityFlowControl(i, 
> other->priorityFlowControl(i));
> +for (int i = 0; i < 8; ++i) setPriorityBandwidth(i, 
> other->priorityBandwidth(i));

This is odd, maybe we should introduce getters and setters for the whole list, 
this would simplify it and you can use it also in fromMap() and toMap()

> dcbsetting.cpp:221
> +} else {
> +return 0;
> +}

Return false.

> dcbsetting.cpp:301
> +} else {
> +return 0;
> +}

Return false.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade added inline comments.

INLINE COMMENTS

> jgrulich wrote in dcbsetting.cpp:59
> This is odd, maybe we should introduce getters and setters for the whole 
> list, this would simplify it and you can use it also in fromMap() and toMap()

Yeah, that would help.
Do you think I should do that?

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47261.
pranavgade marked 2 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47253&id=47261

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> pranavgade wrote in dcbsetting.cpp:59
> Yeah, that would help.
> Do you think I should do that?

Yes please.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade added inline comments.

INLINE COMMENTS

> jgrulich wrote in dcbsetting.cpp:59
> Yes please.

Okay, im on it
But on the other hand, it will add 12 functions unnecessarily

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47263.
pranavgade marked 4 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47261&id=47263

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsetting.h:106
> +/
> +void setPriorityFlowControlList(UintList list);
> +UintList priorityFlowControlList() const;

Move them please among the rest of methods, so all related methods are next to 
each other. Also use please "const UintList &list" and do not name the method 
as setFooList(), they can be just setFoo().

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47267.
pranavgade marked an inline comment as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47263&id=47267

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsetting.h:89
> +bool priorityFlowControl(quint32 userPriority) const;
> +void setPriorityFlowControl(UintList list);
> +UintList priorityFlowControl() const;

const UintList &list

> dcbsetting.h:94
> +quint32 priorityBandwidth(quint32 userPriority) const;
> +void setPriorityBandwidth(UintList list);
> +UintList priorityBandwidth() const;

const UintList &list

> dcbsetting.h:99
> +quint32 priorityGroupBandwidth(quint32 groupId) const;
> +void setPriorityGroupBandwidth(UintList list);
> +UintList priorityGroupBandwidth() const;

const UintList &list

> dcbsetting.h:104
> +quint32 priorityGroupId(quint32 userPriority) const;
> +void setPriorityGroupId(UintList list);
> +UintList priorityGroupId() const;

const UintList &list

> dcbsetting.h:109
> +bool priorityStrictBandwidth(quint32 userPriority) const;
> +void setPriorityStrictBandwidth(UintList list);
> +UintList priorityStrictBandwidth() const;

const UintList &list

> dcbsetting.h:114
> +quint32 priorityTrafficClass(quint32 userPriority) const;
> +void setPriorityTrafficClass(UintList list);
> +UintList priorityTrafficClass() const;

const UintList &list

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47270.
pranavgade marked 6 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47267&id=47270

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade added a comment.


  Sorry, I had forgot about that.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsettingtest.cpp:30
> +
> +typedef QList UintList;
> +

Why? This type is defined in generictypes.h.

> dcbsetting.h:30
> +
> +typedef QList UintList;
> +

Again, this is defined in generictypes.h.

> pranavgade wrote in dcbsetting.h:49
> I tried to do it in the same way as in ipv6 settings, so should i add 
> Q_DECLARE_FLAGS() ?

Yes, add Q_DECLARE_FLAGS.

> dcbsetting_p.h:27
> +
> +typedef QList UintList;
> +

Here as well.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Christoph Feck
cfeck set the repository for this revision to R282 NetworkManagerQt.

REPOSITORY
  R282 NetworkManagerQt

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47279.
pranavgade marked 4 inline comments as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47270&id=47279

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added inline comments.

INLINE COMMENTS

> dcbsettingtest.cpp:28
> +#include 
> +#include 
> +

Include not needed.

> dcbsetting.cpp:220
> +} else {
> +return false;
> +}

You can remove the else branch and have just return false.

> dcbsetting.cpp:254
> +} else {
> +return 0;
> +}

You can remove the else branch and have just return 0.

> dcbsetting.cpp:288
> +} else {
> +return 0;
> +}

You can remove the else branch and have just return 0.

> dcbsetting.cpp:322
> +} else {
> +return 0;
> +}

You can remove the else branch and have just return 0.

> dcbsetting.cpp:356
> +} else {
> +return false;
> +}

You can remove the else branch and have just return false.

> dcbsetting.cpp:390
> +} else {
> +return 0;
> +}

You can remove the else branch and have just return 0.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Jan Grulich
jgrulich added a comment.


  This was last round, otherwise it's ready to go, just fix the remaining 
issues. Thanks.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade updated this revision to Diff 47282.
pranavgade marked an inline comment as done.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17425?vs=47279&id=47282

REVISION DETAIL
  https://phabricator.kde.org/D17425

AFFECTED FILES
  autotests/settings/CMakeLists.txt
  autotests/settings/dcbsettingtest.cpp
  autotests/settings/dcbsettingtest.h
  src/CMakeLists.txt
  src/settings/dcbsetting.cpp
  src/settings/dcbsetting.h
  src/settings/dcbsetting_p.h
  src/settings/setting.cpp
  src/settings/setting.h

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Pranav Gade
pranavgade marked 7 inline comments as done.

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Christoph Feck
cfeck set the repository for this revision to R282 NetworkManagerQt.

REPOSITORY
  R282 NetworkManagerQt

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17425: dcb settings

2018-12-10 Thread Christoph Feck
cfeck added a comment.


  Please keep the Repository settings. Additionally, please format the title 
and description according to 
https://community.kde.org/Infrastructure/Phabricator#Formatting_your_patch

REPOSITORY
  R282 NetworkManagerQt

REVISION DETAIL
  https://phabricator.kde.org/D17425

To: pranavgade, jgrulich
Cc: cfeck, kde-frameworks-devel, michaelh, ngraham, bruns