summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems/opengl/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/graphicssystems/opengl/main.cpp')
-rw-r--r--src/plugins/graphicssystems/opengl/main.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp
index 66b9b84..c28b09a 100644
--- a/src/plugins/graphicssystems/opengl/main.cpp
+++ b/src/plugins/graphicssystems/opengl/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the plugins of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -41,6 +41,7 @@
#include <private/qgraphicssystemplugin_p.h>
#include <private/qgraphicssystem_gl_p.h>
+#include <qgl.h>
QT_BEGIN_NAMESPACE
@@ -53,11 +54,18 @@ public:
QStringList QGLGraphicsSystemPlugin::keys() const
{
- return QStringList(QLatin1String("OpenGL"));
+ QStringList list;
+ list << QLatin1String("OpenGL") << QLatin1String("OpenGL1");
+ return list;
}
QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system)
{
+ if (system.toLower() == QLatin1String("opengl1")) {
+ QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
+ return new QGLGraphicsSystem;
+ }
+
if (system.toLower() == QLatin1String("opengl"))
return new QGLGraphicsSystem;