diff options
author | Michael 'Mickey' Lauer <mickey@vanille-media.de> | 2004-02-18 22:45:50 +0000 |
---|---|---|
committer | Michael 'Mickey' Lauer <mickey@vanille-media.de> | 2004-02-18 22:45:50 +0000 |
commit | 30182e1dc0f48543e6b569cbc75b3e26b238d623 (patch) | |
tree | 3c0652358f91e957c70fd3fa7b71ee0ee67c9a92 /bin/oecommander | |
parent | ee3c4a07625d39af20c6a254c46681c84f1ee3fa (diff) | |
download | bitbake-contrib-30182e1dc0f48543e6b569cbc75b3e26b238d623.tar.gz |
refactoring
Diffstat (limited to 'bin/oecommander')
-rw-r--r-- | bin/oecommander | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/oecommander b/bin/oecommander index 86191bc44..804288053 100644 --- a/bin/oecommander +++ b/bin/oecommander @@ -14,7 +14,7 @@ def fail( reason ): sys.exit( -1 ) # -# sanity check PyQt +# sanity check Qt and PyQt # try: @@ -29,20 +29,21 @@ except NameError: fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION ) major, minor = PYQT_VERSION_STR.split( '.' ) -if major < 3 or ( major == 3 and minor < 10 ): +if int(major) < 3 or ( int(major) == 3 and int(minor) < 10 ): fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION_STR ) import sys -from commander.mainwindow import MainWindow +try: + from commander.mainwindow import MainWindow +except ImportError: + fail( "Error: Can't load GUI parts. Did you 'qmake commander.pro && make' in $OEDIR/commander/?" ) from qt import * #------------------------------------------------------------------------# # main #------------------------------------------------------------------------# -app = QApplication( sys.argv ) -mw = MainWindow() -mw.show() -app.setMainWidget( mw ) -app.exec_loop() - +from commander.application import CommanderApplication +app = CommanderApplication( sys.argv ) +app.initialize() +app.run() |