From 7c40487dce7c11c93444dc3c74fce84b09901d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Fri, 15 May 2009 11:39:15 +0200 Subject: Make the charts work on internet explorer (tested on IE8) --- tools/qtestlib/chart/benchmark_template.html | 16 +++++++++++++--- tools/qtestlib/chart/reportgenerator.cpp | 3 +-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/qtestlib/chart/benchmark_template.html b/tools/qtestlib/chart/benchmark_template.html index 11efd92..a7e48be 100644 --- a/tools/qtestlib/chart/benchmark_template.html +++ b/tools/qtestlib/chart/benchmark_template.html @@ -108,15 +108,25 @@ function checkform() this.createChart(); } +function createElement(nodeName, name) { + var node; + try { + node = document.createElement("<"+nodeName+" name="+name+">"); + } catch (e) { + node = document.createElement(nodeName); + node.name = name; + } + return node; +} + function createFormSelector(form, value, text, type) { - var selector = document.createElement('input'); - form.appendChild(selector); + var selector = createElement('input', 'list'); selector.type = type; - selector.name = 'list'; selector.defaultChecked = true; selector.value = value; + form.appendChild(selector); form.appendChild(document.createTextNode(text)); form.appendChild(document.createElement("BR")); } diff --git a/tools/qtestlib/chart/reportgenerator.cpp b/tools/qtestlib/chart/reportgenerator.cpp index bf5bf94..94661ba 100644 --- a/tools/qtestlib/chart/reportgenerator.cpp +++ b/tools/qtestlib/chart/reportgenerator.cpp @@ -253,7 +253,7 @@ QByteArray printSeriesLabels(const QString &tableName, const QString &seriesColu output += "["; foreach(const QString &serie, series) { - output += "\"" + serie.toLocal8Bit() + "\", "; + output += "\"" + serie.toLocal8Bit() + "\","; } output.chop(1); //remove last comma output += "]\n"; @@ -446,7 +446,6 @@ void ReportGenerator::writeReports() } */ writeReport("Results", "results.html", false); - qDebug() << "Supported browsers: Firefox, Safari, Opera, Qt Demo Browser (IE and KDE 3 Konqueror are not supported)"; } QString ReportGenerator::fileName() -- cgit v0.12