summaryrefslogtreecommitdiffstats
path: root/kdiff3plugin/kdiff3plugin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
commitf636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch)
tree5365045e6bce685a7cbaeb81b4797a719e86089f /kdiff3plugin/kdiff3plugin.cpp
parent63862fdfcb61f302ef69e86d40772bb1318d3763 (diff)
downloadkdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz
kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdiff3plugin/kdiff3plugin.cpp')
-rwxr-xr-xkdiff3plugin/kdiff3plugin.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kdiff3plugin/kdiff3plugin.cpp b/kdiff3plugin/kdiff3plugin.cpp
index 293f899..08a3cbe 100755
--- a/kdiff3plugin/kdiff3plugin.cpp
+++ b/kdiff3plugin/kdiff3plugin.cpp
@@ -31,7 +31,7 @@
//#include <iostream>
-static QStringList* s_pHistory=0;
+static TQStringList* s_pHistory=0;
class KDiff3PluginFactory : public KGenericFactory < KDiff3Plugin, KonqPopupMenu >
{
@@ -44,7 +44,7 @@ public:
if (s_pHistory==0)
{
//std::cout << "New History: " << instanceName << std::endl;
- s_pHistory = new QStringList;
+ s_pHistory = new TQStringList;
m_pConfig = new KSimpleConfig( "kdiff3pluginrc", false );
*s_pHistory = m_pConfig->readListEntry("HistoryStack");
}
@@ -64,17 +64,17 @@ public:
K_EXPORT_COMPONENT_FACTORY (libkdiff3plugin, KDiff3PluginFactory ("kdiff3plugin"))
-KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const QStringList & /* list */ )
+KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const TQStringList & /* list */ )
:KonqPopupMenuPlugin (pPopupmenu, name)
{
if (KStandardDirs::findExe ("kdiff3").isNull ())
return;
- m_pParentWidget = pPopupmenu->parentWidget();
+ m_pParentWidget = pPopupmenu->tqparentWidget();
KGlobal::locale()->insertCatalogue("kdiff3_plugin");
- // remember currently selected files (copy to a QStringList)
+ // remember currently selected files (copy to a TQStringList)
KFileItemList itemList = pPopupmenu->fileItemList();
for ( KFileItem *item = itemList.first(); item; item = itemList.next() )
{
@@ -96,27 +96,27 @@ KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const Q
KActionMenu* pActionMenu = new KActionMenu (i18n ("KDiff3"), "kdiff3", actionCollection (), "kdiff3_menu" );
KAction* pAction = 0;
- QString s;
+ TQString s;
if(m_list.count() == 1)
{
int historyCount = s_pHistory ? s_pHistory->count() : 0;
- s = i18n("Compare with %1").arg( historyCount>0 ? s_pHistory->front() : QString() );
- pAction = new KAction ( s,0, this, SLOT(slotCompareWith()), actionCollection());
+ s = i18n("Compare with %1").tqarg( 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").arg( historyCount>0 ? s_pHistory->front() : QString() );
- pAction = new KAction( s, 0, this, SLOT(slotMergeWith()), actionCollection());
+ s = i18n("Merge with %1").tqarg( 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").arg( ( m_list.front() ) );
- pAction = new KAction ( s, 0, this, SLOT(slotSaveForLater()), actionCollection());
+ s = i18n("Save '%1' for later").tqarg( ( m_list.front() ) );
+ pAction = new KAction ( s, 0, this, TQT_SLOT(slotSaveForLater()), actionCollection());
pAction->setEnabled( m_list.count()>0 );
pActionMenu->insert(pAction);
- pAction = new KAction (i18n("3-way merge with base"), 0, this, SLOT(slotMergeThreeWay()), actionCollection());
+ pAction = new KAction (i18n("3-way merge with base"), 0, this, TQT_SLOT(slotMergeThreeWay()), actionCollection());
pAction->setEnabled( m_list.count()>0 && historyCount>=2 );
pActionMenu->insert (pAction);
@@ -125,32 +125,32 @@ KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const Q
KActionMenu* pHistoryMenu = new KActionMenu( i18n("Compare with ..."), "CompareWith", actionCollection (), "kdiff3_history_menu");
pHistoryMenu->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->insert(pHistoryMenu);
- for (QStringList::iterator i = s_pHistory->begin(); i!=s_pHistory->end(); ++i)
+ for (TQStringList::iterator i = s_pHistory->begin(); i!=s_pHistory->end(); ++i)
{
- pAction = new KAction( *i, "History", 0, this, SLOT(slotCompareWithHistoryItem()), actionCollection());
+ pAction = new KAction( *i, "History", 0, this, TQT_SLOT(slotCompareWithHistoryItem()), actionCollection());
pHistoryMenu->insert (pAction);
}
- pAction = new KAction (i18n("Clear list"), 0, this, SLOT(slotClearList()), actionCollection());
+ pAction = new KAction (i18n("Clear list"), 0, this, TQT_SLOT(slotClearList()), actionCollection());
pActionMenu->insert (pAction);
pAction->setEnabled( historyCount>0 );
}
}
else if(m_list.count() == 2)
{
- pAction = new KAction (i18n("Compare"), 0, this, SLOT(slotCompareTwoFiles()), actionCollection());
+ pAction = new KAction (i18n("Compare"), 0, this, TQT_SLOT(slotCompareTwoFiles()), actionCollection());
pActionMenu->insert (pAction);
}
else if ( m_list.count() == 3 )
{
- pAction = new KAction (i18n("3 way comparison"), 0, this, SLOT(slotCompareThreeFiles()), actionCollection());
+ pAction = new KAction (i18n("3 way comparison"), 0, this, TQT_SLOT(slotCompareThreeFiles()), actionCollection());
pActionMenu->insert (pAction);
}
- pAction = new KAction (i18n("About KDiff3 menu plugin ..."), 0, this, SLOT(slotAbout()), actionCollection());
+ pAction = new KAction (i18n("About KDiff3 menu plugin ..."), 0, this, TQT_SLOT(slotAbout()), actionCollection());
pActionMenu->insert (pAction);
addSeparator();
- addAction( pActionMenu );
+ tqaddAction( pActionMenu );
addSeparator();
}
@@ -162,7 +162,7 @@ void KDiff3Plugin::slotCompareWith()
{
if ( m_list.count() > 0 && s_pHistory && ! s_pHistory->empty() )
{
- QStringList args;
+ TQStringList args;
args << s_pHistory->front();
args << m_list.front();
kapp->kdeinitExec ("kdiff3", args);
@@ -174,7 +174,7 @@ void KDiff3Plugin::slotCompareWithHistoryItem()
const KAction* pAction = dynamic_cast<const KAction*>( sender() );
if ( m_list.count() > 0 && pAction )
{
- QStringList args;
+ TQStringList args;
args << pAction->text();
args << m_list.front();
kapp->kdeinitExec ("kdiff3", args);
@@ -185,7 +185,7 @@ void KDiff3Plugin::slotCompareTwoFiles()
{
if ( m_list.count() == 2 )
{
- QStringList args;
+ TQStringList args;
args << m_list.front();
args << m_list.back();
kapp->kdeinitExec ("kdiff3", args);
@@ -196,7 +196,7 @@ void KDiff3Plugin::slotCompareThreeFiles()
{
if ( m_list.count() == 3 )
{
- QStringList args;
+ TQStringList args;
args << m_list[0];
args << m_list[1];
args << m_list[2];
@@ -208,7 +208,7 @@ void KDiff3Plugin::slotMergeWith()
{
if ( m_list.count() > 0 && s_pHistory && ! s_pHistory->empty() )
{
- QStringList args;
+ TQStringList args;
args << s_pHistory->front();
args << m_list.front();
args << ( "-o" + m_list.front() );
@@ -220,7 +220,7 @@ void KDiff3Plugin::slotMergeThreeWay()
{
if ( m_list.count() > 0 && s_pHistory && s_pHistory->count()>=2 )
{
- QStringList args;
+ TQStringList args;
args << (*s_pHistory)[1];
args << (*s_pHistory)[0];
args << m_list.front();
@@ -247,7 +247,7 @@ void KDiff3Plugin::slotClearList()
void KDiff3Plugin::slotAbout()
{
- QString s = i18n("KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
+ TQString s = i18n("KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n\n");
s += i18n("Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"