From 74a28aa7125be6a603128ad600c98c4882f3b5c2 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 1 Jun 2010 12:58:32 +0000 Subject: From new_protocol branch. --- client/viewer.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/viewer.cc') 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; } -- cgit v1.2.3