summaryrefslogtreecommitdiffstats
path: root/kompare
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kompare
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare')
-rw-r--r--kompare/interfaces/kompareinterface.cpp2
-rw-r--r--kompare/interfaces/kompareinterface.h12
-rw-r--r--kompare/kompare_shell.cpp106
-rw-r--r--kompare/kompare_shell.h6
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.cpp82
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.h66
-rw-r--r--kompare/komparepart/kompare_part.cpp170
-rw-r--r--kompare/komparepart/kompare_part.h18
-rw-r--r--kompare/komparepart/kompare_qsplitter.h86
-rw-r--r--kompare/komparepart/kompareconnectwidget.cpp76
-rw-r--r--kompare/komparepart/kompareconnectwidget.h26
-rw-r--r--kompare/komparepart/komparelistview.cpp114
-rw-r--r--kompare/komparepart/komparelistview.h46
-rw-r--r--kompare/komparepart/kompareprefdlg.cpp4
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.cpp58
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.h8
-rw-r--r--kompare/komparepart/komparesplitter.cpp98
-rw-r--r--kompare/komparepart/komparesplitter.h16
-rw-r--r--kompare/kompareurldialog.cpp26
-rw-r--r--kompare/kompareurldialog.h10
-rw-r--r--kompare/libdialogpages/diffpage.cpp142
-rw-r--r--kompare/libdialogpages/diffpage.h34
-rw-r--r--kompare/libdialogpages/diffsettings.cpp2
-rw-r--r--kompare/libdialogpages/diffsettings.h18
-rw-r--r--kompare/libdialogpages/filespage.cpp36
-rw-r--r--kompare/libdialogpages/filespage.h20
-rw-r--r--kompare/libdialogpages/filessettings.cpp4
-rw-r--r--kompare/libdialogpages/filessettings.h18
-rw-r--r--kompare/libdialogpages/pagebase.cpp24
-rw-r--r--kompare/libdialogpages/pagebase.h8
-rw-r--r--kompare/libdialogpages/settingsbase.cpp4
-rw-r--r--kompare/libdialogpages/settingsbase.h4
-rw-r--r--kompare/libdialogpages/viewpage.cpp68
-rw-r--r--kompare/libdialogpages/viewpage.h8
-rw-r--r--kompare/libdialogpages/viewsettings.cpp18
-rw-r--r--kompare/libdialogpages/viewsettings.h34
-rw-r--r--kompare/libdiff2/cvsdiffparser.cpp22
-rw-r--r--kompare/libdiff2/cvsdiffparser.h4
-rw-r--r--kompare/libdiff2/difference.cpp8
-rw-r--r--kompare/libdiff2/difference.h42
-rw-r--r--kompare/libdiff2/diffhunk.cpp12
-rw-r--r--kompare/libdiff2/diffhunk.h14
-rw-r--r--kompare/libdiff2/diffmodel.cpp38
-rw-r--r--kompare/libdiff2/diffmodel.h66
-rw-r--r--kompare/libdiff2/diffmodellist.h10
-rw-r--r--kompare/libdiff2/diffparser.cpp16
-rw-r--r--kompare/libdiff2/diffparser.h2
-rw-r--r--kompare/libdiff2/kompare.h14
-rw-r--r--kompare/libdiff2/komparemodellist.cpp164
-rw-r--r--kompare/libdiff2/komparemodellist.h52
-rw-r--r--kompare/libdiff2/kompareprocess.cpp44
-rw-r--r--kompare/libdiff2/kompareprocess.h16
-rw-r--r--kompare/libdiff2/levenshteintable.cpp18
-rw-r--r--kompare/libdiff2/parser.cpp20
-rw-r--r--kompare/libdiff2/parser.h6
-rw-r--r--kompare/libdiff2/parserbase.cpp54
-rw-r--r--kompare/libdiff2/parserbase.h60
-rw-r--r--kompare/libdiff2/perforceparser.cpp32
-rw-r--r--kompare/libdiff2/perforceparser.h2
-rw-r--r--kompare/main.cpp4
60 files changed, 1096 insertions, 1096 deletions
diff --git a/kompare/interfaces/kompareinterface.cpp b/kompare/interfaces/kompareinterface.cpp
index 1522bad0..c8ff71bf 100644
--- a/kompare/interfaces/kompareinterface.cpp
+++ b/kompare/interfaces/kompareinterface.cpp
@@ -53,7 +53,7 @@ KompareInterface& KompareInterface::operator=( const KompareInterface& ki )
return *this;
}
-void KompareInterface::setEncoding( const QString& encoding )
+void KompareInterface::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
}
diff --git a/kompare/interfaces/kompareinterface.h b/kompare/interfaces/kompareinterface.h
index b9c0fcda..37fabe9f 100644
--- a/kompare/interfaces/kompareinterface.h
+++ b/kompare/interfaces/kompareinterface.h
@@ -4,8 +4,8 @@
#ifndef _KOMPARE_INTERFACE_H
#define _KOMPARE_INTERFACE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdemacros.h>
class KConfig;
@@ -32,7 +32,7 @@ public:
/**
* Open and parse the supplied diff output
*/
- virtual bool openDiff( const QString& diffOutput ) = 0;
+ virtual bool openDiff( const TQString& diffOutput ) = 0;
/**
* Open and parse the diff3 file at url.
@@ -42,7 +42,7 @@ public:
/**
* Open and parse the supplied diff3 output
*/
- virtual bool openDiff3( const QString& diff3Output ) = 0;
+ virtual bool openDiff3( const TQString& diff3Output ) = 0;
/**
* Compare, with diff, source with destination, can also be used if you dont
@@ -80,7 +80,7 @@ public:
/**
* This will set the encoding to use for all files that are read or for the diffoutput
*/
- virtual void setEncoding( const QString& encoding );
+ virtual void setEncoding( const TQString& encoding );
public:
/**
@@ -99,7 +99,7 @@ public:
protected:
// Add all variables to the KompareInterfacePrivate class and access them through the kip pointer
KompareInterfacePrivate* kip;
- QString m_encoding;
+ TQString m_encoding;
};
#endif /* _KOMPARE_INTERFACE_H */
diff --git a/kompare/kompare_shell.cpp b/kompare/kompare_shell.cpp
index 3840e272..66bf89d2 100644
--- a/kompare/kompare_shell.cpp
+++ b/kompare/kompare_shell.cpp
@@ -61,14 +61,14 @@ KompareShell::KompareShell()
setupStatusBar();
KTrader::OfferList offers = KTrader::self()->query( "text/x-diff",
- "Kompare/ViewPart", QString::null, QString::null );
+ "Kompare/ViewPart", TQString::null, TQString::null );
#ifdef NDEBUG
for( int i = 0; i < offers.count(); i++ )
{
kdDebug(8102) << "One kservicetype checked..." << endl;
KService::Ptr ptr2 = *(offers.at( i ));
- QStringList list = ptr2->serviceTypes();
- for ( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
+ TQStringList list = ptr2->serviceTypes();
+ for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
kdDebug(8102) << *it2 << endl;
}
#endif
@@ -108,7 +108,7 @@ KompareShell::KompareShell()
}
offers.clear();
- offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", QString::null );
+ offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString::null );
if ( offers.count() == 0 )
{
KMessageBox::error(this, i18n( "Could not find our KompareNavigationPart." ) );
@@ -140,21 +140,21 @@ KompareShell::KompareShell()
}
// Hook up the inter part communication
- connect( m_viewPart, SIGNAL( modelsChanged(const Diff2::DiffModelList*) ),
- m_navTreePart, SLOT( slotModelsChanged( const Diff2::DiffModelList*) ) );
+ connect( m_viewPart, TQT_SIGNAL( modelsChanged(const Diff2::DiffModelList*) ),
+ m_navTreePart, TQT_SLOT( slotModelsChanged( const Diff2::DiffModelList*) ) );
- connect( m_viewPart, SIGNAL( kompareInfo(Kompare::Info*) ),
- m_navTreePart, SLOT( slotKompareInfo(Kompare::Info*) ) );
+ connect( m_viewPart, TQT_SIGNAL( kompareInfo(Kompare::Info*) ),
+ m_navTreePart, TQT_SLOT( slotKompareInfo(Kompare::Info*) ) );
- connect( m_navTreePart, SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ),
- m_viewPart, SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ) );
- connect( m_viewPart, SIGNAL( setSelection(const Diff2::DiffModel*, const Diff2::Difference*) ),
- m_navTreePart, SLOT( slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*) ) );
+ connect( m_navTreePart, TQT_SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ),
+ m_viewPart, TQT_SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ) );
+ connect( m_viewPart, TQT_SIGNAL( setSelection(const Diff2::DiffModel*, const Diff2::Difference*) ),
+ m_navTreePart, TQT_SLOT( slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*) ) );
- connect( m_navTreePart, SIGNAL( selectionChanged(const Diff2::Difference*) ),
- m_viewPart, SIGNAL( selectionChanged(const Diff2::Difference*) ) );
- connect( m_viewPart, SIGNAL( setSelection(const Diff2::Difference*) ),
- m_navTreePart, SLOT( slotSetSelection(const Diff2::Difference*) ) );
+ connect( m_navTreePart, TQT_SIGNAL( selectionChanged(const Diff2::Difference*) ),
+ m_viewPart, TQT_SIGNAL( selectionChanged(const Diff2::Difference*) ) );
+ connect( m_viewPart, TQT_SIGNAL( setSelection(const Diff2::Difference*) ),
+ m_navTreePart, TQT_SLOT( slotSetSelection(const Diff2::Difference*) ) );
// This is the interpart interface, it is signal and slot based so no "real" nterface here
// All you have to do is connect the parts from your application.
@@ -162,18 +162,18 @@ KompareShell::KompareShell()
// from the method with the same name in KompareModelList.
// There is currently no applying possible from the navtreepart to the viewpart
- connect( m_viewPart, SIGNAL(applyDifference(bool)),
- m_navTreePart, SLOT(slotApplyDifference(bool)) );
- connect( m_viewPart, SIGNAL(applyAllDifferences(bool)),
- m_navTreePart, SLOT(slotApplyAllDifferences(bool)) );
- connect( m_viewPart, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- m_navTreePart, SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyDifference(bool)),
+ m_navTreePart, TQT_SLOT(slotApplyDifference(bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyAllDifferences(bool)),
+ m_navTreePart, TQT_SLOT(slotApplyAllDifferences(bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ m_navTreePart, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
// Hook up the KomparePart -> KompareShell communication
- connect( m_viewPart, SIGNAL( setStatusBarModelInfo( int, int, int, int, int ) ),
- this, SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) );
- connect( m_viewPart, SIGNAL( setStatusBarText(const QString&) ),
- this, SLOT( slotSetStatusBarText(const QString&) ) );
+ connect( m_viewPart, TQT_SIGNAL( setStatusBarModelInfo( int, int, int, int, int ) ),
+ this, TQT_SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) );
+ connect( m_viewPart, TQT_SIGNAL( setStatusBarText(const TQString&) ),
+ this, TQT_SLOT( slotSetStatusBarText(const TQString&) ) );
// Read basic main-view settings, and set to autosave
setAutoSaveSettings( "General Options" );
@@ -198,11 +198,11 @@ void KompareShell::openDiff(const KURL& url)
void KompareShell::openStdin()
{
kdDebug(8102) << "Using stdin to read the diff" << endl;
- QFile file;
+ TQFile file;
file.open( IO_ReadOnly, stdin );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
- QString diff = stream.read();
+ TQString diff = stream.read();
file.close();
@@ -228,26 +228,26 @@ void KompareShell::blend( const KURL& url1, const KURL& diff )
void KompareShell::setupActions()
{
- KAction* open = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
+ KAction* open = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
open->setText( i18n( "&Open Diff..." ) );
new KAction( i18n("&Compare Files..."), "fileopen", Qt::CTRL + Qt::Key_C,
- this, SLOT(slotFileCompareFiles()),
+ this, TQT_SLOT(slotFileCompareFiles()),
actionCollection(), "file_compare_files" );
new KAction( i18n("&Blend URL with Diff..."), "fileblend", Qt::CTRL + Qt::Key_B,
- this, SLOT(slotFileBlendURLAndDiff()),
+ this, TQT_SLOT(slotFileBlendURLAndDiff()),
actionCollection(), "file_blend_url" );
- KStdAction::quit( this, SLOT( slotFileClose() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( slotFileClose() ), actionCollection() );
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
createStandardStatusBarAction();
#endif
setStandardToolBarMenuEnabled(true);
- m_showTextView = new KToggleAction( i18n("Show T&ext View"), 0, this, SLOT(slotShowTextView()),
+ m_showTextView = new KToggleAction( i18n("Show T&ext View"), 0, this, TQT_SLOT(slotShowTextView()),
actionCollection(), "options_show_text_view" );
m_showTextView->setCheckedState(i18n("Hide T&ext View"));
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
}
void KompareShell::setupStatusBar()
@@ -265,8 +265,8 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int
{
kdDebug(8102) << "KompareShell::updateStatusBar()" << endl;
- QString fileStr;
- QString diffStr;
+ TQString fileStr;
+ TQString diffStr;
if ( modelIndex >= 0 )
fileStr = i18n( " %1 of %n file ", " %1 of %n files ", modelCount ).arg( modelIndex + 1 );
@@ -283,12 +283,12 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int
statusBar()->changeItem( diffStr, ID_N_OF_N_DIFFERENCES );
}
-void KompareShell::slotSetStatusBarText( const QString& text )
+void KompareShell::slotSetStatusBarText( const TQString& text )
{
m_generalLabel->setText( text );
}
-void KompareShell::setCaption( const QString& caption )
+void KompareShell::setCaption( const TQString& caption )
{
// kdDebug() << kdBacktrace();
KParts::DockMainWindow::setCaption( caption, m_viewPart->isModified() );
@@ -321,7 +321,7 @@ void KompareShell::readProperties(KConfig* config)
// the app is being restored. Read in here whatever you wrote
// in 'saveProperties'
- QString mode = config->readEntry( "Mode", "ComparingFiles" );
+ TQString mode = config->readEntry( "Mode", "ComparingFiles" );
if ( mode == "ComparingFiles" )
{
m_mode = Kompare::ComparingFiles;
@@ -352,7 +352,7 @@ void KompareShell::readProperties(KConfig* config)
void KompareShell::slotFileOpen()
{
// FIXME: use different filedialog which gets encoding
- KURL url = KFileDialog::getOpenURL( QString::null, "text/x-diff", this );
+ KURL url = KFileDialog::getOpenURL( TQString::null, "text/x-diff", this );
if( !url.isEmpty() ) {
KompareShell* shell = new KompareShell();
kapp->ref();
@@ -369,7 +369,7 @@ void KompareShell::slotFileBlendURLAndDiff()
dialog->setFirstGroupBoxTitle( i18n( "File/Folder" ) );
dialog->setSecondGroupBoxTitle( i18n( "Diff Output" ) );
- KGuiItem blendGuiItem( i18n( "Blend" ), QString::null, i18n( "Blend this file or folder with the diff output" ), i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
+ KGuiItem blendGuiItem( i18n( "Blend" ), TQString::null, i18n( "Blend this file or folder with the diff output" ), i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
dialog->setButtonOK( blendGuiItem );
dialog->setGroup( "Recent Blend Files" );
@@ -377,7 +377,7 @@ void KompareShell::slotFileBlendURLAndDiff()
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
// diff output can not be a directory
dialog->setSecondURLRequesterMode( KFile::File|KFile::ExistingOnly );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
{
m_sourceURL = dialog->getFirstURL();
m_destinationURL = dialog->getSecondURL();
@@ -398,7 +398,7 @@ void KompareShell::slotFileCompareFiles()
dialog->setFirstGroupBoxTitle( i18n( "Source" ) );
dialog->setSecondGroupBoxTitle( i18n( "Destination" ) );
- KGuiItem compareGuiItem( i18n( "Compare" ), QString::null, i18n( "Compare these files or folders" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
+ KGuiItem compareGuiItem( i18n( "Compare" ), TQString::null, i18n( "Compare these files or folders" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog->setButtonOK( compareGuiItem );
dialog->setGroup( "Recent Compare Files" );
@@ -406,7 +406,7 @@ void KompareShell::slotFileCompareFiles()
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
dialog->setSecondURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
{
m_sourceURL = dialog->getFirstURL();
m_destinationURL = dialog->getSecondURL();
@@ -438,22 +438,22 @@ void KompareShell::slotShowTextView()
// FIXME: proper error checking
m_textViewWidget = createDockWidget( i18n("Text View"), SmallIcon( "text") );
m_textViewPart = KParts::ComponentFactory::createPartInstanceFromQuery<KTextEditor::Document>(
- QString::fromLatin1("KTextEditor/Document"),
- QString::null, (QWidget*)this, 0, (QWidget*)this, 0, QStringList(), &errCode );
+ TQString::fromLatin1("KTextEditor/Document"),
+ TQString::null, (TQWidget*)this, 0, (TQWidget*)this, 0, TQStringList(), &errCode );
if ( m_textViewPart )
{
m_textView = m_textViewPart->createView( this, 0 );
- m_textViewWidget->setWidget( static_cast<QWidget*>(m_textView) );
+ m_textViewWidget->setWidget( static_cast<TQWidget*>(m_textView) );
m_textEditIface = editInterface( m_textViewPart );
- connect( m_viewPart, SIGNAL(diffString(const QString&)),
- this, SLOT(slotSetDiffString(const QString&)) );
+ connect( m_viewPart, TQT_SIGNAL(diffString(const TQString&)),
+ this, TQT_SLOT(slotSetDiffString(const TQString&)) );
}
}
m_textViewWidget->manualDock( m_mainViewDock, KDockWidget:: DockCenter );
}
-void KompareShell::slotSetDiffString( const QString& diffString )
+void KompareShell::slotSetDiffString( const TQString& diffString )
{
if ( m_textEditIface )
m_textEditIface->setText( diffString );
@@ -475,7 +475,7 @@ void KompareShell::optionsConfigureToolbars()
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(newToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
diff --git a/kompare/kompare_shell.h b/kompare/kompare_shell.h
index be3bb150..f1fd87d2 100644
--- a/kompare/kompare_shell.h
+++ b/kompare/kompare_shell.h
@@ -84,7 +84,7 @@ public:
public slots:
void slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
- void setCaption( const QString& caption );
+ void setCaption( const TQString& caption );
/**
* This method only exists because i cant make main a frined of this class
@@ -108,7 +108,7 @@ protected:
void readProperties(KConfig *);
private slots:
- void slotSetStatusBarText( const QString& text );
+ void slotSetStatusBarText( const TQString& text );
void slotFileOpen();
void slotFileCompareFiles();
void slotFileBlendURLAndDiff();
@@ -116,7 +116,7 @@ private slots:
void slotFileClose();
void optionsConfigureKeys();
void optionsConfigureToolbars();
- void slotSetDiffString( const QString& diffString );
+ void slotSetDiffString( const TQString& diffString );
void newToolbarConfig();
private:
diff --git a/kompare/komparenavtreepart/komparenavtreepart.cpp b/kompare/komparenavtreepart/komparenavtreepart.cpp
index f2e10759..31b0388f 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.cpp
+++ b/kompare/komparenavtreepart/komparenavtreepart.cpp
@@ -37,7 +37,7 @@
using namespace Diff2;
-KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
+KompareNavTreePart::KompareNavTreePart( TQWidget* parent, const char* name )
: KParts::ReadOnlyPart( parent, name ),
m_splitter( 0 ),
m_modelList( 0 ),
@@ -53,7 +53,7 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_destination( "" ),
m_info( 0 )
{
- m_splitter = new QSplitter( Qt::Horizontal );
+ m_splitter = new TQSplitter( Qt::Horizontal );
setWidget( m_splitter );
@@ -82,14 +82,14 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_changesList->setRootIsDecorated( false );
m_changesList->setSorting( 0, true );
- connect( m_srcDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotSrcDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_destDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotDestDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_fileList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotFileListSelectionChanged( QListViewItem* )) );
- connect( m_changesList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotChangesListSelectionChanged( QListViewItem* )) );
+ connect( m_srcDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotSrcDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_destDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotDestDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_fileList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotFileListSelectionChanged( TQListViewItem* )) );
+ connect( m_changesList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotChangesListSelectionChanged( TQListViewItem* )) );
}
KompareNavTreePart::~KompareNavTreePart()
@@ -140,8 +140,8 @@ void KompareNavTreePart::buildTreeInMemory()
return;
}
- QString srcBase;
- QString destBase;
+ TQString srcBase;
+ TQString destBase;
DiffModel* model;
model = m_modelList->first();
@@ -177,8 +177,8 @@ void KompareNavTreePart::buildTreeInMemory()
m_srcRootItem = new KDirLVI( m_srcDirTree, srcBase );
m_destRootItem = new KDirLVI( m_destDirTree, destBase );
- QString srcPath;
- QString destPath;
+ TQString srcPath;
+ TQString destPath;
// Create the tree from the models
DiffModelListConstIterator modelIt = m_modelList->begin();
@@ -204,11 +204,11 @@ void KompareNavTreePart::buildDirectoryTree()
// kdDebug(8105) << "BuildDirTree called" << endl;
}
-QString KompareNavTreePart::compareFromEndAndReturnSame(
- const QString& string1,
- const QString& string2 )
+TQString KompareNavTreePart::compareFromEndAndReturnSame(
+ const TQString& string1,
+ const TQString& string2 )
{
- QString result;
+ TQString result;
int srcLen = string1.length();
int destLen = string2.length();
@@ -323,13 +323,13 @@ void KompareNavTreePart::slotSetSelection( const Difference* diff )
}
}
-void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotSrcDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the sourceDirectoryTree with item = " << item << endl;
m_srcDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the dest tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_destRootItem->setSelected( path );
@@ -341,13 +341,13 @@ void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotDestDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the destinationDirectoryTree with item = " << item << endl;
m_destDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the src tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_srcRootItem->setSelected( path );
@@ -359,7 +359,7 @@ void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotFileListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the fileList with item = " << item << endl;
@@ -378,7 +378,7 @@ void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
emit selectionChanged( m_selectedModel, m_selectedDifference );
}
-void KompareNavTreePart::slotChangesListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotChangesListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the changesList" << endl;
@@ -397,7 +397,7 @@ void KompareNavTreePart::slotApplyDifference( bool /*apply*/ )
void KompareNavTreePart::slotApplyAllDifferences( bool /*apply*/ )
{
- QPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
+ TQPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
kdDebug() << "m_diffToChangeItemDict.count() = " << m_diffToChangeItemDict.count() << endl;
@@ -417,7 +417,7 @@ void KompareNavTreePart::slotApplyDifference( const Difference* diff, bool /*app
void KChangeLVI::setDifferenceText()
{
- QString text;
+ TQString text;
switch( m_difference->type() ) {
case Difference::Change:
// Shouldn't this simply be diff->sourceLineCount() ?
@@ -457,13 +457,13 @@ KChangeLVI::KChangeLVI( KListView* parent, Difference* diff ) : KListViewItem( p
{
m_difference = diff;
- setText( 0, QString::number( diff->sourceLineNumber() ) );
- setText( 1, QString::number( diff->destinationLineNumber() ) );
+ setText( 0, TQString::number( diff->sourceLineNumber() ) );
+ setText( 1, TQString::number( diff->destinationLineNumber() ) );
setDifferenceText();
}
-int KChangeLVI::compare( QListViewItem* item, int column, bool ascending ) const
+int KChangeLVI::compare( TQListViewItem* item, int column, bool ascending ) const
{
if ( ascending )
{
@@ -498,7 +498,7 @@ KFileLVI::KFileLVI( KListView* parent, DiffModel* model ) : KListViewItem( paren
setSelectable( true );
}
-void KFileLVI::fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict )
+void KFileLVI::fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict )
{
changesList->clear();
diffToChangeItemDict->clear();
@@ -519,7 +519,7 @@ KFileLVI::~KFileLVI()
{
}
-KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KListView) constructor called with dir = " << dir << endl;
m_rootItem = true;
@@ -533,7 +533,7 @@ KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
setText( 0, m_dirName );
}
-KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KDirLVI* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl;
m_rootItem = false;
@@ -545,7 +545,7 @@ KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
}
// addModel always removes it own path from the beginning
-void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict )
+void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict )
{
// kdDebug(8105) << "KDirLVI::addModel called with path = " << path << " from KDirLVI with m_dirName = " << m_dirName << endl;
@@ -565,7 +565,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
KDirLVI* child;
- QString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
+ TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
child = findChild( dir );
if ( !child )
{
@@ -577,7 +577,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
child->addModel( path, model, modelToDirItemDict );
}
-KDirLVI* KDirLVI::findChild( QString dir )
+KDirLVI* KDirLVI::findChild( TQString dir )
{
// kdDebug(8105) << "KDirLVI::findChild called with dir = " << dir << endl;
KDirLVI* child;
@@ -592,7 +592,7 @@ KDirLVI* KDirLVI::findChild( QString dir )
return 0L;
}
-void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict )
+void KDirLVI::fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict )
{
fileList->clear();
@@ -607,7 +607,7 @@ void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFile
fileList->setSelected( fileList->firstChild(), true );
}
-QString KDirLVI::fullPath( QString& path )
+TQString KDirLVI::fullPath( TQString& path )
{
// if ( !path.isEmpty() )
// kdDebug(8105) << "KDirLVI::fullPath called with path = " << path << endl;
@@ -628,7 +628,7 @@ QString KDirLVI::fullPath( QString& path )
return path;
}
-KDirLVI* KDirLVI::setSelected( QString dir )
+KDirLVI* KDirLVI::setSelected( TQString dir )
{
// kdDebug(8105) << "KDirLVI::setSelected called with dir = " << dir << endl;
@@ -675,9 +675,9 @@ KompareNavTreePartFactory::~KompareNavTreePartFactory()
s_instance = 0L;
}
-KParts::Part* KompareNavTreePartFactory::createPartObject( QWidget* parentWidget, const char* widgetName,
- QObject* /*parent*/, const char* /*name*/,
- const char* /*classname*/, const QStringList & /*args*/ )
+KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* parentWidget, const char* widgetName,
+ TQObject* /*parent*/, const char* /*name*/,
+ const char* /*classname*/, const TQStringList & /*args*/ )
{
// Create an instance of our Part
KompareNavTreePart* obj = new KompareNavTreePart( parentWidget, widgetName );
diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h
index e2563d63..a126cfe5 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.h
+++ b/kompare/komparenavtreepart/komparenavtreepart.h
@@ -20,10 +20,10 @@
#ifndef KOMPARENAVTREEPART_H
#define KOMPARENAVTREEPART_H
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qsplitter.h>
-#include <qlistview.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqsplitter.h>
+#include <tqlistview.h>
#include <kparts/factory.h>
#include <kparts/part.h>
@@ -49,7 +49,7 @@ class KompareNavTreePart : public KParts::ReadOnlyPart
Q_OBJECT
public:
- KompareNavTreePart( QWidget* parent = 0L, const char* name = 0L );
+ KompareNavTreePart( TQWidget* parent = 0L, const char* name = 0L );
virtual ~KompareNavTreePart();
public:
@@ -66,10 +66,10 @@ signals:
void selectionChanged( const Diff2::Difference* diff );
private slots:
- void slotSrcDirTreeSelectionChanged ( QListViewItem* item );
- void slotDestDirTreeSelectionChanged( QListViewItem* item );
- void slotFileListSelectionChanged ( QListViewItem* item );
- void slotChangesListSelectionChanged( QListViewItem* item );
+ void slotSrcDirTreeSelectionChanged ( TQListViewItem* item );
+ void slotDestDirTreeSelectionChanged( TQListViewItem* item );
+ void slotFileListSelectionChanged ( TQListViewItem* item );
+ void slotChangesListSelectionChanged( TQListViewItem* item );
void slotApplyDifference( bool apply );
void slotApplyAllDifferences( bool apply );
@@ -84,22 +84,22 @@ private:
void buildDirectoryTree();
- QString compareFromEndAndReturnSame( const QString& string1, const QString& string2 );
- void addDirToTreeView( enum Kompare::Target, const QString& filename );
+ TQString compareFromEndAndReturnSame( const TQString& string1, const TQString& string2 );
+ void addDirToTreeView( enum Kompare::Target, const TQString& filename );
- KListViewItem* findDirInDirTree( const KListViewItem* parent, const QString& dir );
+ KListViewItem* findDirInDirTree( const KListViewItem* parent, const TQString& dir );
// KListViewItem* firstItem();
// KListViewItem* lastItem();
private:
- QSplitter* m_splitter;
+ TQSplitter* m_splitter;
const Diff2::DiffModelList* m_modelList;
- QPtrDict<KChangeLVI> m_diffToChangeItemDict;
- QPtrDict<KFileLVI> m_modelToFileItemDict;
- QPtrDict<KDirLVI> m_modelToSrcDirItemDict;
- QPtrDict<KDirLVI> m_modelToDestDirItemDict;
+ TQPtrDict<KChangeLVI> m_diffToChangeItemDict;
+ TQPtrDict<KFileLVI> m_modelToFileItemDict;
+ TQPtrDict<KDirLVI> m_modelToSrcDirItemDict;
+ TQPtrDict<KDirLVI> m_modelToDestDirItemDict;
KListView* m_srcDirTree;
KListView* m_destDirTree;
@@ -112,8 +112,8 @@ private:
const Diff2::DiffModel* m_selectedModel;
const Diff2::Difference* m_selectedDifference;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
struct Kompare::Info* m_info;
};
@@ -128,7 +128,7 @@ public:
~KChangeLVI();
public:
Diff2::Difference* difference() { return m_difference; };
- virtual int compare( QListViewItem* item, int column, bool ascending ) const;
+ virtual int compare( TQListViewItem* item, int column, bool ascending ) const;
void setDifferenceText();
private:
@@ -142,7 +142,7 @@ public:
~KFileLVI();
public:
Diff2::DiffModel* model() { return m_model; };
- void fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict );
+ void fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict );
private:
Diff2::DiffModel* m_model;
};
@@ -150,21 +150,21 @@ private:
class KDirLVI : public KListViewItem
{
public:
- KDirLVI( KDirLVI* parent, QString& dir );
- KDirLVI( KListView* parent, QString& dir );
+ KDirLVI( KDirLVI* parent, TQString& dir );
+ KDirLVI( KListView* parent, TQString& dir );
~KDirLVI();
public:
- void addModel( QString& dir, Diff2::DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict );
- QString& dirName() { return m_dirName; };
- QString fullPath( QString& path );
- KDirLVI* setSelected( QString dir );
- void fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict );
+ void addModel( TQString& dir, Diff2::DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict );
+ TQString& dirName() { return m_dirName; };
+ TQString fullPath( TQString& path );
+ KDirLVI* setSelected( TQString dir );
+ void fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict );
bool isRootItem() { return m_rootItem; };
private:
- KDirLVI* findChild( QString dir );
+ KDirLVI* findChild( TQString dir );
private:
Diff2::DiffModelList m_modelList;
- QString m_dirName;
+ TQString m_dirName;
bool m_rootItem;
};
@@ -178,9 +178,9 @@ class KompareNavTreePartFactory : public KParts::Factory
public:
KompareNavTreePartFactory();
virtual ~KompareNavTreePartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private:
diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp
index d74945e6..bf15bb4d 100644
--- a/kompare/komparepart/kompare_part.cpp
+++ b/kompare/komparepart/kompare_part.cpp
@@ -21,8 +21,8 @@
#include "kompare_qsplitter.h" // make sure we get there first
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kapplication.h>
@@ -56,8 +56,8 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory )
ViewSettings* KomparePart::m_viewSettings = 0L;
DiffSettings* KomparePart::m_diffSettings = 0L;
-KomparePart::KomparePart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/ ) :
+KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/ ) :
KParts::ReadWritePart(parent, name),
m_tempDiff( 0 ),
m_info()
@@ -76,64 +76,64 @@ KomparePart::KomparePart( QWidget *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, SIGNAL(status( Kompare::Status )),
- this, SLOT(slotSetStatus( Kompare::Status )) );
- connect( m_modelList, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
- this, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
- connect( m_modelList, SIGNAL(error( QString )),
- this, SLOT(slotShowError( QString )) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SIGNAL(appliedChanged()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SIGNAL(appliedChanged()) );
-
- connect( m_modelList, SIGNAL( setModified( bool ) ),
- this, SLOT( slotSetModified( bool ) ) );
+ connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )),
+ this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
+ 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 )),
+ this, TQT_SLOT(slotShowError( TQString )) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+
+ connect( m_modelList, TQT_SIGNAL( setModified( bool ) ),
+ this, TQT_SLOT( slotSetModified( bool ) ) );
// This is the stuff to connect the "interface" of the kompare part to the model inside
- connect( m_modelList, SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
- this, SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- this, SIGNAL(applyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- this, SIGNAL(applyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- this, SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
+ connect( m_modelList, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
+ this, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ this, TQT_SIGNAL(applyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ this, TQT_SIGNAL(applyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ 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 );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
-// connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
-// m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::Difference*)) );
- connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- m_splitter, SLOT(slotApplyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- m_splitter, SLOT(slotApplyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- m_splitter, SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
- connect( this, SIGNAL(configChanged()), m_splitter, SIGNAL(configChanged()) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+// connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
+// m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::Difference*)) );
+ connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ m_splitter, TQT_SLOT(slotApplyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
+ connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) );
// notify the part that this is our internal widget
setWidget( m_splitter->parentWidget() );
@@ -163,19 +163,19 @@ void KomparePart::setupActions()
// create our actions
m_saveAll = new KAction( i18n("Save &All"), "save_all", 0,
- this, SLOT(saveAll()),
+ this, TQT_SLOT(saveAll()),
actionCollection(), "file_save_all" );
m_saveDiff = new KAction( i18n("Save .&diff..."), 0,
- this, SLOT(saveDiff()),
+ this, TQT_SLOT(saveDiff()),
actionCollection(), "file_save_diff" );
m_swap = new KAction( i18n( "Swap Source with Destination" ), 0,
- this, SLOT(slotSwap()),
+ this, TQT_SLOT(slotSwap()),
actionCollection(), "file_swap" );
m_diffStats = new KAction( i18n( "Show Statistics" ), 0,
- this, SLOT(slotShowDiffstats()),
+ this, TQT_SLOT(slotShowDiffstats()),
actionCollection(), "file_diffstats" );
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
}
void KomparePart::updateActions()
@@ -186,7 +186,7 @@ void KomparePart::updateActions()
m_diffStats->setEnabled( m_modelList->modelCount() > 0 );
}
-void KomparePart::setEncoding( const QString& encoding )
+void KomparePart::setEncoding( const TQString& encoding )
{
kdDebug() << "Encoding: " << encoding << endl;
m_modelList->setEncoding( encoding );
@@ -218,7 +218,7 @@ bool KomparePart::openDiff( const KURL& url )
return result;
}
-bool KomparePart::openDiff( const QString& diffOutput )
+bool KomparePart::openDiff( const TQString& diffOutput )
{
bool value = false;
@@ -245,7 +245,7 @@ bool KomparePart::openDiff3( const KURL& diff3Url )
return false;
}
-bool KomparePart::openDiff3( const QString& diff3Output )
+bool KomparePart::openDiff3( const TQString& diff3Output )
{
// FIXME: Implement this !!!
kdDebug(8103) << "Not implemented yet. diff3 output is: " << endl;
@@ -253,15 +253,15 @@ bool KomparePart::openDiff3( const QString& diff3Output )
return false;
}
-bool KomparePart::exists( const QString& url )
+bool KomparePart::exists( const TQString& url )
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
return fi.exists();
}
-const QString KomparePart::fetchURL( const KURL& url )
+const TQString KomparePart::fetchURL( const KURL& url )
{
- QString tempFileName( "" );
+ TQString tempFileName( "" );
if ( !url.isLocalFile() )
{
if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) )
@@ -509,10 +509,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status )
void KomparePart::updateCaption()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -534,10 +534,10 @@ void KomparePart::updateCaption()
void KomparePart::updateStatus()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -571,7 +571,7 @@ void KomparePart::updateStatus()
emit setStatusBarText( text );
}
-void KomparePart::slotShowError( QString error )
+void KomparePart::slotShowError( TQString error )
{
KMessageBox::error( widget(), error );
}
@@ -602,7 +602,7 @@ void KomparePart::slotSwap()
m_info.source = m_info.destination;
m_info.destination = url;
- QString string = m_info.localSource;
+ TQString string = m_info.localSource;
m_info.localSource = m_info.localDestination;
m_info.localDestination = string;
@@ -618,15 +618,15 @@ void KomparePart::slotShowDiffstats( void )
// Fetch all the args needed for komparestatsmessagebox
// oldfile, newfile, diffformat, noofhunks, noofdiffs
- QString oldFile;
- QString newFile;
- QString diffFormat;
+ TQString oldFile;
+ TQString newFile;
+ TQString diffFormat;
int filesInDiff;
int noOfHunks;
int noOfDiffs;
- oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : QString( "" );
- newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : QString( "" );
+ oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : TQString( "" );
+ newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : TQString( "" );
if ( m_modelList->selectedModel() )
{
@@ -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"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared
KMessageBox::information( 0L, i18n(
@@ -680,7 +680,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %5")
.arg(oldFile).arg(newFile).arg(diffFormat)
.arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
} else { // more than 1 file in diff, or 2 directories compared
KMessageBox::information( 0L, i18n(
"Statistics:\n"
@@ -695,7 +695,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %6")
.arg(filesInDiff).arg(diffFormat).arg(oldFile)
.arg(newFile).arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
}
@@ -742,7 +742,7 @@ void KomparePart::optionsPreferences()
// show preferences
KomparePrefDlg* pref = new KomparePrefDlg( m_viewSettings, m_diffSettings );
- connect( pref, SIGNAL(applyClicked()), this, SIGNAL(configChanged()) );
+ connect( pref, TQT_SIGNAL(applyClicked()), this, TQT_SIGNAL(configChanged()) );
if ( pref->exec() )
emit configChanged();
diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h
index 0a9716c3..b7b05ce8 100644
--- a/kompare/komparepart/kompare_part.h
+++ b/kompare/komparepart/kompare_part.h
@@ -64,8 +64,8 @@ public:
/**
* Default constructor
*/
- KomparePart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/);
+ KomparePart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/);
/**
* Destructor
@@ -96,13 +96,13 @@ public:
virtual bool openDiff( const KURL& diffUrl );
/** Added on request of Harald Fernengel */
- virtual bool openDiff( const QString& diffOutput );
+ virtual bool openDiff( const TQString& diffOutput );
/** Open and parse the diff3 file at diff3Url */
virtual bool openDiff3( const KURL& diff3URL );
/** Open and parse the file diff3Output with the output of diff3 */
- virtual bool openDiff3( const QString& diff3Output );
+ virtual bool openDiff3( const TQString& diff3Output );
/** Compare, with diff, source with destination */
virtual void compare( const KURL& sourceFile, const KURL& destinationFile );
@@ -123,7 +123,7 @@ public:
virtual void openDirAndDiff ( const KURL& dir, const KURL& diffFile );
/** Reimplementing this because this one knows more about the real part then the interface */
- virtual void setEncoding( const QString& encoding );
+ virtual void setEncoding( const TQString& encoding );
// This is the interpart interface, it is signal and slot based so no "real" interface here
// All you have to do is connect the parts from your application.
@@ -166,7 +166,7 @@ signals:
void diffURLChanged();
void kompareInfo( Kompare::Info* info );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
-// void setStatusBarText( const QString& text );
+// void setStatusBarText( const TQString& text );
protected:
/**
@@ -183,7 +183,7 @@ protected:
protected slots:
void slotSetStatus( Kompare::Status status );
- void slotShowError( QString error );
+ void slotShowError( TQString error );
void slotSwap();
void slotShowDiffstats();
@@ -195,9 +195,9 @@ protected slots:
private:
void cleanUpTemporaryFiles();
void setupActions();
- bool exists( const QString& url );
+ bool exists( const TQString& url );
bool isDirectory( const KURL& url );
- const QString fetchURL( const KURL& url );
+ const TQString fetchURL( const KURL& url );
private:
// Uhm why were these static again ???
diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h
index 1f1be49d..ca7f4bd1 100644
--- a/kompare/komparepart/kompare_qsplitter.h
+++ b/kompare/komparepart/kompare_qsplitter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
**
-** Definition of QSplitter class
+** Definition of TQSplitter class
**
** Created : 980105
**
@@ -25,8 +25,8 @@
#define QSPLITTER_H
#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
+#include "tqframe.h"
+#include "tqvaluelist.h"
#endif // QT_H
#ifndef QT_NO_SPLITTER
@@ -43,14 +43,14 @@ public:
: opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
handleWidth( 0 ) { }
- QPtrList<QSplitterLayoutStruct> list;
+ TQPtrList<QSplitterLayoutStruct> list;
bool opaque : 8;
bool firstShow : 8;
bool childrenCollapsible : 8;
int handleWidth;
};
-class Q_EXPORT QSplitter : public QFrame
+class Q_EXPORT TQSplitter : public QFrame
{
Q_OBJECT
Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
@@ -62,9 +62,9 @@ public:
// ### Qt 4.0: remove Auto from public API
enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
- QSplitter( QWidget* parent = 0, const char* name = 0 );
- QSplitter( Orientation, QWidget* parent = 0, const char* name = 0 );
- ~QSplitter();
+ TQSplitter( TQWidget* parent = 0, const char* name = 0 );
+ TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
+ ~TQSplitter();
virtual void setOrientation( Orientation );
Orientation orientation() const { return orient; }
@@ -74,36 +74,36 @@ public:
void setChildrenCollapsible( bool );
bool childrenCollapsible() const;
- void setCollapsible( QWidget *w, bool );
- virtual void setResizeMode( QWidget *w, ResizeMode );
+ void setCollapsible( TQWidget *w, bool );
+ virtual void setResizeMode( TQWidget *w, ResizeMode );
virtual void setOpaqueResize( bool = TRUE );
bool opaqueResize() const;
- void moveToFirst( QWidget * );
- void moveToLast( QWidget * );
+ void moveToFirst( TQWidget * );
+ void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ TQValueList<int> sizes() const;
+ void setSizes( TQValueList<int> );
int handleWidth() const;
void setHandleWidth( int );
protected:
- void childEvent( QChildEvent * );
+ void childEvent( TQChildEvent * );
- bool event( QEvent * );
- void resizeEvent( QResizeEvent * );
+ bool event( TQEvent * );
+ void resizeEvent( TQResizeEvent * );
- int idAfter( QWidget* ) const;
+ int idAfter( TQWidget* ) const;
void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
+ virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y,
QCOORD w, QCOORD h );
- void styleChange( QStyle& );
+ void styleChange( TQStyle& );
int adjustPos( int, int );
virtual void setRubberband( int );
void getRange( int id, int *, int * );
@@ -120,23 +120,23 @@ public: // private (:
int adjustPos( int, int, int *, int *, int *, int * );
bool collapsible( QSplitterLayoutStruct * );
void processChildEvents();
- QSplitterLayoutStruct *findWidget( QWidget * );
- QSplitterLayoutStruct *addWidget( QWidget *, bool prepend = FALSE );
+ QSplitterLayoutStruct *findWidget( TQWidget * );
+ QSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = FALSE );
void recalcId();
void doMove( bool backwards, int pos, int id, int delta, bool upLeft,
bool mayCollapse );
- void setGeo( QWidget *w, int pos, int size, bool splitterMoved );
+ void setGeo( TQWidget *w, int pos, int size, bool splitterMoved );
int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize );
void updateHandles();
- inline QCOORD pick( const QPoint &p ) const
+ inline QCOORD pick( const TQPoint &p ) const
{ return orient == Horizontal ? p.x() : p.y(); }
- inline QCOORD pick( const QSize &s ) const
+ inline QCOORD pick( const TQSize &s ) const
{ return orient == Horizontal ? s.width() : s.height(); }
- inline QCOORD trans( const QPoint &p ) const
+ inline QCOORD trans( const TQPoint &p ) const
{ return orient == Vertical ? p.x() : p.y(); }
- inline QCOORD trans( const QSize &s ) const
+ inline QCOORD trans( const TQSize &s ) const
{ return orient == Vertical ? s.width() : s.height(); }
QSplitterPrivate *d;
@@ -146,20 +146,20 @@ public: // private (:
#ifndef QT_NO_TEXTSTREAM
// moc doesn't like these.
-// friend Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& );
-// friend Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& );
+// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
#endif
public:
#if defined(Q_DISABLE_COPY)
- QSplitter( const QSplitter & );
- QSplitter& operator=( const QSplitter & );
+ TQSplitter( const TQSplitter & );
+ TQSplitter& operator=( const TQSplitter & );
#endif
};
#ifndef QT_NO_TEXTSTREAM
-Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& );
-Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& );
+Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
#endif
class QSplitterHandle : public QWidget
@@ -167,29 +167,29 @@ class QSplitterHandle : public QWidget
Q_OBJECT
public:
QSplitterHandle( Orientation o,
- QSplitter *parent, const char* name=0 );
+ TQSplitter *parent, const char* name=0 );
void setOrientation( Orientation o );
Orientation orientation() const { return orient; }
bool opaque() const { return s->opaqueResize(); }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
int id() const { return myId; } // d->list.at(id())->wid == this
void setId( int i ) { myId = i; }
protected:
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
+ void paintEvent( TQPaintEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
public: // private (:
Orientation orient;
bool opaq;
int myId;
- QSplitter *s;
+ TQSplitter *s;
};
const uint Default = 2;
@@ -201,7 +201,7 @@ public:
uint isHandle : 1;
uint collapsible : 2;
uint resizeMode : 2;
- QWidget *wid;
+ TQWidget *wid;
QSplitterLayoutStruct()
: sizer( -1 ), collapsible( Default ) { }
diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp
index eed8e99c..57185e5a 100644
--- a/kompare/komparepart/kompareconnectwidget.cpp
+++ b/kompare/komparepart/kompareconnectwidget.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -41,19 +41,19 @@ KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left,
ViewSettings* settings,
KompareSplitter* parent,
const char* name ) :
- QSplitterHandle(Horizontal, (QSplitter *)parent, name),
+ QSplitterHandle(Horizontal, (TQSplitter *)parent, name),
m_wid ( left, right, settings, this, name ),
m_label ( "", this ),
m_layout ( this )
{
- setSizePolicy ( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored) );
- m_wid.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) );
- m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) );
+ m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
m_label.setMargin(3);
- QFrame* bottomLine = new QFrame(this);
- bottomLine->setFrameShape(QFrame::HLine);
- bottomLine->setFrameShadow ( QFrame::Plain );
- bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ TQFrame* bottomLine = new TQFrame(this);
+ bottomLine->setFrameShape(TQFrame::HLine);
+ bottomLine->setFrameShadow ( TQFrame::Plain );
+ bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_layout.setSpacing(0);
m_layout.setMargin(0);
@@ -66,14 +66,14 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame()
{
}
-QSize KompareConnectWidgetFrame::sizeHint() const
+TQSize KompareConnectWidgetFrame::sizeHint() const
{
- return QSize(50, style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
+ return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) );
}
static int kMouseOffset;
-void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e )
{
if ( !(e->state()&LeftButton) )
return;
@@ -84,14 +84,14 @@ void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
((KompareSplitter*)s)->moveSplitter( pos, id() );
}
-void KompareConnectWidgetFrame::mousePressEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
kMouseOffset = s->pick( e->pos() );
QSplitterHandle::mousePressEvent(e);
}
-void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e )
{
if ( !opaque() && e->button() == LeftButton ) {
QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) )
@@ -101,17 +101,17 @@ void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
}
KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, QWidget* parent, const char* name )
- : QWidget(parent, name),
+ ViewSettings* settings, TQWidget* parent, const char* name )
+ : TQWidget(parent, name),
m_settings( settings ),
m_leftView( left ),
m_rightView( right ),
m_selectedModel( 0 ),
m_selectedDifference( 0 )
{
-// connect( m_settings, SIGNAL( settingsChanged() ), this, SLOT( slotDelayedRepaint() ) );
+// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) );
setBackgroundMode( NoBackground );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setFocusProxy( parent->parentWidget() );
}
@@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe
void KompareConnectWidget::slotDelayedRepaint()
{
- QTimer::singleShot( 0, this, SLOT( repaint() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) );
}
void KompareConnectWidget::slotSetSelection( const Difference* diff )
@@ -152,13 +152,13 @@ void KompareConnectWidget::slotSetSelection( const Difference* diff )
slotDelayedRepaint();
}
-void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
+void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ )
{
// kdDebug(8106) << "KompareConnectWidget::paintEvent()" << endl;
- QPixmap pixbuf(size());
- QPainter paint(&pixbuf, this);
- QPainter* p = &paint;
+ TQPixmap pixbuf(size());
+ TQPainter paint(&pixbuf, this);
+ TQPainter* p = &paint;
p->fillRect( 0, 0, pixbuf.width(), pixbuf.height(), white.dark(110) );
@@ -181,14 +181,14 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
DifferenceListConstIterator diffIt = differences->at( first );
DifferenceListConstIterator dEnd = differences->at( last + 1 );
- QRect leftRect, rightRect;
+ TQRect leftRect, rightRect;
for ( int i = first; i <= last; ++diffIt, ++i )
{
Difference* diff = *diffIt;
bool selected = ( diff == m_selectedDifference );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
leftRect = m_rightView->itemRect( i );
rightRect = m_leftView->itemRect( i );
@@ -211,10 +211,10 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
br = br <= 32767 ? br : 32767;
// kdDebug(8106) << "drawing: " << tl << " " << tr << " " << bl << " " << br << endl;
- QPointArray topBezier = makeTopBezier( tl, tr );
- QPointArray bottomBezier = makeBottomBezier( bl, br );
+ TQPointArray topBezier = makeTopBezier( tl, tr );
+ TQPointArray bottomBezier = makeBottomBezier( bl, br );
- QColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
+ TQColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
p->setPen( color );
p->setBrush( color );
p->drawPolygon ( makeConnectPoly( topBezier, bottomBezier ) );
@@ -233,12 +233,12 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
bitBlt(this, 0, 0, &pixbuf);
}
-QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
+TQPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( tl != tr )
{
@@ -252,12 +252,12 @@ QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
}
}
-QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
+TQPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( bl != br )
{
@@ -271,9 +271,9 @@ QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
}
}
-QPointArray KompareConnectWidget::makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier )
+TQPointArray KompareConnectWidget::makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier )
{
- QPointArray poly( topBezier.size() + bottomBezier.size() );
+ TQPointArray poly( topBezier.size() + bottomBezier.size() );
for( uint i = 0; i < topBezier.size(); i++ )
poly.setPoint( i, topBezier.point( i ) );
for( uint i = 0; i < bottomBezier.size(); i++ )
diff --git a/kompare/komparepart/kompareconnectwidget.h b/kompare/komparepart/kompareconnectwidget.h
index 96160c97..5287552f 100644
--- a/kompare/komparepart/kompareconnectwidget.h
+++ b/kompare/komparepart/kompareconnectwidget.h
@@ -23,7 +23,7 @@
#define KOMPARECONNECTWIDGET_H
#include "kompare_qsplitter.h"
-#include <qwidget.h>
+#include <tqwidget.h>
namespace Diff2 {
class DiffModel;
@@ -38,7 +38,7 @@ class KompareConnectWidget : public QWidget
public:
KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, QWidget* parent, const char* name = 0 );
+ ViewSettings* settings, TQWidget* parent, const char* name = 0 );
~KompareConnectWidget();
public slots:
@@ -51,10 +51,10 @@ signals:
void selectionChanged(const Diff2::Difference* diff);
protected:
- void paintEvent( QPaintEvent* e );
- QPointArray makeTopBezier( int tl, int tr );
- QPointArray makeBottomBezier( int bl, int br );
- QPointArray makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier );
+ void paintEvent( TQPaintEvent* e );
+ TQPointArray makeTopBezier( int tl, int tr );
+ TQPointArray makeBottomBezier( int bl, int br );
+ TQPointArray makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier );
private:
ViewSettings* m_settings;
@@ -74,22 +74,22 @@ public:
ViewSettings* settings, KompareSplitter* parent, const char* name = 0 );
~KompareConnectWidgetFrame();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
KompareConnectWidget* wid() { return &m_wid; }
protected:
// stop the parent QSplitterHandle painting
- void paintEvent( QPaintEvent* /* e */ ) { }
+ void paintEvent( TQPaintEvent* /* e */ ) { }
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
private:
KompareConnectWidget m_wid;
- QLabel m_label;
- QVBoxLayout m_layout;
+ TQLabel m_label;
+ TQVBoxLayout m_layout;
};
#endif
diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp
index b86bdef9..7e3ee953 100644
--- a/kompare/komparepart/komparelistview.cpp
+++ b/kompare/komparepart/komparelistview.cpp
@@ -19,10 +19,10 @@
**
***************************************************************************/
-#include <qheader.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -49,17 +49,17 @@ KompareListViewFrame::KompareListViewFrame( bool isSource,
ViewSettings* settings,
KompareSplitter* parent,
const char* name ):
- QFrame ( parent, name ),
+ TQFrame ( parent, name ),
m_view ( isSource, settings, this, name ),
m_label ( isSource?"Source":"Dest", this ),
m_layout ( this )
{
- setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) );
- m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
- QFrame *bottomLine = new QFrame(this);
- bottomLine->setFrameShape(QFrame::HLine);
- bottomLine->setFrameShadow ( QFrame::Plain );
- bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ TQFrame *bottomLine = new TQFrame(this);
+ bottomLine->setFrameShape(TQFrame::HLine);
+ bottomLine->setFrameShadow ( TQFrame::Plain );
+ bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_label.setMargin(3);
m_layout.setSpacing(0);
@@ -68,12 +68,12 @@ KompareListViewFrame::KompareListViewFrame( bool isSource,
m_layout.addWidget(bottomLine);
m_layout.addWidget(&m_view);
- connect( &m_view, SIGNAL(differenceClicked(const Diff2::Difference*)),
- parent, SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
+ connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)),
+ parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
- connect( parent, SIGNAL(scrollViewsToId(int)), &m_view, SLOT(scrollToId(int)) );
- connect( parent, SIGNAL(setXOffset(int)), &m_view, SLOT(setXOffset(int)) );
- connect( &m_view, SIGNAL(resized()), parent, SLOT(slotUpdateScrollBars()) );
+ connect( parent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) );
+ connect( parent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) );
+ connect( &m_view, TQT_SIGNAL(resized()), parent, TQT_SLOT(slotUpdateScrollBars()) );
}
void KompareListViewFrame::slotSetModel( const DiffModel* model )
@@ -92,13 +92,13 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model )
m_label.setText( model->destinationFile() );
}
} else {
- m_label.setText( QString::null );
+ m_label.setText( TQString::null );
}
}
KompareListView::KompareListView( bool isSource,
ViewSettings* settings,
- QWidget* parent, const char* name ) :
+ TQWidget* parent, const char* name ) :
KListView( parent, name ),
m_isSource( isSource ),
m_settings( settings ),
@@ -119,10 +119,10 @@ KompareListView::KompareListView( bool isSource,
setColumnWidthMode( COL_LINE_NO, Maximum );
setColumnWidthMode( COL_MAIN, Maximum );
setResizeMode( LastColumn );
- setFrameStyle( QFrame::NoFrame );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
- setFocusPolicy( QWidget::NoFocus );
+ setFrameStyle( TQFrame::NoFrame );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
+ setFocusPolicy( TQWidget::NoFocus );
setFont( m_settings->m_font );
setSpaces( m_settings->m_tabToNumberOfSpaces );
setFocusProxy( parent->parentWidget() );
@@ -139,7 +139,7 @@ KompareListViewItem* KompareListView::itemAtIndex( int i )
int KompareListView::firstVisibleDifference()
{
- QListViewItem* item = itemAt( QPoint( 0, 0 ) );
+ TQListViewItem* item = itemAt( TQPoint( 0, 0 ) );
if( item == 0 )
{
@@ -161,7 +161,7 @@ int KompareListView::firstVisibleDifference()
int KompareListView::lastVisibleDifference()
{
- QListViewItem* item = itemAt( QPoint( 0, visibleHeight() - 1 ) );
+ TQListViewItem* item = itemAt( TQPoint( 0, visibleHeight() - 1 ) );
if( item == 0 )
{
@@ -182,14 +182,14 @@ int KompareListView::lastVisibleDifference()
return -1;
}
-QRect KompareListView::itemRect( int i )
+TQRect KompareListView::itemRect( int i )
{
- QListViewItem* item = itemAtIndex( i );
+ TQListViewItem* item = itemAtIndex( i );
int x = 0;
int y = itemPos( item );
int vx, vy;
contentsToViewport( x, y, vx, vy );
- return QRect( vx, vy, 0, item->totalHeight() );
+ return TQRect( vx, vy, 0, item->totalHeight() );
}
int KompareListView::minScrollId()
@@ -238,7 +238,7 @@ void KompareListView::scrollToId( int id )
int y = pos + (int)( r * (double)height ) - minScrollId();
// kdDebug(8104) << "scrollToID: " << endl;
// kdDebug(8104) << " id = " << id << endl;
-// kdDebug(8104) << " id after = " << ( item->nextSibling() ? QString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl;
+// kdDebug(8104) << " id after = " << ( item->nextSibling() ? TQString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl;
// kdDebug(8104) << " pos = " << pos << endl;
// kdDebug(8104) << " itemId = " << itemId << endl;
// kdDebug(8104) << " r = " << r << endl;
@@ -354,9 +354,9 @@ void KompareListView::slotSetSelection( const DiffModel* model, const Difference
slotSetSelection( diff );
}
-void KompareListView::contentsMousePressEvent( QMouseEvent* e )
+void KompareListView::contentsMousePressEvent( TQMouseEvent* e )
{
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) );
if( !lineItem )
return;
@@ -366,9 +366,9 @@ void KompareListView::contentsMousePressEvent( QMouseEvent* e )
}
}
-void KompareListView::contentsMouseDoubleClickEvent( QMouseEvent* e )
+void KompareListView::contentsMouseDoubleClickEvent( TQMouseEvent* e )
{
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) );
if ( !lineItem )
return;
@@ -387,7 +387,7 @@ void KompareListView::slotApplyDifference( bool apply )
void KompareListView::slotApplyAllDifferences( bool apply )
{
- QPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict );
+ TQPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict );
for( ; it.current(); ++it )
it.current()->applyDifference( apply );
repaint();
@@ -408,12 +408,12 @@ void KompareListView::setSpaces( int spaces )
triggerUpdate();
}
-void KompareListView::wheelEvent( QWheelEvent* e )
+void KompareListView::wheelEvent( TQWheelEvent* e )
{
e->ignore(); // we want the parent to catch wheel events
}
-void KompareListView::resizeEvent( QResizeEvent* e )
+void KompareListView::resizeEvent( TQResizeEvent* e )
{
KListView::resizeEvent(e);
emit resized();
@@ -421,27 +421,27 @@ void KompareListView::resizeEvent( QResizeEvent* e )
}
KompareListViewItem::KompareListViewItem( KompareListView* parent )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after )
- : QListViewItem( parent, after ),
+ : TQListViewItem( parent, after ),
m_scrollId( after->scrollId() + after->maxHeight() )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
KompareListViewItem::KompareListViewItem( KompareListViewItem* parent )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
}
KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/ )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
}
@@ -451,7 +451,7 @@ KompareListView* KompareListViewItem::kompareListView() const
return (KompareListView*)listView();
}
-void KompareListViewItem::paintFocus( QPainter* /* p */, const QColorGroup& /* cg */, const QRect& /* r */ )
+void KompareListViewItem::paintFocus( TQPainter* /* p */, const TQColorGroup& /* cg */, const TQRect& /* r */ )
{
// Don't paint anything
}
@@ -516,7 +516,7 @@ void KompareListViewDiffItem::setSelected( bool b )
{
kdDebug(8104) << "KompareListViewDiffItem::setSelected( " << b << " )" << endl;
KompareListViewItem::setSelected( b );
- QListViewItem* item = m_sourceItem->isVisible() ?
+ TQListViewItem* item = m_sourceItem->isVisible() ?
m_sourceItem->firstChild() :
m_destItem->firstChild();
while( item && item->isVisible() ) {
@@ -578,7 +578,7 @@ DifferenceString* KompareListViewLineContainerItem::lineAt( int i ) const
KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text )
: KompareListViewItem( parent )
{
- setText( COL_LINE_NO, QString::number( line ) );
+ setText( COL_LINE_NO, TQString::number( line ) );
setText( COL_MAIN, text->string() );
m_text = text;
}
@@ -589,9 +589,9 @@ void KompareListViewLineItem::setup()
setHeight( listView()->fontMetrics().lineSpacing() );
}
-void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void KompareListViewLineItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
- QColor bg = cg.base();
+ TQColor bg = cg.base();
p->fillRect( 0, 0, width, height(), bg );
if ( diffItemParent()->difference()->type() == Difference::Unchanged )
{
@@ -625,17 +625,17 @@ void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, i
}
}
-void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int align )
+void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int align )
{
if ( column == COL_MAIN )
{
- QString textChunk;
+ TQString textChunk;
int offset = listView()->itemMargin();
unsigned int prevValue = 0;
int chunkWidth;
- QBrush changeBrush( bg, Dense3Pattern );
- QBrush normalBrush( bg, SolidPattern );
- QBrush brush;
+ TQBrush changeBrush( bg, Dense3Pattern );
+ TQBrush normalBrush( bg, SolidPattern );
+ TQBrush brush;
if ( m_text->string().isEmpty() )
{
@@ -658,11 +658,11 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
// kdDebug(8104) << "c->offset() = " << c->offset() << endl;
// kdDebug(8104) << "prevValue = " << prevValue << endl;
- textChunk.replace( QChar('\t'), kompareListView()->spaces() );
+ textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
prevValue = m->offset();
if ( m->type() == Marker::End )
{
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( true );
p->setFont( font );
// p->setPen( Qt::blue );
@@ -670,7 +670,7 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
}
else
{
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( false );
p->setFont( font );
// p->setPen( Qt::black );
@@ -688,9 +688,9 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
{
// Still have to draw some string without changes
textChunk = m_text->string().mid( prevValue, kMax( ( unsigned int )1, m_text->string().length() - prevValue ) );
- textChunk.replace( QChar('\t'), kompareListView()->spaces() );
+ textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( false );
p->setFont( font );
chunkWidth = p->fontMetrics().width( textChunk );
@@ -728,11 +728,11 @@ void KompareListViewBlankLineItem::setup()
setHeight( BLANK_LINE_HEIGHT );
}
-void KompareListViewBlankLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int )
+void KompareListViewBlankLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int )
{
if ( column == COL_MAIN )
{
- QBrush normalBrush( bg, SolidPattern );
+ TQBrush normalBrush( bg, SolidPattern );
p->fillRect( 0, 0, width, height(), normalBrush );
}
}
@@ -771,7 +771,7 @@ void KompareListViewHunkItem::setup()
setHeight( maxHeight() );
}
-void KompareListViewHunkItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void KompareListViewHunkItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
p->fillRect( 0, 0, width, height(), cg.mid() );
if( column == COL_MAIN ) {
diff --git a/kompare/komparepart/komparelistview.h b/kompare/komparepart/komparelistview.h
index 26a6dacb..d617fafd 100644
--- a/kompare/komparepart/komparelistview.h
+++ b/kompare/komparepart/komparelistview.h
@@ -22,10 +22,10 @@
#ifndef KOMPARELISTVIEW_H
#define KOMPARELISTVIEW_H
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klistview.h>
@@ -48,13 +48,13 @@ class KompareListView : public KListView
Q_OBJECT
public:
- KompareListView( bool isSource, ViewSettings* settings, QWidget* parent, const char* name = 0 );
+ KompareListView( bool isSource, ViewSettings* settings, TQWidget* parent, const char* name = 0 );
virtual ~KompareListView();
KompareListViewItem* itemAtIndex( int i );
int firstVisibleDifference();
int lastVisibleDifference();
- QRect itemRect( int i );
+ TQRect itemRect( int i );
int minScrollId();
int maxScrollId();
int contentsWidth();
@@ -64,7 +64,7 @@ public:
void setSelectedDifference( const Diff2::Difference* diff, bool scroll );
- const QString& spaces() const { return m_spaces; };
+ const TQString& spaces() const { return m_spaces; };
void setSpaces( int spaces );
public slots:
@@ -83,23 +83,23 @@ signals:
void resized();
protected:
- void wheelEvent( QWheelEvent* e );
- void resizeEvent( QResizeEvent* e );
- void contentsMousePressEvent ( QMouseEvent * e );
- void contentsMouseDoubleClickEvent ( QMouseEvent* );
- void contentsMouseReleaseEvent ( QMouseEvent * ) {};
- void contentsMouseMoveEvent ( QMouseEvent * ) {};
+ void wheelEvent( TQWheelEvent* e );
+ void resizeEvent( TQResizeEvent* e );
+ void contentsMousePressEvent ( TQMouseEvent * e );
+ void contentsMouseDoubleClickEvent ( TQMouseEvent* );
+ void contentsMouseReleaseEvent ( TQMouseEvent * ) {};
+ void contentsMouseMoveEvent ( TQMouseEvent * ) {};
private:
- QValueList<KompareListViewDiffItem*> m_items;
- QPtrDict<KompareListViewDiffItem> m_itemDict;
+ TQValueList<KompareListViewDiffItem*> m_items;
+ TQPtrDict<KompareListViewDiffItem> m_itemDict;
bool m_isSource;
ViewSettings* m_settings;
int m_scrollId;
int m_maxMainWidth;
const Diff2::DiffModel* m_selectedModel;
const Diff2::Difference* m_selectedDifference;
- QString m_spaces;
+ TQString m_spaces;
};
class KompareListViewFrame : public QFrame
@@ -116,8 +116,8 @@ public slots:
private:
KompareListView m_view;
- QLabel m_label;
- QVBoxLayout m_layout;
+ TQLabel m_label;
+ TQVBoxLayout m_layout;
};
class KompareListViewItem : public QListViewItem
@@ -128,7 +128,7 @@ public:
KompareListViewItem( KompareListViewItem* parent );
KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* after );
- void paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r );
+ void paintFocus( TQPainter* p, const TQColorGroup& cg, const TQRect& r );
int scrollId() { return m_scrollId; };
virtual int maxHeight() = 0;
@@ -187,8 +187,8 @@ public:
virtual void setup();
int maxHeight() { return 0; }
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
- virtual void paintText( QPainter* p, const QColor& bg, int column, int width, int align );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
+ virtual void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align );
KompareListViewDiffItem* diffItemParent() const;
@@ -203,7 +203,7 @@ public:
void setup();
- void paintText( QPainter* p, const QColor& bg, int column, int width, int align );
+ void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align );
};
class KompareListViewHunkItem : public KompareListViewItem
@@ -213,7 +213,7 @@ public:
KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false );
void setup();
- void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
+ void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
int maxHeight();
diff --git a/kompare/komparepart/kompareprefdlg.cpp b/kompare/komparepart/kompareprefdlg.cpp
index 2d731af3..f920d03d 100644
--- a/kompare/komparepart/kompareprefdlg.cpp
+++ b/kompare/komparepart/kompareprefdlg.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -35,7 +35,7 @@ KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets )
// ok i need some stuff in that pref dlg...
setIconListAllVisible(true);
- QVBox* frame;
+ TQVBox* frame;
frame = addVBoxPage( i18n( "View" ), i18n( "View Settings" ), UserIcon( "diff_view" ) );
m_viewPage = new ViewPage( frame );
m_viewPage->setSettings( viewSets );
diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp
index 866ecc0d..723093ac 100644
--- a/kompare/komparepart/komparesaveoptionswidget.cpp
+++ b/kompare/komparepart/komparesaveoptionswidget.cpp
@@ -17,11 +17,11 @@
**
***************************************************************************/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -30,8 +30,8 @@
#include "diffsettings.h"
#include "komparesaveoptionswidget.h"
-KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString destination,
- DiffSettings * settings, QWidget * parent )
+KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString destination,
+ DiffSettings * settings, TQWidget * parent )
: KompareSaveOptionsBase( parent, "save options" )
, m_source( source )
, m_destination( destination )
@@ -58,23 +58,23 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString dest
m_directoryRequester->setURL( root.url() );
}
- connect( m_SmallerChangesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_LargeFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreCaseCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ExpandTabsCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreEmptyLinesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreWhiteSpaceCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_FunctionNamesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_RecursiveCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_NewFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ContextRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_EdRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_NormalRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_RCSRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_UnifiedRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_SideBySideRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ContextLinesSB, SIGNAL(valueChanged(int)), SLOT(updateCommandLine()) );
- connect( m_directoryRequester, SIGNAL(textChanged(const QString&)), SLOT(updateCommandLine()) );
+ connect( m_SmallerChangesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_LargeFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreCaseCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ExpandTabsCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreEmptyLinesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreWhiteSpaceCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_FunctionNamesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_RecursiveCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_NewFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ContextRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_EdRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_NormalRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_RCSRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_UnifiedRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_SideBySideRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ContextLinesSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateCommandLine()) );
+ connect( m_directoryRequester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCommandLine()) );
loadOptions();
}
@@ -84,23 +84,23 @@ KompareSaveOptionsWidget::~KompareSaveOptionsWidget()
}
-QString KompareSaveOptionsWidget::directory() const
+TQString KompareSaveOptionsWidget::directory() const
{
return KURL( m_directoryRequester->url() ).path();
}
void KompareSaveOptionsWidget::updateCommandLine()
{
- QString cmdLine = "diff";
+ TQString cmdLine = "diff";
- QString options = "";
+ TQString options = "";
switch( static_cast<Kompare::Format>( m_FormatBG->id( m_FormatBG->selected() ) ) ) {
case Kompare::Unified :
- cmdLine += " -U " + QString::number( m_ContextLinesSB->value() );
+ cmdLine += " -U " + TQString::number( m_ContextLinesSB->value() );
break;
case Kompare::Context :
- cmdLine += " -C " + QString::number( m_ContextLinesSB->value() );
+ cmdLine += " -C " + TQString::number( m_ContextLinesSB->value() );
break;
case Kompare::RCS :
options += "n";
diff --git a/kompare/komparepart/komparesaveoptionswidget.h b/kompare/komparepart/komparesaveoptionswidget.h
index 6361ca77..905dcaa4 100644
--- a/kompare/komparepart/komparesaveoptionswidget.h
+++ b/kompare/komparepart/komparesaveoptionswidget.h
@@ -31,11 +31,11 @@ class KompareSaveOptionsWidget : public KompareSaveOptionsBase, public KompareFu
{
Q_OBJECT
public:
- KompareSaveOptionsWidget( QString source, QString destination, DiffSettings* settings, QWidget* parent );
+ KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* parent );
~KompareSaveOptionsWidget();
void saveOptions();
- QString directory() const;
+ TQString directory() const;
protected slots:
void updateCommandLine();
@@ -44,8 +44,8 @@ private:
void loadOptions();
DiffSettings* m_settings;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
};
#endif
diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp
index fcf014cb..59106ffb 100644
--- a/kompare/komparepart/komparesplitter.cpp
+++ b/kompare/komparepart/komparesplitter.cpp
@@ -17,9 +17,9 @@
#include "komparesplitter.h"
-#include <qstyle.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqstyle.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -34,21 +34,21 @@
using namespace Diff2;
-KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent,
+KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent,
const char *name) :
- QSplitter( Horizontal, parent, name ),
+ TQSplitter( Horizontal, parent, name ),
m_settings( settings )
{
- QFrame *scrollFrame = new QFrame( parent, "scrollFrame" );
- reparent( scrollFrame, *(new QPoint()), false );
+ TQFrame *scrollFrame = new TQFrame( parent, "scrollFrame" );
+ reparent( scrollFrame, *(new TQPoint()), false );
// Set up the scrollFrame
- scrollFrame->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
- scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(QStyle::PM_DefaultFrameWidth));
- QGridLayout *pairlayout = new QGridLayout(scrollFrame, 2, 2, 0);
- m_vScroll = new QScrollBar( QScrollBar::Vertical, scrollFrame );
+ scrollFrame->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
+ scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
+ TQGridLayout *pairlayout = new TQGridLayout(scrollFrame, 2, 2, 0);
+ m_vScroll = new TQScrollBar( TQScrollBar::Vertical, scrollFrame );
pairlayout->addWidget( m_vScroll, 0, 1 );
- m_hScroll = new QScrollBar( QScrollBar::Horizontal, scrollFrame );
+ m_hScroll = new TQScrollBar( TQScrollBar::Horizontal, scrollFrame );
pairlayout->addWidget( m_hScroll, 1, 0 );
new KompareListViewFrame(true, m_settings, this, "source");
@@ -56,33 +56,33 @@ KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent,
pairlayout->addWidget( this, 0, 0 );
// set up our looks
- setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth ) );
+ setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
+ setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) );
setHandleWidth(50);
setChildrenCollapsible( false );
- setFrameStyle( QFrame::NoFrame );
- setSizePolicy( QSizePolicy (QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ setFrameStyle( TQFrame::NoFrame );
+ setSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
setOpaqueResize( true );
- setFocusPolicy( QWidget::WheelFocus );
+ setFocusPolicy( TQWidget::WheelFocus );
- connect( this, SIGNAL(configChanged()), SLOT(slotConfigChanged()) );
- connect( this, SIGNAL(configChanged()), SLOT(slotDelayedRepaintHandles()) );
- connect( this, SIGNAL(configChanged()), SLOT(slotDelayedUpdateScrollBars()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedUpdateScrollBars()) );
// scrolling
- connect( m_vScroll, SIGNAL(valueChanged(int)), SLOT(scrollToId(int)) );
- connect( m_vScroll, SIGNAL(sliderMoved(int)), SLOT(scrollToId(int)) );
- connect( m_hScroll, SIGNAL(valueChanged(int)), SIGNAL(setXOffset(int)) );
- connect( m_hScroll, SIGNAL(sliderMoved(int)), SIGNAL(setXOffset(int)) );
+ connect( m_vScroll, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollToId(int)) );
+ connect( m_vScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollToId(int)) );
+ connect( m_hScroll, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(setXOffset(int)) );
+ connect( m_hScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SIGNAL(setXOffset(int)) );
- m_scrollTimer=new QTimer();
+ m_scrollTimer=new TQTimer();
restartTimer = false;
- connect (m_scrollTimer, SIGNAL(timeout()), SLOT(timerTimeout()) );
+ connect (m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timerTimeout()) );
// we need to receive childEvents now so that d->list is ready for when
// slotSetSelection(...) arrives
- kapp->sendPostedEvents(this, QEvent::ChildInserted);
+ kapp->sendPostedEvents(this, TQEvent::ChildInserted);
// init stuff
slotUpdateScrollBars();
@@ -111,7 +111,7 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool
if ( d->list.count() > 0 ) {
s = new QSplitterLayoutStruct;
s->resizeMode = KeepSize;
- QString tmp = "qt_splithandle_";
+ TQString tmp = "qt_splithandle_";
tmp += w->name();
KompareListView *lw =
((KompareListViewFrame*)(prepend?w:d->list.last()->wid))->view();
@@ -144,13 +144,13 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool
been inserted or removed.
*/
-void KompareSplitter::childEvent( QChildEvent *c )
+void KompareSplitter::childEvent( TQChildEvent *c )
{
- if ( c->type() == QEvent::ChildInserted ) {
+ if ( c->type() == TQEvent::ChildInserted ) {
if ( !c->child()->isWidgetType() )
return;
- if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) )
+ if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) )
return;
QSplitterLayoutStruct *s = d->list.first();
@@ -161,7 +161,7 @@ void KompareSplitter::childEvent( QChildEvent *c )
}
addWidget( (KompareListViewFrame*)c->child() );
recalc( isVisible() );
- } else if ( c->type() == QEvent::ChildRemoved ) {
+ } else if ( c->type() == TQEvent::ChildRemoved ) {
QSplitterLayoutStruct *prev = 0;
if ( d->list.count() > 1 )
prev = d->list.at( 1 ); // yes, this is correct
@@ -170,7 +170,7 @@ void KompareSplitter::childEvent( QChildEvent *c )
if ( curr->wid == c->child() ) {
d->list.removeRef( curr );
if ( prev && prev->isHandle ) {
- QWidget *w = prev->wid;
+ TQWidget *w = prev->wid;
d->list.removeRef( prev );
delete w; // will call childEvent()
}
@@ -185,20 +185,20 @@ void KompareSplitter::childEvent( QChildEvent *c )
}
// This is from a private qt header (kernel/qlayoutengine_p.h). sorry.
-QSize qSmartMinSize( QWidget *w );
+TQSize qSmartMinSize( TQWidget *w );
-static QPoint toggle( QWidget *w, QPoint pos )
+static TQPoint toggle( TQWidget *w, TQPoint pos )
{
- QSize minS = qSmartMinSize( w );
- return -pos - QPoint( minS.width(), minS.height() );
+ TQSize minS = qSmartMinSize( w );
+ return -pos - TQPoint( minS.width(), minS.height() );
}
-static bool isCollapsed( QWidget *w )
+static bool isCollapsed( TQWidget *w )
{
return w->x() < 0 || w->y() < 0;
}
-static QPoint topLeft( QWidget *w )
+static TQPoint topLeft( TQWidget *w )
{
if ( isCollapsed(w) ) {
return toggle( w, w->pos() );
@@ -207,10 +207,10 @@ static QPoint topLeft( QWidget *w )
}
}
-static QPoint bottomRight( QWidget *w )
+static TQPoint bottomRight( TQWidget *w )
{
if ( isCollapsed(w) ) {
- return toggle( w, w->pos() ) - QPoint( 1, 1 );
+ return toggle( w, w->pos() ) - TQPoint( 1, 1 );
} else {
return w->geometry().bottomRight();
}
@@ -227,9 +227,9 @@ void KompareSplitter::moveSplitter( QCOORD p, int id )
int oldP = pick( s->wid->pos() );
int* poss = new int[d->list.count()];
int* ws = new int[d->list.count()];
- QWidget *w = 0;
+ TQWidget *w = 0;
bool upLeft;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
int q = p + s->wid->width();
doMove( FALSE, q, id - 1, -1, (p > max), poss, ws );
doMove( TRUE, q, id, -1, (p < min), poss, ws );
@@ -260,7 +260,7 @@ void KompareSplitter::doMove( bool backwards, int pos, int id, int delta,
bool mayCollapse, int* positions, int* widths )
{
QSplitterLayoutStruct *s;
- QWidget *w;
+ TQWidget *w;
for ( ; id >= 0 && id < (int)d->list.count();
id = backwards ? id - delta : id + delta ) {
s = d->list.at( id );
@@ -405,7 +405,7 @@ void KompareSplitter::repaintHandles()
* FIXME: i'm a nasty hack
*/
-void KompareSplitter::wheelEvent( QWheelEvent* e )
+void KompareSplitter::wheelEvent( TQWheelEvent* e )
{
// scroll lines...
if ( e->orientation() == Qt::Vertical )
@@ -438,7 +438,7 @@ void KompareSplitter::wheelEvent( QWheelEvent* e )
repaintHandles();
}
-void KompareSplitter::keyPressEvent( QKeyEvent* e )
+void KompareSplitter::keyPressEvent( TQKeyEvent* e )
{
//keyboard scrolling
switch ( e->key() ) {
@@ -502,7 +502,7 @@ void KompareSplitter::scrollToId( int id )
void KompareSplitter::slotDelayedUpdateScrollBars()
{
- QTimer::singleShot( 0, this, SLOT( slotUpdateScrollBars() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateScrollBars() ) );
}
void KompareSplitter::slotUpdateScrollBars()
@@ -543,7 +543,7 @@ void KompareSplitter::slotUpdateScrollBars()
void KompareSplitter::slotDelayedUpdateVScrollValue()
{
- QTimer::singleShot( 0, this, SLOT( slotUpdateVScrollValue() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateVScrollValue() ) );
}
void KompareSplitter::slotUpdateVScrollValue()
@@ -582,7 +582,7 @@ int KompareSplitter::pageSize()
if ( !curr->isHandle )
{
KompareListView *view = ((KompareListViewFrame*) curr->wid)->view();
- return view->visibleHeight() - QStyle::PM_ScrollBarExtent;
+ return view->visibleHeight() - TQStyle::PM_ScrollBarExtent;
}
}
return 1;
diff --git a/kompare/komparepart/komparesplitter.h b/kompare/komparepart/komparesplitter.h
index 47eee6bf..8653cfee 100644
--- a/kompare/komparepart/komparesplitter.h
+++ b/kompare/komparepart/komparesplitter.h
@@ -20,7 +20,7 @@
#include "kompare_qsplitter.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "komparelistview.h"
#include "komparemodellist.h"
@@ -40,7 +40,7 @@ class KompareSplitter : public QSplitter
Q_OBJECT
public:
- KompareSplitter(ViewSettings *settings, QWidget *parent=0, const char *name = 0);
+ KompareSplitter(ViewSettings *settings, TQWidget *parent=0, const char *name = 0);
~KompareSplitter();
signals:
@@ -71,9 +71,9 @@ public slots:
void slotUpdateVScrollValue();
protected:
- void childEvent( QChildEvent * );
- void wheelEvent( QWheelEvent* e );
- void keyPressEvent( QKeyEvent* e );
+ void childEvent( TQChildEvent * );
+ void wheelEvent( TQWheelEvent* e );
+ void keyPressEvent( TQKeyEvent* e );
void moveSplitter( QCOORD pos, int id );
@@ -90,7 +90,7 @@ private:
void repaintHandles();
- QTimer* m_scrollTimer;
+ TQTimer* m_scrollTimer;
bool restartTimer;
int scrollTo;
@@ -107,8 +107,8 @@ private:
int minVisibleWidth();
ViewSettings* m_settings;
- QScrollBar* m_vScroll;
- QScrollBar* m_hScroll;
+ TQScrollBar* m_vScroll;
+ TQScrollBar* m_hScroll;
friend class KompareConnectWidgetFrame;
};
diff --git a/kompare/kompareurldialog.cpp b/kompare/kompareurldialog.cpp
index 4630cd18..d24abaf9 100644
--- a/kompare/kompareurldialog.cpp
+++ b/kompare/kompareurldialog.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <klocale.h>
@@ -32,25 +32,25 @@
#include "kompareurldialog.h"
-KompareURLDialog::KompareURLDialog( QWidget *parent, const char *name )
+KompareURLDialog::KompareURLDialog( TQWidget *parent, const char *name )
: KDialogBase( IconList, "", Ok|Cancel, Ok, parent, name )
{
setIconListAllVisible(true);
KConfig* cfg = kapp->config();
- QVBox* filesBox = addVBoxPage( i18n( "Files" ), i18n( "Here you can enter the files you want to compare." ) );
+ TQVBox* filesBox = addVBoxPage( i18n( "Files" ), i18n( "Here you can enter the files you want to compare." ) );
m_filesPage = new FilesPage( filesBox );
m_filesSettings = new FilesSettings( this );
m_filesSettings->loadSettings( cfg );
m_filesPage->setSettings( m_filesSettings );
- QVBox* diffBox = addVBoxPage( i18n( "Diff" ), i18n( "Here you can change the options for comparing the files." ) );
+ TQVBox* diffBox = addVBoxPage( i18n( "Diff" ), i18n( "Here you can change the options for comparing the files." ) );
m_diffPage = new DiffPage( diffBox );
m_diffSettings = new DiffSettings( this );
m_diffSettings->loadSettings( cfg );
m_diffPage->setSettings( m_diffSettings );
- QVBox* viewBox = addVBoxPage( i18n( "Appearance" ), i18n( "Here you can change the options for the view." ) );
+ TQVBox* viewBox = addVBoxPage( i18n( "Appearance" ), i18n( "Here you can change the options for the view." ) );
m_viewPage = new ViewPage( viewBox );
m_viewSettings = new ViewSettings( this );
m_viewSettings->loadSettings( cfg );
@@ -60,10 +60,10 @@ KompareURLDialog::KompareURLDialog( QWidget *parent, const char *name )
enableButtonSeparator( true );
- connect( m_filesPage->firstURLRequester(), SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEnableOk() ) );
- connect( m_filesPage->secondURLRequester(), SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEnableOk() ) );
+ connect( m_filesPage->firstURLRequester(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEnableOk() ) );
+ connect( m_filesPage->secondURLRequester(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEnableOk() ) );
slotEnableOk();
}
@@ -107,22 +107,22 @@ KURL KompareURLDialog::getSecondURL() const
return KURL( m_filesPage->secondURLRequester()->url() );
}
-QString KompareURLDialog::encoding() const
+TQString KompareURLDialog::encoding() const
{
return m_filesPage->encoding();
}
-void KompareURLDialog::setFirstGroupBoxTitle( const QString& title )
+void KompareURLDialog::setFirstGroupBoxTitle( const TQString& title )
{
m_filesPage->setFirstGroupBoxTitle( title );
}
-void KompareURLDialog::setSecondGroupBoxTitle( const QString& title )
+void KompareURLDialog::setSecondGroupBoxTitle( const TQString& title )
{
m_filesPage->setSecondGroupBoxTitle( title );
}
-void KompareURLDialog::setGroup( const QString& groupName )
+void KompareURLDialog::setGroup( const TQString& groupName )
{
m_filesSettings->setGroup( groupName );
m_filesSettings->loadSettings( kapp->config() );
diff --git a/kompare/kompareurldialog.h b/kompare/kompareurldialog.h
index 61db9974..5fe9f119 100644
--- a/kompare/kompareurldialog.h
+++ b/kompare/kompareurldialog.h
@@ -43,17 +43,17 @@ class KompareURLDialog : public KDialogBase
Q_OBJECT
public:
- KompareURLDialog( QWidget* parent = 0, const char* name = 0 );
+ KompareURLDialog( TQWidget* parent = 0, const char* name = 0 );
~KompareURLDialog();
KURL getFirstURL() const;
KURL getSecondURL() const;
- QString encoding() const;
+ TQString encoding() const;
- void setFirstGroupBoxTitle ( const QString& title );
- void setSecondGroupBoxTitle( const QString& title );
+ void setFirstGroupBoxTitle ( const TQString& title );
+ void setSecondGroupBoxTitle( const TQString& title );
- void setGroup( const QString& groupName );
+ void setGroup( const TQString& groupName );
void setFirstURLRequesterMode ( unsigned int mode );
void setSecondURLRequesterMode( unsigned int mode );
diff --git a/kompare/libdialogpages/diffpage.cpp b/kompare/libdialogpages/diffpage.cpp
index 7f805c5b..0423f1a5 100644
--- a/kompare/libdialogpages/diffpage.cpp
+++ b/kompare/libdialogpages/diffpage.cpp
@@ -15,15 +15,15 @@
**
***************************************************************************/
-#include <qcheckbox.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qvbuttongroup.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqvbuttongroup.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -42,7 +42,7 @@
#include "diffpage.h"
-DiffPage::DiffPage( QWidget* parent ) : PageBase( parent ),
+DiffPage::DiffPage( TQWidget* parent ) : PageBase( parent ),
m_ignoreRegExpDialog( 0 )
{
addDiffTab();
@@ -146,7 +146,7 @@ void DiffPage::setDefaults()
m_ignoreTabExpansionCheckBox->setChecked( false );
m_ignoreRegExpCheckBox->setChecked( false );
- m_ignoreRegExpEdit->setText( QString::null );
+ m_ignoreRegExpEdit->setText( TQString::null );
m_locSpinBox->setValue( 3 );
@@ -160,7 +160,7 @@ void DiffPage::setDefaults()
void DiffPage::slotShowRegExpEditor()
{
if ( ! m_ignoreRegExpDialog )
- m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( m_ignoreRegExpDialog->qt_cast( "KRegExpEditorInterface" ) );
@@ -202,18 +202,18 @@ void DiffPage::slotExcludeFileToggled( bool on )
void DiffPage::addDiffTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff program selector
- m_diffProgramGroup = new QVButtonGroup( i18n( "Diff Program" ), page );
+ m_diffProgramGroup = new TQVButtonGroup( i18n( "Diff Program" ), page );
layout->addWidget( m_diffProgramGroup );
m_diffProgramGroup->setMargin( KDialog::marginHint() );
m_diffURLRequester = new KURLRequester( m_diffProgramGroup, "diffURLRequester" );
- QWhatsThis::add( m_diffURLRequester, i18n( "You can select a different diff program here. On Solaris the standard diff program does not support all the options that the GNU version does. This way you can select that version." ) );
+ TQWhatsThis::add( m_diffURLRequester, i18n( "You can select a different diff program here. On Solaris the standard diff program does not support all the options that the GNU version does. This way you can select that version." ) );
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
@@ -223,34 +223,34 @@ void DiffPage::addDiffTab()
void DiffPage::addFormatTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff modes
- m_modeButtonGroup = new QVButtonGroup( i18n( "Output Format" ), page );
- QWhatsThis::add( m_modeButtonGroup, i18n( "Select the format of the output generated by diff. Unified is the one that is used most frequently because it is very readable. The KDE developers like this format the best so use it for sending patches." ) );
+ m_modeButtonGroup = new TQVButtonGroup( i18n( "Output Format" ), page );
+ TQWhatsThis::add( m_modeButtonGroup, i18n( "Select the format of the output generated by diff. Unified is the one that is used most frequently because it is very readable. The KDE developers like this format the best so use it for sending patches." ) );
layout->addWidget( m_modeButtonGroup );
m_modeButtonGroup->setMargin( KDialog::marginHint() );
- QRadioButton* radioButton;
- radioButton = new QRadioButton( i18n( "Context" ), m_modeButtonGroup );
- radioButton = new QRadioButton( i18n( "Ed" ), m_modeButtonGroup );
+ TQRadioButton* radioButton;
+ radioButton = new TQRadioButton( i18n( "Context" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Ed" ), m_modeButtonGroup );
radioButton->setEnabled( false );
- radioButton = new QRadioButton( i18n( "Normal" ), m_modeButtonGroup );
- radioButton = new QRadioButton( i18n( "RCS" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Normal" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "RCS" ), m_modeButtonGroup );
radioButton->setEnabled( false );
- radioButton = new QRadioButton( i18n( "Unified" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Unified" ), m_modeButtonGroup );
// #lines of context (loc)
- QHGroupBox* groupBox = new QHGroupBox( i18n( "Lines of Context" ), page );
+ TQHGroupBox* groupBox = new TQHGroupBox( i18n( "Lines of Context" ), page );
layout->addWidget( groupBox );
groupBox->setMargin( KDialog::marginHint() );
- QLabel* label = new QLabel( i18n( "Number of context lines:" ), groupBox );
- m_locSpinBox = new QSpinBox( 0, 100, 1, groupBox );
- QWhatsThis::add( m_locSpinBox, i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
+ TQLabel* label = new TQLabel( i18n( "Number of context lines:" ), groupBox );
+ m_locSpinBox = new TQSpinBox( 0, 100, 1, groupBox );
+ TQWhatsThis::add( m_locSpinBox, i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
label->setBuddy( m_locSpinBox );
layout->addStretch( 1 );
@@ -261,56 +261,56 @@ void DiffPage::addFormatTab()
void DiffPage::addOptionsTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff options
- QVButtonGroup* optionButtonGroup = new QVButtonGroup( i18n( "General" ), page );
+ TQVButtonGroup* optionButtonGroup = new TQVButtonGroup( i18n( "General" ), page );
layout->addWidget( optionButtonGroup );
optionButtonGroup->setMargin( KDialog::marginHint() );
- m_smallerCheckBox = new QCheckBox( i18n( "&Look for smaller changes" ), optionButtonGroup );
- QToolTip::add( m_smallerCheckBox, i18n( "This corresponds to the -d diff option." ) );
- m_largerCheckBox = new QCheckBox( i18n( "O&ptimize for large files" ), optionButtonGroup );
- QToolTip::add( m_largerCheckBox, i18n( "This corresponds to the -H diff option." ) );
- m_caseCheckBox = new QCheckBox( i18n( "&Ignore changes in case" ), optionButtonGroup );
- QToolTip::add( m_caseCheckBox, i18n( "This corresponds to the -i diff option." ) );
+ m_smallerCheckBox = new TQCheckBox( i18n( "&Look for smaller changes" ), optionButtonGroup );
+ TQToolTip::add( m_smallerCheckBox, i18n( "This corresponds to the -d diff option." ) );
+ m_largerCheckBox = new TQCheckBox( i18n( "O&ptimize for large files" ), optionButtonGroup );
+ TQToolTip::add( m_largerCheckBox, i18n( "This corresponds to the -H diff option." ) );
+ m_caseCheckBox = new TQCheckBox( i18n( "&Ignore changes in case" ), optionButtonGroup );
+ TQToolTip::add( m_caseCheckBox, i18n( "This corresponds to the -i diff option." ) );
- QHBoxLayout* groupLayout = new QHBoxLayout( layout, -1, "regexp_horizontal_layout" );
+ TQHBoxLayout* groupLayout = new TQHBoxLayout( layout, -1, "regexp_horizontal_layout" );
groupLayout->setMargin( KDialog::marginHint() );
- m_ignoreRegExpCheckBox = new QCheckBox( i18n( "Ignore regexp:" ), page );
- QToolTip::add( m_ignoreRegExpCheckBox, i18n( "This option corresponds to the -I diff option." ) );
+ m_ignoreRegExpCheckBox = new TQCheckBox( i18n( "Ignore regexp:" ), page );
+ TQToolTip::add( m_ignoreRegExpCheckBox, i18n( "This option corresponds to the -I diff option." ) );
groupLayout->addWidget( m_ignoreRegExpCheckBox );
- m_ignoreRegExpEdit = new KLineEdit( QString::null, page, "regexplineedit" );
- QToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
+ m_ignoreRegExpEdit = new KLineEdit( TQString::null, page, "regexplineedit" );
+ TQToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
groupLayout->addWidget( m_ignoreRegExpEdit );
if ( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
// Ok editor is available, use it
- QButton* ignoreRegExpEditButton = new QPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" );
- QToolTip::add( ignoreRegExpEditButton, i18n( "Clicking this will open a regular expression dialog where\nyou can graphically create regular expressions." ) );
+ TQButton* ignoreRegExpEditButton = new TQPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" );
+ TQToolTip::add( ignoreRegExpEditButton, i18n( "Clicking this will open a regular expression dialog where\nyou can graphically create regular expressions." ) );
groupLayout->addWidget( ignoreRegExpEditButton );
- connect( ignoreRegExpEditButton, SIGNAL( clicked() ), this, SLOT( slotShowRegExpEditor() ) );
+ connect( ignoreRegExpEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowRegExpEditor() ) );
}
- QVButtonGroup* moreOptionButtonGroup = new QVButtonGroup( i18n( "Whitespace" ), page );
+ TQVButtonGroup* moreOptionButtonGroup = new TQVButtonGroup( i18n( "Whitespace" ), page );
layout->addWidget( moreOptionButtonGroup );
moreOptionButtonGroup->setMargin( KDialog::marginHint() );
- m_tabsCheckBox = new QCheckBox( i18n( "E&xpand tabs to spaces in output" ), moreOptionButtonGroup );
- QToolTip::add( m_tabsCheckBox, i18n( "This option corresponds to the -t diff option." ) );
- m_linesCheckBox = new QCheckBox( i18n( "I&gnore added or removed empty lines" ), moreOptionButtonGroup );
- QToolTip::add( m_linesCheckBox, i18n( "This option corresponds to the -B diff option." ) );
- m_whitespaceCheckBox = new QCheckBox( i18n( "Ig&nore changes in the amount of whitespace" ), moreOptionButtonGroup );
- QToolTip::add( m_whitespaceCheckBox, i18n( "This option corresponds to the -b diff option." ) );
- m_allWhitespaceCheckBox = new QCheckBox( i18n( "Ign&ore all whitespace" ), moreOptionButtonGroup );
- QToolTip::add( m_allWhitespaceCheckBox, i18n( "This option corresponds to the -w diff option." ) );
- m_ignoreTabExpansionCheckBox = new QCheckBox( i18n( "Igno&re changes due to tab expansion" ), moreOptionButtonGroup );
- QToolTip::add( m_ignoreTabExpansionCheckBox, i18n( "This option corresponds to the -E diff option." ) );
+ m_tabsCheckBox = new TQCheckBox( i18n( "E&xpand tabs to spaces in output" ), moreOptionButtonGroup );
+ TQToolTip::add( m_tabsCheckBox, i18n( "This option corresponds to the -t diff option." ) );
+ m_linesCheckBox = new TQCheckBox( i18n( "I&gnore added or removed empty lines" ), moreOptionButtonGroup );
+ TQToolTip::add( m_linesCheckBox, i18n( "This option corresponds to the -B diff option." ) );
+ m_whitespaceCheckBox = new TQCheckBox( i18n( "Ig&nore changes in the amount of whitespace" ), moreOptionButtonGroup );
+ TQToolTip::add( m_whitespaceCheckBox, i18n( "This option corresponds to the -b diff option." ) );
+ m_allWhitespaceCheckBox = new TQCheckBox( i18n( "Ign&ore all whitespace" ), moreOptionButtonGroup );
+ TQToolTip::add( m_allWhitespaceCheckBox, i18n( "This option corresponds to the -w diff option." ) );
+ m_ignoreTabExpansionCheckBox = new TQCheckBox( i18n( "Igno&re changes due to tab expansion" ), moreOptionButtonGroup );
+ TQToolTip::add( m_ignoreTabExpansionCheckBox, i18n( "This option corresponds to the -E diff option." ) );
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
@@ -320,31 +320,31 @@ void DiffPage::addOptionsTab()
void DiffPage::addExcludeTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- QHGroupBox* excludeFilePatternGroupBox = new QHGroupBox( i18n( "File Pattern to Exclude" ), page );
- m_excludeFilePatternCheckBox = new QCheckBox( "", excludeFilePatternGroupBox );
- QToolTip::add( m_excludeFilePatternCheckBox, i18n( "If this is checked you can enter a shell pattern in the text box on the right or select entries from the list." ) );
+ TQHGroupBox* excludeFilePatternGroupBox = new TQHGroupBox( i18n( "File Pattern to Exclude" ), page );
+ m_excludeFilePatternCheckBox = new TQCheckBox( "", excludeFilePatternGroupBox );
+ TQToolTip::add( m_excludeFilePatternCheckBox, i18n( "If this is checked you can enter a shell pattern in the text box on the right or select entries from the list." ) );
m_excludeFilePatternEditListBox = new KEditListBox( excludeFilePatternGroupBox, "exclude_file_pattern_editlistbox", false, KEditListBox::Add|KEditListBox::Remove );
- QToolTip::add( m_excludeFilePatternEditListBox, i18n( "Here you can enter or remove a shell pattern or select one or more entries from the list." ) );
+ TQToolTip::add( m_excludeFilePatternEditListBox, i18n( "Here you can enter or remove a shell pattern or select one or more entries from the list." ) );
layout->addWidget( excludeFilePatternGroupBox );
- connect( m_excludeFilePatternCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotExcludeFilePatternToggled(bool)));
+ connect( m_excludeFilePatternCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFilePatternToggled(bool)));
- QHGroupBox* excludeFileNameGroupBox = new QHGroupBox( i18n( "File with Filenames to Exclude" ), page );
- m_excludeFileCheckBox = new QCheckBox( "", excludeFileNameGroupBox );
- QToolTip::add( m_excludeFileCheckBox, i18n( "If this is checked you can enter a filename in the combo box on the right." ) );
+ TQHGroupBox* excludeFileNameGroupBox = new TQHGroupBox( i18n( "File with Filenames to Exclude" ), page );
+ m_excludeFileCheckBox = new TQCheckBox( "", excludeFileNameGroupBox );
+ TQToolTip::add( m_excludeFileCheckBox, i18n( "If this is checked you can enter a filename in the combo box on the right." ) );
m_excludeFileURLComboBox = new KURLComboBox( KURLComboBox::Files, true, excludeFileNameGroupBox, "exclude_file_urlcombo" );
- QToolTip::add( m_excludeFileURLComboBox, i18n( "Here you can enter the URL of a file with shell patterns to ignore during the comparison of the folders." ) );
+ TQToolTip::add( m_excludeFileURLComboBox, i18n( "Here you can enter the URL of a file with shell patterns to ignore during the comparison of the folders." ) );
m_excludeFileURLRequester = new KURLRequester( m_excludeFileURLComboBox, excludeFileNameGroupBox, "exclude_file_name_urlrequester" );
- QToolTip::add( m_excludeFileURLRequester, i18n( "Any file you select in the dialog that pops up when you click it will be put in the dialog to the left of this button." ) );
+ TQToolTip::add( m_excludeFileURLRequester, i18n( "Any file you select in the dialog that pops up when you click it will be put in the dialog to the left of this button." ) );
layout->addWidget( excludeFileNameGroupBox );
- connect( m_excludeFileCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotExcludeFileToggled(bool)));
+ connect( m_excludeFileCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFileToggled(bool)));
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
diff --git a/kompare/libdialogpages/diffpage.h b/kompare/libdialogpages/diffpage.h
index dee23989..9a8e1fdc 100644
--- a/kompare/libdialogpages/diffpage.h
+++ b/kompare/libdialogpages/diffpage.h
@@ -41,7 +41,7 @@ class DiffPage : public PageBase
{
Q_OBJECT
public:
- DiffPage( QWidget* );
+ DiffPage( TQWidget* );
~DiffPage();
public:
@@ -69,32 +69,32 @@ public:
KURLRequester* m_diffURLRequester;
- QCheckBox* m_smallerCheckBox;
- QCheckBox* m_largerCheckBox;
- QCheckBox* m_tabsCheckBox;
- QCheckBox* m_caseCheckBox;
- QCheckBox* m_linesCheckBox;
- QCheckBox* m_whitespaceCheckBox;
- QCheckBox* m_allWhitespaceCheckBox;
- QCheckBox* m_ignoreTabExpansionCheckBox;
+ TQCheckBox* m_smallerCheckBox;
+ TQCheckBox* m_largerCheckBox;
+ TQCheckBox* m_tabsCheckBox;
+ TQCheckBox* m_caseCheckBox;
+ TQCheckBox* m_linesCheckBox;
+ TQCheckBox* m_whitespaceCheckBox;
+ TQCheckBox* m_allWhitespaceCheckBox;
+ TQCheckBox* m_ignoreTabExpansionCheckBox;
- QCheckBox* m_ignoreRegExpCheckBox;
+ TQCheckBox* m_ignoreRegExpCheckBox;
KLineEdit* m_ignoreRegExpEdit;
- QStringList* m_ignoreRegExpEditHistory;
- QDialog* m_ignoreRegExpDialog;
+ TQStringList* m_ignoreRegExpEditHistory;
+ TQDialog* m_ignoreRegExpDialog;
- QCheckBox* m_excludeFilePatternCheckBox;
+ TQCheckBox* m_excludeFilePatternCheckBox;
KEditListBox* m_excludeFilePatternEditListBox;
- QCheckBox* m_excludeFileCheckBox;
+ TQCheckBox* m_excludeFileCheckBox;
KURLComboBox* m_excludeFileURLComboBox;
KURLRequester* m_excludeFileURLRequester;
// loc == lines of context
- QSpinBox* m_locSpinBox;
+ TQSpinBox* m_locSpinBox;
- QVButtonGroup* m_modeButtonGroup;
- QVButtonGroup* m_diffProgramGroup;
+ TQVButtonGroup* m_modeButtonGroup;
+ TQVButtonGroup* m_diffProgramGroup;
};
#endif
diff --git a/kompare/libdialogpages/diffsettings.cpp b/kompare/libdialogpages/diffsettings.cpp
index 20504ffe..6c2186f5 100644
--- a/kompare/libdialogpages/diffsettings.cpp
+++ b/kompare/libdialogpages/diffsettings.cpp
@@ -19,7 +19,7 @@
#include "diffsettings.h"
-DiffSettings::DiffSettings( QWidget* parent )
+DiffSettings::DiffSettings( TQWidget* parent )
: SettingsBase( parent ),
m_linesOfContext( 0 ),
m_format( Kompare::Unified ),
diff --git a/kompare/libdialogpages/diffsettings.h b/kompare/libdialogpages/diffsettings.h
index 46962cb8..a41308c0 100644
--- a/kompare/libdialogpages/diffsettings.h
+++ b/kompare/libdialogpages/diffsettings.h
@@ -20,8 +20,8 @@
#ifndef DIFFSETTINGS_H
#define DIFFSETTINGS_H
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include "kompare.h"
#include "settingsbase.h"
@@ -30,7 +30,7 @@ class DiffSettings : public SettingsBase
{
Q_OBJECT
public:
- DiffSettings( QWidget* parent );
+ DiffSettings( TQWidget* parent );
virtual ~DiffSettings();
public:
// some virtual functions that will be overloaded from the base class
@@ -38,7 +38,7 @@ public:
virtual void saveSettings( KConfig* config );
public:
- QString m_diffProgram;
+ TQString m_diffProgram;
int m_linesOfContext;
Kompare::Format m_format;
bool m_largeFiles; // -H
@@ -51,16 +51,16 @@ public:
bool m_showCFunctionChange; // -p
bool m_convertTabsToSpaces; // -t
bool m_ignoreRegExp; // -I
- QString m_ignoreRegExpText; // the RE for -I
- QStringList m_ignoreRegExpTextHistory;
+ TQString m_ignoreRegExpText; // the RE for -I
+ TQStringList m_ignoreRegExpTextHistory;
bool m_recursive; // -r
bool m_newFiles; // -N
// bool m_allText; // -a
bool m_excludeFilePattern; // -x
- QStringList m_excludeFilePatternList; // The list of patterns for -x
+ TQStringList m_excludeFilePatternList; // The list of patterns for -x
bool m_excludeFilesFile; // -X
- QString m_excludeFilesFileURL; // The filename to -X
- QStringList m_excludeFilesFileHistoryList; // The history list of filenames
+ TQString m_excludeFilesFileURL; // The filename to -X
+ TQStringList m_excludeFilesFileHistoryList; // The history list of filenames
};
#endif
diff --git a/kompare/libdialogpages/filespage.cpp b/kompare/libdialogpages/filespage.cpp
index 9e15a129..f326bbde 100644
--- a/kompare/libdialogpages/filespage.cpp
+++ b/kompare/libdialogpages/filespage.cpp
@@ -16,8 +16,8 @@
**
***************************************************************************/
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kapplication.h>
#include <kcharsets.h>
@@ -31,27 +31,27 @@
#include "filessettings.h"
#include "filespage.h"
-FilesPage::FilesPage( QWidget* parent ) : PageBase( parent ), m_URLChanged( false )
+FilesPage::FilesPage( TQWidget* parent ) : PageBase( parent ), m_URLChanged( false )
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- m_firstGB = new QGroupBox( 1, Qt::Vertical, "You have to set this moron :)", page );
+ m_firstGB = new TQGroupBox( 1, Qt::Vertical, "You have to set this moron :)", page );
m_firstURLComboBox = new KURLComboBox( KURLComboBox::Both, true, m_firstGB, "SourceURLComboBox" );
m_firstURLRequester = new KURLRequester( m_firstURLComboBox, m_firstGB );
m_firstURLRequester->setFocus();
- m_secondGB = new QGroupBox( 1, Qt::Vertical, "This too moron !", page );
+ m_secondGB = new TQGroupBox( 1, Qt::Vertical, "This too moron !", page );
m_secondURLComboBox = new KURLComboBox( KURLComboBox::Both, true, m_secondGB, "DestURLComboBox" );
m_secondURLRequester = new KURLRequester( m_secondURLComboBox, m_secondGB );
- connect( m_firstURLRequester, SIGNAL( urlSelected( const QString & ) ), SLOT( setSecondURL( const QString & ) ) );
- connect( m_secondURLRequester, SIGNAL( urlSelected( const QString & ) ), SLOT( setFirstURL( const QString & ) ) );
+ connect( m_firstURLRequester, TQT_SIGNAL( urlSelected( const TQString & ) ), TQT_SLOT( setSecondURL( const TQString & ) ) );
+ connect( m_secondURLRequester, TQT_SIGNAL( urlSelected( const TQString & ) ), TQT_SLOT( setFirstURL( const TQString & ) ) );
- m_thirdGB = new QGroupBox( 1, Qt::Vertical, i18n( "Encoding" ), page );
- m_encodingComboBox = new QComboBox( false, m_thirdGB, "encoding_combobox" );
+ m_thirdGB = new TQGroupBox( 1, Qt::Vertical, i18n( "Encoding" ), page );
+ m_encodingComboBox = new TQComboBox( false, m_thirdGB, "encoding_combobox" );
m_encodingComboBox->insertStringList( KGlobal::charsets()->availableEncodingNames() );
layout->addWidget( m_firstGB );
@@ -79,17 +79,17 @@ KURLRequester* FilesPage::secondURLRequester() const
return m_secondURLRequester;
}
-QString FilesPage::encoding() const
+TQString FilesPage::encoding() const
{
return m_encodingComboBox->currentText();
}
-void FilesPage::setFirstGroupBoxTitle( const QString& title )
+void FilesPage::setFirstGroupBoxTitle( const TQString& title )
{
m_firstGB->setTitle( title );
}
-void FilesPage::setSecondGroupBoxTitle( const QString& title )
+void FilesPage::setSecondGroupBoxTitle( const TQString& title )
{
m_secondGB->setTitle( title );
}
@@ -147,9 +147,9 @@ void FilesPage::setDefaults()
m_encodingComboBox->setCurrentText( "Default" );
}
-void FilesPage::setFirstURL( const QString &url )
+void FilesPage::setFirstURL( const TQString &url )
{
- QString _url = url;
+ TQString _url = url;
if ( !m_URLChanged )
{
m_firstURLRequester->setURL( _url.remove( url.section( '/', -1 ) ) );
@@ -157,9 +157,9 @@ void FilesPage::setFirstURL( const QString &url )
}
}
-void FilesPage::setSecondURL( const QString &url )
+void FilesPage::setSecondURL( const TQString &url )
{
- QString _url = url;
+ TQString _url = url;
if ( !m_URLChanged )
{
m_secondURLRequester->setURL( _url.remove( url.section( '/', -1 ) ) );
diff --git a/kompare/libdialogpages/filespage.h b/kompare/libdialogpages/filespage.h
index 145c4614..db4347b8 100644
--- a/kompare/libdialogpages/filespage.h
+++ b/kompare/libdialogpages/filespage.h
@@ -37,17 +37,17 @@ class FilesPage : PageBase
{
Q_OBJECT
public:
- FilesPage( QWidget* parent );
+ FilesPage( TQWidget* parent );
virtual ~FilesPage();
public:
KURLRequester* firstURLRequester() const;
KURLRequester* secondURLRequester() const;
- QString encoding() const;
+ TQString encoding() const;
- void setFirstGroupBoxTitle ( const QString& title );
- void setSecondGroupBoxTitle( const QString& title );
+ void setFirstGroupBoxTitle ( const TQString& title );
+ void setSecondGroupBoxTitle( const TQString& title );
void setURLsInComboBoxes();
@@ -61,13 +61,13 @@ public:
virtual void setDefaults();
protected slots:
- void setFirstURL( const QString & );
- void setSecondURL( const QString & );
+ void setFirstURL( const TQString & );
+ void setSecondURL( const TQString & );
private:
- QGroupBox* m_firstGB;
- QGroupBox* m_secondGB;
- QGroupBox* m_thirdGB;
+ TQGroupBox* m_firstGB;
+ TQGroupBox* m_secondGB;
+ TQGroupBox* m_thirdGB;
KURLComboBox* m_firstURLComboBox;
KURLComboBox* m_secondURLComboBox;
KURLRequester* m_firstURLRequester;
@@ -75,7 +75,7 @@ private:
// Use this bool to lock the connection between both KURLRequesters.
// This prevents annoying behaviour
bool m_URLChanged;
- QComboBox* m_encodingComboBox;
+ TQComboBox* m_encodingComboBox;
FilesSettings* m_settings;
};
diff --git a/kompare/libdialogpages/filessettings.cpp b/kompare/libdialogpages/filessettings.cpp
index d5a94a66..01b70076 100644
--- a/kompare/libdialogpages/filessettings.cpp
+++ b/kompare/libdialogpages/filessettings.cpp
@@ -21,7 +21,7 @@
#include "filessettings.h"
-FilesSettings::FilesSettings( QWidget* parent )
+FilesSettings::FilesSettings( TQWidget* parent )
: SettingsBase( parent )
{
}
@@ -52,7 +52,7 @@ void FilesSettings::saveSettings( KConfig* config )
config->sync();
}
-void FilesSettings::setGroup( const QString& groupName )
+void FilesSettings::setGroup( const TQString& groupName )
{
m_configGroupName = groupName;
}
diff --git a/kompare/libdialogpages/filessettings.h b/kompare/libdialogpages/filessettings.h
index 3c394dbb..e38fff6d 100644
--- a/kompare/libdialogpages/filessettings.h
+++ b/kompare/libdialogpages/filessettings.h
@@ -19,7 +19,7 @@
#ifndef FILESSETTINGS_H
#define FILESSETTINGS_H
-#include <qstring.h>
+#include <tqstring.h>
#include "settingsbase.h"
@@ -29,7 +29,7 @@ class FilesSettings : public SettingsBase
{
Q_OBJECT
public:
- FilesSettings( QWidget* parent );
+ FilesSettings( TQWidget* parent );
virtual ~FilesSettings();
public:
@@ -37,16 +37,16 @@ public:
virtual void loadSettings( KConfig* config );
virtual void saveSettings( KConfig* config );
- void setGroup( const QString& groupName );
+ void setGroup( const TQString& groupName );
public:
- QString m_configGroupName;
+ TQString m_configGroupName;
- QStringList m_recentSources;
- QString m_lastChosenSourceURL;
- QStringList m_recentDestinations;
- QString m_lastChosenDestinationURL;
- QString m_encoding;
+ TQStringList m_recentSources;
+ TQString m_lastChosenSourceURL;
+ TQStringList m_recentDestinations;
+ TQString m_lastChosenDestinationURL;
+ TQString m_encoding;
};
#endif // FILESSETTINGS_H
diff --git a/kompare/libdialogpages/pagebase.cpp b/kompare/libdialogpages/pagebase.cpp
index de062634..ef9aa1ea 100644
--- a/kompare/libdialogpages/pagebase.cpp
+++ b/kompare/libdialogpages/pagebase.cpp
@@ -17,12 +17,12 @@
**
***************************************************************************/
-#include <qlayout.h>
-#include <qobjectlist.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
#include "pagebase.h"
-PageBase::PageBase( QWidget* parent ) : KTabCtl( parent )
+PageBase::PageBase( TQWidget* parent ) : KTabCtl( parent )
{
}
@@ -33,7 +33,7 @@ PageBase::~PageBase()
}
/** No descriptions */
-QSize PageBase::sizeHintForWidget( QWidget* widget )
+TQSize PageBase::sizeHintForWidget( TQWidget* widget )
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -44,23 +44,23 @@ QSize PageBase::sizeHintForWidget( QWidget* widget )
// this code in this method has been ripped out of a file in kbabel
// so copyright goes to the kbabel authors.
- QSize size;
+ TQSize size;
int numChild = 0;
- QObjectList *l = (QObjectList*)(widget->children());
+ TQObjectList *l = (TQObjectList*)(widget->children());
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
numChild += 1;
- QWidget *w=((QWidget*)o);
+ TQWidget *w=((TQWidget*)o);
- QSize s = w->sizeHint();
+ TQSize s = w->sizeHint();
if( s.isEmpty() == true )
{
- s = QSize( 50, 100 ); // Default size
+ s = TQSize( 50, 100 ); // Default size
}
size.setHeight( size.height() + s.height() );
if( s.width() > size.width() )
@@ -73,11 +73,11 @@ QSize PageBase::sizeHintForWidget( QWidget* widget )
if( numChild > 0 )
{
size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) );
- size += QSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
+ size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
}
else
{
- size = QSize( 1, 1 );
+ size = TQSize( 1, 1 );
}
return( size );
diff --git a/kompare/libdialogpages/pagebase.h b/kompare/libdialogpages/pagebase.h
index 7aab7b81..0f188b36 100644
--- a/kompare/libdialogpages/pagebase.h
+++ b/kompare/libdialogpages/pagebase.h
@@ -20,8 +20,8 @@
#ifndef PAGEBASE_H
#define PAGEBASE_H
-#include <qsize.h>
-#include <qwidget.h>
+#include <tqsize.h>
+#include <tqwidget.h>
#include <kconfig.h>
#include <ktabctl.h>
@@ -32,12 +32,12 @@ class PageBase : public KTabCtl
{
Q_OBJECT
public:
- PageBase( QWidget* );
+ PageBase( TQWidget* );
~PageBase();
public:
/** No descriptions */
- QSize sizeHintForWidget( QWidget* widget );
+ TQSize sizeHintForWidget( TQWidget* widget );
/** No descriptions */
virtual void restore();
/** No descriptions */
diff --git a/kompare/libdialogpages/settingsbase.cpp b/kompare/libdialogpages/settingsbase.cpp
index dc7b64d6..6e347719 100644
--- a/kompare/libdialogpages/settingsbase.cpp
+++ b/kompare/libdialogpages/settingsbase.cpp
@@ -17,11 +17,11 @@
**
***************************************************************************/
-#include <qwidget.h>
+#include <tqwidget.h>
#include "settingsbase.h"
-SettingsBase::SettingsBase( QWidget* parent ) : QObject( parent )
+SettingsBase::SettingsBase( TQWidget* parent ) : TQObject( parent )
{
}
diff --git a/kompare/libdialogpages/settingsbase.h b/kompare/libdialogpages/settingsbase.h
index 5ec035ba..2e6b2f97 100644
--- a/kompare/libdialogpages/settingsbase.h
+++ b/kompare/libdialogpages/settingsbase.h
@@ -20,7 +20,7 @@
#ifndef SETTINGSBASE_H
#define SETTINGSBASE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kompare.h"
@@ -31,7 +31,7 @@ class SettingsBase : public QObject
{
Q_OBJECT
public:
- SettingsBase( QWidget* parent );
+ SettingsBase( TQWidget* parent );
~SettingsBase();
public:
diff --git a/kompare/libdialogpages/viewpage.cpp b/kompare/libdialogpages/viewpage.cpp
index c4e61e8d..1deb9e21 100644
--- a/kompare/libdialogpages/viewpage.cpp
+++ b/kompare/libdialogpages/viewpage.cpp
@@ -17,12 +17,12 @@
**
***************************************************************************/
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#include <kapplication.h>
#include <kcolorbutton.h>
@@ -33,62 +33,62 @@
#include "viewpage.h"
#include "viewsettings.h"
-ViewPage::ViewPage( QWidget* parent ) : PageBase( parent )
+ViewPage::ViewPage( TQWidget* parent ) : PageBase( parent )
{
- QWidget* page;
- QVBoxLayout* layout;
- QGroupBox* colorGroupBox;
- QHGroupBox* snolGroupBox;
- QHGroupBox* tabGroupBox;
- QLabel* label;
-
- page = new QWidget( this );
- layout = new QVBoxLayout( page );
+ TQWidget* page;
+ TQVBoxLayout* layout;
+ TQGroupBox* colorGroupBox;
+ TQHGroupBox* snolGroupBox;
+ TQHGroupBox* tabGroupBox;
+ TQLabel* label;
+
+ page = new TQWidget( this );
+ layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add a groupbox
- colorGroupBox = new QGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page );
+ colorGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page );
layout->addWidget( colorGroupBox );
colorGroupBox->setMargin( KDialog::marginHint() );
// add the removeColor
- label = new QLabel( i18n( "Removed color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Removed color:" ), colorGroupBox );
m_removedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_removedColorButton );
// add the changeColor
- label = new QLabel( i18n( "Changed color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Changed color:" ), colorGroupBox );
m_changedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_changedColorButton );
// add the addColor
- label = new QLabel( i18n( "Added color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Added color:" ), colorGroupBox );
m_addedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_addedColorButton );
// add the appliedColor
- label = new QLabel( i18n( "Applied color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Applied color:" ), colorGroupBox );
m_appliedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_appliedColorButton );
// scroll number of lines (snol)
- snolGroupBox = new QHGroupBox( i18n( "Mouse Wheel" ), page );
+ snolGroupBox = new TQHGroupBox( i18n( "Mouse Wheel" ), page );
layout->addWidget( snolGroupBox );
snolGroupBox->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Number of lines:" ), snolGroupBox );
- m_snolSpinBox = new QSpinBox( 0, 50, 1, snolGroupBox );
+ label = new TQLabel( i18n( "Number of lines:" ), snolGroupBox );
+ m_snolSpinBox = new TQSpinBox( 0, 50, 1, snolGroupBox );
label->setBuddy( m_snolSpinBox );
// Temporarily here for testing...
// number of spaces for a tab character stuff
- tabGroupBox = new QHGroupBox( i18n( "Tabs to Spaces" ), page );
+ tabGroupBox = new TQHGroupBox( i18n( "Tabs to Spaces" ), page );
layout->addWidget( tabGroupBox );
tabGroupBox->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Number of spaces to convert a tab character to:" ), tabGroupBox );
- m_tabSpinBox = new QSpinBox( 1, 16, 1, tabGroupBox );
+ label = new TQLabel( i18n( "Number of spaces to convert a tab character to:" ), tabGroupBox );
+ m_tabSpinBox = new TQSpinBox( 1, 16, 1, tabGroupBox );
label->setBuddy( m_tabSpinBox );
layout->addStretch( 1 );
@@ -96,21 +96,21 @@ ViewPage::ViewPage( QWidget* parent ) : PageBase( parent )
addTab( page, i18n( "A&ppearance" ) );
- page = new QWidget( this );
- layout = new QVBoxLayout( page );
+ page = new TQWidget( this );
+ layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- QHGroupBox* gb = new QHGroupBox( i18n( "Text Font" ), page );
+ TQHGroupBox* gb = new TQHGroupBox( i18n( "Text Font" ), page );
layout->addWidget( gb );
gb->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Font:" ), gb );
+ label = new TQLabel( i18n( "Font:" ), gb );
m_fontCombo = new KFontCombo( gb, "fontcombo" );
label->setBuddy( m_fontCombo );
- label = new QLabel( i18n( "Size:" ), gb );
- m_fontSizeSpinBox = new QSpinBox( 6, 24, 1, gb, "fontsize" );
+ label = new TQLabel( i18n( "Size:" ), gb );
+ m_fontSizeSpinBox = new TQSpinBox( 6, 24, 1, gb, "fontsize" );
label->setBuddy( m_fontSizeSpinBox );
layout->addStretch( 1 );
@@ -157,7 +157,7 @@ void ViewPage::apply()
m_settings->m_scrollNoOfLines = m_snolSpinBox->value();
m_settings->m_tabToNumberOfSpaces = m_tabSpinBox->value();
- m_settings->m_font = QFont( m_fontCombo->currentFont() );
+ m_settings->m_font = TQFont( m_fontCombo->currentFont() );
m_settings->m_font.setPointSize( m_fontSizeSpinBox->value() );
m_settings->saveSettings( kapp->config() );
diff --git a/kompare/libdialogpages/viewpage.h b/kompare/libdialogpages/viewpage.h
index 30591f4b..6b75684e 100644
--- a/kompare/libdialogpages/viewpage.h
+++ b/kompare/libdialogpages/viewpage.h
@@ -34,7 +34,7 @@ class ViewPage : public PageBase
{
Q_OBJECT
public:
- ViewPage( QWidget* );
+ ViewPage( TQWidget* );
~ViewPage();
public:
@@ -55,10 +55,10 @@ public:
KColorButton* m_addedColorButton;
KColorButton* m_appliedColorButton;
// snol == scroll number of lines
- QSpinBox* m_snolSpinBox;
- QSpinBox* m_tabSpinBox;
+ TQSpinBox* m_snolSpinBox;
+ TQSpinBox* m_tabSpinBox;
KFontCombo* m_fontCombo;
- QSpinBox* m_fontSizeSpinBox;
+ TQSpinBox* m_fontSizeSpinBox;
};
#endif
diff --git a/kompare/libdialogpages/viewsettings.cpp b/kompare/libdialogpages/viewsettings.cpp
index c55dd40e..403746b1 100644
--- a/kompare/libdialogpages/viewsettings.cpp
+++ b/kompare/libdialogpages/viewsettings.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qfont.h>
+#include <tqfont.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -26,12 +26,12 @@
using namespace Diff2;
-const QColor ViewSettings::default_removeColor (190, 237, 190);
-const QColor ViewSettings::default_changeColor (237, 190, 190);
-const QColor ViewSettings::default_addColor (190, 190, 237);
-const QColor ViewSettings::default_appliedColor(237, 237, 190);
+const TQColor ViewSettings::default_removeColor (190, 237, 190);
+const TQColor ViewSettings::default_changeColor (237, 190, 190);
+const TQColor ViewSettings::default_addColor (190, 190, 237);
+const TQColor ViewSettings::default_appliedColor(237, 237, 190);
-ViewSettings::ViewSettings( QWidget* parent )
+ViewSettings::ViewSettings( TQWidget* parent )
: SettingsBase( parent ),
m_removeColor( 0, 0, 0 ),
m_changeColor( 0, 0, 0),
@@ -56,7 +56,7 @@ void ViewSettings::loadSettings( KConfig* config )
m_scrollNoOfLines = cfg.readNumEntry ( "ScrollNoOfLines", 3 );
m_tabToNumberOfSpaces = cfg.readNumEntry ( "TabToNumberOfSpaces", 4 );
- QFont stdFixed = KGlobalSettings::fixedFont();
+ TQFont stdFixed = KGlobalSettings::fixedFont();
stdFixed.setPointSize( 10 );
m_font = cfg.readFontEntry ( "TextFont", &stdFixed );
}
@@ -74,10 +74,10 @@ void ViewSettings::saveSettings( KConfig* config )
cfg.writeEntry( "TextFont", m_font );
}
-QColor ViewSettings::colorForDifferenceType( int type, bool selected, bool applied )
+TQColor ViewSettings::colorForDifferenceType( int type, bool selected, bool applied )
{
// FIXME: does not belong here
- QColor color;
+ TQColor color;
if( applied )
color = m_appliedColor;
else
diff --git a/kompare/libdialogpages/viewsettings.h b/kompare/libdialogpages/viewsettings.h
index ab0f4d5f..24bf8e9a 100644
--- a/kompare/libdialogpages/viewsettings.h
+++ b/kompare/libdialogpages/viewsettings.h
@@ -20,8 +20,8 @@
#ifndef VIEWSETTINGS_H
#define VIEWSETTINGS_H
-#include <qcolor.h>
-#include <qwidget.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
#include "difference.h"
#include "settingsbase.h"
@@ -30,32 +30,32 @@ class ViewSettings : public SettingsBase
{
Q_OBJECT
public:
- static const QColor default_removeColor;
- static const QColor default_changeColor;
- static const QColor default_addColor;
- static const QColor default_appliedColor;
+ static const TQColor default_removeColor;
+ static const TQColor default_changeColor;
+ static const TQColor default_addColor;
+ static const TQColor default_appliedColor;
- ViewSettings( QWidget* parent );
+ ViewSettings( TQWidget* parent );
~ViewSettings();
public:
// some virtual functions that will be overloaded from the base class
virtual void loadSettings( KConfig* config );
virtual void saveSettings( KConfig* config );
- QColor colorForDifferenceType( int type, bool selected = false, bool applied = false );
+ TQColor colorForDifferenceType( int type, bool selected = false, bool applied = false );
public:
- QColor m_removeColor;
- QColor m_changeColor;
- QColor m_addColor;
- QColor m_appliedColor;
- QColor m_selectedRemoveColor;
- QColor m_selectedChangeColor;
- QColor m_selectedAddColor;
- QColor m_selectedAppliedColor;
+ TQColor m_removeColor;
+ TQColor m_changeColor;
+ TQColor m_addColor;
+ TQColor m_appliedColor;
+ TQColor m_selectedRemoveColor;
+ TQColor m_selectedChangeColor;
+ TQColor m_selectedAddColor;
+ TQColor m_selectedAppliedColor;
int m_scrollNoOfLines;
int m_tabToNumberOfSpaces;
- QFont m_font;
+ TQFont m_font;
};
#endif // VIEWSETTINGS_H
diff --git a/kompare/libdiff2/cvsdiffparser.cpp b/kompare/libdiff2/cvsdiffparser.cpp
index d210eb66..47c79a0f 100644
--- a/kompare/libdiff2/cvsdiffparser.cpp
+++ b/kompare/libdiff2/cvsdiffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
using namespace Diff2;
-CVSDiffParser::CVSDiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+CVSDiffParser::CVSDiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context cvs diff parsing, the rest is the same as in parserbase.cpp
// third capture in header1 is non optional for cvs diff, it is the revision
@@ -43,13 +43,13 @@ enum Kompare::Format CVSDiffParser::determineFormat()
{
// kdDebug(8101) << "Determining the format of the CVSDiff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- [^\\t]+\\t" );
- QRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- [^\\t]+\\t" );
+ TQRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -89,7 +89,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "CVSDiffParser::parseNormalDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator diffEnd = m_diffLines.end();
+ TQStringList::ConstIterator diffEnd = m_diffLines.end();
while ( m_diffIterator != diffEnd )
{
@@ -99,7 +99,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 1 ) );
@@ -120,7 +120,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
diff --git a/kompare/libdiff2/cvsdiffparser.h b/kompare/libdiff2/cvsdiffparser.h
index 88fef485..e856cc6d 100644
--- a/kompare/libdiff2/cvsdiffparser.h
+++ b/kompare/libdiff2/cvsdiffparser.h
@@ -18,7 +18,7 @@
#ifndef _CVSDIFF_PARSER_H
#define _CVSDIFF_PARSER_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "parserbase.h"
@@ -30,7 +30,7 @@ class KompareModelList;
class CVSDiffParser : public ParserBase
{
public:
- CVSDiffParser( const KompareModelList* list, const QStringList& diff );
+ CVSDiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~CVSDiffParser();
protected:
diff --git a/kompare/libdiff2/difference.cpp b/kompare/libdiff2/difference.cpp
index 8cbb4093..c23dd1e9 100644
--- a/kompare/libdiff2/difference.cpp
+++ b/kompare/libdiff2/difference.cpp
@@ -34,12 +34,12 @@ Difference::~Difference()
{
}
-void Difference::addSourceLine( QString line )
+void Difference::addSourceLine( TQString line )
{
m_sourceLines.append( new DifferenceString( line ) );
}
-void Difference::addDestinationLine( QString line )
+void Difference::addDestinationLine( TQString line )
{
m_destinationLines.append( new DifferenceString( line ) );
}
@@ -85,9 +85,9 @@ void Difference::determineInlineDifferences()
}
}
-QString Difference::recreateDifference() const
+TQString Difference::recreateDifference() const
{
- QString difference;
+ TQString difference;
// source
DifferenceStringListConstIterator stringIt = m_sourceLines.begin();
diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h
index 91065891..51295636 100644
--- a/kompare/libdiff2/difference.h
+++ b/kompare/libdiff2/difference.h
@@ -20,8 +20,8 @@
#ifndef DIFFERENCE_H
#define DIFFERENCE_H
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
@@ -62,9 +62,9 @@ private:
unsigned int m_offset;
};
-typedef QValueList<Marker*> MarkerList;
-typedef QValueList<Marker*>::iterator MarkerListIterator;
-typedef QValueList<Marker*>::const_iterator MarkerListConstIterator;
+typedef TQValueList<Marker*> MarkerList;
+typedef TQValueList<Marker*>::iterator MarkerListIterator;
+typedef TQValueList<Marker*>::const_iterator MarkerListConstIterator;
class DifferenceString
{
@@ -73,7 +73,7 @@ public:
{
// kdDebug(8101) << "DifferenceString::DifferenceString()" << endl;
}
- DifferenceString( const QString& string, const MarkerList& markerList = MarkerList() ) :
+ DifferenceString( const TQString& string, const MarkerList& markerList = MarkerList() ) :
m_string( string ),
m_markerList( markerList )
{
@@ -91,11 +91,11 @@ public:
~DifferenceString() {}
public:
- const QString& string() const
+ const TQString& string() const
{
return m_string;
}
- const QString& conflictString() const
+ const TQString& conflictString() const
{
return m_conflict;
}
@@ -103,12 +103,12 @@ public:
{
return m_markerList;
}
- void setString( const QString& string )
+ void setString( const TQString& string )
{
m_string = string;
calculateHash();
}
- void setConflictString( const QString& conflict )
+ void setConflictString( const TQString& conflict )
{
m_conflict = conflict;
}
@@ -142,15 +142,15 @@ protected:
}
private:
- QString m_string;
- QString m_conflict;
+ TQString m_string;
+ TQString m_conflict;
unsigned int m_hash;
MarkerList m_markerList;
};
-typedef QValueVector<DifferenceString*> DifferenceStringList;
-typedef QValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
-typedef QValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
+typedef TQValueVector<DifferenceString*> DifferenceStringList;
+typedef TQValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
+typedef TQValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
class Difference
{
@@ -190,13 +190,13 @@ public:
void setType( int type ) { m_type = type; }
- void addSourceLine( QString line );
- void addDestinationLine( QString line );
+ void addSourceLine( TQString line );
+ void addDestinationLine( TQString line );
/** This method will calculate the differences between the individual strings and store them as Markers */
void determineInlineDifferences();
- QString recreateDifference() const;
+ TQString recreateDifference() const;
private:
int m_type;
@@ -213,9 +213,9 @@ private:
LevenshteinTable* m_tableXXX; // now unused
};
-typedef QValueList<Difference*> DifferenceList;
-typedef QValueList<Difference*>::iterator DifferenceListIterator;
-typedef QValueList<Difference*>::const_iterator DifferenceListConstIterator;
+typedef TQValueList<Difference*> DifferenceList;
+typedef TQValueList<Difference*>::iterator DifferenceListIterator;
+typedef TQValueList<Difference*>::const_iterator DifferenceListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp
index f980dd93..3b48d796 100644
--- a/kompare/libdiff2/diffhunk.cpp
+++ b/kompare/libdiff2/diffhunk.cpp
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffHunk::DiffHunk( int sourceLine, int destinationLine, QString function, Type type ) :
+DiffHunk::DiffHunk( int sourceLine, int destinationLine, TQString function, Type type ) :
m_sourceLine( sourceLine ),
m_destinationLine( destinationLine ),
m_function( function ),
@@ -66,10 +66,10 @@ int DiffHunk::destinationLineCount() const
return lineCount;
}
-QString DiffHunk::recreateHunk() const
+TQString DiffHunk::recreateHunk() const
{
- QString hunk;
- QString differences;
+ TQString hunk;
+ TQString differences;
// recreate body
DifferenceListConstIterator diffIt = m_differences.begin();
@@ -97,7 +97,7 @@ QString DiffHunk::recreateHunk() const
}
// recreate header
- hunk += QString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
+ hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
.arg( m_sourceLine )
.arg( m_destinationLine )
.arg( slc )
@@ -106,7 +106,7 @@ QString DiffHunk::recreateHunk() const
if ( !m_function.isEmpty() )
hunk += " " + m_function;
- hunk += QString::fromLatin1( "\n" );
+ hunk += TQString::fromLatin1( "\n" );
hunk += differences;
diff --git a/kompare/libdiff2/diffhunk.h b/kompare/libdiff2/diffhunk.h
index 8a76babb..a4194a3a 100644
--- a/kompare/libdiff2/diffhunk.h
+++ b/kompare/libdiff2/diffhunk.h
@@ -33,11 +33,11 @@ public:
enum Type { Normal, AddedByBlend };
public:
- DiffHunk( int sourceLine, int destinationLine, QString function = QString::null, Type type = Normal );
+ DiffHunk( int sourceLine, int destinationLine, TQString function = TQString::null, Type type = Normal );
~DiffHunk();
const DifferenceList& differences() const { return m_differences; };
- const QString& function() const { return m_function; };
+ const TQString& function() const { return m_function; };
int sourceLineNumber() const { return m_sourceLine; };
int destinationLineNumber() const { return m_destinationLine; };
@@ -50,19 +50,19 @@ public:
void add( Difference* diff );
- QString recreateHunk() const;
+ TQString recreateHunk() const;
private:
int m_sourceLine;
int m_destinationLine;
DifferenceList m_differences;
- QString m_function;
+ TQString m_function;
Type m_type;
};
-typedef QValueList<DiffHunk*> DiffHunkList;
-typedef QValueList<DiffHunk*>::iterator DiffHunkListIterator;
-typedef QValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
+typedef TQValueList<DiffHunk*> DiffHunkList;
+typedef TQValueList<DiffHunk*>::iterator DiffHunkListIterator;
+typedef TQValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp
index 54c33457..1b3822b0 100644
--- a/kompare/libdiff2/diffmodel.cpp
+++ b/kompare/libdiff2/diffmodel.cpp
@@ -17,8 +17,8 @@
**
***************************************************************************/
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
using namespace Diff2;
/** */
-DiffModel::DiffModel( const QString& source, const QString& destination ) :
+DiffModel::DiffModel( const TQString& source, const TQString& destination ) :
m_source( source ),
m_destination( destination ),
m_sourcePath( "" ),
@@ -146,19 +146,19 @@ int DiffModel::localeAwareCompareSource( const DiffModel& model )
return result;
}
-QString DiffModel::recreateDiff() const
+TQString DiffModel::recreateDiff() const
{
// For now we'll always return a diff in the diff format
- QString diff;
+ TQString diff;
// recreate header
- QString tab = QString::fromLatin1( "\t" );
- QString nl = QString::fromLatin1( "\n" );
- diff += QString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
+ TQString tab = TQString::fromLatin1( "\t" );
+ TQString nl = TQString::fromLatin1( "\n" );
+ diff += TQString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
if ( !m_sourceRevision.isEmpty() )
diff += tab + m_sourceRevision;
diff += nl;
- diff += QString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
+ diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
if ( !m_destinationRevision.isEmpty() )
diff += tab + m_destinationRevision;
diff += nl;
@@ -262,54 +262,54 @@ Difference* DiffModel::nextDifference()
return m_selectedDifference;
}
-const QString DiffModel::sourceFile() const
+const TQString DiffModel::sourceFile() const
{
return m_sourceFile;
}
-const QString DiffModel::destinationFile() const
+const TQString DiffModel::destinationFile() const
{
return m_destinationFile;
}
-const QString DiffModel::sourcePath() const
+const TQString DiffModel::sourcePath() const
{
return m_sourcePath;
}
-const QString DiffModel::destinationPath() const
+const TQString DiffModel::destinationPath() const
{
return m_destinationPath;
}
-void DiffModel::setSourceFile( QString path )
+void DiffModel::setSourceFile( TQString path )
{
m_source = path;
splitSourceInPathAndFileName();
}
-void DiffModel::setDestinationFile( QString path )
+void DiffModel::setDestinationFile( TQString path )
{
m_destination = path;
splitDestinationInPathAndFileName();
}
-void DiffModel::setSourceTimestamp( QString timestamp )
+void DiffModel::setSourceTimestamp( TQString timestamp )
{
m_sourceTimestamp = timestamp;
}
-void DiffModel::setDestinationTimestamp( QString timestamp )
+void DiffModel::setDestinationTimestamp( TQString timestamp )
{
m_destinationTimestamp = timestamp;
}
-void DiffModel::setSourceRevision( QString revision )
+void DiffModel::setSourceRevision( TQString revision )
{
m_destinationRevision = revision;
}
-void DiffModel::setDestinationRevision( QString revision )
+void DiffModel::setDestinationRevision( TQString revision )
{
m_destinationRevision = revision;
}
diff --git a/kompare/libdiff2/diffmodel.h b/kompare/libdiff2/diffmodel.h
index 11c424b5..3b957b89 100644
--- a/kompare/libdiff2/diffmodel.h
+++ b/kompare/libdiff2/diffmodel.h
@@ -20,8 +20,8 @@
#ifndef DIFFMODEL_H
#define DIFFMODEL_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "diffhunk.h"
#include "kompare.h"
@@ -37,14 +37,14 @@ class DiffModel : public QObject
Q_OBJECT
public:
- DiffModel( const QString& srcBaseURL, const QString& destBaseURL );
+ DiffModel( const TQString& srcBaseURL, const TQString& destBaseURL );
DiffModel();
- DiffModel( const DiffModel& ) : QObject() {};
+ DiffModel( const DiffModel& ) : TQObject() {};
~DiffModel();
- int parseDiff( enum Kompare::Format format, const QStringList& list );
+ int parseDiff( enum Kompare::Format format, const TQStringList& list );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
int hunkCount() const { return m_hunks.count(); }
int differenceCount() const { return m_differences.count(); }
@@ -67,23 +67,23 @@ public:
Difference* prevDifference();
Difference* nextDifference();
- const QString source() const { return m_source; }
- const QString destination() const { return m_destination; }
- const QString sourceFile() const;
- const QString destinationFile() const;
- const QString sourcePath() const;
- const QString destinationPath() const;
- const QString sourceTimestamp() const { return m_sourceTimestamp; }
- const QString destinationTimestamp() const { return m_destinationTimestamp; }
- const QString sourceRevision() const { return m_sourceRevision; }
- const QString destinationRevision() const { return m_destinationRevision; }
-
- void setSourceFile( QString path );
- void setDestinationFile( QString path );
- void setSourceTimestamp( QString timestamp );
- void setDestinationTimestamp( QString timestamp );
- void setSourceRevision( QString revision );
- void setDestinationRevision( QString revision );
+ const TQString source() const { return m_source; }
+ const TQString destination() const { return m_destination; }
+ const TQString sourceFile() const;
+ const TQString destinationFile() const;
+ const TQString sourcePath() const;
+ const TQString destinationPath() const;
+ const TQString sourceTimestamp() const { return m_sourceTimestamp; }
+ const TQString destinationTimestamp() const { return m_destinationTimestamp; }
+ const TQString sourceRevision() const { return m_sourceRevision; }
+ const TQString destinationRevision() const { return m_destinationRevision; }
+
+ void setSourceFile( TQString path );
+ void setDestinationFile( TQString path );
+ void setSourceTimestamp( TQString timestamp );
+ void setDestinationTimestamp( TQString timestamp );
+ void setSourceRevision( TQString revision );
+ void setDestinationRevision( TQString revision );
void addHunk( DiffHunk* hunk );
void addDiff( Difference* diff );
@@ -116,20 +116,20 @@ private:
void splitDestinationInPathAndFileName();
private:
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
- QString m_sourcePath;
- QString m_destinationPath;
+ TQString m_sourcePath;
+ TQString m_destinationPath;
- QString m_sourceFile;
- QString m_destinationFile;
+ TQString m_sourceFile;
+ TQString m_destinationFile;
- QString m_sourceTimestamp;
- QString m_destinationTimestamp;
+ TQString m_sourceTimestamp;
+ TQString m_destinationTimestamp;
- QString m_sourceRevision;
- QString m_destinationRevision;
+ TQString m_sourceRevision;
+ TQString m_destinationRevision;
DiffHunkList m_hunks;
DifferenceList m_differences;
diff --git a/kompare/libdiff2/diffmodellist.h b/kompare/libdiff2/diffmodellist.h
index 9c4f9807..bb4fefb5 100644
--- a/kompare/libdiff2/diffmodellist.h
+++ b/kompare/libdiff2/diffmodellist.h
@@ -19,21 +19,21 @@
#ifndef DIFFMODELLIST_H
#define DIFFMODELLIST_H
-#include <qvaluelist.h> // include for the base class
+#include <tqvaluelist.h> // include for the base class
#include "diffmodel.h"
namespace Diff2
{
-typedef QValueListIterator<DiffModel*> DiffModelListIterator;
-typedef QValueListConstIterator<DiffModel*> DiffModelListConstIterator;
+typedef TQValueListIterator<DiffModel*> DiffModelListIterator;
+typedef TQValueListConstIterator<DiffModel*> DiffModelListConstIterator;
-class DiffModelList : public QValueList<DiffModel*>
+class DiffModelList : public TQValueList<DiffModel*>
{
public:
DiffModelList() {}
- DiffModelList( const DiffModelList &list ) : QValueList<DiffModel*>( list ) {}
+ DiffModelList( const DiffModelList &list ) : TQValueList<DiffModel*>( list ) {}
virtual ~DiffModelList()
{
clear();
diff --git a/kompare/libdiff2/diffparser.cpp b/kompare/libdiff2/diffparser.cpp
index f98fbde5..d85256d2 100644
--- a/kompare/libdiff2/diffparser.cpp
+++ b/kompare/libdiff2/diffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffParser::DiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+DiffParser::DiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context diff parsing, the rest is the same as in parserbase.cpp
m_contextDiffHeader1.setPattern( "\\*\\*\\* ([^\\t]+)\\t([^\\t]+)\\n" );
@@ -38,13 +38,13 @@ enum Kompare::Format DiffParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the diff Diff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- " );
- QRegExp contextRE( "^\\*\\*\\* " );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- " );
+ TQRegExp contextRE( "^\\*\\*\\* " );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
diff --git a/kompare/libdiff2/diffparser.h b/kompare/libdiff2/diffparser.h
index 72905e3f..8bdbf600 100644
--- a/kompare/libdiff2/diffparser.h
+++ b/kompare/libdiff2/diffparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class DiffParser : public ParserBase
{
public:
- DiffParser( const KompareModelList* list, const QStringList& diff );
+ DiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~DiffParser();
protected:
diff --git a/kompare/libdiff2/kompare.h b/kompare/libdiff2/kompare.h
index 1ed5c4c7..8f6b7fe5 100644
--- a/kompare/libdiff2/kompare.h
+++ b/kompare/libdiff2/kompare.h
@@ -84,8 +84,8 @@ namespace Kompare
enum Generator _generator = UnknownGenerator,
KURL _source = KURL(),
KURL _destination = KURL(),
- QString _localSource = "",
- QString _localDestination = ""
+ TQString _localSource = "",
+ TQString _localDestination = ""
)
{
mode = _mode;
@@ -103,8 +103,8 @@ namespace Kompare
enum Generator generator;
KURL source;
KURL destination;
- QString localSource;
- QString localDestination;
+ TQString localSource;
+ TQString localDestination;
};
} // End of namespace Kompare
@@ -114,7 +114,7 @@ namespace Kompare
class KompareFunctions
{
public:
- static QString constructRelativePath( const QString& from, const QString& to )
+ static TQString constructRelativePath( const TQString& from, const TQString& to )
{
KURL fromURL( from );
KURL toURL( to );
@@ -130,12 +130,12 @@ public:
if( !root.isValid() ) return to;
- QString relative;
+ TQString relative;
for( ; upLevels > 0; upLevels-- ) {
relative += "../";
}
- relative += QString( to ).replace( 0, root.path(1).length(), "" );
+ relative += TQString( to ).replace( 0, root.path(1).length(), "" );
return relative;
}
diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp
index ac3c725a..db10f4c3 100644
--- a/kompare/libdiff2/komparemodellist.cpp
+++ b/kompare/libdiff2/komparemodellist.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kcharsets.h>
@@ -46,8 +46,8 @@
using namespace Diff2;
-KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent, const char* name )
- : QObject( parent, name ),
+KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent, const char* name )
+ : TQObject( parent, name ),
m_diffProcess( 0 ),
m_diffSettings( diffSettings ),
m_models( 0 ),
@@ -59,33 +59,33 @@ KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::
m_textCodec( 0 )
{
m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", Qt::Key_Space,
- this, SLOT(slotActionApplyDifference()),
+ this, TQT_SLOT(slotActionApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_apply" );
m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", Qt::Key_BackSpace,
- this, SLOT(slotActionUnApplyDifference()),
+ this, TQT_SLOT(slotActionUnApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_unapply" );
m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", Qt::CTRL + Qt::Key_A,
- this, SLOT(slotActionApplyAllDifferences()),
+ this, TQT_SLOT(slotActionApplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_applyall" );
m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", Qt::CTRL + Qt::Key_U,
- this, SLOT(slotActionUnapplyAllDifferences()),
+ this, TQT_SLOT(slotActionUnapplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_unapplyall" );
m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", Qt::CTRL + Qt::Key_PageUp,
- this, SLOT(slotPreviousModel()),
+ this, TQT_SLOT(slotPreviousModel()),
(( KomparePart* )parent)->actionCollection(), "difference_previousfile" );
m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", Qt::CTRL + Qt::Key_PageDown,
- this, SLOT(slotNextModel()),
+ this, TQT_SLOT(slotNextModel()),
(( KomparePart* )parent)->actionCollection(), "difference_nextfile" );
m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", Qt::CTRL + Qt::Key_Up,
- this, SLOT(slotPreviousDifference()),
+ this, TQT_SLOT(slotPreviousDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_previous" );
m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", Qt::CTRL + Qt::Key_Down,
- this, SLOT(slotNextDifference()),
+ this, TQT_SLOT(slotNextDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_next" );
m_previousDifference->setEnabled( false );
m_nextDifference->setEnabled( false );
- m_save = KStdAction::save( this, SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
+ m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
m_save->setEnabled( false );
updateModelListActions();
@@ -95,16 +95,16 @@ KompareModelList::~KompareModelList()
{
}
-bool KompareModelList::isDirectory( const QString& url ) const
+bool KompareModelList::isDirectory( const TQString& url ) const
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
if ( fi.isDir() )
return true;
else
return false;
}
-bool KompareModelList::isDiff( const QString& mimeType ) const
+bool KompareModelList::isDiff( const TQString& mimeType ) const
{
if ( mimeType == "text/x-diff" )
return true;
@@ -112,7 +112,7 @@ bool KompareModelList::isDiff( const QString& mimeType ) const
return false;
}
-bool KompareModelList::compare( const QString& source, const QString& destination )
+bool KompareModelList::compare( const TQString& source, const TQString& destination )
{
bool result = false;
@@ -126,15 +126,15 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
}
else if ( !sourceIsDirectory && !destinationIsDirectory )
{
- QFile sourceFile( source );
+ TQFile sourceFile( source );
sourceFile.open( IO_ReadOnly );
- QString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
+ TQString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
sourceFile.close();
kdDebug(8101) << "Mimetype source : " << sourceMimeType << endl;
- QFile destinationFile( destination );
+ TQFile destinationFile( destination );
destinationFile.open( IO_ReadOnly );
- QString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
+ TQString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
destinationFile.close();
kdDebug(8101) << "Mimetype destination: " << destinationMimeType << endl;
@@ -172,7 +172,7 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
return result;
}
-bool KompareModelList::compareFiles( const QString& source, const QString& destination )
+bool KompareModelList::compareFiles( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -183,16 +183,16 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
// m_fileWatch->addFile( m_source );
// m_fileWatch->addFile( m_destination );
-// connect( m_fileWatch, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
// m_fileWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -200,7 +200,7 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
return true;
}
-bool KompareModelList::compareDirs( const QString& source, const QString& destination )
+bool KompareModelList::compareDirs( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -212,16 +212,16 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
// m_dirWatch->addDir( m_source, true, true );
// m_dirWatch->addDir( m_destination, true, true );
-// connect( m_dirWatch, SIGNAL( dirty ( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( dirty ( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
// m_dirWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -229,7 +229,7 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
return true;
}
-bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff )
+bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& diff )
{
clear();
@@ -253,7 +253,7 @@ bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff
return true;
}
-bool KompareModelList::openDirAndDiff( const QString& dir, const QString& diff )
+bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff )
{
clear();
@@ -302,8 +302,8 @@ bool KompareModelList::saveDestination( DiffModel* model )
return false;
}
- QTextStream* stream = temp->textStream();
- QStringList list;
+ TQTextStream* stream = temp->textStream();
+ TQStringList list;
DiffHunkListConstIterator hunkIt = model->hunks()->begin();
DiffHunkListConstIterator hEnd = model->hunks()->end();
@@ -357,25 +357,25 @@ bool KompareModelList::saveDestination( DiffModel* model )
if ( m_info.mode == Kompare::ComparingDirs )
{
- QString destination = model->destinationPath() + model->destinationFile();
+ TQString destination = model->destinationPath() + model->destinationFile();
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << destination << endl;
KIO::UDSEntry entry;
- if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)parent() ) )
{
- if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)parent() ) )
{
emit error( i18n( "<qt>Could not create destination directory <b>%1</b>.\nThe file has not been saved.</qt>" ) );
return false;
}
}
- result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)parent() );
}
else
{
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << m_destination << endl;
- result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)parent() );
}
if ( !result )
@@ -407,12 +407,12 @@ bool KompareModelList::saveAll()
return true;
}
-void KompareModelList::setEncoding( const QString& encoding )
+void KompareModelList::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
if ( encoding.lower() == "default" )
{
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
else
{
@@ -420,7 +420,7 @@ void KompareModelList::setEncoding( const QString& encoding )
m_textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
kdDebug() << "TextCodec: " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
kdDebug() << "TextCodec: " << m_textCodec << endl;
}
@@ -459,7 +459,7 @@ void KompareModelList::slotDiffProcessFinished( bool success )
m_diffProcess = 0;
}
-void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
+void KompareModelList::slotDirectoryChanged( const TQString& /*dir*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie directories are being watched !!! :)" << endl;
@@ -470,7 +470,7 @@ void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
}
}
-void KompareModelList::slotFileChanged( const QString& /*file*/ )
+void KompareModelList::slotFileChanged( const TQString& /*file*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie files are being watched !!! :)" << endl;
@@ -481,10 +481,10 @@ void KompareModelList::slotFileChanged( const QString& /*file*/ )
}
}
-QStringList KompareModelList::split( const QString& fileContents )
+TQStringList KompareModelList::split( const TQString& fileContents )
{
- QString contents = fileContents;
- QStringList list;
+ TQString contents = fileContents;
+ TQStringList list;
int pos = 0;
unsigned int oldpos = 0;
@@ -508,36 +508,36 @@ QStringList KompareModelList::split( const QString& fileContents )
return list;
}
-QString KompareModelList::readFile( const QString& fileName )
+TQString KompareModelList::readFile( const TQString& fileName )
{
- QStringList list;
+ TQStringList list;
- QFile file( fileName );
+ TQFile file( fileName );
file.open( IO_ReadOnly );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
kdDebug() << "Codec = " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
stream.setCodec( m_textCodec );
- QString contents = stream.read();
+ TQString contents = stream.read();
file.close();
return contents;
}
-bool KompareModelList::openDiff( const QString& diffFile )
+bool KompareModelList::openDiff( const TQString& diffFile )
{
kdDebug(8101) << "Stupid :) Url = " << diffFile << endl;
if ( diffFile.isEmpty() )
return false;
- QString diff = readFile( diffFile );
+ TQString diff = readFile( diffFile );
clear(); // Clear the current models
@@ -557,9 +557,9 @@ bool KompareModelList::openDiff( const QString& diffFile )
return true;
}
-QString KompareModelList::recreateDiff() const
+TQString KompareModelList::recreateDiff() const
{
- QString diff;
+ TQString diff;
DiffModelListConstIterator modelIt = m_models->begin();
DiffModelListConstIterator mEnd = m_models->end();
@@ -571,7 +571,7 @@ QString KompareModelList::recreateDiff() const
return diff;
}
-bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSettings* diffSettings )
+bool KompareModelList::saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings )
{
kdDebug() << "KompareModelList::saveDiff: " << endl;
@@ -589,8 +589,8 @@ bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSett
m_diffProcess = new KompareProcess( diffSettings, Kompare::Custom, m_source, m_destination, directory );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotWriteDiffOutput( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotWriteDiffOutput( bool )) );
emit status( Kompare::RunningDiff );
return m_diffProcess->start();
@@ -602,7 +602,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
if( success )
{
- QTextStream* stream = m_diffTemp->textStream();
+ TQTextStream* stream = m_diffTemp->textStream();
*stream << m_diffProcess->diffOutput();
@@ -613,7 +613,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
emit error( i18n( "Could not write to the temporary file." ) );
}
- KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (QWidget*)parent() );
+ KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)parent() );
emit status( Kompare::FinishedWritingDiff );
}
@@ -857,11 +857,11 @@ void KompareModelList::slotApplyAllDifferences( bool apply )
emit applyAllDifferences( apply );
}
-int KompareModelList::parseDiffOutput( const QString& diff )
+int KompareModelList::parseDiffOutput( const TQString& diff )
{
kdDebug(8101) << "KompareModelList::parseDiffOutput" << endl;
- QStringList diffLines = split( diff );
+ TQStringList diffLines = split( diff );
Parser* parser = new Parser( this );
m_models = parser->parse( diffLines );
@@ -888,30 +888,30 @@ int KompareModelList::parseDiffOutput( const QString& diff )
return 0;
}
-bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
+bool KompareModelList::blendOriginalIntoModelList( const TQString& localURL )
{
kdDebug() << "Hurrah we are blending..." << endl;
- QFileInfo fi( localURL );
+ TQFileInfo fi( localURL );
bool result = false;
DiffModel* model;
- QString fileContents;
+ TQString fileContents;
if ( fi.isDir() )
{ // is a dir
kdDebug() << "Blend Dir" << endl;
-// QDir dir( localURL, QString::null, QDir::Name|QDir::DirsFirst, QDir::All );
+// TQDir dir( localURL, TQString::null, TQDir::Name|TQDir::DirsFirst, TQDir::All );
DiffModelListIterator modelIt = m_models->begin();
DiffModelListIterator mEnd = m_models->end();
for ( ; modelIt != mEnd; ++modelIt )
{
model = *modelIt;
kdDebug(8101) << "Model : " << model << endl;
- QString filename = model->sourcePath() + model->sourceFile();
+ TQString filename = model->sourcePath() + model->sourceFile();
if ( !filename.startsWith( localURL ) )
filename.prepend( localURL );
- QFileInfo fi2( filename );
+ TQFileInfo fi2( filename );
if ( fi2.exists() )
{
kdDebug(8101) << "Reading from: " << filename << endl;
@@ -941,7 +941,7 @@ bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
return result;
}
-bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents )
+bool KompareModelList::blendFile( DiffModel* model, const TQString& fileContents )
{
if ( !model )
{
@@ -953,10 +953,10 @@ bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents
int srcLineNo = 1, destLineNo = 1;
- QStringList lines = split( fileContents );
+ TQStringList lines = split( fileContents );
- QStringList::ConstIterator linesIt = lines.begin();
- QStringList::ConstIterator lEnd = lines.end();
+ TQStringList::ConstIterator linesIt = lines.begin();
+ TQStringList::ConstIterator lEnd = lines.end();
DiffHunkList* hunks = model->hunks();
kdDebug(8101) << "Hunks in hunklist: " << hunks->count() << endl;
@@ -1191,8 +1191,8 @@ void KompareModelList::clear()
void KompareModelList::swap()
{
- QString source = m_source;
- QString destination = m_destination;
+ TQString source = m_source;
+ TQString destination = m_destination;
if ( m_info.mode == Kompare::ComparingFiles )
compareFiles( destination, source );
else if ( m_info.mode == Kompare::ComparingDirs )
diff --git a/kompare/libdiff2/komparemodellist.h b/kompare/libdiff2/komparemodellist.h
index 8ba264fb..d1f834ae 100644
--- a/kompare/libdiff2/komparemodellist.h
+++ b/kompare/libdiff2/komparemodellist.h
@@ -20,7 +20,7 @@
#ifndef KOMPAREMODELLIST_H
#define KOMPAREMODELLIST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "diffmodel.h"
#include "diffmodellist.h"
@@ -42,7 +42,7 @@ class KompareModelList : public QObject
{
Q_OBJECT
public:
- KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent = 0, const char* name = 0 );
+ KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent = 0, const char* name = 0 );
~KompareModelList();
public:
@@ -50,34 +50,34 @@ public:
void swap();
/* Comparing methods */
- bool compare( const QString& source, const QString& destination );
+ bool compare( const TQString& source, const TQString& destination );
- bool compareFiles( const QString& source, const QString& destination );
- bool compareDirs( const QString& source, const QString& destination );
+ bool compareFiles( const TQString& source, const TQString& destination );
+ bool compareDirs( const TQString& source, const TQString& destination );
- bool openDiff( const QString& diff );
+ bool openDiff( const TQString& diff );
- bool openFileAndDiff( const QString& file, const QString& diff );
- bool openDirAndDiff( const QString& dir, const QString& diff );
+ bool openFileAndDiff( const TQString& file, const TQString& diff );
+ bool openDirAndDiff( const TQString& dir, const TQString& diff );
- bool saveDiff( const QString& url, QString directory, DiffSettings* diffSettings );
+ bool saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings );
bool saveAll();
bool saveDestination( DiffModel* model );
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
// This parses the difflines and creates new models
- int parseDiffOutput( const QString& diff );
+ int parseDiffOutput( const TQString& diff );
// Call this to emit the signals to the rest of the "world" to show the diff
void show();
// This will blend the original URL (dir or file) into the diffmodel,
// this is like patching but with a twist
- bool blendOriginalIntoModelList( const QString& localURL );
+ bool blendOriginalIntoModelList( const TQString& localURL );
enum Kompare::Mode mode() const { return m_info.mode; };
const DiffModelList* models() const { return m_models; };
@@ -110,12 +110,12 @@ private:
void updateModelListActions();
protected:
- bool blendFile( DiffModel* model, const QString& lines );
+ bool blendFile( DiffModel* model, const TQString& lines );
signals:
void status( Kompare::Status status );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
- void error( QString error );
+ void error( TQString error );
void modelsChanged( const Diff2::DiffModelList* models );
void setSelection( const Diff2::DiffModel* model, const Diff2::Difference* diff );
void setSelection( const Diff2::Difference* diff );
@@ -154,24 +154,24 @@ protected slots:
void slotSaveDestination();
private slots:
- void slotDirectoryChanged( const QString& );
- void slotFileChanged( const QString& );
+ void slotDirectoryChanged( const TQString& );
+ void slotFileChanged( const TQString& );
private: // Helper methods
- bool isDirectory( const QString& url ) const;
- bool isDiff( const QString& mimetype ) const;
- QString readFile( const QString& fileName );
+ bool isDirectory( const TQString& url ) const;
+ bool isDiff( const TQString& mimetype ) const;
+ TQString readFile( const TQString& fileName );
bool hasPrevModel() const;
bool hasNextModel() const;
bool hasPrevDiff() const;
bool hasNextDiff() const;
- QStringList split( const QString& diff );
+ TQStringList split( const TQString& diff );
private:
KTempFile* m_diffTemp;
- QString m_diffURL;
+ TQString m_diffURL;
KompareProcess* m_diffProcess;
@@ -179,8 +179,8 @@ private:
DiffModelList* m_models;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
DiffModel* m_selectedModel;
Difference* m_selectedDifference;
@@ -204,8 +204,8 @@ private:
KAction* m_save;
- QString m_encoding;
- QTextCodec* m_textCodec;
+ TQString m_encoding;
+ TQTextCodec* m_textCodec;
};
} // End of namespace Diff2
diff --git a/kompare/libdiff2/kompareprocess.cpp b/kompare/libdiff2/kompareprocess.cpp
index 2d5eac00..db165ae5 100644
--- a/kompare/libdiff2/kompareprocess.cpp
+++ b/kompare/libdiff2/kompareprocess.cpp
@@ -19,9 +19,9 @@
**
***************************************************************************/
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kdebug.h>
@@ -30,7 +30,7 @@
#include "diffsettings.h"
#include "kompareprocess.h"
-KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString dir )
+KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString dir )
: KProcess(),
m_diffSettings( diffSettings ),
m_mode( mode ),
@@ -39,14 +39,14 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
setUseShell( true );
// connect the stdout and stderr signals
- connect( this, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
- connect( this, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
// connect the signal that indicates that the proces has exited
- connect( this, SIGNAL( processExited( KProcess* ) ),
- SLOT ( slotProcessExited( KProcess* ) ) );
+ connect( this, TQT_SIGNAL( processExited( KProcess* ) ),
+ TQT_SLOT ( slotProcessExited( KProcess* ) ) );
*this << "LANG=C";
@@ -61,7 +61,7 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
}
if( !dir.isEmpty() ) {
- QDir::setCurrent( dir );
+ TQDir::setCurrent( dir );
}
// Write file names
@@ -81,7 +81,7 @@ void KompareProcess::writeDefaultCommandLine()
*this << m_diffSettings->m_diffProgram << "-dr";
}
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
}
void KompareProcess::writeCommandLine()
@@ -100,10 +100,10 @@ void KompareProcess::writeCommandLine()
switch( m_diffSettings->m_format ) {
case Kompare::Unified :
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::Context :
- *this << "-C" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-C" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::RCS :
*this << "-n";
@@ -188,8 +188,8 @@ void KompareProcess::writeCommandLine()
if ( m_diffSettings->m_excludeFilePattern )
{
- QStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
- QStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
+ TQStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
+ TQStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
for ( ; it != end; ++it )
{
*this << "-x" << KProcess::quote( *it );
@@ -206,21 +206,21 @@ KompareProcess::~KompareProcess()
{
}
-void KompareProcess::setEncoding( const QString& encoding )
+void KompareProcess::setEncoding( const TQString& encoding )
{
if ( encoding.lower() == "default" )
{
- m_textDecoder = QTextCodec::codecForLocale()->makeDecoder();
+ m_textDecoder = TQTextCodec::codecForLocale()->makeDecoder();
}
else
{
- QTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
+ TQTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
if ( textCodec )
m_textDecoder = textCodec->makeDecoder();
else
{
kdDebug(8101) << "Using locale codec as backup..." << endl;
- textCodec = QTextCodec::codecForLocale();
+ textCodec = TQTextCodec::codecForLocale();
m_textDecoder = textCodec->makeDecoder();
}
}
@@ -247,8 +247,8 @@ void KompareProcess::slotReceivedStderr( KProcess* /* process */, char* buffer,
bool KompareProcess::start()
{
#ifndef NDEBUG
- QString cmdLine;
- QValueList<QCString>::ConstIterator it = arguments.begin();
+ TQString cmdLine;
+ TQValueList<TQCString>::ConstIterator it = arguments.begin();
for (; it != arguments.end(); ++it )
cmdLine += "\"" + (*it) + "\" ";
kdDebug(8101) << cmdLine << endl;
diff --git a/kompare/libdiff2/kompareprocess.h b/kompare/libdiff2/kompareprocess.h
index 06a4a5ce..a2d2e92b 100644
--- a/kompare/libdiff2/kompareprocess.h
+++ b/kompare/libdiff2/kompareprocess.h
@@ -33,16 +33,16 @@ class KompareProcess : public KProcess, public KompareFunctions
Q_OBJECT
public:
- KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString directory = QString::null );
+ KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString::null );
~KompareProcess();
bool start();
- QString diffOutput() { return m_stdout; }
- QString stdOut() { return m_stdout; }
- QString stdErr() { return m_stderr; }
+ TQString diffOutput() { return m_stdout; }
+ TQString stdOut() { return m_stdout; }
+ TQString stdErr() { return m_stderr; }
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
signals:
void diffHasFinished( bool finishedNormally );
@@ -59,9 +59,9 @@ protected slots:
private:
DiffSettings* m_diffSettings;
enum Kompare::DiffMode m_mode;
- QString m_stdout;
- QString m_stderr;
- QTextDecoder* m_textDecoder;
+ TQString m_stdout;
+ TQString m_stderr;
+ TQTextDecoder* m_textDecoder;
};
#endif
diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp
index 54525aef..7e4ddbbe 100644
--- a/kompare/libdiff2/levenshteintable.cpp
+++ b/kompare/libdiff2/levenshteintable.cpp
@@ -18,7 +18,7 @@
#include <iostream>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -107,14 +107,14 @@ unsigned int LevenshteinTable::createTable( DifferenceString* source, Difference
m_source = source;
m_destination = destination;
- QString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
- QString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
+ TQString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
+ TQString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
unsigned int m = s.length();
unsigned int n = d.length();
- const QChar* sq = s.unicode();
- const QChar* dq = d.unicode();
+ const TQChar* sq = s.unicode();
+ const TQChar* dq = d.unicode();
if ( m == 1 )
return --n;
@@ -201,7 +201,7 @@ void LevenshteinTable::createListsOfMarkers()
{
case 0: // north
// kdDebug(8101) << "Picking north" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -226,7 +226,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 1: // northwest
// kdDebug(8101) << "Picking northwest" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -271,7 +271,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 2: // west
// kdDebug(8101) << "Picking west" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_source->markerList().isEmpty() )
c = m_source->markerList().first();
@@ -299,7 +299,7 @@ void LevenshteinTable::createListsOfMarkers()
// kdDebug(8101) << "Source string: " << m_source->string() << endl;
// c = m_source->markerList()->first();
-// QStringList list;
+// TQStringList list;
// unsigned int prevValue = 0;
// for ( ; c; c = m_source->markerList()->next() )
// {
diff --git a/kompare/libdiff2/parser.cpp b/kompare/libdiff2/parser.cpp
index 04ff7a4a..1e3efc8a 100644
--- a/kompare/libdiff2/parser.cpp
+++ b/kompare/libdiff2/parser.cpp
@@ -34,13 +34,13 @@ Parser::~Parser()
{
}
-int Parser::cleanUpCrap( QStringList& diffLines )
+int Parser::cleanUpCrap( TQStringList& diffLines )
{
- QStringList::Iterator it = diffLines.begin();
+ TQStringList::Iterator it = diffLines.begin();
int nol = 0;
- QString noNewLine( "\\ No newline" );
+ TQString noNewLine( "\\ No newline" );
for ( ; it != diffLines.end(); ++it )
{
@@ -49,7 +49,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
it = diffLines.remove( it );
// correcting the advance of the iterator because of the remove
--it;
- QString temp( *it );
+ TQString temp( *it );
temp.truncate( temp.find( '\n' ) );
*it = temp;
++nol;
@@ -59,7 +59,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
return nol;
}
-DiffModelList* Parser::parse( QStringList& diffLines )
+DiffModelList* Parser::parse( TQStringList& diffLines )
{
/* Basically determine the generator then call the parse method */
ParserBase* parser;
@@ -107,14 +107,14 @@ DiffModelList* Parser::parse( QStringList& diffLines )
return modelList;
}
-enum Kompare::Generator Parser::determineGenerator( const QStringList& diffLines )
+enum Kompare::Generator Parser::determineGenerator( const TQStringList& diffLines )
{
// Shit have to duplicate some code with this method and the ParserBase derived classes
- QString cvsDiff ( "Index: " );
- QString perforceDiff( "==== " );
+ TQString cvsDiff ( "Index: " );
+ TQString perforceDiff( "==== " );
- QStringList::ConstIterator it = diffLines.begin();
- QStringList::ConstIterator linesEnd = diffLines.end();
+ TQStringList::ConstIterator it = diffLines.begin();
+ TQStringList::ConstIterator linesEnd = diffLines.end();
while ( it != linesEnd )
{
diff --git a/kompare/libdiff2/parser.h b/kompare/libdiff2/parser.h
index 0ffae23a..b3dd16ee 100644
--- a/kompare/libdiff2/parser.h
+++ b/kompare/libdiff2/parser.h
@@ -34,16 +34,16 @@ public:
~Parser();
public:
- DiffModelList* parse( QStringList& diffLines );
+ DiffModelList* parse( TQStringList& diffLines );
enum Kompare::Generator generator() const { return m_generator; };
enum Kompare::Format format() const { return m_format; };
private:
/** Which program was used to generate the output */
- enum Kompare::Generator determineGenerator( const QStringList& diffLines );
+ enum Kompare::Generator determineGenerator( const TQStringList& diffLines );
- int cleanUpCrap( QStringList& diffLines );
+ int cleanUpCrap( TQStringList& diffLines );
private:
enum Kompare::Generator m_generator;
diff --git a/kompare/libdiff2/parserbase.cpp b/kompare/libdiff2/parserbase.cpp
index 303f7b22..ca19d232 100644
--- a/kompare/libdiff2/parserbase.cpp
+++ b/kompare/libdiff2/parserbase.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
@@ -28,7 +28,7 @@
using namespace Diff2;
-ParserBase::ParserBase( const KompareModelList* list, const QStringList& diff ) :
+ParserBase::ParserBase( const KompareModelList* list, const TQStringList& diff ) :
m_diffLines( diff ),
m_currentModel( 0 ),
m_models( 0 ),
@@ -122,7 +122,7 @@ bool ParserBase::parseContextDiffHeader()
// kdDebug(8101) << "Matched string Header2 = " << m_contextDiffHeader2.cap( 0 ) << endl;
m_currentModel = new DiffModel( m_contextDiffHeader1.cap( 1 ), m_contextDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp ( m_contextDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision ( m_contextDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_contextDiffHeader2.cap( 2 ) );
@@ -164,7 +164,7 @@ bool ParserBase::parseNormalDiffHeader()
// kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 2 ) );
@@ -185,7 +185,7 @@ bool ParserBase::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
@@ -215,7 +215,7 @@ bool ParserBase::parseUnifiedDiffHeader()
if ( m_diffIterator != m_diffLines.end() && m_unifiedDiffHeader2.exactMatch( *m_diffIterator ) )
{
m_currentModel = new DiffModel( m_unifiedDiffHeader1.cap( 1 ), m_unifiedDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp( m_unifiedDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision( m_unifiedDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_unifiedDiffHeader2.cap( 2 ) );
@@ -319,7 +319,7 @@ bool ParserBase::parseContextHunkBody()
// kdDebug(8101) << "ParserBase::parseContextHunkBody()" << endl;
// Storing the src part of the hunk for later use
- QStringList oldLines;
+ TQStringList oldLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added old line: " << *m_diffIterator << endl;
oldLines.append( *m_diffIterator );
@@ -331,13 +331,13 @@ bool ParserBase::parseContextHunkBody()
++m_diffIterator;
// Storing the dest part of the hunk for later use
- QStringList newLines;
+ TQStringList newLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added new line: " << *m_diffIterator << endl;
newLines.append( *m_diffIterator );
}
- QString function = m_contextHunkHeader1.cap( 1 );
+ TQString function = m_contextHunkHeader1.cap( 1 );
// kdDebug(8101) << "Captured function: " << function << endl;
int linenoA = m_contextHunkHeader2.cap( 1 ).toInt();
// kdDebug(8101) << "Source line number: " << linenoA << endl;
@@ -348,8 +348,8 @@ bool ParserBase::parseContextHunkBody()
m_currentModel->addHunk( hunk );
- QStringList::Iterator oldIt = oldLines.begin();
- QStringList::Iterator newIt = newLines.begin();
+ TQStringList::Iterator oldIt = oldLines.begin();
+ TQStringList::Iterator newIt = newLines.begin();
Difference* diff;
while( oldIt != oldLines.end() || newIt != newLines.end() )
@@ -396,7 +396,7 @@ bool ParserBase::parseContextHunkBody()
( newIt == newLines.end() || m_contextHunkBodyContext.exactMatch( *newIt ) ) &&
( oldIt != oldLines.end() || newIt != newLines.end() ) )
{
- QString l;
+ TQString l;
if( oldIt != oldLines.end() )
{
l = m_contextHunkBodyContext.cap( 1 );
@@ -456,7 +456,7 @@ bool ParserBase::parseNormalHunkBody()
{
// kdDebug(8101) << "ParserBase::parseNormalHunkBody" << endl;
- QString type = QString::null;
+ TQString type = TQString::null;
int linenoA = 0, linenoB = 0;
@@ -513,13 +513,13 @@ bool ParserBase::parseRCSHunkBody()
return false;
}
-bool ParserBase::matchesUnifiedHunkLine( QString line ) const
+bool ParserBase::matchesUnifiedHunkLine( TQString line ) const
{
- static const QChar context( ' ' );
- static const QChar added ( '+' );
- static const QChar removed( '-' );
+ static const TQChar context( ' ' );
+ static const TQChar added ( '+' );
+ static const TQChar removed( '-' );
- QChar first = line[0];
+ TQChar first = line[0];
return ( first == context || first == added || first == removed );
}
@@ -547,7 +547,7 @@ bool ParserBase::parseUnifiedHunkBody()
return false;
linenoB++;
}
- QString function = m_unifiedHunkHeader.cap( 7 );
+ TQString function = m_unifiedHunkHeader.cap( 7 );
for ( int i = 0; i < 9; i++ )
{
// kdDebug(8101) << "Capture " << i << ": " << m_unifiedHunkHeader.cap( i ) << endl;
@@ -556,11 +556,11 @@ bool ParserBase::parseUnifiedHunkBody()
DiffHunk* hunk = new DiffHunk( linenoA, linenoB, function );
m_currentModel->addHunk( hunk );
- const QStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
+ const TQStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
- const QString context = QString( " " );
- const QString added = QString( "+" );
- const QString removed = QString( "-" );
+ const TQString context = TQString( " " );
+ const TQString added = TQString( "+" );
+ const TQString removed = TQString( "-" );
while( m_diffIterator != m_diffLinesEnd && matchesUnifiedHunkLine( *m_diffIterator ) )
{
@@ -571,8 +571,8 @@ bool ParserBase::parseUnifiedHunkBody()
{ // context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( context ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
linenoB++;
}
@@ -581,12 +581,12 @@ bool ParserBase::parseUnifiedHunkBody()
{ // This is a real difference, not context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( removed ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
}
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( added ); ++m_diffIterator )
{
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoB++;
}
if ( diff->sourceLineCount() == 0 )
diff --git a/kompare/libdiff2/parserbase.h b/kompare/libdiff2/parserbase.h
index 5e08803e..e8d5eec4 100644
--- a/kompare/libdiff2/parserbase.h
+++ b/kompare/libdiff2/parserbase.h
@@ -18,7 +18,7 @@
#ifndef _DIFF2_PARSERBASE_H
#define _DIFF2_PARSERBASE_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kompare.h"
#include "difference.h"
@@ -35,7 +35,7 @@ class KompareModelList;
class ParserBase
{
public:
- ParserBase( const KompareModelList* list, const QStringList& diff );
+ ParserBase( const KompareModelList* list, const TQStringList& diff );
virtual ~ParserBase();
public:
@@ -68,7 +68,7 @@ protected:
virtual DiffModelList* parseUnified();
protected: // Helper methods to speed things up
- bool matchesUnifiedHunkLine( QString line ) const;
+ bool matchesUnifiedHunkLine( TQString line ) const;
protected:
/** What is format of the diff */
@@ -76,51 +76,51 @@ protected:
protected:
// Regexps for context parsing
- QRegExp m_contextDiffHeader1;
- QRegExp m_contextDiffHeader2;
+ TQRegExp m_contextDiffHeader1;
+ TQRegExp m_contextDiffHeader2;
- QRegExp m_contextHunkHeader1;
- QRegExp m_contextHunkHeader2;
- QRegExp m_contextHunkHeader3;
+ TQRegExp m_contextHunkHeader1;
+ TQRegExp m_contextHunkHeader2;
+ TQRegExp m_contextHunkHeader3;
- QRegExp m_contextHunkBodyRemoved;
- QRegExp m_contextHunkBodyAdded;
- QRegExp m_contextHunkBodyChanged;
- QRegExp m_contextHunkBodyContext;
- QRegExp m_contextHunkBodyLine; // Added for convenience
+ TQRegExp m_contextHunkBodyRemoved;
+ TQRegExp m_contextHunkBodyAdded;
+ TQRegExp m_contextHunkBodyChanged;
+ TQRegExp m_contextHunkBodyContext;
+ TQRegExp m_contextHunkBodyLine; // Added for convenience
// Regexps for normal parsing
- QRegExp m_normalDiffHeader;
+ TQRegExp m_normalDiffHeader;
- QRegExp m_normalHunkHeaderAdded;
- QRegExp m_normalHunkHeaderRemoved;
- QRegExp m_normalHunkHeaderChanged;
+ TQRegExp m_normalHunkHeaderAdded;
+ TQRegExp m_normalHunkHeaderRemoved;
+ TQRegExp m_normalHunkHeaderChanged;
- QRegExp m_normalHunkBodyRemoved;
- QRegExp m_normalHunkBodyAdded;
- QRegExp m_normalHunkBodyDivider;
+ TQRegExp m_normalHunkBodyRemoved;
+ TQRegExp m_normalHunkBodyAdded;
+ TQRegExp m_normalHunkBodyDivider;
enum Difference::Type m_normalDiffType;
// RegExps for rcs parsing
- QRegExp m_rcsDiffHeader;
+ TQRegExp m_rcsDiffHeader;
// Regexps for unified parsing
- QRegExp m_unifiedDiffHeader1;
- QRegExp m_unifiedDiffHeader2;
+ TQRegExp m_unifiedDiffHeader1;
+ TQRegExp m_unifiedDiffHeader2;
- QRegExp m_unifiedHunkHeader;
+ TQRegExp m_unifiedHunkHeader;
- QRegExp m_unifiedHunkBodyAdded;
- QRegExp m_unifiedHunkBodyRemoved;
- QRegExp m_unifiedHunkBodyContext;
- QRegExp m_unifiedHunkBodyLine; // Added for convenience
+ TQRegExp m_unifiedHunkBodyAdded;
+ TQRegExp m_unifiedHunkBodyRemoved;
+ TQRegExp m_unifiedHunkBodyContext;
+ TQRegExp m_unifiedHunkBodyLine; // Added for convenience
protected:
- const QStringList& m_diffLines;
+ const TQStringList& m_diffLines;
DiffModel* m_currentModel;
DiffModelList* m_models;
- QStringList::ConstIterator m_diffIterator;
+ TQStringList::ConstIterator m_diffIterator;
bool m_singleFileDiff;
diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp
index 907d88ff..0e0a2aef 100644
--- a/kompare/libdiff2/perforceparser.cpp
+++ b/kompare/libdiff2/perforceparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-PerforceParser::PerforceParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+PerforceParser::PerforceParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
m_contextDiffHeader1.setPattern( "==== (.*) - (.*) ====\\n" );
m_contextDiffHeader1.setMinimal( true );
@@ -43,13 +43,13 @@ enum Kompare::Format PerforceParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the Perforce Diff" << endl;
- QRegExp unifiedRE( "^@@" );
- QRegExp contextRE( "^\\*{15}" );
- QRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
- QRegExp rcsRE ( "^[acd]\\d+ \\d+" );
+ TQRegExp unifiedRE( "^@@" );
+ TQRegExp contextRE( "^\\*{15}" );
+ TQRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
+ TQRegExp rcsRE ( "^[acd]\\d+ \\d+" );
// Summary is not supported since it gives no useful parsable info
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -84,10 +84,10 @@ bool PerforceParser::parseContextDiffHeader()
// kdDebug(8101) << "ParserBase::parseContextDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -128,10 +128,10 @@ bool PerforceParser::parseNormalDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -179,10 +179,10 @@ bool PerforceParser::parseUnifiedDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
diff --git a/kompare/libdiff2/perforceparser.h b/kompare/libdiff2/perforceparser.h
index 99973167..9db8d5e1 100644
--- a/kompare/libdiff2/perforceparser.h
+++ b/kompare/libdiff2/perforceparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class PerforceParser : public ParserBase
{
public:
- PerforceParser( const KompareModelList* list, const QStringList& diff );
+ PerforceParser( const KompareModelList* list, const TQStringList& diff );
virtual ~PerforceParser();
protected:
diff --git a/kompare/main.cpp b/kompare/main.cpp
index 00827c4d..4e776e9d 100644
--- a/kompare/main.cpp
+++ b/kompare/main.cpp
@@ -186,7 +186,7 @@ int main(int argc, char *argv[])
dialog->setFirstGroupBoxTitle( i18n( "Source" ) );
dialog->setSecondGroupBoxTitle( i18n( "Destination" ) );
- KGuiItem compareGuiItem( i18n( "Compare" ), QString::null, i18n( "Compare these files or folder" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
+ KGuiItem compareGuiItem( i18n( "Compare" ), TQString::null, i18n( "Compare these files or folder" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog->setButtonOK( compareGuiItem );
dialog->setGroup( "Recent Compare Files" );
@@ -194,7 +194,7 @@ int main(int argc, char *argv[])
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
dialog->setSecondURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
ks = new KompareShell();
ks->show();