From 7615ed0ec58864bc2d5e8de82bde7ee36a998b17 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 13 Jan 2009 08:50:26 +0000 Subject: [PATCH] Add the module qvariant_converter.py that abstracts the user from the qvariant_convertere specific module git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2166 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BCpuPage.py | 5 +---- wizard/BToolchainPage.py | 5 +---- wizard/BToolchainSearch.py | 5 +---- wizard/BVersionPage.py | 5 +---- wizard/BWizardPage.py | 5 +---- wizard/qvariant_converter.py | 17 +++++++++++++++++ 6 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 wizard/qvariant_converter.py diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 6289efd8..e42bd2db 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -12,10 +12,7 @@ from BWizardPage import * import bertos_utils -if PYQT_VERSION_STR > "4.4.3": - import qvariant_converter_new as qvariant_converter -else: - import qvariant_converter_old as qvariant_converter +import qvariant_converter class BCpuPage(BWizardPage): diff --git a/wizard/BToolchainPage.py b/wizard/BToolchainPage.py index 6b39ade8..2236fcfe 100644 --- a/wizard/BToolchainPage.py +++ b/wizard/BToolchainPage.py @@ -14,10 +14,7 @@ import os from BWizardPage import * import BToolchainSearch import bertos_utils -if PYQT_VERSION_STR > "4.4.3": - import qvariant_converter_new as qvariant_converter -else: - import qvariant_converter_old as qvariant_converter +import qvariant_converter class BToolchainPage(BWizardPage): diff --git a/wizard/BToolchainSearch.py b/wizard/BToolchainSearch.py index 67a85b98..de3a6840 100644 --- a/wizard/BToolchainSearch.py +++ b/wizard/BToolchainSearch.py @@ -13,10 +13,7 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * import PyQt4.uic as uic -if PYQT_VERSION_STR > "4.4.3": - import qvariant_converter_new as qvariant_converter -else: - import qvariant_converter_old as qvariant_converter +import qvariant_converter class BToolchainSearch(QDialog): diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index 1d078565..2f5a6260 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -12,10 +12,7 @@ from PyQt4.QtGui import * from BWizardPage import * import bertos_utils -if PYQT_VERSION_STR > "4.4.3": - import qvariant_converter_new as qvariant_converter -else: - import qvariant_converter_old as qvariant_converter +import qvariant_converter class BVersionPage(BWizardPage): diff --git a/wizard/BWizardPage.py b/wizard/BWizardPage.py index f7b60c37..b4fc6217 100644 --- a/wizard/BWizardPage.py +++ b/wizard/BWizardPage.py @@ -13,10 +13,7 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import uic -if PYQT_VERSION_STR > "4.4.3": - import qvariant_converter_new as qvariant_converter -else: - import qvariant_converter_old as qvariant_converter +import qvariant_converter class BWizardPage(QWizardPage): diff --git a/wizard/qvariant_converter.py b/wizard/qvariant_converter.py new file mode 100644 index 00000000..0e160927 --- /dev/null +++ b/wizard/qvariant_converter.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +# Copyright 2009 Develer S.r.l. (http://www.develer.com/) +# All rights reserved. +# +# $Id:$ +# +# Author: Lorenzo Berni +# + +from PyQt4.QtCore import PYQT_VERSION_STR + +if PYQT_VERSION_STR > "4.4.3": + from qvariant_converter_new import * +else: + from qvariant_converter_old import * -- 2.25.1