1 changed files with 26 additions and 0 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#include "OpalRT.h" |
||||
|
||||
namespace OpalRT |
||||
{ |
||||
// lastErrorMsg = QString();
|
||||
void OpalErrorMsg::displayLastErrorMsg() |
||||
{ |
||||
static QString lastErrorMsg; |
||||
setLastErrorMsg(); |
||||
QMessageBox msgBox; |
||||
msgBox.setIcon(QMessageBox::Critical); |
||||
msgBox.setText(lastErrorMsg); |
||||
msgBox.exec(); |
||||
} |
||||
|
||||
void OpalErrorMsg::setLastErrorMsg() |
||||
{ |
||||
char* buf = new char[512]; |
||||
unsigned short len; |
||||
static QString lastErrorMsg; |
||||
OpalGetLastErrMsg(buf, sizeof(buf), &len); |
||||
lastErrorMsg.clear(); |
||||
lastErrorMsg.append(buf); |
||||
delete buf; |
||||
} |
||||
} |
Loading…
Reference in new issue