From ffe73ee15c154261fa6902822b652e11a31c37fc Mon Sep 17 00:00:00 2001 From: Flavio Date: Thu, 13 Nov 2014 15:48:44 +0100 Subject: [PATCH] Ensure JS reloading for new version --- src/jsfunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jsfunctions.cpp b/src/jsfunctions.cpp index ff78591..b23098f 100644 --- a/src/jsfunctions.cpp +++ b/src/jsfunctions.cpp @@ -40,7 +40,7 @@ JsFunctions::JsFunctions(QObject *parent) : QObject(parent), engine(0) { else qWarning() << file.errorString() << file.fileName(); QFileInfo info(file); - if (info.lastModified().toTime_t() < QDateTime::currentDateTime().toTime_t() - 3600) + if (info.lastModified().toTime_t() < QDateTime::currentDateTime().toTime_t() - 1800) loadJs(); } else { QFile resFile(QLatin1String(":/") + jsFilename()); @@ -75,6 +75,7 @@ const QString & JsFunctions::jsPath() { void JsFunctions::loadJs() { QUrl url(QLatin1String(Constants::WEBSITE) + "-ws/" + jsFilename()); + url.addQueryItem("v", Constants::VERSION); NetworkReply* reply = The::http()->get(url); connect(reply, SIGNAL(data(QByteArray)), SLOT(gotJs(QByteArray))); connect(reply, SIGNAL(error(QNetworkReply*)), SLOT(errorJs(QNetworkReply*))); -- 2.39.5