summaryrefslogtreecommitdiffstats
path: root/parts/valgrind
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/valgrind
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/valgrind')
-rw-r--r--parts/valgrind/dialog_widget.ui68
-rw-r--r--parts/valgrind/dialog_widget.ui.h2
-rw-r--r--parts/valgrind/valgrind_dialog.cpp32
-rw-r--r--parts/valgrind/valgrind_dialog.h3
-rw-r--r--parts/valgrind/valgrind_part.cpp24
-rw-r--r--parts/valgrind/valgrind_part.h3
-rw-r--r--parts/valgrind/valgrind_widget.cpp12
-rw-r--r--parts/valgrind/valgrind_widget.h3
-rw-r--r--parts/valgrind/valgrinditem.h2
9 files changed, 76 insertions, 73 deletions
diff --git a/parts/valgrind/dialog_widget.ui b/parts/valgrind/dialog_widget.ui
index 35ded9c1..3bdd854c 100644
--- a/parts/valgrind/dialog_widget.ui
+++ b/parts/valgrind/dialog_widget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>DialogWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>DialogWidget</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -32,7 +32,7 @@
<cstring>executableEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -43,7 +43,7 @@
<cstring>paramEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -61,11 +61,11 @@
</widget>
</grid>
</widget>
- <widget class="QWidgetStack" row="1" column="0">
+ <widget class="TQWidgetStack" row="1" column="0">
<property name="name">
<cstring>stack</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
@@ -79,7 +79,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -90,7 +90,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>memleakBox</cstring>
</property>
@@ -101,9 +101,9 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -122,14 +122,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>reachableBox</cstring>
</property>
@@ -139,17 +139,17 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
- <cstring>childrenBox</cstring>
+ <cstring>tqchildrenBox</cstring>
</property>
<property name="text">
- <string>&amp;Trace children</string>
+ <string>&amp;Trace tqchildren</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
@@ -158,7 +158,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -179,7 +179,7 @@
<cstring>valExecutableEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -196,7 +196,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
@@ -210,7 +210,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -221,9 +221,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout3_2</cstring>
+ <cstring>tqlayout3_2</cstring>
</property>
<grid>
<property name="name">
@@ -232,7 +232,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel5_2</cstring>
</property>
@@ -253,7 +253,7 @@
<cstring>ctExecutableEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -266,17 +266,17 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>ctChildrenBox</cstring>
</property>
<property name="text">
- <string>&amp;Trace children</string>
+ <string>&amp;Trace tqchildren</string>
</property>
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@@ -292,7 +292,7 @@
<cstring>kcExecutableEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4_2_2</cstring>
</property>
@@ -323,7 +323,7 @@
<tabstop>paramEdit</tabstop>
<tabstop>memleakBox</tabstop>
<tabstop>reachableBox</tabstop>
- <tabstop>childrenBox</tabstop>
+ <tabstop>tqchildrenBox</tabstop>
<tabstop>valExecutableEdit</tabstop>
<tabstop>valParamEdit</tabstop>
<tabstop>ctChildrenBox</tabstop>
@@ -334,12 +334,12 @@
<includes>
<include location="global" impldecl="in implementation">kdialog.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot access="private" specifier="non virtual">checkBoxToggled()</slot>
<slot>init()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/parts/valgrind/dialog_widget.ui.h b/parts/valgrind/dialog_widget.ui.h
index 9a2570ae..70f1d5f8 100644
--- a/parts/valgrind/dialog_widget.ui.h
+++ b/parts/valgrind/dialog_widget.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
diff --git a/parts/valgrind/valgrind_dialog.cpp b/parts/valgrind/valgrind_dialog.cpp
index 67c05c56..247eaee1 100644
--- a/parts/valgrind/valgrind_dialog.cpp
+++ b/parts/valgrind/valgrind_dialog.cpp
@@ -16,8 +16,8 @@
#include "valgrind_dialog.moc"
-ValgrindDialog::ValgrindDialog( Type type, TQWidget* parent )
- : KDialogBase( parent, "valgrind dialog", true, i18n("Valgrind Memory Check"), Ok|Cancel ),
+ValgrindDialog::ValgrindDialog( Type type, TQWidget* tqparent )
+ : KDialogBase( tqparent, "valgrind dialog", true, i18n("Valgrind Memory Check"), Ok|Cancel ),
m_type(type)
{
w = new DialogWidget( this );
@@ -89,7 +89,7 @@ void ValgrindDialog::setValExecutable( const TQString& ve )
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" );
+static const TQString tqchildrenParam( "--trace-tqchildren=yes" );
TQString ValgrindDialog::valParams() const
{
@@ -100,8 +100,8 @@ TQString ValgrindDialog::valParams() const
params += " " + leakCheckParam;
if ( w->reachableBox->isChecked() )
params += " " + reachableParam;
- if ( w->childrenBox->isChecked() )
- params += " " + childrenParam;
+ if ( w->tqchildrenBox->isChecked() )
+ params += " " + tqchildrenParam;
return params;
}
@@ -109,18 +109,18 @@ TQString ValgrindDialog::valParams() const
void ValgrindDialog::setValParams( const TQString& params )
{
TQString myParams = params;
- if ( myParams.contains( leakCheckParam ) )
+ if ( myParams.tqcontains( leakCheckParam ) )
w->memleakBox->setChecked( true );
- if ( myParams.contains( reachableParam ) )
+ if ( myParams.tqcontains( reachableParam ) )
w->reachableBox->setChecked( true );
- if ( myParams.contains( childrenParam ) )
- w->childrenBox->setChecked( true );
+ if ( myParams.tqcontains( tqchildrenParam ) )
+ w->tqchildrenBox->setChecked( true );
w->init();
- myParams = myParams.replace( TQRegExp( memCheckParam ), "" );
- myParams = myParams.replace( TQRegExp( leakCheckParam ), "" );
- myParams = myParams.replace( TQRegExp( reachableParam ), "" );
- myParams = myParams.replace( TQRegExp( childrenParam ), "" );
+ myParams = myParams.tqreplace( TQRegExp( memCheckParam ), "" );
+ myParams = myParams.tqreplace( TQRegExp( leakCheckParam ), "" );
+ myParams = myParams.tqreplace( TQRegExp( reachableParam ), "" );
+ myParams = myParams.tqreplace( TQRegExp( tqchildrenParam ), "" );
myParams = myParams.stripWhiteSpace();
w->valParamEdit->setText( myParams );
}
@@ -150,7 +150,7 @@ TQString ValgrindDialog::ctParams() const
{
TQString params = w->ctParamEdit->text();
if ( w->ctChildrenBox->isChecked() )
- params += " " + childrenParam;
+ params += " " + tqchildrenParam;
return params;
}
@@ -161,11 +161,11 @@ void ValgrindDialog::setCtParams( const TQString& params )
//force --tool=callgrind if no params are given
if (myParams.isEmpty())
myParams = "--tool=callgrind";
- if ( myParams.contains( childrenParam ) )
+ if ( myParams.tqcontains( tqchildrenParam ) )
w->ctChildrenBox->setChecked( true );
w->init();
- myParams = myParams.replace( TQRegExp( childrenParam ), "" );
+ myParams = myParams.tqreplace( TQRegExp( tqchildrenParam ), "" );
myParams = myParams.stripWhiteSpace();
w->ctParamEdit->setText( myParams );
}
diff --git a/parts/valgrind/valgrind_dialog.h b/parts/valgrind/valgrind_dialog.h
index a57d4529..d3422b80 100644
--- a/parts/valgrind/valgrind_dialog.h
+++ b/parts/valgrind/valgrind_dialog.h
@@ -14,10 +14,11 @@ class DialogWidget;
class ValgrindDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Memcheck = 0, Calltree = 1 };
- ValgrindDialog( Type type, TQWidget* parent = 0 );
+ ValgrindDialog( Type type, TQWidget* tqparent = 0 );
~ValgrindDialog();
// the app to check
diff --git a/parts/valgrind/valgrind_part.cpp b/parts/valgrind/valgrind_part.cpp
index 801d1c2a..064129cf 100644
--- a/parts/valgrind/valgrind_part.cpp
+++ b/parts/valgrind/valgrind_part.cpp
@@ -26,8 +26,8 @@ typedef KDevGenericFactory<ValgrindPart> ValgrindFactory;
static const KDevPluginInfo data("kdevvalgrind");
K_EXPORT_COMPONENT_FACTORY( libkdevvalgrind, ValgrindFactory( data ) )
-ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringList& )
- : KDevPlugin( &data, parent, name ? name : "ValgrindPart" )
+ValgrindPart::ValgrindPart( TQObject *tqparent, const char *name, const TQStringList& )
+ : KDevPlugin( &data, tqparent, name ? name : "ValgrindPart" )
{
setInstance( ValgrindFactory::instance() );
setXMLFile( "kdevpart_valgrind.rc" );
@@ -87,13 +87,13 @@ void ValgrindPart::projectOpened()
void ValgrindPart::loadOutput()
{
- TQString fName = KFileDialog::getOpenFileName(TQString::null, "*", 0, i18n("Open Valgrind Output"));
+ TQString fName = KFileDialog::getOpenFileName(TQString(), "*", 0, i18n("Open Valgrind Output"));
if ( fName.isEmpty() )
return;
TQFile f( fName );
if ( !f.open( IO_ReadOnly ) ) {
- KMessageBox::sorry( 0, i18n("Could not open valgrind output: %1").arg(fName) );
+ KMessageBox::sorry( 0, i18n("Could not open valgrind output: %1").tqarg(fName) );
return;
}
@@ -206,9 +206,9 @@ void ValgrindPart::slotStopButtonClicked( KDevPlugin* which )
void ValgrindPart::clear()
{
m_widget->clear();
- currentMessage = TQString::null;
+ currentMessage = TQString();
currentPid = -1;
- lastPiece = TQString::null;
+ lastPiece = TQString();
}
void ValgrindPart::runValgrind( const TQString& exec, const TQString& params, const TQString& valExec, const TQString& valParams )
@@ -234,7 +234,7 @@ void ValgrindPart::runValgrind( const TQString& exec, const TQString& params, co
DomUtil::PairList::ConstIterator it;
for (it = run_envvars.begin(); it != run_envvars.end(); ++it)
{
- envVarList << TQString("%1=\"%2\" ").arg((*it).first).arg((*it).second);
+ envVarList << TQString("%1=\"%2\" ").tqarg((*it).first).tqarg((*it).second);
}
*proc << envVarList.join("") << valExec << valParams << exec << params;
@@ -269,7 +269,7 @@ void ValgrindPart::receivedString( const TQString& str )
lastPiece = lines.back();
lines.pop_back();
} else {
- lastPiece = TQString::null;
+ lastPiece = TQString();
}
appendMessages( lines );
}
@@ -286,7 +286,7 @@ void ValgrindPart::appendMessages( const TQStringList& lines )
if ( valRe.cap( 2 ).isEmpty() ) {
appendMessage( currentMessage );
- currentMessage = TQString::null;
+ currentMessage = TQString();
} else if ( cPid != currentPid ) {
appendMessage( currentMessage );
currentMessage = *it;
@@ -303,8 +303,8 @@ void ValgrindPart::processExited( KProcess* p )
{
if ( p == proc ) {
appendMessage( currentMessage + lastPiece );
- currentMessage = TQString::null;
- lastPiece = TQString::null;
+ currentMessage = TQString();
+ lastPiece = TQString();
core()->running( this, false );
if (kcInfo.runKc)
@@ -312,7 +312,7 @@ void ValgrindPart::processExited( KProcess* p )
KProcess *kcProc = new KProcess;
// kcProc->setWorkingDirectory(kcInfo.kcWorkDir);
*kcProc << kcInfo.kcPath;
- *kcProc << TQString("callgrind.out.%1").arg(p->pid());
+ *kcProc << TQString("callgrind.out.%1").tqarg(p->pid());
kcProc->start(KProcess::DontCare);
}
}
diff --git a/parts/valgrind/valgrind_part.h b/parts/valgrind/valgrind_part.h
index 6453dd8f..f7e3a4cf 100644
--- a/parts/valgrind/valgrind_part.h
+++ b/parts/valgrind/valgrind_part.h
@@ -16,9 +16,10 @@ class KProcess;
class ValgrindPart : public KDevPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ValgrindPart( TQObject *parent, const char *name, const TQStringList & );
+ ValgrindPart( TQObject *tqparent, const char *name, const TQStringList & );
~ValgrindPart();
void runValgrind( const TQString& exec, const TQString& parameters, const TQString& valExec, const TQString& valParameters );
diff --git a/parts/valgrind/valgrind_widget.cpp b/parts/valgrind/valgrind_widget.cpp
index 39c51094..00eca21e 100644
--- a/parts/valgrind/valgrind_widget.cpp
+++ b/parts/valgrind/valgrind_widget.cpp
@@ -21,18 +21,18 @@
#define VALLISTVIEWITEMRTTI 130977
// helper class to sort the ListView by item number instead of the string representation of the item number
-class ValListViewItem: public QListViewItem
+class ValListViewItem: public TQListViewItem
{
public:
- ValListViewItem( TQListView* parent, int key, int pid, const TQString& message ):
- TQListViewItem( parent, TQString::number( key ), TQString::number( pid ), message ),
+ ValListViewItem( TQListView* tqparent, int key, int pid, const TQString& message ):
+ TQListViewItem( tqparent, 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 TQString& message, const TQString& filename, int line, bool active ):
- TQListViewItem( parent, TQString::number( key ), TQString::null, message ),
+ ValListViewItem( ValListViewItem* tqparent, int key, int pid, const TQString& message, const TQString& filename, int line, bool active ):
+ TQListViewItem( tqparent, TQString::number( key ), TQString(), message ),
_key( key ), _pid( pid ), backtrace( true ), _filename( filename ), _line( line ), _active( active )
{
- if ( parent->_pid != _pid && _pid > 0 )
+ if ( tqparent->_pid != _pid && _pid > 0 )
setText( 1, TQString::number( _pid ) );
}
diff --git a/parts/valgrind/valgrind_widget.h b/parts/valgrind/valgrind_widget.h
index 8f75e7e4..ab9c1a22 100644
--- a/parts/valgrind/valgrind_widget.h
+++ b/parts/valgrind/valgrind_widget.h
@@ -12,9 +12,10 @@ class KListView;
class TQListViewItem;
class TQPopupMenu;
-class ValgrindWidget : public QWidget
+class ValgrindWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
ValgrindWidget( ValgrindPart *part );
diff --git a/parts/valgrind/valgrinditem.h b/parts/valgrind/valgrinditem.h
index 14e3bb07..d2093910 100644
--- a/parts/valgrind/valgrinditem.h
+++ b/parts/valgrind/valgrinditem.h
@@ -8,7 +8,7 @@ class ValgrindBacktraceItem
{
public:
enum Type { Unknown, SourceCode, Library };
- ValgrindBacktraceItem( const TQString& rawOutput = TQString::null );
+ ValgrindBacktraceItem( const TQString& rawOutput = TQString() );
~ValgrindBacktraceItem();
TQString message() const { return _message; }