Jump to content

Frameworks/GettingStarted: Difference between revisions

From KDE Community Wiki
Krop (talk | contribs)
QT_NO_KEYWORDS is replaced by QT_NO_SIGNALS_SLOTS_KEYWORDS in ecm 0.0.9
Krop (talk | contribs)
 
Line 13: Line 13:
KDE Frameworks now enforces -DQT_NO_SIGNALS_SLOTS_KEYWORDS
KDE Frameworks now enforces -DQT_NO_SIGNALS_SLOTS_KEYWORDS


This means the "signals" and "slots" will not work. They should be replaced by Q_SIGNALS and Q_SLOTS respectively.
This means the "signals" and "slots" keywords will not work. They should be replaced by Q_SIGNALS and Q_SLOTS respectively.


====Strings====
====Strings====

Latest revision as of 10:53, 24 August 2013

Getting Started

Useful Reading

Information about the changes between Qt4 and Qt5 can be found in the dist/changes-5.x of each submodule

Changes regarding changes to kdelibs can be found at kdelibs/KDE5PORTING.html

Other Changes

Qt Keywords

KDE Frameworks now enforces -DQT_NO_SIGNALS_SLOTS_KEYWORDS

This means the "signals" and "slots" keywords will not work. They should be replaced by Q_SIGNALS and Q_SLOTS respectively.

Strings

In Frameworks 5 any string on its own such as "foo" will not be automatically converted to a QString. Instead, you should use one of:

  • QLatin1String() for string comparisons i.e (if myString == QLatin1String("SomeText))
  • QStringLiteral for string creation i.e QIcon::fromTheme(QStringLiteral("document-new"));
  • tr() for translatable strings in frameworks that cannot use i18n
  • i18n for translatable strings in frameworks that can use i18n