summaryrefslogtreecommitdiffstats
path: root/src/pdiff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdiff.cpp')
-rw-r--r--src/pdiff.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/pdiff.cpp b/src/pdiff.cpp
index ed1419e..033fd31 100644
--- a/src/pdiff.cpp
+++ b/src/pdiff.cpp
@@ -31,9 +31,9 @@
#include <kstatusbar.h>
#include <kkeydialog.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqscrollbar.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqcheckbox.h>
#include <tqsplitter.h>
#include <tqdir.h>
@@ -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;
@@ -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,7 +420,7 @@ 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() ? TQString("unnamed.txt") : m_outputFilename );
@@ -507,17 +507,17 @@ void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadF
)
{
TQString totalInfo;
- if ( pTotalDiffStatus->bBinaryAEqB && pTotalDiffStatus->bBinaryAEqC )
+ 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() )
@@ -609,14 +609,14 @@ void KDiff3App::sourceMask( int srcMask, int enabledMask )
-// Function uses setMinSize( sizeHint ) before adding the widget.
-// void addWidget(TQBoxLayout* layout, TQWidget* 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)
{
- TQSize s = widget->sizeHint();
+ TQSize s = widget->tqsizeHint();
widget->setMinimumSize( TQSize(max2(s.width(),0),max2(s.height(),0) ) );
- layout->addWidget( widget );
+ tqlayout->addWidget( widget );
}
void KDiff3App::initView()
@@ -1071,7 +1071,7 @@ void KDiff3App::slotFileOpen()
}
void KDiff3App::slotFileOpen2(TQString fn1, TQString fn2, TQString fn3, TQString ofn,
- TQString an1, TQString an2, TQString an3, TotalDiffStatus* pTotalDiffStatus )
+ TQString an1, TQString an2, TQString an3, TotalDifftqStatus* pTotalDifftqStatus )
{
if ( !canContinue() ) return;
@@ -1111,9 +1111,9 @@ void KDiff3App::slotFileOpen2(TQString fn1, TQString fn2, TQString fn3, TQString
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() ||
@@ -1174,7 +1174,7 @@ void KDiff3App::slotEditCut()
if ( !s.isNull() )
{
- TQApplication::clipboard()->setText( s, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard );
}
slotStatusMsg(i18n("Ready."));
@@ -1190,7 +1190,7 @@ void KDiff3App::slotEditCopy()
if ( s.isNull() && m_pMergeResultWindow!=0 ) s = m_pMergeResultWindow->getSelection();
if ( !s.isNull() )
{
- TQApplication::clipboard()->setText( s, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard );
}
slotStatusMsg(i18n("Ready."));
@@ -1208,17 +1208,17 @@ void KDiff3App::slotEditPaste()
{
if ( m_pDiffTextWindow1->hasFocus() )
{
- m_sd1.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
+ m_sd1.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
else if ( m_pDiffTextWindow2->hasFocus() )
{
- m_sd2.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
+ m_sd2.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
else if ( m_pDiffTextWindow3->hasFocus() )
{
- m_sd3.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) );
+ m_sd3.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) );
init();
}
}
@@ -1465,7 +1465,7 @@ void KDiff3App::slotSelectionEnd()
}
else
{
- TQClipboard *clipBoard = TQApplication::clipboard();
+ TQClipboard *clipBoard = TQApplication::tqclipboard();
if (clipBoard->supportsSelection ())
{
@@ -1484,7 +1484,7 @@ void KDiff3App::slotSelectionEnd()
void KDiff3App::slotClipboardChanged()
{
- TQString s = TQApplication::clipboard()->text();
+ TQString s = TQApplication::tqclipboard()->text();
//editPaste->setEnabled(!s.isEmpty());
}
@@ -1969,7 +1969,7 @@ void KDiff3App::slotMergeCurrentFile()
void KDiff3App::slotWinFocusNext()
{
- TQWidget* focus = tqApp->focusWidget();
+ TQWidget* focus = tqApp->tqfocusWidget();
if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() )
{
slotDirViewToggle();
@@ -1999,7 +1999,7 @@ void KDiff3App::slotWinFocusNext()
void KDiff3App::slotWinFocusPrev()
{
- TQWidget* focus = tqApp->focusWidget();
+ TQWidget* focus = tqApp->tqfocusWidget();
if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() )
{
slotDirViewToggle();