1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Sending information about versions in reportbug page.

Improved OS detection on Windows. It will also show version
of Windows (except Win 8)
This commit is contained in:
nowrep 2013-02-04 13:07:21 +01:00
parent bb8bff1676
commit 37a81cdf30
3 changed files with 49 additions and 4 deletions

View File

@ -20,7 +20,7 @@ function checkFields()
{ {
var type = document.getElementById("type").value; var type = document.getElementById("type").value;
var description = document.getElementById("text").value; var description = document.getElementById("text").value;
if (type == null || type == "" || description == null || description == "") { if (type == null || type == "" || description == null || description == "") {
alert("%FIELDS-ARE-REQUIRED%"); alert("%FIELDS-ARE-REQUIRED%");
return false; return false;
@ -42,6 +42,10 @@ function checkFields()
<tr><td>%TYPE%:</td><td><input type="text" id="type" name="type" required> </tr> <tr><td>%TYPE%:</td><td><input type="text" id="type" name="type" required> </tr>
<tr><td>%DESCRIPTION%:</td><td><textarea id="text" name="text" required></textarea> </tr> <tr><td>%DESCRIPTION%:</td><td><textarea id="text" name="text" required></textarea> </tr>
<tr><td colspan=2 align=%RIGHT_STR%><input class="submit" type="submit" name="ok" value="%SEND%"> </tr> <tr><td colspan=2 align=%RIGHT_STR%><input class="submit" type="submit" name="ok" value="%SEND%"> </tr>
<input type="hidden" name="os" value="%INFO_OS%">
<input type="hidden" name="version" value="%INFO_APP%">
<input type="hidden" name="qtversion" value="%INFO_QT%">
<input type="hidden" name="webkitversion" value="%INFO_WEBKIT%">
</form> </form>
</table> </table>
</p> </p>

View File

@ -153,9 +153,19 @@ QString QupZillaSchemeReply::reportbugPage()
bPage.replace(QLatin1String("%TYPE%"), tr("Issue type")); bPage.replace(QLatin1String("%TYPE%"), tr("Issue type"));
bPage.replace(QLatin1String("%DESCRIPTION%"), tr("Issue description")); bPage.replace(QLatin1String("%DESCRIPTION%"), tr("Issue description"));
bPage.replace(QLatin1String("%SEND%"), tr("Send")); bPage.replace(QLatin1String("%SEND%"), tr("Send"));
bPage.replace(QLatin1String("%E-MAIL-OPTIONAL%"), tr("E-mail is optional<br/><b>Note: </b>Please read how to make a bug report <a href=%1>here</a> first.").arg("https://github.com/QupZilla/qupzilla/wiki/Bug-Reports target=_blank")); bPage.replace(QLatin1String("%E-MAIL-OPTIONAL%"), tr("E-mail is optional<br/><b>Note: </b>Please read how to make a "
"bug report <a href=%1>here</a> first.").arg("https://github.com/QupZilla/qupzilla/wiki/Bug-Reports target=_blank"));
bPage.replace(QLatin1String("%FIELDS-ARE-REQUIRED%"), tr("Please fill out all required fields!")); bPage.replace(QLatin1String("%FIELDS-ARE-REQUIRED%"), tr("Please fill out all required fields!"));
bPage = QzTools::applyDirectionToPage(bPage);
bPage.replace(QLatin1String("%INFO_OS%"), QzTools::buildSystem());
bPage.replace(QLatin1String("%INFO_APP%"), QupZilla::VERSION
#ifdef GIT_REVISION
+ " (" + GIT_REVISION + ")"
#endif
);
bPage.replace(QLatin1String("%INFO_QT%"), QString("%1 (built with %2)").arg(qVersion(), QT_VERSION_STR));
bPage.replace(QLatin1String("%INFO_WEBKIT%"), QupZilla::WEBKITVERSION),
bPage = QzTools::applyDirectionToPage(bPage);
return bPage; return bPage;
} }

View File

@ -35,6 +35,7 @@
#include <QFileIconProvider> #include <QFileIconProvider>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QHash> #include <QHash>
#include <QSysInfo>
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
#include <QUrlQuery> #include <QUrlQuery>
@ -441,7 +442,37 @@ QString QzTools::buildSystem()
return "UnixWare 7 / Open UNIX 8"; return "UnixWare 7 / Open UNIX 8";
#endif #endif
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
return "Windows"; QString str = "Windows";
switch (QSysInfo::windowsVersion()) {
case QSysInfo::WV_NT:
str.append(" NT");
break;
case QSysInfo::WV_2000:
str.append(" 2000");
break;
case QSysInfo::WV_XP:
str.append(" XP");
break;
case QSysInfo::WV_2003:
str.append(" XP Pro x64");
break;
case QSysInfo::WV_VISTA:
str.append(" Vista");
break;
case QSysInfo::WV_WINDOWS7:
str.append(" 7");
break;
default:
break;
}
return str;
#endif #endif
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
return "Unix"; return "Unix";