summaryrefslogtreecommitdiffstats
path: root/parts/diff
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/diff
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/diff')
-rw-r--r--parts/diff/diffdlg.cpp8
-rw-r--r--parts/diff/diffdlg.h3
-rw-r--r--parts/diff/diffpart.cpp16
-rw-r--r--parts/diff/diffpart.h3
-rw-r--r--parts/diff/diffwidget.cpp18
-rw-r--r--parts/diff/diffwidget.h10
6 files changed, 31 insertions, 27 deletions
diff --git a/parts/diff/diffdlg.cpp b/parts/diff/diffdlg.cpp
index e5a8c74d..aba0f07f 100644
--- a/parts/diff/diffdlg.cpp
+++ b/parts/diff/diffdlg.cpp
@@ -16,14 +16,14 @@
#include "diffdlg.h"
#include "diffwidget.h"
-DiffDlg::DiffDlg( TQWidget *parent, const char *name ):
- KDialogBase( parent, name, true, i18n("Difference Viewer"), Ok )
+DiffDlg::DiffDlg( TQWidget *tqparent, const char *name ):
+ KDialogBase( tqparent, name, true, i18n("Difference Viewer"), Ok )
{
diffWidget = new DiffWidget( this, "Main Diff Widget" );
setMainWidget( diffWidget );
- TQVBoxLayout* layout = new TQVBoxLayout( this, 0, spacingHint() );
- layout->addWidget( diffWidget );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0, spacingHint() );
+ tqlayout->addWidget( diffWidget );
}
DiffDlg::~DiffDlg()
diff --git a/parts/diff/diffdlg.h b/parts/diff/diffdlg.h
index a25a3957..574ffaef 100644
--- a/parts/diff/diffdlg.h
+++ b/parts/diff/diffdlg.h
@@ -20,9 +20,10 @@ class DiffWidget;
class DiffDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiffDlg( TQWidget *parent = 0, const char *name = 0 );
+ DiffDlg( TQWidget *tqparent = 0, const char *name = 0 );
virtual ~DiffDlg();
public slots:
diff --git a/parts/diff/diffpart.cpp b/parts/diff/diffpart.cpp
index fab596ad..f6495932 100644
--- a/parts/diff/diffpart.cpp
+++ b/parts/diff/diffpart.cpp
@@ -41,8 +41,8 @@ static const KDevPluginInfo data("kdevdiff");
typedef KDevGenericFactory<DiffPart> DiffFactory;
K_EXPORT_COMPONENT_FACTORY( libkdevdiff, DiffFactory( data ) )
-DiffPart::DiffPart(TQObject *parent, const char *name, const TQStringList &)
- : KDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0)
+DiffPart::DiffPart(TQObject *tqparent, const char *name, const TQStringList &)
+ : KDevDiffFrontend(&data, tqparent, name ? name : "DiffPart"), proc(0)
{
setInstance(DiffFactory::instance());
setXMLFile("kdevdiff.rc");
@@ -122,7 +122,7 @@ void DiffPart::contextMenu( TQPopupMenu* popup, const Context* context )
{
int id = popup->insertItem( i18n( "Difference to Disk File" ),
this, TQT_SLOT(localDiff()) );
- popup->setWhatsThis(id, i18n("<b>Difference to disk file</b><p>Shows the difference between "
+ popup->TQMenuData::setWhatsThis(id, i18n("<b>Difference to disk file</b><p>Shows the difference between "
"the file contents in this editor and the file contents on disk."));
}
}
@@ -146,7 +146,7 @@ void DiffPart::localDiff()
if ( !editIface )
return;
buffer = editIface->text().local8Bit();
- resultBuffer = resultErr = TQString::null;
+ resultBuffer = resultErr = TQString();
delete proc;
proc = new KProcess();
@@ -182,9 +182,9 @@ void DiffPart::processExited( KProcess* p )
else
showDiff( resultBuffer );
} else {
- KMessageBox::error( 0, i18n("Diff command failed (%1):\n").arg( p->exitStatus() ) + resultErr );
+ KMessageBox::error( 0, i18n("Diff command failed (%1):\n").tqarg( p->exitStatus() ) + resultErr );
}
- resultBuffer = resultErr = TQString::null;
+ resultBuffer = resultErr = TQString();
delete proc;
proc = 0;
}
@@ -196,7 +196,7 @@ void DiffPart::receivedStdout( KProcess* /* p */, char* buf, int buflen )
void DiffPart::receivedStderr( KProcess* /* p */, char* buf, int buflen )
{
- kdDebug(9033) << "received Stderr: " << TQString::fromLocal8Bit( buf, buflen ) << endl;
+ kdDebug(9033) << "received Stderr: " << TQString::fromLocal8Bit( buf, buflen ).data() << endl;
resultErr += TQString::fromLocal8Bit( buf, buflen );
}
@@ -237,7 +237,7 @@ void DiffPart::showDiff( const TQString& diff )
void DiffPart::slotExecDiff()
{
- KURL url = KFileDialog::getOpenURL( TQString::null, TQString::null, 0, i18n("Please Select Patch File") );
+ KURL url = KFileDialog::getOpenURL( TQString(), TQString(), 0, i18n("Please Select Patch File") );
if ( url.isEmpty() )
return;
diff --git a/parts/diff/diffpart.h b/parts/diff/diffpart.h
index 0162f40c..6cbd8b28 100644
--- a/parts/diff/diffpart.h
+++ b/parts/diff/diffpart.h
@@ -27,9 +27,10 @@ class TQCString;
class DiffPart : public KDevDiffFrontend
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiffPart( TQObject *parent, const char *name, const TQStringList & );
+ DiffPart( TQObject *tqparent, const char *name, const TQStringList & );
virtual ~DiffPart();
void openURL( const KURL& url );
diff --git a/parts/diff/diffwidget.cpp b/parts/diff/diffwidget.cpp
index 7d403e46..21e7709f 100644
--- a/parts/diff/diffwidget.cpp
+++ b/parts/diff/diffwidget.cpp
@@ -42,7 +42,7 @@ static const int POPUP_BASE = 130977;
TQStringList KDiffTextEdit::extParts;
TQStringList KDiffTextEdit::extPartsTranslated;
-KDiffTextEdit::KDiffTextEdit( TQWidget* parent, const char* name ): TQTextEdit( parent, name )
+KDiffTextEdit::KDiffTextEdit( TQWidget* tqparent, const char* name ): TQTextEdit( tqparent, name )
{
KConfig* config = kapp->config();
config->setGroup( "Diff" );
@@ -73,7 +73,7 @@ TQPopupMenu* KDiffTextEdit::createPopupMenu( const TQPoint& p )
int i = 0;
for ( TQStringList::Iterator it = extPartsTranslated.begin(); it != extPartsTranslated.end(); ++it ) {
- popup->insertItem( i18n( "Show in %1" ).arg( *it ), i + POPUP_BASE, i );
+ popup->insertItem( i18n( "Show in %1" ).tqarg( *it ), i + POPUP_BASE, i );
i++;
}
if ( !extPartsTranslated.isEmpty() )
@@ -90,7 +90,7 @@ TQPopupMenu* KDiffTextEdit::createPopupMenu( const TQPoint& p )
popup->insertSeparator( 3 );
popup->insertSeparator();
- popup->insertItem( i18n("Hide view"), parent(), TQT_SLOT(hideView()) );
+ popup->insertItem( i18n("Hide view"), tqparent(), TQT_SLOT(hideView()) );
return popup;
}
@@ -180,8 +180,8 @@ void KDiffTextEdit::popupActivated( int id )
emit externalPartRequested( extParts[ id ] );
}
-DiffWidget::DiffWidget( DiffPart * part, TQWidget *parent, const char *name, WFlags f ):
- TQWidget( parent, name, f ), m_part( part ), tempFile( 0 )
+DiffWidget::DiffWidget( DiffPart * part, TQWidget *tqparent, const char *name, WFlags f ):
+ TQWidget( tqparent, name, f ), m_part( part ), tempFile( 0 )
{
job = 0;
extPart = 0;
@@ -192,8 +192,8 @@ DiffWidget::DiffWidget( DiffPart * part, TQWidget *parent, const char *name, WFl
// te->setMinimumSize( 300, 200 );
connect( te, TQT_SIGNAL(externalPartRequested(const TQString&)), this, TQT_SLOT(loadExtPart(const TQString&)) );
- TQVBoxLayout* layout = new TQVBoxLayout( this );
- layout->addWidget( te );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( te );
}
DiffWidget::~DiffWidget()
@@ -229,11 +229,11 @@ void DiffWidget::loadExtPart( const TQString& partName )
if ( !extService )
return;
- extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, this, 0 );
+ extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, TQT_TQOBJECT(this), 0 );
if ( !extPart || !extPart->widget() )
return;
- layout()->add( extPart->widget() );
+ tqlayout()->add( extPart->widget() );
setExtPartVisible( true );
diff --git a/parts/diff/diffwidget.h b/parts/diff/diffwidget.h
index dc8568c2..638073d0 100644
--- a/parts/diff/diffwidget.h
+++ b/parts/diff/diffwidget.h
@@ -30,11 +30,12 @@ namespace KParts {
}
// Helper class that displays a modified RMB popup menu
-class KDiffTextEdit: public QTextEdit
+class KDiffTextEdit: public TQTextEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KDiffTextEdit( TQWidget* parent = 0, const char* name = 0 );
+ KDiffTextEdit( TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KDiffTextEdit();
void applySyntaxHighlight();
void clearSyntaxHighlight();
@@ -58,12 +59,13 @@ private:
bool _highlight;
};
-class DiffWidget : public QWidget
+class DiffWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiffWidget( DiffPart * part, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ DiffWidget( DiffPart * part, TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0 );
virtual ~DiffWidget();
public slots: