Skip to content

Commit

Permalink
Added QtIfw warning popup function (to join the existing error, debug…
Browse files Browse the repository at this point in the history
…, etc.).
  • Loading branch information
BuvinJ committed Jan 13, 2021
1 parent 794e4a3 commit e10078e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distbuilder/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.8.28"
__version__ = "0.7.8.29"
12 changes: 10 additions & 2 deletions distbuilder/qt_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,12 +859,15 @@ class _QtIfwScript:

__LOG_TMPL = "console.log(%s);\n"
__MSG_WRAPPER_TMPL = 'writeOutLog( %s );\n'

__DEBUG_POPUP_TMPL = (
'QMessageBox.information("debugbox", "Debug", ' +
'%s, QMessageBox.Ok );\n' )
__WARN_POPUP_TMPL = (
'QMessageBox.warning("warningbox", "Warning", ' +
'%s, QMessageBox.Ok );\n' )

__ERROR_POPUP_TMPL = (
'QMessageBox. critical("errorbox", "Error", ' +
'QMessageBox.critical("errorbox", "Error", ' +
'%s, QMessageBox.Ok );\n' )

__YES_NO_POPUP_TMPL = (
Expand Down Expand Up @@ -1099,6 +1102,11 @@ def debugPopup( msg, isAutoQuote=True ):
return _QtIfwScript.__DEBUG_POPUP_TMPL % (
_QtIfwScript._autoQuote( msg, isAutoQuote ),)

@staticmethod
def warningPopup( msg, isAutoQuote=True ):
return _QtIfwScript.__WARN_POPUP_TMPL % (
_QtIfwScript._autoQuote( msg, isAutoQuote ),)

@staticmethod
def errorPopup( msg, isAutoQuote=True ):
return _QtIfwScript.__ERROR_POPUP_TMPL % (
Expand Down
1 change: 1 addition & 0 deletions docs/LowLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ Static Functions:
enableComponent( package, enable=True, isAutoQuote=True )
debugPopup( msg, isAutoQuote=True )
warningPopup( msg, isAutoQuote=True )
errorPopup( msg, isAutoQuote=True )
yesNoPopup( msg, title="Question", resultVar="result" )
yesNoCancelPopup( msg, title="Question", resultVar="result" )
Expand Down

0 comments on commit e10078e

Please sign in to comment.