A security patch will be applied between 1pm - 1:30pm, (UTC-0400), today- Aug 5th. No downtime is expected, but the site could be slow during that time.

Commit e8c06788 authored by bonnell's avatar bonnell
Browse files

Update pyside2 version. Update visit_utils tests to import PySide2, and to...

Update pyside2 version. Update visit_utils tests to import PySide2, and to ensure _output dir exists.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@31452 18c085ea-50e0-402c-830e-de6fd14e8384
parent e280f96f
......@@ -46,11 +46,11 @@ function bv_pyside_initialize_vars
unset PYSIDE_FILE
unset PYSIDE_BUILD_DIR
unset PYSIDE_MD5_CHECKSUM
export PYSIDE_VERSION=${PYSIDE_VERSION:-"2.0.0-2017.02.14"}
export PYSIDE_FILE=${PYSIDE_FILE:-"pyside2-combined.2017.02.14.tar.gz"}
export PYSIDE_VERSION=${PYSIDE_VERSION:-"2.0.0-2017.08.30"}
export PYSIDE_FILE=${PYSIDE_FILE:-"pyside2-combined.2017.08.30.tar.gz"}
export PYSIDE_BUILD_DIR=${PYSIDE_BUILD_DIR:-"pyside2-combined"}
export PYSIDE_MD5_CHECKSUM=""
elif [[ "$IS_QT5" == "no" && "$PYSIDE_VERSION" == "2.0.0-2017.02.14" ]]; then
elif [[ "$IS_QT5" == "no" && "$PYSIDE_VERSION" == "2.0.0-2017.08.30" ]]; then
unset PYSIDE_VERSION
unset PYSIDE_FILE
unset PYSIDE_BUILD_DIR
......@@ -65,8 +65,8 @@ function bv_pyside_initialize_vars
function bv_pyside_info
{
if [[ "$IS_QT5" == "yes" ]]; then
export PYSIDE_VERSION=${PYSIDE_VERSION:-"2.0.0-2017.02.14"}
export PYSIDE_FILE=${PYSIDE_FILE:-"pyside2-combined.2017.02.14.tar.gz"}
export PYSIDE_VERSION=${PYSIDE_VERSION:-"2.0.0-2017.08.30"}
export PYSIDE_FILE=${PYSIDE_FILE:-"pyside2-combined.2017.08.30.tar.gz"}
export PYSIDE_BUILD_DIR=${PYSIDE_BUILD_DIR:-"pyside2-combined"}
export PYSIDE_MD5_CHECKSUM=""
export PYSIDE_SHA256_CHECKSUM=""
......
......@@ -48,6 +48,7 @@ if(VISIT_QT5)
set(pyside_qt_includes
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5OpenGL_INCLUDE_DIRS})
else()
set(pyside_qt_includes
......
......@@ -2,6 +2,7 @@
<typesystem package="pyside_gui">
<load-typesystem name="typesystem_core.xml" generate="no"/>
<load-typesystem name="typesystem_gui.xml" generate="no"/>
<load-typesystem name="typesystem_widgets.xml" generate="no"/>
<load-typesystem name="typesystem_opengl.xml" generate="no"/>
<!--
......
......@@ -61,7 +61,7 @@ except:
try:
import PySide.QtCore
import PySide2.QtCore
__pyside_imported = True
except:
__pyside_imported = False
......
......@@ -50,8 +50,9 @@ import xinit
try:
from PySide.QtCore import *
from PySide.QtGui import *
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
except:
QWidget = object
......
......@@ -48,8 +48,8 @@ import time
from math import *
try:
from PySide.QtCore import *
from PySide.QtGui import *
from PySide2.QtCore import *
from PySide2.QtGui import *
except:
pass
......
......@@ -49,7 +49,7 @@ from visit_test import *
from visit_utils.qannote import *
try:
import PySide.QtCore
import PySide2.QtCore
except:
pass
......@@ -57,6 +57,8 @@ output_dir = pjoin(os.path.split(__file__)[0],"_output")
data_dir = pjoin(os.path.split(__file__)[0],"_data")
def out_path(fname):
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
odir = pjoin(output_dir,"qannote")
if not os.path.isdir(odir):
os.mkdir(odir)
......
......@@ -50,7 +50,7 @@ from visit_test import *
from visit_utils.qannote import *
try:
import PySide.QtCore
import PySide2.QtCore
except:
pass
......@@ -59,6 +59,8 @@ output_dir = pjoin(os.path.split(__file__)[0],"_output")
data_dir = pjoin(os.path.split(__file__)[0],"_data")
def out_path(fname):
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
odir = pjoin(output_dir,"qannote")
if not os.path.isdir(odir):
os.mkdir(odir)
......
......@@ -50,7 +50,7 @@ from visit_test import *
from visit_utils.qannote import *
try:
import PySide.QtCore
import PySide2.QtCore
except:
pass
......@@ -59,6 +59,8 @@ output_dir = pjoin(os.path.split(__file__)[0],"_output")
data_dir = pjoin(os.path.split(__file__)[0],"_data")
def out_path(fname):
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
odir = pjoin(output_dir,"qannote")
if not os.path.isdir(odir):
os.mkdir(odir)
......
......@@ -49,7 +49,7 @@ from visit_test import *
from visit_utils.qannote import *
try:
import PySide.QtCore
import PySide2.QtCore
except:
pass
......@@ -58,6 +58,8 @@ output_dir = pjoin(os.path.split(__file__)[0],"_output")
data_dir = pjoin(os.path.split(__file__)[0],"_data")
def out_path(fname):
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
odir = pjoin(output_dir,"qannote")
if not os.path.isdir(odir):
os.mkdir(odir)
......
......@@ -18,7 +18,7 @@ from visit_test import *
from visit_utils.qplot import *
try:
import PySide.QtCore
import PySide2.QtCore
except:
pass
......@@ -39,6 +39,8 @@ def patch_scene_input(in_fname,ult_fname):
class TestScene(unittest.TestCase):
def setUp(self):
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
self.curves = ult.Curve.load(pjoin(data_dir,"sine.ult"))
def test_01_basic(self):
crv = ult.Curve.load(pjoin(data_dir,"pattern.ult"))[0]
......
......@@ -66,7 +66,7 @@ def pyside_test(fn):
we aren't running in the cli.
"""
def run_fn(*args):
if "PySide.QtCore" in sys.modules.keys():
if "PySide2.QtCore" in sys.modules.keys():
return fn(*args)
else:
print "[PySide not found, skipping test that requires PySide]"
......
......@@ -63,32 +63,32 @@ from evalfuncs import *
from writescript import *
try:
import PySide
import PySide2
import pyside_hook
import pyside_gui
import pyside_support
class KeyPressEater(PySide.QtCore.QObject):
class KeyPressEater(PySide2.QtCore.QObject):
def eventFilter(self, obj, event):
if event.type() == PySide.QtCore.QEvent.KeyPress:
if event.type() == PySide2.QtCore.QEvent.KeyPress:
return True
elif event.type() == PySide.QtCore.QEvent.MouseButtonPress:
elif event.type() == PySide2.QtCore.QEvent.MouseButtonPress:
return True
elif event.type() == PySide.QtCore.QEvent.MouseButtonRelease:
elif event.type() == PySide2.QtCore.QEvent.MouseButtonRelease:
return True
elif event.type() == PySide.QtCore.QEvent.MouseButtonDblClick:
elif event.type() == PySide2.QtCore.QEvent.MouseButtonDblClick:
return True
elif event.type() == PySide.QtCore.QEvent.MouseMove:
elif event.type() == PySide2.QtCore.QEvent.MouseMove:
return True
else:
return PySide.QtCore.QObject.eventFilter(self, obj, event)
return PySide2.QtCore.QObject.eventFilter(self, obj, event)
def __VisIt_PySide_Idle_Hook__():
a = KeyPressEater()
app = PySide.QtCore.QEventLoop();
PySide.QtCore.QCoreApplication.instance().installEventFilter(a)
app.processEvents(PySide.QtCore.QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents);
PySide.QtCore.QCoreApplication.instance().removeEventFilter(a)
app = PySide2.QtCore.QEventLoop();
PySide2.QtCore.QCoreApplication.instance().installEventFilter(a)
app.processEvents(PySide2.QtCore.QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents);
PySide2.QtCore.QCoreApplication.instance().removeEventFilter(a)
def IsPySideViewerEnabled(): return True
except ImportError:
......
......@@ -54,7 +54,7 @@ from threading import Event, Thread
using_pyside = False
try:
from PySide.QtGui import QApplication
from PySide2.QtWidgets import QApplication
import pyside_hook
import pyside_gui
using_pyside = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment