Ignore:
Timestamp:
Aug 22, 2017 5:59:29 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
b2a5042
Parents:
457d961
Message:

Use singleton QApplication in unit tests to avoid issues on Ubuntu. SASVIEW-485

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/UnitTesting/Plotter2DTest.py

    rdc5ef15 r464cd07  
    1919import sas.qtgui.Plotting.Plotter2D as Plotter2D 
    2020 
    21 app = QtGui.QApplication(sys.argv) 
     21if not QtGui.QApplication.instance(): 
     22    app = QtGui.QApplication(sys.argv) 
    2223 
    2324class Plotter2DTest(unittest.TestCase): 
     
    159160        def done(): 
    160161            self.clipboard_called = True 
    161         QtCore.QObject.connect(app.clipboard(), QtCore.SIGNAL("dataChanged()"), done) 
     162        QtCore.QObject.connect(QtGui.qApp.clipboard(), QtCore.SIGNAL("dataChanged()"), done) 
    162163        actions[2].trigger() 
    163164        QtGui.qApp.processEvents() 
Note: See TracChangeset for help on using the changeset viewer.