summaryrefslogtreecommitdiff
path: root/client/netcom.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/netcom.cc')
-rw-r--r--client/netcom.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/netcom.cc b/client/netcom.cc
index 2798a59..9d9a5bb 100644
--- a/client/netcom.cc
+++ b/client/netcom.cc
@@ -50,8 +50,10 @@
#endif
#endif
-NetCom::NetCom(QString host, quint16 port)
+NetCom::NetCom(QWidget *wdg, QString host, quint16 port)
{
+ this->wdg = wdg;
+
//
// Setup connection
//
@@ -86,7 +88,7 @@ QDomDocument NetCom::makeTransfer(QDomDocument &doc, bool lockgui,
{
DEBUG(netcom, "Making transfer:\n%s", doc.toString().toStdString().c_str());
- if(lockgui && qApp->activeWindow()) qApp->activeWindow()->setEnabled(false);
+ if(lockgui && wdg) wdg->setEnabled(false);
if(lockgui) QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
LOG(netcom, "SESSION ID: %s\n", sessionid.toStdString().c_str());
@@ -137,7 +139,7 @@ QDomDocument NetCom::makeTransfer(QDomDocument &doc, bool lockgui,
}
if(lockgui) QApplication::restoreOverrideCursor();
- if(lockgui && qApp->activeWindow()) qApp->activeWindow()->setEnabled(true);
+ if(lockgui && wdg) wdg->setEnabled(true);
return res_doc;
}