diff options
| author | Thomas Braxton <kde.braxton@gmail.com> | 2014-06-11 08:40:44 -0500 | 
|---|---|---|
| committer | Thomas Braxton <kde.braxton@gmail.com> | 2014-06-12 17:14:16 -0500 | 
| commit | ac6703215ba5e152379173ba503f5ba3bd7e8a85 (patch) | |
| tree | d3072f5a03ec66569d4e2f6770fbaa06090cd98f /src/gui/kconfiggroupgui.cpp | |
| parent | 0ed55dfa5d25bdcbef24f1b06be34467b620ae99 (diff) | |
| download | kconfig-ac6703215ba5e152379173ba503f5ba3bd7e8a85.tar.gz kconfig-ac6703215ba5e152379173ba503f5ba3bd7e8a85.tar.bz2  | |
Simple Cleanups
- use Q_NULLPTR instead of 0 or NULL
- simplify some foreach loops
- use QStringLiteral in a few places
- added a few consts
REVIEW: 118666
Diffstat (limited to 'src/gui/kconfiggroupgui.cpp')
| -rw-r--r-- | src/gui/kconfiggroupgui.cpp | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/kconfiggroupgui.cpp b/src/gui/kconfiggroupgui.cpp index a14c204c..e2eb950f 100644 --- a/src/gui/kconfiggroupgui.cpp +++ b/src/gui/kconfiggroupgui.cpp @@ -38,11 +38,11 @@  static bool readEntryGui(const QByteArray &data, const char *key, const QVariant &input,                           QVariant &output)  { -    const QString errString = QString::fromLatin1("\"%1\" - conversion from \"%3\" to %2 failed") +    const QString errString = QStringLiteral("\"%1\" - conversion from \"%3\" to %2 failed")                                .arg(QLatin1String(key))                                .arg(QLatin1String(QVariant::typeToName(input.type())))                                .arg(QLatin1String(data.constData())); -    const QString formatError = QString::fromLatin1(" (wrong format: expected '%1' items, read '%2')"); +    const QString formatError = QStringLiteral(" (wrong format: expected '%1' items, read '%2')");      // set in case of failure      output = input; @@ -70,7 +70,7 @@ static bool readEntryGui(const QByteArray &data, const char *key, const QVariant              const int count = list.count();              if (count != 3 && count != 4) { -                qCritical() << qPrintable(errString) << qPrintable(formatError.arg(QLatin1String("3' or '4")).arg(count)); +                qCritical() << qPrintable(errString) << qPrintable(formatError.arg(QStringLiteral("3' or '4")).arg(count));                  return true;    // return default              } @@ -84,12 +84,12 @@ static bool readEntryGui(const QByteArray &data, const char *key, const QVariant                      return true; // return default                  }                  if (j < 0 || j > 255) { -                    static const char *const components[6] = { +                    static const char *const components[] = {                          "red", "green", "blue", "alpha"                      }; -                    const QString boundsError = QLatin1String(" (bounds error: %1 component %2)"); +                    const QString boundsError = QStringLiteral(" (bounds error: %1 component %2)");                      qCritical() << qPrintable(errString) -                                << qPrintable(boundsError.arg(QLatin1String(components[i])).arg(j < 0 ? QLatin1String("< 0") : QLatin1String("> 255"))); +                                << qPrintable(boundsError.arg(QLatin1String(components[i])).arg(j < 0 ? QStringLiteral("< 0") : QStringLiteral("> 255")));                      return true; // return default                  }              }  | 
