#include "sslexception.h"
#include "templates.h"
+#include <QDateTime>
#include <QDebug>
#include <QDir>
#include <QNetworkReply>
#include <QMessageBox>
#include <QSettings>
+#include <QTimer>
#include <QTranslator>
+#include <MTLogin>
MSInterface::MSInterface(QString pid)
:MInterface()
else
setSessionId(lg.getsessionid());
if(lg.stage()!=lg.Success)return false;
+ //schedule re-login before session times out
+ int msecs=QDateTime::currentDateTime().msecsTo(QDateTime::fromTime_t(lg.getvalidtill()));
+ msecs-=120000;//do it 2 min before session runs out
+ if(msecs>100000)//but only if it does not become annoying...
+ QTimer::singleShot(msecs,this,SLOT(relogin()));
//get rights
MTGetMyRights mrt=MTGetMyRights::query();
QStringList rsl=mrt.getright();