summaryrefslogtreecommitdiffstats
path: root/parts/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'parts/valgrind')
-rw-r--r--parts/valgrind/valgrind_dialog.cpp78
-rw-r--r--parts/valgrind/valgrind_dialog.h30
-rw-r--r--parts/valgrind/valgrind_part.cpp116
-rw-r--r--parts/valgrind/valgrind_part.h34
-rw-r--r--parts/valgrind/valgrind_widget.cpp74
-rw-r--r--parts/valgrind/valgrind_widget.h14
-rw-r--r--parts/valgrind/valgrinditem.cpp22
-rw-r--r--parts/valgrind/valgrinditem.h24
8 files changed, 196 insertions, 196 deletions
diff --git a/parts/valgrind/valgrind_dialog.cpp b/parts/valgrind/valgrind_dialog.cpp
index 405d78dd..67c05c56 100644
--- a/parts/valgrind/valgrind_dialog.cpp
+++ b/parts/valgrind/valgrind_dialog.cpp
@@ -1,7 +1,7 @@
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqwidgetstack.h>
#include <kprocess.h>
#include <klocale.h>
@@ -16,7 +16,7 @@
#include "valgrind_dialog.moc"
-ValgrindDialog::ValgrindDialog( Type type, QWidget* parent )
+ValgrindDialog::ValgrindDialog( Type type, TQWidget* parent )
: KDialogBase( parent, "valgrind dialog", true, i18n("Valgrind Memory Check"), Ok|Cancel ),
m_type(type)
{
@@ -25,10 +25,10 @@ ValgrindDialog::ValgrindDialog( Type type, QWidget* parent )
w->executableEdit->setFocus();
w->stack->raiseWidget(m_type);
setMainWidget( w );
- connect( w->executableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged()));
- connect( w->valExecutableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged()));
- connect( w->ctExecutableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged()));
- connect( w->kcExecutableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged()));
+ connect( w->executableEdit->lineEdit(), TQT_SIGNAL( textChanged( const TQString &)), this, TQT_SLOT( valgrindTextChanged()));
+ connect( w->valExecutableEdit->lineEdit(), TQT_SIGNAL( textChanged( const TQString &)), this, TQT_SLOT( valgrindTextChanged()));
+ connect( w->ctExecutableEdit->lineEdit(), TQT_SIGNAL( textChanged( const TQString &)), this, TQT_SLOT( valgrindTextChanged()));
+ connect( w->kcExecutableEdit->lineEdit(), TQT_SIGNAL( textChanged( const TQString &)), this, TQT_SLOT( valgrindTextChanged()));
enableButtonOK( false );
}
@@ -45,34 +45,34 @@ void ValgrindDialog::valgrindTextChanged()
enableButtonOK( !w->executableEdit->lineEdit()->text().isEmpty() && !w->ctExecutableEdit->lineEdit()->text().isEmpty() && !w->kcExecutableEdit->lineEdit()->text().isEmpty() );
}
-QString ValgrindDialog::executableName() const
+TQString ValgrindDialog::executableName() const
{
return w->executableEdit->url();
}
-void ValgrindDialog::setExecutable( const QString& url )
+void ValgrindDialog::setExecutable( const TQString& url )
{
w->executableEdit->setURL( url );
}
-QString ValgrindDialog::valExecutable() const
+TQString ValgrindDialog::valExecutable() const
{
return w->valExecutableEdit->url();
}
-QString ValgrindDialog::parameters() const
+TQString ValgrindDialog::parameters() const
{
return w->paramEdit->text();
}
-void ValgrindDialog::setParameters( const QString& params )
+void ValgrindDialog::setParameters( const TQString& params )
{
w->paramEdit->setText( params );
}
-void ValgrindDialog::setValExecutable( const QString& ve )
+void ValgrindDialog::setValExecutable( const TQString& ve )
{
- QString vUrl = ve;
+ TQString vUrl = ve;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "valgrind" );
}
@@ -86,14 +86,14 @@ void ValgrindDialog::setValExecutable( const QString& ve )
}
}
-static const QString memCheckParam( "--tool=memcheck" );
-static const QString leakCheckParam( "--leak-check=yes" );
-static const QString reachableParam( "--show-reachable=yes" );
-static const QString childrenParam( "--trace-children=yes" );
+static const TQString memCheckParam( "--tool=memcheck" );
+static const TQString leakCheckParam( "--leak-check=yes" );
+static const TQString reachableParam( "--show-reachable=yes" );
+static const TQString childrenParam( "--trace-children=yes" );
-QString ValgrindDialog::valParams() const
+TQString ValgrindDialog::valParams() const
{
- QString params = w->valParamEdit->text();
+ TQString params = w->valParamEdit->text();
if (isNewValgrindVersion())
params += " " + memCheckParam;
if ( w->memleakBox->isChecked() )
@@ -106,9 +106,9 @@ QString ValgrindDialog::valParams() const
return params;
}
-void ValgrindDialog::setValParams( const QString& params )
+void ValgrindDialog::setValParams( const TQString& params )
{
- QString myParams = params;
+ TQString myParams = params;
if ( myParams.contains( leakCheckParam ) )
w->memleakBox->setChecked( true );
if ( myParams.contains( reachableParam ) )
@@ -117,22 +117,22 @@ void ValgrindDialog::setValParams( const QString& params )
w->childrenBox->setChecked( true );
w->init();
- myParams = myParams.replace( QRegExp( memCheckParam ), "" );
- myParams = myParams.replace( QRegExp( leakCheckParam ), "" );
- myParams = myParams.replace( QRegExp( reachableParam ), "" );
- myParams = myParams.replace( QRegExp( childrenParam ), "" );
+ myParams = myParams.replace( TQRegExp( memCheckParam ), "" );
+ myParams = myParams.replace( TQRegExp( leakCheckParam ), "" );
+ myParams = myParams.replace( TQRegExp( reachableParam ), "" );
+ myParams = myParams.replace( TQRegExp( childrenParam ), "" );
myParams = myParams.stripWhiteSpace();
w->valParamEdit->setText( myParams );
}
-QString ValgrindDialog::ctExecutable() const
+TQString ValgrindDialog::ctExecutable() const
{
return w->ctExecutableEdit->url();
}
-void ValgrindDialog::setCtExecutable( const QString& ce )
+void ValgrindDialog::setCtExecutable( const TQString& ce )
{
- QString vUrl = ce;
+ TQString vUrl = ce;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "valgrind" );
}
@@ -146,18 +146,18 @@ void ValgrindDialog::setCtExecutable( const QString& ce )
}
}
-QString ValgrindDialog::ctParams() const
+TQString ValgrindDialog::ctParams() const
{
- QString params = w->ctParamEdit->text();
+ TQString params = w->ctParamEdit->text();
if ( w->ctChildrenBox->isChecked() )
params += " " + childrenParam;
return params;
}
-void ValgrindDialog::setCtParams( const QString& params )
+void ValgrindDialog::setCtParams( const TQString& params )
{
- QString myParams = params;
+ TQString myParams = params;
//force --tool=callgrind if no params are given
if (myParams.isEmpty())
myParams = "--tool=callgrind";
@@ -165,19 +165,19 @@ void ValgrindDialog::setCtParams( const QString& params )
w->ctChildrenBox->setChecked( true );
w->init();
- myParams = myParams.replace( QRegExp( childrenParam ), "" );
+ myParams = myParams.replace( TQRegExp( childrenParam ), "" );
myParams = myParams.stripWhiteSpace();
w->ctParamEdit->setText( myParams );
}
-QString ValgrindDialog::kcExecutable( ) const
+TQString ValgrindDialog::kcExecutable( ) const
{
return w->kcExecutableEdit->url();
}
-void ValgrindDialog::setKcExecutable( const QString& ke )
+void ValgrindDialog::setKcExecutable( const TQString& ke )
{
- QString vUrl = ke;
+ TQString vUrl = ke;
if ( vUrl.isEmpty() ) {
vUrl = KStandardDirs::findExe( "kcachegrind" );
}
diff --git a/parts/valgrind/valgrind_dialog.h b/parts/valgrind/valgrind_dialog.h
index 41c25afc..a57d4529 100644
--- a/parts/valgrind/valgrind_dialog.h
+++ b/parts/valgrind/valgrind_dialog.h
@@ -17,36 +17,36 @@ class ValgrindDialog : public KDialogBase
public:
enum Type { Memcheck = 0, Calltree = 1 };
- ValgrindDialog( Type type, QWidget* parent = 0 );
+ ValgrindDialog( Type type, TQWidget* parent = 0 );
~ValgrindDialog();
// the app to check
- QString executableName() const;
- void setExecutable( const QString& url );
+ TQString executableName() const;
+ void setExecutable( const TQString& url );
// command line parameters for the app
- QString parameters() const;
- void setParameters( const QString& params );
+ TQString parameters() const;
+ void setParameters( const TQString& params );
// name and/or path to the valgrind executable
- QString valExecutable() const;
- void setValExecutable( const QString& ve );
+ TQString valExecutable() const;
+ void setValExecutable( const TQString& ve );
// command line parameters for valgrind
- QString valParams() const;
- void setValParams( const QString& params );
+ TQString valParams() const;
+ void setValParams( const TQString& params );
// name and/or path to the calltree executable
- QString ctExecutable() const;
- void setCtExecutable( const QString& ce );
+ TQString ctExecutable() const;
+ void setCtExecutable( const TQString& ce );
// command line parameters for calltree
- QString ctParams() const;
- void setCtParams( const QString& params );
+ TQString ctParams() const;
+ void setCtParams( const TQString& params );
// name and/or path to the kcachegrind executable
- QString kcExecutable() const;
- void setKcExecutable( const QString& ke );
+ TQString kcExecutable() const;
+ void setKcExecutable( const TQString& ke );
protected:
bool isNewValgrindVersion() const;
diff --git a/parts/valgrind/valgrind_part.cpp b/parts/valgrind/valgrind_part.cpp
index 868faf28..801d1c2a 100644
--- a/parts/valgrind/valgrind_part.cpp
+++ b/parts/valgrind/valgrind_part.cpp
@@ -1,8 +1,8 @@
#include "valgrind_part.h"
-#include <qwhatsthis.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -26,29 +26,29 @@ typedef KDevGenericFactory<ValgrindPart> ValgrindFactory;
static const KDevPluginInfo data("kdevvalgrind");
K_EXPORT_COMPONENT_FACTORY( libkdevvalgrind, ValgrindFactory( data ) )
-ValgrindPart::ValgrindPart( QObject *parent, const char *name, const QStringList& )
+ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringList& )
: KDevPlugin( &data, parent, name ? name : "ValgrindPart" )
{
setInstance( ValgrindFactory::instance() );
setXMLFile( "kdevpart_valgrind.rc" );
proc = new KShellProcess();
- connect( proc, SIGNAL(receivedStdout( KProcess*, char*, int )),
- this, SLOT(receivedStdout( KProcess*, char*, int )) );
- connect( proc, SIGNAL(receivedStderr( KProcess*, char*, int )),
- this, SLOT(receivedStderr( KProcess*, char*, int )) );
- connect( proc, SIGNAL(processExited( KProcess* )),
- this, SLOT(processExited( KProcess* )) );
- connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)),
- this, SLOT(slotStopButtonClicked(KDevPlugin*)) );
- connect( core(), SIGNAL(projectOpened()),
- this, SLOT(projectOpened()) );
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStdout( KProcess*, char*, int )) );
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*, char*, int )),
+ this, TQT_SLOT(receivedStderr( KProcess*, char*, int )) );
+ connect( proc, TQT_SIGNAL(processExited( KProcess* )),
+ this, TQT_SLOT(processExited( KProcess* )) );
+ connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)),
+ this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) );
+ connect( core(), TQT_SIGNAL(projectOpened()),
+ this, TQT_SLOT(projectOpened()) );
m_widget = new ValgrindWidget( this );
m_widget->setIcon( SmallIcon("fork") );
m_widget->setCaption(i18n("Valgrind Output"));
- QWhatsThis::add( m_widget, i18n( "<b>Valgrind</b><p>Shows the output of the valgrind. Valgrind detects<br>"
+ TQWhatsThis::add( m_widget, i18n( "<b>Valgrind</b><p>Shows the output of the valgrind. Valgrind detects<br>"
"use of uninitialized memory<br>"
"reading/writing memory after it has been free'd<br>"
"reading/writing off the end of malloc'd blocks<br>"
@@ -59,12 +59,12 @@ ValgrindPart::ValgrindPart( QObject *parent, const char *name, const QStringList
"some abuses of the POSIX pthread API." ) );
KAction* action = new KAction( i18n("&Valgrind Memory Leak Check"), 0, this,
- SLOT(slotExecValgrind()), actionCollection(), "tools_valgrind" );
+ TQT_SLOT(slotExecValgrind()), actionCollection(), "tools_valgrind" );
action->setToolTip(i18n("Valgrind memory leak check"));
action->setWhatsThis(i18n("<b>Valgrind memory leak check</b><p>Runs Valgrind - a tool to help you find memory-management problems in your programs."));
action = new KAction( i18n("P&rofile with KCachegrind"), 0, this,
- SLOT(slotExecCalltree()), actionCollection(), "tools_calltree" );
+ TQT_SLOT(slotExecCalltree()), actionCollection(), "tools_calltree" );
action->setToolTip(i18n("Profile with KCachegrind"));
action->setWhatsThis(i18n("<b>Profile with KCachegrind</b><p>Runs your program in calltree and then displays profiler information in KCachegrind."));
@@ -87,11 +87,11 @@ void ValgrindPart::projectOpened()
void ValgrindPart::loadOutput()
{
- QString fName = KFileDialog::getOpenFileName(QString::null, "*", 0, i18n("Open Valgrind Output"));
+ TQString fName = KFileDialog::getOpenFileName(TQString::null, "*", 0, i18n("Open Valgrind Output"));
if ( fName.isEmpty() )
return;
- QFile f( fName );
+ TQFile f( fName );
if ( !f.open( IO_ReadOnly ) ) {
KMessageBox::sorry( 0, i18n("Could not open valgrind output: %1").arg(fName) );
return;
@@ -100,7 +100,7 @@ void ValgrindPart::loadOutput()
clear();
getActiveFiles();
- QTextStream stream( &f );
+ TQTextStream stream( &f );
while ( !stream.atEnd() ) {
receivedString( stream.readLine() + "\n" );
}
@@ -111,10 +111,10 @@ void ValgrindPart::getActiveFiles()
{
activeFiles.clear();
if ( project() ) {
- QStringList projectFiles = project()->allFiles();
- QString projectDirectory = project()->projectDirectory();
+ TQStringList projectFiles = project()->allFiles();
+ TQString projectDirectory = project()->projectDirectory();
KURL url;
- for ( QStringList::Iterator it = projectFiles.begin(); it != projectFiles.end(); ++it ) {
+ for ( TQStringList::Iterator it = projectFiles.begin(); it != projectFiles.end(); ++it ) {
KURL url( projectDirectory + "/" + (*it) );
url.cleanPath( true );
activeFiles += url.path();
@@ -123,13 +123,13 @@ void ValgrindPart::getActiveFiles()
}
}
-static void guessActiveItem( ValgrindItem& item, const QStringList activeFiles )
+static void guessActiveItem( ValgrindItem& item, const TQStringList activeFiles )
{
if ( activeFiles.isEmpty() && item.backtrace().isEmpty() )
return;
for ( ValgrindItem::BacktraceList::Iterator it = item.backtrace().begin(); it != item.backtrace().end(); ++it ) {
// active: first line of backtrace that lies in project source file
- for ( QStringList::ConstIterator it2 = activeFiles.begin(); it2 != activeFiles.end(); ++it2 ) {
+ for ( TQStringList::ConstIterator it2 = activeFiles.begin(); it2 != activeFiles.end(); ++it2 ) {
if ( (*it).url() == (*it2) ) {
(*it).setHighlighted( true );
return;
@@ -138,7 +138,7 @@ static void guessActiveItem( ValgrindItem& item, const QStringList activeFiles )
}
}
-void ValgrindPart::appendMessage( const QString& message )
+void ValgrindPart::appendMessage( const TQString& message )
{
if ( message.isEmpty() )
return;
@@ -162,7 +162,7 @@ void ValgrindPart::slotExecValgrind()
kcInfo.runKc = false;
_lastValExec = dlg->valExecutable();
_lastValParams = dlg->valParams();
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
runValgrind( dlg->executableName(), dlg->parameters(), dlg->valExecutable(), dlg->valParams() );
}
}
@@ -182,7 +182,7 @@ void ValgrindPart::slotExecCalltree()
kcInfo.runKc = true;
kcInfo.kcPath = dlg->kcExecutable();
// kcInfo.kcWorkDir = KURL(dlg->executableName()).directory();
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
runValgrind( dlg->executableName(), dlg->parameters(), dlg->ctExecutable(), dlg->ctParams() );
}
_lastKcExec = dlg->kcExecutable();
@@ -206,12 +206,12 @@ void ValgrindPart::slotStopButtonClicked( KDevPlugin* which )
void ValgrindPart::clear()
{
m_widget->clear();
- currentMessage = QString::null;
+ currentMessage = TQString::null;
currentPid = -1;
- lastPiece = QString::null;
+ lastPiece = TQString::null;
}
-void ValgrindPart::runValgrind( const QString& exec, const QString& params, const QString& valExec, const QString& valParams )
+void ValgrindPart::runValgrind( const TQString& exec, const TQString& params, const TQString& valExec, const TQString& valParams )
{
if ( proc->isRunning() ) {
KMessageBox::sorry( 0, i18n( "There is already an instance of valgrind running." ) );
@@ -230,11 +230,11 @@ void ValgrindPart::runValgrind( const QString& exec, const QString& params, cons
if (project())
run_envvars = project()->runEnvironmentVars();
- QStringList envVarList;
+ TQStringList envVarList;
DomUtil::PairList::ConstIterator it;
for (it = run_envvars.begin(); it != run_envvars.end(); ++it)
{
- envVarList << QString("%1=\"%2\" ").arg((*it).first).arg((*it).second);
+ envVarList << TQString("%1=\"%2\" ").arg((*it).first).arg((*it).second);
}
*proc << envVarList.join("") << valExec << valParams << exec << params;
@@ -248,20 +248,20 @@ void ValgrindPart::runValgrind( const QString& exec, const QString& params, cons
void ValgrindPart::receivedStdout( KProcess*, char* /* msg */, int /* len */ )
{
- //kdDebug() << "got StdOut: " <<QString::fromLocal8Bit( msg, len ) << endl;
+ //kdDebug() << "got StdOut: " <<TQString::fromLocal8Bit( msg, len ) << endl;
}
void ValgrindPart::receivedStderr( KProcess*, char* msg, int len )
{
- receivedString( QString::fromLocal8Bit( msg, len ) );
+ receivedString( TQString::fromLocal8Bit( msg, len ) );
}
-void ValgrindPart::receivedString( const QString& str )
+void ValgrindPart::receivedString( const TQString& str )
{
- QString rmsg = lastPiece + str;
- QStringList lines = QStringList::split( "\n", rmsg );
+ TQString rmsg = lastPiece + str;
+ TQStringList lines = TQStringList::split( "\n", rmsg );
-// kdDebug() << "got: " << QString::fromLocal8Bit( msg, len ) << endl;
+// kdDebug() << "got: " << TQString::fromLocal8Bit( msg, len ) << endl;
if ( !rmsg.endsWith( "\n" ) ) {
// the last message is trucated, we'll receive
@@ -269,16 +269,16 @@ void ValgrindPart::receivedString( const QString& str )
lastPiece = lines.back();
lines.pop_back();
} else {
- lastPiece = QString::null;
+ lastPiece = TQString::null;
}
appendMessages( lines );
}
-void ValgrindPart::appendMessages( const QStringList& lines )
+void ValgrindPart::appendMessages( const TQStringList& lines )
{
- QRegExp valRe( "==(\\d+)== (.*)" );
+ TQRegExp valRe( "==(\\d+)== (.*)" );
- for ( QStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it ) {
if ( valRe.search( *it ) < 0 )
continue;
@@ -286,7 +286,7 @@ void ValgrindPart::appendMessages( const QStringList& lines )
if ( valRe.cap( 2 ).isEmpty() ) {
appendMessage( currentMessage );
- currentMessage = QString::null;
+ currentMessage = TQString::null;
} else if ( cPid != currentPid ) {
appendMessage( currentMessage );
currentMessage = *it;
@@ -303,8 +303,8 @@ void ValgrindPart::processExited( KProcess* p )
{
if ( p == proc ) {
appendMessage( currentMessage + lastPiece );
- currentMessage = QString::null;
- lastPiece = QString::null;
+ currentMessage = TQString::null;
+ lastPiece = TQString::null;
core()->running( this, false );
if (kcInfo.runKc)
@@ -312,49 +312,49 @@ void ValgrindPart::processExited( KProcess* p )
KProcess *kcProc = new KProcess;
// kcProc->setWorkingDirectory(kcInfo.kcWorkDir);
*kcProc << kcInfo.kcPath;
- *kcProc << QString("callgrind.out.%1").arg(p->pid());
+ *kcProc << TQString("callgrind.out.%1").arg(p->pid());
kcProc->start(KProcess::DontCare);
}
}
}
-void ValgrindPart::restorePartialProjectSession( const QDomElement* el )
+void ValgrindPart::restorePartialProjectSession( const TQDomElement* el )
{
- QDomElement execElem = el->namedItem( "executable" ).toElement();
+ TQDomElement execElem = el->namedItem( "executable" ).toElement();
_lastExec = execElem.attribute( "path", "" );
_lastParams = execElem.attribute( "params", "" );
- QDomElement valElem = el->namedItem( "valgrind" ).toElement();
+ TQDomElement valElem = el->namedItem( "valgrind" ).toElement();
_lastValExec = valElem.attribute( "path", "" );
_lastValParams = valElem.attribute( "params", "" );
- QDomElement ctElem = el->namedItem( "calltree" ).toElement();
+ TQDomElement ctElem = el->namedItem( "calltree" ).toElement();
_lastCtExec = ctElem.attribute( "path", "" );
_lastCtParams = ctElem.attribute( "params", "" );
- QDomElement kcElem = el->namedItem( "kcachegrind" ).toElement();
+ TQDomElement kcElem = el->namedItem( "kcachegrind" ).toElement();
_lastKcExec = kcElem.attribute( "path", "" );
}
-void ValgrindPart::savePartialProjectSession( QDomElement* el )
+void ValgrindPart::savePartialProjectSession( TQDomElement* el )
{
- QDomDocument domDoc = el->ownerDocument();
+ TQDomDocument domDoc = el->ownerDocument();
if ( domDoc.isNull() )
return;
- QDomElement execElem = domDoc.createElement( "executable" );
+ TQDomElement execElem = domDoc.createElement( "executable" );
execElem.setAttribute( "path", _lastExec );
execElem.setAttribute( "params", _lastParams );
- QDomElement valElem = domDoc.createElement( "valgrind" );
+ TQDomElement valElem = domDoc.createElement( "valgrind" );
valElem.setAttribute( "path", _lastValExec );
valElem.setAttribute( "params", _lastValParams );
- QDomElement ctElem = domDoc.createElement( "calltree" );
+ TQDomElement ctElem = domDoc.createElement( "calltree" );
ctElem.setAttribute( "path", _lastCtExec );
ctElem.setAttribute( "params", _lastCtParams );
- QDomElement kcElem = domDoc.createElement( "kcachegrind" );
+ TQDomElement kcElem = domDoc.createElement( "kcachegrind" );
kcElem.setAttribute( "path", _lastKcExec );
el->appendChild( execElem );
diff --git a/parts/valgrind/valgrind_part.h b/parts/valgrind/valgrind_part.h
index 097eb8f8..6453dd8f 100644
--- a/parts/valgrind/valgrind_part.h
+++ b/parts/valgrind/valgrind_part.h
@@ -5,9 +5,9 @@
#ifndef __KDEVPART_VALGRIND_H__
#define __KDEVPART_VALGRIND_H__
-#include <qguardedptr.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqguardedptr.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdevplugin.h>
class ValgrindWidget;
@@ -18,13 +18,13 @@ class ValgrindPart : public KDevPlugin
Q_OBJECT
public:
- ValgrindPart( QObject *parent, const char *name, const QStringList & );
+ ValgrindPart( TQObject *parent, const char *name, const TQStringList & );
~ValgrindPart();
- void runValgrind( const QString& exec, const QString& parameters, const QString& valExec, const QString& valParameters );
+ void runValgrind( const TQString& exec, const TQString& parameters, const TQString& valExec, const TQString& valParameters );
- void savePartialProjectSession( QDomElement* el );
- void restorePartialProjectSession( const QDomElement* el );
+ void savePartialProjectSession( TQDomElement* el );
+ void restorePartialProjectSession( const TQDomElement* el );
private slots:
void slotExecValgrind();
@@ -39,22 +39,22 @@ private slots:
private:
void getActiveFiles();
- void appendMessage( const QString& message );
- void appendMessages( const QStringList& lines );
- void receivedString( const QString& str );
+ void appendMessage( const TQString& message );
+ void appendMessages( const TQStringList& lines );
+ void receivedString( const TQString& str );
void clear();
- QString _lastExec, _lastParams, _lastValExec, _lastValParams,
+ TQString _lastExec, _lastParams, _lastValExec, _lastValParams,
_lastCtExec, _lastCtParams, _lastKcExec;
KProcess* proc;
- QString currentMessage;
- QString lastPiece;
- QStringList activeFiles;
+ TQString currentMessage;
+ TQString lastPiece;
+ TQStringList activeFiles;
int currentPid;
- QGuardedPtr<ValgrindWidget> m_widget;
+ TQGuardedPtr<ValgrindWidget> m_widget;
struct {
bool runKc;
- QString kcPath;
-// QString kcWorkDir;
+ TQString kcPath;
+// TQString kcWorkDir;
} kcInfo;
};
diff --git a/parts/valgrind/valgrind_widget.cpp b/parts/valgrind/valgrind_widget.cpp
index 356d97bf..39c51094 100644
--- a/parts/valgrind/valgrind_widget.cpp
+++ b/parts/valgrind/valgrind_widget.cpp
@@ -1,6 +1,6 @@
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
#include <kparts/part.h>
#include <klibloader.h>
@@ -24,16 +24,16 @@
class ValListViewItem: public QListViewItem
{
public:
- ValListViewItem( QListView* parent, int key, int pid, const QString& message ):
- QListViewItem( parent, QString::number( key ), QString::number( pid ), message ),
+ ValListViewItem( TQListView* parent, int key, int pid, const TQString& message ):
+ TQListViewItem( parent, TQString::number( key ), TQString::number( pid ), message ),
_key( key ), _pid ( pid ), backtrace( false ), _line( -1 ), _active( false ) {}
- ValListViewItem( ValListViewItem* parent, int key, int pid, const QString& message, const QString& filename, int line, bool active ):
- QListViewItem( parent, QString::number( key ), QString::null, message ),
+ ValListViewItem( ValListViewItem* parent, int key, int pid, const TQString& message, const TQString& filename, int line, bool active ):
+ TQListViewItem( parent, TQString::number( key ), TQString::null, message ),
_key( key ), _pid( pid ), backtrace( true ), _filename( filename ), _line( line ), _active( active )
{
if ( parent->_pid != _pid && _pid > 0 )
- setText( 1, QString::number( _pid ) );
+ setText( 1, TQString::number( _pid ) );
}
virtual ~ValListViewItem();
@@ -48,39 +48,39 @@ public:
return 0;
}
- int compare( QListViewItem* i, int col, bool ascending ) const
+ int compare( TQListViewItem* i, int col, bool ascending ) const
{
if ( !i || i->rtti() != VALLISTVIEWITEMRTTI )
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
switch ( col ) {
case 0 : return intCompare( ((ValListViewItem*)i)->_key, _key );
case 1 : return intCompare( ((ValListViewItem*)i)->_pid, _pid );
- default: return QListViewItem::compare( i, col, ascending );
+ default: return TQListViewItem::compare( i, col, ascending );
}
}
- void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+ void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
if ( _active ) {
- QFont fnt = p->font();
+ TQFont fnt = p->font();
fnt.setBold( true );
p->setFont( fnt );
}
- QListViewItem::paintCell( p, cg, column, width, align );
+ TQListViewItem::paintCell( p, cg, column, width, align );
}
int rtti() const { return VALLISTVIEWITEMRTTI; }
- QString fileName() const { return _filename; }
+ TQString fileName() const { return _filename; }
int line() const { return _line; }
- QString message() const { return text( 2 ); }
+ TQString message() const { return text( 2 ); }
bool isHighlighted() const { return _active; }
private:
int _key;
int _pid;
bool backtrace;
- QString _filename;
+ TQString _filename;
int _line;
bool _active;
};
@@ -88,9 +88,9 @@ private:
ValListViewItem::~ValListViewItem() {}
ValgrindWidget::ValgrindWidget( ValgrindPart *part )
- : QWidget(0, "valgrind widget"), _part( part )
+ : TQWidget(0, "valgrind widget"), _part( part )
{
- QVBoxLayout* vbl = new QVBoxLayout( this );
+ TQVBoxLayout* vbl = new TQVBoxLayout( this );
lv = new KListView( this );
lv->addColumn( i18n( "No." ) );
lv->addColumn( i18n( "Thread" ) );
@@ -100,18 +100,18 @@ ValgrindWidget::ValgrindWidget( ValgrindPart *part )
lv->setAllColumnsShowFocus( true );
vbl->addWidget( lv );
- popup = new QPopupMenu( lv, "valPopup" );
- popup->insertItem( i18n( "&Open Valgrind Output..." ), _part, SLOT(loadOutput()), 0, 0 );
+ popup = new TQPopupMenu( lv, "valPopup" );
+ popup->insertItem( i18n( "&Open Valgrind Output..." ), _part, TQT_SLOT(loadOutput()), 0, 0 );
popup->insertSeparator();
- popup->insertItem( i18n( "Expand All Items" ), this, SLOT(expandAll()), 0, 2 );
- popup->insertItem( i18n( "Collapse All Items" ), this, SLOT(collapseAll()), 0, 3 );
-
- connect( popup, SIGNAL(aboutToShow()),
- this, SLOT(aboutToShowPopup()) );
- connect( lv, SIGNAL(executed(QListViewItem*)),
- this, SLOT(executed(QListViewItem*)) );
- connect( lv, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) );
+ popup->insertItem( i18n( "Expand All Items" ), this, TQT_SLOT(expandAll()), 0, 2 );
+ popup->insertItem( i18n( "Collapse All Items" ), this, TQT_SLOT(collapseAll()), 0, 3 );
+
+ connect( popup, TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(aboutToShowPopup()) );
+ connect( lv, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(executed(TQListViewItem*)) );
+ connect( lv, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
}
@@ -127,8 +127,8 @@ void ValgrindWidget::clear()
void ValgrindWidget::addMessage( const ValgrindItem& vi )
{
- QStringList projectFiles;
- QString projectDirectory;
+ TQStringList projectFiles;
+ TQString projectDirectory;
ValListViewItem* lvi = new ValListViewItem( lv, msgNumber++, vi.pid(), vi.message() );
lvi->setMultiLinesEnabled( true );
@@ -142,7 +142,7 @@ void ValgrindWidget::addMessage( const ValgrindItem& vi )
}
}
-void ValgrindWidget::executed( QListViewItem* lvi )
+void ValgrindWidget::executed( TQListViewItem* lvi )
{
Q_ASSERT( _part );
Q_ASSERT( _part->partController() );
@@ -155,7 +155,7 @@ void ValgrindWidget::executed( QListViewItem* lvi )
vli = (ValListViewItem*)lvi;
} else if ( lvi->isExpandable() ) {
// find the memleak position
- QListViewItemIterator it( lv );
+ TQListViewItemIterator it( lv );
while ( vli == 0 && it.current() ) {
if ( it.current()->rtti() == VALLISTVIEWITEMRTTI && ((ValListViewItem*)it.current())->isHighlighted() )
vli = (ValListViewItem*)it.current();
@@ -171,7 +171,7 @@ void ValgrindWidget::executed( QListViewItem* lvi )
void ValgrindWidget::expandAll()
{
- QListViewItem* child = lv->firstChild();
+ TQListViewItem* child = lv->firstChild();
while ( child ) {
child->setOpen( true );
child = child->nextSibling();
@@ -180,7 +180,7 @@ void ValgrindWidget::expandAll()
void ValgrindWidget::collapseAll()
{
- QListViewItem* child = lv->firstChild();
+ TQListViewItem* child = lv->firstChild();
while ( child ) {
child->setOpen( false );
child = child->nextSibling();
@@ -194,7 +194,7 @@ void ValgrindWidget::aboutToShowPopup()
popup->setItemEnabled( 3, en );
}
-void ValgrindWidget::slotContextMenu( KListView* l, QListViewItem* /*i*/, const QPoint& p )
+void ValgrindWidget::slotContextMenu( KListView* l, TQListViewItem* /*i*/, const TQPoint& p )
{
if ( l != lv )
return;
diff --git a/parts/valgrind/valgrind_widget.h b/parts/valgrind/valgrind_widget.h
index 1777e183..e55e3a1c 100644
--- a/parts/valgrind/valgrind_widget.h
+++ b/parts/valgrind/valgrind_widget.h
@@ -1,9 +1,9 @@
#ifndef __VALGRIND_WIDGET_H__
#define __VALGRIND_WIDGET_H__
-#include <qwidget.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "valgrinditem.h"
@@ -24,11 +24,11 @@ public:
void clear();
signals:
- void jumpToFile( const QString& url, int line );
+ void jumpToFile( const TQString& url, int line );
private slots:
- void executed( QListViewItem* item );
- void slotContextMenu( KListView* l, QListViewItem* i, const QPoint& p );
+ void executed( TQListViewItem* item );
+ void slotContextMenu( KListView* l, TQListViewItem* i, const TQPoint& p );
void expandAll();
void collapseAll();
void aboutToShowPopup();
@@ -37,7 +37,7 @@ private:
KListView* lv;
int msgNumber;
ValgrindPart* _part;
- QPopupMenu* popup;
+ TQPopupMenu* popup;
};
diff --git a/parts/valgrind/valgrinditem.cpp b/parts/valgrind/valgrinditem.cpp
index 318254d3..0ae6f1e0 100644
--- a/parts/valgrind/valgrinditem.cpp
+++ b/parts/valgrind/valgrinditem.cpp
@@ -1,15 +1,15 @@
#include "valgrinditem.h"
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kdebug.h>
-ValgrindBacktraceItem::ValgrindBacktraceItem( const QString& rawOutput ): _rawOutput( rawOutput ), _highlight( false )
+ValgrindBacktraceItem::ValgrindBacktraceItem( const TQString& rawOutput ): _rawOutput( rawOutput ), _highlight( false )
{
- QRegExp re1( "^==(\\d+)==\\s+(by|at) (0x[\\dABCDEF]+): (.*) \\((.*):(\\d+)\\)$" );
- QRegExp re2( "^==(\\d+)==\\s+(by|at) (0x[\\dABCDEF]+): (.*) \\(in (.*)\\)$" );
- QRegExp valRe( "==(\\d+)== (.*)" );
+ TQRegExp re1( "^==(\\d+)==\\s+(by|at) (0x[\\dABCDEF]+): (.*) \\((.*):(\\d+)\\)$" );
+ TQRegExp re2( "^==(\\d+)==\\s+(by|at) (0x[\\dABCDEF]+): (.*) \\(in (.*)\\)$" );
+ TQRegExp valRe( "==(\\d+)== (.*)" );
if ( valRe.search( _rawOutput ) >= 0 )
_message = valRe.cap( 2 );
if ( re1.search( _rawOutput ) >= 0 ) {
@@ -38,13 +38,13 @@ ValgrindBacktraceItem::~ValgrindBacktraceItem()
}
-ValgrindItem::ValgrindItem( const QString& message ): _pid(-1)
+ValgrindItem::ValgrindItem( const TQString& message ): _pid(-1)
{
- QRegExp valRe( "==(\\d+)== (.*)" );
- QStringList lines = QStringList::split( "\n", message );
- QString curMsg;
+ TQRegExp valRe( "==(\\d+)== (.*)" );
+ TQStringList lines = TQStringList::split( "\n", message );
+ TQString curMsg;
- for ( QStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it ) {
if ( valRe.search( *it ) < 0 ) {
kdDebug() << "ValgrindItem: got unrecognizable line '" << *it << "'" << endl;
continue; // not of interest
diff --git a/parts/valgrind/valgrinditem.h b/parts/valgrind/valgrinditem.h
index 12784c42..14e3bb07 100644
--- a/parts/valgrind/valgrinditem.h
+++ b/parts/valgrind/valgrinditem.h
@@ -1,20 +1,20 @@
#ifndef _VALGRINDITEM_H_
#define _VALGRINDITEM_H_
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
class ValgrindBacktraceItem
{
public:
enum Type { Unknown, SourceCode, Library };
- ValgrindBacktraceItem( const QString& rawOutput = QString::null );
+ ValgrindBacktraceItem( const TQString& rawOutput = TQString::null );
~ValgrindBacktraceItem();
- QString message() const { return _message; }
- QString address() const { return _address; }
- QString url() const { return _url; }
- QString function() const { return _function; }
+ TQString message() const { return _message; }
+ TQString address() const { return _address; }
+ TQString url() const { return _url; }
+ TQString function() const { return _function; }
int line() const { return _line; }
int pid() const { return _pid; }
Type type() const { return _type; }
@@ -22,7 +22,7 @@ public:
void setHighlighted( bool h ) { _highlight = h; }
private:
- QString _rawOutput, _address, _url, _function, _message;
+ TQString _rawOutput, _address, _url, _function, _message;
int _line;
int _pid;
Type _type;
@@ -32,18 +32,18 @@ private:
class ValgrindItem
{
public:
- ValgrindItem( const QString& message );
+ ValgrindItem( const TQString& message );
~ValgrindItem();
- typedef QValueList<ValgrindBacktraceItem> BacktraceList;
+ typedef TQValueList<ValgrindBacktraceItem> BacktraceList;
BacktraceList& backtrace() { return _backtrace; }
const BacktraceList& backtrace() const { return _backtrace; }
- QString message() const { return _message; }
+ TQString message() const { return _message; }
int pid() const { return _pid; }
private:
BacktraceList _backtrace;
- QString _message;
+ TQString _message;
int _pid;
};