diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:30:18 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:30:18 -0600 |
commit | f3372e7bea9bbc288e039d85d660450220a637d8 (patch) | |
tree | a67f22c6994e07957a7d7053caa39c3808128f07 /src/directorymergewindow.cpp | |
parent | b6e4d65c272eed16b317a7f8fed20d05b7bd8236 (diff) | |
download | kdiff3-f3372e7bea9bbc288e039d85d660450220a637d8.tar.gz kdiff3-f3372e7bea9bbc288e039d85d660450220a637d8.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/directorymergewindow.cpp')
-rw-r--r-- | src/directorymergewindow.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
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); |