diff options
Diffstat (limited to 'kompare')
64 files changed, 647 insertions, 623 deletions
diff --git a/kompare/DESIGN b/kompare/DESIGN index fde8a5c9..9f1ddafd 100644 --- a/kompare/DESIGN +++ b/kompare/DESIGN @@ -10,7 +10,7 @@ The diffmodel is comparable to a document and the view part is comparable to the view and the komparemodellist is comparable to a documentmanager. The navtree can be viewed as a document view manager. The model is fully separated from the view and all communication goes -through signals and slots. The view gets a model that contains all differences +through Q_SIGNALS and Q_SLOTS. The view gets a model that contains all differences for the compared files A and B. The view gets this model from the modellist, the central entity in the part. diff --git a/kompare/kompare_shell.cpp b/kompare/kompare_shell.cpp index 66bf89d2..3af1af3b 100644 --- a/kompare/kompare_shell.cpp +++ b/kompare/kompare_shell.cpp @@ -61,7 +61,7 @@ KompareShell::KompareShell() setupStatusBar(); KTrader::OfferList offers = KTrader::self()->query( "text/x-diff", - "Kompare/ViewPart", TQString::null, TQString::null ); + "Kompare/ViewPart", TQString(), TQString() ); #ifdef NDEBUG for( int i = 0; i < offers.count(); i++ ) { @@ -86,7 +86,7 @@ KompareShell::KompareShell() m_mainViewDock = createDockWidget( "View", kapp->icon() ); // now that the Part is loaded, we cast it to a KomparePart to get // our hands on it - m_viewPart = static_cast<KomparePart*>(mainViewFactory->create(m_mainViewDock, + m_viewPart = static_cast<KomparePart*>(mainViewFactory->create(TQT_TQOBJECT(m_mainViewDock), "kompare_part", "KParts::ReadWritePart" )); if ( m_viewPart ) @@ -108,7 +108,7 @@ KompareShell::KompareShell() } offers.clear(); - offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString::null ); + offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString() ); if ( offers.count() == 0 ) { KMessageBox::error(this, i18n( "Could not find our KompareNavigationPart." ) ); @@ -122,7 +122,7 @@ KompareShell::KompareShell() { m_navTreeDock = createDockWidget( "Navigation", kapp->icon() ); - m_navTreePart = static_cast<KompareNavTreePart*>(navTreeFactory->create(m_navTreeDock, + m_navTreePart = static_cast<KompareNavTreePart*>(navTreeFactory->create(TQT_TQOBJECT(m_navTreeDock), "komparenavtreepart", "KParts::ReadOnlyPart" )); if ( m_navTreePart ) @@ -171,9 +171,9 @@ KompareShell::KompareShell() // Hook up the KomparePart -> KompareShell communication connect( m_viewPart, TQT_SIGNAL( setStatusBarModelInfo( int, int, int, int, int ) ), - this, TQT_SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) ); connect( m_viewPart, TQT_SIGNAL( setStatusBarText(const TQString&) ), - this, TQT_SLOT( slotSetStatusBarText(const TQString&) ) ); + TQT_TQOBJECT(this), TQT_SLOT( slotSetStatusBarText(const TQString&) ) ); // Read basic main-view settings, and set to autosave setAutoSaveSettings( "General Options" ); @@ -228,26 +228,26 @@ void KompareShell::blend( const KURL& url1, const KURL& diff ) void KompareShell::setupActions() { - KAction* open = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection()); + KAction* open = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); open->setText( i18n( "&Open Diff..." ) ); - new KAction( i18n("&Compare Files..."), "fileopen", Qt::CTRL + Qt::Key_C, - this, TQT_SLOT(slotFileCompareFiles()), + new KAction( i18n("&Compare Files..."), "fileopen", TQt::CTRL + TQt::Key_C, + TQT_TQOBJECT(this), TQT_SLOT(slotFileCompareFiles()), actionCollection(), "file_compare_files" ); - new KAction( i18n("&Blend URL with Diff..."), "fileblend", Qt::CTRL + Qt::Key_B, - this, TQT_SLOT(slotFileBlendURLAndDiff()), + new KAction( i18n("&Blend URL with Diff..."), "fileblend", TQt::CTRL + TQt::Key_B, + TQT_TQOBJECT(this), TQT_SLOT(slotFileBlendURLAndDiff()), actionCollection(), "file_blend_url" ); - KStdAction::quit( this, TQT_SLOT( slotFileClose() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(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, TQT_SLOT(slotShowTextView()), + m_showTextView = new KToggleAction( i18n("Show T&ext View"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowTextView()), actionCollection(), "options_show_text_view" ); m_showTextView->setCheckedState(i18n("Hide T&ext View")); - KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void KompareShell::setupStatusBar() @@ -258,7 +258,7 @@ void KompareShell::setupStatusBar() m_generalLabel = new KSqueezedTextLabel( "", 0, "general_statusbar_label" ); statusBar()->addWidget( m_generalLabel, 1, false ); - m_generalLabel->setAlignment( Qt::AlignLeft ); + m_generalLabel->tqsetAlignment( TQt::AlignLeft ); } void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount ) @@ -269,13 +269,13 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int TQString diffStr; if ( modelIndex >= 0 ) - fileStr = i18n( " %1 of %n file ", " %1 of %n files ", modelCount ).arg( modelIndex + 1 ); + fileStr = i18n( " %1 of %n file ", " %1 of %n files ", modelCount ).tqarg( modelIndex + 1 ); else fileStr = i18n( " %n file ", " %n files ", modelCount ); if ( differenceIndex >= 0 ) diffStr = i18n( " %1 of %n difference, %2 applied ", " %1 of %n differences, %2 applied ", differenceCount ) - .arg( differenceIndex + 1 ).arg( appliedCount ); + .tqarg( differenceIndex + 1 ).tqarg( appliedCount ); else diffStr = i18n( " %n difference ", " %n differences ", differenceCount ); @@ -352,7 +352,7 @@ void KompareShell::readProperties(KConfig* config) void KompareShell::slotFileOpen() { // FIXME: use different filedialog which gets encoding - KURL url = KFileDialog::getOpenURL( TQString::null, "text/x-diff", this ); + KURL url = KFileDialog::getOpenURL( TQString(), "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" ), 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. " ) ); + KGuiItem blendGuiItem( i18n( "Blend" ), TQString(), 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" ); @@ -398,7 +398,7 @@ void KompareShell::slotFileCompareFiles() dialog->setFirstGroupBoxTitle( i18n( "Source" ) ); dialog->setSecondGroupBoxTitle( i18n( "Destination" ) ); - 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. " ) ); + KGuiItem compareGuiItem( i18n( "Compare" ), TQString(), 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" ); @@ -438,15 +438,15 @@ void KompareShell::slotShowTextView() // FIXME: proper error checking m_textViewWidget = createDockWidget( i18n("Text View"), SmallIcon( "text") ); m_textViewPart = KParts::ComponentFactory::createPartInstanceFromQuery<KTextEditor::Document>( - TQString::fromLatin1("KTextEditor/Document"), - TQString::null, (TQWidget*)this, 0, (TQWidget*)this, 0, TQStringList(), &errCode ); + TQString::tqfromLatin1("KTextEditor/Document"), + TQString(), TQT_TQWIDGET(this), 0, TQT_TQOBJECT(this), 0, TQStringList(), &errCode ); if ( m_textViewPart ) { m_textView = m_textViewPart->createView( this, 0 ); m_textViewWidget->setWidget( static_cast<TQWidget*>(m_textView) ); m_textEditIface = editInterface( m_textViewPart ); connect( m_viewPart, TQT_SIGNAL(diffString(const TQString&)), - this, TQT_SLOT(slotSetDiffString(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotSetDiffString(const TQString&)) ); } } diff --git a/kompare/kompare_shell.h b/kompare/kompare_shell.h index f1fd87d2..4855c148 100644 --- a/kompare/kompare_shell.h +++ b/kompare/kompare_shell.h @@ -51,6 +51,7 @@ namespace KTextEditor { class KompareShell : public KParts::DockMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor diff --git a/kompare/komparenavtreepart/komparenavtreepart.cpp b/kompare/komparenavtreepart/komparenavtreepart.cpp index 31b0388f..1fe65b4f 100644 --- a/kompare/komparenavtreepart/komparenavtreepart.cpp +++ b/kompare/komparenavtreepart/komparenavtreepart.cpp @@ -37,8 +37,8 @@ using namespace Diff2; -KompareNavTreePart::KompareNavTreePart( TQWidget* parent, const char* name ) - : KParts::ReadOnlyPart( parent, name ), +KompareNavTreePart::KompareNavTreePart( TQWidget* tqparent, const char* name ) + : KParts::ReadOnlyPart( TQT_TQOBJECT(tqparent), name ), m_splitter( 0 ), m_modelList( 0 ), m_srcDirTree( 0 ), @@ -453,7 +453,7 @@ void KChangeLVI::setDifferenceText() setText( 2, text ); } -KChangeLVI::KChangeLVI( KListView* parent, Difference* diff ) : KListViewItem( parent ) +KChangeLVI::KChangeLVI( KListView* tqparent, Difference* diff ) : KListViewItem( tqparent ) { m_difference = diff; @@ -487,7 +487,7 @@ KChangeLVI::~KChangeLVI() { } -KFileLVI::KFileLVI( KListView* parent, DiffModel* model ) : KListViewItem( parent ) +KFileLVI::KFileLVI( KListView* tqparent, DiffModel* model ) : KListViewItem( tqparent ) { m_model = model; @@ -519,7 +519,7 @@ KFileLVI::~KFileLVI() { } -KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent ) +KDirLVI::KDirLVI( KListView* tqparent, TQString& dir ) : KListViewItem( tqparent ) { // kdDebug(8105) << "KDirLVI (KListView) constructor called with dir = " << dir << endl; m_rootItem = true; @@ -533,7 +533,7 @@ KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent ) setText( 0, m_dirName ); } -KDirLVI::KDirLVI( KDirLVI* parent, TQString& dir ) : KListViewItem( parent ) +KDirLVI::KDirLVI( KDirLVI* tqparent, TQString& dir ) : KListViewItem( tqparent ) { // kdDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl; m_rootItem = false; @@ -551,8 +551,8 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo if ( !m_dirName.isEmpty() ) { - if ( path.find( m_dirName ) > -1 ) - path = path.replace( path.find( m_dirName ), m_dirName.length(), "" ); + if ( path.tqfind( m_dirName ) > -1 ) + path = path.tqreplace( path.tqfind( m_dirName ), m_dirName.length(), "" ); } // kdDebug(8105) << "Path after removal of own dir (\"" << m_dirName << "\") = " << path << endl; @@ -565,7 +565,7 @@ void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* mo KDirLVI* child; - TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 ); + TQString dir = path.mid( 0, path.tqfind( "/", 0 ) + 1 ); child = findChild( dir ); if ( !child ) { @@ -582,7 +582,7 @@ KDirLVI* KDirLVI::findChild( TQString dir ) // kdDebug(8105) << "KDirLVI::findChild called with dir = " << dir << endl; KDirLVI* child; if ( ( child = static_cast<KDirLVI*>(this->firstChild()) ) != 0L ) - { // has children, check if dir already exists, if so addModel + { // has tqchildren, check if dir already exists, if so addModel do { if ( dir == child->dirName() ) return child; @@ -619,7 +619,7 @@ TQString KDirLVI::fullPath( TQString& path ) path = path.prepend( m_dirName ); - KDirLVI* lviParent = dynamic_cast<KDirLVI*>( parent() ); + KDirLVI* lviParent = dynamic_cast<KDirLVI*>( tqparent() ); if ( lviParent ) { path = lviParent->fullPath( path ); @@ -675,12 +675,12 @@ KompareNavTreePartFactory::~KompareNavTreePartFactory() s_instance = 0L; } -KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* parentWidget, const char* widgetName, - TQObject* /*parent*/, const char* /*name*/, +KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* tqparentWidget, const char* widgetName, + TQObject* /*tqparent*/, const char* /*name*/, const char* /*classname*/, const TQStringList & /*args*/ ) { // Create an instance of our Part - KompareNavTreePart* obj = new KompareNavTreePart( parentWidget, widgetName ); + KompareNavTreePart* obj = new KompareNavTreePart( tqparentWidget, widgetName ); KGlobal::locale()->insertCatalogue("kompare"); diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h index a126cfe5..6fa0667b 100644 --- a/kompare/komparenavtreepart/komparenavtreepart.h +++ b/kompare/komparenavtreepart/komparenavtreepart.h @@ -47,9 +47,10 @@ class KChangeLVI; class KompareNavTreePart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KompareNavTreePart( TQWidget* parent = 0L, const char* name = 0L ); + KompareNavTreePart( TQWidget* tqparent = 0L, const char* name = 0L ); virtual ~KompareNavTreePart(); public: @@ -87,7 +88,7 @@ private: TQString compareFromEndAndReturnSame( const TQString& string1, const TQString& string2 ); void addDirToTreeView( enum Kompare::Target, const TQString& filename ); - KListViewItem* findDirInDirTree( const KListViewItem* parent, const TQString& dir ); + KListViewItem* findDirInDirTree( const KListViewItem* tqparent, const TQString& dir ); // KListViewItem* firstItem(); // KListViewItem* lastItem(); @@ -124,7 +125,7 @@ private: class KChangeLVI : public KListViewItem { public: - KChangeLVI( KListView* parent, Diff2::Difference* diff ); + KChangeLVI( KListView* tqparent, Diff2::Difference* diff ); ~KChangeLVI(); public: Diff2::Difference* difference() { return m_difference; }; @@ -138,7 +139,7 @@ private: class KFileLVI : public KListViewItem { public: - KFileLVI( KListView* parent, Diff2::DiffModel* model ); + KFileLVI( KListView* tqparent, Diff2::DiffModel* model ); ~KFileLVI(); public: Diff2::DiffModel* model() { return m_model; }; @@ -150,8 +151,8 @@ private: class KDirLVI : public KListViewItem { public: - KDirLVI( KDirLVI* parent, TQString& dir ); - KDirLVI( KListView* parent, TQString& dir ); + KDirLVI( KDirLVI* tqparent, TQString& dir ); + KDirLVI( KListView* tqparent, TQString& dir ); ~KDirLVI(); public: void addModel( TQString& dir, Diff2::DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict ); @@ -175,11 +176,12 @@ class KAboutData; class KompareNavTreePartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: KompareNavTreePartFactory(); virtual ~KompareNavTreePartFactory(); - virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ); static KInstance* instance(); diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp index bf15bb4d..24c23ffe 100644 --- a/kompare/komparepart/kompare_part.cpp +++ b/kompare/komparepart/kompare_part.cpp @@ -56,9 +56,9 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory ) ViewSettings* KomparePart::m_viewSettings = 0L; DiffSettings* KomparePart::m_diffSettings = 0L; -KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList & /*args*/ ) : - KParts::ReadWritePart(parent, name), +KomparePart::KomparePart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) : + KParts::ReadWritePart(tqparent, name), m_tempDiff( 0 ), m_info() { @@ -76,8 +76,8 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName, // This creates the "Model creator" and connects the signals and slots m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" ); - connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )), - this, TQT_SLOT(slotSetStatus( Kompare::Status )) ); + connect( m_modelList, TQT_SIGNAL(status( Kompare::tqStatus )), + this, TQT_SLOT(slotSettqStatus( Kompare::tqStatus )) ); connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )), this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) ); connect( m_modelList, TQT_SIGNAL(error( TQString )), @@ -116,7 +116,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName, this, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)) ); // This creates the splitterwidget and connects the signals and slots - m_splitter = new KompareSplitter ( m_viewSettings, parentWidget, widgetName ); + m_splitter = new KompareSplitter ( m_viewSettings, tqparentWidget, widgetName ); connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)), m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) ); @@ -136,7 +136,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName, connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) ); // notify the part that this is our internal widget - setWidget( m_splitter->parentWidget() ); + setWidget( m_splitter->tqparentWidget() ); setupActions(); @@ -208,7 +208,7 @@ bool KomparePart::openDiff( const KURL& url ) result = m_modelList->openDiff( m_info.localSource ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } else { @@ -232,7 +232,7 @@ bool KomparePart::openDiff( const TQString& diffOutput ) m_modelList->show(); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } return value; @@ -266,7 +266,7 @@ const TQString KomparePart::fetchURL( const KURL& url ) { if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) ) { - slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).arg( url.prettyURL() ) ); + slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).tqarg( url.prettyURL() ) ); tempFileName = ""; } return tempFileName; @@ -278,7 +278,7 @@ const TQString KomparePart::fetchURL( const KURL& url ) return url.path(); else { - slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).arg( url.prettyURL() ) ); + slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).tqarg( url.prettyURL() ) ); return tempFileName; } } @@ -308,7 +308,7 @@ void KomparePart::compare( const KURL& source, const KURL& destination ) m_modelList->compare( m_info.localSource, m_info.localDestination ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } } @@ -329,7 +329,7 @@ void KomparePart::compareFiles( const KURL& sourceFile, const KURL& destinationF m_modelList->compareFiles( m_info.localSource, m_info.localDestination ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } } @@ -350,7 +350,7 @@ void KomparePart::compareDirs( const KURL& sourceDirectory, const KURL& destinat m_modelList->compareDirs( m_info.localSource, m_info.localDestination ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } } @@ -359,7 +359,7 @@ void KomparePart::compare3Files( const KURL& /*originalFile*/, const KURL& /*cha // FIXME: actually implement this some day :) updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile ) @@ -378,7 +378,7 @@ void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile ) m_modelList->openFileAndDiff( m_info.localSource, m_info.localDestination ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } } @@ -398,7 +398,7 @@ void KomparePart::openDirAndDiff ( const KURL& dir, const KURL& diffFile ) m_modelList->openDirAndDiff( m_info.localSource, m_info.localDestination ); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); } } @@ -415,7 +415,7 @@ bool KomparePart::saveAll() bool result = m_modelList->saveAll(); updateActions(); updateCaption(); - updateStatus(); + updatetqStatus(); return result; } @@ -484,7 +484,7 @@ KAboutData *KomparePart::createAboutData() return about; } -void KomparePart::slotSetStatus( enum Kompare::Status status ) +void KomparePart::slotSettqStatus( enum Kompare::tqStatus status ) { updateActions(); @@ -496,10 +496,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status ) emit setStatusBarText( i18n( "Parsing diff output..." ) ); break; case Kompare::FinishedParsing: - updateStatus(); + updatetqStatus(); break; case Kompare::FinishedWritingDiff: - updateStatus(); + updatetqStatus(); emit diffURLChanged(); break; default: @@ -532,7 +532,7 @@ void KomparePart::updateCaption() emit setWindowCaption( text ); } -void KomparePart::updateStatus() +void KomparePart::updatetqStatus() { TQString source = m_info.source.prettyURL(); TQString destination = m_info.destination.prettyURL(); @@ -543,26 +543,26 @@ void KomparePart::updateStatus() { case Kompare::ComparingFiles : text = i18n( "Comparing file %1 with file %2" ) - .arg( source ) - .arg( destination ); + .tqarg( source ) + .tqarg( destination ); break; case Kompare::ComparingDirs : text = i18n( "Comparing files in %1 with files in %2" ) - .arg( source ) - .arg( destination ); + .tqarg( source ) + .tqarg( destination ); break; case Kompare::ShowingDiff : - text = i18n( "Viewing diff output from %1" ).arg( source ); + text = i18n( "Viewing diff output from %1" ).tqarg( source ); break; case Kompare::BlendingFile : text = i18n( "Blending diff output from %1 into file %2" ) - .arg( source ) - .arg( destination ); + .tqarg( source ) + .tqarg( destination ); break; case Kompare::BlendingDir : text = i18n( "Blending diff output from %1 into folder %2" ) - .arg( m_info.source.prettyURL() ) - .arg( m_info.destination.prettyURL() ); + .tqarg( m_info.source.prettyURL() ) + .tqarg( m_info.destination.prettyURL() ); break; default: break; @@ -608,7 +608,7 @@ void KomparePart::slotSwap() // Update window caption and statusbar text updateCaption(); - updateStatus(); + updatetqStatus(); m_modelList->swap(); } @@ -666,7 +666,7 @@ void KomparePart::slotShowDiffstats( void ) KMessageBox::information( 0L, i18n( "No diff file, or no 2 files have been diffed. " "Therefore no stats are available."), - i18n("Diff Statistics"), TQString::null, false ); + i18n("Diff Statistics"), TQString(), false ); } else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared KMessageBox::information( 0L, i18n( @@ -678,9 +678,9 @@ void KomparePart::slotShowDiffstats( void ) "Format: %3\n" "Number of hunks: %4\n" "Number of differences: %5") - .arg(oldFile).arg(newFile).arg(diffFormat) - .arg(noOfHunks).arg(noOfDiffs), - i18n("Diff Statistics"), TQString::null, false ); + .tqarg(oldFile).tqarg(newFile).tqarg(diffFormat) + .tqarg(noOfHunks).tqarg(noOfDiffs), + i18n("Diff Statistics"), TQString(), false ); } else { // more than 1 file in diff, or 2 directories compared KMessageBox::information( 0L, i18n( "Statistics:\n" @@ -693,9 +693,9 @@ void KomparePart::slotShowDiffstats( void ) "\n" "Number of hunks: %5\n" "Number of differences: %6") - .arg(filesInDiff).arg(diffFormat).arg(oldFile) - .arg(newFile).arg(noOfHunks).arg(noOfDiffs), - i18n("Diff Statistics"), TQString::null, false ); + .tqarg(filesInDiff).tqarg(diffFormat).tqarg(oldFile) + .tqarg(newFile).tqarg(noOfHunks).tqarg(noOfDiffs), + i18n("Diff Statistics"), TQString(), false ); } } diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h index bd8d5621..33c19a64 100644 --- a/kompare/komparepart/kompare_part.h +++ b/kompare/komparepart/kompare_part.h @@ -60,12 +60,13 @@ class KomparePart : public KParts::ReadWritePart, public KompareInterface { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - KomparePart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList & /*args*/); + KomparePart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/); /** * Destructor @@ -182,7 +183,7 @@ protected: bool patchDir(); protected slots: - void slotSetStatus( Kompare::Status status ); + void slotSettqStatus( Kompare::tqStatus status ); void slotShowError( TQString error ); void slotSwap(); @@ -190,7 +191,7 @@ protected slots: void optionsPreferences(); void updateActions(); void updateCaption(); - void updateStatus(); + void updatetqStatus(); private: void cleanUpTemporaryFiles(); diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h index 84585405..3c9345c7 100644 --- a/kompare/komparepart/kompare_qsplitter.h +++ b/kompare/komparepart/kompare_qsplitter.h @@ -1,13 +1,13 @@ /**************************************************************************** ** ** -** Definition of TQSplitter class +** Definition of QSplitter class ** ** Created : 980105 ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. ** -** This file is part of the widgets module of the Qt GUI Toolkit. +** This file is part of the widgets module of the TQt GUI Toolkit. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -21,16 +21,15 @@ ** **********************************************************************/ -#ifndef QSPLITTER_H -#define QSPLITTER_H +#ifndef KOMPARE_TQSPLITTER_H +#define KOMPARE_TQSPLITTER_H -#ifndef QT_H +#ifndef TQT_H #include "tqframe.h" #include "tqvaluelist.h" -#endif // QT_H - -#ifndef QT_NO_SPLITTER +#endif // TQT_H +#ifndef TQT_NO_SPLITTER //class QSplitterHandle; class QSplitterLayoutStruct; @@ -40,39 +39,40 @@ class QSplitterPrivate { public: QSplitterPrivate() - : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ), + : opaque( FALSE ), firstShow( TRUE ), tqchildrenCollapsible( TRUE ), handleWidth( 0 ) { } TQPtrList<QSplitterLayoutStruct> list; bool opaque : 8; bool firstShow : 8; - bool childrenCollapsible : 8; + bool tqchildrenCollapsible : 8; int handleWidth; }; -class Q_EXPORT TQSplitter : public QFrame +class TQ_EXPORT QSplitter : public TQFrame { Q_OBJECT - Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) - Q_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize ) - Q_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth ) - Q_PROPERTY( bool childrenCollapsible READ childrenCollapsible WRITE setChildrenCollapsible ) + TQ_OBJECT + TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation ) + TQ_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize ) + TQ_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth ) + TQ_PROPERTY( bool tqchildrenCollapsible READ tqchildrenCollapsible WRITE setChildrenCollapsible ) public: - // ### Qt 4.0: remove Auto from public API + // ### TQt 4.0: remove Auto from public API enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto }; - TQSplitter( TQWidget* parent = 0, const char* name = 0 ); - TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 ); - ~TQSplitter(); + QSplitter( TQWidget* tqparent = 0, const char* name = 0 ); + QSplitter( Qt::Orientation, TQWidget* tqparent = 0, const char* name = 0 ); + ~QSplitter(); - virtual void setOrientation( Orientation ); - Orientation orientation() const { return orient; } + virtual void setOrientation( Qt::Orientation ); + Qt::Orientation orientation() const { return orient; } - // ### Qt 4.0: make setChildrenCollapsible() and setCollapsible() virtual + // ### TQt 4.0: make setChildrenCollapsible() and setCollapsible() virtual void setChildrenCollapsible( bool ); - bool childrenCollapsible() const; + bool tqchildrenCollapsible() const; void setCollapsible( TQWidget *w, bool ); virtual void setResizeMode( TQWidget *w, ResizeMode ); @@ -83,8 +83,8 @@ public: void moveToLast( TQWidget * ); void refresh() { recalc( TRUE ); } - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; TQValueList<int> sizes() const; void setSizes( TQValueList<int> ); @@ -100,9 +100,9 @@ protected: int idAfter( TQWidget* ) const; - void moveSplitter( QCOORD pos, int id ); - virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y, - QCOORD w, QCOORD h ); + void moveSplitter( TQCOORD pos, int id ); + virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y, + TQCOORD w, TQCOORD h ); void styleChange( TQStyle& ); int adjustPos( int, int ); virtual void setRubberband( int ); @@ -129,51 +129,52 @@ public: // private (: int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize ); void updateHandles(); - inline QCOORD pick( const TQPoint &p ) const - { return orient == Horizontal ? p.x() : p.y(); } - inline QCOORD pick( const TQSize &s ) const - { return orient == Horizontal ? s.width() : s.height(); } + inline TQCOORD pick( const TQPoint &p ) const + { return orient ==Qt::Horizontal ? p.x() : p.y(); } + inline TQCOORD pick( const TQSize &s ) const + { return orient ==Qt::Horizontal ? s.width() : s.height(); } - inline QCOORD trans( const TQPoint &p ) const - { return orient == Vertical ? p.x() : p.y(); } - inline QCOORD trans( const TQSize &s ) const - { return orient == Vertical ? s.width() : s.height(); } + inline TQCOORD trans( const TQPoint &p ) const + { return orient ==Qt::Vertical ? p.x() : p.y(); } + inline TQCOORD trans( const TQSize &s ) const + { return orient ==Qt::Vertical ? s.width() : s.height(); } QSplitterPrivate *d; - Orientation orient; + Qt::Orientation orient; friend class QSplitterHandle; -#ifndef QT_NO_TEXTSTREAM -// moc doesn't like these. -// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& ); -// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& ); +#ifndef TQT_NO_TEXTSTREAM +// tqmoc doesn't like these. +// friend TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& ); +// friend TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& ); #endif public: -#if defined(Q_DISABLE_COPY) - TQSplitter( const TQSplitter & ); - TQSplitter& operator=( const TQSplitter & ); +#if defined(TQ_DISABLE_COPY) + QSplitter( const QSplitter & ); + QSplitter& operator=( const QSplitter & ); #endif }; -#ifndef QT_NO_TEXTSTREAM -Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& ); -Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& ); +#ifndef TQT_NO_TEXTSTREAM +TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& ); +TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& ); #endif -class QSplitterHandle : public QWidget +class QSplitterHandle : public TQWidget { Q_OBJECT + TQ_OBJECT public: - QSplitterHandle( Orientation o, - TQSplitter *parent, const char* name=0 ); - void setOrientation( Orientation o ); - Orientation orientation() const { return orient; } + QSplitterHandle( Qt::Orientation o, + QSplitter *tqparent, const char* name=0 ); + void setOrientation( Qt::Orientation o ); + Qt::Orientation orientation() const { return orient; } bool opaque() const { return s->opaqueResize(); } - TQSize sizeHint() const; + TQSize tqsizeHint() const; int id() const { return myId; } // d->list.at(id())->wid == this void setId( int i ) { myId = i; } @@ -185,19 +186,19 @@ protected: void mouseReleaseEvent( TQMouseEvent * ); public: // private (: - Orientation orient; + Qt::Orientation orient; bool opaq; int myId; - TQSplitter *s; + QSplitter *s; }; const uint Default = 2; -class QSplitterLayoutStruct : public Qt +class QSplitterLayoutStruct : public TQt { public: - QCOORD sizer; + TQCOORD sizer; uint isHandle : 1; uint collapsible : 2; uint resizeMode : 2; @@ -205,9 +206,9 @@ public: QSplitterLayoutStruct() : sizer( -1 ), collapsible( Default ) { } - QCOORD getSizer( Orientation orient ); + TQCOORD getSizer( Qt::Orientation orient ); }; -#endif // QT_NO_SPLITTER +#endif // TQT_NO_SPLITTER -#endif // QSPLITTER_H +#endif // KOMPARE_TQSPLITTER_H diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp index 57185e5a..b0f4ab78 100644 --- a/kompare/komparepart/kompareconnectwidget.cpp +++ b/kompare/komparepart/kompareconnectwidget.cpp @@ -39,21 +39,21 @@ using namespace Diff2; KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left, KompareListView* right, ViewSettings* settings, - KompareSplitter* parent, + KompareSplitter* tqparent, const char* name ) : - QSplitterHandle(Horizontal, (TQSplitter *)parent, name), + QSplitterHandle(Qt::Horizontal, (QSplitter *)tqparent, name), m_wid ( left, right, settings, this, name ), m_label ( "", this ), m_layout ( this ) { - setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) ); - m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); - m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); + tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) ); + m_wid.tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); + m_label.tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); m_label.setMargin(3); TQFrame* bottomLine = new TQFrame(this); bottomLine->setFrameShape(TQFrame::HLine); bottomLine->setFrameShadow ( TQFrame::Plain ); - bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); + bottomLine->tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); bottomLine->setFixedHeight(1); m_layout.setSpacing(0); m_layout.setMargin(0); @@ -66,19 +66,19 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame() { } -TQSize KompareConnectWidgetFrame::sizeHint() const +TQSize KompareConnectWidgetFrame::tqsizeHint() const { - return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) ); + return TQSize(50, tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent ) ); } static int kMouseOffset; void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e ) { - if ( !(e->state()&LeftButton) ) + if ( !(e->state()&Qt::LeftButton) ) return; - QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) ) + TQCOORD pos = s->pick( tqparentWidget()->mapFromGlobal(e->globalPos()) ) - kMouseOffset; ((KompareSplitter*)s)->moveSplitter( pos, id() ); @@ -86,23 +86,23 @@ void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e ) void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) kMouseOffset = s->pick( e->pos() ); QSplitterHandle::mousePressEvent(e); } void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e ) { - if ( !opaque() && e->button() == LeftButton ) { - QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) ) + if ( !opaque() && e->button() == Qt::LeftButton ) { + TQCOORD pos = s->pick( tqparentWidget()->mapFromGlobal(e->globalPos()) ) - kMouseOffset; ((KompareSplitter*)s)->moveSplitter( pos, id() ); } } KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right, - ViewSettings* settings, TQWidget* parent, const char* name ) - : TQWidget(parent, name), + ViewSettings* settings, TQWidget* tqparent, const char* name ) + : TQWidget(tqparent, name), m_settings( settings ), m_leftView( left ), m_rightView( right ), @@ -111,8 +111,8 @@ KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListVi { // connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) ); setBackgroundMode( NoBackground ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); - setFocusProxy( parent->parentWidget() ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); + setFocusProxy( tqparent->tqparentWidget() ); } KompareConnectWidget::~KompareConnectWidget() @@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe void KompareConnectWidget::slotDelayedRepaint() { - TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( tqrepaint() ) ); } void KompareConnectWidget::slotSetSelection( const Difference* diff ) @@ -169,8 +169,8 @@ void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ ) int lastL = m_leftView->lastVisibleDifference(); int lastR = m_rightView->lastVisibleDifference(); - int first = firstL < 0 ? firstR : QMIN( firstL, firstR ); - int last = lastL < 0 ? lastR : QMAX( lastL, lastR ); + int first = firstL < 0 ? firstR : TQMIN( firstL, firstR ); + int last = lastL < 0 ? lastR : TQMAX( lastL, lastR ); // kdDebug(8106) << " left: " << firstL << " - " << lastL << endl; // kdDebug(8106) << " right: " << firstR << " - " << lastR << endl; @@ -190,13 +190,13 @@ void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ ) if ( TQApplication::reverseLayout() ) { - leftRect = m_rightView->itemRect( i ); - rightRect = m_leftView->itemRect( i ); + leftRect = m_rightView->tqitemRect( i ); + rightRect = m_leftView->tqitemRect( i ); } else { - leftRect = m_leftView->itemRect( i ); - rightRect = m_rightView->itemRect( i ); + leftRect = m_leftView->tqitemRect( i ); + rightRect = m_rightView->tqitemRect( i ); } int tl = leftRect.top(); diff --git a/kompare/komparepart/kompareconnectwidget.h b/kompare/komparepart/kompareconnectwidget.h index 5287552f..8282463b 100644 --- a/kompare/komparepart/kompareconnectwidget.h +++ b/kompare/komparepart/kompareconnectwidget.h @@ -32,13 +32,14 @@ class ViewSettings; class KompareListView; class KompareSplitter; -class KompareConnectWidget : public QWidget +class KompareConnectWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: KompareConnectWidget( KompareListView* left, KompareListView* right, - ViewSettings* settings, TQWidget* parent, const char* name = 0 ); + ViewSettings* settings, TQWidget* tqparent, const char* name = 0 ); ~KompareConnectWidget(); public slots: @@ -69,17 +70,18 @@ private: class KompareConnectWidgetFrame : public QSplitterHandle { Q_OBJECT + TQ_OBJECT public: KompareConnectWidgetFrame( KompareListView* left, KompareListView* right, - ViewSettings* settings, KompareSplitter* parent, const char* name = 0 ); + ViewSettings* settings, KompareSplitter* tqparent, const char* name = 0 ); ~KompareConnectWidgetFrame(); - TQSize sizeHint() const; + TQSize tqsizeHint() const; KompareConnectWidget* wid() { return &m_wid; } protected: - // stop the parent QSplitterHandle painting + // stop the tqparent QSplitterHandle painting void paintEvent( TQPaintEvent* /* e */ ) { } void mouseMoveEvent( TQMouseEvent * ); diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp index 7e3ee953..7dd21845 100644 --- a/kompare/komparepart/komparelistview.cpp +++ b/kompare/komparepart/komparelistview.cpp @@ -47,19 +47,19 @@ using namespace Diff2; KompareListViewFrame::KompareListViewFrame( bool isSource, ViewSettings* settings, - KompareSplitter* parent, + KompareSplitter* tqparent, const char* name ): - TQFrame ( parent, name ), + TQFrame ( tqparent, name ), m_view ( isSource, settings, this, name ), m_label ( isSource?"Source":"Dest", this ), m_layout ( this ) { - setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); - m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); + tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); + m_label.tqsetSizePolicy ( 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->tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); bottomLine->setFixedHeight(1); m_label.setMargin(3); m_layout.setSpacing(0); @@ -69,11 +69,11 @@ KompareListViewFrame::KompareListViewFrame( bool isSource, m_layout.addWidget(&m_view); connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)), - parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); + tqparent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); - 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()) ); + connect( tqparent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) ); + connect( tqparent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) ); + connect( &m_view, TQT_SIGNAL(resized()), tqparent, TQT_SLOT(slotUpdateScrollBars()) ); } void KompareListViewFrame::slotSetModel( const DiffModel* model ) @@ -92,14 +92,14 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model ) m_label.setText( model->destinationFile() ); } } else { - m_label.setText( TQString::null ); + m_label.setText( TQString() ); } } KompareListView::KompareListView( bool isSource, ViewSettings* settings, - TQWidget* parent, const char* name ) : - KListView( parent, name ), + TQWidget* tqparent, const char* name ) : + KListView( tqparent, name ), m_isSource( isSource ), m_settings( settings ), m_scrollId( -1 ), @@ -122,10 +122,10 @@ KompareListView::KompareListView( bool isSource, setFrameStyle( TQFrame::NoFrame ); setVScrollBarMode( TQScrollView::AlwaysOff ); setHScrollBarMode( TQScrollView::AlwaysOff ); - setFocusPolicy( TQWidget::NoFocus ); + setFocusPolicy( TQ_NoFocus ); setFont( m_settings->m_font ); setSpaces( m_settings->m_tabToNumberOfSpaces ); - setFocusProxy( parent->parentWidget() ); + setFocusProxy( tqparent->tqparentWidget() ); } KompareListView::~KompareListView() @@ -154,7 +154,7 @@ int KompareListView::firstVisibleDifference() } if( item ) - return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() ); + return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() ); return -1; } @@ -177,12 +177,12 @@ int KompareListView::lastVisibleDifference() } if( item ) - return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() ); + return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() ); return -1; } -TQRect KompareListView::itemRect( int i ) +TQRect KompareListView::tqitemRect( int i ) { TQListViewItem* item = itemAtIndex( i ); int x = 0; @@ -390,7 +390,7 @@ void KompareListView::slotApplyAllDifferences( bool apply ) TQPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict ); for( ; it.current(); ++it ) it.current()->applyDifference( apply ); - repaint(); + tqrepaint(); } void KompareListView::slotApplyDifference( const Difference* diff, bool apply ) @@ -410,7 +410,7 @@ void KompareListView::setSpaces( int spaces ) void KompareListView::wheelEvent( TQWheelEvent* e ) { - e->ignore(); // we want the parent to catch wheel events + e->ignore(); // we want the tqparent to catch wheel events } void KompareListView::resizeEvent( TQResizeEvent* e ) @@ -420,28 +420,28 @@ void KompareListView::resizeEvent( TQResizeEvent* e ) kdDebug() << "resizeEvent " << endl; } -KompareListViewItem::KompareListViewItem( KompareListView* parent ) - : TQListViewItem( parent ), +KompareListViewItem::KompareListViewItem( KompareListView* tqparent ) + : TQListViewItem( tqparent ), m_scrollId( 0 ) { // kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl; } -KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after ) - : TQListViewItem( parent, after ), +KompareListViewItem::KompareListViewItem( KompareListView* tqparent, KompareListViewItem* after ) + : TQListViewItem( tqparent, after ), m_scrollId( after->scrollId() + after->maxHeight() ) { // kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl; } -KompareListViewItem::KompareListViewItem( KompareListViewItem* parent ) - : TQListViewItem( parent ), +KompareListViewItem::KompareListViewItem( KompareListViewItem* tqparent ) + : TQListViewItem( tqparent ), m_scrollId( 0 ) { } -KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/ ) - : TQListViewItem( parent ), +KompareListViewItem::KompareListViewItem( KompareListViewItem* tqparent, KompareListViewItem* /*after*/ ) + : TQListViewItem( tqparent ), m_scrollId( 0 ) { } @@ -456,8 +456,8 @@ void KompareListViewItem::paintFocus( TQPainter* /* p */, const TQColorGroup& /* // Don't paint anything } -KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, Difference* difference ) - : KompareListViewItem( parent ), +KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* tqparent, Difference* difference ) + : KompareListViewItem( tqparent ), m_difference( difference ), m_sourceItem( 0L ), m_destItem( 0L ) @@ -465,8 +465,8 @@ KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, Diffe init(); } -KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, KompareListViewItem* after, Difference* difference ) - : KompareListViewItem( parent, after ), +KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* tqparent, KompareListViewItem* after, Difference* difference ) + : KompareListViewItem( tqparent, after ), m_difference( difference ), m_sourceItem( 0L ), m_destItem( 0L ) @@ -500,12 +500,12 @@ void KompareListViewDiffItem::applyDifference( bool apply ) kdDebug(8104) << "KompareListViewDiffItem::applyDifference( " << apply << " )" << endl; setVisibility(); setup(); - repaint(); + tqrepaint(); } int KompareListViewDiffItem::maxHeight() { - int lines = QMAX( m_difference->sourceLineCount(), m_difference->destinationLineCount() ); + int lines = TQMAX( m_difference->sourceLineCount(), m_difference->destinationLineCount() ); if( lines == 0 ) return BLANK_LINE_HEIGHT; else @@ -520,13 +520,13 @@ void KompareListViewDiffItem::setSelected( bool b ) m_sourceItem->firstChild() : m_destItem->firstChild(); while( item && item->isVisible() ) { - item->repaint(); + item->tqrepaint(); item = item->nextSibling(); } } -KompareListViewLineContainerItem::KompareListViewLineContainerItem( KompareListViewDiffItem* parent, bool isSource ) - : KompareListViewItem( parent ), +KompareListViewLineContainerItem::KompareListViewLineContainerItem( KompareListViewDiffItem* tqparent, bool isSource ) + : KompareListViewItem( tqparent ), m_isSource( isSource ) { // kdDebug(8104) << "isSource ? " << (isSource ? " Yes!" : " No!") << endl; @@ -554,7 +554,7 @@ void KompareListViewLineContainerItem::setup() KompareListViewDiffItem* KompareListViewLineContainerItem::diffItemParent() const { - return (KompareListViewDiffItem*)parent(); + return (KompareListViewDiffItem*)tqparent(); } int KompareListViewLineContainerItem::lineCount() const @@ -575,8 +575,8 @@ DifferenceString* KompareListViewLineContainerItem::lineAt( int i ) const diffItemParent()->difference()->destinationLineAt( i ); } -KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text ) - : KompareListViewItem( parent ) +KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* tqparent, int line, DifferenceString* text ) + : KompareListViewItem( tqparent ) { setText( COL_LINE_NO, TQString::number( line ) ); setText( COL_MAIN, text->string() ); @@ -618,7 +618,7 @@ void KompareListViewLineItem::paintCell( TQPainter * p, const TQColorGroup & cg, if ( diffItemParent()->isSelected() ) { p->setPen( bg.dark(135) ); - if ( this == parent()->firstChild() ) + if ( this == tqparent()->firstChild() ) p->drawLine( 0, 0, width, 0 ); if ( nextSibling() == 0 ) p->drawLine( 0, height() - 1, width, height() - 1 ); @@ -658,14 +658,14 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co // kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl; // kdDebug(8104) << "c->offset() = " << c->offset() << endl; // kdDebug(8104) << "prevValue = " << prevValue << endl; - textChunk.replace( TQChar('\t'), kompareListView()->spaces() ); + textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() ); prevValue = m->offset(); if ( m->type() == Marker::End ) { TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); -// p->setPen( Qt::blue ); +// p->setPen( TQt::blue ); brush = changeBrush; } else @@ -673,7 +673,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co TQFont font( p->font() ); font.setBold( false ); p->setFont( font ); -// p->setPen( Qt::black ); +// p->setPen( TQt::black ); brush = normalBrush; } chunkWidth = p->fontMetrics().width( textChunk ); @@ -688,7 +688,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co { // 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( TQChar('\t'), kompareListView()->spaces() ); + textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() ); // kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl; TQFont font( p->font() ); font.setBold( false ); @@ -713,12 +713,12 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co KompareListViewDiffItem* KompareListViewLineItem::diffItemParent() const { - KompareListViewLineContainerItem* p = (KompareListViewLineContainerItem*)parent(); + KompareListViewLineContainerItem* p = (KompareListViewLineContainerItem*)tqparent(); return p->diffItemParent(); } -KompareListViewBlankLineItem::KompareListViewBlankLineItem( KompareListViewLineContainerItem* parent ) - : KompareListViewLineItem( parent, 0, new DifferenceString() ) +KompareListViewBlankLineItem::KompareListViewBlankLineItem( KompareListViewLineContainerItem* tqparent ) + : KompareListViewLineItem( tqparent, 0, new DifferenceString() ) { } @@ -737,16 +737,16 @@ void KompareListViewBlankLineItem::paintText( TQPainter* p, const TQColor& bg, i } } -KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, DiffHunk* hunk, bool zeroHeight ) - : KompareListViewItem( parent ), +KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* tqparent, DiffHunk* hunk, bool zeroHeight ) + : KompareListViewItem( tqparent ), m_zeroHeight( zeroHeight ), m_hunk( hunk ) { setSelectable( false ); } -KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, DiffHunk* hunk, bool zeroHeight ) - : KompareListViewItem( parent, after ), +KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* tqparent, KompareListViewItem* after, DiffHunk* hunk, bool zeroHeight ) + : KompareListViewItem( tqparent, after ), m_zeroHeight( zeroHeight ), m_hunk( hunk ) { diff --git a/kompare/komparepart/komparelistview.h b/kompare/komparepart/komparelistview.h index d617fafd..7c10ff6d 100644 --- a/kompare/komparepart/komparelistview.h +++ b/kompare/komparepart/komparelistview.h @@ -46,15 +46,16 @@ class KompareListViewLineContainerItem; class KompareListView : public KListView { Q_OBJECT + TQ_OBJECT public: - KompareListView( bool isSource, ViewSettings* settings, TQWidget* parent, const char* name = 0 ); + KompareListView( bool isSource, ViewSettings* settings, TQWidget* tqparent, const char* name = 0 ); virtual ~KompareListView(); KompareListViewItem* itemAtIndex( int i ); int firstVisibleDifference(); int lastVisibleDifference(); - TQRect itemRect( int i ); + TQRect tqitemRect( int i ); int minScrollId(); int maxScrollId(); int contentsWidth(); @@ -102,12 +103,13 @@ private: TQString m_spaces; }; -class KompareListViewFrame : public QFrame +class KompareListViewFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KompareListViewFrame( bool isSource, ViewSettings* settings, KompareSplitter* parent, const char* name = 0 ); + KompareListViewFrame( bool isSource, ViewSettings* settings, KompareSplitter* tqparent, const char* name = 0 ); virtual ~KompareListViewFrame() {}; KompareListView* view() { return &m_view; }; @@ -120,13 +122,13 @@ private: TQVBoxLayout m_layout; }; -class KompareListViewItem : public QListViewItem +class KompareListViewItem : public TQListViewItem { public: - KompareListViewItem( KompareListView* parent ); - KompareListViewItem( KompareListView* parent, KompareListViewItem* after ); - KompareListViewItem( KompareListViewItem* parent ); - KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* after ); + KompareListViewItem( KompareListView* tqparent ); + KompareListViewItem( KompareListView* tqparent, KompareListViewItem* after ); + KompareListViewItem( KompareListViewItem* tqparent ); + KompareListViewItem( KompareListViewItem* tqparent, KompareListViewItem* after ); void paintFocus( TQPainter* p, const TQColorGroup& cg, const TQRect& r ); int scrollId() { return m_scrollId; }; @@ -142,8 +144,8 @@ private: class KompareListViewDiffItem : public KompareListViewItem { public: - KompareListViewDiffItem( KompareListView* parent, Diff2::Difference* difference ); - KompareListViewDiffItem( KompareListView* parent, KompareListViewItem* after, Diff2::Difference* difference ); + KompareListViewDiffItem( KompareListView* tqparent, Diff2::Difference* difference ); + KompareListViewDiffItem( KompareListView* tqparent, KompareListViewItem* after, Diff2::Difference* difference ); void setup(); void setSelected( bool b ); @@ -165,7 +167,7 @@ private: class KompareListViewLineContainerItem : public KompareListViewItem { public: - KompareListViewLineContainerItem( KompareListViewDiffItem* parent, bool isSource ); + KompareListViewLineContainerItem( KompareListViewDiffItem* tqparent, bool isSource ); void setup(); int maxHeight() { return 0; } @@ -182,7 +184,7 @@ private: class KompareListViewLineItem : public KompareListViewItem { public: - KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, Diff2::DifferenceString* text ); + KompareListViewLineItem( KompareListViewLineContainerItem* tqparent, int line, Diff2::DifferenceString* text ); virtual void setup(); int maxHeight() { return 0; } @@ -199,7 +201,7 @@ private: class KompareListViewBlankLineItem : public KompareListViewLineItem { public: - KompareListViewBlankLineItem( KompareListViewLineContainerItem* parent ); + KompareListViewBlankLineItem( KompareListViewLineContainerItem* tqparent ); void setup(); @@ -209,8 +211,8 @@ public: class KompareListViewHunkItem : public KompareListViewItem { public: - KompareListViewHunkItem( KompareListView* parent, Diff2::DiffHunk* hunk, bool zeroHeight = false ); - KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false ); + KompareListViewHunkItem( KompareListView* tqparent, Diff2::DiffHunk* hunk, bool zeroHeight = false ); + KompareListViewHunkItem( KompareListView* tqparent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false ); void setup(); void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); diff --git a/kompare/komparepart/kompareprefdlg.h b/kompare/komparepart/kompareprefdlg.h index e81da90c..5a8d969a 100644 --- a/kompare/komparepart/kompareprefdlg.h +++ b/kompare/komparepart/kompareprefdlg.h @@ -30,6 +30,7 @@ class ViewSettings; class KomparePrefDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KomparePrefDlg( ViewSettings*, DiffSettings* ); ~KomparePrefDlg(); diff --git a/kompare/komparepart/komparesaveoptionsbase.ui b/kompare/komparepart/komparesaveoptionsbase.ui index 4c49b018..05b9be51 100644 --- a/kompare/komparepart/komparesaveoptionsbase.ui +++ b/kompare/komparepart/komparesaveoptionsbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KompareSaveOptionsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KompareSaveOptionsBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -65,7 +65,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_CommandLineGB</cstring> </property> @@ -83,7 +83,7 @@ <property name="title"> <string>Command Line</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="hAlign" stdset="0"> @@ -100,7 +100,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_CommandLineLabel</cstring> </property> @@ -110,7 +110,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup" row="0" column="1"> + <widget class="TQButtonGroup" row="0" column="1"> <property name="name"> <cstring>m_OptionsGB</cstring> </property> @@ -127,7 +127,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_SmallerChangesCB</cstring> </property> @@ -138,7 +138,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_LargeFilesCB</cstring> </property> @@ -149,7 +149,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_IgnoreCaseCB</cstring> </property> @@ -157,7 +157,7 @@ <string>Ignore changes in case</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_ExpandTabsCB</cstring> </property> @@ -165,7 +165,7 @@ <string>Expand tabs to spaces</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_IgnoreEmptyLinesCB</cstring> </property> @@ -173,7 +173,7 @@ <string>Ignore added or removed empty lines</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_IgnoreWhiteSpaceCB</cstring> </property> @@ -181,7 +181,7 @@ <string>Ignore changes in whitespace</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_FunctionNamesCB</cstring> </property> @@ -192,7 +192,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_RecursiveCB</cstring> </property> @@ -203,7 +203,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_NewFilesCB</cstring> </property> @@ -219,7 +219,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>m_FormatBG</cstring> </property> @@ -236,7 +236,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_ContextRB</cstring> </property> @@ -244,7 +244,7 @@ <string>Context</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_EdRB</cstring> </property> @@ -252,7 +252,7 @@ <string>Ed</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_NormalRB</cstring> </property> @@ -260,7 +260,7 @@ <string>Normal</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_RCSRB</cstring> </property> @@ -268,7 +268,7 @@ <string>RCS</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_UnifiedRB</cstring> </property> @@ -279,7 +279,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_SideBySideRB</cstring> </property> @@ -290,7 +290,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_ContextLinesLayout</cstring> </property> @@ -304,7 +304,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_ContextLinesLabel</cstring> </property> @@ -312,7 +312,7 @@ <string>Number of context lines:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_ContextLinesSB</cstring> </property> @@ -332,5 +332,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp index 723093ac..cf6e9bf7 100644 --- a/kompare/komparepart/komparesaveoptionswidget.cpp +++ b/kompare/komparepart/komparesaveoptionswidget.cpp @@ -31,8 +31,8 @@ #include "komparesaveoptionswidget.h" KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString destination, - DiffSettings * settings, TQWidget * parent ) - : KompareSaveOptionsBase( parent, "save options" ) + DiffSettings * settings, TQWidget * tqparent ) + : KompareSaveOptionsBase( tqparent, "save options" ) , m_source( source ) , m_destination( destination ) { diff --git a/kompare/komparepart/komparesaveoptionswidget.h b/kompare/komparepart/komparesaveoptionswidget.h index 905dcaa4..3618a2b2 100644 --- a/kompare/komparepart/komparesaveoptionswidget.h +++ b/kompare/komparepart/komparesaveoptionswidget.h @@ -30,8 +30,9 @@ class DiffSettings; class KompareSaveOptionsWidget : public KompareSaveOptionsBase, public KompareFunctions { Q_OBJECT + TQ_OBJECT public: - KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* parent ); + KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* tqparent ); ~KompareSaveOptionsWidget(); void saveOptions(); diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp index 59106ffb..e962730a 100644 --- a/kompare/komparepart/komparesplitter.cpp +++ b/kompare/komparepart/komparesplitter.cpp @@ -34,37 +34,37 @@ using namespace Diff2; -KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent, +KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * tqparent, const char *name) : - TQSplitter( Horizontal, parent, name ), + QSplitter(Qt::Horizontal, tqparent, name ), m_settings( settings ) { - TQFrame *scrollFrame = new TQFrame( parent, "scrollFrame" ); + TQFrame *scrollFrame = new TQFrame( tqparent, "scrollFrame" ); reparent( scrollFrame, *(new TQPoint()), false ); // Set up the 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 TQScrollBar( TQScrollBar::Horizontal, scrollFrame ); - pairlayout->addWidget( m_hScroll, 1, 0 ); + scrollFrame->setLineWidth(scrollFrame->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)); + TQGridLayout *pairtqlayout = new TQGridLayout(scrollFrame, 2, 2, 0); + m_vScroll = new TQScrollBar( Qt::Vertical, scrollFrame ); + pairtqlayout->addWidget( m_vScroll, 0, 1 ); + m_hScroll = new TQScrollBar( Qt::Horizontal, scrollFrame ); + pairtqlayout->addWidget( m_hScroll, 1, 0 ); new KompareListViewFrame(true, m_settings, this, "source"); new KompareListViewFrame(false, m_settings, this, "destination"); - pairlayout->addWidget( this, 0, 0 ); + pairtqlayout->addWidget( this, 0, 0 ); // set up our looks setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) ); + setLineWidth( tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) ); setHandleWidth(50); setChildrenCollapsible( false ); setFrameStyle( TQFrame::NoFrame ); - setSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored )); setOpaqueResize( true ); - setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQ_WheelFocus ); connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) ); connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) ); @@ -121,7 +121,7 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool s->wid = newHandle; newHandle->setId( d->list.count() ); s->isHandle = TRUE; - s->sizer = pick( newHandle->sizeHint() ); + s->sizer = pick( newHandle->tqsizeHint() ); if ( prepend ) d->list.prepend( s ); else @@ -184,7 +184,7 @@ void KompareSplitter::childEvent( TQChildEvent *c ) } } -// This is from a private qt header (kernel/qlayoutengine_p.h). sorry. +// This is from a private qt header (kernel/qtqlayoutengine_p.h). sorry. TQSize qSmartMinSize( TQWidget *w ); static TQPoint toggle( TQWidget *w, TQPoint pos ) @@ -212,11 +212,11 @@ static TQPoint bottomRight( TQWidget *w ) if ( isCollapsed(w) ) { return toggle( w, w->pos() ) - TQPoint( 1, 1 ); } else { - return w->geometry().bottomRight(); + return w->tqgeometry().bottomRight(); } } -void KompareSplitter::moveSplitter( QCOORD p, int id ) +void KompareSplitter::moveSplitter( TQCOORD p, int id ) { QSplitterLayoutStruct *s = d->list.at( id ); int farMin; @@ -229,7 +229,7 @@ void KompareSplitter::moveSplitter( QCOORD p, int id ) int* ws = new int[d->list.count()]; TQWidget *w = 0; bool upLeft; - if ( TQApplication::reverseLayout() && orient == Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==Qt::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 ); @@ -278,8 +278,8 @@ void KompareSplitter::doMove( bool backwards, int pos, int id, int delta, int dd = backwards ? pos - pick( topLeft(w) ) : pick( bottomRight(w) ) - pos + 1; if ( dd > 0 || (!isCollapsed(w) && !mayCollapse) ) { - dd = QMAX( pick(qSmartMinSize(w)), - QMIN(dd, pick(w->maximumSize())) ); + dd = TQMAX( pick(qSmartMinSize(w)), + TQMIN(dd, pick(w->tqmaximumSize())) ); } else { dd = 0; } @@ -391,12 +391,12 @@ void KompareSplitter::slotDelayedRepaintHandles() ((KompareConnectWidgetFrame*)curr->wid)->wid()->slotDelayedRepaint(); } -void KompareSplitter::repaintHandles() +void KompareSplitter::tqrepaintHandles() { QSplitterLayoutStruct *curr; for ( curr = d->list.first(); curr; curr = d->list.next() ) if ( curr->isHandle ) - ((KompareConnectWidgetFrame*)curr->wid)->wid()->repaint(); + ((KompareConnectWidgetFrame*)curr->wid)->wid()->tqrepaint(); } // Scrolling stuff @@ -410,7 +410,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e ) // scroll lines... if ( e->orientation() == Qt::Vertical ) { - if ( e->state() & Qt::ControlButton ) + if ( e->state() & TQt::ControlButton ) if ( e->delta() < 0 ) // scroll down one page m_vScroll->addPage(); else // scroll up one page @@ -423,7 +423,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e ) } else { - if ( e->state() & Qt::ControlButton ) + if ( e->state() & TQt::ControlButton ) if ( e->delta() < 0 ) // scroll right one page m_hScroll->addPage(); else // scroll left one page @@ -435,7 +435,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e ) m_hScroll->subtractLine(); } e->accept(); - repaintHandles(); + tqrepaintHandles(); } void KompareSplitter::keyPressEvent( TQKeyEvent* e ) @@ -466,7 +466,7 @@ void KompareSplitter::keyPressEvent( TQKeyEvent* e ) break; } e->accept(); - repaintHandles(); + tqrepaintHandles(); } void KompareSplitter::timerTimeout() diff --git a/kompare/komparepart/komparesplitter.h b/kompare/komparepart/komparesplitter.h index 08d9d94d..e6dd8ae9 100644 --- a/kompare/komparepart/komparesplitter.h +++ b/kompare/komparepart/komparesplitter.h @@ -38,9 +38,10 @@ class ViewSettings; class KompareSplitter : public QSplitter { Q_OBJECT + TQ_OBJECT public: - KompareSplitter(ViewSettings *settings, TQWidget *parent=0, const char *name = 0); + KompareSplitter(ViewSettings *settings, TQWidget *tqparent=0, const char *name = 0); ~KompareSplitter(); signals: @@ -75,7 +76,7 @@ protected: void wheelEvent( TQWheelEvent* e ); void keyPressEvent( TQKeyEvent* e ); - void moveSplitter( QCOORD pos, int id ); + void moveSplitter( TQCOORD pos, int id ); private slots: void slotDelayedRepaintHandles(); @@ -88,7 +89,7 @@ private: void doMove( bool backwards, int pos, int id, int delta, bool mayCollapse, int* positions, int* widths ); - void repaintHandles(); + void tqrepaintHandles(); TQTimer* m_scrollTimer; bool restartTimer; diff --git a/kompare/kompareurldialog.cpp b/kompare/kompareurldialog.cpp index d24abaf9..be28295c 100644 --- a/kompare/kompareurldialog.cpp +++ b/kompare/kompareurldialog.cpp @@ -32,8 +32,8 @@ #include "kompareurldialog.h" -KompareURLDialog::KompareURLDialog( TQWidget *parent, const char *name ) - : KDialogBase( IconList, "", Ok|Cancel, Ok, parent, name ) +KompareURLDialog::KompareURLDialog( TQWidget *tqparent, const char *name ) + : KDialogBase( IconList, "", Ok|Cancel, Ok, tqparent, name ) { setIconListAllVisible(true); diff --git a/kompare/kompareurldialog.h b/kompare/kompareurldialog.h index 32bf450f..2bc2a929 100644 --- a/kompare/kompareurldialog.h +++ b/kompare/kompareurldialog.h @@ -41,9 +41,10 @@ class ViewSettings; class KompareURLDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KompareURLDialog( TQWidget* parent = 0, const char* name = 0 ); + KompareURLDialog( TQWidget* tqparent = 0, const char* name = 0 ); ~KompareURLDialog(); KURL getFirstURL() const; diff --git a/kompare/libdialogpages/diffpage.cpp b/kompare/libdialogpages/diffpage.cpp index 0423f1a5..e8cd73fd 100644 --- a/kompare/libdialogpages/diffpage.cpp +++ b/kompare/libdialogpages/diffpage.cpp @@ -42,7 +42,7 @@ #include "diffpage.h" -DiffPage::DiffPage( TQWidget* parent ) : PageBase( parent ), +DiffPage::DiffPage( TQWidget* tqparent ) : PageBase( tqparent ), m_ignoreRegExpDialog( 0 ) { addDiffTab(); @@ -146,7 +146,7 @@ void DiffPage::setDefaults() m_ignoreTabExpansionCheckBox->setChecked( false ); m_ignoreRegExpCheckBox->setChecked( false ); - m_ignoreRegExpEdit->setText( TQString::null ); + m_ignoreRegExpEdit->setText( TQString() ); m_locSpinBox->setValue( 3 ); @@ -160,7 +160,7 @@ void DiffPage::setDefaults() void DiffPage::slotShowRegExpEditor() { if ( ! m_ignoreRegExpDialog ) - m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this ); + m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString(), TQT_TQOBJECT(this) ); KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( m_ignoreRegExpDialog->qt_cast( "KRegExpEditorInterface" ) ); @@ -203,20 +203,20 @@ void DiffPage::slotExcludeFileToggled( bool on ) void DiffPage::addDiffTab() { TQWidget* page = new TQWidget( this ); - TQVBoxLayout* layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); // add diff program selector m_diffProgramGroup = new TQVButtonGroup( i18n( "Diff Program" ), page ); - layout->addWidget( m_diffProgramGroup ); + tqlayout->addWidget( m_diffProgramGroup ); m_diffProgramGroup->setMargin( KDialog::marginHint() ); m_diffURLRequester = new KURLRequester( m_diffProgramGroup, "diffURLRequester" ); 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 ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "&Diff" ) ); } @@ -224,14 +224,14 @@ void DiffPage::addDiffTab() void DiffPage::addFormatTab() { TQWidget* page = new TQWidget( this ); - TQVBoxLayout* layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); // add diff modes 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 ); + tqlayout->addWidget( m_modeButtonGroup ); m_modeButtonGroup->setMargin( KDialog::marginHint() ); TQRadioButton* radioButton; @@ -245,7 +245,7 @@ void DiffPage::addFormatTab() // #lines of context (loc) TQHGroupBox* groupBox = new TQHGroupBox( i18n( "Lines of Context" ), page ); - layout->addWidget( groupBox ); + tqlayout->addWidget( groupBox ); groupBox->setMargin( KDialog::marginHint() ); TQLabel* label = new TQLabel( i18n( "Number of context lines:" ), groupBox ); @@ -253,8 +253,8 @@ void DiffPage::addFormatTab() 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 ); - page->setMinimumSize( sizeHintForWidget( page ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "&Format" ) ); } @@ -262,13 +262,13 @@ void DiffPage::addFormatTab() void DiffPage::addOptionsTab() { TQWidget* page = new TQWidget( this ); - TQVBoxLayout* layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); // add diff options TQVButtonGroup* optionButtonGroup = new TQVButtonGroup( i18n( "General" ), page ); - layout->addWidget( optionButtonGroup ); + tqlayout->addWidget( optionButtonGroup ); optionButtonGroup->setMargin( KDialog::marginHint() ); m_smallerCheckBox = new TQCheckBox( i18n( "&Look for smaller changes" ), optionButtonGroup ); @@ -278,13 +278,13 @@ void DiffPage::addOptionsTab() m_caseCheckBox = new TQCheckBox( i18n( "&Ignore changes in case" ), optionButtonGroup ); TQToolTip::add( m_caseCheckBox, i18n( "This corresponds to the -i diff option." ) ); - TQHBoxLayout* groupLayout = new TQHBoxLayout( layout, -1, "regexp_horizontal_layout" ); + TQHBoxLayout* groupLayout = new TQHBoxLayout( tqlayout, -1, "regexp_horizontal_layout" ); groupLayout->setMargin( KDialog::marginHint() ); 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( TQString::null, page, "regexplineedit" ); + m_ignoreRegExpEdit = new KLineEdit( TQString(), 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 ); @@ -298,7 +298,7 @@ void DiffPage::addOptionsTab() } TQVButtonGroup* moreOptionButtonGroup = new TQVButtonGroup( i18n( "Whitespace" ), page ); - layout->addWidget( moreOptionButtonGroup ); + tqlayout->addWidget( moreOptionButtonGroup ); moreOptionButtonGroup->setMargin( KDialog::marginHint() ); m_tabsCheckBox = new TQCheckBox( i18n( "E&xpand tabs to spaces in output" ), moreOptionButtonGroup ); @@ -312,8 +312,8 @@ void DiffPage::addOptionsTab() 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 ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "O&ptions" ) ); } @@ -321,16 +321,16 @@ void DiffPage::addOptionsTab() void DiffPage::addExcludeTab() { TQWidget* page = new TQWidget( this ); - TQVBoxLayout* layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); 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 ); 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 ); + tqlayout->addWidget( excludeFilePatternGroupBox ); connect( m_excludeFilePatternCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFilePatternToggled(bool))); @@ -342,12 +342,12 @@ void DiffPage::addExcludeTab() 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" ); 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 ); + tqlayout->addWidget( excludeFileNameGroupBox ); connect( m_excludeFileCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFileToggled(bool))); - layout->addStretch( 1 ); - page->setMinimumSize( sizeHintForWidget( page ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "&Exclude" ) ); } diff --git a/kompare/libdialogpages/diffpage.h b/kompare/libdialogpages/diffpage.h index 425d06df..eb0c85c0 100644 --- a/kompare/libdialogpages/diffpage.h +++ b/kompare/libdialogpages/diffpage.h @@ -40,6 +40,7 @@ class DiffSettings; class DiffPage : public PageBase { Q_OBJECT + TQ_OBJECT public: DiffPage( TQWidget* ); ~DiffPage(); diff --git a/kompare/libdialogpages/diffsettings.cpp b/kompare/libdialogpages/diffsettings.cpp index 6c2186f5..3f7cb1be 100644 --- a/kompare/libdialogpages/diffsettings.cpp +++ b/kompare/libdialogpages/diffsettings.cpp @@ -19,8 +19,8 @@ #include "diffsettings.h" -DiffSettings::DiffSettings( TQWidget* parent ) - : SettingsBase( parent ), +DiffSettings::DiffSettings( TQWidget* tqparent ) + : SettingsBase( tqparent ), m_linesOfContext( 0 ), m_format( Kompare::Unified ), m_largeFiles( false ), diff --git a/kompare/libdialogpages/diffsettings.h b/kompare/libdialogpages/diffsettings.h index a41308c0..3d219c96 100644 --- a/kompare/libdialogpages/diffsettings.h +++ b/kompare/libdialogpages/diffsettings.h @@ -29,8 +29,9 @@ class DiffSettings : public SettingsBase { Q_OBJECT + TQ_OBJECT public: - DiffSettings( TQWidget* parent ); + DiffSettings( TQWidget* tqparent ); virtual ~DiffSettings(); public: // some virtual functions that will be overloaded from the base class diff --git a/kompare/libdialogpages/filespage.cpp b/kompare/libdialogpages/filespage.cpp index f326bbde..606f38fe 100644 --- a/kompare/libdialogpages/filespage.cpp +++ b/kompare/libdialogpages/filespage.cpp @@ -31,12 +31,12 @@ #include "filessettings.h" #include "filespage.h" -FilesPage::FilesPage( TQWidget* parent ) : PageBase( parent ), m_URLChanged( false ) +FilesPage::FilesPage( TQWidget* tqparent ) : PageBase( tqparent ), m_URLChanged( false ) { TQWidget* page = new TQWidget( this ); - TQVBoxLayout* layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); m_firstGB = new TQGroupBox( 1, Qt::Vertical, "You have to set this moron :)", page ); m_firstURLComboBox = new KURLComboBox( KURLComboBox::Both, true, m_firstGB, "SourceURLComboBox" ); @@ -54,12 +54,12 @@ FilesPage::FilesPage( TQWidget* parent ) : PageBase( parent ), m_URLChanged( fal m_encodingComboBox = new TQComboBox( false, m_thirdGB, "encoding_combobox" ); m_encodingComboBox->insertStringList( KGlobal::charsets()->availableEncodingNames() ); - layout->addWidget( m_firstGB ); - layout->addWidget( m_secondGB ); - layout->addWidget( m_thirdGB ); + tqlayout->addWidget( m_firstGB ); + tqlayout->addWidget( m_secondGB ); + tqlayout->addWidget( m_thirdGB ); - layout->addStretch( 1 ); - page->setMinimumSize( sizeHintForWidget( page ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "&Files" ) ); } diff --git a/kompare/libdialogpages/filespage.h b/kompare/libdialogpages/filespage.h index 08db4238..24380f7c 100644 --- a/kompare/libdialogpages/filespage.h +++ b/kompare/libdialogpages/filespage.h @@ -36,8 +36,9 @@ class FilesSettings; class FilesPage : PageBase { Q_OBJECT + TQ_OBJECT public: - FilesPage( TQWidget* parent ); + FilesPage( TQWidget* tqparent ); virtual ~FilesPage(); public: diff --git a/kompare/libdialogpages/filessettings.cpp b/kompare/libdialogpages/filessettings.cpp index 01b70076..fa982a12 100644 --- a/kompare/libdialogpages/filessettings.cpp +++ b/kompare/libdialogpages/filessettings.cpp @@ -21,8 +21,8 @@ #include "filessettings.h" -FilesSettings::FilesSettings( TQWidget* parent ) - : SettingsBase( parent ) +FilesSettings::FilesSettings( TQWidget* tqparent ) + : SettingsBase( tqparent ) { } diff --git a/kompare/libdialogpages/filessettings.h b/kompare/libdialogpages/filessettings.h index e38fff6d..a2e5898b 100644 --- a/kompare/libdialogpages/filessettings.h +++ b/kompare/libdialogpages/filessettings.h @@ -28,8 +28,9 @@ class KConfig; class FilesSettings : public SettingsBase { Q_OBJECT + TQ_OBJECT public: - FilesSettings( TQWidget* parent ); + FilesSettings( TQWidget* tqparent ); virtual ~FilesSettings(); public: diff --git a/kompare/libdialogpages/pagebase.cpp b/kompare/libdialogpages/pagebase.cpp index ef9aa1ea..4feda39b 100644 --- a/kompare/libdialogpages/pagebase.cpp +++ b/kompare/libdialogpages/pagebase.cpp @@ -22,7 +22,7 @@ #include "pagebase.h" -PageBase::PageBase( TQWidget* parent ) : KTabCtl( parent ) +PageBase::PageBase( TQWidget* tqparent ) : KTabCtl( tqparent ) { } @@ -33,12 +33,12 @@ PageBase::~PageBase() } /** No descriptions */ -TQSize PageBase::sizeHintForWidget( TQWidget* widget ) +TQSize PageBase::tqsizeHintForWidget( TQWidget* widget ) { // - // The size is computed by adding the sizeHint().height() of all - // widget children and taking the width of the widest child and adding - // layout()->margin() and layout()->spacing() + // The size is computed by adding the tqsizeHint().height() of all + // widget tqchildren and taking the width of the widest child and adding + // tqlayout()->margin() and tqlayout()->spacing() // // this code in this method has been ripped out of a file in kbabel @@ -47,17 +47,17 @@ TQSize PageBase::sizeHintForWidget( TQWidget* widget ) TQSize size; int numChild = 0; - TQObjectList *l = (TQObjectList*)(widget->children()); + TQObjectList l = widget->childrenListObject(); - for( uint i=0; i < l->count(); i++ ) + for( uint i=0; i < l.count(); i++ ) { - TQObject *o = l->at(i); + TQObject *o = l.at(i); if( o->isWidgetType() ) { numChild += 1; TQWidget *w=((TQWidget*)o); - TQSize s = w->sizeHint(); + TQSize s = w->tqsizeHint(); if( s.isEmpty() == true ) { s = TQSize( 50, 100 ); // Default size @@ -72,8 +72,8 @@ TQSize PageBase::sizeHintForWidget( TQWidget* widget ) if( numChild > 0 ) { - size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) ); - size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 ); + size.setHeight( size.height() + widget->tqlayout()->spacing()*(numChild-1) ); + size += TQSize( widget->tqlayout()->margin()*2, widget->tqlayout()->margin()*2 + 1 ); } else { diff --git a/kompare/libdialogpages/pagebase.h b/kompare/libdialogpages/pagebase.h index 0f188b36..32d4bca3 100644 --- a/kompare/libdialogpages/pagebase.h +++ b/kompare/libdialogpages/pagebase.h @@ -31,13 +31,14 @@ class PageBase : public KTabCtl { Q_OBJECT + TQ_OBJECT public: PageBase( TQWidget* ); ~PageBase(); public: /** No descriptions */ - TQSize sizeHintForWidget( TQWidget* widget ); + TQSize tqsizeHintForWidget( TQWidget* widget ); /** No descriptions */ virtual void restore(); /** No descriptions */ diff --git a/kompare/libdialogpages/settingsbase.cpp b/kompare/libdialogpages/settingsbase.cpp index 6e347719..36f70a1b 100644 --- a/kompare/libdialogpages/settingsbase.cpp +++ b/kompare/libdialogpages/settingsbase.cpp @@ -21,7 +21,7 @@ #include "settingsbase.h" -SettingsBase::SettingsBase( TQWidget* parent ) : TQObject( parent ) +SettingsBase::SettingsBase( TQWidget* tqparent ) : TQObject( tqparent ) { } diff --git a/kompare/libdialogpages/settingsbase.h b/kompare/libdialogpages/settingsbase.h index 4bbe13b5..79e556cc 100644 --- a/kompare/libdialogpages/settingsbase.h +++ b/kompare/libdialogpages/settingsbase.h @@ -27,11 +27,12 @@ class TQWidget; class KConfig; -class SettingsBase : public QObject +class SettingsBase : public TQObject { Q_OBJECT + TQ_OBJECT public: - SettingsBase( TQWidget* parent ); + SettingsBase( TQWidget* tqparent ); ~SettingsBase(); public: diff --git a/kompare/libdialogpages/viewpage.cpp b/kompare/libdialogpages/viewpage.cpp index 1deb9e21..d78f6b9a 100644 --- a/kompare/libdialogpages/viewpage.cpp +++ b/kompare/libdialogpages/viewpage.cpp @@ -33,48 +33,48 @@ #include "viewpage.h" #include "viewsettings.h" -ViewPage::ViewPage( TQWidget* parent ) : PageBase( parent ) +ViewPage::ViewPage( TQWidget* tqparent ) : PageBase( tqparent ) { TQWidget* page; - TQVBoxLayout* layout; - TQGroupBox* colorGroupBox; + TQVBoxLayout* tqlayout; + TQGroupBox* tqcolorGroupBox; TQHGroupBox* snolGroupBox; TQHGroupBox* tabGroupBox; TQLabel* label; page = new TQWidget( this ); - layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); // add a groupbox - colorGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page ); - layout->addWidget( colorGroupBox ); - colorGroupBox->setMargin( KDialog::marginHint() ); + tqcolorGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page ); + tqlayout->addWidget( tqcolorGroupBox ); + tqcolorGroupBox->setMargin( KDialog::marginHint() ); // add the removeColor - label = new TQLabel( i18n( "Removed color:" ), colorGroupBox ); - m_removedColorButton = new KColorButton( colorGroupBox ); + label = new TQLabel( i18n( "Removed color:" ), tqcolorGroupBox ); + m_removedColorButton = new KColorButton( tqcolorGroupBox ); label->setBuddy( m_removedColorButton ); // add the changeColor - label = new TQLabel( i18n( "Changed color:" ), colorGroupBox ); - m_changedColorButton = new KColorButton( colorGroupBox ); + label = new TQLabel( i18n( "Changed color:" ), tqcolorGroupBox ); + m_changedColorButton = new KColorButton( tqcolorGroupBox ); label->setBuddy( m_changedColorButton ); // add the addColor - label = new TQLabel( i18n( "Added color:" ), colorGroupBox ); - m_addedColorButton = new KColorButton( colorGroupBox ); + label = new TQLabel( i18n( "Added color:" ), tqcolorGroupBox ); + m_addedColorButton = new KColorButton( tqcolorGroupBox ); label->setBuddy( m_addedColorButton ); // add the appliedColor - label = new TQLabel( i18n( "Applied color:" ), colorGroupBox ); - m_appliedColorButton = new KColorButton( colorGroupBox ); + label = new TQLabel( i18n( "Applied color:" ), tqcolorGroupBox ); + m_appliedColorButton = new KColorButton( tqcolorGroupBox ); label->setBuddy( m_appliedColorButton ); // scroll number of lines (snol) snolGroupBox = new TQHGroupBox( i18n( "Mouse Wheel" ), page ); - layout->addWidget( snolGroupBox ); + tqlayout->addWidget( snolGroupBox ); snolGroupBox->setMargin( KDialog::marginHint() ); label = new TQLabel( i18n( "Number of lines:" ), snolGroupBox ); @@ -84,25 +84,25 @@ ViewPage::ViewPage( TQWidget* parent ) : PageBase( parent ) // Temporarily here for testing... // number of spaces for a tab character stuff tabGroupBox = new TQHGroupBox( i18n( "Tabs to Spaces" ), page ); - layout->addWidget( tabGroupBox ); + tqlayout->addWidget( tabGroupBox ); tabGroupBox->setMargin( KDialog::marginHint() ); 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 ); - page->setMinimumSize( sizeHintForWidget( page ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "A&ppearance" ) ); page = new TQWidget( this ); - layout = new TQVBoxLayout( page ); - layout->setSpacing( KDialog::spacingHint() ); - layout->setMargin( KDialog::marginHint() ); + tqlayout = new TQVBoxLayout( page ); + tqlayout->setSpacing( KDialog::spacingHint() ); + tqlayout->setMargin( KDialog::marginHint() ); TQHGroupBox* gb = new TQHGroupBox( i18n( "Text Font" ), page ); - layout->addWidget( gb ); + tqlayout->addWidget( gb ); gb->setMargin( KDialog::marginHint() ); label = new TQLabel( i18n( "Font:" ), gb ); @@ -113,8 +113,8 @@ ViewPage::ViewPage( TQWidget* parent ) : PageBase( parent ) m_fontSizeSpinBox = new TQSpinBox( 6, 24, 1, gb, "fontsize" ); label->setBuddy( m_fontSizeSpinBox ); - layout->addStretch( 1 ); - page->setMinimumSize( sizeHintForWidget( page ) ); + tqlayout->addStretch( 1 ); + page->setMinimumSize( tqsizeHintForWidget( page ) ); addTab( page, i18n( "&Fonts" ) ); } diff --git a/kompare/libdialogpages/viewpage.h b/kompare/libdialogpages/viewpage.h index 8682f268..75a6e335 100644 --- a/kompare/libdialogpages/viewpage.h +++ b/kompare/libdialogpages/viewpage.h @@ -33,6 +33,7 @@ class ViewSettings; class ViewPage : public PageBase { Q_OBJECT + TQ_OBJECT public: ViewPage( TQWidget* ); ~ViewPage(); diff --git a/kompare/libdialogpages/viewsettings.cpp b/kompare/libdialogpages/viewsettings.cpp index 403746b1..8e61117e 100644 --- a/kompare/libdialogpages/viewsettings.cpp +++ b/kompare/libdialogpages/viewsettings.cpp @@ -31,8 +31,8 @@ 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( TQWidget* parent ) - : SettingsBase( parent ), +ViewSettings::ViewSettings( TQWidget* tqparent ) + : SettingsBase( tqparent ), m_removeColor( 0, 0, 0 ), m_changeColor( 0, 0, 0), m_addColor( 0, 0, 0), diff --git a/kompare/libdialogpages/viewsettings.h b/kompare/libdialogpages/viewsettings.h index 24bf8e9a..c7a2cfd5 100644 --- a/kompare/libdialogpages/viewsettings.h +++ b/kompare/libdialogpages/viewsettings.h @@ -29,13 +29,14 @@ class ViewSettings : public SettingsBase { Q_OBJECT + TQ_OBJECT public: static const TQColor default_removeColor; static const TQColor default_changeColor; static const TQColor default_addColor; static const TQColor default_appliedColor; - ViewSettings( TQWidget* parent ); + ViewSettings( TQWidget* tqparent ); ~ViewSettings(); public: // some virtual functions that will be overloaded from the base class diff --git a/kompare/libdiff2/cvsdiffparser.cpp b/kompare/libdiff2/cvsdiffparser.cpp index 47c79a0f..f29e422c 100644 --- a/kompare/libdiff2/cvsdiffparser.cpp +++ b/kompare/libdiff2/cvsdiffparser.cpp @@ -53,27 +53,27 @@ enum Kompare::Format CVSDiffParser::determineFormat() while( it != m_diffLines.end() ) { - if( (*it).find( normalRE, 0 ) == 0 ) + if( (*it).tqfind( normalRE, 0 ) == 0 ) { // kdDebug(8101) << "Difflines are from a Normal diff..." << endl; return Kompare::Normal; } - else if( (*it).find( unifiedRE, 0 ) == 0 ) + else if( (*it).tqfind( unifiedRE, 0 ) == 0 ) { // kdDebug(8101) << "Difflines are from a Unified diff..." << endl; return Kompare::Unified; } - else if( (*it).find( contextRE, 0 ) == 0 ) + else if( (*it).tqfind( contextRE, 0 ) == 0 ) { // kdDebug(8101) << "Difflines are from a Context diff..." << endl; return Kompare::Context; } - else if( (*it).find( rcsRE, 0 ) == 0 ) + else if( (*it).tqfind( rcsRE, 0 ) == 0 ) { // kdDebug(8101) << "Difflines are from a RCS diff..." << endl; return Kompare::RCS; } - else if( (*it).find( edRE, 0 ) == 0 ) + else if( (*it).tqfind( edRE, 0 ) == 0 ) { // kdDebug(8101) << "Difflines are from an ED diff..." << endl; return Kompare::Ed; diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h index 87b8f556..4e440222 100644 --- a/kompare/libdiff2/difference.h +++ b/kompare/libdiff2/difference.h @@ -130,7 +130,7 @@ public: protected: void calculateHash() { - unsigned short const* str = reinterpret_cast<unsigned short const*>( m_string.unicode() ); + unsigned short const* str = reinterpret_cast<unsigned short const*>( m_string.tqunicode() ); const unsigned int len = m_string.length(); m_hash = 1315423911; diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp index 3b48d796..efa7e12d 100644 --- a/kompare/libdiff2/diffhunk.cpp +++ b/kompare/libdiff2/diffhunk.cpp @@ -97,16 +97,16 @@ TQString DiffHunk::recreateHunk() const } // recreate header - hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" ) - .arg( m_sourceLine ) - .arg( m_destinationLine ) - .arg( slc ) - .arg( dlc ); + hunk += TQString::tqfromLatin1( "@@ -%1,%3 +%2,%4 @@" ) + .tqarg( m_sourceLine ) + .tqarg( m_destinationLine ) + .tqarg( slc ) + .tqarg( dlc ); if ( !m_function.isEmpty() ) hunk += " " + m_function; - hunk += TQString::fromLatin1( "\n" ); + hunk += TQString::tqfromLatin1( "\n" ); hunk += differences; diff --git a/kompare/libdiff2/diffhunk.h b/kompare/libdiff2/diffhunk.h index a4194a3a..f71a6a84 100644 --- a/kompare/libdiff2/diffhunk.h +++ b/kompare/libdiff2/diffhunk.h @@ -33,7 +33,7 @@ public: enum Type { Normal, AddedByBlend }; public: - DiffHunk( int sourceLine, int destinationLine, TQString function = TQString::null, Type type = Normal ); + DiffHunk( int sourceLine, int destinationLine, TQString function = TQString(), Type type = Normal ); ~DiffHunk(); const DifferenceList& differences() const { return m_differences; }; diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp index 1b3822b0..438055c6 100644 --- a/kompare/libdiff2/diffmodel.cpp +++ b/kompare/libdiff2/diffmodel.cpp @@ -79,10 +79,10 @@ void DiffModel::splitSourceInPathAndFileName() { int pos; - if( ( pos = m_source.findRev( "/" ) ) >= 0 ) + if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 ) m_sourcePath = m_source.mid( 0, pos+1 ); - if( ( pos = m_source.findRev( "/" ) ) >= 0 ) + if( ( pos = m_source.tqfindRev( "/" ) ) >= 0 ) m_sourceFile = m_source.mid( pos+1, m_source.length() - pos ); else m_sourceFile = m_source; @@ -94,10 +94,10 @@ void DiffModel::splitDestinationInPathAndFileName() { int pos; - if( ( pos = m_destination.findRev( "/" ) )>= 0 ) + if( ( pos = m_destination.tqfindRev( "/" ) )>= 0 ) m_destinationPath = m_destination.mid( 0, pos+1 ); - if( ( pos = m_destination.findRev( "/" ) ) >= 0 ) + if( ( pos = m_destination.tqfindRev( "/" ) ) >= 0 ) m_destinationFile = m_destination.mid( pos+1, m_destination.length() - pos ); else m_destinationFile = m_source; @@ -152,13 +152,13 @@ TQString DiffModel::recreateDiff() const TQString diff; // recreate header - TQString tab = TQString::fromLatin1( "\t" ); - TQString nl = TQString::fromLatin1( "\n" ); - diff += TQString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp ); + TQString tab = TQString::tqfromLatin1( "\t" ); + TQString nl = TQString::tqfromLatin1( "\n" ); + diff += TQString::tqfromLatin1( "--- %1\t%2" ).tqarg( m_source ).tqarg( m_sourceTimestamp ); if ( !m_sourceRevision.isEmpty() ) diff += tab + m_sourceRevision; diff += nl; - diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp ); + diff += TQString::tqfromLatin1( "+++ %1\t%2" ).tqarg( m_destination ).tqarg( m_destinationTimestamp ); if ( !m_destinationRevision.isEmpty() ) diff += tab + m_destinationRevision; diff += nl; @@ -393,10 +393,10 @@ bool DiffModel::setSelectedDifference( Difference* diff ) if ( diff != m_selectedDifference ) { - if ( ( m_differences.findIndex( diff ) ) == -1 ) + if ( ( m_differences.tqfindIndex( diff ) ) == -1 ) return false; // Dont set m_diffIndex if it cant be found - m_diffIndex = m_differences.findIndex( diff ); + m_diffIndex = m_differences.tqfindIndex( diff ); kdDebug( 8101 ) << "m_diffIndex = " << m_diffIndex << endl; m_selectedDifference = diff; } diff --git a/kompare/libdiff2/diffmodel.h b/kompare/libdiff2/diffmodel.h index 3b957b89..3467b55b 100644 --- a/kompare/libdiff2/diffmodel.h +++ b/kompare/libdiff2/diffmodel.h @@ -32,9 +32,10 @@ namespace Diff2 class DiffHunk; class Difference; -class DiffModel : public QObject +class DiffModel : public TQObject { Q_OBJECT + TQ_OBJECT public: DiffModel( const TQString& srcBaseURL, const TQString& destBaseURL ); @@ -60,7 +61,7 @@ public: DifferenceList* allDifferences(); - int findDifference( Difference* diff ) const { return m_differences.findIndex( diff ); } + int findDifference( Difference* diff ) const { return m_differences.tqfindIndex( diff ); } Difference* firstDifference(); Difference* lastDifference(); diff --git a/kompare/libdiff2/diffparser.cpp b/kompare/libdiff2/diffparser.cpp index d85256d2..b077ec20 100644 --- a/kompare/libdiff2/diffparser.cpp +++ b/kompare/libdiff2/diffparser.cpp @@ -49,27 +49,27 @@ enum Kompare::Format DiffParser::determineFormat() while( it != m_diffLines.end() ) { kdDebug(8101) << (*it) << endl; - if( (*it).find( normalRE, 0 ) == 0 ) + if( (*it).tqfind( normalRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Normal diff..." << endl; return Kompare::Normal; } - else if( (*it).find( unifiedRE, 0 ) == 0 ) + else if( (*it).tqfind( unifiedRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Unified diff..." << endl; return Kompare::Unified; } - else if( (*it).find( contextRE, 0 ) == 0 ) + else if( (*it).tqfind( contextRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Context diff..." << endl; return Kompare::Context; } - else if( (*it).find( rcsRE, 0 ) == 0 ) + else if( (*it).tqfind( rcsRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from an RCS diff..." << endl; return Kompare::RCS; } - else if( (*it).find( edRE, 0 ) == 0 ) + else if( (*it).tqfind( edRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from an ED diff..." << endl; return Kompare::Ed; diff --git a/kompare/libdiff2/kompare.h b/kompare/libdiff2/kompare.h index 8f6b7fe5..1c21db07 100644 --- a/kompare/libdiff2/kompare.h +++ b/kompare/libdiff2/kompare.h @@ -63,7 +63,7 @@ namespace Kompare UnknownDiffMode // Use to initialize the Info struct }; - enum Status { + enum tqStatus { RunningDiff, Parsing, FinishedParsing, @@ -135,7 +135,7 @@ public: relative += "../"; } - relative += TQString( to ).replace( 0, root.path(1).length(), "" ); + relative += TQString( to ).tqreplace( 0, root.path(1).length(), "" ); return relative; } diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp index db10f4c3..dc39c1bc 100644 --- a/kompare/libdiff2/komparemodellist.cpp +++ b/kompare/libdiff2/komparemodellist.cpp @@ -46,8 +46,8 @@ using namespace Diff2; -KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent, const char* name ) - : TQObject( parent, name ), +KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ), m_diffProcess( 0 ), m_diffSettings( diffSettings ), m_models( 0 ), @@ -58,34 +58,34 @@ KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare:: m_info( info ), m_textCodec( 0 ) { - m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", Qt::Key_Space, + m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", TQt::Key_Space, this, TQT_SLOT(slotActionApplyDifference()), - (( KomparePart* )parent)->actionCollection(), "difference_apply" ); - m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", Qt::Key_BackSpace, + (( KomparePart* )tqparent)->actionCollection(), "difference_apply" ); + m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", TQt::Key_BackSpace, this, TQT_SLOT(slotActionUnApplyDifference()), - (( KomparePart* )parent)->actionCollection(), "difference_unapply" ); - m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", Qt::CTRL + Qt::Key_A, + (( KomparePart* )tqparent)->actionCollection(), "difference_unapply" ); + m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", TQt::CTRL + TQt::Key_A, this, TQT_SLOT(slotActionApplyAllDifferences()), - (( KomparePart* )parent)->actionCollection(), "difference_applyall" ); - m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", Qt::CTRL + Qt::Key_U, + (( KomparePart* )tqparent)->actionCollection(), "difference_applyall" ); + m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", TQt::CTRL + TQt::Key_U, this, TQT_SLOT(slotActionUnapplyAllDifferences()), - (( KomparePart* )parent)->actionCollection(), "difference_unapplyall" ); - m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", Qt::CTRL + Qt::Key_PageUp, + (( KomparePart* )tqparent)->actionCollection(), "difference_unapplyall" ); + m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", TQt::CTRL + TQt::Key_PageUp, this, TQT_SLOT(slotPreviousModel()), - (( KomparePart* )parent)->actionCollection(), "difference_previousfile" ); - m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", Qt::CTRL + Qt::Key_PageDown, + (( KomparePart* )tqparent)->actionCollection(), "difference_previousfile" ); + m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", TQt::CTRL + TQt::Key_PageDown, this, TQT_SLOT(slotNextModel()), - (( KomparePart* )parent)->actionCollection(), "difference_nextfile" ); - m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", Qt::CTRL + Qt::Key_Up, + (( KomparePart* )tqparent)->actionCollection(), "difference_nextfile" ); + m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", TQt::CTRL + TQt::Key_Up, this, TQT_SLOT(slotPreviousDifference()), - (( KomparePart* )parent)->actionCollection(), "difference_previous" ); - m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", Qt::CTRL + Qt::Key_Down, + (( KomparePart* )tqparent)->actionCollection(), "difference_previous" ); + m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", TQt::CTRL + TQt::Key_Down, this, TQT_SLOT(slotNextDifference()), - (( KomparePart* )parent)->actionCollection(), "difference_next" ); + (( KomparePart* )tqparent)->actionCollection(), "difference_next" ); m_previousDifference->setEnabled( false ); m_nextDifference->setEnabled( false ); - m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() ); + m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)tqparent)->actionCollection() ); m_save->setEnabled( false ); updateModelListActions(); @@ -235,7 +235,7 @@ bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& di if ( parseDiffOutput( readFile( diff ) ) != 0 ) { - emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).arg( diff ) ); + emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).tqarg( diff ) ); return false; } @@ -243,7 +243,7 @@ bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& di if ( !blendOriginalIntoModelList( file ) ) { kdDebug(8101) << "Oops cant blend original file into modellist : " << file << endl; - emit( i18n( "<qt>There were problems applying the diff <b>%1</b> to the file <b>%2</b>.</qt>" ).arg( diff ).arg( file ) ); + emit( i18n( "<qt>There were problems applying the diff <b>%1</b> to the file <b>%2</b>.</qt>" ).tqarg( diff ).tqarg( file ) ); return false; } @@ -259,7 +259,7 @@ bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff if ( parseDiffOutput( readFile( diff ) ) != 0 ) { - emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).arg( diff ) ); + emit error( i18n( "<qt>No models or no differences, this file: <b>%1</b>, is not a valid diff file.</qt>" ).tqarg( diff ) ); return false; } @@ -268,7 +268,7 @@ bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff { // Trouble blending the original into the model kdDebug(8101) << "Oops cant blend original dir into modellist : " << dir << endl; - emit error( i18n( "<qt>There were problems applying the diff <b>%1</b> to the folder <b>%2</b>.</qt>" ).arg( diff ).arg( dir ) ); + emit error( i18n( "<qt>There were problems applying the diff <b>%1</b> to the folder <b>%2</b>.</qt>" ).tqarg( diff ).tqarg( dir ) ); return false; } @@ -347,7 +347,7 @@ bool KompareModelList::saveDestination( DiffModel* model ) temp->close(); if( temp->status() != 0 ) { - emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting it.</qt>" ).arg( temp->name() ) ); + emit error( i18n( "<qt>Could not write to the temporary file <b>%1</b>, deleting it.</qt>" ).tqarg( temp->name() ) ); temp->unlink(); delete temp; return false; @@ -361,26 +361,26 @@ bool KompareModelList::saveDestination( DiffModel* model ) kdDebug(8101) << "Tempfilename : " << temp->name() << endl; kdDebug(8101) << "DestinationURL : " << destination << endl; KIO::UDSEntry entry; - if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)parent() ) ) + if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)tqparent() ) ) { - if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)parent() ) ) + if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)tqparent() ) ) { 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 ), (TQWidget*)parent() ); + result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)tqparent() ); } else { kdDebug(8101) << "Tempfilename : " << temp->name() << endl; kdDebug(8101) << "DestinationURL : " << m_destination << endl; - result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)parent() ); + result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)tqparent() ); } if ( !result ) { - emit error( i18n( "<qt>Could not upload the temporary file to the destination location <b>%1</b>. The temporary file is still available under: <b>%2</b>. You can manually copy it to the right place.</qt>" ).arg( m_destination ).arg( temp->name() ) ); + emit error( i18n( "<qt>Could not upload the temporary file to the destination location <b>%1</b>. The temporary file is still available under: <b>%2</b>. You can manually copy it to the right place.</qt>" ).tqarg( m_destination ).tqarg( temp->name() ) ); } else { @@ -489,12 +489,12 @@ TQStringList KompareModelList::split( const TQString& fileContents ) int pos = 0; unsigned int oldpos = 0; // split that does not strip the split char -#ifdef QT_OS_MAC +#ifdef TQT_OS_MAC const char split = '\r'; #else const char split = '\n'; #endif - while ( ( pos = contents.find( split, oldpos ) ) >= 0 ) + while ( ( pos = contents.tqfind( split, oldpos ) ) >= 0 ) { list.append( contents.mid( oldpos, pos - oldpos + 1 ) ); oldpos = pos + 1; @@ -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 ), (TQWidget*)parent() ); + KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)tqparent() ); emit status( Kompare::FinishedWritingDiff ); } @@ -633,11 +633,11 @@ void KompareModelList::slotSelectionChanged( const Diff2::DiffModel* model, cons // This method will signal all the other objects about a change in selection, // it will emit setSelection( const DiffModel*, const Difference* ) to all who are connected kdDebug(8101) << "KompareModelList::slotSelectionChanged( " << model << ", " << diff << " )" << endl; - kdDebug(8101) << "Sender is : " << sender()->className() << endl; + kdDebug(8101) << "Sender is : " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl; // kdDebug(8101) << kdBacktrace() << endl; m_selectedModel = const_cast<DiffModel*>(model); - m_modelIndex = m_models->findIndex( m_selectedModel ); + m_modelIndex = m_models->tqfindIndex( m_selectedModel ); kdDebug( 8101 ) << "m_modelIndex = " << m_modelIndex << endl; m_selectedDifference = const_cast<Difference*>(diff); @@ -668,7 +668,7 @@ void KompareModelList::slotSelectionChanged( const Diff2::Difference* diff ) // This method will emit setSelection( const Difference* ) to whomever is listening // when for instance in kompareview the selection has changed kdDebug(8101) << "KompareModelList::slotSelectionChanged( " << diff << " )" << endl; - kdDebug(8101) << "Sender is : " << sender()->className() << endl; + kdDebug(8101) << "Sender is : " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl; m_selectedDifference = const_cast<Difference*>(diff); @@ -901,7 +901,7 @@ bool KompareModelList::blendOriginalIntoModelList( const TQString& localURL ) if ( fi.isDir() ) { // is a dir kdDebug() << "Blend Dir" << endl; -// TQDir dir( localURL, TQString::null, TQDir::Name|TQDir::DirsFirst, TQDir::All ); +// TQDir dir( localURL, TQString(), TQDir::Name|TQDir::DirsFirst, TQDir::All ); DiffModelListIterator modelIt = m_models->begin(); DiffModelListIterator mEnd = m_models->end(); for ( ; modelIt != mEnd; ++modelIt ) @@ -1086,7 +1086,7 @@ bool KompareModelList::blendFile( DiffModel* model, const TQString& fileContents case Difference::Change: kdDebug(8101) << "Change" << endl; - //QStringListConstIterator saveIt = linesIt; + //TQStringListConstIterator saveIt = linesIt; for ( int i = 0; i < diff->sourceLineCount(); i++ ) { @@ -1255,10 +1255,10 @@ bool KompareModelList::setSelectedModel( DiffModel* model ) if ( model != m_selectedModel ) { - if ( m_models->findIndex( model ) == -1 ) + if ( m_models->tqfindIndex( model ) == -1 ) return false; kdDebug(8101) << "m_selectedModel (was) = " << m_selectedModel << endl; - m_modelIndex = m_models->findIndex( model ); + m_modelIndex = m_models->tqfindIndex( model ); kdDebug(8101) << "m_selectedModel (is) = " << m_selectedModel << endl; m_selectedModel = model; } @@ -1272,7 +1272,7 @@ void KompareModelList::updateModelListActions() { if ( m_models && m_selectedModel && m_selectedDifference ) { - if ( ( ( KomparePart* )parent() )->isReadWrite() ) + if ( ( ( KomparePart* )tqparent() )->isReadWrite() ) { if ( m_selectedModel->appliedCount() != m_selectedModel->differenceCount() ) m_applyAll->setEnabled( true ); diff --git a/kompare/libdiff2/komparemodellist.h b/kompare/libdiff2/komparemodellist.h index afeb770f..3b7b6bff 100644 --- a/kompare/libdiff2/komparemodellist.h +++ b/kompare/libdiff2/komparemodellist.h @@ -38,11 +38,12 @@ class KompareProcess; namespace Diff2 { -class KompareModelList : public QObject +class KompareModelList : public TQObject { Q_OBJECT + TQ_OBJECT public: - KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent = 0, const char* name = 0 ); + KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* tqparent = 0, const char* name = 0 ); ~KompareModelList(); public: @@ -87,11 +88,11 @@ public: int appliedCount() const; const DiffModel* modelAt( int i ) const { return *( m_models->at( i ) ); }; - int findModel( DiffModel* model ) const { return m_models->findIndex( model ); }; + int findModel( DiffModel* model ) const { return m_models->tqfindIndex( model ); }; bool isModified() const; - int currentModel() const { return m_models->findIndex( m_selectedModel ); }; + int currentModel() const { return m_models->tqfindIndex( m_selectedModel ); }; int currentDifference() const { return m_selectedModel ? m_selectedModel->findDifference( m_selectedDifference ) : -1; }; const DiffModel* selectedModel() const { return m_selectedModel; }; @@ -113,7 +114,7 @@ protected: bool blendFile( DiffModel* model, const TQString& lines ); signals: - void status( Kompare::Status status ); + void status( Kompare::tqStatus status ); void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount ); void error( TQString error ); void modelsChanged( const Diff2::DiffModelList* models ); diff --git a/kompare/libdiff2/kompareprocess.h b/kompare/libdiff2/kompareprocess.h index 079e24cf..aea920c2 100644 --- a/kompare/libdiff2/kompareprocess.h +++ b/kompare/libdiff2/kompareprocess.h @@ -31,9 +31,10 @@ class DiffSettings; class KompareProcess : public KProcess, public KompareFunctions { Q_OBJECT + TQ_OBJECT public: - KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString::null ); + KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString() ); ~KompareProcess(); bool start(); diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp index 7e4ddbbe..c031ee61 100644 --- a/kompare/libdiff2/levenshteintable.cpp +++ b/kompare/libdiff2/levenshteintable.cpp @@ -113,8 +113,8 @@ unsigned int LevenshteinTable::createTable( DifferenceString* source, Difference unsigned int m = s.length(); unsigned int n = d.length(); - const TQChar* sq = s.unicode(); - const TQChar* dq = d.unicode(); + const TQChar* sq = s.tqunicode(); + const TQChar* dq = d.tqunicode(); if ( m == 1 ) return --n; diff --git a/kompare/libdiff2/parser.cpp b/kompare/libdiff2/parser.cpp index 1e3efc8a..67386508 100644 --- a/kompare/libdiff2/parser.cpp +++ b/kompare/libdiff2/parser.cpp @@ -50,7 +50,7 @@ int Parser::cleanUpCrap( TQStringList& diffLines ) // correcting the advance of the iterator because of the remove --it; TQString temp( *it ); - temp.truncate( temp.find( '\n' ) ); + temp.truncate( temp.tqfind( '\n' ) ); *it = temp; ++nol; } diff --git a/kompare/libdiff2/parserbase.cpp b/kompare/libdiff2/parserbase.cpp index ca19d232..8a503019 100644 --- a/kompare/libdiff2/parserbase.cpp +++ b/kompare/libdiff2/parserbase.cpp @@ -456,7 +456,7 @@ bool ParserBase::parseNormalHunkBody() { // kdDebug(8101) << "ParserBase::parseNormalHunkBody" << endl; - TQString type = TQString::null; + TQString type = TQString(); int linenoA = 0, linenoB = 0; diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp index 0e0a2aef..59a2dae2 100644 --- a/kompare/libdiff2/perforceparser.cpp +++ b/kompare/libdiff2/perforceparser.cpp @@ -53,22 +53,22 @@ enum Kompare::Format PerforceParser::determineFormat() while( it != m_diffLines.end() ) { - if( (*it).find( unifiedRE, 0 ) == 0 ) + if( (*it).tqfind( unifiedRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Unified diff..." << endl; return Kompare::Unified; } - else if( (*it).find( contextRE, 0 ) == 0 ) + else if( (*it).tqfind( contextRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Context diff..." << endl; return Kompare::Context; } - else if( (*it).find( normalRE, 0 ) == 0 ) + else if( (*it).tqfind( normalRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a Normal diff..." << endl; return Kompare::Normal; } - else if( (*it).find( rcsRE, 0 ) == 0 ) + else if( (*it).tqfind( rcsRE, 0 ) == 0 ) { kdDebug(8101) << "Difflines are from a RCS diff..." << endl; return Kompare::RCS; @@ -103,8 +103,8 @@ bool PerforceParser::parseContextDiffHeader() destinationFileRE.exactMatch( m_contextDiffHeader1.cap( 2 ) ); kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl; kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl; - kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; - kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl; kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl; m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) ); @@ -117,7 +117,7 @@ bool PerforceParser::parseContextDiffHeader() else { kdDebug(8101) << "Matched length = " << m_contextDiffHeader1.matchedLength() << endl; - kdDebug(8101) << "Captured texts = " << m_contextDiffHeader1.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << m_contextDiffHeader1.tqcapturedTexts() << endl; } } @@ -149,8 +149,8 @@ bool PerforceParser::parseNormalDiffHeader() destinationFileRE.exactMatch( m_normalDiffHeader.cap( 2 ) ); kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl; kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl; - kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; - kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl; kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl; m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) ); @@ -163,7 +163,7 @@ bool PerforceParser::parseNormalDiffHeader() else { kdDebug(8101) << "Matched length = " << m_normalDiffHeader.matchedLength() << endl; - kdDebug(8101) << "Captured texts = " << m_normalDiffHeader.capturedTexts() << endl; + kdDebug(8101) << "Captured texts = " << m_normalDiffHeader.tqcapturedTexts() << endl; } } @@ -200,8 +200,8 @@ bool PerforceParser::parseUnifiedDiffHeader() destinationFileRE.exactMatch( m_unifiedDiffHeader1.cap( 2 ) ); // kdDebug(8101) << "Matched length = " << sourceFileRE.matchedLength() << endl; // kdDebug(8101) << "Matched length = " << destinationFileRE.matchedLength() << endl; -// kdDebug(8101) << "Captured texts = " << sourceFileRE.capturedTexts() << endl; -// kdDebug(8101) << "Captured texts = " << destinationFileRE.capturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << sourceFileRE.tqcapturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << destinationFileRE.tqcapturedTexts() << endl; // kdDebug(8101) << "Source File : " << sourceFileRE.cap( 1 ) << endl; // kdDebug(8101) << "Destination File : " << destinationFileRE.cap( 1 ) << endl; m_currentModel->setSourceFile ( sourceFileRE.cap( 1 ) ); @@ -214,7 +214,7 @@ bool PerforceParser::parseUnifiedDiffHeader() else { // kdDebug(8101) << "Matched length = " << m_unifiedDiffHeader1.matchedLength() << endl; -// kdDebug(8101) << "Captured texts = " << m_unifiedDiffHeader1.capturedTexts() << endl; +// kdDebug(8101) << "Captured texts = " << m_unifiedDiffHeader1.tqcapturedTexts() << endl; } } diff --git a/kompare/main.cpp b/kompare/main.cpp index 4e776e9d..86e1c5ef 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" ), 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. " ) ); + KGuiItem compareGuiItem( i18n( "Compare" ), TQString(), 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" ); diff --git a/kompare/tests/cvsdiff/context.diff b/kompare/tests/cvsdiff/context.diff index c9a7f855..eab790d0 100644 --- a/kompare/tests/cvsdiff/context.diff +++ b/kompare/tests/cvsdiff/context.diff @@ -12,16 +12,16 @@ diff -c -r1.2 dcopfind.cpp ! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); --- 36,42 ---- static bool bAppIdOnly = 0; static bool bLaunchApp = 0; ! bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); *************** *** 118,124 **** f = fc; diff --git a/kompare/tests/cvsdiff/contextm.diff b/kompare/tests/cvsdiff/contextm.diff index ef20ec4c..cde99b5e 100644 --- a/kompare/tests/cvsdiff/contextm.diff +++ b/kompare/tests/cvsdiff/contextm.diff @@ -82,18 +82,18 @@ diff -c -r1.26 dcop.cpp ! void callFunction( const char* app, const char* obj, const char* func, int argc, char** args ) { - - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); --- 146,153 ---- } } ! void callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); *************** *** 136,142 **** bool ok = false; @@ -116,7 +116,7 @@ diff -c -r1.26 dcop.cpp if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -! int a = (*it).contains(','); +! int a = (*it).tqcontains(','); ! if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) break; } @@ -127,12 +127,12 @@ diff -c -r1.26 dcop.cpp ! exit(1); } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); --- 180,195 ---- if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -! uint a = (*it).contains(','); +! uint a = (*it).tqcontains(','); ! if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) break; } @@ -144,7 +144,7 @@ diff -c -r1.26 dcop.cpp ! return; } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); *************** *** 243,253 **** QCString replyType; @@ -363,13 +363,13 @@ diff -c -r1.26 dcop.cpp QCString function; ! QCStringList params; ! DCOPClient *client = 0L; -! if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) +! if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) { ! // WARNING: This part (until the closing '}') could very ! // well be broken now. As I don't know how to trigger and test ! // dcoprefs this code is *not* tested. It compiles and it looks ! // ok to me, but that's all I can say - Martijn (2001/12/24) -! int delimPos = args[ 0 ].findRev( ',' ); +! int delimPos = args[ 0 ].tqfindRev( ',' ); ! if( delimPos == -1 ) ! { ! cerr << "Error: '" << args[ 0 ] @@ -747,16 +747,16 @@ diff -c -r1.2 dcopfind.cpp ! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); --- 36,42 ---- static bool bAppIdOnly = 0; static bool bLaunchApp = 0; ! bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); *************** *** 118,124 **** f = fc; @@ -830,7 +830,7 @@ diff -c -r1.3 marshall.cpp ! void marshall(QDataStream &arg, int argc, char **argv, int &i, QString type) { -! if (type == "QStringList") +! if (type == TQSTRINGLIST_OBJECT_NAME_STRING) ! type = "QValueList<QString>"; ! if (type == "QCStringList") ! type = "QValueList<QCString>"; @@ -863,13 +863,13 @@ diff -c -r1.3 marshall.cpp ! arg << s.toDouble(); ! else if ( type == "bool" ) ! arg << mkBool( s ); -! else if ( type == "QString" ) +! else if ( type == TQSTRING_OBJECT_NAME_STRING ) ! arg << s; ! else if ( type == "QCString" ) ! arg << QCString( argv[i] ); ! else if ( type == "QColor" ) ! arg << mkColor( s ); -! else if ( type == "QPoint" ) +! else if ( type == TQPOINT_OBJECT_NAME_STRING ) ! arg << mkPoint( s ); ! else if ( type == "QSize" ) ! arg << mkSize( s ); @@ -939,7 +939,7 @@ diff -c -r1.3 marshall.cpp ! void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) { -! if (type == "QStringList") +! if (type == TQSTRINGLIST_OBJECT_NAME_STRING) ! type = "QValueList<QString>"; ! if (type == "QCStringList") ! type = "QValueList<QCString>"; @@ -972,13 +972,13 @@ diff -c -r1.3 marshall.cpp ! arg << s.toDouble(); ! else if ( type == "bool" ) ! arg << mkBool( s ); -! else if ( type == "QString" ) +! else if ( type == TQSTRING_OBJECT_NAME_STRING ) ! arg << s; ! else if ( type == "QCString" ) ! arg << QCString( args[ i ] ); ! else if ( type == "QColor" ) ! arg << mkColor( s ); -! else if ( type == "QPoint" ) +! else if ( type == TQPOINT_OBJECT_NAME_STRING ) ! arg << mkPoint( s ); ! else if ( type == "QSize" ) ! arg << mkSize( s ); diff --git a/kompare/tests/cvsdiff/edm.diff b/kompare/tests/cvsdiff/edm.diff index 0fb04575..a5672a1c 100644 --- a/kompare/tests/cvsdiff/edm.diff +++ b/kompare/tests/cvsdiff/edm.diff @@ -352,7 +352,7 @@ int main( int argc, char** argv ) // well be broken now. As I don't know how to trigger and test // dcoprefs this code is *not* tested. It compiles and it looks // ok to me, but that's all I can say - Martijn (2001/12/24) - int delimPos = args[ 0 ].findRev( ',' ); + int delimPos = args[ 0 ].tqfindRev( ',' ); if( delimPos == -1 ) { cerr << "Error: '" << args[ 0 ] @@ -376,7 +376,7 @@ int main( int argc, char** argv ) 286,287c QCStringList params; DCOPClient *client = 0L; - if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) . 282a /** @@ -498,7 +498,7 @@ void showHelp( int exitCode = 0 ) return; . 156,157c - uint a = (*it).contains(','); + uint a = (*it).tqcontains(','); if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) . 139c @@ -639,13 +639,13 @@ diff -e -r1.3 marshall.cpp arg << s.toDouble(); else if ( type == "bool" ) arg << mkBool( s ); - else if ( type == "QString" ) + else if ( type == TQSTRING_OBJECT_NAME_STRING ) arg << s; else if ( type == "QCString" ) arg << QCString( args[ i ] ); else if ( type == "QColor" ) arg << mkColor( s ); - else if ( type == "QPoint" ) + else if ( type == TQPOINT_OBJECT_NAME_STRING ) arg << mkPoint( s ); else if ( type == "QSize" ) arg << mkSize( s ); @@ -676,7 +676,7 @@ diff -e -r1.3 marshall.cpp delim = ")"; . 247,317c - if (type == "QStringList") + if (type == TQSTRINGLIST_OBJECT_NAME_STRING) type = "QValueList<QString>"; if (type == "QCStringList") type = "QValueList<QCString>"; diff --git a/kompare/tests/cvsdiff/normalm.diff b/kompare/tests/cvsdiff/normalm.diff index 935763a0..b191cb2c 100644 --- a/kompare/tests/cvsdiff/normalm.diff +++ b/kompare/tests/cvsdiff/normalm.diff @@ -60,10 +60,10 @@ diff -r1.26 dcop.cpp --- > if ( !ok && args.isEmpty() ) 156,157c183,184 -< int a = (*it).contains(','); +< int a = (*it).tqcontains(','); < if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) --- -> uint a = (*it).contains(','); +> uint a = (*it).tqcontains(','); > if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) 164c191,192 < exit(1); @@ -201,7 +201,7 @@ diff -r1.26 dcop.cpp --- > QCStringList params; > DCOPClient *client = 0L; -> if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) +> if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) 289,304c406,429 < char *delim = strchr(argv[1], ','); < if (!delim) @@ -224,7 +224,7 @@ diff -r1.26 dcop.cpp > // well be broken now. As I don't know how to trigger and test > // dcoprefs this code is *not* tested. It compiles and it looks > // ok to me, but that's all I can say - Martijn (2001/12/24) -> int delimPos = args[ 0 ].findRev( ',' ); +> int delimPos = args[ 0 ].tqfindRev( ',' ); > if( delimPos == -1 ) > { > cerr << "Error: '" << args[ 0 ] @@ -655,7 +655,7 @@ diff -r1.3 marshall.cpp --- > void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) 247,317c247,256 -< if (type == "QStringList") +< if (type == TQSTRINGLIST_OBJECT_NAME_STRING) < type = "QValueList<QString>"; < if (type == "QCStringList") < type = "QValueList<QCString>"; @@ -688,13 +688,13 @@ diff -r1.3 marshall.cpp < arg << s.toDouble(); < else if ( type == "bool" ) < arg << mkBool( s ); -< else if ( type == "QString" ) +< else if ( type == TQSTRING_OBJECT_NAME_STRING ) < arg << s; < else if ( type == "QCString" ) < arg << QCString( argv[i] ); < else if ( type == "QColor" ) < arg << mkColor( s ); -< else if ( type == "QPoint" ) +< else if ( type == TQPOINT_OBJECT_NAME_STRING ) < arg << mkPoint( s ); < else if ( type == "QSize" ) < arg << mkSize( s ); @@ -727,7 +727,7 @@ diff -r1.3 marshall.cpp < QByteArray dummy_data; < QDataStream dummy_arg(dummy_data, IO_WriteOnly); --- -> if (type == "QStringList") +> if (type == TQSTRINGLIST_OBJECT_NAME_STRING) > type = "QValueList<QString>"; > if (type == "QCStringList") > type = "QValueList<QCString>"; @@ -789,13 +789,13 @@ diff -r1.3 marshall.cpp > arg << s.toDouble(); > else if ( type == "bool" ) > arg << mkBool( s ); -> else if ( type == "QString" ) +> else if ( type == TQSTRING_OBJECT_NAME_STRING ) > arg << s; > else if ( type == "QCString" ) > arg << QCString( args[ i ] ); > else if ( type == "QColor" ) > arg << mkColor( s ); -> else if ( type == "QPoint" ) +> else if ( type == TQPOINT_OBJECT_NAME_STRING ) > arg << mkPoint( s ); > else if ( type == "QSize" ) > arg << mkSize( s ); diff --git a/kompare/tests/cvsdiff/rcsm.diff b/kompare/tests/cvsdiff/rcsm.diff index c690b2a7..a67d7e54 100644 --- a/kompare/tests/cvsdiff/rcsm.diff +++ b/kompare/tests/cvsdiff/rcsm.diff @@ -53,7 +53,7 @@ a139 1 if ( !ok && args.isEmpty() ) d156 2 a157 2 - uint a = (*it).contains(','); + uint a = (*it).tqcontains(','); if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) d164 1 a164 2 @@ -175,14 +175,14 @@ d286 2 a287 3 QCStringList params; DCOPClient *client = 0L; - if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) d289 16 a304 24 // WARNING: This part (until the closing '}') could very // well be broken now. As I don't know how to trigger and test // dcoprefs this code is *not* tested. It compiles and it looks // ok to me, but that's all I can say - Martijn (2001/12/24) - int delimPos = args[ 0 ].findRev( ',' ); + int delimPos = args[ 0 ].tqfindRev( ',' ); if( delimPos == -1 ) { cerr << "Error: '" << args[ 0 ] @@ -577,7 +577,7 @@ a245 1 void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) d247 71 a317 10 - if (type == "QStringList") + if (type == TQSTRINGLIST_OBJECT_NAME_STRING) type = "QValueList<QString>"; if (type == "QCStringList") type = "QValueList<QCString>"; @@ -611,13 +611,13 @@ a346 57 arg << s.toDouble(); else if ( type == "bool" ) arg << mkBool( s ); - else if ( type == "QString" ) + else if ( type == TQSTRING_OBJECT_NAME_STRING ) arg << s; else if ( type == "QCString" ) arg << QCString( args[ i ] ); else if ( type == "QColor" ) arg << mkColor( s ); - else if ( type == "QPoint" ) + else if ( type == TQPOINT_OBJECT_NAME_STRING ) arg << mkPoint( s ); else if ( type == "QSize" ) arg << mkSize( s ); diff --git a/kompare/tests/cvsdiff/unified.diff b/kompare/tests/cvsdiff/unified.diff index 562dee43..ab69a295 100644 --- a/kompare/tests/cvsdiff/unified.diff +++ b/kompare/tests/cvsdiff/unified.diff @@ -12,8 +12,8 @@ diff -u -r1.2 dcopfind.cpp -bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) +bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); @@ -118,7 +118,7 @@ f = fc; } diff --git a/kompare/tests/cvsdiff/unifiedm.diff b/kompare/tests/cvsdiff/unifiedm.diff index 1de79f8f..b4e8b2a1 100644 --- a/kompare/tests/cvsdiff/unifiedm.diff +++ b/kompare/tests/cvsdiff/unifiedm.diff @@ -66,9 +66,9 @@ diff -u -r1.26 dcop.cpp +void callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { - - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); @@ -136,7 +163,7 @@ bool ok = false; QCStringList funcs = dcop->remoteFunctions( app, obj, &ok ); @@ -82,9 +82,9 @@ diff -u -r1.26 dcop.cpp if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -- int a = (*it).contains(','); +- int a = (*it).tqcontains(','); - if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) -+ uint a = (*it).contains(','); ++ uint a = (*it).tqcontains(','); + if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) break; } @@ -97,7 +97,7 @@ diff -u -r1.26 dcop.cpp + return; } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); @@ -243,11 +271,12 @@ QCString replyType; QDataStream arg(data, IO_WriteOnly); @@ -237,7 +237,7 @@ diff -u -r1.26 dcop.cpp - if ((argc > 1) && (strncmp(argv[1], "DCOPRef(", 8)) == 0) + QCStringList params; + DCOPClient *client = 0L; -+ if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) ++ if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) { - char *delim = strchr(argv[1], ','); - if (!delim) @@ -259,7 +259,7 @@ diff -u -r1.26 dcop.cpp + // well be broken now. As I don't know how to trigger and test + // dcoprefs this code is *not* tested. It compiles and it looks + // ok to me, but that's all I can say - Martijn (2001/12/24) -+ int delimPos = args[ 0 ].findRev( ',' ); ++ int delimPos = args[ 0 ].tqfindRev( ',' ); + if( delimPos == -1 ) + { + cerr << "Error: '" << args[ 0 ] @@ -668,8 +668,8 @@ diff -u -r1.2 dcopfind.cpp -bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) +bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); @@ -118,7 +118,7 @@ f = fc; } @@ -718,7 +718,7 @@ diff -u -r1.3 marshall.cpp -void marshall(QDataStream &arg, int argc, char **argv, int &i, QString type) +void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) { -- if (type == "QStringList") +- if (type == TQSTRINGLIST_OBJECT_NAME_STRING) - type = "QValueList<QString>"; - if (type == "QCStringList") - type = "QValueList<QCString>"; @@ -751,13 +751,13 @@ diff -u -r1.3 marshall.cpp - arg << s.toDouble(); - else if ( type == "bool" ) - arg << mkBool( s ); -- else if ( type == "QString" ) +- else if ( type == TQSTRING_OBJECT_NAME_STRING ) - arg << s; - else if ( type == "QCString" ) - arg << QCString( argv[i] ); - else if ( type == "QColor" ) - arg << mkColor( s ); -- else if ( type == "QPoint" ) +- else if ( type == TQPOINT_OBJECT_NAME_STRING ) - arg << mkPoint( s ); - else if ( type == "QSize" ) - arg << mkSize( s ); @@ -789,7 +789,7 @@ diff -u -r1.3 marshall.cpp - i++; - QByteArray dummy_data; - QDataStream dummy_arg(dummy_data, IO_WriteOnly); -+ if (type == "QStringList") ++ if (type == TQSTRINGLIST_OBJECT_NAME_STRING) + type = "QValueList<QString>"; + if (type == "QCStringList") + type = "QValueList<QCString>"; @@ -850,13 +850,13 @@ diff -u -r1.3 marshall.cpp + arg << s.toDouble(); + else if ( type == "bool" ) + arg << mkBool( s ); -+ else if ( type == "QString" ) ++ else if ( type == TQSTRING_OBJECT_NAME_STRING ) + arg << s; + else if ( type == "QCString" ) + arg << QCString( args[ i ] ); + else if ( type == "QColor" ) + arg << mkColor( s ); -+ else if ( type == "QPoint" ) ++ else if ( type == TQPOINT_OBJECT_NAME_STRING ) + arg << mkPoint( s ); + else if ( type == "QSize" ) + arg << mkSize( s ); diff --git a/kompare/tests/diff/contextm.diff b/kompare/tests/diff/contextm.diff index 0b1bba5a..1833fa06 100644 --- a/kompare/tests/diff/contextm.diff +++ b/kompare/tests/diff/contextm.diff @@ -78,18 +78,18 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp ! void callFunction( const char* app, const char* obj, const char* func, int argc, char** args ) { - - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); --- 146,153 ---- } } ! void callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); *************** *** 136,142 **** bool ok = false; @@ -112,7 +112,7 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -! int a = (*it).contains(','); +! int a = (*it).tqcontains(','); ! if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) break; } @@ -123,12 +123,12 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp ! exit(1); } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); --- 180,195 ---- if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -! uint a = (*it).contains(','); +! uint a = (*it).tqcontains(','); ! if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) break; } @@ -140,7 +140,7 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp ! return; } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); *************** *** 243,253 **** QCString replyType; @@ -357,13 +357,13 @@ diff -cr dcop/client/dcop.cpp dcop2/client/dcop.cpp QCString function; ! QCStringList params; ! DCOPClient *client = 0L; -! if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) +! if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) { ! // WARNING: This part (until the closing '}') could very ! // well be broken now. As I don't know how to trigger and test ! // dcoprefs this code is *not* tested. It compiles and it looks ! // ok to me, but that's all I can say - Martijn (2001/12/24) -! int delimPos = args[ 0 ].findRev( ',' ); +! int delimPos = args[ 0 ].tqfindRev( ',' ); ! if( delimPos == -1 ) ! { ! cerr << "Error: '" << args[ 0 ] @@ -737,16 +737,16 @@ diff -cr dcop/client/dcopfind.cpp dcop2/client/dcopfind.cpp ! bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); --- 36,42 ---- static bool bAppIdOnly = 0; static bool bLaunchApp = 0; ! bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); *************** *** 118,124 **** f = fc; @@ -816,7 +816,7 @@ diff -cr dcop/client/marshall.cpp dcop2/client/marshall.cpp ! void marshall(QDataStream &arg, int argc, char **argv, int &i, QString type) { -! if (type == "QStringList") +! if (type == TQSTRINGLIST_OBJECT_NAME_STRING) ! type = "QValueList<QString>"; ! if (type == "QCStringList") ! type = "QValueList<QCString>"; @@ -849,13 +849,13 @@ diff -cr dcop/client/marshall.cpp dcop2/client/marshall.cpp ! arg << s.toDouble(); ! else if ( type == "bool" ) ! arg << mkBool( s ); -! else if ( type == "QString" ) +! else if ( type == TQSTRING_OBJECT_NAME_STRING ) ! arg << s; ! else if ( type == "QCString" ) ! arg << QCString( argv[i] ); ! else if ( type == "QColor" ) ! arg << mkColor( s ); -! else if ( type == "QPoint" ) +! else if ( type == TQPOINT_OBJECT_NAME_STRING ) ! arg << mkPoint( s ); ! else if ( type == "QSize" ) ! arg << mkSize( s ); @@ -925,7 +925,7 @@ diff -cr dcop/client/marshall.cpp dcop2/client/marshall.cpp ! void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) { -! if (type == "QStringList") +! if (type == TQSTRINGLIST_OBJECT_NAME_STRING) ! type = "QValueList<QString>"; ! if (type == "QCStringList") ! type = "QValueList<QCString>"; @@ -958,13 +958,13 @@ diff -cr dcop/client/marshall.cpp dcop2/client/marshall.cpp ! arg << s.toDouble(); ! else if ( type == "bool" ) ! arg << mkBool( s ); -! else if ( type == "QString" ) +! else if ( type == TQSTRING_OBJECT_NAME_STRING ) ! arg << s; ! else if ( type == "QCString" ) ! arg << QCString( args[ i ] ); ! else if ( type == "QColor" ) ! arg << mkColor( s ); -! else if ( type == "QPoint" ) +! else if ( type == TQPOINT_OBJECT_NAME_STRING ) ! arg << mkPoint( s ); ! else if ( type == "QSize" ) ! arg << mkSize( s ); diff --git a/kompare/tests/diff/edm.diff b/kompare/tests/diff/edm.diff index 0df2abc1..e2ad0672 100644 --- a/kompare/tests/diff/edm.diff +++ b/kompare/tests/diff/edm.diff @@ -348,7 +348,7 @@ int main( int argc, char** argv ) // well be broken now. As I don't know how to trigger and test // dcoprefs this code is *not* tested. It compiles and it looks // ok to me, but that's all I can say - Martijn (2001/12/24) - int delimPos = args[ 0 ].findRev( ',' ); + int delimPos = args[ 0 ].tqfindRev( ',' ); if( delimPos == -1 ) { cerr << "Error: '" << args[ 0 ] @@ -372,7 +372,7 @@ int main( int argc, char** argv ) 286,287c QCStringList params; DCOPClient *client = 0L; - if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) . 282a /** @@ -494,7 +494,7 @@ void showHelp( int exitCode = 0 ) return; . 156,157c - uint a = (*it).contains(','); + uint a = (*it).tqcontains(','); if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) . 139c @@ -627,13 +627,13 @@ diff -er dcop/client/marshall.cpp dcop2/client/marshall.cpp arg << s.toDouble(); else if ( type == "bool" ) arg << mkBool( s ); - else if ( type == "QString" ) + else if ( type == TQSTRING_OBJECT_NAME_STRING ) arg << s; else if ( type == "QCString" ) arg << QCString( args[ i ] ); else if ( type == "QColor" ) arg << mkColor( s ); - else if ( type == "QPoint" ) + else if ( type == TQPOINT_OBJECT_NAME_STRING ) arg << mkPoint( s ); else if ( type == "QSize" ) arg << mkSize( s ); @@ -664,7 +664,7 @@ diff -er dcop/client/marshall.cpp dcop2/client/marshall.cpp delim = ")"; . 247,317c - if (type == "QStringList") + if (type == TQSTRINGLIST_OBJECT_NAME_STRING) type = "QValueList<QString>"; if (type == "QCStringList") type = "QValueList<QCString>"; diff --git a/kompare/tests/diff/normalm.diff b/kompare/tests/diff/normalm.diff index 3db667ba..c08da23b 100644 --- a/kompare/tests/diff/normalm.diff +++ b/kompare/tests/diff/normalm.diff @@ -56,10 +56,10 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp --- > if ( !ok && args.isEmpty() ) 156,157c183,184 -< int a = (*it).contains(','); +< int a = (*it).tqcontains(','); < if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) --- -> uint a = (*it).contains(','); +> uint a = (*it).tqcontains(','); > if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) 164c191,192 < exit(1); @@ -197,7 +197,7 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp --- > QCStringList params; > DCOPClient *client = 0L; -> if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) +> if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) 289,304c406,429 < char *delim = strchr(argv[1], ','); < if (!delim) @@ -220,7 +220,7 @@ diff -r dcop/client/dcop.cpp dcop2/client/dcop.cpp > // well be broken now. As I don't know how to trigger and test > // dcoprefs this code is *not* tested. It compiles and it looks > // ok to me, but that's all I can say - Martijn (2001/12/24) -> int delimPos = args[ 0 ].findRev( ',' ); +> int delimPos = args[ 0 ].tqfindRev( ',' ); > if( delimPos == -1 ) > { > cerr << "Error: '" << args[ 0 ] @@ -643,7 +643,7 @@ diff -r dcop/client/marshall.cpp dcop2/client/marshall.cpp --- > void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) 247,317c247,256 -< if (type == "QStringList") +< if (type == TQSTRINGLIST_OBJECT_NAME_STRING) < type = "QValueList<QString>"; < if (type == "QCStringList") < type = "QValueList<QCString>"; @@ -676,13 +676,13 @@ diff -r dcop/client/marshall.cpp dcop2/client/marshall.cpp < arg << s.toDouble(); < else if ( type == "bool" ) < arg << mkBool( s ); -< else if ( type == "QString" ) +< else if ( type == TQSTRING_OBJECT_NAME_STRING ) < arg << s; < else if ( type == "QCString" ) < arg << QCString( argv[i] ); < else if ( type == "QColor" ) < arg << mkColor( s ); -< else if ( type == "QPoint" ) +< else if ( type == TQPOINT_OBJECT_NAME_STRING ) < arg << mkPoint( s ); < else if ( type == "QSize" ) < arg << mkSize( s ); @@ -715,7 +715,7 @@ diff -r dcop/client/marshall.cpp dcop2/client/marshall.cpp < QByteArray dummy_data; < QDataStream dummy_arg(dummy_data, IO_WriteOnly); --- -> if (type == "QStringList") +> if (type == TQSTRINGLIST_OBJECT_NAME_STRING) > type = "QValueList<QString>"; > if (type == "QCStringList") > type = "QValueList<QCString>"; @@ -777,13 +777,13 @@ diff -r dcop/client/marshall.cpp dcop2/client/marshall.cpp > arg << s.toDouble(); > else if ( type == "bool" ) > arg << mkBool( s ); -> else if ( type == "QString" ) +> else if ( type == TQSTRING_OBJECT_NAME_STRING ) > arg << s; > else if ( type == "QCString" ) > arg << QCString( args[ i ] ); > else if ( type == "QColor" ) > arg << mkColor( s ); -> else if ( type == "QPoint" ) +> else if ( type == TQPOINT_OBJECT_NAME_STRING ) > arg << mkPoint( s ); > else if ( type == "QSize" ) > arg << mkSize( s ); diff --git a/kompare/tests/diff/rcsm.diff b/kompare/tests/diff/rcsm.diff index 0c4222f9..9df85d76 100644 --- a/kompare/tests/diff/rcsm.diff +++ b/kompare/tests/diff/rcsm.diff @@ -49,7 +49,7 @@ a139 1 if ( !ok && args.isEmpty() ) d156 2 a157 2 - uint a = (*it).contains(','); + uint a = (*it).tqcontains(','); if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) d164 1 a164 2 @@ -171,14 +171,14 @@ d286 2 a287 3 QCStringList params; DCOPClient *client = 0L; - if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) d289 16 a304 24 // WARNING: This part (until the closing '}') could very // well be broken now. As I don't know how to trigger and test // dcoprefs this code is *not* tested. It compiles and it looks // ok to me, but that's all I can say - Martijn (2001/12/24) - int delimPos = args[ 0 ].findRev( ',' ); + int delimPos = args[ 0 ].tqfindRev( ',' ); if( delimPos == -1 ) { cerr << "Error: '" << args[ 0 ] @@ -565,7 +565,7 @@ a245 1 void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) d247 71 a317 10 - if (type == "QStringList") + if (type == TQSTRINGLIST_OBJECT_NAME_STRING) type = "QValueList<QString>"; if (type == "QCStringList") type = "QValueList<QCString>"; @@ -599,13 +599,13 @@ a346 57 arg << s.toDouble(); else if ( type == "bool" ) arg << mkBool( s ); - else if ( type == "QString" ) + else if ( type == TQSTRING_OBJECT_NAME_STRING ) arg << s; else if ( type == "QCString" ) arg << QCString( args[ i ] ); else if ( type == "QColor" ) arg << mkColor( s ); - else if ( type == "QPoint" ) + else if ( type == TQPOINT_OBJECT_NAME_STRING ) arg << mkPoint( s ); else if ( type == "QSize" ) arg << mkSize( s ); diff --git a/kompare/tests/diff/unifiedm.diff b/kompare/tests/diff/unifiedm.diff index 4a30c6b4..e4fbd157 100644 --- a/kompare/tests/diff/unifiedm.diff +++ b/kompare/tests/diff/unifiedm.diff @@ -62,9 +62,9 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp +void callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { - - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); @@ -136,7 +163,7 @@ bool ok = false; QCStringList funcs = dcop->remoteFunctions( app, obj, &ok ); @@ -78,9 +78,9 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); -- int a = (*it).contains(','); +- int a = (*it).tqcontains(','); - if ( ( a == 0 && argc == 0) || ( a > 0 && a + 1 == argc ) ) -+ uint a = (*it).contains(','); ++ uint a = (*it).tqcontains(','); + if ( ( a == 0 && args.isEmpty() ) || ( a > 0 && a + 1 == args.count() ) ) break; } @@ -93,7 +93,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp + return; } f = realfunc; - left = f.find( '(' ); + left = f.tqfind( '(' ); @@ -243,11 +271,12 @@ QCString replyType; QDataStream arg(data, IO_WriteOnly); @@ -232,7 +232,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp - if ((argc > 1) && (strncmp(argv[1], "DCOPRef(", 8)) == 0) + QCStringList params; + DCOPClient *client = 0L; -+ if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) ++ if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) { - char *delim = strchr(argv[1], ','); - if (!delim) @@ -254,7 +254,7 @@ diff -aur dcop/client/dcop.cpp dcop2/client/dcop.cpp + // well be broken now. As I don't know how to trigger and test + // dcoprefs this code is *not* tested. It compiles and it looks + // ok to me, but that's all I can say - Martijn (2001/12/24) -+ int delimPos = args[ 0 ].findRev( ',' ); ++ int delimPos = args[ 0 ].tqfindRev( ',' ); + if( delimPos == -1 ) + { + cerr << "Error: '" << args[ 0 ] @@ -659,8 +659,8 @@ diff -aur dcop/client/dcopfind.cpp dcop2/client/dcopfind.cpp -bool findObject( const char* app, const char* obj, const char* func, int argc, char** args ) +bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { - QString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); + QString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); @@ -118,7 +118,7 @@ f = fc; } @@ -705,7 +705,7 @@ diff -aur dcop/client/marshall.cpp dcop2/client/marshall.cpp -void marshall(QDataStream &arg, int argc, char **argv, int &i, QString type) +void marshall( QDataStream &arg, QCStringList args, uint &i, QString type ) { -- if (type == "QStringList") +- if (type == TQSTRINGLIST_OBJECT_NAME_STRING) - type = "QValueList<QString>"; - if (type == "QCStringList") - type = "QValueList<QCString>"; @@ -738,13 +738,13 @@ diff -aur dcop/client/marshall.cpp dcop2/client/marshall.cpp - arg << s.toDouble(); - else if ( type == "bool" ) - arg << mkBool( s ); -- else if ( type == "QString" ) +- else if ( type == TQSTRING_OBJECT_NAME_STRING ) - arg << s; - else if ( type == "QCString" ) - arg << QCString( argv[i] ); - else if ( type == "QColor" ) - arg << mkColor( s ); -- else if ( type == "QPoint" ) +- else if ( type == TQPOINT_OBJECT_NAME_STRING ) - arg << mkPoint( s ); - else if ( type == "QSize" ) - arg << mkSize( s ); @@ -776,7 +776,7 @@ diff -aur dcop/client/marshall.cpp dcop2/client/marshall.cpp - i++; - QByteArray dummy_data; - QDataStream dummy_arg(dummy_data, IO_WriteOnly); -+ if (type == "QStringList") ++ if (type == TQSTRINGLIST_OBJECT_NAME_STRING) + type = "QValueList<QString>"; + if (type == "QCStringList") + type = "QValueList<QCString>"; @@ -837,13 +837,13 @@ diff -aur dcop/client/marshall.cpp dcop2/client/marshall.cpp + arg << s.toDouble(); + else if ( type == "bool" ) + arg << mkBool( s ); -+ else if ( type == "QString" ) ++ else if ( type == TQSTRING_OBJECT_NAME_STRING ) + arg << s; + else if ( type == "QCString" ) + arg << QCString( args[ i ] ); + else if ( type == "QColor" ) + arg << mkColor( s ); -+ else if ( type == "QPoint" ) ++ else if ( type == TQPOINT_OBJECT_NAME_STRING ) + arg << mkPoint( s ); + else if ( type == "QSize" ) + arg << mkSize( s ); |