OSDN Git Service

drkonqi: cleanup and simplify
authorIvailo Monev <xakepa10@gmail.com>
Sun, 22 Feb 2015 22:06:06 +0000 (22:06 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 22 Feb 2015 22:06:06 +0000 (22:06 +0000)
drkonqi/bugreportaddress.h [deleted file]
drkonqi/crashedapplication.cpp
drkonqi/crashedapplication.h
drkonqi/drkonqi_globals.h
drkonqi/drkonqibackends.cpp
drkonqi/drkonqidialog.cpp

diff --git a/drkonqi/bugreportaddress.h b/drkonqi/bugreportaddress.h
deleted file mode 100644 (file)
index c64331c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-    Copyright (C) 2009  George Kiagiadakis <gkiagia@users.sourceforge.net>
-
-    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.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef BUGREPORTADDRESS_H
-#define BUGREPORTADDRESS_H
-
-#include <QtCore/QString>
-
-#include "drkonqi_globals.h"
-
-class BugReportAddress : public QString
-{
-public:
-    inline BugReportAddress() : QString() {}
-    inline BugReportAddress(const QString & address)
-        : QString(address == QLatin1String("submit@bugs.kde.org") ?
-                  QLatin1String(KDE_BUGZILLA_URL) : address)
-    {}
-
-    inline bool isKdeBugzilla() const
-    {
-        return *this == QLatin1String(KDE_BUGZILLA_URL);
-    }
-
-    inline bool isEmail() const
-    {
-        return contains('@');
-    }
-};
-
-#endif
index ef63232..ae937ad 100644 (file)
@@ -66,7 +66,7 @@ QString CrashedApplication::version() const
     return m_version;
 }
 
-BugReportAddress CrashedApplication::bugReportAddress() const
+QString CrashedApplication::bugReportAddress() const
 {
     return m_reportAddress;
 }
index 59672f8..74a8f55 100644 (file)
@@ -21,8 +21,6 @@
 #include <QtCore/QDateTime>
 #include <QtCore/QFileInfo>
 
-#include "bugreportaddress.h"
-
 class KCrashBackend;
 
 class CrashedApplication : public QObject
@@ -49,7 +47,7 @@ public:
     QString version() const;
 
     /** Returns the address where the bug report for this application should go */
-    BugReportAddress bugReportAddress() const;
+    QString bugReportAddress() const;
 
     /** Returns the pid of the crashed program */
     int pid() const;
@@ -82,7 +80,7 @@ protected:
     QFileInfo m_executable;
     QString m_fakeBaseName;
     QString m_version;
-    BugReportAddress m_reportAddress;
+    QString m_reportAddress;
     bool m_restarted;
     int m_thread;
     QDateTime m_datetime;
index 7cbdab0..43c6dee 100644 (file)
@@ -31,17 +31,6 @@ public:
 };
 
 /* Urls are defined globally here, so that they can change easily */
-#define KDE_BUGZILLA_URL "https://bugs.kde.org/"
-#define KDE_BUGZILLA_CREATE_ACCOUNT_URL  KDE_BUGZILLA_URL "createaccount.cgi"
-#define KDE_BUGZILLA_SHORT_URL "bugs.kde.org"
 #define TECHBASE_HOWTO_DOC "http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Preparing_your_KDE_packages"
 
-/* IDs for bugreport assistant pages -> help anchors */
-#define PAGE_INTRODUCTION_ID "IntroductionID"
-#define PAGE_CRASHINFORMATION_ID "BacktraceID"
-#define PAGE_AWARENESS_ID "AwarenessID"
-#define PAGE_CONCLUSIONS_ID "ConclusionsID"
-
-#define PAGE_HELP_BEGIN_ID "Begin"
-
 #endif
index eea710b..fbc8321 100644 (file)
@@ -124,7 +124,7 @@ CrashedApplication *KCrashBackend::constructCrashedApplication()
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
     a->m_name = args->getOption("programname");
     a->m_version = args->getOption("appversion").toUtf8();
-    a->m_reportAddress = BugReportAddress(args->getOption("bugaddress").toUtf8());
+    a->m_reportAddress = args->getOption("bugaddress").toUtf8();
     a->m_pid = args->getOption("pid").toInt();
     a->m_signalNumber = args->getOption("signal").toInt();
     a->m_restarted = args->isSet("restarted");
index 96d3c7e..43b949c 100644 (file)
@@ -236,7 +236,7 @@ void DrKonqiDialog::enableDebugMenu(bool debuggerRunning)
 void DrKonqiDialog::startBugReportAssistant()
 {
     const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
-    BugReportAddress appReportAddress = crashedApp->bugReportAddress();
+    QString appReportAddress = crashedApp->bugReportAddress();
     SystemInformation *sysinfo = new SystemInformation(this);
     QString backtrace = DrKonqi::debuggerManager()->backtraceGenerator()->parser()->parsedBacktrace();
     QString query;