diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-26 14:26:51 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-02 13:14:57 +0000 |
commit | db4c54756088c59e35cbe4f64bd35d7aa43f8c56 (patch) | |
tree | f02b8d07e2aa422c3025e8fafe75d0c0c12a2f64 /sources/pyside2/PySide2/templates | |
parent | 67f389a79d08f7835d7f226836008e3384e7dd77 (diff) |
Add PySide2: Add OpenGL version functions as separate module
The OpenGL version functions produce a lot of library code, so, add
them as a separate module.
Task-number: PYSIDE-955
Change-Id: I44737f4741f0a81f46a192961173e154ae66698e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/PySide2/templates')
-rw-r--r-- | sources/pyside2/PySide2/templates/gui_common.xml | 8 | ||||
-rw-r--r-- | sources/pyside2/PySide2/templates/openglfunctions_common.xml | 50 |
2 files changed, 50 insertions, 8 deletions
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml index 363422c8f..f3e772a8c 100644 --- a/sources/pyside2/PySide2/templates/gui_common.xml +++ b/sources/pyside2/PySide2/templates/gui_common.xml @@ -251,14 +251,6 @@ } </template> - <template name="glGetString_return_QString"> - %BEGIN_ALLOW_THREADS - const GLubyte *us = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES); - const QString s = QString::fromLocal8Bit(reinterpret_cast<const char *>(us)); - %END_ALLOW_THREADS - %PYARG_0 = %CONVERTTOPYTHON[QString](s); - </template> - <template name="fix_args,QRectF*"> QRectF rect_; %BEGIN_ALLOW_THREADS diff --git a/sources/pyside2/PySide2/templates/openglfunctions_common.xml b/sources/pyside2/PySide2/templates/openglfunctions_common.xml new file mode 100644 index 000000000..e01094004 --- /dev/null +++ b/sources/pyside2/PySide2/templates/openglfunctions_common.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt for Python. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem> + <template name="glGetString_return_QString"> + %BEGIN_ALLOW_THREADS + const GLubyte *us = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES); + const QString s = QString::fromLocal8Bit(reinterpret_cast<const char *>(us)); + %END_ALLOW_THREADS + %PYARG_0 = %CONVERTTOPYTHON[QString](s); + </template> +</typesystem> |