/kst-2.0.3/src/libkstapp/bugreportwizard.cpp
C++ | 64 lines | 36 code | 16 blank | 12 comment | 0 complexity | f9b3e3c0dcfebd56d91d5f799cb496e8 MD5 | raw file
Possible License(s): GPL-2.0, CC-BY-SA-3.0, LGPL-2.0
- /***************************************************************************
- * *
- * copyright : (C) 2008 The University of Toronto *
- * netterfield@astro.utoronto.ca *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
- #include "bugreportwizard.h"
- #include "config.h"
- #include "kst_i18n.h"
- #include <QUrl>
- #include <QDesktopServices>
- #include <QDebug>
- namespace Kst {
- BugReportWizard::BugReportWizard(QWidget *parent)
- : QDialog(parent) {
- setupUi(this);
- _kstVersion->setText(KSTVERSION);
- #if defined(Q_OS_MAC9)
- _OS->setText("Mac OS 9");
- #elif defined(Q_WS_MACX)
- _OS->setText("Mac OS X");
- #elif defined(Q_WS_WIN32)
- _OS->setText("Windows 32-Bit");
- #elif defined(Q_WS_WIN64)
- _OS->setText("Windows 64-Bit");
- #else
- _OS->setText("Linux");
- #endif
- connect(_reportBugButton, SIGNAL(clicked()), this, SLOT(reportBug()));
- }
- BugReportWizard::~BugReportWizard() {
- }
- void BugReportWizard::reportBug() {
- QUrl url("http://bugs.kde.org/wizard.cgi");
- url.addQueryItem("os", _OS->text());
- url.addQueryItem("appVersion", _kstVersion->text());
- url.addQueryItem("package", "kst");
- url.addQueryItem("kbugreport", "1");
- url.addQueryItem("kdeVersion", "unspecified");
- QDesktopServices::openUrl(url);
- }
- }
- // vim: ts=2 sw=2 et