diff options
Diffstat (limited to 'client/viewer.cc')
-rw-r--r-- | client/viewer.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/viewer.cc b/client/viewer.cc index 09b6e47..c4bd3f5 100644 --- a/client/viewer.cc +++ b/client/viewer.cc @@ -81,7 +81,12 @@ Viewer::Viewer(QString cpr, QString templs, QString host, quint16 port, this->templs = templs.split(QRegExp("\\W+"), QString::SkipEmptyParts); connect(&updatetimer, SIGNAL(timeout()), this, SLOT(update())); - netcom = new NetCom(host, port, user, cpr); + netcom = new NetCom(host, port); + netcom->user = user; + netcom->patientid = cpr; + netcom->sessionid = ""; + netcom->initConnection(); + host = host; port = port; user = user; this->cpr = cpr; this->journalpath = journalpath; @@ -109,6 +114,8 @@ Viewer::Viewer(QString cpr, QString templs, QString host, quint16 port, Viewer::~Viewer() { + updatetimer.stop(); + netcom->discard(); // Make sure sessionid is removed. delete netcom; delete journal; } |