Use case insensitive comparison when checking platform plugin keys.
Change-Id: Iff44698dcc941ca244b476f0e6c6a993f2ad75f3 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
d78c39ed12
commit
1f6c4a514c
@ -56,7 +56,7 @@ public:
|
||||
QPlatformIntegration *QAndroidPlatformIntegrationPlugin::create(const QString &key, const QStringList ¶mList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (key.toLower() == "android")
|
||||
if (!key.compare(QLatin1String("android"), Qt::CaseInsensitive))
|
||||
return new QAndroidPlatformIntegration(paramList);
|
||||
return 0;
|
||||
}
|
||||
|
@ -61,8 +61,7 @@ QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, co
|
||||
Q_UNUSED(paramList);
|
||||
|
||||
QCocoaAutoReleasePool pool;
|
||||
|
||||
if (system.toLower() == "cocoa")
|
||||
if (!system.compare(QLatin1String("cocoa"), Qt::CaseInsensitive))
|
||||
return new QCocoaIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -68,7 +68,7 @@ QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system,
|
||||
Q_UNUSED(paramList);
|
||||
QDirectFbIntegration *integration = 0;
|
||||
|
||||
if (system.toLower() == "directfb")
|
||||
if (!system.compare(QLatin1String("directfb"), Qt::CaseInsensitive))
|
||||
integration = new QDirectFbIntegration;
|
||||
QT_EGL_BACKEND_CREATE(system, integration)
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
QPlatformIntegration* QEglFSIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "eglfs")
|
||||
if (!system.compare(QLatin1String("eglfs"), Qt::CaseInsensitive))
|
||||
return new QEglFSIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -56,7 +56,7 @@ class QIOSIntegrationPlugin : public QPlatformIntegrationPlugin
|
||||
QPlatformIntegration * QIOSIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "ios")
|
||||
if (!system.compare(QLatin1String("ios"), Qt::CaseInsensitive))
|
||||
return new QIOSIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
QPlatformIntegration *QKmsIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "kms")
|
||||
if (!system.compare(QLatin1String("kms"), Qt::CaseInsensitive))
|
||||
return new QKmsIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
QPlatformIntegration* QLinuxFbIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "linuxfb")
|
||||
if (!system.compare(QLatin1String("linuxfb"), Qt::CaseInsensitive))
|
||||
return new QLinuxFbIntegration(paramList);
|
||||
|
||||
return 0;
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
QPlatformIntegration *QMinimalIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "minimal")
|
||||
if (!system.compare(QLatin1String("minimal"), Qt::CaseInsensitive))
|
||||
return new QMinimalIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -63,7 +63,7 @@ QStringList QMinimalEglIntegrationPlugin::keys() const
|
||||
QPlatformIntegration* QMinimalEglIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "minimalegl")
|
||||
if (!system.compare(QLatin1String("minimalegl"), Qt::CaseInsensitive))
|
||||
return new QMinimalEglIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
QPlatformIntegration *QOffscreenIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "offscreen")
|
||||
if (!system.compare(QLatin1String("offscreen"), Qt::CaseInsensitive))
|
||||
return QOffscreenIntegration::createOffscreenIntegration();
|
||||
|
||||
return 0;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
QPlatformIntegration* QOpenWFDIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
if (system.toLower() == "openwfd")
|
||||
if (!system.compare(QLatin1String("openwfd"), Qt::CaseInsensitive))
|
||||
return new QOpenWFDIntegration;
|
||||
|
||||
return 0;
|
||||
|
@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
QPlatformIntegration *QQnxIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
if (system.toLower() == QLatin1String("qnx"))
|
||||
if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive))
|
||||
return new QQnxIntegration(paramList);
|
||||
|
||||
return 0;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
|
||||
QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv)
|
||||
{
|
||||
if (system.toLower() == "xcb")
|
||||
if (!system.compare(QLatin1String("xcb"), Qt::CaseInsensitive))
|
||||
return new QXcbIntegration(parameters, argc, argv);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user