diff options
Diffstat (limited to 'client/netcom.cc')
-rw-r--r-- | client/netcom.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/netcom.cc b/client/netcom.cc index 0da19f8..3b3abb7 100644 --- a/client/netcom.cc +++ b/client/netcom.cc @@ -46,13 +46,13 @@ NetCom::~NetCom() socket.disconnectFromHost(); } -QDomDocument NetCom::send(QString templ, QString macro) +QDomDocument NetCom::send(QString templ, QString macro, bool lockgui) { printf("Socket state: %d\n", socket.state()); if(socket.state() != 3) printf("Socket state not connected: %s\n", socket.errorString().toStdString().c_str()); - if(qApp->activeWindow()) qApp->activeWindow()->setEnabled(false); - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + if(lockgui && qApp->activeWindow()) qApp->activeWindow()->setEnabled(false); + if(lockgui) QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QDomDocument doc; @@ -85,8 +85,8 @@ QDomDocument NetCom::send(QString templ, QString macro) printf("\nRecieved request:\n%s", res_doc.toString().toStdString().c_str()); - QApplication::restoreOverrideCursor(); - if(qApp->activeWindow()) qApp->activeWindow()->setEnabled(true); + if(lockgui) QApplication::restoreOverrideCursor(); + if(lockgui && qApp->activeWindow()) qApp->activeWindow()->setEnabled(true); return res_doc; } |