Changeset View
Changeset View
Standalone View
Standalone View
drkonqi/drkonqidialog.cpp
Show All 36 Lines | |||||
37 | #include "debuggerlaunchers.h" | 37 | #include "debuggerlaunchers.h" | ||
38 | #include "drkonqi_globals.h" | 38 | #include "drkonqi_globals.h" | ||
39 | #include "config-drkonqi.h" | 39 | #include "config-drkonqi.h" | ||
40 | #if HAVE_XMLRPCCLIENT | 40 | #if HAVE_XMLRPCCLIENT | ||
41 | #include "bugzillaintegration/reportassistantdialog.h" | 41 | #include "bugzillaintegration/reportassistantdialog.h" | ||
42 | #endif | 42 | #endif | ||
43 | 43 | | |||
44 | static const char ABOUT_BUG_REPORTING_URL[] = "#aboutbugreporting"; | 44 | static const char ABOUT_BUG_REPORTING_URL[] = "#aboutbugreporting"; | ||
45 | static const char DRKONQI_REPORT_BUG_URL[] = | 45 | static QString DRKONQI_REPORT_BUG_URL = KDE_BUGZILLA_URL + QStringLiteral("enter_bug.cgi?product=drkonqi&format=guided"); | ||
46 | KDE_BUGZILLA_URL "enter_bug.cgi?product=drkonqi&format=guided"; | | |||
47 | 46 | | |||
48 | DrKonqiDialog::DrKonqiDialog(QWidget * parent) : | 47 | DrKonqiDialog::DrKonqiDialog(QWidget * parent) : | ||
49 | QDialog(parent), | 48 | QDialog(parent), | ||
50 | m_aboutBugReportingDialog(0), | 49 | m_aboutBugReportingDialog(0), | ||
51 | m_backtraceWidget(0) | 50 | m_backtraceWidget(0) | ||
52 | { | 51 | { | ||
53 | setAttribute(Qt::WA_DeleteOnClose, true); | 52 | setAttribute(Qt::WA_DeleteOnClose, true); | ||
54 | 53 | | |||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 114 | if (!crashedApp->bugReportAddress().isEmpty()) { | |||
116 | if (crashedApp->fakeExecutableBaseName() == QLatin1String("drkonqi")) { //Handle own crashes | 115 | if (crashedApp->fakeExecutableBaseName() == QLatin1String("drkonqi")) { //Handle own crashes | ||
117 | reportMessage = xi18nc("@info", "<para>As the Crash Handler itself has failed, the " | 116 | reportMessage = xi18nc("@info", "<para>As the Crash Handler itself has failed, the " | ||
118 | "automatic reporting process is disabled to reduce the " | 117 | "automatic reporting process is disabled to reduce the " | ||
119 | "risks of failing again.<nl /><nl />" | 118 | "risks of failing again.<nl /><nl />" | ||
120 | "Please, <link url='%1'>manually report</link> this error " | 119 | "Please, <link url='%1'>manually report</link> this error " | ||
121 | "to the KDE bug tracking system. Do not forget to include " | 120 | "to the KDE bug tracking system. Do not forget to include " | ||
122 | "the backtrace from the <interface>Developer Information</interface> " | 121 | "the backtrace from the <interface>Developer Information</interface> " | ||
123 | "tab.</para>", | 122 | "tab.</para>", | ||
124 | QLatin1String(DRKONQI_REPORT_BUG_URL)); | 123 | DRKONQI_REPORT_BUG_URL); | ||
125 | } else if (DrKonqi::isSafer()) { | 124 | } else if (DrKonqi::isSafer()) { | ||
126 | reportMessage = xi18nc("@info", "<para>The reporting assistant is disabled because " | 125 | reportMessage = xi18nc("@info", "<para>The reporting assistant is disabled because " | ||
127 | "the crash handler dialog was started in safe mode." | 126 | "the crash handler dialog was started in safe mode." | ||
128 | "<nl />You can manually report this bug to %1 " | 127 | "<nl />You can manually report this bug to %1 " | ||
129 | "(including the backtrace from the " | 128 | "(including the backtrace from the " | ||
130 | "<interface>Developer Information</interface> " | 129 | "<interface>Developer Information</interface> " | ||
131 | "tab.)</para>", crashedApp->bugReportAddress()); | 130 | "tab.)</para>", crashedApp->bugReportAddress()); | ||
132 | } else { | 131 | } else { | ||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 268 | #if HAVE_XMLRPCCLIENT | |||
274 | hide(); | 273 | hide(); | ||
275 | #endif | 274 | #endif | ||
276 | } | 275 | } | ||
277 | 276 | | |||
278 | void DrKonqiDialog::linkActivated(const QString& link) | 277 | void DrKonqiDialog::linkActivated(const QString& link) | ||
279 | { | 278 | { | ||
280 | if (link == QLatin1String(ABOUT_BUG_REPORTING_URL)) { | 279 | if (link == QLatin1String(ABOUT_BUG_REPORTING_URL)) { | ||
281 | showAboutBugReporting(); | 280 | showAboutBugReporting(); | ||
282 | } else if (link == QLatin1String(DRKONQI_REPORT_BUG_URL)) { | 281 | } else if (link == DRKONQI_REPORT_BUG_URL) { | ||
283 | QDesktopServices::openUrl(QUrl(link)); | 282 | QDesktopServices::openUrl(QUrl(link)); | ||
284 | } else if (link.startsWith(QLatin1String("http"))) { | 283 | } else if (link.startsWith(QLatin1String("http"))) { | ||
285 | qWarning() << "unexpected link"; | 284 | qWarning() << "unexpected link"; | ||
286 | QDesktopServices::openUrl(QUrl(link)); | 285 | QDesktopServices::openUrl(QUrl(link)); | ||
287 | } | 286 | } | ||
288 | } | 287 | } | ||
289 | 288 | | |||
290 | void DrKonqiDialog::showAboutBugReporting() | 289 | void DrKonqiDialog::showAboutBugReporting() | ||
Show All 14 Lines |