Jump to content

Krita/docs/NewCodingPoliciesInMaster: Difference between revisions

From KDE Community Wiki
Halla (talk | contribs)
Dmitry (talk | contribs)
No edit summary
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>
# 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);
#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);

Revision as of 19:28, 11 September 2015

New coding policy standards which should be use in Calligra master

  1. Use Q_SLOTS ans Q_SIGNALS instead of slots/signals keywords we used before
  2. 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.
  3. instead of #include <QDebug> and #include <kdebug.h> use #include <kis_debug.h>
  4. 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);