c++ - Qt codingstyle: how to name private variables -
i know, "best" way name private variables in qt c++ class?
i know every company/person has own preferences when comes coding style guidelines, maybe can give examples can choose from. @ moment tent prefix private variables "my", seems bit silly. example:
public: bool setcolor(); qcolor color(); private: qcolor mycolor;
i did read http://wiki.qt.io/qt_coding_style reference, unfortunately did not cover issue.
qt uses encapsulation in "private class" (aka pimpl), no additional naming convention required.
as alternative, prefer choose special prefix m_
.
Comments
Post a Comment