CorePlugin: Compile with QT_NO_CAST_FROM_ASCII.

- Wrap literals in QLatin1String()/QLatin1Char().
- Extract some string constants avoiding repeated
  QString construction.
- Fix repeated invocation of Container.end() in loops.

Change-Id: If737735507aaf82e53063adda53f54c46418f42f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-12-22 14:44:14 +01:00
parent 0d72da2fd4
commit 2892f13b8c
24 changed files with 155 additions and 117 deletions

View File

@@ -218,9 +218,9 @@ void ModeManager::objectAdded(QObject *obj)
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
== currentCmd->defaultKeySequence());
#ifdef Q_WS_MAC
currentCmd->setDefaultKeySequence(QKeySequence(QString("Meta+%1").arg(i+1)));
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Meta+%1").arg(i+1)));
#else
currentCmd->setDefaultKeySequence(QKeySequence(QString("Ctrl+%1").arg(i+1)));
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Ctrl+%1").arg(i+1)));
#endif
if (currentlyHasDefaultSequence)
currentCmd->setKeySequence(currentCmd->defaultKeySequence());