summaryrefslogtreecommitdiffstats
path: root/parts/diff/diffpart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /parts/diff/diffpart.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/diff/diffpart.cpp')
-rw-r--r--parts/diff/diffpart.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/parts/diff/diffpart.cpp b/parts/diff/diffpart.cpp
index 8f04b060..fab596ad 100644
--- a/parts/diff/diffpart.cpp
+++ b/parts/diff/diffpart.cpp
@@ -12,8 +12,8 @@
#include <sys/stat.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kdevgenericfactory.h>
@@ -41,7 +41,7 @@ static const KDevPluginInfo data("kdevdiff");
typedef KDevGenericFactory<DiffPart> DiffFactory;
K_EXPORT_COMPONENT_FACTORY( libkdevdiff, DiffFactory( data ) )
-DiffPart::DiffPart(QObject *parent, const char *name, const QStringList &)
+DiffPart::DiffPart(TQObject *parent, const char *name, const TQStringList &)
: KDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0)
{
setInstance(DiffFactory::instance());
@@ -49,22 +49,22 @@ DiffPart::DiffPart(QObject *parent, const char *name, const QStringList &)
diffWidget = new DiffWidget(this, 0, "diffWidget");
diffWidget->setIcon( SmallIcon("editcopy") );
- QString nm( i18n( "Diff" ) );
+ TQString nm( i18n( "Diff" ) );
diffWidget->setCaption( i18n( "Diff Output" ) );
- QWhatsThis::add(diffWidget, i18n("<b>Difference viewer</b><p>Shows output of the diff format. "
+ TQWhatsThis::add(diffWidget, i18n("<b>Difference viewer</b><p>Shows output of the diff format. "
"Can utilize every installed component that is able to show diff output. "
"For example if you have Kompare installed, Difference Viewer can use its graphical diff view."));
mainWindow()->embedOutputView( diffWidget, nm, i18n("Output of the diff command") );
mainWindow()->setViewAvailable( diffWidget, false );
KAction *action = new KAction( i18n("Difference Viewer..."), 0,
- this, SLOT(slotExecDiff()),
+ this, TQT_SLOT(slotExecDiff()),
actionCollection(), "tools_diff" );
action->setToolTip(i18n("Difference viewer"));
action->setWhatsThis(i18n("<b>Difference viewer</b><p>Shows the contents of a patch file."));
- connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
- this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
+ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
+ this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) );
}
static bool urlIsEqual(const KURL &a, const KURL &b)
@@ -73,8 +73,8 @@ static bool urlIsEqual(const KURL &a, const KURL &b)
{
struct stat aStat, bStat;
- if ((::stat(QFile::encodeName(a.fileName()), &aStat) == 0)
- && (::stat(QFile::encodeName(b.fileName()), &bStat) == 0))
+ if ((::stat(TQFile::encodeName(a.fileName()), &aStat) == 0)
+ && (::stat(TQFile::encodeName(b.fileName()), &bStat) == 0))
{
return (aStat.st_dev == bStat.st_dev) && (aStat.st_ino == bStat.st_ino);
}
@@ -87,7 +87,7 @@ static KParts::ReadWritePart* partForURL(const KURL &url, KDevPartController* pc
{
if ( !pc )
return 0;
- QPtrListIterator<KParts::Part> it(*(pc->parts()));
+ TQPtrListIterator<KParts::Part> it(*(pc->parts()));
for ( ; it.current(); ++it)
{
KParts::ReadWritePart *rw_part = dynamic_cast<KParts::ReadWritePart*>(it.current());
@@ -98,7 +98,7 @@ static KParts::ReadWritePart* partForURL(const KURL &url, KDevPartController* pc
return 0;
}
-void DiffPart::contextMenu( QPopupMenu* popup, const Context* context )
+void DiffPart::contextMenu( TQPopupMenu* popup, const Context* context )
{
if ( context->hasType( Context::EditorContext ) )
{
@@ -121,7 +121,7 @@ void DiffPart::contextMenu( QPopupMenu* popup, const Context* context )
if ( partController()->documentState( rw_part->url() ) != Clean )
{
int id = popup->insertItem( i18n( "Difference to Disk File" ),
- this, SLOT(localDiff()) );
+ this, TQT_SLOT(localDiff()) );
popup->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 = QString::null;
+ resultBuffer = resultErr = TQString::null;
delete proc;
proc = new KProcess();
@@ -155,14 +155,14 @@ void DiffPart::localDiff()
*proc << "-u" << popupFile.path() << "-";
proc->setWorkingDirectory( popupFile.directory() );
- connect( proc, SIGNAL(processExited( KProcess* )),
- this, SLOT(processExited( KProcess* )) );
- 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(wroteStdin( KProcess* )),
- this, SLOT(wroteStdin( KProcess* )) );
+ connect( proc, TQT_SIGNAL(processExited( KProcess* )),
+ this, TQT_SLOT(processExited( KProcess* )) );
+ 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(wroteStdin( KProcess* )),
+ this, TQT_SLOT(wroteStdin( KProcess* )) );
if ( !proc->start( KProcess::NotifyOnExit, KProcess::All ) ) {
KMessageBox::error( 0, i18n( "Could not invoke the \"diff\" command." ) );
@@ -184,20 +184,20 @@ void DiffPart::processExited( KProcess* p )
} else {
KMessageBox::error( 0, i18n("Diff command failed (%1):\n").arg( p->exitStatus() ) + resultErr );
}
- resultBuffer = resultErr = QString::null;
+ resultBuffer = resultErr = TQString::null;
delete proc;
proc = 0;
}
void DiffPart::receivedStdout( KProcess* /* p */, char* buf, int buflen )
{
- resultBuffer += QString::fromLocal8Bit( buf, buflen );
+ resultBuffer += TQString::fromLocal8Bit( buf, buflen );
}
void DiffPart::receivedStderr( KProcess* /* p */, char* buf, int buflen )
{
- kdDebug(9033) << "received Stderr: " << QString::fromLocal8Bit( buf, buflen ) << endl;
- resultErr += QString::fromLocal8Bit( buf, buflen );
+ kdDebug(9033) << "received Stderr: " << TQString::fromLocal8Bit( buf, buflen ) << endl;
+ resultErr += TQString::fromLocal8Bit( buf, buflen );
}
void DiffPart::wroteStdin( KProcess* p )
@@ -220,7 +220,7 @@ void DiffPart::openURL( const KURL& url )
*/
}
-void DiffPart::showDiff( const QString& diff )
+void DiffPart::showDiff( const TQString& diff )
{
diffWidget->slotClear();
diffWidget->setDiff( diff );
@@ -237,7 +237,7 @@ void DiffPart::showDiff( const QString& diff )
void DiffPart::slotExecDiff()
{
- KURL url = KFileDialog::getOpenURL( QString::null, QString::null, 0, i18n("Please Select Patch File") );
+ KURL url = KFileDialog::getOpenURL( TQString::null, TQString::null, 0, i18n("Please Select Patch File") );
if ( url.isEmpty() )
return;