diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2010-03-05 18:00:01 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2010-03-05 18:08:58 (GMT) |
commit | 4a72e2f1994324198d1a2c79382185dcca41a576 (patch) | |
tree | 4e0efe9eb63ab0b15b82bdd2b602f36a80667ea1 /src/plugins | |
parent | 186f75db32bdc177bdbc192552cf7275d9723c85 (diff) | |
download | Qt-4a72e2f1994324198d1a2c79382185dcca41a576.zip Qt-4a72e2f1994324198d1a2c79382185dcca41a576.tar.gz Qt-4a72e2f1994324198d1a2c79382185dcca41a576.tar.bz2 |
Add some warnings when using DISABLE/WARN in DFB
If you specify an operation that is not recognized in
QT_DIRECTFB_WARN_ON_RASTERFALLBACKS or
QT_DIRECTFB_DISABLE_RASTERFALLBACKS
Reviewed-by: muthu <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 537baf5..e79dceb 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -204,21 +204,36 @@ static void initRasterFallbacksMasks(int *warningMask, int *disableMask) { 0, ALL } }; - const QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|')); - const QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|')); + QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'), + QString::SkipEmptyParts); + QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'), + QString::SkipEmptyParts); *warningMask = 0; *disableMask = 0; if (!warning.isEmpty() || !disable.isEmpty()) { for (int i=0; operations[i].name; ++i) { const QString name = QString::fromLatin1(operations[i].name); - if (warning.contains(name)) { + int idx = warning.indexOf(name); + if (idx != -1) { *warningMask |= operations[i].operation; + warning.remove(warning.begin() + idx); } - if (disable.contains(name)) { + idx = disable.indexOf(name); + if (idx != -1) { *disableMask |= operations[i].operation; + disable.remove(disable.begin() + idx); } } } + if (!warning.isEmpty()) { + qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s", + qPrintable(warning.join(QLatin1String("|")))); + } + if (!disable.isEmpty()) { + qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s", + qPrintable(disable.join(QLatin1String("|")))); + } + } #endif |