summaryrefslogtreecommitdiffstats
path: root/kompare/komparepart/kompare_part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kompare/komparepart/kompare_part.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparepart/kompare_part.cpp')
-rw-r--r--kompare/komparepart/kompare_part.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp
index bf15bb4d..24c23ffe 100644
--- a/kompare/komparepart/kompare_part.cpp
+++ b/kompare/komparepart/kompare_part.cpp
@@ -56,9 +56,9 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory )
ViewSettings* KomparePart::m_viewSettings = 0L;
DiffSettings* KomparePart::m_diffSettings = 0L;
-KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList & /*args*/ ) :
- KParts::ReadWritePart(parent, name),
+KomparePart::KomparePart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) :
+ KParts::ReadWritePart(tqparent, name),
m_tempDiff( 0 ),
m_info()
{
@@ -76,8 +76,8 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
// This creates the "Model creator" and connects the signals and slots
m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" );
- connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )),
- this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
+ connect( m_modelList, TQT_SIGNAL(status( Kompare::tqStatus )),
+ this, TQT_SLOT(slotSettqStatus( Kompare::tqStatus )) );
connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
connect( m_modelList, TQT_SIGNAL(error( TQString )),
@@ -116,7 +116,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
this, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
// This creates the splitterwidget and connects the signals and slots
- m_splitter = new KompareSplitter ( m_viewSettings, parentWidget, widgetName );
+ m_splitter = new KompareSplitter ( m_viewSettings, tqparentWidget, widgetName );
connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
@@ -136,7 +136,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) );
// notify the part that this is our internal widget
- setWidget( m_splitter->parentWidget() );
+ setWidget( m_splitter->tqparentWidget() );
setupActions();
@@ -208,7 +208,7 @@ bool KomparePart::openDiff( const KURL& url )
result = m_modelList->openDiff( m_info.localSource );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
else
{
@@ -232,7 +232,7 @@ bool KomparePart::openDiff( const TQString& diffOutput )
m_modelList->show();
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
return value;
@@ -266,7 +266,7 @@ const TQString KomparePart::fetchURL( const KURL& url )
{
if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) )
{
- slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).arg( url.prettyURL() ) );
+ slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).tqarg( url.prettyURL() ) );
tempFileName = "";
}
return tempFileName;
@@ -278,7 +278,7 @@ const TQString KomparePart::fetchURL( const KURL& url )
return url.path();
else
{
- slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).arg( url.prettyURL() ) );
+ slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).tqarg( url.prettyURL() ) );
return tempFileName;
}
}
@@ -308,7 +308,7 @@ void KomparePart::compare( const KURL& source, const KURL& destination )
m_modelList->compare( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -329,7 +329,7 @@ void KomparePart::compareFiles( const KURL& sourceFile, const KURL& destinationF
m_modelList->compareFiles( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -350,7 +350,7 @@ void KomparePart::compareDirs( const KURL& sourceDirectory, const KURL& destinat
m_modelList->compareDirs( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -359,7 +359,7 @@ void KomparePart::compare3Files( const KURL& /*originalFile*/, const KURL& /*cha
// FIXME: actually implement this some day :)
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
@@ -378,7 +378,7 @@ void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
m_modelList->openFileAndDiff( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -398,7 +398,7 @@ void KomparePart::openDirAndDiff ( const KURL& dir, const KURL& diffFile )
m_modelList->openDirAndDiff( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -415,7 +415,7 @@ bool KomparePart::saveAll()
bool result = m_modelList->saveAll();
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
return result;
}
@@ -484,7 +484,7 @@ KAboutData *KomparePart::createAboutData()
return about;
}
-void KomparePart::slotSetStatus( enum Kompare::Status status )
+void KomparePart::slotSettqStatus( enum Kompare::tqStatus status )
{
updateActions();
@@ -496,10 +496,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status )
emit setStatusBarText( i18n( "Parsing diff output..." ) );
break;
case Kompare::FinishedParsing:
- updateStatus();
+ updatetqStatus();
break;
case Kompare::FinishedWritingDiff:
- updateStatus();
+ updatetqStatus();
emit diffURLChanged();
break;
default:
@@ -532,7 +532,7 @@ void KomparePart::updateCaption()
emit setWindowCaption( text );
}
-void KomparePart::updateStatus()
+void KomparePart::updatetqStatus()
{
TQString source = m_info.source.prettyURL();
TQString destination = m_info.destination.prettyURL();
@@ -543,26 +543,26 @@ void KomparePart::updateStatus()
{
case Kompare::ComparingFiles :
text = i18n( "Comparing file %1 with file %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::ComparingDirs :
text = i18n( "Comparing files in %1 with files in %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::ShowingDiff :
- text = i18n( "Viewing diff output from %1" ).arg( source );
+ text = i18n( "Viewing diff output from %1" ).tqarg( source );
break;
case Kompare::BlendingFile :
text = i18n( "Blending diff output from %1 into file %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::BlendingDir :
text = i18n( "Blending diff output from %1 into folder %2" )
- .arg( m_info.source.prettyURL() )
- .arg( m_info.destination.prettyURL() );
+ .tqarg( m_info.source.prettyURL() )
+ .tqarg( m_info.destination.prettyURL() );
break;
default:
break;
@@ -608,7 +608,7 @@ void KomparePart::slotSwap()
// Update window caption and statusbar text
updateCaption();
- updateStatus();
+ updatetqStatus();
m_modelList->swap();
}
@@ -666,7 +666,7 @@ void KomparePart::slotShowDiffstats( void )
KMessageBox::information( 0L, i18n(
"No diff file, or no 2 files have been diffed. "
"Therefore no stats are available."),
- i18n("Diff Statistics"), TQString::null, false );
+ i18n("Diff Statistics"), TQString(), false );
}
else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared
KMessageBox::information( 0L, i18n(
@@ -678,9 +678,9 @@ void KomparePart::slotShowDiffstats( void )
"Format: %3\n"
"Number of hunks: %4\n"
"Number of differences: %5")
- .arg(oldFile).arg(newFile).arg(diffFormat)
- .arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), TQString::null, false );
+ .tqarg(oldFile).tqarg(newFile).tqarg(diffFormat)
+ .tqarg(noOfHunks).tqarg(noOfDiffs),
+ i18n("Diff Statistics"), TQString(), false );
} else { // more than 1 file in diff, or 2 directories compared
KMessageBox::information( 0L, i18n(
"Statistics:\n"
@@ -693,9 +693,9 @@ void KomparePart::slotShowDiffstats( void )
"\n"
"Number of hunks: %5\n"
"Number of differences: %6")
- .arg(filesInDiff).arg(diffFormat).arg(oldFile)
- .arg(newFile).arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), TQString::null, false );
+ .tqarg(filesInDiff).tqarg(diffFormat).tqarg(oldFile)
+ .tqarg(newFile).tqarg(noOfHunks).tqarg(noOfDiffs),
+ i18n("Diff Statistics"), TQString(), false );
}
}