File r894623.diff of Package kdebase4-runtime
Subject: fix wrongly added i18n string.
From: wstephenson@suse.de
Bug:
Patch-upstream: 894623
--- drkonqi/backtrace.cpp (revision 894622)
+++ drkonqi/backtrace.cpp (revision 894623)
@@ -40,8 +40,16 @@
#include <signal.h>
#include "krashconf.h"
+#include "backtracegdb.h"
#include "backtrace.moc"
+BackTrace* BackTrace::create(const KrashConfig* krashconf, QObject* parent)
+{
+ if(krashconf->debuggerName() == "gdb" )
+ return new BackTraceGdb(krashconf, parent);
+ abort(); // serious misconfiguration
+}
+
BackTrace::BackTrace(const KrashConfig *krashconf, QObject *parent)
: QObject(parent),
m_krashconf(krashconf), m_temp(0)
--- drkonqi/debugger.cpp (revision 894622)
+++ drkonqi/debugger.cpp (revision 894623)
@@ -210,14 +210,7 @@ void KrashDebugger :: startDebugger()
return;
}
- if(m_krashconf->debuggerName() == "gdb" )
- m_proctrace = new BackTraceGdb(m_krashconf, this);
- else
- {
- m_backtrace->setPlainText( i18n( "Unknown or no debugger found." ));
- m_status->setText( i18n( "Backtrace will not be created."));
- return;
- }
+ m_proctrace = BackTrace::create(m_krashconf, this);
if( !msg.isEmpty())
{
--- drkonqi/backtrace.h (revision 894622)
+++ drkonqi/backtrace.h (revision 894623)
@@ -38,7 +38,7 @@ class BackTrace : public QObject
Q_OBJECT
public:
- BackTrace(const KrashConfig *krashconf, QObject *parent);
+ static BackTrace* create(const KrashConfig* krashconf, QObject* parent);
~BackTrace();
void start();
@@ -54,6 +54,7 @@ protected Q_SLOTS:
void slotReadInput();
protected:
+ BackTrace(const KrashConfig *krashconf, QObject *parent);
virtual QString processDebuggerOutput( QString bt ) = 0;
virtual bool usefulDebuggerOutput( QString bt ) = 0;
const KrashConfig * const m_krashconf;
--- drkonqi/toplevel.cpp (revision 894622)
+++ drkonqi/toplevel.cpp (revision 894623)
@@ -181,11 +181,7 @@ void Toplevel :: slotUser1()
QApplication::setOverrideCursor ( Qt::WaitCursor );
// generate the backtrace
- BackTrace *backtrace;
- if(m_krashconf->debuggerName() == "gdb" )
- backtrace = new BackTraceGdb(m_krashconf, this);
- else
- return;
+ BackTrace *backtrace = BackTrace::create( m_krashconf, this );
connect(backtrace, SIGNAL(someError()), SLOT(slotBacktraceSomeError()));
connect(backtrace, SIGNAL(done(const QString &)),
SLOT(slotBacktraceDone(const QString &)));
Index: drkonqi/backtrace.cpp
===================================================================
Index: drkonqi/debugger.cpp
===================================================================
Index: drkonqi/backtrace.h
===================================================================
Index: drkonqi/toplevel.cpp
===================================================================