Recently a KSharedConfig was introduced in RuleBook. It makes sense to
also use it in save and not just in load.
Details
Details
- Reviewers
romangg - Group Reviewers
KWin Plasma - Commits
- R108:a02797ca0608: Use existing KSharedConfig in RuleBook::save
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
rules.cpp | ||
---|---|---|
1084 | Shouldn't it call openConfig in this case in order to set m_config and not just return? Also note that m_config is not initialized as a nullptr in the header file or in the constructor. Might be a problem with the check on !m_config (but should be then in the load function as well). |
rules.cpp | ||
---|---|---|
1084 | Save cannot be called without calling load before. Thus I decided to not add the load code as it would be dead code. M_config is a smart pointer, thus does not need to be explicitly initialized with null. |
rules.cpp | ||
---|---|---|
1084 | Assert then? |
rules.cpp | ||
---|---|---|
1084 | I don't like asserts |
rules.cpp | ||
---|---|---|
1084 | Maybe then a warning message. Anyways, this is a non-blocking issue for me. |