summaryrefslogtreecommitdiffstats
path: root/src/pdiff.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
commitf636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch)
tree5365045e6bce685a7cbaeb81b4797a719e86089f /src/pdiff.cpp
parent63862fdfcb61f302ef69e86d40772bb1318d3763 (diff)
downloadkdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz
kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/pdiff.cpp')
-rw-r--r--src/pdiff.cpp442
1 files changed, 221 insertions, 221 deletions
diff --git a/src/pdiff.cpp b/src/pdiff.cpp
index abb26bc..bf9be72 100644
--- a/src/pdiff.cpp
+++ b/src/pdiff.cpp
@@ -23,7 +23,7 @@
#include <iostream>
#include <algorithm>
#include <ctype.h>
-#include <qaccel.h>
+#include <tqaccel.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -31,17 +31,17 @@
#include <kstatusbar.h>
#include <kkeydialog.h>
-#include <qclipboard.h>
-#include <qscrollbar.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qsplitter.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qvbuttongroup.h>
-#include <qdragobject.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqclipboard.h>
+#include <tqscrollbar.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqsplitter.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqvbuttongroup.h>
+#include <tqdragobject.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <assert.h>
#include "kdiff3.h"
@@ -84,7 +84,7 @@ bool KDiff3App::runDiff( const LineData* p1, int size1, const LineData* p2, int
{
GnuDiff::comparison comparisonInput;
memset( &comparisonInput, 0, sizeof(comparisonInput) );
- comparisonInput.parent = 0;
+ comparisonInput.tqparent = 0;
comparisonInput.file[0].buffer = p1[0].pLine;//ptr to buffer
comparisonInput.file[0].buffered = (p1[size1-1].pLine-p1[0].pLine+p1[size1-1].size); // size of buffer
comparisonInput.file[1].buffer = p2[0].pLine;//ptr to buffer
@@ -235,14 +235,14 @@ bool KDiff3App::runDiff( const LineData* p1, int size1, const LineData* p2, int
return true;
}
-void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadFiles )
+void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bLoadFiles )
{
ProgressProxy pp;
// When doing a full analysis in the directory-comparison, then the statistics-results
- // will be stored in the given TotalDiffStatus. Otherwise it will be 0.
- bool bGUI = pTotalDiffStatus == 0;
- if (pTotalDiffStatus==0)
- pTotalDiffStatus = &m_totalDiffStatus;
+ // will be stored in the given TotalDifftqStatus. Otherwise it will be 0.
+ bool bGUI = pTotalDifftqStatus == 0;
+ if (pTotalDifftqStatus==0)
+ pTotalDifftqStatus = &m_totalDifftqStatus;
bool bPreserveCarriageReturn = m_pOptionDialog->m_bPreserveCarriageReturn;
@@ -251,7 +251,7 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
{
bPreserveCarriageReturn = false;
- QString msg;
+ TQString msg;
if ( !m_pOptionDialog->m_PreProcessorCmd.isEmpty() )
{
@@ -310,11 +310,11 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
pp.setMaxNofSteps( 6 ); // 3 comparisons, 3 finediffs
}
- pTotalDiffStatus->reset();
+ pTotalDifftqStatus->reset();
// Run the diff.
if ( m_sd3.isEmpty() )
{
- pTotalDiffStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 );
+ pTotalDifftqStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 );
pp.setInformation(i18n("Diff: A <-> B"));
runDiff( m_sd1.getLineDataForDiff(), m_sd1.getSizeLines(), m_sd2.getLineDataForDiff(), m_sd2.getSizeLines(), m_diffList12,1,2 );
@@ -323,8 +323,8 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
pp.setInformation(i18n("Linediff: A <-> B"));
calcDiff3LineListUsingAB( &m_diffList12, m_diff3LineList );
- fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqB );
- if ( m_sd1.getSizeBytes()==0 ) pTotalDiffStatus->bTextAEqB=false;
+ fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqB );
+ if ( m_sd1.getSizeBytes()==0 ) pTotalDifftqStatus->bTextAEqB=false;
pp.step();
}
@@ -337,9 +337,9 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
pp.step();
}
- pTotalDiffStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 );
- pTotalDiffStatus->bBinaryAEqC = m_sd1.isBinaryEqualWith( m_sd3 );
- pTotalDiffStatus->bBinaryBEqC = m_sd3.isBinaryEqualWith( m_sd2 );
+ pTotalDifftqStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 );
+ pTotalDifftqStatus->bBinaryAEqC = m_sd1.isBinaryEqualWith( m_sd3 );
+ pTotalDifftqStatus->bBinaryBEqC = m_sd3.isBinaryEqualWith( m_sd2 );
pp.setInformation(i18n("Diff: A <-> B"));
runDiff( m_sd1.getLineDataForDiff(), m_sd1.getSizeLines(), m_sd2.getLineDataForDiff(), m_sd2.getSizeLines(), m_diffList12,1,2 );
@@ -364,16 +364,16 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
debugLineCheck( m_diff3LineList, m_sd3.getSizeLines(), 3 );
pp.setInformation(i18n("Linediff: A <-> B"));
- fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqB );
+ fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqB );
pp.step();
pp.setInformation(i18n("Linediff: B <-> C"));
- fineDiff( m_diff3LineList, 2, m_sd2.getLineDataForDisplay(), m_sd3.getLineDataForDisplay(), pTotalDiffStatus->bTextBEqC );
+ fineDiff( m_diff3LineList, 2, m_sd2.getLineDataForDisplay(), m_sd3.getLineDataForDisplay(), pTotalDifftqStatus->bTextBEqC );
pp.step();
pp.setInformation(i18n("Linediff: A <-> C"));
- fineDiff( m_diff3LineList, 3, m_sd3.getLineDataForDisplay(), m_sd1.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqC );
+ fineDiff( m_diff3LineList, 3, m_sd3.getLineDataForDisplay(), m_sd1.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqC );
pp.step();
- if ( m_sd1.getSizeBytes()==0 ) { pTotalDiffStatus->bTextAEqB=false; pTotalDiffStatus->bTextAEqC=false; }
- if ( m_sd2.getSizeBytes()==0 ) { pTotalDiffStatus->bTextAEqB=false; pTotalDiffStatus->bTextBEqC=false; }
+ if ( m_sd1.getSizeBytes()==0 ) { pTotalDifftqStatus->bTextAEqB=false; pTotalDifftqStatus->bTextAEqC=false; }
+ if ( m_sd2.getSizeBytes()==0 ) { pTotalDifftqStatus->bTextAEqB=false; pTotalDifftqStatus->bTextBEqC=false; }
}
m_diffBufferInfo.init( &m_diff3LineList, &m_diff3LineVector,
m_sd1.getLineDataForDiff(), m_sd1.getSizeLines(),
@@ -420,9 +420,9 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
m_sd2.getLineDataForDisplay(), m_sd2.getSizeLines(),
m_bTripleDiff ? m_sd3.getLineDataForDisplay() : 0, m_sd3.getSizeLines(),
&m_diff3LineList,
- pTotalDiffStatus
+ pTotalDifftqStatus
);
- m_pMergeResultWindowTitle->setFileName( m_outputFilename.isEmpty() ? QString("unnamed.txt") : m_outputFilename );
+ m_pMergeResultWindowTitle->setFileName( m_outputFilename.isEmpty() ? TQString("unnamed.txt") : m_outputFilename );
if ( !bGUI )
{
@@ -459,17 +459,17 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
if ( !isPart() )
{
// 1. If the filenames are equal then show only one filename
- QString caption;
- QString a1 = m_sd1.getAliasName();
- QString a2 = m_sd2.getAliasName();
- QString a3 = m_sd3.getAliasName();
- QString f1, f2, f3;
+ TQString caption;
+ TQString a1 = m_sd1.getAliasName();
+ TQString a2 = m_sd2.getAliasName();
+ TQString a3 = m_sd3.getAliasName();
+ TQString f1, f2, f3;
int p1,p2,p3;
- if ( !a1.isEmpty() && (p1=a1.findRev('/'))>=0 )
+ if ( !a1.isEmpty() && (p1=a1.tqfindRev('/'))>=0 )
f1 = a1.mid( p1+1 );
- if ( !a2.isEmpty() && (p2=a2.findRev('/'))>=0 )
+ if ( !a2.isEmpty() && (p2=a2.tqfindRev('/'))>=0 )
f2 = a2.mid( p2+1 );
- if ( !a3.isEmpty() && (p3=a3.findRev('/'))>=0 )
+ if ( !a3.isEmpty() && (p3=a3.tqfindRev('/'))>=0 )
f3 = a3.mid( p3+1 );
if ( !f1.isEmpty() )
{
@@ -488,12 +488,12 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
// 2. If the files don't have the same name then show all names
if ( caption.isEmpty() && (!f1.isEmpty() || !f2.isEmpty() || !f3.isEmpty()) )
{
- caption = ( f1.isEmpty()? QString("") : QString(".../")+f1 );
- caption += QString(caption.isEmpty() || f2.isEmpty() ? "" : " <-> ") + ( f2.isEmpty()? QString("") : QString(".../")+f2 );
- caption += QString(caption.isEmpty() || f3.isEmpty() ? "" : " <-> ") + ( f3.isEmpty()? QString("") : QString(".../")+f3 ) ;
+ caption = ( f1.isEmpty()? TQString("") : TQString(".../")+f1 );
+ caption += TQString(caption.isEmpty() || f2.isEmpty() ? "" : " <-> ") + ( f2.isEmpty()? TQString("") : TQString(".../")+f2 );
+ caption += TQString(caption.isEmpty() || f3.isEmpty() ? "" : " <-> ") + ( f3.isEmpty()? TQString("") : TQString(".../")+f3 ) ;
}
- m_pKDiff3Shell->setCaption( caption.isEmpty() ? QString("KDiff3") : caption+QString(" - KDiff3"));
+ m_pKDiff3Shell->setCaption( caption.isEmpty() ? TQString("KDiff3") : caption+TQString(" - KDiff3"));
}
if ( bLoadFiles )
@@ -506,18 +506,18 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
( m_sd1.isValid() && m_sd2.isValid() && m_sd3.isValid() )
)
{
- QString totalInfo;
- if ( pTotalDiffStatus->bBinaryAEqB && pTotalDiffStatus->bBinaryAEqC )
+ TQString totalInfo;
+ if ( pTotalDifftqStatus->bBinaryAEqB && pTotalDifftqStatus->bBinaryAEqC )
totalInfo += i18n("All input files are binary equal.");
- else if ( pTotalDiffStatus->bTextAEqB && pTotalDiffStatus->bTextAEqC )
+ else if ( pTotalDifftqStatus->bTextAEqB && pTotalDifftqStatus->bTextAEqC )
totalInfo += i18n("All input files contain the same text, but are not binary equal.");
else {
- if ( pTotalDiffStatus->bBinaryAEqB ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).arg("A").arg("B");
- else if ( pTotalDiffStatus->bTextAEqB ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").arg("A").arg("B");
- if ( pTotalDiffStatus->bBinaryAEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).arg("A").arg("C");
- else if ( pTotalDiffStatus->bTextAEqC ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").arg("A").arg("C");
- if ( pTotalDiffStatus->bBinaryBEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).arg("B").arg("C");
- else if ( pTotalDiffStatus->bTextBEqC ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").arg("B").arg("C");
+ if ( pTotalDifftqStatus->bBinaryAEqB ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).tqarg("A").tqarg("B");
+ else if ( pTotalDifftqStatus->bTextAEqB ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").tqarg("A").tqarg("B");
+ if ( pTotalDifftqStatus->bBinaryAEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).tqarg("A").tqarg("C");
+ else if ( pTotalDifftqStatus->bTextAEqC ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").tqarg("A").tqarg("C");
+ if ( pTotalDifftqStatus->bBinaryBEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n" ).tqarg("B").tqarg("C");
+ else if ( pTotalDifftqStatus->bTextBEqC ) totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n").tqarg("B").tqarg("C");
}
if ( !totalInfo.isEmpty() )
@@ -533,7 +533,7 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
}
}
- QTimer::singleShot( 10, this, SLOT(slotAfterFirstPaint()) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(slotAfterFirstPaint()) );
if ( bVisibleMergeResultWindow && m_pMergeResultWindow )
{
@@ -581,7 +581,7 @@ void KDiff3App::scrollDiffTextWindow( int deltaX, int deltaY )
m_pOverview->setRange( m_pDiffVScrollBar->value(), m_pDiffVScrollBar->pageStep() );
}
if ( deltaX!= 0)
- m_pHScrollBar->QScrollBar::setValue( m_pHScrollBar->value() + deltaX );
+ m_pHScrollBar->TQScrollBar::setValue( m_pHScrollBar->value() + deltaX );
}
void KDiff3App::scrollMergeResultWindow( int deltaX, int deltaY )
@@ -609,20 +609,20 @@ void KDiff3App::sourceMask( int srcMask, int enabledMask )
-// Function uses setMinSize( sizeHint ) before adding the widget.
-// void addWidget(QBoxLayout* layout, QWidget* widget);
+// Function uses setMinSize( tqsizeHint ) before adding the widget.
+// void addWidget(TQBoxLayout* tqlayout, TQWidget* widget);
template <class W, class L>
-void addWidget( L* layout, W* widget)
+void addWidget( L* tqlayout, W* widget)
{
- QSize s = widget->sizeHint();
- widget->setMinimumSize( QSize(max2(s.width(),0),max2(s.height(),0) ) );
- layout->addWidget( widget );
+ TQSize s = widget->tqsizeHint();
+ widget->setMinimumSize( TQSize(max2(s.width(),0),max2(s.height(),0) ) );
+ tqlayout->addWidget( widget );
}
void KDiff3App::initView()
{
// set the main widget here
- QValueList<int> oldHeights;
+ TQValueList<int> oldHeights;
if ( m_pDirectoryMergeSplitter->isVisible() )
{
oldHeights = m_pMainSplitter->sizes();
@@ -633,27 +633,27 @@ void KDiff3App::initView()
return;
//delete m_pMainWidget;
}
- m_pMainWidget = new QWidget(m_pMainSplitter);
+ m_pMainWidget = new TQWidget(m_pMainSplitter);
- QVBoxLayout* pVLayout = new QVBoxLayout(m_pMainWidget,0,0);
+ TQVBoxLayout* pVLayout = new TQVBoxLayout(m_pMainWidget,0,0);
- QSplitter* pVSplitter = new QSplitter( m_pMainWidget );
+ TQSplitter* pVSplitter = new TQSplitter( m_pMainWidget );
pVSplitter->setOrientation( Qt::Vertical );
pVLayout->addWidget( pVSplitter );
- QWidget* pDiffWindowFrame = new QWidget( pVSplitter );
- QHBoxLayout* pDiffHLayout = new QHBoxLayout( pDiffWindowFrame,0,0 );
+ TQWidget* pDiffWindowFrame = new TQWidget( pVSplitter );
+ TQHBoxLayout* pDiffHLayout = new TQHBoxLayout( pDiffWindowFrame,0,0 );
- m_pDiffWindowSplitter = new QSplitter( pDiffWindowFrame );
+ m_pDiffWindowSplitter = new TQSplitter( pDiffWindowFrame );
m_pDiffWindowSplitter->setOrientation( m_pOptionDialog->m_bHorizDiffWindowSplitting ? Qt::Horizontal : Qt::Vertical );
pDiffHLayout->addWidget( m_pDiffWindowSplitter );
m_pOverview = new Overview( pDiffWindowFrame, m_pOptionDialog );
pDiffHLayout->addWidget(m_pOverview);
- connect( m_pOverview, SIGNAL(setLine(int)), this, SLOT(setDiff3Line(int)) );
- //connect( m_pOverview, SIGNAL(afterFirstPaint()), this, SLOT(slotAfterFirstPaint()));
+ connect( m_pOverview, TQT_SIGNAL(setLine(int)), this, TQT_SLOT(setDiff3Line(int)) );
+ //connect( m_pOverview, TQT_SIGNAL(afterFirstPaint()), this, TQT_SLOT(slotAfterFirstPaint()));
- m_pDiffVScrollBar = new QScrollBar( Qt::Vertical, pDiffWindowFrame );
+ m_pDiffVScrollBar = new TQScrollBar( Qt::Vertical, pDiffWindowFrame );
pDiffHLayout->addWidget( m_pDiffVScrollBar );
m_pDiffTextWindowFrame1 = new DiffTextWindowFrame( m_pDiffWindowSplitter, statusBar(), m_pOptionDialog, 1 );
@@ -662,15 +662,15 @@ void KDiff3App::initView()
m_pDiffTextWindow1 = m_pDiffTextWindowFrame1->getDiffTextWindow();
m_pDiffTextWindow2 = m_pDiffTextWindowFrame2->getDiffTextWindow();
m_pDiffTextWindow3 = m_pDiffTextWindowFrame3->getDiffTextWindow();
- connect(m_pDiffTextWindowFrame1, SIGNAL(fileNameChanged(const QString&,int)), this, SLOT(slotFileNameChanged(const QString&,int)));
- connect(m_pDiffTextWindowFrame2, SIGNAL(fileNameChanged(const QString&,int)), this, SLOT(slotFileNameChanged(const QString&,int)));
- connect(m_pDiffTextWindowFrame3, SIGNAL(fileNameChanged(const QString&,int)), this, SLOT(slotFileNameChanged(const QString&,int)));
+ connect(m_pDiffTextWindowFrame1, TQT_SIGNAL(fileNameChanged(const TQString&,int)), this, TQT_SLOT(slotFileNameChanged(const TQString&,int)));
+ connect(m_pDiffTextWindowFrame2, TQT_SIGNAL(fileNameChanged(const TQString&,int)), this, TQT_SLOT(slotFileNameChanged(const TQString&,int)));
+ connect(m_pDiffTextWindowFrame3, TQT_SIGNAL(fileNameChanged(const TQString&,int)), this, TQT_SLOT(slotFileNameChanged(const TQString&,int)));
// Merge window
- m_pMergeWindowFrame = new QWidget( pVSplitter );
- QHBoxLayout* pMergeHLayout = new QHBoxLayout( m_pMergeWindowFrame,0,0 );
+ m_pMergeWindowFrame = new TQWidget( pVSplitter );
+ TQHBoxLayout* pMergeHLayout = new TQHBoxLayout( m_pMergeWindowFrame,0,0 );
- QVBoxLayout* pMergeVLayout = new QVBoxLayout();
+ TQVBoxLayout* pMergeVLayout = new TQVBoxLayout();
pMergeHLayout->addLayout( pMergeVLayout, 1 );
m_pMergeResultWindowTitle = new WindowTitleWidget(m_pOptionDialog, m_pMergeWindowFrame);
@@ -679,12 +679,12 @@ void KDiff3App::initView()
m_pMergeResultWindow = new MergeResultWindow( m_pMergeWindowFrame, m_pOptionDialog, statusBar() );
pMergeVLayout->addWidget( m_pMergeResultWindow, 1 );
- m_pMergeVScrollBar = new QScrollBar( Qt::Vertical, m_pMergeWindowFrame );
+ m_pMergeVScrollBar = new TQScrollBar( Qt::Vertical, m_pMergeWindowFrame );
pMergeHLayout->addWidget( m_pMergeVScrollBar );
autoAdvance->setEnabled(true);
- QValueList<int> sizes = pVSplitter->sizes();
+ TQValueList<int> sizes = pVSplitter->sizes();
int total = sizes[0] + sizes[1];
sizes[0]=total/2; sizes[1]=total/2;
pVSplitter->setSizes( sizes );
@@ -692,68 +692,68 @@ void KDiff3App::initView()
m_pMergeResultWindow->installEventFilter( this ); // for Cut/Copy/Paste-shortcuts
m_pMergeResultWindow->installEventFilter( m_pMergeResultWindowTitle ); // for focus tracking
- QHBoxLayout* pHScrollBarLayout = new QHBoxLayout( pVLayout );
+ TQHBoxLayout* pHScrollBarLayout = new TQHBoxLayout( pVLayout );
m_pHScrollBar = new ReversibleScrollBar( Qt::Horizontal, m_pMainWidget, &m_pOptionDialog->m_bRightToLeftLanguage );
pHScrollBarLayout->addWidget( m_pHScrollBar );
- m_pCornerWidget = new QWidget( m_pMainWidget );
+ m_pCornerWidget = new TQWidget( m_pMainWidget );
pHScrollBarLayout->addWidget( m_pCornerWidget );
- connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pOverview, SLOT(setFirstLine(int)));
- connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pDiffTextWindow1, SLOT(setFirstLine(int)));
- connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), m_pDiffTextWindow1, SLOT(setFirstColumn(int)));
- connect( m_pDiffTextWindow1, SIGNAL(newSelection()), this, SLOT(slotSelectionStart()));
- connect( m_pDiffTextWindow1, SIGNAL(selectionEnd()), this, SLOT(slotSelectionEnd()));
- connect( m_pDiffTextWindow1, SIGNAL(scroll(int,int)), this, SLOT(scrollDiffTextWindow(int,int)));
+ connect( m_pDiffVScrollBar, TQT_SIGNAL(valueChanged(int)), m_pOverview, TQT_SLOT(setFirstLine(int)));
+ connect( m_pDiffVScrollBar, TQT_SIGNAL(valueChanged(int)), m_pDiffTextWindow1, TQT_SLOT(setFirstLine(int)));
+ connect( m_pHScrollBar, TQT_SIGNAL(valueChanged2(int)), m_pDiffTextWindow1, TQT_SLOT(setFirstColumn(int)));
+ connect( m_pDiffTextWindow1, TQT_SIGNAL(newSelection()), this, TQT_SLOT(slotSelectionStart()));
+ connect( m_pDiffTextWindow1, TQT_SIGNAL(selectionEnd()), this, TQT_SLOT(slotSelectionEnd()));
+ connect( m_pDiffTextWindow1, TQT_SIGNAL(scroll(int,int)), this, TQT_SLOT(scrollDiffTextWindow(int,int)));
m_pDiffTextWindow1->installEventFilter( this );
- connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pDiffTextWindow2, SLOT(setFirstLine(int)));
- connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), m_pDiffTextWindow2, SLOT(setFirstColumn(int)));
- connect( m_pDiffTextWindow2, SIGNAL(newSelection()), this, SLOT(slotSelectionStart()));
- connect( m_pDiffTextWindow2, SIGNAL(selectionEnd()), this, SLOT(slotSelectionEnd()));
- connect( m_pDiffTextWindow2, SIGNAL(scroll(int,int)), this, SLOT(scrollDiffTextWindow(int,int)));
+ connect( m_pDiffVScrollBar, TQT_SIGNAL(valueChanged(int)), m_pDiffTextWindow2, TQT_SLOT(setFirstLine(int)));
+ connect( m_pHScrollBar, TQT_SIGNAL(valueChanged2(int)), m_pDiffTextWindow2, TQT_SLOT(setFirstColumn(int)));
+ connect( m_pDiffTextWindow2, TQT_SIGNAL(newSelection()), this, TQT_SLOT(slotSelectionStart()));
+ connect( m_pDiffTextWindow2, TQT_SIGNAL(selectionEnd()), this, TQT_SLOT(slotSelectionEnd()));
+ connect( m_pDiffTextWindow2, TQT_SIGNAL(scroll(int,int)), this, TQT_SLOT(scrollDiffTextWindow(int,int)));
m_pDiffTextWindow2->installEventFilter( this );
- connect( m_pDiffVScrollBar, SIGNAL(valueChanged(int)), m_pDiffTextWindow3, SLOT(setFirstLine(int)));
- connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), m_pDiffTextWindow3, SLOT(setFirstColumn(int)));
- connect( m_pDiffTextWindow3, SIGNAL(newSelection()), this, SLOT(slotSelectionStart()));
- connect( m_pDiffTextWindow3, SIGNAL(selectionEnd()), this, SLOT(slotSelectionEnd()));
- connect( m_pDiffTextWindow3, SIGNAL(scroll(int,int)), this, SLOT(scrollDiffTextWindow(int,int)));
+ connect( m_pDiffVScrollBar, TQT_SIGNAL(valueChanged(int)), m_pDiffTextWindow3, TQT_SLOT(setFirstLine(int)));
+ connect( m_pHScrollBar, TQT_SIGNAL(valueChanged2(int)), m_pDiffTextWindow3, TQT_SLOT(setFirstColumn(int)));
+ connect( m_pDiffTextWindow3, TQT_SIGNAL(newSelection()), this, TQT_SLOT(slotSelectionStart()));
+ connect( m_pDiffTextWindow3, TQT_SIGNAL(selectionEnd()), this, TQT_SLOT(slotSelectionEnd()));
+ connect( m_pDiffTextWindow3, TQT_SIGNAL(scroll(int,int)), this, TQT_SLOT(scrollDiffTextWindow(int,int)));
m_pDiffTextWindow3->installEventFilter( this );
MergeResultWindow* p = m_pMergeResultWindow;
- connect( m_pMergeVScrollBar, SIGNAL(valueChanged(int)), p, SLOT(setFirstLine(int)));
-
- connect( m_pHScrollBar, SIGNAL(valueChanged2(int)), p, SLOT(setFirstColumn(int)));
- connect( p, SIGNAL(scroll(int,int)), this, SLOT(scrollMergeResultWindow(int,int)));
- connect( p, SIGNAL(sourceMask(int,int)), this, SLOT(sourceMask(int,int)));
- connect( p, SIGNAL( resizeSignal() ),this, SLOT(resizeMergeResultWindow()));
- connect( p, SIGNAL( selectionEnd() ), this, SLOT( slotSelectionEnd() ) );
- connect( p, SIGNAL( newSelection() ), this, SLOT( slotSelectionStart() ) );
- connect( p, SIGNAL( modifiedChanged(bool) ), this, SLOT( slotOutputModified(bool) ) );
- connect( p, SIGNAL( modifiedChanged(bool) ), m_pMergeResultWindowTitle, SLOT( slotSetModified(bool) ) );
- connect( p, SIGNAL( updateAvailabilities() ), this, SLOT( slotUpdateAvailabilities() ) );
- connect( p, SIGNAL( showPopupMenu(const QPoint&) ), this, SLOT(showPopupMenu(const QPoint&)));
- connect( p, SIGNAL( noRelevantChangesDetected() ), this, SLOT(slotNoRelevantChangesDetected()));
+ connect( m_pMergeVScrollBar, TQT_SIGNAL(valueChanged(int)), p, TQT_SLOT(setFirstLine(int)));
+
+ connect( m_pHScrollBar, TQT_SIGNAL(valueChanged2(int)), p, TQT_SLOT(setFirstColumn(int)));
+ connect( p, TQT_SIGNAL(scroll(int,int)), this, TQT_SLOT(scrollMergeResultWindow(int,int)));
+ connect( p, TQT_SIGNAL(sourceMask(int,int)), this, TQT_SLOT(sourceMask(int,int)));
+ connect( p, TQT_SIGNAL( resizeSignal() ),this, TQT_SLOT(resizeMergeResultWindow()));
+ connect( p, TQT_SIGNAL( selectionEnd() ), this, TQT_SLOT( slotSelectionEnd() ) );
+ connect( p, TQT_SIGNAL( newSelection() ), this, TQT_SLOT( slotSelectionStart() ) );
+ connect( p, TQT_SIGNAL( modifiedChanged(bool) ), this, TQT_SLOT( slotOutputModified(bool) ) );
+ connect( p, TQT_SIGNAL( modifiedChanged(bool) ), m_pMergeResultWindowTitle, TQT_SLOT( slotSetModified(bool) ) );
+ connect( p, TQT_SIGNAL( updateAvailabilities() ), this, TQT_SLOT( slotUpdateAvailabilities() ) );
+ connect( p, TQT_SIGNAL( showPopupMenu(const TQPoint&) ), this, TQT_SLOT(showPopupMenu(const TQPoint&)));
+ connect( p, TQT_SIGNAL( noRelevantChangesDetected() ), this, TQT_SLOT(slotNoRelevantChangesDetected()));
sourceMask(0,0);
- connect( p, SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow1, SLOT(setFastSelectorRange(int,int)));
- connect( p, SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow2, SLOT(setFastSelectorRange(int,int)));
- connect( p, SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow3, SLOT(setFastSelectorRange(int,int)));
- connect(m_pDiffTextWindow1, SIGNAL(setFastSelectorLine(int)), p, SLOT(slotSetFastSelectorLine(int)));
- connect(m_pDiffTextWindow2, SIGNAL(setFastSelectorLine(int)), p, SLOT(slotSetFastSelectorLine(int)));
- connect(m_pDiffTextWindow3, SIGNAL(setFastSelectorLine(int)), p, SLOT(slotSetFastSelectorLine(int)));
- connect(m_pDiffTextWindow1, SIGNAL(gotFocus()), p, SLOT(updateSourceMask()));
- connect(m_pDiffTextWindow2, SIGNAL(gotFocus()), p, SLOT(updateSourceMask()));
- connect(m_pDiffTextWindow3, SIGNAL(gotFocus()), p, SLOT(updateSourceMask()));
- connect(m_pDirectoryMergeInfo, SIGNAL(gotFocus()), p, SLOT(updateSourceMask()));
+ connect( p, TQT_SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow1, TQT_SLOT(setFastSelectorRange(int,int)));
+ connect( p, TQT_SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow2, TQT_SLOT(setFastSelectorRange(int,int)));
+ connect( p, TQT_SIGNAL(setFastSelectorRange(int,int)), m_pDiffTextWindow3, TQT_SLOT(setFastSelectorRange(int,int)));
+ connect(m_pDiffTextWindow1, TQT_SIGNAL(setFastSelectorLine(int)), p, TQT_SLOT(slotSetFastSelectorLine(int)));
+ connect(m_pDiffTextWindow2, TQT_SIGNAL(setFastSelectorLine(int)), p, TQT_SLOT(slotSetFastSelectorLine(int)));
+ connect(m_pDiffTextWindow3, TQT_SIGNAL(setFastSelectorLine(int)), p, TQT_SLOT(slotSetFastSelectorLine(int)));
+ connect(m_pDiffTextWindow1, TQT_SIGNAL(gotFocus()), p, TQT_SLOT(updateSourceMask()));
+ connect(m_pDiffTextWindow2, TQT_SIGNAL(gotFocus()), p, TQT_SLOT(updateSourceMask()));
+ connect(m_pDiffTextWindow3, TQT_SIGNAL(gotFocus()), p, TQT_SLOT(updateSourceMask()));
+ connect(m_pDirectoryMergeInfo, TQT_SIGNAL(gotFocus()), p, TQT_SLOT(updateSourceMask()));
- connect( m_pDiffTextWindow1, SIGNAL( resizeSignal(int,int) ),this, SLOT(resizeDiffTextWindow(int,int)));
+ connect( m_pDiffTextWindow1, TQT_SIGNAL( resizeSignal(int,int) ),this, TQT_SLOT(resizeDiffTextWindow(int,int)));
// The following two connects cause the wordwrap to be recalced thrice, just to make sure. Better than forgetting one.
- connect( m_pDiffTextWindow2, SIGNAL( resizeSignal(int,int) ),this, SLOT(slotRecalcWordWrap()));
- connect( m_pDiffTextWindow3, SIGNAL( resizeSignal(int,int) ),this, SLOT(slotRecalcWordWrap()));
+ connect( m_pDiffTextWindow2, TQT_SIGNAL( resizeSignal(int,int) ),this, TQT_SLOT(slotRecalcWordWrap()));
+ connect( m_pDiffTextWindow3, TQT_SIGNAL( resizeSignal(int,int) ),this, TQT_SLOT(slotRecalcWordWrap()));
m_pDiffTextWindow1->setFocus();
m_pMainWidget->setMinimumSize(50,50);
@@ -827,51 +827,51 @@ void KDiff3App::slotAfterFirstPaint()
slotUpdateAvailabilities();
}
-void KDiff3App::resizeEvent(QResizeEvent* e)
+void KDiff3App::resizeEvent(TQResizeEvent* e)
{
- QSplitter::resizeEvent(e);
+ TQSplitter::resizeEvent(e);
if (m_pCornerWidget)
m_pCornerWidget->setFixedSize( m_pDiffVScrollBar->width(), m_pHScrollBar->height() );
}
-bool KDiff3App::eventFilter( QObject* o, QEvent* e )
+bool KDiff3App::eventFilter( TQObject* o, TQEvent* e )
{
- if( o == m_pMergeResultWindow )
+ if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pMergeResultWindow) )
{
- if ( e->type() == QEvent::KeyPress )
+ if ( e->type() == TQEvent::KeyPress )
{ // key press
- QKeyEvent *k = (QKeyEvent*)e;
- if (k->key()==Qt::Key_Insert && (k->state() & Qt::ControlButton)!=0 )
+ TQKeyEvent *k = (TQKeyEvent*)e;
+ if (k->key()==TQt::Key_Insert && (k->state() & TQt::ControlButton)!=0 )
{
slotEditCopy();
return true;
}
- if (k->key()==Qt::Key_Insert && (k->state() & Qt::ShiftButton)!=0 )
+ if (k->key()==TQt::Key_Insert && (k->state() & TQt::ShiftButton)!=0 )
{
slotEditPaste();
return true;
}
- if (k->key()==Qt::Key_Delete && (k->state() & Qt::ShiftButton)!=0 )
+ if (k->key()==TQt::Key_Delete && (k->state() & TQt::ShiftButton)!=0 )
{
slotEditCut();
return true;
}
}
- return QSplitter::eventFilter( o, e ); // standard event processing
+ return TQSplitter::eventFilter( o, e ); // standard event processing
}
- if ( e->type() == QEvent::KeyPress ) // key press
+ if ( e->type() == TQEvent::KeyPress ) // key press
{
- QKeyEvent *k = (QKeyEvent*)e;
+ TQKeyEvent *k = (TQKeyEvent*)e;
- bool bCtrl = (k->state() & Qt::ControlButton) != 0;
- if (k->key()==Qt::Key_Insert && bCtrl )
+ bool bCtrl = (k->state() & TQt::ControlButton) != 0;
+ if (k->key()==TQt::Key_Insert && bCtrl )
{
slotEditCopy();
return true;
}
- if (k->key()==Qt::Key_Insert && (k->state() & Qt::ShiftButton)!=0 )
+ if (k->key()==TQt::Key_Insert && (k->state() & TQt::ShiftButton)!=0 )
{
slotEditPaste();
return true;
@@ -881,18 +881,18 @@ bool KDiff3App::eventFilter( QObject* o, QEvent* e )
int pageSize = m_DTWHeight;
switch( k->key() )
{
- case Qt::Key_Down: if (!bCtrl)
+ case TQt::Key_Down: if (!bCtrl)
++deltaY;
break;
- case Qt::Key_Up: if (!bCtrl) --deltaY; break;
- case Qt::Key_PageDown: if (!bCtrl) deltaY+=pageSize; break;
- case Qt::Key_PageUp: if (!bCtrl) deltaY-=pageSize; break;
- case Qt::Key_Left: if (!bCtrl) --deltaX; break;
- case Qt::Key_Right: if (!bCtrl) ++deltaX; break;
- case Qt::Key_Home: if ( bCtrl ) m_pDiffVScrollBar->setValue( 0 );
+ case TQt::Key_Up: if (!bCtrl) --deltaY; break;
+ case TQt::Key_PageDown: if (!bCtrl) deltaY+=pageSize; break;
+ case TQt::Key_PageUp: if (!bCtrl) deltaY-=pageSize; break;
+ case TQt::Key_Left: if (!bCtrl) --deltaX; break;
+ case TQt::Key_Right: if (!bCtrl) ++deltaX; break;
+ case TQt::Key_Home: if ( bCtrl ) m_pDiffVScrollBar->setValue( 0 );
else m_pHScrollBar->setValue( 0 );
break;
- case Qt::Key_End: if ( bCtrl ) m_pDiffVScrollBar->setValue( m_pDiffVScrollBar->maxValue() );
+ case TQt::Key_End: if ( bCtrl ) m_pDiffVScrollBar->setValue( m_pDiffVScrollBar->maxValue() );
else m_pHScrollBar->setValue( m_pHScrollBar->maxValue() );
break;
default: break;
@@ -902,36 +902,36 @@ bool KDiff3App::eventFilter( QObject* o, QEvent* e )
return true; // eat event
}
- else if (e->type() == QEvent::Wheel ) // wheel event
+ else if (e->type() == TQEvent::Wheel ) // wheel event
{
- QWheelEvent *w = (QWheelEvent*)e;
+ TQWheelEvent *w = (TQWheelEvent*)e;
w->accept();
int deltaX=0;
int d=w->delta();
- int deltaY = -d/120 * QApplication::wheelScrollLines();
+ int deltaY = -d/120 * TQApplication::wheelScrollLines();
scrollDiffTextWindow( deltaX, deltaY );
return true;
}
- else if (e->type() == QEvent::Drop )
+ else if (e->type() == TQEvent::Drop )
{
- QDropEvent* pDropEvent = static_cast<QDropEvent*>(e);
+ TQDropEvent* pDropEvent = static_cast<TQDropEvent*>(e);
pDropEvent->accept();
- if ( QUriDrag::canDecode(pDropEvent) )
+ if ( TQUriDrag::canDecode(pDropEvent) )
{
#ifdef KREPLACEMENTS_H
- QStringList stringList;
- QUriDrag::decodeLocalFiles( pDropEvent, stringList );
+ TQStringList stringList;
+ TQUriDrag::decodeLocalFiles( pDropEvent, stringList );
if ( canContinue() && !stringList.isEmpty() )
{
raise();
- QString filename = stringList.first();
- if ( o == m_pDiffTextWindow1 ) m_sd1.setFilename( filename );
- else if ( o == m_pDiffTextWindow2 ) m_sd2.setFilename( filename );
- else if ( o == m_pDiffTextWindow3 ) m_sd3.setFilename( filename );
+ TQString filename = stringList.first();
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow1) ) m_sd1.setFilename( filename );
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow2) ) m_sd2.setFilename( filename );
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow3) ) m_sd3.setFilename( filename );
init();
}
#else
@@ -941,30 +941,30 @@ bool KDiff3App::eventFilter( QObject* o, QEvent* e )
{
raise();
FileAccess fa( urlList.first().url() );
- if ( o == m_pDiffTextWindow1 ) m_sd1.setFileAccess( fa );
- else if ( o == m_pDiffTextWindow2 ) m_sd2.setFileAccess( fa );
- else if ( o == m_pDiffTextWindow3 ) m_sd3.setFileAccess( fa );
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow1) ) m_sd1.setFileAccess( fa );
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow2) ) m_sd2.setFileAccess( fa );
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow3) ) m_sd3.setFileAccess( fa );
init();
}
#endif
}
- else if ( QTextDrag::canDecode(pDropEvent) )
+ else if ( TQTextDrag::canDecode(pDropEvent) )
{
- QString text;
- bool bDecodeSuccess = QTextDrag::decode( pDropEvent, text );
+ TQString text;
+ bool bDecodeSuccess = TQTextDrag::decode( pDropEvent, text );
if ( bDecodeSuccess && canContinue() )
{
raise();
- if ( o == m_pDiffTextWindow1 ) m_sd1.setData(text);
- else if ( o == m_pDiffTextWindow2 ) m_sd2.setData(text);
- else if ( o == m_pDiffTextWindow3 ) m_sd3.setData(text);
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow1) ) m_sd1.setData(text);
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow2) ) m_sd2.setData(text);
+ else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_pDiffTextWindow3) ) m_sd3.setData(text);
init();
}
}
return true;
}
- return QSplitter::eventFilter( o, e ); // standard event processing
+ return TQSplitter::eventFilter( o, e ); // standard event processing
}
@@ -990,22 +990,22 @@ void KDiff3App::slotFileOpen()
{
OpenDialog d(this,
- QDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameA() : m_sd1.isFromBuffer() ? QString("") : m_sd1.getAliasName() ),
- QDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameB() : m_sd2.isFromBuffer() ? QString("") : m_sd2.getAliasName() ),
- QDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameC() : m_sd3.isFromBuffer() ? QString("") : m_sd3.getAliasName() ),
+ TQDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameA() : m_sd1.isFromBuffer() ? TQString("") : m_sd1.getAliasName() ),
+ TQDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameB() : m_sd2.isFromBuffer() ? TQString("") : m_sd2.getAliasName() ),
+ TQDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameC() : m_sd3.isFromBuffer() ? TQString("") : m_sd3.getAliasName() ),
m_bDirCompare ? ! m_pDirectoryMergeWindow->getDirNameDest().isEmpty() : !m_outputFilename.isEmpty(),
- QDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameDest() : m_bDefaultFilename ? QString("") : m_outputFilename ),
- SLOT(slotConfigure()), m_pOptionDialog );
+ TQDir::convertSeparators( m_bDirCompare ? m_pDirectoryMergeWindow->getDirNameDest() : m_bDefaultFilename ? TQString("") : m_outputFilename ),
+ TQT_SLOT(slotConfigure()), m_pOptionDialog );
/*OpenDialog d(this,
- m_sd1.isFromBuffer() ? QString("") : m_sd1.getAliasName(),
- m_sd2.isFromBuffer() ? QString("") : m_sd2.getAliasName(),
- m_sd3.isFromBuffer() ? QString("") : m_sd3.getAliasName(),
+ m_sd1.isFromBuffer() ? TQString("") : m_sd1.getAliasName(),
+ m_sd2.isFromBuffer() ? TQString("") : m_sd2.getAliasName(),
+ m_sd3.isFromBuffer() ? TQString("") : m_sd3.getAliasName(),
!m_outputFilename.isEmpty(),
- m_bDefaultFilename ? QString("") : m_outputFilename,
- SLOT(slotConfigure()), m_pOptionDialog );*/
+ m_bDefaultFilename ? TQString("") : m_outputFilename,
+ TQT_SLOT(slotConfigure()), m_pOptionDialog );*/
int status = d.exec();
- if ( status == QDialog::Accepted )
+ if ( status == TQDialog::Accepted )
{
m_sd1.setFilename( d.m_pLineA->currentText() );
m_sd2.setFilename( d.m_pLineB->currentText() );
@@ -1049,7 +1049,7 @@ void KDiff3App::slotFileOpen()
! m_sd2.isEmpty() && !m_sd2.hasData() ||
! m_sd3.isEmpty() && !m_sd3.hasData() )
{
- QString text( i18n("Opening of these files failed:") );
+ TQString text( i18n("Opening of these files failed:") );
text += "\n\n";
if ( ! m_sd1.isEmpty() && !m_sd1.hasData() )
text += " - " + m_sd1.getAliasName() + "\n";
@@ -1070,8 +1070,8 @@ void KDiff3App::slotFileOpen()
slotStatusMsg(i18n("Ready."));
}
-void KDiff3App::slotFileOpen2(QString fn1, QString fn2, QString fn3, QString ofn,
- QString an1, QString an2, QString an3, TotalDiffStatus* pTotalDiffStatus )
+void KDiff3App::slotFileOpen2(TQString fn1, TQString fn2, TQString fn3, TQString ofn,
+ TQString an1, TQString an2, TQString an3, TotalDifftqStatus* pTotalDifftqStatus )
{
if ( !canContinue() ) return;
@@ -1111,16 +1111,16 @@ void KDiff3App::slotFileOpen2(QString fn1, QString fn2, QString fn3, QString ofn
else
{
m_bDirCompare = bDirCompare; // Don't allow this to change here.
- init( false, pTotalDiffStatus );
+ init( false, pTotalDifftqStatus );
- if ( pTotalDiffStatus!=0 )
+ if ( pTotalDifftqStatus!=0 )
return;
if ( ! m_sd1.isEmpty() && ! m_sd1.hasData() ||
! m_sd2.isEmpty() && ! m_sd2.hasData() ||
! m_sd3.isEmpty() && ! m_sd3.hasData() )
{
- QString text( i18n("Opening of these files failed:") );
+ TQString text( i18n("Opening of these files failed:") );
text += "\n\n";
if ( ! m_sd1.isEmpty() && !m_sd1.hasData() )
text += " - " + m_sd1.getAliasName() + "\n";
@@ -1143,14 +1143,14 @@ void KDiff3App::slotFileOpen2(QString fn1, QString fn2, QString fn3, QString ofn
}
-void KDiff3App::slotFileNameChanged(const QString& fileName, int winIdx)
+void KDiff3App::slotFileNameChanged(const TQString& fileName, int winIdx)
{
- QString fn1 = m_sd1.getFilename();
- QString an1 = m_sd1.getAliasName();
- QString fn2 = m_sd2.getFilename();
- QString an2 = m_sd2.getAliasName();
- QString fn3 = m_sd3.getFilename();
- QString an3 = m_sd3.getAliasName();
+ TQString fn1 = m_sd1.getFilename();
+ TQString an1 = m_sd1.getAliasName();
+ TQString fn2 = m_sd2.getFilename();
+ TQString an2 = m_sd2.getAliasName();
+ TQString fn3 = m_sd3.getFilename();
+ TQString an3 = m_sd3.getAliasName();
if (winIdx==1) { fn1 = fileName; an1 = ""; }
if (winIdx==2) { fn2 = fileName; an2 = ""; }
if (winIdx==3) { fn3 = fileName; an3 = ""; }
@@ -1163,7 +1163,7 @@ void KDiff3App::slotEditCut()
{
slotStatusMsg(i18n("Cutting selection..."));
- QString s;
+ TQString s;
if ( m_pMergeResultWindow!=0 )
{
s = m_pMergeResultWindow->getSelection();
@@ -1174,7 +1174,7 @@ void KDiff3App::slotEditCut()
if ( !s.isNull() )
{
- QApplication::clipboard()->setText( s, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard );
}
slotStatusMsg(i18n("Ready."));
@@ -1183,14 +1183,14 @@ void KDiff3App::slotEditCut()
void KDiff3App::slotEditCopy()
{
slotStatusMsg(i18n("Copying selection to clipboard..."));
- QString s;
+ TQString s;
if ( m_pDiffTextWindow1!=0 ) s = m_pDiffTextWindow1->getSelection();
if ( s.isNull() && m_pDiffTextWindow2!=0 ) s = m_pDiffTextWindow2->getSelection();
if ( s.isNull() && m_pDiffTextWindow3!=0 ) s = m_pDiffTextWindow3->getSelection();
if ( s.isNull() && m_pMergeResultWindow!=0 ) s = m_pMergeResultWindow->getSelection();
if ( !s.isNull() )
{
- QApplication::clipboard()->setText( s, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard );
}
slotStatusMsg(i18n("Ready."));
@@ -1208,17 +1208,17 @@ void KDiff3App::slotEditPaste()
{
if ( m_pDiffTextWindow1->hasFocus() )
{
- m_sd1.setData( QApplication::clipboard()->text(QClipboard::Clipboard) );
+ m_sd1.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
else if ( m_pDiffTextWindow2->hasFocus() )
{
- m_sd2.setData( QApplication::clipboard()->text(QClipboard::Clipboard) );
+ m_sd2.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
else if ( m_pDiffTextWindow3->hasFocus() )
{
- m_sd3.setData( QApplication::clipboard()->text(QClipboard::Clipboard) );
+ m_sd3.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
}
@@ -1296,7 +1296,7 @@ void KDiff3App::choose( int choice )
if ( autoAdvance->isChecked() )
{
m_bTimerBlock = true;
- QTimer::singleShot( m_pOptionDialog->m_autoAdvanceDelay, this, SLOT( slotGoNextUnsolvedConflict() ) );
+ TQTimer::singleShot( m_pOptionDialog->m_autoAdvanceDelay, this, TQT_SLOT( slotGoNextUnsolvedConflict() ) );
}
}
}
@@ -1396,7 +1396,7 @@ void KDiff3App::slotJoinDiffs()
void KDiff3App::slotConfigure()
{
m_pOptionDialog->setState();
- m_pOptionDialog->incInitialSize ( QSize(0,40) );
+ m_pOptionDialog->incInitialSize ( TQSize(0,40) );
m_pOptionDialog->exec();
slotRefresh();
}
@@ -1447,16 +1447,16 @@ void KDiff3App::slotSelectionStart()
//editCopy->setEnabled( false );
//editCut->setEnabled( false );
- const QObject* s = sender();
- if (m_pDiffTextWindow1 && s!=m_pDiffTextWindow1) m_pDiffTextWindow1->resetSelection();
- if (m_pDiffTextWindow2 && s!=m_pDiffTextWindow2) m_pDiffTextWindow2->resetSelection();
- if (m_pDiffTextWindow3 && s!=m_pDiffTextWindow3) m_pDiffTextWindow3->resetSelection();
- if (m_pMergeResultWindow && s!=m_pMergeResultWindow) m_pMergeResultWindow->resetSelection();
+ const TQObject* s = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
+ if (m_pDiffTextWindow1 && TQT_BASE_OBJECT_CONST(s)!=TQT_BASE_OBJECT(m_pDiffTextWindow1)) m_pDiffTextWindow1->resetSelection();
+ if (m_pDiffTextWindow2 && TQT_BASE_OBJECT_CONST(s)!=TQT_BASE_OBJECT(m_pDiffTextWindow2)) m_pDiffTextWindow2->resetSelection();
+ if (m_pDiffTextWindow3 && TQT_BASE_OBJECT_CONST(s)!=TQT_BASE_OBJECT(m_pDiffTextWindow3)) m_pDiffTextWindow3->resetSelection();
+ if (m_pMergeResultWindow && TQT_BASE_OBJECT_CONST(s)!=TQT_BASE_OBJECT(m_pMergeResultWindow)) m_pMergeResultWindow->resetSelection();
}
void KDiff3App::slotSelectionEnd()
{
- //const QObject* s = sender();
+ //const TQObject* s = sender();
//editCopy->setEnabled(true);
//editCut->setEnabled( s==m_pMergeResultWindow );
if ( m_pOptionDialog->m_bAutoCopySelection )
@@ -1465,18 +1465,18 @@ void KDiff3App::slotSelectionEnd()
}
else
{
- QClipboard *clipBoard = QApplication::clipboard();
+ TQClipboard *clipBoard = TQApplication::tqclipboard();
if (clipBoard->supportsSelection ())
{
- QString s;
+ TQString s;
if ( m_pDiffTextWindow1!=0 ) s = m_pDiffTextWindow1->getSelection();
if ( s.isNull() && m_pDiffTextWindow2!=0 ) s = m_pDiffTextWindow2->getSelection();
if ( s.isNull() && m_pDiffTextWindow3!=0 ) s = m_pDiffTextWindow3->getSelection();
if ( s.isNull() && m_pMergeResultWindow!=0 ) s = m_pMergeResultWindow->getSelection();
if ( !s.isNull() )
{
- clipBoard->setText( s, QClipboard::Selection );
+ clipBoard->setText( s, TQClipboard::Selection );
}
}
}
@@ -1484,7 +1484,7 @@ void KDiff3App::slotSelectionEnd()
void KDiff3App::slotClipboardChanged()
{
- QString s = QApplication::clipboard()->text();
+ TQString s = TQApplication::tqclipboard()->text();
//editPaste->setEnabled(!s.isEmpty());
}
@@ -1832,7 +1832,7 @@ void KDiff3App::slotEditFind()
m_pFindDialog->currentPos = 0;
m_pFindDialog->currentWindow = 1;
- if ( QDialog::Accepted == m_pFindDialog->exec() )
+ if ( TQDialog::Accepted == m_pFindDialog->exec() )
{
slotEditFindNext();
}
@@ -1840,7 +1840,7 @@ void KDiff3App::slotEditFind()
void KDiff3App::slotEditFindNext()
{
- QString s = m_pFindDialog->m_pSearchString->text();
+ TQString s = m_pFindDialog->m_pSearchString->text();
if ( s.isEmpty() )
{
slotEditFind();
@@ -1969,13 +1969,13 @@ void KDiff3App::slotMergeCurrentFile()
void KDiff3App::slotWinFocusNext()
{
- QWidget* focus = qApp->focusWidget();
+ TQWidget* focus = tqApp->tqfocusWidget();
if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() )
{
slotDirViewToggle();
}
- std::list<QWidget*> visibleWidgetList;
+ std::list<TQWidget*> visibleWidgetList;
if ( m_pDiffTextWindow1 && m_pDiffTextWindow1->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow1);
if ( m_pDiffTextWindow2 && m_pDiffTextWindow2->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow2);
if ( m_pDiffTextWindow3 && m_pDiffTextWindow3->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow3);
@@ -1983,7 +1983,7 @@ void KDiff3App::slotWinFocusNext()
if ( m_bDirCompare /*m_pDirectoryMergeWindow->isVisible()*/ ) visibleWidgetList.push_back(m_pDirectoryMergeWindow);
//if ( m_pDirectoryMergeInfo->isVisible() ) visibleWidgetList.push_back(m_pDirectoryMergeInfo->getInfoList());
- std::list<QWidget*>::iterator i = std::find( visibleWidgetList.begin(), visibleWidgetList.end(), focus);
+ std::list<TQWidget*>::iterator i = std::find( visibleWidgetList.begin(), visibleWidgetList.end(), focus);
++i;
if ( i==visibleWidgetList.end() )
i = visibleWidgetList.begin();
@@ -1999,13 +1999,13 @@ void KDiff3App::slotWinFocusNext()
void KDiff3App::slotWinFocusPrev()
{
- QWidget* focus = qApp->focusWidget();
+ TQWidget* focus = tqApp->tqfocusWidget();
if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() )
{
slotDirViewToggle();
}
- std::list<QWidget*> visibleWidgetList;
+ std::list<TQWidget*> visibleWidgetList;
if ( m_pDiffTextWindow1 && m_pDiffTextWindow1->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow1);
if ( m_pDiffTextWindow2 && m_pDiffTextWindow2->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow2);
if ( m_pDiffTextWindow3 && m_pDiffTextWindow3->isVisible() ) visibleWidgetList.push_back(m_pDiffTextWindow3);
@@ -2013,7 +2013,7 @@ void KDiff3App::slotWinFocusPrev()
if (m_bDirCompare /* m_pDirectoryMergeWindow->isVisible() */ ) visibleWidgetList.push_back(m_pDirectoryMergeWindow);
//if ( m_pDirectoryMergeInfo->isVisible() ) visibleWidgetList.push_back(m_pDirectoryMergeInfo->getInfoList());
- std::list<QWidget*>::iterator i = std::find( visibleWidgetList.begin(), visibleWidgetList.end(), focus);
+ std::list<TQWidget*>::iterator i = std::find( visibleWidgetList.begin(), visibleWidgetList.end(), focus);
if ( i==visibleWidgetList.begin() )
i=visibleWidgetList.end();
--i;
@@ -2074,7 +2074,7 @@ void KDiff3App::slotNoRelevantChangesDetected()
//KMessageBox::information( this, "No relevant changes detected", "KDiff3" );
if (!m_pOptionDialog->m_IrrelevantMergeCmd.isEmpty())
{
- QString cmd = m_pOptionDialog->m_IrrelevantMergeCmd + " \"" + m_sd1.getAliasName()+ "\" \"" + m_sd2.getAliasName() + "\" \"" + m_sd3.getAliasName();
+ TQString cmd = m_pOptionDialog->m_IrrelevantMergeCmd + " \"" + m_sd1.getAliasName()+ "\" \"" + m_sd2.getAliasName() + "\" \"" + m_sd3.getAliasName();
::system( cmd.local8Bit() );
}
}