Binary Compatibility Workarounds

From Qt Wiki
Revision as of 14:02, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Binary Compatibility Workarounds

This page describes some workarounds for keeping binary compatibility in patch releases.

You should read the KDE reference: http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++

Declaring a slot for private classes (d-pointer)

Use a Q_PRIVATE_SLOT:

Pitfalls to avoid:

  • Don’t include `a.moc`, but `moc_a.cpp` in your .cpp file
  • Q_PRIVATE_SLOT takes the complete signature of the private slot, not just its name

Categories: