Krita/docs/NewCodingPoliciesInMaster: Difference between revisions
(Created page with "= New coding policy standards which should be use in Calligra master = # Use Q_SLOTS ans Q_SIGNALS instead of slots/signals keywords we used before # Add Q_DECL_HIDDEN to all ...") |
No edit summary |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
= New coding policy standards which should be use in Calligra master = | = New coding policy standards which should be use in Calligra master = | ||
# Use Q_SLOTS ans Q_SIGNALS instead of slots/signals keywords we used before | # Use Q_SLOTS ans Q_SIGNALS instead of slots/signals keywords we used before | ||
# Add Q_DECL_HIDDEN to all Private classes in new code | # Add Q_DECL_HIDDEN to all nested Private classes in new code. A::Private need their symbols hidden, APrivate class does not, as it does not inherit the visibility from A. | ||
# instead of #include <QDebug> and #include <kdebug.h> use #include <kis_debug.h> | |||
# Use QUrl instead of KUrl and keep in mind that QString s; QUrl u = s; becomes QUrl u = QUrl::fromUserInput(s) or QUrl::fromLocalFile(s); | |||
# KisIconUtils::loadIcon() should be used instead of previously used themedIcon() | |||
# KAction is deprecated. Use QAction instead. | |||
# Certain features of C++11 are now allowed. Discussion here: [[Krita/C++11]] | |||
# stdlib replacements to boost libraries in C++11 are preferred. For example, we use std::function and std::bind instead of boost::function and boost::bind. See link above. | |||
# KIcon is deprecated in favour of QIcon | |||
# Singletons use another api |
Latest revision as of 15:39, 28 October 2015
New coding policy standards which should be use in Calligra master
- Use Q_SLOTS ans Q_SIGNALS instead of slots/signals keywords we used before
- Add Q_DECL_HIDDEN to all nested Private classes in new code. A::Private need their symbols hidden, APrivate class does not, as it does not inherit the visibility from A.
- instead of #include <QDebug> and #include <kdebug.h> use #include <kis_debug.h>
- Use QUrl instead of KUrl and keep in mind that QString s; QUrl u = s; becomes QUrl u = QUrl::fromUserInput(s) or QUrl::fromLocalFile(s);
- KisIconUtils::loadIcon() should be used instead of previously used themedIcon()
- KAction is deprecated. Use QAction instead.
- Certain features of C++11 are now allowed. Discussion here: Krita/C++11
- stdlib replacements to boost libraries in C++11 are preferred. For example, we use std::function and std::bind instead of boost::function and boost::bind. See link above.
- KIcon is deprecated in favour of QIcon
- Singletons use another api