diff options
-rwxr-xr-x | kdiff3plugin/kdiff3plugin.cpp | 6 | ||||
-rw-r--r-- | src/common.cpp | 2 | ||||
-rw-r--r-- | src/diff.cpp | 28 | ||||
-rw-r--r-- | src/diff.h | 8 | ||||
-rw-r--r-- | src/difftextwindow.cpp | 12 | ||||
-rw-r--r-- | src/directorymergewindow.cpp | 78 | ||||
-rw-r--r-- | src/directorymergewindow.h | 8 | ||||
-rw-r--r-- | src/fileaccess.cpp | 84 | ||||
-rw-r--r-- | src/gnudiff_diff.h | 2 | ||||
-rw-r--r-- | src/gnudiff_io.cpp | 8 | ||||
-rw-r--r-- | src/kdiff3.cpp | 22 | ||||
-rw-r--r-- | src/kdiff3.h | 8 | ||||
-rw-r--r-- | src/kdiff3_part.cpp | 2 | ||||
-rw-r--r-- | src/kreplacements/kreplacements.cpp | 8 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/mergeresultwindow.cpp | 64 | ||||
-rw-r--r-- | src/mergeresultwindow.h | 4 | ||||
-rw-r--r-- | src/optiondialog.cpp | 6 | ||||
-rw-r--r-- | src/optiondialog.h | 2 | ||||
-rw-r--r-- | src/pdiff.cpp | 90 | ||||
-rw-r--r-- | src/smalldialogs.cpp | 48 |
21 files changed, 247 insertions, 247 deletions
diff --git a/kdiff3plugin/kdiff3plugin.cpp b/kdiff3plugin/kdiff3plugin.cpp index 53360b6..ec008f1 100755 --- a/kdiff3plugin/kdiff3plugin.cpp +++ b/kdiff3plugin/kdiff3plugin.cpp @@ -101,17 +101,17 @@ KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const T if(m_list.count() == 1) { int historyCount = s_pHistory ? s_pHistory->count() : 0; - s = i18n("Compare with %1").tqarg( historyCount>0 ? s_pHistory->front() : TQString() ); + s = i18n("Compare with %1").arg( historyCount>0 ? s_pHistory->front() : TQString() ); pAction = new KAction ( s,0, this, TQT_SLOT(slotCompareWith()), actionCollection()); pAction->setEnabled( m_list.count()>0 && historyCount>0 ); pActionMenu->insert (pAction); - s = i18n("Merge with %1").tqarg( historyCount>0 ? s_pHistory->front() : TQString() ); + s = i18n("Merge with %1").arg( historyCount>0 ? s_pHistory->front() : TQString() ); pAction = new KAction( s, 0, this, TQT_SLOT(slotMergeWith()), actionCollection()); pAction->setEnabled( m_list.count()>0 && historyCount>0 ); pActionMenu->insert (pAction); - s = i18n("Save '%1' for later").tqarg( ( m_list.front() ) ); + s = i18n("Save '%1' for later").arg( ( m_list.front() ) ); pAction = new KAction ( s, 0, this, TQT_SLOT(slotSaveForLater()), actionCollection()); pAction->setEnabled( m_list.count()>0 ); pActionMenu->insert(pAction); diff --git a/src/common.cpp b/src/common.cpp index 0a1952e..79f27ed 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -25,7 +25,7 @@ #include <tqsize.h> #include <tqpoint.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> ValueMap::ValueMap() { diff --git a/src/diff.cpp b/src/diff.cpp index 136275c..28dfb4a 100644 --- a/src/diff.cpp +++ b/src/diff.cpp @@ -27,7 +27,7 @@ #include <klocale.h> #include <tqfileinfo.h> #include <tqdir.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <map> #include <assert.h> @@ -492,7 +492,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic KMessageBox::error(m_pOptionDialog, i18n("Preprocessing possibly failed. Check this command:\n\n %1" "\n\nThe preprocessing command will be disabled now." - ).tqarg(cmd) ); + ).arg(cmd) ); m_pOptionDialog->m_PreProcessorCmd = ""; m_normalData.readFile( fileNameIn1 ); pEncoding1 = m_pEncoding; @@ -527,7 +527,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic KMessageBox::error(m_pOptionDialog, i18n("The line-matching-preprocessing possibly failed. Check this command:\n\n %1" "\n\nThe line-matching-preprocessing command will be disabled now." - ).tqarg(cmd) ); + ).arg(cmd) ); m_pOptionDialog->m_LineMatchingPreProcessorCmd = ""; m_lmppData.readFile( fileNameIn2 ); } @@ -557,7 +557,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic m_lmppData.m_v.resize( m_normalData.m_vSize ); for(int i=m_lmppData.m_vSize; i<m_normalData.m_vSize; ++i ) { // Set all empty lines to point to the end of the buffer. - m_lmppData.m_v[i].pLine = m_lmppData.m_tqunicodeBuf.tqunicode()+m_lmppData.m_tqunicodeBuf.length(); + m_lmppData.m_v[i].pLine = m_lmppData.m_unicodeBuf.unicode()+m_lmppData.m_unicodeBuf.length(); } m_lmppData.m_vSize = m_normalData.m_vSize; @@ -567,8 +567,8 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic if ( m_pOptionDialog->m_bIgnoreCase ) { int i; - TQChar* pBuf = const_cast<TQChar*>(m_lmppData.m_tqunicodeBuf.tqunicode()); - int ucSize = m_lmppData.m_tqunicodeBuf.length(); + TQChar* pBuf = const_cast<TQChar*>(m_lmppData.m_unicodeBuf.unicode()); + int ucSize = m_lmppData.m_unicodeBuf.length(); for(i=0; i<ucSize; ++i) { pBuf[i] = pBuf[i].upper(); @@ -604,7 +604,7 @@ void SourceData::readAndPreprocess( TQTextCodec* pEncoding, bool bAutoDetectUnic /** Prepare the linedata vector for every input line.*/ void SourceData::FileData::preprocess( bool bPreserveCR, TQTextCodec* pEncoding ) { - //m_tqunicodeBuf = decodeString( m_pBuf, m_size, eEncoding ); + //m_unicodeBuf = decodeString( m_pBuf, m_size, eEncoding ); long skipBytes = 0; TQTextCodec* pCodec = ::detectEncoding( m_pBuf, m_size, skipBytes ); @@ -616,11 +616,11 @@ void SourceData::FileData::preprocess( bool bPreserveCR, TQTextCodec* pEncoding TQTextStream ts( ba, IO_ReadOnly ); ts.setCodec( pEncoding); //ts.setAutoDetectUnicode( false ); - m_tqunicodeBuf = ts.read(); + m_unicodeBuf = ts.read(); ba.resetRawData( m_pBuf+skipBytes, m_size-skipBytes ); - int ucSize = m_tqunicodeBuf.length(); - const TQChar* p = m_tqunicodeBuf.tqunicode(); + int ucSize = m_unicodeBuf.length(); + const TQChar* p = m_unicodeBuf.unicode(); m_bIsText = true; int lines = 1; @@ -770,9 +770,9 @@ static void checkLineForComments( void SourceData::FileData::removeComments() { int line=0; - TQChar* p = const_cast<TQChar*>(m_tqunicodeBuf.tqunicode()); + TQChar* p = const_cast<TQChar*>(m_unicodeBuf.unicode()); bool bWithinComment=false; - int size = m_tqunicodeBuf.length(); + int size = m_unicodeBuf.length(); for(int i=0; i<size; ++i ) { // std::cout << "2 " << std::string(&p[i], m_v[line].size) << std::endl; @@ -1190,7 +1190,7 @@ void correctManualDiffAlignment( Diff3LineList& d3ll, ManualDiffHelpList* pManua if ( pManualDiffHelpList->empty() ) return; - // If a line appears unaligned in comparison to the manual tqalignment, correct this. + // If a line appears unaligned in comparison to the manual alignment, correct this. ManualDiffHelpList::iterator iMDHL; for( iMDHL = pManualDiffHelpList->begin(); iMDHL != pManualDiffHelpList->end(); ++iMDHL ) @@ -1228,7 +1228,7 @@ void correctManualDiffAlignment( Diff3LineList& d3ll, ManualDiffHelpList* pManua if (wi>=1 && wi <= 3) { - // Found manual tqalignment for one source + // Found manual alignment for one source Diff3LineList::iterator iDest = i3; // Move lines up until the next firstLine is found. Omit wi from move and search. @@ -22,7 +22,7 @@ #include <tqpixmap.h> #include <tqtimer.h> #include <tqframe.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqpainter.h> #include <list> #include <vector> @@ -169,10 +169,10 @@ public: typedef std::vector<Diff3WrapLine> Diff3WrapLineVector; -class TotalDifftqStatus +class TotalDiffStatus { public: - TotalDifftqStatus(){ reset(); } + TotalDiffStatus(){ reset(); } void reset() {bBinaryAEqC=false; bBinaryBEqC=false; bBinaryAEqB=false; bTextAEqC=false; bTextBEqC=false; bTextAEqB=false; nofUnsolvedConflicts=0; nofSolvedConflicts=0; @@ -293,7 +293,7 @@ private: const char* m_pBuf; int m_size; int m_vSize; // Nr of lines in m_pBuf1 and size of m_v1, m_dv12 and m_dv13 - TQString m_tqunicodeBuf; + TQString m_unicodeBuf; std::vector<LineData> m_v; bool m_bIsText; bool readFile( const TQString& filename ); diff --git a/src/difftextwindow.cpp b/src/difftextwindow.cpp index 3c570e4..d5fb8a9 100644 --- a/src/difftextwindow.cpp +++ b/src/difftextwindow.cpp @@ -28,8 +28,8 @@ #include <tqlineedit.h> #include <tqlabel.h> #include <tqpushbutton.h> -#include <tqlayout.h> -#include <tqtextcodec.h> +#include <layout.h> +#include <textcodec.h> #include <optiondialog.h> #include <math.h> #include <cstdlib> @@ -860,9 +860,9 @@ void DiffTextWindowData::writeLine( else { p.fillRect( xOffset + fontWidth*outPos, yOffset, - fontWidth*(spaces), fontHeight, m_pDiffTextWindow->tqcolorGroup().highlight() ); + fontWidth*(spaces), fontHeight, m_pDiffTextWindow->colorGroup().highlight() ); - p.setPen( m_pDiffTextWindow->tqcolorGroup().highlightedText() ); + p.setPen( m_pDiffTextWindow->colorGroup().highlightedText() ); p.drawText( xOffset + fontWidth*outPos, yOffset + fontAscent, s ); m_selection.bSelectionContainsData = true; @@ -875,7 +875,7 @@ void DiffTextWindowData::writeLine( if( m_selection.lineWithin( line ) && m_selection.lineWithin( line+1 ) ) { p.fillRect( xOffset + fontWidth*outPos, yOffset, - deviceWidth, fontHeight, m_pDiffTextWindow->tqcolorGroup().highlight() ); + deviceWidth, fontHeight, m_pDiffTextWindow->colorGroup().highlight() ); } } @@ -1656,7 +1656,7 @@ void DiffTextWindowFrame::setFirstLine( int firstLine ) s += " " + TQString::number( l+1 ); d->m_pTopLine->setText( s ); - d->m_pTopLine->tqrepaint(); + d->m_pTopLine->repaint(); } } diff --git a/src/directorymergewindow.cpp b/src/directorymergewindow.cpp index 7565e20..9503c51 100644 --- a/src/directorymergewindow.cpp +++ b/src/directorymergewindow.cpp @@ -28,11 +28,11 @@ #include <kaction.h> #include <tqregexp.h> #include <tqmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqtable.h> #include <tqsplitter.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqprogressdialog.h> #include <kmessagebox.h> #include <kfiledialog.h> @@ -187,13 +187,13 @@ void DirectoryMergeWindow::fastFileComparison( TempRemover tr1( fileName1, fi1 ); if ( !tr1.success() ) { - status = i18n("Creating temp copy of %1 failed.").tqarg(fileName1); + status = i18n("Creating temp copy of %1 failed.").arg(fileName1); return; } TempRemover tr2( fileName2, fi2 ); if ( !tr2.success() ) { - status = i18n("Creating temp copy of %1 failed.").tqarg(fileName2); + status = i18n("Creating temp copy of %1 failed.").arg(fileName2); return; } @@ -204,7 +204,7 @@ void DirectoryMergeWindow::fastFileComparison( if ( ! file1.open(IO_ReadOnly) ) { - status = i18n("Opening %1 failed.").tqarg(fileName1); + status = i18n("Opening %1 failed.").arg(fileName1); return; } @@ -212,7 +212,7 @@ void DirectoryMergeWindow::fastFileComparison( if ( ! file2.open(IO_ReadOnly) ) { - status = i18n("Opening %1 failed.").tqarg(fileName2); + status = i18n("Opening %1 failed.").arg(fileName2); return; } @@ -230,13 +230,13 @@ void DirectoryMergeWindow::fastFileComparison( int len = min2( sizeLeft, (t_FileSize)buf1.size() ); if( len != file1.readBlock( &buf1[0], len ) ) { - status = i18n("Error reading from %1").tqarg(fileName1); + status = i18n("Error reading from %1").arg(fileName1); return; } if( len != file2.readBlock( &buf2[0], len ) ) { - status = i18n("Error reading from %1").tqarg(fileName2); + status = i18n("Error reading from %1").arg(fileName2); return; } @@ -387,7 +387,7 @@ static TQPixmap pixCombiner2( const TQPixmap* pm1, const TQPixmap* pm2 ) return pix; } -static void calcDirtqStatus( bool bThreeDirs, DirMergeItem* i, int& nofFiles, +static void calcDirStatus( bool bThreeDirs, DirMergeItem* i, int& nofFiles, int& nofDirs, int& nofEqualFiles, int& nofManualMerges ) { if ( i->m_pMFI->m_bDirA || i->m_pMFI->m_bDirB || i->m_pMFI->m_bDirC ) @@ -408,7 +408,7 @@ static void calcDirtqStatus( bool bThreeDirs, DirMergeItem* i, int& nofFiles, } } for( TQListViewItem* p = i->firstChild(); p!=0; p = p->nextSibling() ) - calcDirtqStatus( bThreeDirs, static_cast<DirMergeItem*>(p), nofFiles, nofDirs, nofEqualFiles, nofManualMerges ); + calcDirStatus( bThreeDirs, static_cast<DirMergeItem*>(p), nofFiles, nofDirs, nofEqualFiles, nofManualMerges ); } static TQString sortString(const TQString& s, bool bCaseSensitive) @@ -507,13 +507,13 @@ bool DirectoryMergeWindow::init TQString text( i18n("Opening of directories failed:") ); text += "\n\n"; if ( !dirA.isDir() ) - { text += i18n("Dir A \"%1\" does not exist or is not a directory.\n").tqarg(m_dirA.prettyAbsPath()); } + { text += i18n("Dir A \"%1\" does not exist or is not a directory.\n").arg(m_dirA.prettyAbsPath()); } if ( !dirB.isDir() ) - { text += i18n("Dir B \"%1\" does not exist or is not a directory.\n").tqarg(m_dirB.prettyAbsPath()); } + { text += i18n("Dir B \"%1\" does not exist or is not a directory.\n").arg(m_dirB.prettyAbsPath()); } if ( m_dirC.isValid() && !m_dirC.isDir() ) - { text += i18n("Dir C \"%1\" does not exist or is not a directory.\n").tqarg(m_dirC.prettyAbsPath()); } + { text += i18n("Dir C \"%1\" does not exist or is not a directory.\n").arg(m_dirC.prettyAbsPath()); } KMessageBox::sorry( this, text, i18n("Directory Open Error") ); return false; @@ -698,7 +698,7 @@ bool DirectoryMergeWindow::init int nofEqualFiles=0; int nofManualMerges=0; for( TQListViewItem* p = firstChild(); p!=0; p = p->nextSibling() ) - calcDirtqStatus( m_dirC.isValid(), static_cast<DirMergeItem*>(p), + calcDirStatus( m_dirC.isValid(), static_cast<DirMergeItem*>(p), nofFiles, nofDirs, nofEqualFiles, nofManualMerges ); TQString s; @@ -915,10 +915,10 @@ void DirectoryMergeWindow::compareFilesAndCalcAges( MergeFileInfos& mfi ) mfi.m_bExistsInB ? mfi.m_fileInfoB.absFilePath() : TQString(""), mfi.m_bExistsInC ? mfi.m_fileInfoC.absFilePath() : TQString(""), "", - "","","",&mfi.m_totalDifftqStatus + "","","",&mfi.m_totalDiffStatus ); - int nofNonwhiteConflicts = mfi.m_totalDifftqStatus.nofUnsolvedConflicts + - mfi.m_totalDifftqStatus.nofSolvedConflicts - mfi.m_totalDifftqStatus.nofWhitespaceConflicts; + int nofNonwhiteConflicts = mfi.m_totalDiffStatus.nofUnsolvedConflicts + + mfi.m_totalDiffStatus.nofSolvedConflicts - mfi.m_totalDiffStatus.nofWhitespaceConflicts; if (m_pOptions->m_bDmWhiteSpaceEqual && nofNonwhiteConflicts == 0) { @@ -928,25 +928,25 @@ void DirectoryMergeWindow::compareFilesAndCalcAges( MergeFileInfos& mfi ) } else { - mfi.m_bEqualAB = mfi.m_totalDifftqStatus.bBinaryAEqB; - mfi.m_bEqualBC = mfi.m_totalDifftqStatus.bBinaryBEqC; - mfi.m_bEqualAC = mfi.m_totalDifftqStatus.bBinaryAEqC; + mfi.m_bEqualAB = mfi.m_totalDiffStatus.bBinaryAEqB; + mfi.m_bEqualBC = mfi.m_totalDiffStatus.bBinaryBEqC; + mfi.m_bEqualAC = mfi.m_totalDiffStatus.bBinaryAEqC; } } } else { bool bError; - TQString eqtqStatus; + TQString eqStatus; if( mfi.m_bExistsInA && mfi.m_bExistsInB ) { if( mfi.m_bDirA ) mfi.m_bEqualAB=true; - else fastFileComparison( mfi.m_fileInfoA, mfi.m_fileInfoB, mfi.m_bEqualAB, bError, eqtqStatus ); + else fastFileComparison( mfi.m_fileInfoA, mfi.m_fileInfoB, mfi.m_bEqualAB, bError, eqStatus ); } if( mfi.m_bExistsInA && mfi.m_bExistsInC ) { if( mfi.m_bDirA ) mfi.m_bEqualAC=true; - else fastFileComparison( mfi.m_fileInfoA, mfi.m_fileInfoC, mfi.m_bEqualAC, bError, eqtqStatus ); + else fastFileComparison( mfi.m_fileInfoA, mfi.m_fileInfoC, mfi.m_bEqualAC, bError, eqStatus ); } if( mfi.m_bExistsInB && mfi.m_bExistsInC ) { @@ -955,7 +955,7 @@ void DirectoryMergeWindow::compareFilesAndCalcAges( MergeFileInfos& mfi ) else { if( mfi.m_bDirB ) mfi.m_bEqualBC=true; - else fastFileComparison( mfi.m_fileInfoB, mfi.m_fileInfoC, mfi.m_bEqualBC, bError, eqtqStatus ); + else fastFileComparison( mfi.m_fileInfoB, mfi.m_fileInfoC, mfi.m_bEqualBC, bError, eqStatus ); } } } @@ -1723,7 +1723,7 @@ void DirMergeItem::init(MergeFileInfos* pMFI) { pMFI->m_pDMI = this; m_pMFI = pMFI; - TotalDifftqStatus& tds = pMFI->m_totalDifftqStatus; + TotalDiffStatus& tds = pMFI->m_totalDiffStatus; if ( m_pMFI->m_bDirA || m_pMFI->m_bDirB || m_pMFI->m_bDirC ) { } @@ -2138,7 +2138,7 @@ void DirectoryMergeWindow::slotRunOperationForCurrentItem() if ( m_mergeItemList.empty() ) { TQListViewItem* pBegin = currentItem(); - TQListViewItem* pEnd = treeIterator(pBegin,false,false); // find next visible sibling (no tqchildren) + TQListViewItem* pEnd = treeIterator(pBegin,false,false); // find next visible sibling (no children) prepareMergeStart( pBegin, pEnd, bVerbose ); mergeContinue(true, bVerbose); @@ -2411,16 +2411,16 @@ bool DirectoryMergeWindow::deleteFLD( const TQString& name, bool bCreateBackup ) bool bSuccess = renameFLD( name, name+".orig" ); if (!bSuccess) { - m_pStatusInfo->addText( i18n("Error: While deleting %1: Creating backup failed.").tqarg(name) ); + m_pStatusInfo->addText( i18n("Error: While deleting %1: Creating backup failed.").arg(name) ); return false; } } else { if ( fi.isDir() && !fi.isSymLink() ) - m_pStatusInfo->addText(i18n("delete directory recursively( %1 )").tqarg(name)); + m_pStatusInfo->addText(i18n("delete directory recursively( %1 )").arg(name)); else - m_pStatusInfo->addText(i18n("delete( %1 )").tqarg(name)); + m_pStatusInfo->addText(i18n("delete( %1 )").arg(name)); if ( m_bSimulatedMergeStarted ) { @@ -2454,7 +2454,7 @@ bool DirectoryMergeWindow::deleteFLD( const TQString& name, bool bCreateBackup ) bSuccess = FileAccess::removeDir( name ); if ( !bSuccess ) { - m_pStatusInfo->addText( i18n("Error: rmdir( %1 ) operation failed.").tqarg(name)); + m_pStatusInfo->addText( i18n("Error: rmdir( %1 ) operation failed.").arg(name)); return false; } } @@ -2490,7 +2490,7 @@ bool DirectoryMergeWindow::mergeFLD( const TQString& nameA,const TQString& nameB return false; } - m_pStatusInfo->addText(i18n("manual merge( %1, %2, %3 -> %4)").tqarg(nameA).tqarg(nameB).tqarg(nameC).tqarg(nameDest)); + m_pStatusInfo->addText(i18n("manual merge( %1, %2, %3 -> %4)").arg(nameA).arg(nameB).arg(nameC).arg(nameDest)); if ( m_bSimulatedMergeStarted ) { m_pStatusInfo->addText(i18n(" Note: After a manual merge the user should continue by pressing F7.") ); @@ -2517,7 +2517,7 @@ bool DirectoryMergeWindow::copyFLD( const TQString& srcName, const TQString& des if ( !bSuccess ) { m_pStatusInfo->addText(i18n("Error: copy( %1 -> %2 ) failed." - "Deleting existing destination failed.").tqarg(srcName).tqarg(destName)); + "Deleting existing destination failed.").arg(srcName).arg(destName)); return false; } } @@ -2526,7 +2526,7 @@ bool DirectoryMergeWindow::copyFLD( const TQString& srcName, const TQString& des if ( fi.isSymLink() && (fi.isDir() && !m_bFollowDirLinks || !fi.isDir() && !m_bFollowFileLinks) ) { - m_pStatusInfo->addText(i18n("copyLink( %1 -> %2 )").tqarg(srcName).tqarg(destName)); + m_pStatusInfo->addText(i18n("copyLink( %1 -> %2 )").arg(srcName).arg(destName)); #ifdef _WIN32 // What are links? #else @@ -2563,7 +2563,7 @@ bool DirectoryMergeWindow::copyFLD( const TQString& srcName, const TQString& des return false; } - m_pStatusInfo->addText(i18n("copy( %1 -> %2 )").tqarg(srcName).tqarg(destName)); + m_pStatusInfo->addText(i18n("copy( %1 -> %2 )").arg(srcName).arg(destName)); if ( m_bSimulatedMergeStarted ) { @@ -2590,12 +2590,12 @@ bool DirectoryMergeWindow::renameFLD( const TQString& srcName, const TQString& d if (!bSuccess) { m_pStatusInfo->addText( i18n("Error during rename( %1 -> %2 ): " - "Cannot delete existing destination." ).tqarg(srcName).tqarg(destName)); + "Cannot delete existing destination." ).arg(srcName).arg(destName)); return false; } } - m_pStatusInfo->addText(i18n("rename( %1 -> %2 )").tqarg(srcName).tqarg(destName)); + m_pStatusInfo->addText(i18n("rename( %1 -> %2 )").arg(srcName).arg(destName)); if ( m_bSimulatedMergeStarted ) { return true; @@ -2623,7 +2623,7 @@ bool DirectoryMergeWindow::makeDir( const TQString& name, bool bQuiet ) if (!bSuccess) { m_pStatusInfo->addText( i18n("Error during makeDir of %1. " - "Cannot delete existing file." ).tqarg(name)); + "Cannot delete existing file." ).arg(name)); return false; } } @@ -2638,7 +2638,7 @@ bool DirectoryMergeWindow::makeDir( const TQString& name, bool bQuiet ) } if ( ! bQuiet ) - m_pStatusInfo->addText(i18n("makeDir( %1 )").tqarg(name)); + m_pStatusInfo->addText(i18n("makeDir( %1 )").arg(name)); if ( m_bSimulatedMergeStarted ) { @@ -2820,7 +2820,7 @@ TQTextStream& operator<<( TQTextStream& ts, MergeFileInfos& mfi ) //FileAccess m_fileInfoB; //FileAccess m_fileInfoC; - //TotalDifftqStatus m_totalDifftqStatus; + //TotalDiffStatus m_totalDiffStatus; vm.save(ts); diff --git a/src/directorymergewindow.h b/src/directorymergewindow.h index 25a66f7..99c0405 100644 --- a/src/directorymergewindow.h +++ b/src/directorymergewindow.h @@ -26,7 +26,7 @@ #include <map> #include "common.h" #include "fileaccess.h" -#include "diff.h" //TotalDifftqStatus +#include "diff.h" //TotalDiffStatus class OptionDialog; class KIconLoader; @@ -37,7 +37,7 @@ class TQLabel; class KAction; class KToggleAction; class KActionCollection; -class TotalDifftqStatus; +class TotalDiffStatus; enum e_MergeOperation { @@ -99,7 +99,7 @@ public: FileAccess m_fileInfoB; FileAccess m_fileInfoC; - TotalDifftqStatus m_totalDifftqStatus; + TotalDiffStatus m_totalDiffStatus; }; class DirMergeItem : public TQListViewItem @@ -319,7 +319,7 @@ protected: KAction* m_pDirSaveMergeState; KAction* m_pDirLoadMergeState; signals: - void startDiffMerge(TQString fn1,TQString fn2, TQString fn3, TQString ofn, TQString,TQString,TQString,TotalDifftqStatus*); + void startDiffMerge(TQString fn1,TQString fn2, TQString fn3, TQString ofn, TQString,TQString,TQString,TotalDiffStatus*); void checkIfCanContinue( bool* pbContinue ); void updateAvailabilities(); void statusBarMessage( const TQString& msg ); diff --git a/src/fileaccess.cpp b/src/fileaccess.cpp index c2be1dc..0e106fc 100644 --- a/src/fileaccess.cpp +++ b/src/fileaccess.cpp @@ -14,7 +14,7 @@ #include <kio/global.h> #include <kmessagebox.h> #include "optiondialog.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqapplication.h> #include <tqpushbutton.h> @@ -25,7 +25,7 @@ #include <ktempfile.h> #include <tqdir.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <vector> #include <klocale.h> @@ -407,11 +407,11 @@ bool FileAccess::writeFile( const void* pSrcBuffer, unsigned long length ) if ( isExecutable() ) // value is true if the old file was executable { // Preserve attributes - struct stat srcFiletqStatus; - int statResult = ::stat( filePath().ascii(), &srcFiletqStatus ); + struct stat srcFileStatus; + int statResult = ::stat( filePath().ascii(), &srcFileStatus ); if (statResult==0) { - ::chmod ( filePath().ascii(), srcFiletqStatus.st_mode | S_IXUSR ); + ::chmod ( filePath().ascii(), srcFileStatus.st_mode | S_IXUSR ); } } #endif @@ -625,7 +625,7 @@ bool FileAccessJobHandler::stat( int detail, bool bWantToWrite ) connect( pStatJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotStatResult(KIO::Job*))); - g_pProgressDialog->enterEventLoop( pStatJob, i18n("Getting file status: %1").tqarg(m_pFileAccess->prettyAbsPath()) ); + g_pProgressDialog->enterEventLoop( pStatJob, i18n("Getting file status: %1").arg(m_pFileAccess->prettyAbsPath()) ); return m_bSuccess; } @@ -668,7 +668,7 @@ bool FileAccessJobHandler::get(void* pDestBuffer, long maxLength ) connect( pJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray &)), this, TQT_SLOT(slotGetData(KIO::Job*, const TQByteArray&))); connect( pJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); - g_pProgressDialog->enterEventLoop( pJob, i18n("Reading file: %1").tqarg(m_pFileAccess->prettyAbsPath()) ); + g_pProgressDialog->enterEventLoop( pJob, i18n("Reading file: %1").arg(m_pFileAccess->prettyAbsPath()) ); return m_bSuccess; } else @@ -704,7 +704,7 @@ bool FileAccessJobHandler::put(const void* pSrcBuffer, long maxLength, bool bOve connect( pJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray&)), this, TQT_SLOT(slotPutData(KIO::Job*, TQByteArray&))); connect( pJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); - g_pProgressDialog->enterEventLoop( pJob, i18n("Writing file: %1").tqarg(m_pFileAccess->prettyAbsPath()) ); + g_pProgressDialog->enterEventLoop( pJob, i18n("Writing file: %1").arg(m_pFileAccess->prettyAbsPath()) ); return m_bSuccess; } else @@ -721,7 +721,7 @@ void FileAccessJobHandler::slotPutData( KIO::Job* pJob, TQByteArray& data ) { long maxChunkSize = 100000; long length = min2( maxChunkSize, m_maxLength - m_transferredBytes ); - bool bSuccess = data.tqresize( length ); + bool bSuccess = data.resize( length ); if ( bSuccess ) { if ( length>0 ) @@ -767,7 +767,7 @@ bool FileAccessJobHandler::mkDir( const TQString& dirName ) KIO::SimpleJob* pJob = KIO::mkdir( dirURL ); connect( pJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotSimpleJobResult(KIO::Job*))); - g_pProgressDialog->enterEventLoop( pJob, i18n("Making directory: %1").tqarg(dirName) ); + g_pProgressDialog->enterEventLoop( pJob, i18n("Making directory: %1").arg(dirName) ); return m_bSuccess; } } @@ -787,7 +787,7 @@ bool FileAccessJobHandler::rmDir( const TQString& dirName ) KIO::SimpleJob* pJob = KIO::rmdir( dirURL ); connect( pJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotSimpleJobResult(KIO::Job*))); - g_pProgressDialog->enterEventLoop(pJob, i18n("Removing directory: %1").tqarg(dirName)); + g_pProgressDialog->enterEventLoop(pJob, i18n("Removing directory: %1").arg(dirName)); return m_bSuccess; } } @@ -802,7 +802,7 @@ bool FileAccessJobHandler::removeFile( const TQString& fileName ) KIO::SimpleJob* pJob = KIO::file_delete( KURL::fromPathOrURL(fileName), false ); connect( pJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotSimpleJobResult(KIO::Job*))); - g_pProgressDialog->enterEventLoop( pJob, i18n("Removing file: %1").tqarg(fileName) ); + g_pProgressDialog->enterEventLoop( pJob, i18n("Removing file: %1").arg(fileName) ); return m_bSuccess; } } @@ -818,7 +818,7 @@ bool FileAccessJobHandler::symLink( const TQString& linkTarget, const TQString& connect( pJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotSimpleJobResult(KIO::Job*))); g_pProgressDialog->enterEventLoop( pJob, - i18n("Creating symbolic link: %1 -> %2").tqarg(linkLocation).tqarg(linkTarget) ); + i18n("Creating symbolic link: %1 -> %2").arg(linkLocation).arg(linkTarget) ); return m_bSuccess; } } @@ -848,7 +848,7 @@ bool FileAccessJobHandler::rename( const TQString& dest ) connect( pJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); g_pProgressDialog->enterEventLoop( pJob, - i18n("Renaming file: %1 -> %2").tqarg(m_pFileAccess->prettyAbsPath()).tqarg(dest) ); + i18n("Renaming file: %1 -> %2").arg(m_pFileAccess->prettyAbsPath()).arg(dest) ); return m_bSuccess; } } @@ -884,7 +884,7 @@ bool FileAccessJobHandler::copyFile( const TQString& dest ) connect( pJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotSimpleJobResult(KIO::Job*))); connect( pJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); g_pProgressDialog->enterEventLoop( pJob, - i18n("Copying file: %1 -> %2").tqarg(m_pFileAccess->prettyAbsPath()).tqarg(dest) ); + i18n("Copying file: %1 -> %2").arg(m_pFileAccess->prettyAbsPath()).arg(dest) ); return m_bSuccess; // Note that the KIO-slave preserves the original date, if this is supported. @@ -898,13 +898,13 @@ bool FileAccessJobHandler::copyFile( const TQString& dest ) bool bReadSuccess = srcFile.open( IO_ReadOnly ); if ( bReadSuccess == false ) { - m_pFileAccess->m_statusText = i18n("Error during file copy operation: Opening file for reading failed. Filename: %1").tqarg(srcName); + m_pFileAccess->m_statusText = i18n("Error during file copy operation: Opening file for reading failed. Filename: %1").arg(srcName); return false; } bool bWriteSuccess = destFile.open( IO_WriteOnly ); if ( bWriteSuccess == false ) { - m_pFileAccess->m_statusText = i18n("Error during file copy operation: Opening file for writing failed. Filename: %1").tqarg(destName); + m_pFileAccess->m_statusText = i18n("Error during file copy operation: Opening file for writing failed. Filename: %1").arg(destName); return false; } @@ -916,7 +916,7 @@ bool FileAccessJobHandler::copyFile( const TQString& dest ) TQ_LONG readSize = srcFile.readBlock( &buffer[0], min2( srcSize, bufSize ) ); if ( readSize==-1 || readSize==0 ) { - m_pFileAccess->m_statusText = i18n("Error during file copy operation: Reading failed. Filename: %1").tqarg(srcName); + m_pFileAccess->m_statusText = i18n("Error during file copy operation: Reading failed. Filename: %1").arg(srcName); return false; } srcSize -= readSize; @@ -925,7 +925,7 @@ bool FileAccessJobHandler::copyFile( const TQString& dest ) TQ_LONG writeSize = destFile.writeBlock( &buffer[0], readSize ); if ( writeSize==-1 || writeSize==0 ) { - m_pFileAccess->m_statusText = i18n("Error during file copy operation: Writing failed. Filename: %1").tqarg(destName); + m_pFileAccess->m_statusText = i18n("Error during file copy operation: Writing failed. Filename: %1").arg(destName); return false; } readSize -= writeSize; @@ -938,28 +938,28 @@ bool FileAccessJobHandler::copyFile( const TQString& dest ) // Update the times of the destFile #ifdef _WIN32 - struct _stat srcFiletqStatus; - int statResult = ::_stat( srcName.ascii(), &srcFiletqStatus ); + struct _stat srcFileStatus; + int statResult = ::_stat( srcName.ascii(), &srcFileStatus ); if (statResult==0) { _utimbuf destTimes; - destTimes.actime = srcFiletqStatus.st_atime;/* time of last access */ - destTimes.modtime = srcFiletqStatus.st_mtime;/* time of last modification */ + destTimes.actime = srcFileStatus.st_atime;/* time of last access */ + destTimes.modtime = srcFileStatus.st_mtime;/* time of last modification */ _utime ( destName.ascii(), &destTimes ); - _chmod ( destName.ascii(), srcFiletqStatus.st_mode ); + _chmod ( destName.ascii(), srcFileStatus.st_mode ); } #else - struct stat srcFiletqStatus; - int statResult = ::stat( srcName.ascii(), &srcFiletqStatus ); + struct stat srcFileStatus; + int statResult = ::stat( srcName.ascii(), &srcFileStatus ); if (statResult==0) { utimbuf destTimes; - destTimes.actime = srcFiletqStatus.st_atime;/* time of last access */ - destTimes.modtime = srcFiletqStatus.st_mtime;/* time of last modification */ + destTimes.actime = srcFileStatus.st_atime;/* time of last access */ + destTimes.modtime = srcFileStatus.st_mtime;/* time of last modification */ utime ( destName.ascii(), &destTimes ); - chmod ( destName.ascii(), srcFiletqStatus.st_mode ); + chmod ( destName.ascii(), srcFileStatus.st_mode ); } #endif return true; @@ -1010,7 +1010,7 @@ void CvsIgnoreList::init( FileAccess& dir, bool bUseLocalCvsIgnore ) ".nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj " "*.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$"; - addEntriesFromString(TQString::tqfromLatin1(ignorestr)); + addEntriesFromString(TQString::fromLatin1(ignorestr)); addEntriesFromFile(TQDir::homeDirPath() + "/.cvsignore"); addEntriesFromString(TQString::fromLocal8Bit(::getenv("CVSIGNORE"))); @@ -1032,7 +1032,7 @@ void CvsIgnoreList::init( FileAccess& dir, bool bUseLocalCvsIgnore ) { if (pos>pos1) { - addEntry( TQString::tqfromLatin1( &buf[pos1], pos-pos1 ) ); + addEntry( TQString::fromLatin1( &buf[pos1], pos-pos1 ) ); } ++pos1; } @@ -1088,7 +1088,7 @@ void CvsIgnoreList::addEntry(const TQString& pattern) unsigned int nofMetaCharacters = 0; const TQChar* pos; - pos = pattern.tqunicode(); + pos = pattern.unicode(); const TQChar* posEnd; posEnd=pos + pattern.length(); while (pos < posEnd) @@ -1344,7 +1344,7 @@ bool FileAccessJobHandler::listDir( t_DirectoryList* pDirList, bool bRecursive, //connect( pListJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); g_pProgressDialog->enterEventLoop( pListJob, - i18n("Listing directory: %1").tqarg(m_pFileAccess->prettyAbsPath()) ); + i18n("Listing directory: %1").arg(m_pFileAccess->prettyAbsPath()) ); } } @@ -1454,27 +1454,27 @@ ProgressDialog::ProgressDialog( TQWidget* pParent ) : TQDialog( pParent, 0, true ) { m_bStayHidden = false; - TQVBoxLayout* tqlayout = new TQVBoxLayout(this); + TQVBoxLayout* layout = new TQVBoxLayout(this); m_pInformation = new TQLabel( " ", this ); - tqlayout->addWidget( m_pInformation ); + layout->addWidget( m_pInformation ); m_pProgressBar = new KProgress(1000, this); - tqlayout->addWidget( m_pProgressBar ); + layout->addWidget( m_pProgressBar ); m_pSubInformation = new TQLabel( " ", this); - tqlayout->addWidget( m_pSubInformation ); + layout->addWidget( m_pSubInformation ); m_pSubProgressBar = new KProgress(1000, this); - tqlayout->addWidget( m_pSubProgressBar ); + layout->addWidget( m_pSubProgressBar ); m_pSlowJobInfo = new TQLabel( " ", this); - tqlayout->addWidget( m_pSlowJobInfo ); + layout->addWidget( m_pSlowJobInfo ); - TQHBoxLayout* htqlayout = new TQHBoxLayout( tqlayout ); - htqlayout->addStretch(1); + TQHBoxLayout* hlayout = new TQHBoxLayout( layout ); + hlayout->addStretch(1); m_pAbortButton = new TQPushButton( i18n("&Cancel"), this); - htqlayout->addWidget( m_pAbortButton ); + hlayout->addWidget( m_pAbortButton ); connect( m_pAbortButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAbort()) ); m_progressDelayTimer = 0; diff --git a/src/gnudiff_diff.h b/src/gnudiff_diff.h index 7bc8b92..482435c 100644 --- a/src/gnudiff_diff.h +++ b/src/gnudiff_diff.h @@ -110,7 +110,7 @@ bool brief; bool expand_tabs; /* Use a tab in the output, rather than a space, before the text of an - input line, so as to keep the proper tqalignment in the input line + input line, so as to keep the proper alignment in the input line without changing the characters in it (-T). */ bool initial_tab; diff --git a/src/gnudiff_io.cpp b/src/gnudiff_io.cpp index f29fd31..aab645f 100644 --- a/src/gnudiff_io.cpp +++ b/src/gnudiff_io.cpp @@ -169,7 +169,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) while ( p<bufend && (c = *p) != '\n' ) { if (! (isWhite(c) || bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) )) - h = HASH (h, c.lower().tqunicode()); + h = HASH (h, c.lower().unicode()); ++p; } break; @@ -177,7 +177,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) default: while ( p<bufend && (c = *p) != '\n' ) { - h = HASH (h, c.lower().tqunicode()); + h = HASH (h, c.lower().unicode()); ++p; } break; @@ -189,7 +189,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) while ( p<bufend && (c = *p) != '\n') { if (! (isWhite(c)|| bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) )) - h = HASH (h, c.tqunicode()); + h = HASH (h, c.unicode()); ++p; } break; @@ -197,7 +197,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) default: while ( p<bufend && (c = *p) != '\n') { - h = HASH (h, c.tqunicode()); + h = HASH (h, c.unicode()); ++p; } break; diff --git a/src/kdiff3.cpp b/src/kdiff3.cpp index c3541ec..e8b5add 100644 --- a/src/kdiff3.cpp +++ b/src/kdiff3.cpp @@ -30,8 +30,8 @@ #include <tqpushbutton.h> #include <tqpopupmenu.h> #include <tqlabel.h> -#include <tqtextedit.h> -#include <tqlayout.h> +#include <textedit.h> +#include <layout.h> #include <tqpaintdevicemetrics.h> // include files for KDE @@ -259,7 +259,7 @@ KDiff3App::KDiff3App(TQWidget* pParent, const char* name, KDiff3Part* pKDiff3Par slotViewStatusBar(); if( toolBar("mainToolBar")!=0 ) toolBar("mainToolBar")->setBarPos( (KToolBar::BarPosition) m_pOptionDialog->m_toolBarPos ); -/* TQSize size = m_pOptionDialog->m_tqgeometry; +/* TQSize size = m_pOptionDialog->m_geometry; TQPoint pos = m_pOptionDialog->m_position; if(!size.isEmpty()) { @@ -280,8 +280,8 @@ KDiff3App::KDiff3App(TQWidget* pParent, const char* name, KDiff3Part* pKDiff3Par KApplication::kApplication()->iconLoader() ); m_pDirectoryMergeInfo = new DirectoryMergeInfo( m_pDirectoryMergeSplitter ); m_pDirectoryMergeWindow->setDirectoryMergeInfo( m_pDirectoryMergeInfo ); - connect( m_pDirectoryMergeWindow, TQT_SIGNAL(startDiffMerge(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDifftqStatus*)), - TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen2(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDifftqStatus*))); + connect( m_pDirectoryMergeWindow, TQT_SIGNAL(startDiffMerge(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDiffStatus*)), + TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen2(TQString,TQString,TQString,TQString,TQString,TQString,TQString,TotalDiffStatus*))); connect( m_pDirectoryMergeWindow, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateAvailabilities())); connect( m_pDirectoryMergeWindow, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateAvailabilities())); connect( m_pDirectoryMergeWindow, TQT_SIGNAL(checkIfCanContinue(bool*)), TQT_TQOBJECT(this), TQT_SLOT(slotCheckIfCanContinue(bool*))); @@ -303,7 +303,7 @@ void KDiff3App::completeInit( const TQString& fn1, const TQString& fn2, const TQ { if (m_pKDiff3Shell!=0) { - TQSize size=m_pOptionDialog->m_tqgeometry; + TQSize size=m_pOptionDialog->m_geometry; TQPoint pos=m_pOptionDialog->m_position; if(!size.isEmpty()) { @@ -341,13 +341,13 @@ void KDiff3App::completeInit( const TQString& fn1, const TQString& fn2, const TQ SourceData* pSD=0; if ( m_sd3.isEmpty() ) { - if ( m_totalDifftqStatus.bBinaryAEqB ){ pSD = &m_sd1; } + if ( m_totalDiffStatus.bBinaryAEqB ){ pSD = &m_sd1; } } else { - if ( m_totalDifftqStatus.bBinaryBEqC ){ pSD = &m_sd3; } // B==C (assume A is old) - else if ( m_totalDifftqStatus.bBinaryAEqB ){ pSD = &m_sd3; } // assuming C has changed - else if ( m_totalDifftqStatus.bBinaryAEqC ){ pSD = &m_sd2; } // assuming B has changed + if ( m_totalDiffStatus.bBinaryBEqC ){ pSD = &m_sd3; } // B==C (assume A is old) + else if ( m_totalDiffStatus.bBinaryAEqB ){ pSD = &m_sd3; } // assuming C has changed + else if ( m_totalDiffStatus.bBinaryAEqC ){ pSD = &m_sd2; } // assuming B has changed } if ( pSD!=0 ) @@ -577,7 +577,7 @@ void KDiff3App::saveOptions( KConfig* config ) m_pOptionDialog->m_bMaximised = m_pKDiff3Shell->isMaximized(); if( ! m_pKDiff3Shell->isMaximized() && m_pKDiff3Shell->isVisible() ) { - m_pOptionDialog->m_tqgeometry = m_pKDiff3Shell->size(); + m_pOptionDialog->m_geometry = m_pKDiff3Shell->size(); m_pOptionDialog->m_position = m_pKDiff3Shell->pos(); } if ( toolBar("mainToolBar")!=0 ) diff --git a/src/kdiff3.h b/src/kdiff3.h index f5e240f..46c0d3c 100644 --- a/src/kdiff3.h +++ b/src/kdiff3.h @@ -110,7 +110,7 @@ class KDiff3App : public TQSplitter /** initializes the KActions of the application */ void initActions( KActionCollection* ); - /** save general Options like all bar positions and status as well as the tqgeometry + /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration file */ void saveOptions( KConfig* ); @@ -144,7 +144,7 @@ class KDiff3App : public TQSplitter /** open a file and load it into the document*/ void slotFileOpen(); void slotFileOpen2( TQString fn1, TQString fn2, TQString fn3, TQString ofn, - TQString an1, TQString an2, TQString an3, TotalDifftqStatus* pTotalDifftqStatus ); + TQString an1, TQString an2, TQString an3, TotalDiffStatus* pTotalDiffStatus ); void slotFileNameChanged(const TQString& fileName, int winIdx); @@ -281,7 +281,7 @@ class KDiff3App : public TQSplitter TQWidget* m_pCornerWidget; - TotalDifftqStatus m_totalDifftqStatus; + TotalDiffStatus m_totalDiffStatus; SourceData m_sd1; SourceData m_sd2; @@ -310,7 +310,7 @@ class KDiff3App : public TQSplitter OptionDialog* m_pOptionDialog; FindDialog* m_pFindDialog; - void init( bool bAuto=false, TotalDifftqStatus* pTotalDifftqStatus=0, bool bLoadFiles=true ); + void init( bool bAuto=false, TotalDiffStatus* pTotalDiffStatus=0, bool bLoadFiles=true ); virtual bool eventFilter( TQObject* o, TQEvent* e ); virtual void resizeEvent(TQResizeEvent*); diff --git a/src/kdiff3_part.cpp b/src/kdiff3_part.cpp index 406c3df..a0ea1ad 100644 --- a/src/kdiff3_part.cpp +++ b/src/kdiff3_part.cpp @@ -25,7 +25,7 @@ #include <kfiledialog.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include "kdiff3.h" #include "fileaccess.h" diff --git a/src/kreplacements/kreplacements.cpp b/src/kreplacements/kreplacements.cpp index 75894a1..f8948e1 100644 --- a/src/kreplacements/kreplacements.cpp +++ b/src/kreplacements/kreplacements.cpp @@ -29,9 +29,9 @@ #include <tqcolordialog.h> #include <tqfontdialog.h> #include <tqlabel.h> -#include <tqtextbrowser.h> -#include <tqtextstream.h> -#include <tqlayout.h> +#include <textbrowser.h> +#include <textstream.h> +#include <layout.h> #include <tqdockarea.h> #include <vector> @@ -676,7 +676,7 @@ KToggleAction* KStdAction::showStatusbar( TQWidget* parent, const char* slot, KA KAction* KStdAction::preferences( TQWidget* parent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("&Configure %1...").tqarg("KDiff3"), 0, parent, slot, actionCollection, "settings", false, false ); + KAction* a = new KAction( i18n("&Configure %1...").arg("KDiff3"), 0, parent, slot, actionCollection, "settings", false, false ); if(p) a->addTo( p->settingsMenu ); return a; } diff --git a/src/main.cpp b/src/main.cpp index 2556c0e..858e47a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,9 +21,9 @@ #include "kdiff3_shell.h" #include <kstandarddirs.h> #include "version.h" -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <vector> #ifdef KREPLACEMENTS_H diff --git a/src/mergeresultwindow.cpp b/src/mergeresultwindow.cpp index 119294f..88bfd4d 100644 --- a/src/mergeresultwindow.cpp +++ b/src/mergeresultwindow.cpp @@ -20,7 +20,7 @@ #include <tqpainter.h> #include <tqapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqdir.h> #include <tqfile.h> #include <tqcursor.h> @@ -30,8 +30,8 @@ #include <tqlabel.h> #include <tqlineedit.h> #include <tqcombobox.h> -#include <tqlayout.h> -#include <tqtextcodec.h> +#include <layout.h> +#include <textcodec.h> #include <tqdragobject.h> #include <klocale.h> @@ -72,7 +72,7 @@ MergeResultWindow::MergeResultWindow( m_sizeC = 0; m_pDiff3LineList = 0; - m_pTotalDifftqStatus = 0; + m_pTotalDiffStatus = 0; m_pStatusBar = pStatusBar; m_pOptionDialog = pOptionDialog; @@ -97,7 +97,7 @@ void MergeResultWindow::init( const LineData* pLineDataB, int sizeB, const LineData* pLineDataC, int sizeC, const Diff3LineList* pDiff3LineList, - TotalDifftqStatus* pTotalDifftqStatus + TotalDiffStatus* pTotalDiffStatus ) { m_firstLine = 0; @@ -118,7 +118,7 @@ void MergeResultWindow::init( m_sizeC = sizeC; m_pDiff3LineList = pDiff3LineList; - m_pTotalDifftqStatus = pTotalDifftqStatus; + m_pTotalDiffStatus = pTotalDiffStatus; m_selection.reset(); m_cursorXPos=0; @@ -134,13 +134,13 @@ void MergeResultWindow::init( int nofUnsolved = getNrOfUnsolvedConflicts(&wsc); if (m_pStatusBar) m_pStatusBar->message( i18n("Number of remaining unsolved conflicts: %1 (of which %2 are whitespace)") - .tqarg(nofUnsolved).tqarg(wsc) ); + .arg(nofUnsolved).arg(wsc) ); } void MergeResultWindow::reset() { m_pDiff3LineList = 0; - m_pTotalDifftqStatus = 0; + m_pTotalDiffStatus = 0; m_pldA = 0; m_pldB = 0; m_pldC = 0; @@ -467,9 +467,9 @@ void MergeResultWindow::merge(bool bAutoSolve, int defaultSelector, bool bConfli ++nrOfWhiteSpaceConflicts; } - m_pTotalDifftqStatus->nofUnsolvedConflicts = nrOfUnsolvedConflicts; - m_pTotalDifftqStatus->nofSolvedConflicts = nrOfSolvedConflicts; - m_pTotalDifftqStatus->nofWhitespaceConflicts = nrOfWhiteSpaceConflicts; + m_pTotalDiffStatus->nofUnsolvedConflicts = nrOfUnsolvedConflicts; + m_pTotalDiffStatus->nofSolvedConflicts = nrOfSolvedConflicts; + m_pTotalDiffStatus->nofWhitespaceConflicts = nrOfWhiteSpaceConflicts; m_cursorXPos=0; @@ -804,17 +804,17 @@ void MergeResultWindow::showNrOfConflicts() ++nrOfConflicts; } TQString totalInfo; - if ( m_pTotalDifftqStatus->bBinaryAEqB && m_pTotalDifftqStatus->bBinaryAEqC ) + if ( m_pTotalDiffStatus->bBinaryAEqB && m_pTotalDiffStatus->bBinaryAEqC ) totalInfo += i18n("All input files are binary equal."); - else if ( m_pTotalDifftqStatus->bTextAEqB && m_pTotalDifftqStatus->bTextAEqC ) + else if ( m_pTotalDiffStatus->bTextAEqB && m_pTotalDiffStatus->bTextAEqC ) totalInfo += i18n("All input files contain the same text."); else { - if ( m_pTotalDifftqStatus->bBinaryAEqB ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").tqarg("A").tqarg("B"); - else if ( m_pTotalDifftqStatus->bTextAEqB ) totalInfo += i18n("Files %1 and %2 have equal text.\n").tqarg("A").tqarg("B"); - if ( m_pTotalDifftqStatus->bBinaryAEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").tqarg("A").tqarg("C"); - else if ( m_pTotalDifftqStatus->bTextAEqC ) totalInfo += i18n("Files %1 and %2 have equal text.\n").tqarg("A").tqarg("C"); - if ( m_pTotalDifftqStatus->bBinaryBEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").tqarg("B").tqarg("C"); - else if ( m_pTotalDifftqStatus->bTextBEqC ) totalInfo += i18n("Files %1 and %2 have equal text.\n").tqarg("B").tqarg("C"); + if ( m_pTotalDiffStatus->bBinaryAEqB ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").arg("A").arg("B"); + else if ( m_pTotalDiffStatus->bTextAEqB ) totalInfo += i18n("Files %1 and %2 have equal text.\n").arg("A").arg("B"); + if ( m_pTotalDiffStatus->bBinaryAEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").arg("A").arg("C"); + else if ( m_pTotalDiffStatus->bTextAEqC ) totalInfo += i18n("Files %1 and %2 have equal text.\n").arg("A").arg("C"); + if ( m_pTotalDiffStatus->bBinaryBEqC ) totalInfo += i18n("Files %1 and %2 are binary equal.\n").arg("B").arg("C"); + else if ( m_pTotalDiffStatus->bTextBEqC ) totalInfo += i18n("Files %1 and %2 have equal text.\n").arg("B").arg("C"); } int nrOfUnsolvedConflicts = getNrOfUnsolvedConflicts(); @@ -948,7 +948,7 @@ void MergeResultWindow::choose( int selector ) int wsc; int nofUnsolved = getNrOfUnsolvedConflicts(&wsc); m_pStatusBar->message( i18n("Number of remaining unsolved conflicts: %1 (of which %2 are whitespace)") - .tqarg(nofUnsolved).tqarg(wsc) ); + .arg(nofUnsolved).arg(wsc) ); } // bConflictsOnly: automatically choose for conflicts only (true) or for everywhere (false) @@ -962,7 +962,7 @@ void MergeResultWindow::chooseGlobal(int selector, bool bConflictsOnly, bool bWh int wsc; int nofUnsolved = getNrOfUnsolvedConflicts(&wsc); m_pStatusBar->message( i18n("Number of remaining unsolved conflicts: %1 (of which %2 are whitespace)") - .tqarg(nofUnsolved).tqarg(wsc) ); + .arg(nofUnsolved).arg(wsc) ); } void MergeResultWindow::slotAutoSolve() @@ -974,7 +974,7 @@ void MergeResultWindow::slotAutoSolve() int wsc; int nofUnsolved = getNrOfUnsolvedConflicts(&wsc); m_pStatusBar->message( i18n("Number of remaining unsolved conflicts: %1 (of which %2 are whitespace)") - .tqarg(nofUnsolved).tqarg(wsc) ); + .arg(nofUnsolved).arg(wsc) ); } void MergeResultWindow::slotUnsolve() @@ -986,7 +986,7 @@ void MergeResultWindow::slotUnsolve() int wsc; int nofUnsolved = getNrOfUnsolvedConflicts(&wsc); m_pStatusBar->message( i18n("Number of remaining unsolved conflicts: %1 (of which %2 are whitespace)") - .tqarg(nofUnsolved).tqarg(wsc) ); + .arg(nofUnsolved).arg(wsc) ); } static TQString calcHistoryLead(const TQString& s ) @@ -1661,12 +1661,12 @@ void MergeResultWindow::writeLine( if( m_selection.lineWithin( line+1 ) ) p.fillRect( xOffset + fontWidth*(firstPosInLine2-m_firstColumn), yOffset, - width(), fontHeight, tqcolorGroup().highlight() ); + width(), fontHeight, colorGroup().highlight() ); else if ( lengthInLine2>0 ) p.fillRect( xOffset + fontWidth*(firstPosInLine2-m_firstColumn), yOffset, - fontWidth*lengthInLine2, fontHeight, tqcolorGroup().highlight() ); + fontWidth*lengthInLine2, fontHeight, colorGroup().highlight() ); - p.setPen( tqcolorGroup().highlightedText() ); + p.setPen( colorGroup().highlightedText() ); p.drawText( xOffset + fontWidth*(firstPosInLine2-m_firstColumn), yOffset+fontAscent, s.mid(firstPosInLine2,lengthInLine2), true ); } @@ -2105,9 +2105,9 @@ void MergeResultWindow::slotCursorUpdate() int xCursor = ( m_cursorXPos - m_firstColumn ) * fontWidth + xOffset; if (!m_pOptionDialog->m_bRightToLeftLanguage) - tqrepaint( xCursor-2, yOffset, 5, fm.ascent()+2 ); + repaint( xCursor-2, yOffset, 5, fm.ascent()+2 ); else - tqrepaint( width()-1-4-(xCursor-2), yOffset, 5, fm.ascent()+2 ); + repaint( width()-1-4-(xCursor-2), yOffset, 5, fm.ascent()+2 ); m_bCursorUpdate=false; } @@ -2613,10 +2613,10 @@ void MergeResultWindow::pasteClipboard( bool bFromSelection ) TQString str = melIt->getString( this ); int x = convertToPosInText( str, m_cursorXPos, m_pOptionDialog->m_tabSize ); - if ( !TQApplication::tqclipboard()->supportsSelection() ) + if ( !TQApplication::clipboard()->supportsSelection() ) bFromSelection = false; - TQString clipBoard = TQApplication::tqclipboard()->text( bFromSelection ? TQClipboard::Selection : TQClipboard::Clipboard ); + TQString clipBoard = TQApplication::clipboard()->text( bFromSelection ? TQClipboard::Selection : TQClipboard::Clipboard ); TQString currentLine = str.left(x); TQString endOfLine = str.mid(x); @@ -3072,7 +3072,7 @@ WindowTitleWidget::WindowTitleWidget(OptionDialog* pOptionDialog, TQWidget* pPar m_pModifiedLabel = new TQLabel(i18n("[Modified]"),this); pHLayout->addWidget( m_pModifiedLabel ); - m_pModifiedLabel->setMinimumSize( m_pModifiedLabel->tqsizeHint() ); + m_pModifiedLabel->setMinimumSize( m_pModifiedLabel->sizeHint() ); m_pModifiedLabel->setText(""); pHLayout->addStretch(1); @@ -3137,7 +3137,7 @@ void WindowTitleWidget::setEncodings( TQTextCodec* pCodecForA, TQTextCodec* pCod m_codecMap[i]=it->second; ++i; } - m_pEncodingSelector->setMinimumSize( m_pEncodingSelector->tqsizeHint() ); + m_pEncodingSelector->setMinimumSize( m_pEncodingSelector->sizeHint() ); if ( pCodecForC && pCodecForB && pCodecForA ) { diff --git a/src/mergeresultwindow.h b/src/mergeresultwindow.h index ed524a5..2b61e6f 100644 --- a/src/mergeresultwindow.h +++ b/src/mergeresultwindow.h @@ -110,7 +110,7 @@ public: const LineData* pLineDataB, int sizeB, const LineData* pLineDataC, int sizeC, const Diff3LineList* pDiff3LineList, - TotalDifftqStatus* pTotalDifftqStatus + TotalDiffStatus* pTotalDiffStatus ); void reset(); @@ -187,7 +187,7 @@ private: int m_sizeC; const Diff3LineList* m_pDiff3LineList; - TotalDifftqStatus* m_pTotalDifftqStatus; + TotalDiffStatus* m_pTotalDiffStatus; bool m_bPaintingAllowed; int m_delayedDrawTimer; diff --git a/src/optiondialog.cpp b/src/optiondialog.cpp index 9b46a6d..3f0ebf7 100644 --- a/src/optiondialog.cpp +++ b/src/optiondialog.cpp @@ -22,13 +22,13 @@ #include <tqcombobox.h> #include <tqfont.h> #include <tqframe.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqlineedit.h> #include <tqvbox.h> #include <tqvalidator.h> #include <tqtooltip.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqradiobutton.h> #include <tqvbuttongroup.h> #include <tqsettings.h> @@ -495,7 +495,7 @@ void OptionDialog::setupOtherOptions() new OptionToggleAction( true, "Show Statusbar", &m_bShowStatusBar, this ); new OptionNum( (int)KToolBar::Top, "ToolBarPos", &m_toolBarPos, this ); - new OptionSize( TQSize(600,400),"Geometry", &m_tqgeometry, this ); + new OptionSize( TQSize(600,400),"Geometry", &m_geometry, this ); new OptionPoint( TQPoint(0,22), "Position", &m_position, this ); new OptionToggleAction( false, "WindowStateMaximised", &m_bMaximised, this ); diff --git a/src/optiondialog.h b/src/optiondialog.h index 697dfe3..b7a27e6 100644 --- a/src/optiondialog.h +++ b/src/optiondialog.h @@ -59,7 +59,7 @@ public: TQString calcOptionHelp(); // Some settings are not available in the option dialog: - TQSize m_tqgeometry; + TQSize m_geometry; TQPoint m_position; bool m_bMaximised; bool m_bShowToolBar; diff --git a/src/pdiff.cpp b/src/pdiff.cpp index 033fd31..ed1419e 100644 --- a/src/pdiff.cpp +++ b/src/pdiff.cpp @@ -31,9 +31,9 @@ #include <kstatusbar.h> #include <kkeydialog.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqscrollbar.h> -#include <tqlayout.h> +#include <layout.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, TotalDifftqStatus* pTotalDifftqStatus, bool bLoadFiles ) +void KDiff3App::init( bool bAuto, TotalDiffStatus* pTotalDiffStatus, bool bLoadFiles ) { ProgressProxy pp; // When doing a full analysis in the directory-comparison, then the statistics-results - // will be stored in the given TotalDifftqStatus. Otherwise it will be 0. - bool bGUI = pTotalDifftqStatus == 0; - if (pTotalDifftqStatus==0) - pTotalDifftqStatus = &m_totalDifftqStatus; + // will be stored in the given TotalDiffStatus. Otherwise it will be 0. + bool bGUI = pTotalDiffStatus == 0; + if (pTotalDiffStatus==0) + pTotalDiffStatus = &m_totalDiffStatus; bool bPreserveCarriageReturn = m_pOptionDialog->m_bPreserveCarriageReturn; @@ -310,11 +310,11 @@ void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bL pp.setMaxNofSteps( 6 ); // 3 comparisons, 3 finediffs } - pTotalDifftqStatus->reset(); + pTotalDiffStatus->reset(); // Run the diff. if ( m_sd3.isEmpty() ) { - pTotalDifftqStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 ); + pTotalDiffStatus->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, TotalDifftqStatus* pTotalDifftqStatus, bool bL pp.setInformation(i18n("Linediff: A <-> B")); calcDiff3LineListUsingAB( &m_diffList12, m_diff3LineList ); - fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqB ); - if ( m_sd1.getSizeBytes()==0 ) pTotalDifftqStatus->bTextAEqB=false; + fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqB ); + if ( m_sd1.getSizeBytes()==0 ) pTotalDiffStatus->bTextAEqB=false; pp.step(); } @@ -337,9 +337,9 @@ void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bL pp.step(); } - pTotalDifftqStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 ); - pTotalDifftqStatus->bBinaryAEqC = m_sd1.isBinaryEqualWith( m_sd3 ); - pTotalDifftqStatus->bBinaryBEqC = m_sd3.isBinaryEqualWith( m_sd2 ); + pTotalDiffStatus->bBinaryAEqB = m_sd1.isBinaryEqualWith( m_sd2 ); + pTotalDiffStatus->bBinaryAEqC = m_sd1.isBinaryEqualWith( m_sd3 ); + pTotalDiffStatus->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, TotalDifftqStatus* pTotalDifftqStatus, bool bL debugLineCheck( m_diff3LineList, m_sd3.getSizeLines(), 3 ); pp.setInformation(i18n("Linediff: A <-> B")); - fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqB ); + fineDiff( m_diff3LineList, 1, m_sd1.getLineDataForDisplay(), m_sd2.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqB ); pp.step(); pp.setInformation(i18n("Linediff: B <-> C")); - fineDiff( m_diff3LineList, 2, m_sd2.getLineDataForDisplay(), m_sd3.getLineDataForDisplay(), pTotalDifftqStatus->bTextBEqC ); + fineDiff( m_diff3LineList, 2, m_sd2.getLineDataForDisplay(), m_sd3.getLineDataForDisplay(), pTotalDiffStatus->bTextBEqC ); pp.step(); pp.setInformation(i18n("Linediff: A <-> C")); - fineDiff( m_diff3LineList, 3, m_sd3.getLineDataForDisplay(), m_sd1.getLineDataForDisplay(), pTotalDifftqStatus->bTextAEqC ); + fineDiff( m_diff3LineList, 3, m_sd3.getLineDataForDisplay(), m_sd1.getLineDataForDisplay(), pTotalDiffStatus->bTextAEqC ); pp.step(); - if ( m_sd1.getSizeBytes()==0 ) { pTotalDifftqStatus->bTextAEqB=false; pTotalDifftqStatus->bTextAEqC=false; } - if ( m_sd2.getSizeBytes()==0 ) { pTotalDifftqStatus->bTextAEqB=false; pTotalDifftqStatus->bTextBEqC=false; } + if ( m_sd1.getSizeBytes()==0 ) { pTotalDiffStatus->bTextAEqB=false; pTotalDiffStatus->bTextAEqC=false; } + if ( m_sd2.getSizeBytes()==0 ) { pTotalDiffStatus->bTextAEqB=false; pTotalDiffStatus->bTextBEqC=false; } } m_diffBufferInfo.init( &m_diff3LineList, &m_diff3LineVector, m_sd1.getLineDataForDiff(), m_sd1.getSizeLines(), @@ -420,7 +420,7 @@ void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bL m_sd2.getLineDataForDisplay(), m_sd2.getSizeLines(), m_bTripleDiff ? m_sd3.getLineDataForDisplay() : 0, m_sd3.getSizeLines(), &m_diff3LineList, - pTotalDifftqStatus + pTotalDiffStatus ); m_pMergeResultWindowTitle->setFileName( m_outputFilename.isEmpty() ? TQString("unnamed.txt") : m_outputFilename ); @@ -507,17 +507,17 @@ void KDiff3App::init( bool bAuto, TotalDifftqStatus* pTotalDifftqStatus, bool bL ) { TQString totalInfo; - if ( pTotalDifftqStatus->bBinaryAEqB && pTotalDifftqStatus->bBinaryAEqC ) + if ( pTotalDiffStatus->bBinaryAEqB && pTotalDiffStatus->bBinaryAEqC ) totalInfo += i18n("All input files are binary equal."); - else if ( pTotalDifftqStatus->bTextAEqB && pTotalDifftqStatus->bTextAEqC ) + else if ( pTotalDiffStatus->bTextAEqB && pTotalDiffStatus->bTextAEqC ) totalInfo += i18n("All input files contain the same text, but are not binary equal."); else { - 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 ( 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 ( !totalInfo.isEmpty() ) @@ -609,14 +609,14 @@ void KDiff3App::sourceMask( int srcMask, int enabledMask ) -// Function uses setMinSize( tqsizeHint ) before adding the widget. -// void addWidget(TQBoxLayout* tqlayout, TQWidget* widget); +// Function uses setMinSize( sizeHint ) before adding the widget. +// void addWidget(TQBoxLayout* layout, TQWidget* widget); template <class W, class L> -void addWidget( L* tqlayout, W* widget) +void addWidget( L* layout, W* widget) { - TQSize s = widget->tqsizeHint(); + TQSize s = widget->sizeHint(); widget->setMinimumSize( TQSize(max2(s.width(),0),max2(s.height(),0) ) ); - tqlayout->addWidget( widget ); + layout->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, TotalDifftqStatus* pTotalDifftqStatus ) + TQString an1, TQString an2, TQString an3, TotalDiffStatus* pTotalDiffStatus ) { 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, pTotalDifftqStatus ); + init( false, pTotalDiffStatus ); - if ( pTotalDifftqStatus!=0 ) + if ( pTotalDiffStatus!=0 ) return; if ( ! m_sd1.isEmpty() && ! m_sd1.hasData() || @@ -1174,7 +1174,7 @@ void KDiff3App::slotEditCut() if ( !s.isNull() ) { - TQApplication::tqclipboard()->setText( s, TQClipboard::Clipboard ); + TQApplication::clipboard()->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::tqclipboard()->setText( s, TQClipboard::Clipboard ); + TQApplication::clipboard()->setText( s, TQClipboard::Clipboard ); } slotStatusMsg(i18n("Ready.")); @@ -1208,17 +1208,17 @@ void KDiff3App::slotEditPaste() { if ( m_pDiffTextWindow1->hasFocus() ) { - m_sd1.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); + m_sd1.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) ); init(); } else if ( m_pDiffTextWindow2->hasFocus() ) { - m_sd2.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); + m_sd2.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) ); init(); } else if ( m_pDiffTextWindow3->hasFocus() ) { - m_sd3.setData( TQApplication::tqclipboard()->text(TQClipboard::Clipboard) ); + m_sd3.setData( TQApplication::clipboard()->text(TQClipboard::Clipboard) ); init(); } } @@ -1465,7 +1465,7 @@ void KDiff3App::slotSelectionEnd() } else { - TQClipboard *clipBoard = TQApplication::tqclipboard(); + TQClipboard *clipBoard = TQApplication::clipboard(); if (clipBoard->supportsSelection ()) { @@ -1484,7 +1484,7 @@ void KDiff3App::slotSelectionEnd() void KDiff3App::slotClipboardChanged() { - TQString s = TQApplication::tqclipboard()->text(); + TQString s = TQApplication::clipboard()->text(); //editPaste->setEnabled(!s.isEmpty()); } @@ -1969,7 +1969,7 @@ void KDiff3App::slotMergeCurrentFile() void KDiff3App::slotWinFocusNext() { - TQWidget* focus = tqApp->tqfocusWidget(); + TQWidget* focus = tqApp->focusWidget(); if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() ) { slotDirViewToggle(); @@ -1999,7 +1999,7 @@ void KDiff3App::slotWinFocusNext() void KDiff3App::slotWinFocusPrev() { - TQWidget* focus = tqApp->tqfocusWidget(); + TQWidget* focus = tqApp->focusWidget(); if ( focus == m_pDirectoryMergeWindow && m_pDirectoryMergeWindow->isVisible() && ! dirShowBoth->isChecked() ) { slotDirViewToggle(); diff --git a/src/smalldialogs.cpp b/src/smalldialogs.cpp index 7dc6340..8c70b66 100644 --- a/src/smalldialogs.cpp +++ b/src/smalldialogs.cpp @@ -25,7 +25,7 @@ #include <tqcheckbox.h> #include <tqlineedit.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqdragobject.h> #include <tqregexp.h> @@ -111,15 +111,15 @@ OpenDialog::OpenDialog( TQPopupMenu* m = new TQPopupMenu(this); int id=0; - m->insertItem( i18n("Swap %1<->%2").tqarg("A").tqarg("B"), id++ ); - m->insertItem( i18n("Swap %1<->%2").tqarg("B").tqarg("C"), id++ ); - m->insertItem( i18n("Swap %1<->%2").tqarg("C").tqarg("A"), id++ ); - m->insertItem( i18n("Copy %1->Output").tqarg("A"), id++ ); - m->insertItem( i18n("Copy %1->Output").tqarg("B"), id++ ); - m->insertItem( i18n("Copy %1->Output").tqarg("C"), id++ ); - m->insertItem( i18n("Swap %1<->Output").tqarg("A"), id++ ); - m->insertItem( i18n("Swap %1<->Output").tqarg("B"), id++ ); - m->insertItem( i18n("Swap %1<->Output").tqarg("C"), id++ ); + m->insertItem( i18n("Swap %1<->%2").arg("A").arg("B"), id++ ); + m->insertItem( i18n("Swap %1<->%2").arg("B").arg("C"), id++ ); + m->insertItem( i18n("Swap %1<->%2").arg("C").arg("A"), id++ ); + m->insertItem( i18n("Copy %1->Output").arg("A"), id++ ); + m->insertItem( i18n("Copy %1->Output").arg("B"), id++ ); + m->insertItem( i18n("Copy %1->Output").arg("C"), id++ ); + m->insertItem( i18n("Swap %1<->Output").arg("A"), id++ ); + m->insertItem( i18n("Swap %1<->Output").arg("B"), id++ ); + m->insertItem( i18n("Swap %1<->Output").arg("C"), id++ ); connect( m, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwapCopyNames(int))); button->setPopup(m); @@ -170,7 +170,7 @@ OpenDialog::OpenDialog( connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( reject() ) ); l->addWidget( button,1 ); - TQSize sh = tqsizeHint(); + TQSize sh = sizeHint(); setFixedHeight( sh.height() ); m_bInputFileNameChanged = false; @@ -339,47 +339,47 @@ void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu FindDialog::FindDialog(TQWidget* pParent) : TQDialog( pParent ) { - TQGridLayout* tqlayout = new TQGridLayout( this ); - tqlayout->setMargin(5); - tqlayout->setSpacing(5); + TQGridLayout* layout = new TQGridLayout( this ); + layout->setMargin(5); + layout->setSpacing(5); int line=0; - tqlayout->addMultiCellWidget( new TQLabel(i18n("Search text:"),this), line,line,0,1 ); + layout->addMultiCellWidget( new TQLabel(i18n("Search text:"),this), line,line,0,1 ); ++line; m_pSearchString = new TQLineEdit( this ); - tqlayout->addMultiCellWidget( m_pSearchString, line,line,0,1 ); + layout->addMultiCellWidget( m_pSearchString, line,line,0,1 ); ++line; m_pCaseSensitive = new TQCheckBox(i18n("Case sensitive"),this); - tqlayout->addWidget( m_pCaseSensitive, line, 1 ); + layout->addWidget( m_pCaseSensitive, line, 1 ); m_pSearchInA = new TQCheckBox(i18n("Search A"),this); - tqlayout->addWidget( m_pSearchInA, line, 0 ); + layout->addWidget( m_pSearchInA, line, 0 ); m_pSearchInA->setChecked( true ); ++line; m_pSearchInB = new TQCheckBox(i18n("Search B"),this); - tqlayout->addWidget( m_pSearchInB, line, 0 ); + layout->addWidget( m_pSearchInB, line, 0 ); m_pSearchInB->setChecked( true ); ++line; m_pSearchInC = new TQCheckBox(i18n("Search C"),this); - tqlayout->addWidget( m_pSearchInC, line, 0 ); + layout->addWidget( m_pSearchInC, line, 0 ); m_pSearchInC->setChecked( true ); ++line; m_pSearchInOutput = new TQCheckBox(i18n("Search output"),this); - tqlayout->addWidget( m_pSearchInOutput, line, 0 ); + layout->addWidget( m_pSearchInOutput, line, 0 ); m_pSearchInOutput->setChecked( true ); ++line; TQPushButton* pButton = new TQPushButton( i18n("&Search"), this ); - tqlayout->addWidget( pButton, line, 0 ); + layout->addWidget( pButton, line, 0 ); connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); pButton = new TQPushButton( i18n("&Cancel"), this ); - tqlayout->addWidget( pButton, line, 1 ); + layout->addWidget( pButton, line, 1 ); connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); hide(); @@ -498,7 +498,7 @@ RegExpTester::RegExpTester( TQWidget* pParent, const TQString& autoMergeRegExpTo pGrid->addWidget(pButton,line,1); connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); - resize( 800, tqsizeHint().height() ); + resize( 800, sizeHint().height() ); } void RegExpTester::init( const TQString& autoMergeRegExp, const TQString& historyStartRegExp, const TQString& historyEntryStartRegExp, const TQString historySortKeyOrder ) |