From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: TQt4 port kdevelop This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/quickopen/quickopen_part.cpp | 4 +-- parts/quickopen/quickopen_part.h | 7 ++--- parts/quickopen/quickopenbase.ui | 30 +++++++++++----------- parts/quickopen/quickopenclassdialog.cpp | 8 +++--- parts/quickopen/quickopenclassdialog.h | 7 ++--- parts/quickopen/quickopendialog.cpp | 12 ++++----- parts/quickopen/quickopendialog.h | 9 ++++--- parts/quickopen/quickopenfiledialog.cpp | 10 ++++---- parts/quickopen/quickopenfiledialog.h | 9 ++++--- parts/quickopen/quickopenfunctionchooseform.cpp | 6 ++--- parts/quickopen/quickopenfunctionchooseform.h | 7 ++--- parts/quickopen/quickopenfunctionchooseformbase.ui | 26 +++++++++---------- parts/quickopen/quickopenfunctiondialog.cpp | 8 +++--- parts/quickopen/quickopenfunctiondialog.h | 7 ++--- 14 files changed, 78 insertions(+), 72 deletions(-) (limited to 'parts/quickopen') diff --git a/parts/quickopen/quickopen_part.cpp b/parts/quickopen/quickopen_part.cpp index 2c1de0ce..f76701e7 100644 --- a/parts/quickopen/quickopen_part.cpp +++ b/parts/quickopen/quickopen_part.cpp @@ -49,8 +49,8 @@ K_EXPORT_COMPONENT_FACTORY( libkdevquickopen, QuickOpenFactory( data ) ) using namespace KTextEditor; -QuickOpenPart::QuickOpenPart(TQObject *parent, const char *name, const TQStringList& ) - : KDevQuickOpen(&data, parent, name ? name : "QuickOpenPart" ) +QuickOpenPart::QuickOpenPart(TQObject *tqparent, const char *name, const TQStringList& ) + : KDevQuickOpen(&data, tqparent, name ? name : "QuickOpenPart" ) { setInstance(QuickOpenFactory::instance()); setXMLFile("kdevpart_quickopen.rc"); diff --git a/parts/quickopen/quickopen_part.h b/parts/quickopen/quickopen_part.h index 19d92222..6dbfb770 100644 --- a/parts/quickopen/quickopen_part.h +++ b/parts/quickopen/quickopen_part.h @@ -18,8 +18,8 @@ * */ -#ifndef __KDEVPART_QUICKOPEN_H__ -#define __KDEVPART_QUICKOPEN_H__ +#ifndef __KDEVPART_TQUICKOPEN_H__ +#define __KDEVPART_TQUICKOPEN_H__ #include #include @@ -30,8 +30,9 @@ class KAction; class QuickOpenPart : public KDevQuickOpen { Q_OBJECT + TQ_OBJECT public: - QuickOpenPart(TQObject *parent, const char *name, const TQStringList &); + QuickOpenPart(TQObject *tqparent, const char *name, const TQStringList &); virtual ~QuickOpenPart(); void selectItem( ItemDom item ); diff --git a/parts/quickopen/quickopenbase.ui b/parts/quickopen/quickopenbase.ui index 38e0fcab..13f8f402 100644 --- a/parts/quickopen/quickopenbase.ui +++ b/parts/quickopen/quickopenbase.ui @@ -1,6 +1,6 @@ QuickOpenDialogBase - + QuickOpenDialogBase @@ -22,7 +22,7 @@ unnamed - + nameLabel @@ -33,7 +33,7 @@ nameEdit - + itemListLabel @@ -49,7 +49,7 @@ itemList - + Layout1 @@ -73,14 +73,14 @@ Expanding - + 20 20 - + buttonOk @@ -97,7 +97,7 @@ true - + buttonCancel @@ -135,9 +135,9 @@ itemList - doubleClicked(QListBoxItem*) + doubleClicked(TQListBoxItem*) QuickOpenDialogBase - slotExecuted(QListBoxItem*) + slotExecuted(TQListBoxItem*) nameEdit @@ -153,7 +153,7 @@ itemList - returnPressed(QListBoxItem*) + returnPressed(TQListBoxItem*) QuickOpenDialogBase slotReturnPressed() @@ -164,13 +164,13 @@ buttonOk buttonCancel - + slotTextChanged( const QString & ) - executed( QListBoxItem * ) - slotExecuted( QListBoxItem * ) + executed( TQListBoxItem * ) + slotExecuted( TQListBoxItem * ) slotReturnPressed() - - + + klistbox.h klineedit.h diff --git a/parts/quickopen/quickopenclassdialog.cpp b/parts/quickopen/quickopenclassdialog.cpp index b97e47a3..993ad9d6 100644 --- a/parts/quickopen/quickopenclassdialog.cpp +++ b/parts/quickopen/quickopenclassdialog.cpp @@ -35,14 +35,14 @@ #include "quickopen_part.h" #include "quickopenfunctionchooseform.h" -QuickOpenClassDialog::QuickOpenClassDialog(QuickOpenPart* part, TQWidget* parent, const char* name, bool modal, WFlags fl) - : QuickOpenDialog( part, parent, name, modal, fl ) +QuickOpenClassDialog::QuickOpenClassDialog(QuickOpenPart* part, TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : QuickOpenDialog( part, tqparent, name, modal, fl ) { nameLabel->setText( i18n("Class &name:") ); itemListLabel->setText( i18n("Class &list:") ); findAllClasses( m_items ); - QStringList_unique( m_items ); + TQStringList_unique( m_items ); nameEdit->setFocus(); @@ -78,7 +78,7 @@ void QuickOpenClassDialog::accept() TQString fileStr; QuickOpenFunctionChooseForm fdlg( this, "" ); - fdlg.setCaption(i18n("Select The Location of Class %1").arg(klasses.first()->name())); + fdlg.setCaption(i18n("Select The Location of Class %1").tqarg(klasses.first()->name())); fdlg.textLabel2->setText(i18n("Class name:")); for( ClassList::const_iterator it = klasses.constBegin(); it != klasses.constEnd() ; ++it ) diff --git a/parts/quickopen/quickopenclassdialog.h b/parts/quickopen/quickopenclassdialog.h index fd01fe25..41423285 100644 --- a/parts/quickopen/quickopenclassdialog.h +++ b/parts/quickopen/quickopenclassdialog.h @@ -18,8 +18,8 @@ * */ -#ifndef QUICKOPENCLASSDIALOG_H -#define QUICKOPENCLASSDIALOG_H +#ifndef TQUICKOPENCLASSDIALOG_H +#define TQUICKOPENCLASSDIALOG_H #include "quickopendialog.h" #include @@ -30,8 +30,9 @@ class QuickOpenPart; class QuickOpenClassDialog : public QuickOpenDialog { Q_OBJECT + TQ_OBJECT public: - QuickOpenClassDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + QuickOpenClassDialog(QuickOpenPart* part, TQWidget* tqparent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); virtual ~QuickOpenClassDialog(); public slots: diff --git a/parts/quickopen/quickopendialog.cpp b/parts/quickopen/quickopendialog.cpp index e0d40295..bebbbc53 100644 --- a/parts/quickopen/quickopendialog.cpp +++ b/parts/quickopen/quickopendialog.cpp @@ -28,8 +28,8 @@ #include "quickopendialog.h" #include "quickopen_part.h" -QuickOpenDialog::QuickOpenDialog(QuickOpenPart* part, TQWidget* parent, const char* name, bool modal, WFlags fl) - : QuickOpenDialogBase( parent, name, modal, fl ), m_part( part ) +QuickOpenDialog::QuickOpenDialog(QuickOpenPart* part, TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : QuickOpenDialogBase( tqparent, name, modal, fl ), m_part( part ) { nameEdit->installEventFilter(this); connect( &m_typeTimeout, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTextChangedDelayed()) ); @@ -58,7 +58,7 @@ void QuickOpenDialog::setFirstItemSelected() itemList->setCurrentItem(0); // We are doing this indirectly because the event handler does things for multiple // selections we cannot do through the public interface. - TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Home, 0, 0); + TQKeyEvent e(TQEvent::KeyPress, TQt::Key_Home, 0, 0); TQApplication::sendEvent(itemList, &e); } @@ -74,7 +74,7 @@ bool QuickOpenDialog::eventFilter( TQObject * watched, TQEvent * e ) if (!watched || !e) return true; - if ((watched == nameEdit) && (e->type() == TQEvent::KeyPress)) + if ((TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(nameEdit)) && (e->type() == TQEvent::KeyPress)) { TQKeyEvent *ke = (TQKeyEvent*)e; if (ke->key() == Key_Up) @@ -117,7 +117,7 @@ TQStringList QuickOpenDialog::wildCardCompletion(const TQString & text) TQStringList::const_iterator it = m_items.begin(); while( it != m_items.end() ) { - if ( (*it).find( re ) != -1 ) + if ( (*it).tqfind( re ) != -1 ) { matches << *it; } @@ -127,7 +127,7 @@ TQStringList QuickOpenDialog::wildCardCompletion(const TQString & text) return matches; } -void QuickOpenDialog::QStringList_unique( TQStringList & list ) +void QuickOpenDialog::TQStringList_unique( TQStringList & list ) { if ( list.size() < 2 ) return; diff --git a/parts/quickopen/quickopendialog.h b/parts/quickopen/quickopendialog.h index 6d441684..3b6fe84e 100644 --- a/parts/quickopen/quickopendialog.h +++ b/parts/quickopen/quickopendialog.h @@ -18,8 +18,8 @@ * */ -#ifndef QUICKOPENDIALOG_H -#define QUICKOPENDIALOG_H +#ifndef TQUICKOPENDIALOG_H +#define TQUICKOPENDIALOG_H #include #include @@ -34,9 +34,10 @@ class KCompletion; class QuickOpenDialog : public QuickOpenDialogBase { Q_OBJECT + TQ_OBJECT public: - QuickOpenDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + QuickOpenDialog(QuickOpenPart* part, TQWidget* tqparent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); virtual ~QuickOpenDialog(); virtual bool eventFilter(TQObject *watched, TQEvent *e); @@ -51,7 +52,7 @@ protected: void maybeUpdateSelection(); void setFirstItemSelected(); virtual void itemSelectionChanged(); - void QStringList_unique( TQStringList & list ); + void TQStringList_unique( TQStringList & list ); TQStringList wildCardCompletion( const TQString & text ); TQStringList m_items; QuickOpenPart* m_part; diff --git a/parts/quickopen/quickopenfiledialog.cpp b/parts/quickopen/quickopenfiledialog.cpp index adc4a919..0ceeab21 100644 --- a/parts/quickopen/quickopenfiledialog.cpp +++ b/parts/quickopen/quickopenfiledialog.cpp @@ -35,8 +35,8 @@ #include "quickopenfiledialog.h" #include "quickopen_part.h" -QuickOpenFileDialog::QuickOpenFileDialog(QuickOpenPart* part, TQWidget* parent, const char* name, bool modal, WFlags fl) - : QuickOpenDialog( part, parent, name, modal, fl ), m_hasFullPaths( false ) +QuickOpenFileDialog::QuickOpenFileDialog(QuickOpenPart* part, TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : QuickOpenDialog( part, tqparent, name, modal, fl ), m_hasFullPaths( false ) { nameLabel->setText( i18n("File &name:") ); itemListLabel->setText( i18n("File &list:") ); @@ -50,14 +50,14 @@ QuickOpenFileDialog::QuickOpenFileDialog(QuickOpenPart* part, TQWidget* parent, setFirstItemSelected(); } -QuickOpenFileDialog::QuickOpenFileDialog(QuickOpenPart* part, const KURL::List & urls, TQWidget* parent, const char* name, bool modal, WFlags fl) - : QuickOpenDialog( part, parent, name, modal, fl ), m_hasFullPaths( true ) +QuickOpenFileDialog::QuickOpenFileDialog(QuickOpenPart* part, const KURL::List & urls, TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : QuickOpenDialog( part, tqparent, name, modal, fl ), m_hasFullPaths( true ) { nameLabel->setText( i18n("File &name:") ); itemListLabel->setText( i18n("File &list:") ); m_items = urls.toStringList(); - QStringList_unique( m_items ); + TQStringList_unique( m_items ); if (m_part->project()) { diff --git a/parts/quickopen/quickopenfiledialog.h b/parts/quickopen/quickopenfiledialog.h index 852f0f5b..69c51316 100644 --- a/parts/quickopen/quickopenfiledialog.h +++ b/parts/quickopen/quickopenfiledialog.h @@ -18,8 +18,8 @@ * */ -#ifndef QUICKOPENFILEDIALOG_H -#define QUICKOPENFILEDIALOG_H +#ifndef TQUICKOPENFILEDIALOG_H +#define TQUICKOPENFILEDIALOG_H #include "quickopendialog.h" #include @@ -32,9 +32,10 @@ class KCompletion; class QuickOpenFileDialog : public QuickOpenDialog { Q_OBJECT + TQ_OBJECT public: - QuickOpenFileDialog(QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); - QuickOpenFileDialog(QuickOpenPart* part, const KURL::List &, TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + QuickOpenFileDialog(QuickOpenPart* part, TQWidget* tqparent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + QuickOpenFileDialog(QuickOpenPart* part, const KURL::List &, TQWidget* tqparent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); virtual ~QuickOpenFileDialog(); public slots: diff --git a/parts/quickopen/quickopenfunctionchooseform.cpp b/parts/quickopen/quickopenfunctionchooseform.cpp index a8853417..63d487b8 100644 --- a/parts/quickopen/quickopenfunctionchooseform.cpp +++ b/parts/quickopen/quickopenfunctionchooseform.cpp @@ -28,10 +28,10 @@ #include "quickopenfunctionchooseform.h" -QuickOpenFunctionChooseForm::QuickOpenFunctionChooseForm(TQWidget* parent, const char* name, bool modal, WFlags fl) -: QuickOpenFunctionChooseFormBase(parent,name, modal,fl) +QuickOpenFunctionChooseForm::QuickOpenFunctionChooseForm(TQWidget* tqparent, const char* name, bool modal, WFlags fl) +: QuickOpenFunctionChooseFormBase(tqparent,name, modal,fl) { - setCaption( i18n("Select One Argument or File of Function %1").arg( name ) ); + setCaption( i18n("Select One Argument or File of Function %1").tqarg( name ) ); slotArgsChange( 0 ); slotFileChange( 0 ); } diff --git a/parts/quickopen/quickopenfunctionchooseform.h b/parts/quickopen/quickopenfunctionchooseform.h index b8d462a5..1119b4fa 100644 --- a/parts/quickopen/quickopenfunctionchooseform.h +++ b/parts/quickopen/quickopenfunctionchooseform.h @@ -18,8 +18,8 @@ * */ -#ifndef QUICKOPENFUNCTIONCHOOSEFORM_H -#define QUICKOPENFUNCTIONCHOOSEFORM_H +#ifndef TQUICKOPENFUNCTIONCHOOSEFORM_H +#define TQUICKOPENFUNCTIONCHOOSEFORM_H #include "quickopenfunctionchooseformbase.h" @@ -28,9 +28,10 @@ class QuickOpenFunctionChooseForm : public QuickOpenFunctionChooseFormBase { Q_OBJECT + TQ_OBJECT public: - QuickOpenFunctionChooseForm(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + QuickOpenFunctionChooseForm(TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~QuickOpenFunctionChooseForm(); void setRelativePath(int id, const TQString &path) { m_relPaths[id] = path; } diff --git a/parts/quickopen/quickopenfunctionchooseformbase.ui b/parts/quickopen/quickopenfunctionchooseformbase.ui index 09c872d9..81ae7d2d 100644 --- a/parts/quickopen/quickopenfunctionchooseformbase.ui +++ b/parts/quickopen/quickopenfunctionchooseformbase.ui @@ -1,6 +1,6 @@ QuickOpenFunctionChooseFormBase - + QuickOpenFunctionChooseFormBase @@ -32,7 +32,7 @@ - + cancelBtn @@ -48,7 +48,7 @@ &Cancel - + okBtn @@ -70,15 +70,15 @@ false - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -111,22 +111,22 @@ Expanding - + 261 31 - + - layout3 + tqlayout3 unnamed - + textLabel2 @@ -218,11 +218,11 @@ okBtn cancelBtn - + slotFileChange( int id ) slotArgsChange( int id ) - - + + ksqueezedtextlabel.h klistbox.h diff --git a/parts/quickopen/quickopenfunctiondialog.cpp b/parts/quickopen/quickopenfunctiondialog.cpp index 8b877b8b..3887ced4 100644 --- a/parts/quickopen/quickopenfunctiondialog.cpp +++ b/parts/quickopen/quickopenfunctiondialog.cpp @@ -39,8 +39,8 @@ #include "quickopenfunctionchooseform.h" #include "quickopenfunctiondialog.h" -QuickOpenFunctionDialog::QuickOpenFunctionDialog( QuickOpenPart *part, TQWidget* parent, const char* name, bool modal, WFlags fl) -: QuickOpenDialog(part, parent, name, modal, fl) +QuickOpenFunctionDialog::QuickOpenFunctionDialog( QuickOpenPart *part, TQWidget* tqparent, const char* name, bool modal, WFlags fl) +: QuickOpenDialog(part, tqparent, name, modal, fl) { nameLabel->setText( i18n("Function &name:") ); itemListLabel->setText( i18n("Function &list:") ); @@ -74,7 +74,7 @@ void QuickOpenFunctionDialog::fillItemList() { for( FunctionList::const_iterator it = m_functionDefList.begin(); it != m_functionDefList.end(); ++it ) m_items << (*it)->name(); - QStringList_unique( m_items ); + TQStringList_unique( m_items ); } QuickOpenFunctionDialog::~QuickOpenFunctionDialog() @@ -207,7 +207,7 @@ void QuickOpenFunctionDialog::slotTextChangedDelayed() { } m_functionDefList = accepted; m_items = acceptedItems; - QStringList_unique( m_items ); + TQStringList_unique( m_items ); } m_scope = scope; diff --git a/parts/quickopen/quickopenfunctiondialog.h b/parts/quickopen/quickopenfunctiondialog.h index c02a9296..24da168b 100644 --- a/parts/quickopen/quickopenfunctiondialog.h +++ b/parts/quickopen/quickopenfunctiondialog.h @@ -18,8 +18,8 @@ * */ -#ifndef QUICKOPENFUNCTIONDLG_H -#define QUICKOPENFUNCTIONDLG_H +#ifndef TQUICKOPENFUNCTIONDLG_H +#define TQUICKOPENFUNCTIONDLG_H #include @@ -32,9 +32,10 @@ class QuickOpenPart; class QuickOpenFunctionDialog : public QuickOpenDialog { Q_OBJECT + TQ_OBJECT public: - QuickOpenFunctionDialog( QuickOpenPart* part, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + QuickOpenFunctionDialog( QuickOpenPart* part, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~QuickOpenFunctionDialog(); void gotoFile( TQString name ); -- cgit v1.2.1