From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- drkonqi/backtrace.cpp | 14 +++++++------- drkonqi/backtrace.h | 2 +- drkonqi/debugger.cpp | 16 ++++++++-------- drkonqi/debugger.h | 2 +- drkonqi/krashconf.cpp | 24 ++++++++++++------------ drkonqi/toplevel.cpp | 12 ++++++------ 6 files changed, 35 insertions(+), 35 deletions(-) (limited to 'drkonqi') diff --git a/drkonqi/backtrace.cpp b/drkonqi/backtrace.cpp index c60d6a41c..98d466fb4 100644 --- a/drkonqi/backtrace.cpp +++ b/drkonqi/backtrace.cpp @@ -71,7 +71,7 @@ void BackTrace::start() TQString exec = m_krashconf->tryExec(); if ( !exec.isEmpty() && KStandardDirs::findExe(exec).isEmpty() ) { - TQObject * o = parent(); + TQObject * o = tqparent(); if (o && !o->inherits("QWidget")) { @@ -137,7 +137,7 @@ bool BackTrace::usefulBacktrace() { // remove crap if( !m_krashconf->removeFromBacktraceRegExp().isEmpty()) - m_strBt.replace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString::null); + m_strBt.tqreplace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString()); if( m_krashconf->disableChecks()) return true; @@ -146,16 +146,16 @@ bool BackTrace::usefulBacktrace() // how many " ?? " in the bt ? int unknown = 0; if( !m_krashconf->invalidStackFrameRegExp().isEmpty()) - unknown = strBt.contains( TQRegExp( m_krashconf->invalidStackFrameRegExp())); + unknown = strBt.tqcontains( TQRegExp( m_krashconf->invalidStackFrameRegExp())); // how many stack frames in the bt ? int frames = 0; if( !m_krashconf->frameRegExp().isEmpty()) - frames = strBt.contains( TQRegExp( m_krashconf->frameRegExp())); + frames = strBt.tqcontains( TQRegExp( m_krashconf->frameRegExp())); else - frames = strBt.contains('\n'); + frames = strBt.tqcontains('\n'); bool tooShort = false; if( !m_krashconf->neededInValidBacktraceRegExp().isEmpty()) - tooShort = ( strBt.find( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); + tooShort = ( strBt.tqfind( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); return !m_strBt.isNull() && !tooShort && (unknown < frames); } @@ -175,7 +175,7 @@ void BackTrace::processBacktrace() --len; } m_strBt.remove( pos, len ); - m_strBt.insert( pos, TQString::fromLatin1( "[KCrash handler]\n" )); + m_strBt.insert( pos, TQString::tqfromLatin1( "[KCrash handler]\n" )); } } } diff --git a/drkonqi/backtrace.h b/drkonqi/backtrace.h index b6779f3eb..4a94bcfc6 100644 --- a/drkonqi/backtrace.h +++ b/drkonqi/backtrace.h @@ -34,7 +34,7 @@ class KTempFile; #include -class BackTrace : public QObject +class BackTrace : public TQObject { Q_OBJECT diff --git a/drkonqi/debugger.cpp b/drkonqi/debugger.cpp index c6b073e4f..b63025563 100644 --- a/drkonqi/debugger.cpp +++ b/drkonqi/debugger.cpp @@ -54,15 +54,15 @@ KrashDebugger :: KrashDebugger (const KrashConfig *krashconf, TQWidget *parent, vbox->setAutoAdd(TRUE); m_backtrace = new KTextBrowser(this); - m_backtrace->setTextFormat(Qt::PlainText); + m_backtrace->setTextFormat(TQt::PlainText); m_backtrace->setFont(KGlobalSettings::fixedFont()); 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_status->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); //m_copyButton = new KPushButton( KStdGuiItem::copy(), w ); - KGuiItem item( i18n( "C&opy" ), TQString::fromLatin1( "editcopy" ) ); + KGuiItem item( i18n( "C&opy" ), TQString::tqfromLatin1( "editcopy" ) ); m_copyButton = new KPushButton( item, w ); connect( m_copyButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopy() ) ); m_copyButton->setEnabled( false ); @@ -109,9 +109,9 @@ void KrashDebugger :: slotSave() } else { - TQString defname = m_krashconf->execName() + TQString::fromLatin1( ".kcrash" ); - if( defname.contains( '/' )) - defname = defname.mid( defname.findRev( '/' ) + 1 ); + TQString defname = m_krashconf->execName() + TQString::tqfromLatin1( ".kcrash" ); + if( defname.tqcontains( '/' )) + defname = defname.mid( defname.tqfindRev( '/' ) + 1 ); TQString filename = KFileDialog::getSaveFileName(defname, TQString::null, this, i18n("Select Filename")); if (!filename.isEmpty()) { @@ -193,7 +193,7 @@ void KrashDebugger :: startDebugger() } m_status->setText(i18n("Loading symbols...")); - m_proctrace = new BackTrace(m_krashconf, this); + m_proctrace = new BackTrace(m_krashconf, TQT_TQOBJECT(this)); connect(m_proctrace, TQT_SIGNAL(append(const TQString &)), TQT_SLOT(slotAppend(const TQString &))); @@ -208,7 +208,7 @@ void KrashDebugger :: startDebugger() bool KrashDebugger::performChecks( TQString* msg ) { bool ret = true; - KConfig kdedcfg( TQString::fromLatin1( "kdedrc" ), true ); + KConfig kdedcfg( TQString::tqfromLatin1( "kdedrc" ), true ); kdedcfg.setGroup( "General" ); if( kdedcfg.readBoolEntry( "DelayedCheck", false )) { diff --git a/drkonqi/debugger.h b/drkonqi/debugger.h index bbfc617e1..0604d5fcf 100644 --- a/drkonqi/debugger.h +++ b/drkonqi/debugger.h @@ -36,7 +36,7 @@ class BackTrace; #include -class KrashDebugger : public QWidget +class KrashDebugger : public TQWidget { Q_OBJECT diff --git a/drkonqi/krashconf.cpp b/drkonqi/krashconf.cpp index 4faccc956..7c276cf41 100644 --- a/drkonqi/krashconf.cpp +++ b/drkonqi/krashconf.cpp @@ -93,12 +93,12 @@ void KrashConfig :: readConfig() // maybe we should check if it's relative? TQString configname = config->readEntry("ConfigName", - TQString::fromLatin1("enduser")); + TQString::tqfromLatin1("enduser")); TQString debuggername = config->readEntry("Debugger", - TQString::fromLatin1("gdb")); + TQString::tqfromLatin1("gdb")); - KConfig debuggers(TQString::fromLatin1("debuggers/%1rc").arg(debuggername), + KConfig debuggers(TQString::tqfromLatin1("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(TQString::fromLatin1("presets/%1rc").arg(configname), + KConfig preset(TQString::tqfromLatin1("presets/%1rc").arg(configname), true, false, "appdata"); preset.setGroup("ErrorDescription"); @@ -138,7 +138,7 @@ void KrashConfig :: readConfig() TQString str = TQString::number(m_signalnum); // use group unknown if signal not found if (!preset.hasGroup(str)) - str = TQString::fromLatin1("unknown"); + str = TQString::tqfromLatin1("unknown"); preset.setGroup(str); m_signalName = preset.readEntry("Name"); if (b) @@ -149,13 +149,13 @@ void KrashConfig :: readConfig() void KrashConfig :: expandString(TQString &str, bool shell, const TQString &tempFile) const { TQMap 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; + map[TQString::tqfromLatin1("appname")] = TQString::tqfromLatin1(appName()); + map[TQString::tqfromLatin1("execname")] = startedByKdeinit() ? TQString::tqfromLatin1("kdeinit") : m_execname; + map[TQString::tqfromLatin1("signum")] = TQString::number(signalNumber()); + map[TQString::tqfromLatin1("signame")] = signalName(); + map[TQString::tqfromLatin1("progname")] = programName(); + map[TQString::tqfromLatin1("pid")] = TQString::number(pid()); + map[TQString::tqfromLatin1("tempfile")] = tempFile; if (shell) str = KMacroExpander::expandMacrosShellQuote( str, map ); else diff --git a/drkonqi/toplevel.cpp b/drkonqi/toplevel.cpp index 488edaebd..118e56c39 100644 --- a/drkonqi/toplevel.cpp +++ b/drkonqi/toplevel.cpp @@ -67,12 +67,12 @@ Toplevel :: Toplevel(KrashConfig *krashconf, TQWidget *parent, const char *name) // picture of konqi TQLabel *lab = new TQLabel(page); lab->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - TQPixmap pix(locate("appdata", TQString::fromLatin1("pics/konqi.png"))); + TQPixmap pix(locate("appdata", TQString::tqfromLatin1("pics/konqi.png"))); lab->setPixmap(pix); - lab->setFixedSize( lab->sizeHint() ); + lab->setFixedSize( lab->tqsizeHint() ); TQLabel * info = new TQLabel(generateText(), page); - info->setMinimumSize(info->sizeHint()); + info->setMinimumSize(info->tqsizeHint()); if (m_krashconf->showBacktrace()) { @@ -151,10 +151,10 @@ void Toplevel :: slotUser1() m_bugreport = new DrKBugReport(0, true, m_krashconf->aboutData()); if (i == KMessageBox::Yes) { - TQApplication::setOverrideCursor ( waitCursor ); + TQApplication::setOverrideCursor ( tqwaitCursor ); // generate the backtrace - BackTrace *backtrace = new BackTrace(m_krashconf, this); + BackTrace *backtrace = new BackTrace(m_krashconf, TQT_TQOBJECT(this)); connect(backtrace, TQT_SIGNAL(someError()), TQT_SLOT(slotBacktraceSomeError())); connect(backtrace, TQT_SIGNAL(done(const TQString &)), TQT_SLOT(slotBacktraceDone(const TQString &))); @@ -196,7 +196,7 @@ void Toplevel :: slotUser3() void Toplevel :: slotBacktraceDone(const TQString &str) { // Do not translate.. This will be included in the _MAIL_. - TQString buf = TQString::fromLatin1 + TQString buf = TQString::tqfromLatin1 ("\n\n\nHere is a backtrace generated by DrKonqi:\n") + str; m_bugreport->setText(buf); -- cgit v1.2.1