PageRenderTime 32ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. /***************************************************************************
  2. * *
  3. * copyright : (C) 2008 The University of Toronto *
  4. * netterfield@astro.utoronto.ca *
  5. * *
  6. * This program is free software; you can redistribute it and/or modify *
  7. * it under the terms of the GNU General Public License as published by *
  8. * the Free Software Foundation; either version 2 of the License, or *
  9. * (at your option) any later version. *
  10. * *
  11. ***************************************************************************/
  12. #include "bugreportwizard.h"
  13. #include "config.h"
  14. #include "kst_i18n.h"
  15. #include <QUrl>
  16. #include <QDesktopServices>
  17. #include <QDebug>
  18. namespace Kst {
  19. BugReportWizard::BugReportWizard(QWidget *parent)
  20. : QDialog(parent) {
  21. setupUi(this);
  22. _kstVersion->setText(KSTVERSION);
  23. #if defined(Q_OS_MAC9)
  24. _OS->setText("Mac OS 9");
  25. #elif defined(Q_WS_MACX)
  26. _OS->setText("Mac OS X");
  27. #elif defined(Q_WS_WIN32)
  28. _OS->setText("Windows 32-Bit");
  29. #elif defined(Q_WS_WIN64)
  30. _OS->setText("Windows 64-Bit");
  31. #else
  32. _OS->setText("Linux");
  33. #endif
  34. connect(_reportBugButton, SIGNAL(clicked()), this, SLOT(reportBug()));
  35. }
  36. BugReportWizard::~BugReportWizard() {
  37. }
  38. void BugReportWizard::reportBug() {
  39. QUrl url("http://bugs.kde.org/wizard.cgi");
  40. url.addQueryItem("os", _OS->text());
  41. url.addQueryItem("appVersion", _kstVersion->text());
  42. url.addQueryItem("package", "kst");
  43. url.addQueryItem("kbugreport", "1");
  44. url.addQueryItem("kdeVersion", "unspecified");
  45. QDesktopServices::openUrl(url);
  46. }
  47. }
  48. // vim: ts=2 sw=2 et