Trinity Qt initial conversion

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent a061f7191b
commit c663b64409

@ -25,8 +25,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************/
#include <qfile.h>
#include <qregexp.h>
#include <tqfile.h>
#include <tqregexp.h>
#include <kprocess.h>
#include <kdebug.h>
@ -39,9 +39,9 @@
#include "backtrace.h"
#include "backtrace.moc"
BackTrace::BackTrace(const KrashConfig *krashconf, QObject *parent,
BackTrace::BackTrace(const KrashConfig *krashconf, TQObject *parent,
const char *name)
: QObject(parent, name),
: TQObject(parent, name),
m_krashconf(krashconf), m_temp(0)
{
m_proc = new KProcess;
@ -68,25 +68,25 @@ BackTrace::~BackTrace()
void BackTrace::start()
{
QString exec = m_krashconf->tryExec();
TQString exec = m_krashconf->tryExec();
if ( !exec.isEmpty() && KStandardDirs::findExe(exec).isEmpty() )
{
QObject * o = parent();
TQObject * o = parent();
if (o && !o->inherits("QWidget"))
if (o && !o->inherits("TQWidget"))
{
o = NULL;
}
KMessageBox::error(
(QWidget *)o,
(TQWidget *)o,
i18n("Could not generate a backtrace as the debugger '%1' was not found.").arg(exec));
return;
}
m_temp = new KTempFile;
m_temp->setAutoDelete(TRUE);
int handle = m_temp->handle();
QString backtraceCommand = m_krashconf->backtraceCommand();
TQString backtraceCommand = m_krashconf->backtraceCommand();
const char* bt = backtraceCommand.latin1();
::write(handle, bt, strlen(bt)); // the command for a backtrace
::write(handle, "\n", 1);
@ -96,22 +96,22 @@ void BackTrace::start()
m_proc = new KProcess;
m_proc->setUseShell(true);
QString str = m_krashconf->debuggerBatch();
TQString str = m_krashconf->debuggerBatch();
m_krashconf->expandString(str, true, m_temp->name());
*m_proc << str;
connect(m_proc, SIGNAL(receivedStdout(KProcess*, char*, int)),
SLOT(slotReadInput(KProcess*, char*, int)));
connect(m_proc, SIGNAL(processExited(KProcess*)),
SLOT(slotProcessExited(KProcess*)));
connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
TQT_SLOT(slotReadInput(KProcess*, char*, int)));
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)),
TQT_SLOT(slotProcessExited(KProcess*)));
m_proc->start ( KProcess::NotifyOnExit, KProcess::All );
}
void BackTrace::slotReadInput(KProcess *, char* buf, int buflen)
{
QString newstr = QString::fromLocal8Bit(buf, buflen);
TQString newstr = TQString::fromLocal8Bit(buf, buflen);
m_strBt.append(newstr);
emit append(newstr);
@ -137,25 +137,25 @@ bool BackTrace::usefulBacktrace()
{
// remove crap
if( !m_krashconf->removeFromBacktraceRegExp().isEmpty())
m_strBt.replace(QRegExp( m_krashconf->removeFromBacktraceRegExp()), QString::null);
m_strBt.replace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString::null);
if( m_krashconf->disableChecks())
return true;
// prepend and append newline, so that regexps like '\nwhatever\n' work on all lines
QString strBt = '\n' + m_strBt + '\n';
TQString strBt = '\n' + m_strBt + '\n';
// how many " ?? " in the bt ?
int unknown = 0;
if( !m_krashconf->invalidStackFrameRegExp().isEmpty())
unknown = strBt.contains( QRegExp( m_krashconf->invalidStackFrameRegExp()));
unknown = strBt.contains( TQRegExp( m_krashconf->invalidStackFrameRegExp()));
// how many stack frames in the bt ?
int frames = 0;
if( !m_krashconf->frameRegExp().isEmpty())
frames = strBt.contains( QRegExp( m_krashconf->frameRegExp()));
frames = strBt.contains( TQRegExp( m_krashconf->frameRegExp()));
else
frames = strBt.contains('\n');
bool tooShort = false;
if( !m_krashconf->neededInValidBacktraceRegExp().isEmpty())
tooShort = ( strBt.find( QRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 );
tooShort = ( strBt.find( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 );
return !m_strBt.isNull() && !tooShort && (unknown < frames);
}
@ -164,7 +164,7 @@ void BackTrace::processBacktrace()
{
if( !m_krashconf->kcrashRegExp().isEmpty())
{
QRegExp kcrashregexp( m_krashconf->kcrashRegExp());
TQRegExp kcrashregexp( m_krashconf->kcrashRegExp());
int pos = kcrashregexp.search( m_strBt );
if( pos >= 0 )
{
@ -175,7 +175,7 @@ void BackTrace::processBacktrace()
--len;
}
m_strBt.remove( pos, len );
m_strBt.insert( pos, QString::fromLatin1( "[KCrash handler]\n" ));
m_strBt.insert( pos, TQString::fromLatin1( "[KCrash handler]\n" ));
}
}
}

@ -32,24 +32,24 @@ class KProcess;
class KrashConfig;
class KTempFile;
#include <qobject.h>
#include <tqobject.h>
class BackTrace : public QObject
{
Q_OBJECT
public:
BackTrace(const KrashConfig *krashconf, QObject *parent,
BackTrace(const KrashConfig *krashconf, TQObject *parent,
const char *name = 0);
~BackTrace();
void start();
signals:
void append(const QString &str); // Just the new text
void append(const TQString &str); // Just the new text
void someError();
void done(const QString &); // replaces whole text
void done(const TQString &); // replaces whole text
protected slots:
void slotProcessExited(KProcess * proc);
@ -61,6 +61,6 @@ private:
KProcess *m_proc;
const KrashConfig *m_krashconf;
KTempFile *m_temp;
QString m_strBt;
TQString m_strBt;
};
#endif

@ -17,7 +17,7 @@ enum CrashType { Crash, Malloc, Div0, Assert };
void do_crash()
{
KCmdLineArgs *args = 0;
QCString type = args->arg(0);
TQCString type = args->arg(0);
printf("result = %s\n", type.data());
}
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
KApplication app(false, false);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QCString type = args->count() ? args->arg(0) : "";
TQCString type = args->count() ? args->arg(0) : "";
int crashtype = Crash;
if (type == "malloc")
crashtype = Malloc;

@ -25,9 +25,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************/
#include <qlayout.h>
#include <qhbox.h>
#include <qlabel.h>
#include <tqlayout.h>
#include <tqhbox.h>
#include <tqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@ -45,29 +45,29 @@
#include "debugger.h"
#include "debugger.moc"
KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, QWidget *parent, const char *name)
: QWidget( parent, name ),
KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, TQWidget *parent, const char *name)
: TQWidget( parent, name ),
m_krashconf(krashconf),
m_proctrace(0)
{
QVBoxLayout *vbox = new QVBoxLayout( this, 0, KDialog::marginHint() );
TQVBoxLayout *vbox = new TQVBoxLayout( this, 0, KDialog::marginHint() );
vbox->setAutoAdd(TRUE);
m_backtrace = new KTextBrowser(this);
m_backtrace->setTextFormat(Qt::PlainText);
m_backtrace->setFont(KGlobalSettings::fixedFont());
QWidget *w = new QWidget( this );
( new QHBoxLayout( w, 0, KDialog::marginHint() ) )->setAutoAdd( true );
m_status = new QLabel( w );
m_status->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) );
TQWidget *w = new TQWidget( this );
( new TQHBoxLayout( w, 0, KDialog::marginHint() ) )->setAutoAdd( true );
m_status = new TQLabel( w );
m_status->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
//m_copyButton = new KPushButton( KStdGuiItem::copy(), w );
KGuiItem item( i18n( "C&opy" ), QString::fromLatin1( "editcopy" ) );
KGuiItem item( i18n( "C&opy" ), TQString::fromLatin1( "editcopy" ) );
m_copyButton = new KPushButton( item, w );
connect( m_copyButton, SIGNAL( clicked() ), this, SLOT( slotCopy() ) );
connect( m_copyButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopy() ) );
m_copyButton->setEnabled( false );
m_saveButton = new KPushButton( m_krashconf->safeMode() ? KStdGuiItem::save() : KStdGuiItem::saveAs(), w );
connect( m_saveButton, SIGNAL( clicked() ), this, SLOT( slotSave() ) );
connect( m_saveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSave() ) );
m_saveButton->setEnabled( false );
}
@ -77,7 +77,7 @@ KrashDebugger :: ~KrashDebugger()
// delete m_proctrace;
}
void KrashDebugger :: slotDone(const QString& str)
void KrashDebugger :: slotDone(const TQString& str)
{
m_status->setText(i18n("Done."));
m_copyButton->setEnabled( true );
@ -95,7 +95,7 @@ void KrashDebugger :: slotSave()
{
if (m_krashconf->safeMode())
{
KTempFile tf(QString::fromAscii("/tmp/"), QString::fromAscii(".kcrash"), 0600);
KTempFile tf(TQString::fromAscii("/tmp/"), TQString::fromAscii(".kcrash"), 0600);
if (!tf.status())
{
*tf.textStream() << m_backtrace->text();
@ -109,13 +109,13 @@ void KrashDebugger :: slotSave()
}
else
{
QString defname = m_krashconf->execName() + QString::fromLatin1( ".kcrash" );
TQString defname = m_krashconf->execName() + TQString::fromLatin1( ".kcrash" );
if( defname.contains( '/' ))
defname = defname.mid( defname.findRev( '/' ) + 1 );
QString filename = KFileDialog::getSaveFileName(defname, QString::null, this, i18n("Select Filename"));
TQString filename = KFileDialog::getSaveFileName(defname, TQString::null, this, i18n("Select Filename"));
if (!filename.isEmpty())
{
QFile f(filename);
TQFile f(filename);
if (f.exists()) {
if (KMessageBox::Cancel ==
@ -129,7 +129,7 @@ void KrashDebugger :: slotSave()
if (f.open(IO_WriteOnly))
{
QTextStream ts(&f);
TQTextStream ts(&f);
ts << m_backtrace->text();
f.close();
}
@ -151,7 +151,7 @@ void KrashDebugger :: slotSomeError()
+ m_backtrace->text());
}
void KrashDebugger :: slotAppend(const QString &str)
void KrashDebugger :: slotAppend(const TQString &str)
{
m_status->setText(i18n("Loading backtrace..."));
@ -159,9 +159,9 @@ void KrashDebugger :: slotAppend(const QString &str)
m_backtrace->setText(m_backtrace->text() + str);
}
void KrashDebugger :: showEvent(QShowEvent *e)
void KrashDebugger :: showEvent(TQShowEvent *e)
{
QWidget::showEvent(e);
TQWidget::showEvent(e);
startDebugger();
}
@ -171,7 +171,7 @@ void KrashDebugger :: startDebugger()
if (m_proctrace || !m_backtrace->text().isEmpty())
return;
QString msg;
TQString msg;
bool checks = performChecks( &msg );
if( !checks && !m_krashconf->disableChecks())
{
@ -195,20 +195,20 @@ void KrashDebugger :: startDebugger()
m_proctrace = new BackTrace(m_krashconf, this);
connect(m_proctrace, SIGNAL(append(const QString &)),
SLOT(slotAppend(const QString &)));
connect(m_proctrace, SIGNAL(done(const QString&)), SLOT(slotDone(const QString&)));
connect(m_proctrace, SIGNAL(someError()), SLOT(slotSomeError()));
connect(m_proctrace, TQT_SIGNAL(append(const TQString &)),
TQT_SLOT(slotAppend(const TQString &)));
connect(m_proctrace, TQT_SIGNAL(done(const TQString&)), TQT_SLOT(slotDone(const TQString&)));
connect(m_proctrace, TQT_SIGNAL(someError()), TQT_SLOT(slotSomeError()));
m_proctrace->start();
}
// this function check for "dangerous" settings, returns false
// and message in case some of them are activated
bool KrashDebugger::performChecks( QString* msg )
bool KrashDebugger::performChecks( TQString* msg )
{
bool ret = true;
KConfig kdedcfg( QString::fromLatin1( "kdedrc" ), true );
KConfig kdedcfg( TQString::fromLatin1( "kdedrc" ), true );
kdedcfg.setGroup( "General" );
if( kdedcfg.readBoolEntry( "DelayedCheck", false ))
{

@ -34,26 +34,26 @@ class KrashConfig;
class KTextBrowser;
class BackTrace;
#include <qwidget.h>
#include <tqwidget.h>
class KrashDebugger : public QWidget
{
Q_OBJECT
public:
KrashDebugger(const KrashConfig *krashconf, QWidget *parent = 0, const char *name = 0);
KrashDebugger(const KrashConfig *krashconf, TQWidget *parent = 0, const char *name = 0);
~KrashDebugger();
public slots:
void slotAppend(const QString &);
void slotDone(const QString&);
void slotAppend(const TQString &);
void slotDone(const TQString&);
void slotSomeError();
protected:
void startDebugger();
bool performChecks( QString* msg );
bool performChecks( TQString* msg );
virtual void showEvent(QShowEvent *e);
virtual void showEvent(TQShowEvent *e);
protected slots:
void slotCopy();
@ -62,11 +62,11 @@ protected slots:
private:
const KrashConfig *m_krashconf;
BackTrace *m_proctrace;
QLabel *m_status;
TQLabel *m_status;
KTextBrowser *m_backtrace;
QPushButton * m_copyButton;
QPushButton * m_saveButton;
QString m_prependText;
TQPushButton * m_copyButton;
TQPushButton * m_saveButton;
TQString m_prependText;
};
#endif

@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************/
#include <qmultilineedit.h>
#include <tqmultilineedit.h>
#include <kmessagebox.h>
#include <klocale.h>
@ -34,13 +34,13 @@
#include "drbugreport.moc"
#include "drbugreport.h"
DrKBugReport::DrKBugReport(QWidget *parent, bool modal,
DrKBugReport::DrKBugReport(TQWidget *parent, bool modal,
const KAboutData *aboutData)
: KBugReport(parent, modal, aboutData)
{
}
void DrKBugReport::setText(const QString &str)
void DrKBugReport::setText(const TQString &str)
{
m_lineedit->setText(str);
m_startstring = str.simplifyWhiteSpace();
@ -51,7 +51,7 @@ void DrKBugReport::slotOk()
if (!m_startstring.isEmpty() &&
m_lineedit->text().simplifyWhiteSpace() == m_startstring)
{
QString msg = i18n("You have to edit the description "
TQString msg = i18n("You have to edit the description "
"before the report can be sent.");
KMessageBox::error(this, msg);
return;

@ -40,14 +40,14 @@ public:
/**
* Constructor.
*/
DrKBugReport(QWidget *parent = 0, bool modal = true,
DrKBugReport(TQWidget *parent = 0, bool modal = true,
const KAboutData *aboutData = 0);
public:
/**
* Allows the debugger to set the default text in the editor.
*/
void setText(const QString &str);
void setText(const TQString &str);
protected slots:
/**
@ -56,7 +56,7 @@ protected slots:
virtual void slotOk( void );
private:
QString m_startstring;
TQString m_startstring;
};
#endif

@ -48,7 +48,7 @@ KrashConfig :: ~KrashConfig()
delete m_aboutData;
}
ASYNC KrashConfig :: registerDebuggingApplication(const QString& launchName)
ASYNC KrashConfig :: registerDebuggingApplication(const TQString& launchName)
{
emit newDebuggingApplication( launchName );
}
@ -69,7 +69,7 @@ void KrashConfig :: readConfig()
if ( !args->getOption( "apppath" ).isEmpty() )
m_execname.prepend( args->getOption( "apppath" ) + '/' );
QCString programname = args->getOption("programname");
TQCString programname = args->getOption("programname");
if (programname.isEmpty())
programname.setStr(I18N_NOOP("unknown"));
// leak some memory... Well. It's only done once anyway :-)
@ -80,7 +80,7 @@ void KrashConfig :: readConfig()
0, 0, 0, 0, 0,
args->getOption("bugaddress"));
QCString startup_id( args->getOption( "startupid" ));
TQCString startup_id( args->getOption( "startupid" ));
if (!startup_id.isEmpty())
{ // stop startup notification
KStartupInfoId id;
@ -92,13 +92,13 @@ void KrashConfig :: readConfig()
config->setGroup("drkonqi");
// maybe we should check if it's relative?
QString configname = config->readEntry("ConfigName",
QString::fromLatin1("enduser"));
TQString configname = config->readEntry("ConfigName",
TQString::fromLatin1("enduser"));
QString debuggername = config->readEntry("Debugger",
QString::fromLatin1("gdb"));
TQString debuggername = config->readEntry("Debugger",
TQString::fromLatin1("gdb"));
KConfig debuggers(QString::fromLatin1("debuggers/%1rc").arg(debuggername),
KConfig debuggers(TQString::fromLatin1("debuggers/%1rc").arg(debuggername),
true, false, "appdata");
debuggers.setGroup("General");
@ -112,7 +112,7 @@ void KrashConfig :: readConfig()
m_neededInValidBacktraceRegExp = debuggers.readEntry("NeededInValidBacktraceRegExp");
m_kcrashRegExp = debuggers.readEntry("KCrashRegExp");
KConfig preset(QString::fromLatin1("presets/%1rc").arg(configname),
KConfig preset(TQString::fromLatin1("presets/%1rc").arg(configname),
true, false, "appdata");
preset.setGroup("ErrorDescription");
@ -135,10 +135,10 @@ void KrashConfig :: readConfig()
bool b = preset.readBoolEntry("SignalDetails", true);
QString str = QString::number(m_signalnum);
TQString str = TQString::number(m_signalnum);
// use group unknown if signal not found
if (!preset.hasGroup(str))
str = QString::fromLatin1("unknown");
str = TQString::fromLatin1("unknown");
preset.setGroup(str);
m_signalName = preset.readEntry("Name");
if (b)
@ -146,16 +146,16 @@ void KrashConfig :: readConfig()
}
// replace some of the strings
void KrashConfig :: expandString(QString &str, bool shell, const QString &tempFile) const
void KrashConfig :: expandString(TQString &str, bool shell, const TQString &tempFile) const
{
QMap<QString,QString> map;
map[QString::fromLatin1("appname")] = QString::fromLatin1(appName());
map[QString::fromLatin1("execname")] = startedByKdeinit() ? QString::fromLatin1("kdeinit") : m_execname;
map[QString::fromLatin1("signum")] = QString::number(signalNumber());
map[QString::fromLatin1("signame")] = signalName();
map[QString::fromLatin1("progname")] = programName();
map[QString::fromLatin1("pid")] = QString::number(pid());
map[QString::fromLatin1("tempfile")] = tempFile;
TQMap<TQString,TQString> map;
map[TQString::fromLatin1("appname")] = TQString::fromLatin1(appName());
map[TQString::fromLatin1("execname")] = startedByKdeinit() ? TQString::fromLatin1("kdeinit") : m_execname;
map[TQString::fromLatin1("signum")] = TQString::number(signalNumber());
map[TQString::fromLatin1("signame")] = signalName();
map[TQString::fromLatin1("progname")] = programName();
map[TQString::fromLatin1("pid")] = TQString::number(pid());
map[TQString::fromLatin1("tempfile")] = tempFile;
if (shell)
str = KMacroExpander::expandMacrosShellQuote( str, map );
else

@ -29,12 +29,12 @@
#define KRASHCONF_H
#include <kaboutdata.h>
#include <qstring.h>
#include <qobject.h>
#include <tqstring.h>
#include <tqobject.h>
#include "krashdcopinterface.h"
class KrashConfig : public QObject, public KrashDCOPInterface
class KrashConfig : public TQObject, public KrashDCOPInterface
{
Q_OBJECT
@ -43,42 +43,42 @@ public:
virtual ~KrashConfig();
k_dcop:
virtual QString programName() const { return m_aboutData->programName(); };
virtual QCString appName() const { return m_aboutData->appName(); };
virtual TQString programName() const { return m_aboutData->programName(); };
virtual TQCString appName() const { return m_aboutData->appName(); };
virtual int signalNumber() const { return m_signalnum; };
virtual int pid() const { return m_pid; };
virtual bool startedByKdeinit() const { return m_startedByKdeinit; };
virtual bool safeMode() const { return m_safeMode; };
virtual QString signalName() const { return m_signalName; };
virtual QString signalText() const { return m_signalText; };
virtual QString whatToDoText() const { return m_whatToDoText; }
virtual QString errorDescriptionText() const { return m_errorDescriptionText; };
virtual TQString signalName() const { return m_signalName; };
virtual TQString signalText() const { return m_signalText; };
virtual TQString whatToDoText() const { return m_whatToDoText; }
virtual TQString errorDescriptionText() const { return m_errorDescriptionText; };
virtual ASYNC registerDebuggingApplication(const QString& launchName);
virtual ASYNC registerDebuggingApplication(const TQString& launchName);
public:
QString debugger() const { return m_debugger; }
QString debuggerBatch() const { return m_debuggerBatch; }
QString tryExec() const { return m_tryExec; }
QString backtraceCommand() const { return m_backtraceCommand; }
QString removeFromBacktraceRegExp() const { return m_removeFromBacktraceRegExp; }
QString invalidStackFrameRegExp() const { return m_invalidStackFrameRegExp; }
QString frameRegExp() const { return m_frameRegExp; }
QString neededInValidBacktraceRegExp() const { return m_neededInValidBacktraceRegExp; }
QString kcrashRegExp() const { return m_kcrashRegExp; }
TQString debugger() const { return m_debugger; }
TQString debuggerBatch() const { return m_debuggerBatch; }
TQString tryExec() const { return m_tryExec; }
TQString backtraceCommand() const { return m_backtraceCommand; }
TQString removeFromBacktraceRegExp() const { return m_removeFromBacktraceRegExp; }
TQString invalidStackFrameRegExp() const { return m_invalidStackFrameRegExp; }
TQString frameRegExp() const { return m_frameRegExp; }
TQString neededInValidBacktraceRegExp() const { return m_neededInValidBacktraceRegExp; }
TQString kcrashRegExp() const { return m_kcrashRegExp; }
bool showBacktrace() const { return m_showbacktrace; };
bool showDebugger() const { return m_showdebugger && !m_debugger.isNull(); };
bool showBugReport() const { return m_showbugreport; };
bool disableChecks() const { return m_disablechecks; };
const KAboutData *aboutData() const { return m_aboutData; }
QString execName() const { return m_execname; }
TQString execName() const { return m_execname; }
void expandString(QString &str, bool shell, const QString &tempFile = QString::null) const;
void expandString(TQString &str, bool shell, const TQString &tempFile = TQString::null) const;
void acceptDebuggingApp();
signals:
void newDebuggingApplication(const QString& launchName);
void newDebuggingApplication(const TQString& launchName);
private:
void readConfig();
@ -93,21 +93,21 @@ private:
bool m_startedByKdeinit;
bool m_safeMode;
bool m_disablechecks;
QString m_signalName;
QString m_signalText;
QString m_whatToDoText;
QString m_errorDescriptionText;
QString m_execname;
TQString m_signalName;
TQString m_signalText;
TQString m_whatToDoText;
TQString m_errorDescriptionText;
TQString m_execname;
QString m_debugger;
QString m_debuggerBatch;
QString m_tryExec;
QString m_backtraceCommand;
QString m_removeFromBacktraceRegExp;
QString m_invalidStackFrameRegExp;
QString m_frameRegExp;
QString m_neededInValidBacktraceRegExp;
QString m_kcrashRegExp;
TQString m_debugger;
TQString m_debuggerBatch;
TQString m_tryExec;
TQString m_backtraceCommand;
TQString m_removeFromBacktraceRegExp;
TQString m_invalidStackFrameRegExp;
TQString m_frameRegExp;
TQString m_neededInValidBacktraceRegExp;
TQString m_kcrashRegExp;
};
#endif

@ -32,8 +32,8 @@
#include <dcopobject.h>
#include <qstring.h>
#include <qcstring.h>
#include <tqstring.h>
#include <tqcstring.h>
#include <kaboutdata.h>
/**
@ -47,18 +47,18 @@ class KrashDCOPInterface : virtual public DCOPObject
public:
k_dcop:
virtual QString programName() const = 0;
virtual QCString appName() const = 0;
virtual TQString programName() const = 0;
virtual TQCString appName() const = 0;
virtual int signalNumber() const = 0;
virtual int pid() const = 0;
virtual bool startedByKdeinit() const = 0;
virtual bool safeMode() const = 0;
virtual QString signalName() const = 0;
virtual QString signalText() const = 0;
virtual QString whatToDoText() const = 0;
virtual QString errorDescriptionText() const = 0;
virtual TQString signalName() const = 0;
virtual TQString signalText() const = 0;
virtual TQString whatToDoText() const = 0;
virtual TQString errorDescriptionText() const = 0;
virtual ASYNC registerDebuggingApplication(const QString& launchName) = 0;
virtual ASYNC registerDebuggingApplication(const TQString& launchName) = 0;
k_dcop_signals:
void acceptDebuggingApplication();

@ -25,9 +25,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************/
#include <qstring.h>
#include <qlabel.h>
#include <qhbox.h>
#include <tqstring.h>
#include <tqlabel.h>
#include <tqhbox.h>
#include "netwm.h"
@ -47,7 +47,7 @@
#include "toplevel.h"
#include "toplevel.moc"
Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name)
Toplevel :: Toplevel(KrashConfig *krashconf, TQWidget *parent, const char *name)
: KDialogBase( Tabbed,
krashconf->programName(),
User3 | User2 | User1 | Close,
@ -61,17 +61,17 @@ Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name)
),
m_krashconf(krashconf), m_bugreport(0)
{
QHBox *page = addHBoxPage(i18n("&General"));
TQHBox *page = addHBoxPage(i18n("&General"));
page->setSpacing(20);
// picture of konqi
QLabel *lab = new QLabel(page);
lab->setFrameStyle(QFrame::Panel | QFrame::Sunken);
QPixmap pix(locate("appdata", QString::fromLatin1("pics/konqi.png")));
TQLabel *lab = new TQLabel(page);
lab->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
TQPixmap pix(locate("appdata", TQString::fromLatin1("pics/konqi.png")));
lab->setPixmap(pix);
lab->setFixedSize( lab->sizeHint() );
QLabel * info = new QLabel(generateText(), page);
TQLabel * info = new TQLabel(generateText(), page);
info->setMinimumSize(info->sizeHint());
if (m_krashconf->showBacktrace())
@ -84,8 +84,8 @@ Toplevel :: Toplevel(KrashConfig *krashconf, QWidget *parent, const char *name)
showButton( User2, m_krashconf->showDebugger() );
showButton( User3, false );
connect(this, SIGNAL(closeClicked()), SLOT(accept()));
connect(m_krashconf, SIGNAL(newDebuggingApplication(const QString&)), SLOT(slotNewDebuggingApp(const QString&)));
connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(accept()));
connect(m_krashconf, TQT_SIGNAL(newDebuggingApplication(const TQString&)), TQT_SLOT(slotNewDebuggingApp(const TQString&)));
if ( !m_krashconf->safeMode() && kapp->dcopClient()->attach() )
kapp->dcopClient()->registerAs( kapp->name() );
@ -95,9 +95,9 @@ Toplevel :: ~Toplevel()
{
}
QString Toplevel :: generateText() const
TQString Toplevel :: generateText() const
{
QString str;
TQString str;
if (!m_krashconf->errorDescriptionText().isEmpty())
str += i18n("<p><b>Short description</b></p><p>%1</p>")
@ -151,13 +151,13 @@ void Toplevel :: slotUser1()
m_bugreport = new DrKBugReport(0, true, m_krashconf->aboutData());
if (i == KMessageBox::Yes) {
QApplication::setOverrideCursor ( waitCursor );
TQApplication::setOverrideCursor ( waitCursor );
// generate the backtrace
BackTrace *backtrace = new BackTrace(m_krashconf, this);
connect(backtrace, SIGNAL(someError()), SLOT(slotBacktraceSomeError()));
connect(backtrace, SIGNAL(done(const QString &)),
SLOT(slotBacktraceDone(const QString &)));
connect(backtrace, TQT_SIGNAL(someError()), TQT_SLOT(slotBacktraceSomeError()));
connect(backtrace, TQT_SIGNAL(done(const TQString &)),
TQT_SLOT(slotBacktraceDone(const TQString &)));
backtrace->start();
@ -173,7 +173,7 @@ void Toplevel :: slotUser1()
void Toplevel :: slotUser2()
{
QString str = m_krashconf->debugger();
TQString str = m_krashconf->debugger();
m_krashconf->expandString(str, true);
KProcess proc;
@ -182,7 +182,7 @@ void Toplevel :: slotUser2()
proc.start(KProcess::DontCare);
}
void Toplevel :: slotNewDebuggingApp(const QString& launchName)
void Toplevel :: slotNewDebuggingApp(const TQString& launchName)
{
setButtonText( User3, launchName );
showButton( User3, true );
@ -193,15 +193,15 @@ void Toplevel :: slotUser3()
m_krashconf->acceptDebuggingApp();
}
void Toplevel :: slotBacktraceDone(const QString &str)
void Toplevel :: slotBacktraceDone(const TQString &str)
{
// Do not translate.. This will be included in the _MAIL_.
QString buf = QString::fromLatin1
TQString buf = TQString::fromLatin1
("\n\n\nHere is a backtrace generated by DrKonqi:\n") + str;
m_bugreport->setText(buf);
QApplication::restoreOverrideCursor();
TQApplication::restoreOverrideCursor();
m_bugreport->exec();
delete m_bugreport;
@ -210,7 +210,7 @@ void Toplevel :: slotBacktraceDone(const QString &str)
void Toplevel :: slotBacktraceSomeError()
{
QApplication::restoreOverrideCursor();
TQApplication::restoreOverrideCursor();
KMessageBox::sorry(0, i18n("It was not possible to generate a backtrace."),
i18n("Backtrace Not Possible"));

@ -41,22 +41,22 @@ class Toplevel : public KDialogBase
Q_OBJECT
public:
Toplevel(KrashConfig *krash, QWidget *parent = 0, const char * name = 0);
Toplevel(KrashConfig *krash, TQWidget *parent = 0, const char * name = 0);
~Toplevel();
private:
// helper methods
QString generateText() const;
TQString generateText() const;
protected slots:
void slotUser1();
void slotUser2();
void slotNewDebuggingApp(const QString& launchName);
void slotNewDebuggingApp(const TQString& launchName);
void slotUser3();
protected slots:
void slotBacktraceSomeError();
void slotBacktraceDone(const QString &);
void slotBacktraceDone(const TQString &);
private:
KrashConfig *m_krashconf;

@ -24,8 +24,8 @@
#include <kglobal.h>
#include <kstandarddirs.h>
#include <qdir.h>
#include <qfile.h>
#include <tqdir.h>
#include <tqfile.h>
#include <stdlib.h>
@ -33,11 +33,11 @@
#define DBG_CODE 1213
void copyFile( const QString &inFileName, const QString &outFileName )
void copyFile( const TQString &inFileName, const TQString &outFileName )
{
QFile inFile( inFileName );
TQFile inFile( inFileName );
if ( inFile.open( IO_ReadOnly ) ) {
QFile outFile( outFileName );
TQFile outFile( outFileName );
if ( outFile.open( IO_WriteOnly ) ) {
outFile.writeBlock( inFile.readAll() );
outFile.close();
@ -47,13 +47,13 @@ void copyFile( const QString &inFileName, const QString &outFileName )
}
}
bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ,
QString destDir )
bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ,
TQString destDir )
{
KDesktopFile desktop( templ, true );
// find out where to put the .desktop files
QString destName;
TQString destName;
if ( destDir.isNull() )
destDir = KGlobal::dirs()->saveLocation( "apps" );
else
@ -74,7 +74,7 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ,
}
// determine for which executable to look
QString exec = desktop.readPathEntry( "TryExec" );
TQString exec = desktop.readPathEntry( "TryExec" );
if ( exec.isEmpty() )
exec = desktop.readPathEntry( "Exec" );
pos = exec.find( ' ' );
@ -82,8 +82,8 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ,
exec = exec.left( pos );
// try to locate the binary
QString pexec = KGlobal::dirs()->findExe( exec,
QString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" );
TQString pexec = KGlobal::dirs()->findExe( exec,
TQString( ::getenv( "PATH" ) ) + ":/usr/X11R6/bin:/usr/games" );
if ( pexec.isEmpty() ) {
kdDebug(DBG_CODE) << "looking for " << exec.local8Bit()
<< "\t\tnot found" << endl;
@ -103,22 +103,22 @@ bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ,
return true;
}
void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added )
void createDesktopFiles( TQPtrList<AppLnkCache> &appCache, int &added )
{
AppLnkCache* cache;
for ( cache = appCache.first(); cache; cache = appCache.next() ) {
if ( cache->item == 0 || ( cache->item && cache->item->isOn() ) ) {
added++;
QString destDir = cache->destDir;
QString destName = cache->destName;
QString templ = cache->templ;
TQString destDir = cache->destDir;
TQString destName = cache->destName;
TQString templ = cache->templ;
destDir += "/";
QDir d;
TQDir d;
int pos = -1;
while ( ( pos = destDir.find( '/', pos + 1 ) ) >= 0 ) {
QString path = destDir.left( pos + 1 );
TQString path = destDir.left( pos + 1 );
d = path;
if ( !d.exists() )
d.mkdir( path );
@ -130,7 +130,7 @@ void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added )
}
}
void decorateDirs( QString destDir )
void decorateDirs( TQString destDir )
{
// find out where to put the .directory files
if ( destDir.isNull() )
@ -138,19 +138,19 @@ void decorateDirs( QString destDir )
else
destDir += "/";
QStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true );
TQStringList dirs = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.directory", true );
QStringList::Iterator it;
TQStringList::Iterator it;
for ( it = dirs.begin(); it != dirs.end(); ++it ) {
// find out the name of the file to store
QString destName = *it;
TQString destName = *it;
int pos = destName.find( "kappfinder/apps/" );
if ( pos > 0 )
destName = destName.mid( pos + strlen( "kappfinder/apps/" ) );
destName = destDir + "/" + destName;
if ( !QFile::exists( destName ) ) {
if ( !TQFile::exists( destName ) ) {
kdDebug(DBG_CODE) << "Copy " << *it << " to " << destName << endl;
copyFile( *it, destName );
}

@ -22,22 +22,22 @@
#ifndef COMMON_H
#define COMMON_H
#include <qlistview.h>
#include <qptrlist.h>
#include <qstring.h>
#include <tqlistview.h>
#include <tqptrlist.h>
#include <tqstring.h>
class AppLnkCache
{
public:
QString destDir;
QString destName;
QString templ;
QCheckListItem *item;
TQString destDir;
TQString destName;
TQString templ;
TQCheckListItem *item;
};
bool scanDesktopFile( QPtrList<AppLnkCache> &appCache, const QString &templ,
QString destDir = QString::null );
void createDesktopFiles( QPtrList<AppLnkCache> &appCache, int &added );
void decorateDirs( QString destDir = QString::null );
bool scanDesktopFile( TQPtrList<AppLnkCache> &appCache, const TQString &templ,
TQString destDir = TQString::null );
void createDesktopFiles( TQPtrList<AppLnkCache> &appCache, int &added );
void decorateDirs( TQString destDir = TQString::null );
#endif

@ -25,7 +25,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include <stdio.h>
@ -42,14 +42,14 @@ int main( int argc, char *argv[] )
return -1;
}
QStringList templates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
TQStringList templates = KGlobal::dirs()->findAllResources( "data", "kappfinder/apps/*.desktop", true );
QString dir = QString( argv[ 1 ] ) + "/";
TQString dir = TQString( argv[ 1 ] ) + "/";
QPtrList<AppLnkCache> appCache;
TQPtrList<AppLnkCache> appCache;
appCache.setAutoDelete( true );
QStringList::Iterator it;
TQStringList::Iterator it;
for ( it = templates.begin(); it != templates.end(); ++it )
scanDesktopFile( appCache, *it, dir );

@ -35,22 +35,22 @@
#include <kstdguiitem.h>
#include <kstartupinfo.h>
#include <qaccel.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qdir.h>
#include <qregexp.h>
#include <tqaccel.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqpushbutton.h>
#include <tqdir.h>
#include <tqregexp.h>
#include "toplevel.h"
TopLevel::TopLevel( const QString &destDir, QWidget *parent, const char *name )
TopLevel::TopLevel( const TQString &destDir, TQWidget *parent, const char *name )
: KDialog( parent, name, true )
{
setCaption( i18n( "KAppfinder" ) );
QVBoxLayout *layout = new QVBoxLayout( this, marginHint() );
TQVBoxLayout *layout = new TQVBoxLayout( this, marginHint() );
QLabel *label = new QLabel( i18n( "The application finder looks for non-KDE "
TQLabel *label = new TQLabel( i18n( "The application finder looks for non-KDE "
"applications on your system and adds "
"them to the KDE menu system. "
"Click 'Scan' to begin, select the desired applications and then click 'Apply'."), this);
@ -59,53 +59,53 @@ TopLevel::TopLevel( const QString &destDir, QWidget *parent, const char *name )
layout->addSpacing( 5 );
mListView = new QListView( this );
mListView = new TQListView( this );
mListView->addColumn( i18n( "Application" ) );
mListView->addColumn( i18n( "Description" ) );
mListView->addColumn( i18n( "Command" ) );
mListView->setMinimumSize( 300, 300 );
mListView->setRootIsDecorated( true );
mListView->setAllColumnsShowFocus( true );
mListView->setSelectionMode(QListView::NoSelection);
mListView->setSelectionMode(TQListView::NoSelection);
layout->addWidget( mListView );
mProgress = new KProgress( this );
mProgress->setPercentageVisible( false );
layout->addWidget( mProgress );
mSummary = new QLabel( i18n( "Summary:" ), this );
mSummary = new TQLabel( i18n( "Summary:" ), this );
layout->addWidget( mSummary );
KButtonBox* bbox = new KButtonBox( this );
mScanButton = bbox->addButton( KGuiItem( i18n( "Scan" ), "find"), this, SLOT( slotScan() ) );
mScanButton = bbox->addButton( KGuiItem( i18n( "Scan" ), "find"), this, TQT_SLOT( slotScan() ) );
bbox->addStretch( 5 );
mSelectButton = bbox->addButton( i18n( "Select All" ), this,
SLOT( slotSelectAll() ) );
TQT_SLOT( slotSelectAll() ) );
mSelectButton->setEnabled( false );
mUnSelectButton = bbox->addButton( i18n( "Unselect All" ), this,
SLOT( slotUnselectAll() ) );
TQT_SLOT( slotUnselectAll() ) );
mUnSelectButton->setEnabled( false );
bbox->addStretch( 5 );
mApplyButton = bbox->addButton( KStdGuiItem::apply(), this, SLOT( slotCreate() ) );
mApplyButton = bbox->addButton( KStdGuiItem::apply(), this, TQT_SLOT( slotCreate() ) );
mApplyButton->setEnabled( false );
bbox->addButton( KStdGuiItem::close(), kapp, SLOT( quit() ) );
bbox->addButton( KStdGuiItem::close(), kapp, TQT_SLOT( quit() ) );
bbox->layout();
layout->addWidget( bbox );
connect( kapp, SIGNAL( lastWindowClosed() ), kapp, SLOT( quit() ) );
connect( kapp,