diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/qmake | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/qmake')
24 files changed, 1375 insertions, 1375 deletions
diff --git a/buildtools/qmake/choosesubprojectdlg.cpp b/buildtools/qmake/choosesubprojectdlg.cpp index 20264144..63da84f8 100644 --- a/buildtools/qmake/choosesubprojectdlg.cpp +++ b/buildtools/qmake/choosesubprojectdlg.cpp @@ -15,10 +15,10 @@ #include "choosesubprojectdlg.h" #include "scope.h" -ChooseSubprojectDlg::ChooseSubprojectDlg(TrollProjectWidget *widget, QWidget* parent, const char* name, bool modal, WFlags fl) +ChooseSubprojectDlg::ChooseSubprojectDlg(TrollProjectWidget *widget, TQWidget* parent, const char* name, bool modal, WFlags fl) : ChooseSubprojectDlgBase(parent,name, modal,fl), m_widget(widget) { - connect(subprojects_view, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(itemSelected(QListViewItem *))); + connect(subprojects_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(itemSelected(TQListViewItem *))); if( m_widget->m_rootSubproject) { ChooseItem *it = new ChooseItem(m_widget->m_rootSubproject, subprojects_view, m_widget->m_rootSubproject->text(0)); @@ -44,15 +44,15 @@ void ChooseSubprojectDlg::accept() if ( item->subproject()->scope->variableValues("TEMPLATE").findIndex("subdirs") != -1 ) return; - QDialog::accept(); + TQDialog::accept(); } -ChooseItem::ChooseItem( QMakeScopeItem * spitem, QListViewItem * parent, QString text ) +ChooseItem::ChooseItem( QMakeScopeItem * spitem, TQListViewItem * parent, TQString text ) :KListViewItem(parent, text), m_spitem(spitem) { } -ChooseItem::ChooseItem( QMakeScopeItem * spitem, QListView * parent, QString text ) +ChooseItem::ChooseItem( QMakeScopeItem * spitem, TQListView * parent, TQString text ) :KListViewItem(parent, text), m_spitem(spitem) { } @@ -67,7 +67,7 @@ void ChooseSubprojectDlg::fillSubprojectsView( ChooseItem *item ) if (!item->subproject()) return; - QListViewItem * sub_spitem = item->subproject()->firstChild(); + TQListViewItem * sub_spitem = item->subproject()->firstChild(); while( sub_spitem ) { QMakeScopeItem *spitem = dynamic_cast<QMakeScopeItem *>(sub_spitem); if ( spitem && spitem->scope->scopeType() == Scope::ProjectScope ) @@ -82,7 +82,7 @@ void ChooseSubprojectDlg::fillSubprojectsView( ChooseItem *item ) } } -void ChooseSubprojectDlg::itemSelected( QListViewItem * it ) +void ChooseSubprojectDlg::itemSelected( TQListViewItem * it ) { if (!it) return; diff --git a/buildtools/qmake/choosesubprojectdlg.h b/buildtools/qmake/choosesubprojectdlg.h index 689fe8b3..2101d3cd 100644 --- a/buildtools/qmake/choosesubprojectdlg.h +++ b/buildtools/qmake/choosesubprojectdlg.h @@ -22,8 +22,8 @@ class TrollProjectWidget; class ChooseItem: public KListViewItem { public: - ChooseItem(QMakeScopeItem *spitem, QListViewItem *parent, QString text); - ChooseItem(QMakeScopeItem *spitem, QListView *parent, QString text); + ChooseItem(QMakeScopeItem *spitem, TQListViewItem *parent, TQString text); + ChooseItem(QMakeScopeItem *spitem, TQListView *parent, TQString text); QMakeScopeItem *subproject(); @@ -36,7 +36,7 @@ class ChooseSubprojectDlg : public ChooseSubprojectDlgBase Q_OBJECT public: - ChooseSubprojectDlg(TrollProjectWidget *widget, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ChooseSubprojectDlg(TrollProjectWidget *widget, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~ChooseSubprojectDlg(); /*$PUBLIC_FUNCTIONS$*/ @@ -52,7 +52,7 @@ protected: protected slots: /*$PROTECTED_SLOTS$*/ virtual void accept(); - virtual void itemSelected(QListViewItem *it); + virtual void itemSelected(TQListViewItem *it); private: void fillSubprojectsView(ChooseItem *item); diff --git a/buildtools/qmake/createscopedlg.cpp b/buildtools/qmake/createscopedlg.cpp index 439ddd70..4f65dd17 100644 --- a/buildtools/qmake/createscopedlg.cpp +++ b/buildtools/qmake/createscopedlg.cpp @@ -13,7 +13,7 @@ #include <klineedit.h> #include <kurlrequester.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kfile.h> #include <kcombobox.h> #include <kmessagebox.h> @@ -26,12 +26,12 @@ #include "scope.h" #include "trollprojectwidget.h" -CreateScopeDlg::CreateScopeDlg( QMakeScopeItem* item, QWidget* parent, const char* name, bool modal, WFlags fl ) +CreateScopeDlg::CreateScopeDlg( QMakeScopeItem* item, TQWidget* parent, const char* name, bool modal, WFlags fl ) : CreateScopeDlgBase( parent, name, modal, fl ), m_item( item ) { incUrl->setMode( KFile::File | KFile::LocalOnly ); incUrl->setCaption( i18n( "Choose existing .pri file or give a new filename for creation" ) ); - incUrl->setURL( QString("") ); + incUrl->setURL( TQString("") ); incUrl->completionObject() ->setDir( item->scope->projectDir() ); incUrl->fileDialog()->setURL( KURL::fromPathOrURL( item->scope->projectDir() ) ); } @@ -55,15 +55,15 @@ void CreateScopeDlg::accept() case 2: if ( !incUrl->url().isEmpty() ) { - QString file = incUrl->url(); + TQString file = incUrl->url(); if ( !incUrl->url().endsWith( ".pri" ) ) file += ".pri"; if( file.find("/") == -1 ) file = m_item->scope->projectDir()+"/"+file; // We need to create the file, because getRelativePath checks for existent paths - if( !QFile::exists(file) ) + if( !TQFile::exists(file) ) { - QFile temp(file); + TQFile temp(file); if( temp.open(IO_WriteOnly) ) temp.close(); } @@ -78,20 +78,20 @@ void CreateScopeDlg::accept() new QMakeScopeItem( m_item, s->scopeName(), s ); else { - QListViewItem* item = m_item->firstChild(); + TQListViewItem* item = m_item->firstChild(); while( item->nextSibling() ) item = item->nextSibling(); QMakeScopeItem* newitem = new QMakeScopeItem( m_item, s->scopeName(), s ); newitem->moveItem( item ); } - QDialog::accept(); + TQDialog::accept(); } else { if ( KMessageBox::warningYesNo( this, i18n( "You did not specify all needed information. " "The scope will not be created.<br>Do you want to abort the scope creation?" ), i18n( "Missing information" ) ) == KMessageBox:: Yes ) - QDialog::reject(); + TQDialog::reject(); } } diff --git a/buildtools/qmake/createscopedlg.h b/buildtools/qmake/createscopedlg.h index c8ed86ef..675143b1 100644 --- a/buildtools/qmake/createscopedlg.h +++ b/buildtools/qmake/createscopedlg.h @@ -22,7 +22,7 @@ class CreateScopeDlg : public CreateScopeDlgBase Q_OBJECT public: - CreateScopeDlg( QMakeScopeItem* item, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CreateScopeDlg( QMakeScopeItem* item, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~CreateScopeDlg(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/buildtools/qmake/disablesubprojectdlg.cpp b/buildtools/qmake/disablesubprojectdlg.cpp index 335bf33f..c05c70c9 100644 --- a/buildtools/qmake/disablesubprojectdlg.cpp +++ b/buildtools/qmake/disablesubprojectdlg.cpp @@ -11,16 +11,16 @@ #include "disablesubprojectdlg.h" #include <klistview.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include "scope.h" #include "qmakescopeitem.h" -DisableSubprojectDlg::DisableSubprojectDlg( const QStringList& projects, QWidget* parent, const char* name, WFlags fl ) +DisableSubprojectDlg::DisableSubprojectDlg( const TQStringList& projects, TQWidget* parent, const char* name, WFlags fl ) : DisableSubprojectDlgBase( parent, name, fl ) { - for( QStringList::const_iterator it = projects.begin(); it != projects.end(); ++it ) + for( TQStringList::const_iterator it = projects.begin(); it != projects.end(); ++it ) { - new QCheckListItem(subprojects_view, *it, QCheckListItem::CheckBox); + new TQCheckListItem(subprojects_view, *it, TQCheckListItem::CheckBox); } } @@ -28,13 +28,13 @@ DisableSubprojectDlg::~DisableSubprojectDlg() { } -QStringList DisableSubprojectDlg::selectedProjects() +TQStringList DisableSubprojectDlg::selectedProjects() { - QStringList result; - QListViewItem* item = subprojects_view->firstChild(); + TQStringList result; + TQListViewItem* item = subprojects_view->firstChild(); while( item ) { - QCheckListItem* ci = dynamic_cast<QCheckListItem*>(item); + TQCheckListItem* ci = dynamic_cast<TQCheckListItem*>(item); if( ci && ci->isOn() ) { result << ci->text(0); diff --git a/buildtools/qmake/disablesubprojectdlg.h b/buildtools/qmake/disablesubprojectdlg.h index 13a27468..00602f28 100644 --- a/buildtools/qmake/disablesubprojectdlg.h +++ b/buildtools/qmake/disablesubprojectdlg.h @@ -19,11 +19,11 @@ class DisableSubprojectDlg : public DisableSubprojectDlgBase Q_OBJECT public: - DisableSubprojectDlg( const QStringList& projects, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + DisableSubprojectDlg( const TQStringList& projects, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~DisableSubprojectDlg(); /*$PUBLIC_FUNCTIONS$*/ - QStringList selectedProjects(); + TQStringList selectedProjects(); public slots: /*$PUBLIC_SLOTS$*/ diff --git a/buildtools/qmake/newwidgetdlg.cpp b/buildtools/qmake/newwidgetdlg.cpp index 7be62acd..44dd7588 100644 --- a/buildtools/qmake/newwidgetdlg.cpp +++ b/buildtools/qmake/newwidgetdlg.cpp @@ -10,22 +10,22 @@ ***************************************************************************/ #include "newwidgetdlg.h" -#include <qradiobutton.h> -#include <qstringlist.h> -#include <qcheckbox.h> -#include <qmessagebox.h> +#include <tqradiobutton.h> +#include <tqstringlist.h> +#include <tqcheckbox.h> +#include <tqmessagebox.h> #include <kfiledialog.h> #include <klineedit.h> #include <kpushbutton.h> #include <domutil.h> -#include <qdom.h> +#include <tqdom.h> #include <kstdguiitem.h> #define WIDGET_CAPTION_NAME "widget/property|name=caption/string" #define WIDGET_CLASS_NAME "class" #define WIDGET_SLOTS "slots" -NewWidgetDlg::NewWidgetDlg(QStringList &newFileNames,QWidget* parent, const char* name, bool modal, WFlags fl) +NewWidgetDlg::NewWidgetDlg(TQStringList &newFileNames,TQWidget* parent, const char* name, bool modal, WFlags fl) : NewWidgetDlgBase(parent,name,modal,fl), m_newFileNames(newFileNames) //================================================= @@ -45,34 +45,34 @@ NewWidgetDlg::~NewWidgetDlg() void NewWidgetDlg::subclassingPressed() //===================================== { - QMessageBox::information(0,"subclassing",""); + TQMessageBox::information(0,"subclassing",""); } void NewWidgetDlg::templateSelChanged() //===================================== { - QMessageBox::information(0,"template",""); + TQMessageBox::information(0,"template",""); } void NewWidgetDlg::accept() //========================= { - QDomDocument doc; + TQDomDocument doc; DomUtil::openDOMFile(doc,"/home/jsgaarde/programming/kdevelop/domapp/clean_dialog.ui"); DomUtil::replaceText(doc,WIDGET_CLASS_NAME,"TestClass"); DomUtil::replaceText(doc,WIDGET_CAPTION_NAME,"Test Dialog"); - QDomElement slotsElem = DomUtil::elementByPathExt(doc,WIDGET_SLOTS); - QDomNodeList slotnodes = slotsElem.childNodes(); + TQDomElement slotsElem = DomUtil::elementByPathExt(doc,WIDGET_SLOTS); + TQDomNodeList slotnodes = slotsElem.childNodes(); for (unsigned int i=0; i<slotnodes.count();i++) { - QString msg; - QDomElement slotelem = slotnodes.item(i).toElement(); + TQString msg; + TQDomElement slotelem = slotnodes.item(i).toElement(); msg.sprintf("Slotname: %s\nReturns: %s\nAccess: %s", slotelem.text().ascii(), slotelem.attributeNode("returnType").value().ascii(), slotelem.attributeNode("access").value().ascii()); - QMessageBox::information(0,"Slots",msg); + TQMessageBox::information(0,"Slots",msg); } DomUtil::saveDOMFile(doc,"/home/jsgaarde/programming/kdevelop/domapp/clean_dialog2.ui"); NewWidgetDlgBase::accept(); diff --git a/buildtools/qmake/newwidgetdlg.h b/buildtools/qmake/newwidgetdlg.h index e8420df2..874b502f 100644 --- a/buildtools/qmake/newwidgetdlg.h +++ b/buildtools/qmake/newwidgetdlg.h @@ -21,7 +21,7 @@ class QDomDocument; class NewWidgetDlg : public NewWidgetDlgBase { public: - NewWidgetDlg(QStringList &newFileNames,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + NewWidgetDlg(TQStringList &newFileNames,TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~NewWidgetDlg(); @@ -31,7 +31,7 @@ public slots: virtual void accept(); protected: - QStringList &m_newFileNames; + TQStringList &m_newFileNames; }; #endif diff --git a/buildtools/qmake/projectconfigurationdlg.cpp b/buildtools/qmake/projectconfigurationdlg.cpp index b76fc3a5..7c646e62 100644 --- a/buildtools/qmake/projectconfigurationdlg.cpp +++ b/buildtools/qmake/projectconfigurationdlg.cpp @@ -16,10 +16,10 @@ ***************************************************************************/ #include "projectconfigurationdlg.h" -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qmessagebox.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqmessagebox.h> #include <kfiledialog.h> #include <knotifyclient.h> #include <klineedit.h> @@ -31,15 +31,15 @@ #include <kiconloader.h> #include <ktextedit.h> -#include <qdialog.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qlistview.h> -#include <qlabel.h> +#include <tqdialog.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqlistview.h> +#include <tqlabel.h> #include <iostream> -#include <qregexp.h> -#include <qvalidator.h> -#include <qtabwidget.h> +#include <tqregexp.h> +#include <tqvalidator.h> +#include <tqtabwidget.h> #include <kpushbutton.h> #include <kcombobox.h> #include <klocale.h> @@ -51,17 +51,17 @@ #include "scope.h" #include "urlutil.h" -InsideCheckListItem::InsideCheckListItem( QListView *parent, QMakeScopeItem *item, ProjectConfigurationDlg *config ) : - QCheckListItem( parent, item->relativePath().endsWith("/") ? item->relativePath().right( item->relativePath().length() - 1 ) : item->relativePath(), QCheckListItem::CheckBox ) +InsideCheckListItem::InsideCheckListItem( TQListView *parent, QMakeScopeItem *item, ProjectConfigurationDlg *config ) : + TQCheckListItem( parent, item->relativePath().endsWith("/") ? item->relativePath().right( item->relativePath().length() - 1 ) : item->relativePath(), TQCheckListItem::CheckBox ) { prjItem = item; m_config = config; } -InsideCheckListItem::InsideCheckListItem( QListView *parent, QListViewItem *after, QMakeScopeItem *item, ProjectConfigurationDlg *config ) : - QCheckListItem( parent, +InsideCheckListItem::InsideCheckListItem( TQListView *parent, TQListViewItem *after, QMakeScopeItem *item, ProjectConfigurationDlg *config ) : + TQCheckListItem( parent, after, - item->relativePath(), QCheckListItem::CheckBox ) + item->relativePath(), TQCheckListItem::CheckBox ) { prjItem = item; m_config = config; @@ -72,7 +72,7 @@ void InsideCheckListItem::stateChange( bool state ) { if ( listView() == m_config->insidelib_listview ) { - QListViewItemIterator it( m_config->intDeps_view ); + TQListViewItemIterator it( m_config->intDeps_view ); while ( it.current() ) { InsideCheckListItem * chi = dynamic_cast<InsideCheckListItem*>( it.current() ); @@ -84,7 +84,7 @@ void InsideCheckListItem::stateChange( bool state ) } } -CustomVarListItem::CustomVarListItem(QListView* parent, unsigned int id, QMap<QString, QString> var) +CustomVarListItem::CustomVarListItem(TQListView* parent, unsigned int id, TQMap<TQString, TQString> var) : KListViewItem(parent), m_key(id) { setText(0, var["var"]); @@ -92,21 +92,21 @@ CustomVarListItem::CustomVarListItem(QListView* parent, unsigned int id, QMap<QS setText(2, var["values"]); } -QString CustomVarListItem::key(int column, bool ascending) const +TQString CustomVarListItem::key(int column, bool ascending) const { if( column == 0) - return QString::number(m_key); + return TQString::number(m_key); return KListViewItem::key(column, ascending); } -ProjectConfigurationDlg::ProjectConfigurationDlg( QListView *_prjList, TrollProjectWidget* _prjWidget, QWidget* parent, const char* name, bool modal, WFlags fl ) +ProjectConfigurationDlg::ProjectConfigurationDlg( TQListView *_prjList, TrollProjectWidget* _prjWidget, TQWidget* parent, const char* name, bool modal, WFlags fl ) : ProjectConfigurationDlgBase( parent, name, modal, fl | Qt::WStyle_Tool ), myProjectItem(0) { prjList = _prjList; prjWidget = _prjWidget; // m_projectConfiguration = conf; - m_targetLibraryVersion->setValidator( new QRegExpValidator( - QRegExp( "\\d+(\\.\\d+)?(\\.\\d+)" ), this ) ); + m_targetLibraryVersion->setValidator( new TQRegExpValidator( + TQRegExp( "\\d+(\\.\\d+)?(\\.\\d+)" ), this ) ); customVariables->setSortColumn(0); customVariables->setSortOrder(Qt::Ascending); mocdir_url->completionObject()->setMode(KURLCompletion::DirCompletion); @@ -170,7 +170,7 @@ void ProjectConfigurationDlg::updateProjectConfiguration() if( myProjectItem->scope->variableValues( "CONFIG" ).findIndex( "dll" ) != -1 ) myProjectItem->scope->removeFromPlusOp( "CONFIG", "dll" ); myProjectItem->setPixmap( 0, SmallIcon( "qmake_app" ) ); - QString targetname = prjWidget->getCurrentOutputFilename(); + TQString targetname = prjWidget->getCurrentOutputFilename(); if( targetname.findRev("/") != -1 ) targetname = targetname.right( targetname.length() - targetname.findRev("/") - 1 ); DomUtil::writeEntry( *prjWidget->m_part->projectDom(), @@ -410,9 +410,9 @@ void ProjectConfigurationDlg::updateProjectConfiguration() myProjectItem->removeValue( "QT", "phonon" ); } - QStringList confValues = myProjectItem->scope->variableValues( "CONFIG" ); - QStringList extraValues = QStringList::split( " ", editConfigExtra->text() ); - for ( QStringList::iterator it = confValues.begin() ; it != confValues.end() ; ++it ) + TQStringList confValues = myProjectItem->scope->variableValues( "CONFIG" ); + TQStringList extraValues = TQStringList::split( " ", editConfigExtra->text() ); + for ( TQStringList::iterator it = confValues.begin() ; it != confValues.end() ; ++it ) { if ( Scope::KnownConfigValues.findIndex( *it ) == -1 && extraValues.findIndex( *it ) == -1 ) { @@ -420,51 +420,51 @@ void ProjectConfigurationDlg::updateProjectConfiguration() } } - for ( QStringList::iterator it = extraValues.begin() ; it != extraValues.end() ; ++it ) + for ( TQStringList::iterator it = extraValues.begin() ; it != extraValues.end() ; ++it ) { if ( confValues.findIndex( *it ) == -1 ) myProjectItem->scope->addToPlusOp( "CONFIG", *it ); } - QString targetpath = m_targetPath->url(); -// if( !QFileInfo( targetpath ).isRelative() ) + TQString targetpath = m_targetPath->url(); +// if( !TQFileInfo( targetpath ).isRelative() ) // targetpath = URLUtil::getRelativePath( myProjectItem->scope->projectDir(), targetpath ); if( myProjectItem->scope->scopeType() == Scope::FunctionScope || myProjectItem->scope->scopeType() == Scope::SimpleScope ) { if( myProjectItem->scope->variableValues("TARGET").findIndex( m_targetOutputFile->text() ) == -1 ) - myProjectItem->scope->setEqualOp( "TARGET", QStringList( m_targetOutputFile->text() ) ); + myProjectItem->scope->setEqualOp( "TARGET", TQStringList( m_targetOutputFile->text() ) ); if( myProjectItem->scope->variableValues("DESTDIR").findIndex( targetpath ) == -1 ) - myProjectItem->scope->setEqualOp( "DESTDIR", QStringList( targetpath ) ); + myProjectItem->scope->setEqualOp( "DESTDIR", TQStringList( targetpath ) ); }else { - myProjectItem->scope->setEqualOp( "TARGET", QStringList( m_targetOutputFile->text() ) ); - myProjectItem->scope->setEqualOp( "DESTDIR", QStringList( targetpath ) ); + myProjectItem->scope->setEqualOp( "TARGET", TQStringList( m_targetOutputFile->text() ) ); + myProjectItem->scope->setEqualOp( "DESTDIR", TQStringList( targetpath ) ); } - myProjectItem->updateValues( "DEFINES", QStringList::split( " ", m_defines->text() ) ); - myProjectItem->updateValues( "QMAKE_CXXFLAGS_DEBUG", QStringList::split( " ", m_debugFlags->text() ) ); - myProjectItem->updateValues( "QMAKE_CXXFLAGS_RELEASE", QStringList::split( " ", m_releaseFlags->text() ) ); + myProjectItem->updateValues( "DEFINES", TQStringList::split( " ", m_defines->text() ) ); + myProjectItem->updateValues( "QMAKE_CXXFLAGS_DEBUG", TQStringList::split( " ", m_debugFlags->text() ) ); + myProjectItem->updateValues( "QMAKE_CXXFLAGS_RELEASE", TQStringList::split( " ", m_releaseFlags->text() ) ); //add selected includes - QStringList values; + TQStringList values; InsideCheckListItem *insideItem = ( InsideCheckListItem * ) insideinc_listview->firstChild(); while ( insideItem ) { if ( insideItem->isOn() ) { - QString tmpInc = insideItem->prjItem->getIncAddPath( myProjectItem->scope->projectDir() ); - tmpInc = QDir::cleanDirPath( tmpInc ); + TQString tmpInc = insideItem->prjItem->getIncAddPath( myProjectItem->scope->projectDir() ); + tmpInc = TQDir::cleanDirPath( tmpInc ); values << tmpInc; } insideItem = ( InsideCheckListItem* ) insideItem->itemBelow(); } - QCheckListItem *outsideItem = ( QCheckListItem * ) outsideinc_listview->firstChild(); + TQCheckListItem *outsideItem = ( TQCheckListItem * ) outsideinc_listview->firstChild(); while ( outsideItem ) { values << outsideItem->text( 0 ); - outsideItem = ( QCheckListItem* ) outsideItem->itemBelow(); + outsideItem = ( TQCheckListItem* ) outsideItem->itemBelow(); } // myProjectItem->removeValues( "INCLUDEPATH", values ); myProjectItem->updateValues( "INCLUDEPATH", values ); @@ -473,7 +473,7 @@ void ProjectConfigurationDlg::updateProjectConfiguration() if ( checkInstallTarget->isChecked() == true ) { myProjectItem->addValue( "INSTALLS", "target" ); - myProjectItem->scope->setEqualOp( "target.path", QStringList( m_InstallTargetPath->text() ) ); + myProjectItem->scope->setEqualOp( "target.path", TQStringList( m_InstallTargetPath->text() ) ); } else { @@ -482,12 +482,12 @@ void ProjectConfigurationDlg::updateProjectConfiguration() } //makefile - myProjectItem->scope->setEqualOp( "MAKEFILE", QStringList( makefile_url->url() ) ); + myProjectItem->scope->setEqualOp( "MAKEFILE", TQStringList( makefile_url->url() ) ); //add libs to link values.clear(); - QStringList libPaths; + TQStringList libPaths; //inside libs to link insideItem = ( InsideCheckListItem * ) insidelib_listview->firstChild(); @@ -496,11 +496,11 @@ void ProjectConfigurationDlg::updateProjectConfiguration() if ( insideItem->isOn() ) { - QString tmpLib = insideItem->prjItem->getLibAddObject( myProjectItem->scope->projectDir() ); + TQString tmpLib = insideItem->prjItem->getLibAddObject( myProjectItem->scope->projectDir() ); if ( insideItem->prjItem->scope->variableValues( "CONFIG" ).findIndex( "dll" ) != -1 ) { //add path if shared lib is linked - QString tmpPath = insideItem->prjItem->getLibAddPath( + TQString tmpPath = insideItem->prjItem->getLibAddPath( myProjectItem->scope->projectDir() ); if ( tmpPath != "" ) { @@ -514,7 +514,7 @@ void ProjectConfigurationDlg::updateProjectConfiguration() } //extra lib paths - QListViewItem *lvItem = outsidelibdir_listview->firstChild(); + TQListViewItem *lvItem = outsidelibdir_listview->firstChild(); while ( lvItem ) { values << ( "-L"+lvItem->text( 0 ) ); @@ -523,11 +523,11 @@ void ProjectConfigurationDlg::updateProjectConfiguration() //outside libs to link - outsideItem = ( QCheckListItem * ) outsidelib_listview->firstChild(); + outsideItem = ( TQCheckListItem * ) outsidelib_listview->firstChild(); while ( outsideItem ) { values << outsideItem->text( 0 ); - outsideItem = ( QCheckListItem* ) outsideItem->itemBelow(); + outsideItem = ( TQCheckListItem* ) outsideItem->itemBelow(); } @@ -537,7 +537,7 @@ void ProjectConfigurationDlg::updateProjectConfiguration() values.clear(); //external project dependencies - QListViewItem *depItem = extDeps_view->firstChild(); + TQListViewItem *depItem = extDeps_view->firstChild(); while ( depItem ) { values << depItem->text( 0 ); @@ -601,19 +601,19 @@ void ProjectConfigurationDlg::updateProjectConfiguration() } // intermediate locations - myProjectItem->scope->setEqualOp( "OBJECTS_DIR", QStringList( objdir_url->url() ) ); - myProjectItem->scope->setEqualOp( "UI_DIR", QStringList( uidir_url->url() ) ); - myProjectItem->scope->setEqualOp( "MOC_DIR", QStringList( mocdir_url->url() ) ); - myProjectItem->scope->setEqualOp( "RCC_DIR", QStringList( rccdir_url->url() ) ); + myProjectItem->scope->setEqualOp( "OBJECTS_DIR", TQStringList( objdir_url->url() ) ); + myProjectItem->scope->setEqualOp( "UI_DIR", TQStringList( uidir_url->url() ) ); + myProjectItem->scope->setEqualOp( "MOC_DIR", TQStringList( mocdir_url->url() ) ); + myProjectItem->scope->setEqualOp( "RCC_DIR", TQStringList( rccdir_url->url() ) ); //CORBA - myProjectItem->scope->setEqualOp( "IDL_COMPILER", QStringList( idlCmdEdit->url() ) ); - myProjectItem->updateValues( "IDL_OPTIONS", QStringList::split( " ", idlCmdOptionsEdit->text() ) ); + myProjectItem->scope->setEqualOp( "IDL_COMPILER", TQStringList( idlCmdEdit->url() ) ); + myProjectItem->updateValues( "IDL_OPTIONS", TQStringList::split( " ", idlCmdOptionsEdit->text() ) ); - QListViewItemIterator iter(customVariables); + TQListViewItemIterator iter(customVariables); for( ; iter.current() ; iter++ ) { - QListViewItem* item = iter.current(); + TQListViewItem* item = iter.current(); myProjectItem->scope->updateCustomVariable( item->key(0, true).toUInt(), item->text(0), item->text(1), item->text(2) ); } } @@ -623,13 +623,13 @@ void ProjectConfigurationDlg::accept() if( buttonApply->isEnabled() ) apply(); myProjectItem = 0; - QDialog::accept(); + TQDialog::accept(); } void ProjectConfigurationDlg::reject() { myProjectItem = 0; - QDialog::reject(); + TQDialog::reject(); } @@ -644,8 +644,8 @@ void ProjectConfigurationDlg::updateControls() groupTemplate->setEnabled( true ); //cache the value of the some variables - QStringList configValues = myProjectItem->scope->variableValues( "CONFIG" ); - QStringList templateValues = myProjectItem->scope->variableValues( "TEMPLATE" ); + TQStringList configValues = myProjectItem->scope->variableValues( "CONFIG" ); + TQStringList templateValues = myProjectItem->scope->variableValues( "TEMPLATE" ); //if( !myProjectItem->isScope ) //{ if ( templateValues.findIndex( "lib" ) != -1 ) @@ -708,13 +708,13 @@ void ProjectConfigurationDlg::updateControls() { checkConsole->setChecked( true ); } - QString targetname = prjWidget->getCurrentOutputFilename(); + TQString targetname = prjWidget->getCurrentOutputFilename(); if( targetname.findRev("/") != -1 ) targetname = targetname.right( targetname.length() - targetname.findRev("/") - 1 ); m_editRunArguments->setText( DomUtil::readEntry( *prjWidget->m_part->projectDom(), "/kdevtrollproject/run/runarguments/"+targetname, "" ) ); - QString dir = DomUtil::readEntry( *prjWidget->m_part->projectDom(), "/kdevtrollproject/run/cwd/"+targetname, "" ); - if( QFileInfo(dir).isRelative() ) + TQString dir = DomUtil::readEntry( *prjWidget->m_part->projectDom(), "/kdevtrollproject/run/cwd/"+targetname, "" ); + if( TQFileInfo(dir).isRelative() ) { m_CWDEdit->completionObject()->setDir( myProjectItem->scope->projectDir() ); m_CWDEdit->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -728,7 +728,7 @@ void ProjectConfigurationDlg::updateControls() if( m_CWDEdit->url().isEmpty() ) { - QString destdir = myProjectItem->m_widget->getCurrentDestDir(); + TQString destdir = myProjectItem->m_widget->getCurrentDestDir(); if( !destdir.startsWith( "/" ) ) destdir = myProjectItem->m_widget->projectDirectory()+"/"+destdir; m_CWDEdit->setURL( destdir.left( destdir.findRev("/") ) ); @@ -834,7 +834,7 @@ void ProjectConfigurationDlg::updateControls() else checkQtHelp->setChecked( false ); - QStringList qtLibs = myProjectItem->scope->variableValues( "QT" ); + TQStringList qtLibs = myProjectItem->scope->variableValues( "QT" ); if ( qtLibs.findIndex( "core" ) != -1 ) checkQt4Core->setChecked( true ); else @@ -892,8 +892,8 @@ void ProjectConfigurationDlg::updateControls() } //fill the custom config edit - QStringList extraValues; - for ( QStringList::const_iterator it = configValues.begin() ; it != configValues.end() ; ++it ) + TQStringList extraValues; + for ( TQStringList::const_iterator it = configValues.begin() ; it != configValues.end() ; ++it ) { if ( Scope::KnownConfigValues.findIndex( *it ) == -1 ) { @@ -902,8 +902,8 @@ void ProjectConfigurationDlg::updateControls() } editConfigExtra->setText( extraValues.join( " " ) ); - QString dir = myProjectItem->scope->variableValues( "MAKEFILE" ).front(); - if( QFileInfo(dir).isRelative() ) + TQString dir = myProjectItem->scope->variableValues( "MAKEFILE" ).front(); + if( TQFileInfo(dir).isRelative() ) { makefile_url->completionObject()->setDir( myProjectItem->scope->projectDir() ); makefile_url->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -929,7 +929,7 @@ void ProjectConfigurationDlg::updateControls() m_targetOutputFile->setText( myProjectItem->scope->variableValues( "TARGET" ).front() ); dir = myProjectItem->scope->variableValues( "DESTDIR" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { m_targetPath->completionObject()->setDir( myProjectItem->scope->projectDir() ); m_targetPath->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -950,7 +950,7 @@ void ProjectConfigurationDlg::updateControls() updateDependenciesControl(); dir = myProjectItem->scope->variableValues( "OBJECTS_DIR" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { objdir_url->completionObject()->setDir( myProjectItem->scope->projectDir() ); objdir_url->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -961,7 +961,7 @@ void ProjectConfigurationDlg::updateControls() } objdir_url->setURL( dir ); dir = myProjectItem->scope->variableValues( "UI_DIR" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { uidir_url->completionObject()->setDir( myProjectItem->scope->projectDir() ); uidir_url->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -972,7 +972,7 @@ void ProjectConfigurationDlg::updateControls() } uidir_url->setURL( dir ); dir = myProjectItem->scope->variableValues( "MOC_DIR" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { mocdir_url->completionObject()->setDir( myProjectItem->scope->projectDir() ); mocdir_url->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -983,7 +983,7 @@ void ProjectConfigurationDlg::updateControls() } mocdir_url->setURL( dir ); dir = myProjectItem->scope->variableValues( "RC_DIR" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { rccdir_url->completionObject()->setDir( myProjectItem->scope->projectDir() ); rccdir_url->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -996,7 +996,7 @@ void ProjectConfigurationDlg::updateControls() dir = myProjectItem->scope->variableValues( "IDL_COMPILER" ).front(); - if( QFileInfo(dir).isRelative() ) + if( TQFileInfo(dir).isRelative() ) { idlCmdEdit->completionObject()->setDir( myProjectItem->scope->projectDir() ); idlCmdEdit->fileDialog()->setURL( KURL( myProjectItem->scope->projectDir()+"/"+dir ) ); @@ -1012,8 +1012,8 @@ void ProjectConfigurationDlg::updateControls() customVariableName->setText(""); customVariableData->setText(""); customVariableOp->setCurrentItem( 0 ); - QMap<unsigned int, QMap<QString, QString> > customvars = myProjectItem->scope->customVariables(); - QMap<unsigned int, QMap<QString, QString> >::iterator idx = customvars.begin(); + TQMap<unsigned int, TQMap<TQString, TQString> > customvars = myProjectItem->scope->customVariables(); + TQMap<unsigned int, TQMap<TQString, TQString> >::iterator idx = customvars.begin(); for ( ; idx != customvars.end(); ++idx ) { CustomVarListItem* item = new CustomVarListItem( customVariables, idx.key(), idx.data() ); @@ -1023,9 +1023,9 @@ void ProjectConfigurationDlg::updateControls() groupTemplateChanged(0); } -QPtrList<QMakeScopeItem> ProjectConfigurationDlg::getAllProjects() +TQPtrList<QMakeScopeItem> ProjectConfigurationDlg::getAllProjects() { - QPtrList <QMakeScopeItem> tmpPrjList; + TQPtrList <QMakeScopeItem> tmpPrjList; QMakeScopeItem *item = static_cast<QMakeScopeItem*>( prjList->firstChild() ); while ( item ) { @@ -1040,7 +1040,7 @@ QPtrList<QMakeScopeItem> ProjectConfigurationDlg::getAllProjects() return ( tmpPrjList ); } -void ProjectConfigurationDlg::getAllSubProjects( QMakeScopeItem *item, QPtrList <QMakeScopeItem> *itemList ) +void ProjectConfigurationDlg::getAllSubProjects( QMakeScopeItem *item, TQPtrList <QMakeScopeItem> *itemList ) { QMakeScopeItem * subItem = static_cast<QMakeScopeItem*>( item->firstChild() ); @@ -1063,18 +1063,18 @@ void ProjectConfigurationDlg::updateIncludeControl() insideinc_listview->clear(); outsideinc_listview->clear(); - QStringList incList = myProjectItem->scope->variableValues( "INCLUDEPATH" ); - QStringList intIncList = incList; - QMap<QString, InsideCheckListItem*> items; - QPtrList <QMakeScopeItem> itemList = getAllProjects(); + TQStringList incList = myProjectItem->scope->variableValues( "INCLUDEPATH" ); + TQStringList intIncList = incList; + TQMap<TQString, InsideCheckListItem*> items; + TQPtrList <QMakeScopeItem> itemList = getAllProjects(); QMakeScopeItem *item = itemList.first(); while ( item ) { if ( item->scope->variableValues( "TEMPLATE" ).findIndex( "lib" ) != -1 || item->scope->variableValues( "TEMPLATE" ).findIndex( "app" ) != -1 ) { - QString tmpInc = item->getIncAddPath( myProjectItem->scope->projectDir() ); - tmpInc = QDir::cleanDirPath( tmpInc ); + TQString tmpInc = item->getIncAddPath( myProjectItem->scope->projectDir() ); + tmpInc = TQDir::cleanDirPath( tmpInc ); InsideCheckListItem *newItem = new InsideCheckListItem( insideinc_listview, insideinc_listview->lastItem(), item, this ); @@ -1092,18 +1092,18 @@ void ProjectConfigurationDlg::updateIncludeControl() //all other in incList are outside incs outsideinc_listview->clear(); - QStringList::Iterator it1 = incList.begin(); + TQStringList::Iterator it1 = incList.begin(); for ( ;it1 != incList.end();++it1 ) { intIncList.remove(*it1); - new QListViewItem( outsideinc_listview, outsideinc_listview->lastItem(), ( *it1 ) ); + new TQListViewItem( outsideinc_listview, outsideinc_listview->lastItem(), ( *it1 ) ); } - for( QStringList::const_iterator it = intIncList.begin(); it != intIncList.end(); ++it ) + for( TQStringList::const_iterator it = intIncList.begin(); it != intIncList.end(); ++it ) { insideinc_listview->insertItem( items[*it] ); items.remove(*it); } - for( QMap<QString,InsideCheckListItem*>::ConstIterator it3 = items.begin(); it3 != items.end(); it3++ ) + for( TQMap<TQString,InsideCheckListItem*>::ConstIterator it3 = items.begin(); it3 != items.end(); it3++ ) { insideinc_listview->insertItem( it3.data() ); } @@ -1112,7 +1112,7 @@ void ProjectConfigurationDlg::updateIncludeControl() void ProjectConfigurationDlg::updateLibControls() { - QPtrList <QMakeScopeItem> itemList = getAllProjects(); + TQPtrList <QMakeScopeItem> itemList = getAllProjects(); insidelib_listview->setSorting( -1, false ); outsidelib_listview->setSorting( -1, false ); @@ -1122,9 +1122,9 @@ void ProjectConfigurationDlg::updateLibControls() outsidelibdir_listview->clear(); //update librarys //temp strlist - QStringList libList = myProjectItem->scope->variableValues( "LIBS" ); - QStringList intLibList = libList; - QMap<QString, InsideCheckListItem*> items; + TQStringList libList = myProjectItem->scope->variableValues( "LIBS" ); + TQStringList intLibList = libList; + TQMap<TQString, InsideCheckListItem*> items; QMakeScopeItem* item = itemList.first(); while ( item ) { @@ -1133,13 +1133,13 @@ void ProjectConfigurationDlg::updateLibControls() if ( item != myProjectItem ) { // create lib string - QString tmpLib = item->getLibAddObject( myProjectItem->scope->projectDir() ); + TQString tmpLib = item->getLibAddObject( myProjectItem->scope->projectDir() ); InsideCheckListItem * newItem = new InsideCheckListItem( insidelib_listview, insidelib_listview->lastItem(), item, this ); insidelib_listview->takeItem( newItem ); items[tmpLib] = newItem; - QString tmpLibDir = item->getLibAddPath( myProjectItem->scope->projectDir() ); + TQString tmpLibDir = item->getLibAddPath( myProjectItem->scope->projectDir() ); kdDebug(9024) << "lib:" << tmpLib << " dir:" << tmpLibDir << "|" << libList << endl; if ( libList.findIndex( "-L" + tmpLibDir ) != -1 ) { @@ -1156,28 +1156,28 @@ void ProjectConfigurationDlg::updateLibControls() } //all other in libList are outside libs - QStringList::Iterator it1 = libList.begin(); + TQStringList::Iterator it1 = libList.begin(); for ( ;it1 != libList.end();++it1 ) { intLibList.remove( *it1 ); if ( ( *it1 ).startsWith( "-L" ) ) - new QListViewItem( outsidelibdir_listview, outsidelibdir_listview->lastItem(), ( *it1 ).mid( 2 ) ); + new TQListViewItem( outsidelibdir_listview, outsidelibdir_listview->lastItem(), ( *it1 ).mid( 2 ) ); else { - new QListViewItem( outsidelib_listview, outsidelib_listview->lastItem(), ( *it1 ) ); + new TQListViewItem( outsidelib_listview, outsidelib_listview->lastItem(), ( *it1 ) ); } } - for( QStringList::const_iterator it = intLibList.begin(); it != intLibList.end(); ++it ) + for( TQStringList::const_iterator it = intLibList.begin(); it != intLibList.end(); ++it ) { - QString lib = *it; + TQString lib = *it; if( !lib.startsWith( "-L" ) ) { insidelib_listview->insertItem( items[lib] ); items.remove(lib); } } - for( QMap<QString,InsideCheckListItem*>::ConstIterator it3 = items.begin(); it3 != items.end(); it3++ ) + for( TQMap<TQString,InsideCheckListItem*>::ConstIterator it3 = items.begin(); it3 != items.end(); it3++ ) { insidelib_listview->insertItem( it3.data() ); } @@ -1185,25 +1185,25 @@ void ProjectConfigurationDlg::updateLibControls() void ProjectConfigurationDlg::updateDependenciesControl( ) { - QPtrList <QMakeScopeItem> itemList = getAllProjects(); + TQPtrList <QMakeScopeItem> itemList = getAllProjects(); intDeps_view->setSorting( -1, false ); extDeps_view->setSorting( -1, false ); intDeps_view->clear(); extDeps_view->clear(); - QStringList depsList = myProjectItem->scope->variableValues( "TARGETDEPS" ); - QStringList intDepList = depsList; - QMap<QString,InsideCheckListItem*> items; + TQStringList depsList = myProjectItem->scope->variableValues( "TARGETDEPS" ); + TQStringList intDepList = depsList; + TQMap<TQString,InsideCheckListItem*> items; QMakeScopeItem *item = itemList.first(); while ( item ) { - QStringList templateval = item->scope->variableValues( "TEMPLATE" ); + TQStringList templateval = item->scope->variableValues( "TEMPLATE" ); if ( templateval.findIndex( "lib" ) != -1 || templateval.findIndex( "app" ) != -1 ) { - QString tmpLib; - QStringList values = item->scope->variableValues( "CONFIG" ); + TQString tmpLib; + TQStringList values = item->scope->variableValues( "CONFIG" ); if ( templateval.findIndex( "lib" ) != -1 && values.findIndex( "dll" ) != -1 ) tmpLib = item->getSharedLibAddObject( myProjectItem->scope->projectDir() ); else if ( templateval.findIndex( "lib" ) != -1 ) @@ -1225,20 +1225,20 @@ void ProjectConfigurationDlg::updateDependenciesControl( ) //add all other prj in itemList unchecked extDeps_view->clear(); - for ( QStringList::Iterator it1 = depsList.begin();it1 != depsList.end();++it1 ) + for ( TQStringList::Iterator it1 = depsList.begin();it1 != depsList.end();++it1 ) { intDepList << *it1; - new QListViewItem( extDeps_view, extDeps_view->lastItem(), ( *it1 ) ); + new TQListViewItem( extDeps_view, extDeps_view->lastItem(), ( *it1 ) ); } - for( QStringList::const_iterator it = intDepList.begin(); it != intDepList.end(); ++it ) + for( TQStringList::const_iterator it = intDepList.begin(); it != intDepList.end(); ++it ) { intDeps_view->insertItem( items[*it] ); items.remove(*it); } - for( QMap<QString,InsideCheckListItem*>::ConstIterator it2 = items.begin(); it2 != items.end(); it2++ ) + for( TQMap<TQString,InsideCheckListItem*>::ConstIterator it2 = items.begin(); it2 != items.end(); it2++ ) { intDeps_view->insertItem( it2.data() ); } @@ -1251,7 +1251,7 @@ void ProjectConfigurationDlg::updateBuildOrderControl() if ( myProjectItem->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) != -1 ) { - QPtrList <QMakeScopeItem> itemList; + TQPtrList <QMakeScopeItem> itemList; QMakeScopeItem *item = static_cast<QMakeScopeItem*>( myProjectItem->firstChild() ); while ( item ) @@ -1263,8 +1263,8 @@ void ProjectConfigurationDlg::updateBuildOrderControl() incaddTab->setEnabled( false ); buildorder_listview->setSorting( -1, false ); buildorder_listview->clear(); - QStringList buildList = myProjectItem->scope->variableValues( "SUBDIRS" ); - QStringList::Iterator it1 = buildList.begin(); + TQStringList buildList = myProjectItem->scope->variableValues( "SUBDIRS" ); + TQStringList::Iterator it1 = buildList.begin(); for ( ;it1 != buildList.end();++it1 ) { item = itemList.first(); @@ -1274,7 +1274,7 @@ void ProjectConfigurationDlg::updateBuildOrderControl() { if ( item->text( 0 ) == ( *it1 ) ) { - new QListViewItem( buildorder_listview, buildorder_listview->lastItem(), item->text( 0 ) ); + new TQListViewItem( buildorder_listview, buildorder_listview->lastItem(), item->text( 0 ) ); itemList.take(); break; } @@ -1295,7 +1295,7 @@ void ProjectConfigurationDlg::buildorderMoveUpClicked() return ; } - QListViewItem *item = buildorder_listview->firstChild(); + TQListViewItem *item = buildorder_listview->firstChild(); while ( item->nextSibling() != buildorder_listview->currentItem() ) item = item->nextSibling(); item->moveItem( buildorder_listview->currentItem() ); @@ -1325,7 +1325,7 @@ void ProjectConfigurationDlg::insideIncMoveUpClicked() return ; } - QListViewItem *item = insideinc_listview->firstChild(); + TQListViewItem *item = insideinc_listview->firstChild(); while ( item->nextSibling() != insideinc_listview->currentItem() ) item = item->nextSibling(); item->moveItem( insideinc_listview->currentItem() ); @@ -1354,7 +1354,7 @@ void ProjectConfigurationDlg::outsideIncMoveUpClicked() return ; } - QListViewItem *item = outsideinc_listview->firstChild(); + TQListViewItem *item = outsideinc_listview->firstChild(); while ( item->nextSibling() != outsideinc_listview->currentItem() ) item = item->nextSibling(); item->moveItem( outsideinc_listview->currentItem() ); @@ -1379,15 +1379,15 @@ void ProjectConfigurationDlg::outsideIncAddClicked() { KURLRequesterDlg dialog( "", i18n( "Add include directory:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - dialog.urlRequester() ->setURL( QString::null ); + dialog.urlRequester() ->setURL( TQString::null ); dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir() ) ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString dir = dialog.urlRequester() ->url(); + TQString dir = dialog.urlRequester() ->url(); if ( !dir.isEmpty() ) { - new QListViewItem( outsideinc_listview, dir ); + new TQListViewItem( outsideinc_listview, dir ); activateApply( 0 ); } } @@ -1408,7 +1408,7 @@ void ProjectConfigurationDlg::insideLibMoveUpClicked() return ; } - QListViewItem *item = insidelib_listview->firstChild(); + TQListViewItem *item = insidelib_listview->firstChild(); while ( item->nextSibling() != insidelib_listview->currentItem() ) item = item->nextSibling(); item->moveItem( insidelib_listview->currentItem() ); @@ -1437,7 +1437,7 @@ void ProjectConfigurationDlg::outsideLibMoveUpClicked() return ; } - QListViewItem *item = outsidelib_listview->firstChild(); + TQListViewItem *item = outsidelib_listview->firstChild(); while ( item->nextSibling() != outsidelib_listview->currentItem() ) item = item->nextSibling(); item->moveItem( outsidelib_listview->currentItem() ); @@ -1463,40 +1463,40 @@ void ProjectConfigurationDlg::outsideLibAddClicked() KURLRequesterDlg dialog( "", i18n( "Add Library: Either choose the .a/.so file or give -l<libname>" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); dialog.urlRequester() ->setFilter( "*.so|"+i18n("Shared Library (*.so)")+"\n*.a|"+i18n("Static Library (*.a)") ); - dialog.urlRequester() ->setURL( QString::null ); + dialog.urlRequester() ->setURL( TQString::null ); dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir() ) ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString file = dialog.urlRequester() ->url(); + TQString file = dialog.urlRequester() ->url(); if ( !file.isEmpty() ) { if( file.startsWith("-l") ) { - new QListViewItem( outsidelib_listview, file ); + new TQListViewItem( outsidelib_listview, file ); activateApply( 0 ); } else { - QFileInfo fi(file); + TQFileInfo fi(file); if( !fi.exists() ) { - new QListViewItem( outsidelib_listview, file );; + new TQListViewItem( outsidelib_listview, file );; activateApply( 0 ); } if( fi.extension(false) == "a" ) { - new QListViewItem( outsidelib_listview, file ); + new TQListViewItem( outsidelib_listview, file ); activateApply( 0 ); }else if ( fi.extension(false) == "so" ) { - QString path = fi.dirPath( true ); - QString name = fi.fileName(); + TQString path = fi.dirPath( true ); + TQString name = fi.fileName(); if( name.startsWith( "lib" ) ) name = name.mid(3); name = "-l"+name.left( name.length() - 3 ); - new QListViewItem( outsidelib_listview, name ); - new QListViewItem( outsidelibdir_listview, path ); + new TQListViewItem( outsidelib_listview, name ); + new TQListViewItem( outsidelibdir_listview, path ); activateApply( 0 ); }else return; @@ -1521,7 +1521,7 @@ void ProjectConfigurationDlg::outsideLibDirMoveUpClicked() return ; } - QListViewItem *item = outsidelibdir_listview->firstChild(); + TQListViewItem *item = outsidelibdir_listview->firstChild(); while ( item->nextSibling() != outsidelibdir_listview->currentItem() ) item = item->nextSibling(); item->moveItem( outsidelibdir_listview->currentItem() ); @@ -1546,15 +1546,15 @@ void ProjectConfigurationDlg::outsideLibDirAddClicked() { KURLRequesterDlg dialog( "", i18n( "Add library directory:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - dialog.urlRequester() ->setURL( QString::null ); + dialog.urlRequester() ->setURL( TQString::null ); dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir() ) ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString dir = dialog.urlRequester() ->url(); + TQString dir = dialog.urlRequester() ->url(); if ( !dir.isEmpty() ) { - new QListViewItem( outsidelibdir_listview, dir ); + new TQListViewItem( outsidelibdir_listview, dir ); activateApply( 0 ); } } @@ -1568,13 +1568,13 @@ void ProjectConfigurationDlg::outsideLibDirRemoveClicked() void ProjectConfigurationDlg::outsideIncEditClicked() { - QListViewItem * item = outsideinc_listview->currentItem(); + TQListViewItem * item = outsideinc_listview->currentItem(); if ( item == NULL ) return ; - QString text = item->text( 0 ); + TQString text = item->text( 0 ); KURLRequesterDlg dialog( text, i18n( "Change include directory:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - if( QFileInfo(text).isRelative() ) + if( TQFileInfo(text).isRelative() ) { dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir()+"/"+text ) ); @@ -1585,9 +1585,9 @@ void ProjectConfigurationDlg::outsideIncEditClicked() dialog.urlRequester() ->fileDialog() ->setURL( KURL( text ) ); } dialog.urlRequester() ->setURL( text ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString dir = dialog.urlRequester() ->url(); + TQString dir = dialog.urlRequester() ->url(); if ( !dir.isEmpty() ) { item->setText( 0, dir ); @@ -1597,13 +1597,13 @@ void ProjectConfigurationDlg::outsideIncEditClicked() void ProjectConfigurationDlg::outsideLibEditClicked() { - QListViewItem *item = outsidelib_listview->currentItem(); + TQListViewItem *item = outsidelib_listview->currentItem(); if ( item == NULL ) return ; - QString text = item->text( 0 ); + TQString text = item->text( 0 ); KURLRequesterDlg dialog( text, i18n( "Change Library:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); - if( QFileInfo(text).isRelative() ) + if( TQFileInfo(text).isRelative() ) { dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir()+"/"+text ) ); @@ -1613,9 +1613,9 @@ void ProjectConfigurationDlg::outsideLibEditClicked() dialog.urlRequester() ->fileDialog() ->setURL( KURL( text ) ); } dialog.urlRequester() ->setURL( text ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString file = dialog.urlRequester() ->url(); + TQString file = dialog.urlRequester() ->url(); if ( !file.isEmpty() ) { if( file.startsWith("-l") ) @@ -1625,7 +1625,7 @@ void ProjectConfigurationDlg::outsideLibEditClicked() } else { - QFileInfo fi(file); + TQFileInfo fi(file); if( !fi.exists() ) { item->setText( 0, file ); @@ -1637,13 +1637,13 @@ void ProjectConfigurationDlg::outsideLibEditClicked() activateApply( 0 ); }else if ( fi.extension(false) == "so" ) { - QString path = fi.dirPath( true ); - QString name = fi.fileName(); + TQString path = fi.dirPath( true ); + TQString name = fi.fileName(); if( name.startsWith( "lib" ) ) name = name.mid(3); name = "-l"+name.left( name.length() - 3 ); item->setText( 0, name ); - new QListViewItem( outsidelibdir_listview, path ); + new TQListViewItem( outsidelibdir_listview, path ); activateApply( 0 ); }else return; @@ -1653,14 +1653,14 @@ void ProjectConfigurationDlg::outsideLibEditClicked() void ProjectConfigurationDlg::outsideLibDirEditClicked() { - QListViewItem * item = outsidelibdir_listview->currentItem(); + TQListViewItem * item = outsidelibdir_listview->currentItem(); if ( item == NULL ) return ; - QString text = item->text( 0 ); + TQString text = item->text( 0 ); KURLRequesterDlg dialog( text, i18n( "Change library directory:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - if( QFileInfo(text).isRelative() ) + if( TQFileInfo(text).isRelative() ) { dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir()+"/"+text ) ); @@ -1671,9 +1671,9 @@ void ProjectConfigurationDlg::outsideLibDirEditClicked() dialog.urlRequester() ->fileDialog() ->setURL( KURL( text ) ); } dialog.urlRequester() ->setURL( text ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString dir = dialog.urlRequester() ->url(); + TQString dir = dialog.urlRequester() ->url(); if ( !dir.isEmpty() ) { item->setText( 0, dir ); @@ -1686,28 +1686,28 @@ void ProjectConfigurationDlg::extAdd_button_clicked( ) { KURLRequesterDlg dialog( "", i18n( "Add target:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::File | KFile::LocalOnly ); - dialog.urlRequester() ->setURL( QString::null ); + dialog.urlRequester() ->setURL( TQString::null ); dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir() ) ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString path = dialog.urlRequester() ->url(); + TQString path = dialog.urlRequester() ->url(); if ( !path.isEmpty() ) { - new QListViewItem( extDeps_view, path ); + new TQListViewItem( extDeps_view, path ); activateApply( 0 ); } } void ProjectConfigurationDlg::extEdit_button_clicked( ) { - QListViewItem * item = extDeps_view->currentItem(); + TQListViewItem * item = extDeps_view->currentItem(); if ( item == NULL ) return ; - QString text = item->text( 0 ); + TQString text = item->text( 0 ); KURLRequesterDlg dialog( text, i18n( "Change target:" ), 0, 0 ); dialog.urlRequester() ->setMode( KFile::File | KFile::LocalOnly ); - if( QFileInfo(text).isRelative() ) + if( TQFileInfo(text).isRelative() ) { dialog.urlRequester() ->completionObject() ->setDir( myProjectItem->scope->projectDir() ); dialog.urlRequester() ->fileDialog() ->setURL( KURL( myProjectItem->scope->projectDir()+"/"+text ) ); @@ -1718,9 +1718,9 @@ void ProjectConfigurationDlg::extEdit_button_clicked( ) dialog.urlRequester() ->fileDialog() ->setURL( KURL( text ) ); } dialog.urlRequester() ->setURL( text ); - if ( dialog.exec() != QDialog::Accepted ) + if ( dialog.exec() != TQDialog::Accepted ) return ; - QString path = dialog.urlRequester() ->url(); + TQString path = dialog.urlRequester() ->url(); if ( !path.isEmpty() ) { item->setText( 0, path ); @@ -1748,7 +1748,7 @@ void ProjectConfigurationDlg::extMoveUp_button_clicked( ) return ; } - QListViewItem *item = extDeps_view->firstChild(); + TQListViewItem *item = extDeps_view->firstChild(); while ( item->nextSibling() != extDeps_view->currentItem() ) item = item->nextSibling(); item->moveItem( extDeps_view->currentItem() ); @@ -1781,7 +1781,7 @@ void ProjectConfigurationDlg::intMoveUp_button_clicked( ) return ; } - QListViewItem *item = intDeps_view->firstChild(); + TQListViewItem *item = intDeps_view->firstChild(); while ( item->nextSibling() != intDeps_view->currentItem() ) item = item->nextSibling(); item->moveItem( intDeps_view->currentItem() ); @@ -1790,7 +1790,7 @@ void ProjectConfigurationDlg::intMoveUp_button_clicked( ) void ProjectConfigurationDlg::addCustomValueClicked() { - QMap<QString, QString> customvar; + TQMap<TQString, TQString> customvar; customvar["var"] = i18n("Name"); customvar["op"] = "="; customvar["values"] = i18n("Value"); @@ -1804,7 +1804,7 @@ void ProjectConfigurationDlg::addCustomValueClicked() } void ProjectConfigurationDlg::removeCustomValueClicked() { - QListViewItem * item = customVariables->currentItem(); + TQListViewItem * item = customVariables->currentItem(); if ( item ) { myProjectItem->scope->removeCustomVariable( item->key(0, true).toUInt() ); @@ -1829,7 +1829,7 @@ void ProjectConfigurationDlg::removeCustomValueClicked() void ProjectConfigurationDlg::upCustomValueClicked() { // custom vars - QListViewItem * item = customVariables->firstChild(); + TQListViewItem * item = customVariables->firstChild(); if ( customVariables->currentItem() == item ) { KNotifyClient::beep(); @@ -1857,7 +1857,7 @@ void ProjectConfigurationDlg::newCustomVariableActive( ) customVariableOp->blockSignals(true); customVariableName->blockSignals(true); customVariableData->blockSignals(true); - QListViewItem * item = customVariables->currentItem(); + TQListViewItem * item = customVariables->currentItem(); if ( item ) { customVariableName->setText( item->text( 0 ) ); @@ -2021,26 +2021,26 @@ void ProjectConfigurationDlg::activateApply( int ) { buttonApply->setEnabled( true ); } -void ProjectConfigurationDlg::activateApply( const QString& ) +void ProjectConfigurationDlg::activateApply( const TQString& ) { buttonApply->setEnabled( true ); } -void ProjectConfigurationDlg::activateApply( QListViewItem* ) +void ProjectConfigurationDlg::activateApply( TQListViewItem* ) { buttonApply->setEnabled( true ); } void ProjectConfigurationDlg::removeSharedLibDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); if( prjItem == myProjectItem || !prjItem->isEnabled() ) continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("LIBS").findIndex(infos["shared_lib"]) != -1 ) prjItem->scope->removeFromPlusOp("LIBS", infos["shared_lib"]); @@ -2057,14 +2057,14 @@ void ProjectConfigurationDlg::removeSharedLibDeps() void ProjectConfigurationDlg::addStaticLibDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); if( prjItem == myProjectItem || !prjItem->isEnabled() ) continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["app_depend"]) != -1 || prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["shared_depend"]) != -1 ) @@ -2078,7 +2078,7 @@ void ProjectConfigurationDlg::addStaticLibDeps() void ProjectConfigurationDlg::removeStaticLibDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); @@ -2086,7 +2086,7 @@ void ProjectConfigurationDlg::removeStaticLibDeps() continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("LIBS").findIndex(infos["static_lib"]) != -1 ) prjItem->scope->removeFromPlusOp("LIBS", infos["static_lib"]); @@ -2100,14 +2100,14 @@ void ProjectConfigurationDlg::removeStaticLibDeps() void ProjectConfigurationDlg::addSharedLibDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); if( prjItem == myProjectItem || !prjItem->isEnabled() ) continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["app_depend"]) != -1 || prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["static_depend"]) != -1 ) { @@ -2121,14 +2121,14 @@ void ProjectConfigurationDlg::addSharedLibDeps() void ProjectConfigurationDlg::removeAppDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); if( prjItem == myProjectItem || !prjItem->isEnabled() ) continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["app_depend"]) != -1 ) { @@ -2140,14 +2140,14 @@ void ProjectConfigurationDlg::removeAppDeps() void ProjectConfigurationDlg::addAppDeps() { - QListViewItemIterator it(myProjectItem->listView()); + TQListViewItemIterator it(myProjectItem->listView()); for( ; it.current() ; ++it ) { QMakeScopeItem* prjItem = static_cast<QMakeScopeItem*>( it.current() ); if( prjItem == myProjectItem || !prjItem->isEnabled() ) continue; - QMap<QString, QString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); + TQMap<TQString, TQString> infos = myProjectItem->getLibInfos(prjItem->scope->projectDir()); if( prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["shared_depend"]) != -1 || prjItem->scope->variableValues("TARGETDEPS").findIndex(infos["static_depend"]) != -1 ) @@ -2161,7 +2161,7 @@ void ProjectConfigurationDlg::addAppDeps() void ProjectConfigurationDlg::customVarChanged() { - QListViewItem * item = customVariables->currentItem(); + TQListViewItem * item = customVariables->currentItem(); if ( item ) { item->setText( 0, customVariableName->text() ); diff --git a/buildtools/qmake/projectconfigurationdlg.h b/buildtools/qmake/projectconfigurationdlg.h index 246fb388..313882c4 100644 --- a/buildtools/qmake/projectconfigurationdlg.h +++ b/buildtools/qmake/projectconfigurationdlg.h @@ -21,9 +21,9 @@ #include "projectconfigurationdlgbase.h" //#include "trollprojectwidget.h" #include <kdeversion.h> -#include <qlistview.h> +#include <tqlistview.h> #include <klistview.h> -#include <qmap.h> +#include <tqmap.h> class QMakeScopeItem; class KListViewItem; @@ -34,9 +34,9 @@ class TrollProjectWidget; class InsideCheckListItem : public QCheckListItem { public: - InsideCheckListItem( QListView *parent, QMakeScopeItem *item, ProjectConfigurationDlg *config ); + InsideCheckListItem( TQListView *parent, QMakeScopeItem *item, ProjectConfigurationDlg *config ); - InsideCheckListItem( QListView *parent, QListViewItem *after, QMakeScopeItem *item, ProjectConfigurationDlg *config ); + InsideCheckListItem( TQListView *parent, TQListViewItem *after, QMakeScopeItem *item, ProjectConfigurationDlg *config ); QMakeScopeItem *prjItem; ProjectConfigurationDlg *m_config; @@ -47,8 +47,8 @@ protected: class CustomVarListItem : public KListViewItem { public: - CustomVarListItem( QListView*, unsigned int, QMap<QString, QString> ); - QString key(int column, bool ascending) const; + CustomVarListItem( TQListView*, unsigned int, TQMap<TQString, TQString> ); + TQString key(int column, bool ascending) const; private: unsigned int m_key; }; @@ -56,7 +56,7 @@ class CustomVarListItem : public KListViewItem class ProjectConfigurationDlg : public ProjectConfigurationDlgBase { public: - ProjectConfigurationDlg( QListView *_prjList, TrollProjectWidget* _prjWidget, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ProjectConfigurationDlg( TQListView *_prjList, TrollProjectWidget* _prjWidget, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~ProjectConfigurationDlg(); void updateControls(); void updateSubproject( QMakeScopeItem* _item ); @@ -114,22 +114,22 @@ public slots: virtual void reject(); virtual void apply(); virtual void activateApply( int ); - virtual void activateApply( const QString& ); + virtual void activateApply( const TQString& ); void updateIncludeControl(); void updateLibControls(); void updateBuildOrderControl(); void updateDependenciesControl(); - virtual void activateApply(QListViewItem*); + virtual void activateApply(TQListViewItem*); virtual void customVarChanged(); protected: - QListView *prjList; + TQListView *prjList; QMakeScopeItem *myProjectItem; - QPtrList <QMakeScopeItem> getAllProjects(); + TQPtrList <QMakeScopeItem> getAllProjects(); TrollProjectWidget* prjWidget; - void getAllSubProjects( QMakeScopeItem *item, QPtrList<QMakeScopeItem> *itemList ); + void getAllSubProjects( QMakeScopeItem *item, TQPtrList<QMakeScopeItem> *itemList ); private: void removeSharedLibDeps(); diff --git a/buildtools/qmake/qmakedefaultopts.cpp b/buildtools/qmake/qmakedefaultopts.cpp index 14ca7aa0..fa7711c9 100644 --- a/buildtools/qmake/qmakedefaultopts.cpp +++ b/buildtools/qmake/qmakedefaultopts.cpp @@ -13,7 +13,7 @@ #include <kdebug.h> #include <ktempfile.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kprocess.h> #include <blockingkprocess.h> @@ -23,7 +23,7 @@ QMakeDefaultOpts::QMakeDefaultOpts() } -void QMakeDefaultOpts::readVariables( const QString& qmake, const QString& projdir ) +void QMakeDefaultOpts::readVariables( const TQString& qmake, const TQString& projdir ) { KTempFile makefile (projdir+"/", ".mf"); KTempFile qmakefile(projdir+"/", ".pro"); @@ -53,16 +53,16 @@ void QMakeDefaultOpts::readVariables( const QString& qmake, const QString& projd { makefile.unlink(); qmakefile.unlink(); - QStringList lines = QStringList::split( "\n", proc.stdErr() ); + TQStringList lines = TQStringList::split( "\n", proc.stdErr() ); kdDebug(9024) << "Got " << lines.count() << " lines" << endl; - for ( QStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) + for ( TQStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) { - QString line = *it; - QRegExp re( "DEBUG 1: ([^ =:]+) === (.*)" ); + TQString line = *it; + TQRegExp re( "DEBUG 1: ([^ =:]+) === (.*)" ); if ( re.exactMatch( line ) ) { - QString var = re.cap( 1 ); - QStringList values = QStringList::split( " :: ", re.cap( 2 ) ); + TQString var = re.cap( 1 ); + TQStringList values = TQStringList::split( " :: ", re.cap( 2 ) ); m_variables[var] = values; m_keys.append( var ); } @@ -75,15 +75,15 @@ QMakeDefaultOpts::~QMakeDefaultOpts() { } -const QStringList QMakeDefaultOpts::variableValues( const QString& var ) const +const TQStringList QMakeDefaultOpts::variableValues( const TQString& var ) const { -// QStringList result; +// TQStringList result; if ( m_variables.contains(var) ) return m_variables[var]; - return QStringList(); + return TQStringList(); } -const QStringList& QMakeDefaultOpts::variables() const +const TQStringList& QMakeDefaultOpts::variables() const { return m_keys; } diff --git a/buildtools/qmake/qmakedefaultopts.h b/buildtools/qmake/qmakedefaultopts.h index 63bab54b..f95d5608 100644 --- a/buildtools/qmake/qmakedefaultopts.h +++ b/buildtools/qmake/qmakedefaultopts.h @@ -12,9 +12,9 @@ #ifndef QMAKEDEFAULTOPTS_H #define QMAKEDEFAULTOPTS_H -#include <qmap.h> -#include <qstringlist.h> -// #include <qobject.h> +#include <tqmap.h> +#include <tqstringlist.h> +// #include <tqobject.h> // class KTempFile; // class BlockingKProcess; @@ -26,10 +26,10 @@ public: ~QMakeDefaultOpts(); - void readVariables( const QString& qtdir, const QString& projdir ); + void readVariables( const TQString& qtdir, const TQString& projdir ); - const QStringList variableValues( const QString& ) const; - const QStringList& variables() const; + const TQStringList variableValues( const TQString& ) const; + const TQStringList& variables() const; // signals: // void variablesRead(); @@ -39,8 +39,8 @@ public: // void slotFinished( KProcess* ); private: - QMap<QString, QStringList> m_variables; - QStringList m_keys; + TQMap<TQString, TQStringList> m_variables; + TQStringList m_keys; }; #endif diff --git a/buildtools/qmake/qmakeoptionswidget.cpp b/buildtools/qmake/qmakeoptionswidget.cpp index 89f63c1e..c2f4cfdd 100644 --- a/buildtools/qmake/qmakeoptionswidget.cpp +++ b/buildtools/qmake/qmakeoptionswidget.cpp @@ -11,16 +11,16 @@ #include "qmakeoptionswidget.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kcombobox.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include <kurlrequester.h> #include <domutil.h> #include <kdebug.h> -QMakeOptionsWidget::QMakeOptionsWidget( const QString& projectdir, QDomDocument &dom, const QString &configGroup, - QWidget *parent, const char *name ) +QMakeOptionsWidget::QMakeOptionsWidget( const TQString& projectdir, TQDomDocument &dom, const TQString &configGroup, + TQWidget *parent, const char *name ) : QMakeOptionsWidgetBase( parent, name ), m_dom( dom ), m_configGroup( configGroup ), m_projectDir( projectdir ) { @@ -53,8 +53,8 @@ void QMakeOptionsWidget::accept() DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/enableFilenamesOnly", checkFilenamesOnly->isChecked() ); DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/showVariablesInTree", showVariablesInTree->isChecked() ); DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/showParseErrors", checkShowParseErrors->isChecked() ); - QString projfile = qmakeProjectFile->url(); - if( projfile != m_projectDir && QFileInfo( projfile ).isFile() && ( projfile.endsWith( ".pro" ) || projfile.endsWith( ".pri" ) ) ) + TQString projfile = qmakeProjectFile->url(); + if( projfile != m_projectDir && TQFileInfo( projfile ).isFile() && ( projfile.endsWith( ".pro" ) || projfile.endsWith( ".pri" ) ) ) DomUtil::writeEntry( m_dom, m_configGroup + "/qmake/projectfile", projfile ); } diff --git a/buildtools/qmake/qmakeoptionswidget.h b/buildtools/qmake/qmakeoptionswidget.h index c50e4b44..ee50fde6 100644 --- a/buildtools/qmake/qmakeoptionswidget.h +++ b/buildtools/qmake/qmakeoptionswidget.h @@ -14,22 +14,22 @@ #include "qmakeoptionswidgetbase.h" -#include <qdom.h> +#include <tqdom.h> class QMakeOptionsWidget : public QMakeOptionsWidgetBase { Q_OBJECT public: - QMakeOptionsWidget( const QString& projectdir, QDomDocument &dom, const QString &configGroup, - QWidget *parent = 0, const char *name = 0 ); + QMakeOptionsWidget( const TQString& projectdir, TQDomDocument &dom, const TQString &configGroup, + TQWidget *parent = 0, const char *name = 0 ); ~QMakeOptionsWidget(); public slots: void accept(); private: - QDomDocument &m_dom; - QString m_configGroup; - QString m_projectDir; + TQDomDocument &m_dom; + TQString m_configGroup; + TQString m_projectDir; }; #endif diff --git a/buildtools/qmake/qmakescopeitem.cpp b/buildtools/qmake/qmakescopeitem.cpp index 66fa3c3f..73edf730 100644 --- a/buildtools/qmake/qmakescopeitem.cpp +++ b/buildtools/qmake/qmakescopeitem.cpp @@ -13,8 +13,8 @@ #include "qmakescopeitem.h" -#include <qdir.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqregexp.h> #include <kiconloader.h> #include <klocale.h> @@ -28,13 +28,13 @@ * Class qProjectItem */ -qProjectItem::qProjectItem( Type type, QListView *parent, const QString &text ) - : QListViewItem( parent, text ), typ( type ) +qProjectItem::qProjectItem( Type type, TQListView *parent, const TQString &text ) + : TQListViewItem( parent, text ), typ( type ) {} -qProjectItem::qProjectItem( Type type, qProjectItem *parent, const QString &text ) - : QListViewItem( parent, text ), typ( type ) +qProjectItem::qProjectItem( Type type, qProjectItem *parent, const TQString &text ) + : TQListViewItem( parent, text ), typ( type ) {} @@ -43,7 +43,7 @@ qProjectItem::qProjectItem( Type type, qProjectItem *parent, const QString &text * Class GroupItem */ -GroupItem::GroupItem( QListView *lv, GroupType type, const QString &text, QMakeScopeItem* spitem ) +GroupItem::GroupItem( TQListView *lv, GroupType type, const TQString &text, QMakeScopeItem* spitem ) : qProjectItem( Group, lv, text ) { this->owner = spitem; @@ -52,7 +52,7 @@ GroupItem::GroupItem( QListView *lv, GroupType type, const QString &text, QMakeS setPixmap( 0, SmallIcon( "tar" ) ); } -GroupItem::GroupType GroupItem::groupTypeForExtension( const QString &ext ) +GroupItem::GroupType GroupItem::groupTypeForExtension( const TQString &ext ) { if ( ext == "cpp" || ext == "cc" || ext == "c" || ext == "C" || ext == "c++" || ext == "cxx" || ext == "ocl" ) return Sources; @@ -76,7 +76,7 @@ GroupItem::GroupType GroupItem::groupTypeForExtension( const QString &ext ) return Distfiles; } -void GroupItem::groupTypeMeanings( GroupItem::GroupType type, QString& title, QString& ext ) +void GroupItem::groupTypeMeanings( GroupItem::GroupType type, TQString& title, TQString& ext ) { switch ( type ) { @@ -135,22 +135,22 @@ void GroupItem::groupTypeMeanings( GroupItem::GroupType type, QString& title, QS } } -void GroupItem::paintCell( QPainter* p, const QColorGroup& c, int column, int width, int align ) +void GroupItem::paintCell( TQPainter* p, const TQColorGroup& c, int column, int width, int align ) { - QColorGroup cg( c ); + TQColorGroup cg( c ); if ( !firstChild() ) { - cg.setColor( QColorGroup::Text, cg.mid() ); + cg.setColor( TQColorGroup::Text, cg.mid() ); } qProjectItem::paintCell( p, cg, column, width, align ); } -void GroupItem::addFileToScope( const QString& filename ) +void GroupItem::addFileToScope( const TQString& filename ) { - QString file = filename; + TQString file = filename; - QPtrListIterator<FileItem> it( files ); + TQPtrListIterator<FileItem> it( files ); while ( it.current() != 0 ) { if ( it.current() ->text( 0 ) == file ) //File already exists in this subproject @@ -160,7 +160,7 @@ void GroupItem::addFileToScope( const QString& filename ) FileItem *fitem = owner->createFileItem( file ); - fitem->uiFileLink = owner->m_widget->getUiFileLink( owner->relativePath() + QString( QChar( QDir::separator() ) ), owner->scope->resolveVariables( filename ) ); + fitem->uiFileLink = owner->m_widget->getUiFileLink( owner->relativePath() + TQString( TQChar( TQDir::separator() ) ), owner->scope->resolveVariables( filename ) ); files.append( fitem ); switch ( groupType ) { @@ -206,11 +206,11 @@ void GroupItem::addFileToScope( const QString& filename ) owner->scope->saveToFile(); } -void GroupItem::removeFileFromScope( const QString& filename ) +void GroupItem::removeFileFromScope( const TQString& filename ) { - QString filePath; + TQString filePath; - QPtrListIterator<FileItem> it( files ); + TQPtrListIterator<FileItem> it( files ); while ( it.current() != 0 ) { if ( it.current() ->text( 0 ) == filename ) //File already exists in this subproject @@ -271,7 +271,7 @@ void GroupItem::removeFileFromScope( const QString& filename ) owner->scope->saveToFile(); } -void GroupItem::addInstallObject( const QString& objectname ) +void GroupItem::addInstallObject( const TQString& objectname ) { GroupItem * objitem = owner->createGroupItem( GroupItem::InstallObject, objectname, owner ); owner->addValue( "INSTALLS", objectname ); @@ -291,7 +291,7 @@ void GroupItem::removeInstallObject( GroupItem* item ) * Class FileItem */ -FileItem::FileItem( QListView *lv, const QString &text ) +FileItem::FileItem( TQListView *lv, const TQString &text ) : qProjectItem( File, lv, text ), uiFileLink( "" ) { // if excluded is set the file is excluded in the subproject/project. @@ -305,7 +305,7 @@ FileItem::FileItem( QListView *lv, const QString &text ) * Class QMakeScopeItem */ -QMakeScopeItem::QMakeScopeItem( QListView *parent, const QString &text, Scope* s, TrollProjectWidget* widget ) +QMakeScopeItem::QMakeScopeItem( TQListView *parent, const TQString &text, Scope* s, TrollProjectWidget* widget ) : qProjectItem( Subproject, parent, text ), scope( s ), m_widget( widget ) { // configuration.m_template = QTMP_APPLICATION; @@ -313,7 +313,7 @@ QMakeScopeItem::QMakeScopeItem( QListView *parent, const QString &text, Scope* s } -QMakeScopeItem::QMakeScopeItem( QMakeScopeItem *parent, const QString &text, Scope* s ) +QMakeScopeItem::QMakeScopeItem( QMakeScopeItem *parent, const TQString &text, Scope* s ) : qProjectItem( Subproject, parent, text ), scope( s ), m_widget( parent->m_widget ) { init(); @@ -321,7 +321,7 @@ QMakeScopeItem::QMakeScopeItem( QMakeScopeItem *parent, const QString &text, Sco QMakeScopeItem::~QMakeScopeItem() { - QMap<GroupItem::GroupType, GroupItem*>::iterator it; + TQMap<GroupItem::GroupType, GroupItem*>::iterator it; for ( it = groups.begin() ; it != groups.end() ; ++it ) { GroupItem* s = it.data(); @@ -331,7 +331,7 @@ QMakeScopeItem::~QMakeScopeItem() } -QString QMakeScopeItem::relativePath() +TQString QMakeScopeItem::relativePath() { if( !scope || !scope->parent() ) return ""; @@ -352,39 +352,39 @@ QString QMakeScopeItem::relativePath() // return scope->scopeName(); // else if ( scope->scopeType() == Scope::ProjectScope ) // return ( static_cast<QMakeScopeItem*>( parent() ) ->relativePath() -// + QString( QChar( QDir::separator() ) ) + scope->scopeName() ); +// + TQString( TQChar( TQDir::separator() ) ) + scope->scopeName() ); // else // return ( static_cast<QMakeScopeItem*>( parent() ) ->relativePath() ); } -QString QMakeScopeItem::getSharedLibAddObject( QString basePath ) +TQString QMakeScopeItem::getSharedLibAddObject( TQString basePath ) { if ( scope->variableValues( "CONFIG" ).findIndex( "dll" ) != -1 ) { - QString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); + TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); if ( !scope->variableValues( "DESTDIR" ).front().isEmpty() ) { - if ( QDir::isRelativePath( scope->variableValues( "DESTDIR" ).front() ) ) - tmpPath += QString( QChar( QDir::separator() ) ) + scope->variableValues( "DESTDIR" ).front(); + if ( TQDir::isRelativePath( scope->variableValues( "DESTDIR" ).front() ) ) + tmpPath += TQString( TQChar( TQDir::separator() ) ) + scope->variableValues( "DESTDIR" ).front(); else tmpPath = scope->variableValues( "DESTDIR" ).front(); } else { - tmpPath += QString( QChar( QDir::separator() ) ); + tmpPath += TQString( TQChar( TQDir::separator() ) ); } - tmpPath = QDir::cleanDirPath( tmpPath ); + tmpPath = TQDir::cleanDirPath( tmpPath ); - QString libString; + TQString libString; if ( !scope->variableValues( "TARGET" ).front().isEmpty() ) { - libString = tmpPath + QString( QChar( QDir::separator() ) ) + "lib" + scope->variableValues( "TARGET" ).front() + ".so"; + libString = tmpPath + TQString( TQChar( TQDir::separator() ) ) + "lib" + scope->variableValues( "TARGET" ).front() + ".so"; } else { - libString = tmpPath + QString( QChar( QDir::separator() ) ) + "lib" + scope->projectName() + ".so"; + libString = tmpPath + TQString( TQChar( TQDir::separator() ) ) + "lib" + scope->projectName() + ".so"; } return ( libString ); @@ -392,38 +392,38 @@ QString QMakeScopeItem::getSharedLibAddObject( QString basePath ) return ""; } -QString QMakeScopeItem::getApplicationObject( QString basePath ) +TQString QMakeScopeItem::getApplicationObject( TQString basePath ) { - QString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); - QString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); + TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); + TQString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); if ( !destdir.isEmpty() ) { - if ( QDir::isRelativePath( destdir ) ) - tmpPath += QString( QChar( QDir::separator() ) ) + destdir; + if ( TQDir::isRelativePath( destdir ) ) + tmpPath += TQString( TQChar( TQDir::separator() ) ) + destdir; else tmpPath = destdir; } else { - tmpPath += QString( QChar( QDir::separator() ) ); + tmpPath += TQString( TQChar( TQDir::separator() ) ); } - tmpPath = QDir::cleanDirPath( tmpPath ); + tmpPath = TQDir::cleanDirPath( tmpPath ); - QString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); + TQString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); if ( target.isEmpty() ) - return tmpPath + QString( QChar( QDir::separator() ) ) + scope->projectName(); + return tmpPath + TQString( TQChar( TQDir::separator() ) ) + scope->projectName(); else - return tmpPath + QString( QChar( QDir::separator() ) ) + target; + return tmpPath + TQString( TQChar( TQDir::separator() ) ) + target; } -QString QMakeScopeItem::getLibAddObject( QString basePath ) +TQString QMakeScopeItem::getLibAddObject( TQString basePath ) { if ( scope->variableValues( "CONFIG" ).findIndex( "dll" ) != -1 ) { - QString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); + TQString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); if ( !target.isEmpty() ) { return ( "-l" + target ); @@ -436,32 +436,32 @@ QString QMakeScopeItem::getLibAddObject( QString basePath ) else if ( scope->variableValues( "CONFIG" ).findIndex( "staticlib" ) != -1 || scope->variableValues("TEMPLATE").findIndex("lib") != -1 ) { - QString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); - QString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); + TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); + TQString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); if ( !destdir.isEmpty() ) { - if ( QDir::isRelativePath( destdir ) ) - tmpPath += QString( QChar( QDir::separator() ) ) + destdir; + if ( TQDir::isRelativePath( destdir ) ) + tmpPath += TQString( TQChar( TQDir::separator() ) ) + destdir; else tmpPath = destdir; } else { - tmpPath += QString( QChar( QDir::separator() ) ); + tmpPath += TQString( TQChar( TQDir::separator() ) ); } - tmpPath = QDir::cleanDirPath( tmpPath ); + tmpPath = TQDir::cleanDirPath( tmpPath ); - QString libString; - QString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); + TQString libString; + TQString target = scope->resolveVariables( scope->variableValues( "TARGET" ).front() ); if ( !target.isEmpty() ) { - libString = tmpPath + QString( QChar( QDir::separator() ) ) + "lib" + target + ".a"; + libString = tmpPath + TQString( TQChar( TQDir::separator() ) ) + "lib" + target + ".a"; } else { - libString = tmpPath + QString( QChar( QDir::separator() ) ) + "lib" + scope->projectName() + ".a"; + libString = tmpPath + TQString( TQChar( TQDir::separator() ) ) + "lib" + scope->projectName() + ".a"; } return ( libString ); @@ -469,47 +469,47 @@ QString QMakeScopeItem::getLibAddObject( QString basePath ) return ( "" ); } -QString QMakeScopeItem::getLibAddPath( QString basePath ) +TQString QMakeScopeItem::getLibAddPath( TQString basePath ) { //PATH only add if shared lib if ( scope->variableValues( "CONFIG" ).findIndex( "dll" ) == -1 ) return ( "" ); - QString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); - QString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); + TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); + TQString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() ); if ( !destdir.isEmpty() ) { - if ( QDir::isRelativePath( destdir ) ) - tmpPath += QString( QChar( QDir::separator() ) ) + destdir; + if ( TQDir::isRelativePath( destdir ) ) + tmpPath += TQString( TQChar( TQDir::separator() ) ) + destdir; else tmpPath = destdir; } else { - tmpPath += QString( QChar( QDir::separator() ) ); + tmpPath += TQString( TQChar( TQDir::separator() ) ); } - tmpPath = QDir::cleanDirPath( tmpPath ); + tmpPath = TQDir::cleanDirPath( tmpPath ); return ( tmpPath ); } -QString QMakeScopeItem::getIncAddPath( QString basePath ) +TQString QMakeScopeItem::getIncAddPath( TQString basePath ) { - QString tmpPath = URLUtil::getRelativePath( basePath, scope->projectDir() ); - tmpPath = QDir::cleanDirPath( tmpPath ); + TQString tmpPath = URLUtil::getRelativePath( basePath, scope->projectDir() ); + tmpPath = TQDir::cleanDirPath( tmpPath ); return ( tmpPath ); } void QMakeScopeItem::buildSubTree() { - QValueList<Scope*>::const_iterator it; + TQValueList<Scope*>::const_iterator it; sortChildItems( 0, false ); - QValueList<Scope*> scopes = scope->scopesInOrder(); + TQValueList<Scope*> scopes = scope->scopesInOrder(); for ( it = scopes.begin(); it != scopes.end(); ++it ) { @@ -537,7 +537,7 @@ void QMakeScopeItem::init() } else { - QStringList tmp = scope->variableValues( "TEMPLATE" ); + TQStringList tmp = scope->variableValues( "TEMPLATE" ); if( scope->isEnabled() ) { if ( tmp.findIndex( "subdirs" ) != -1 ) @@ -565,19 +565,19 @@ void QMakeScopeItem::init() } } -GroupItem* QMakeScopeItem::createGroupItem( GroupItem::GroupType type, const QString& label, QMakeScopeItem* scopeitem ) +GroupItem* QMakeScopeItem::createGroupItem( GroupItem::GroupType type, const TQString& label, QMakeScopeItem* scopeitem ) { GroupItem * item = new GroupItem( scopeitem->listView(), type, label, scopeitem ); scopeitem->listView() ->takeItem( item ); return item; } -FileItem* QMakeScopeItem::createFileItem( const QString& name ) +FileItem* QMakeScopeItem::createFileItem( const TQString& name ) { - QString display = name; + TQString display = name; if( m_widget->showFilenamesOnly() ) { - int dirSepPos = name.findRev( QChar( QDir::separator() ) ); + int dirSepPos = name.findRev( TQChar( TQDir::separator() ) ); if ( dirSepPos != - 1 ) display = name.mid( dirSepPos + 1 ); } @@ -597,10 +597,10 @@ void QMakeScopeItem::buildGroups() { if( scope->variableValues("TEMPLATE").findIndex("subdirs") != -1 ) return; - QStringList values; + TQStringList values; GroupItem* item; - QStringList::iterator it; + TQStringList::iterator it; values = scope->variableValues( "INSTALLS" ); item = createGroupItem( GroupItem::InstallRoot, "INSTALLS", this ); @@ -610,13 +610,13 @@ void QMakeScopeItem::buildGroups() if ( ( *it ) == "target" ) continue; - QString path = scope->variableValues( *it + ".path" ).front(); + TQString path = scope->variableValues( *it + ".path" ).front(); GroupItem* installitem = createGroupItem( GroupItem::InstallObject, *it, this ); item->installs.append( installitem ); - QStringList files = scope -> variableValues( *it + ".files" ); + TQStringList files = scope -> variableValues( *it + ".files" ); if ( !files.isEmpty() ) { - QStringList::iterator filesit = files.begin(); + TQStringList::iterator filesit = files.begin(); for ( ;filesit != files.end(); ++filesit ) { installitem->files.append( createFileItem( *filesit ) ); @@ -704,7 +704,7 @@ void QMakeScopeItem::buildGroups() for ( it = values.begin(); it != values.end(); ++it ) { FileItem* fitem = createFileItem( *it ); - fitem->uiFileLink = m_widget->getUiFileLink( relativePath() + QString( QChar( QDir::separator() ) ), scope->resolveVariables( *it ) ); + fitem->uiFileLink = m_widget->getUiFileLink( relativePath() + TQString( TQChar( TQDir::separator() ) ), scope->resolveVariables( *it ) ); item->files.append( fitem ); } @@ -714,78 +714,78 @@ void QMakeScopeItem::buildGroups() for ( it = values.begin(); it != values.end(); ++it ) { FileItem* fitem = createFileItem( *it ); - fitem->uiFileLink = m_widget->getUiFileLink( relativePath() + QString( QChar( QDir::separator() ) ), scope->resolveVariables( *it ) ); + fitem->uiFileLink = m_widget->getUiFileLink( relativePath() + TQString( TQChar( TQDir::separator() ) ), scope->resolveVariables( *it ) ); item->files.append( fitem ); } } -void QMakeScopeItem::removeValues( const QString& var, const QStringList& values ) +void QMakeScopeItem::removeValues( const TQString& var, const TQStringList& values ) { - for( QStringList::const_iterator it = values.begin() ; it != values.end(); ++it ) + for( TQStringList::const_iterator it = values.begin() ; it != values.end(); ++it ) { removeValue( var, *it ); } } -void QMakeScopeItem::addValues( const QString& var, const QStringList& values ) +void QMakeScopeItem::addValues( const TQString& var, const TQStringList& values ) { - for( QStringList::const_iterator it = values.begin() ; it != values.end(); ++it ) + for( TQStringList::const_iterator it = values.begin() ; it != values.end(); ++it ) { addValue( var, *it ); } } -void QMakeScopeItem::removeValue( const QString& var, const QString& value ) +void QMakeScopeItem::removeValue( const TQString& var, const TQString& value ) { if( scope->scopeType() != Scope::IncludeScope && scope->variableValues( var ).findIndex( value ) != -1 ) { if( scope->variableValuesForOp( var, "+=" ).findIndex(value) != -1 ) { - scope->removeFromPlusOp( var, QStringList( value ) ); + scope->removeFromPlusOp( var, TQStringList( value ) ); if( scope->variableValues( var ).findIndex( value ) != -1 ) { - scope->addToMinusOp( var, QStringList( value ) ); + scope->addToMinusOp( var, TQStringList( value ) ); } }else - scope->addToMinusOp( var, QStringList( value ) ); + scope->addToMinusOp( var, TQStringList( value ) ); }else if( scope->scopeType() == Scope::IncludeScope ) { - scope->addToMinusOp( var, QStringList( value ) ); + scope->addToMinusOp( var, TQStringList( value ) ); } } -void QMakeScopeItem::addValue( const QString& var, const QString& value ) +void QMakeScopeItem::addValue( const TQString& var, const TQString& value ) { if( scope->scopeType() != Scope::IncludeScope && scope->variableValues( var ).findIndex( value ) == -1 ) { if( scope->variableValuesForOp( var, "-=" ).findIndex(value) != -1 ) - scope->removeFromMinusOp( var, QStringList( value ) ); + scope->removeFromMinusOp( var, TQStringList( value ) ); else - scope->addToPlusOp( var, QStringList( value ) ); + scope->addToPlusOp( var, TQStringList( value ) ); }else if( scope->scopeType() == Scope::IncludeScope ) { - scope->addToPlusOp( var, QStringList( value ) ); + scope->addToPlusOp( var, TQStringList( value ) ); } } -void QMakeScopeItem::updateValues( const QString& var, const QStringList& values ) +void QMakeScopeItem::updateValues( const TQString& var, const TQStringList& values ) { - QStringList curValues = scope->variableValues( var, (scope->scopeType() != Scope::IncludeScope) ); - QStringList scopeValues = scope->variableValuesForOp( var, "+=" ); - for( QStringList::const_iterator it = curValues.begin(); it != curValues.end(); ++it ) + TQStringList curValues = scope->variableValues( var, (scope->scopeType() != Scope::IncludeScope) ); + TQStringList scopeValues = scope->variableValuesForOp( var, "+=" ); + for( TQStringList::const_iterator it = curValues.begin(); it != curValues.end(); ++it ) { if ( values.findIndex( *it ) == -1 ) { if( scopeValues.findIndex( *it ) != -1 ) { - scope->removeFromPlusOp( var, QStringList( *it ) ); + scope->removeFromPlusOp( var, TQStringList( *it ) ); scopeValues.remove( *it ); }else - scope->addToMinusOp( var, QStringList( *it ) ); + scope->addToMinusOp( var, TQStringList( *it ) ); } } - for( QStringList::const_iterator it = values.begin(); it != values.end(); ++it ) + for( TQStringList::const_iterator it = values.begin(); it != values.end(); ++it ) { if ( scopeValues.findIndex( *it ) != -1 ) { @@ -797,7 +797,7 @@ void QMakeScopeItem::updateValues( const QString& var, const QStringList& values scopeValues += values; // kdDebug(9024) << "values: " << values << "| scope:" << scopeValues << endl; scope->setPlusOp( var, scopeValues ); -// QStringList tmp = scope->variableValuesForOp( var, "+=" ); +// TQStringList tmp = scope->variableValuesForOp( var, "+=" ); // kdDebug(9024) << "result:" << tmp << endl; // kdDebug(9024) << "---------------------------------------" << endl; } @@ -816,18 +816,18 @@ QMakeScopeItem* QMakeScopeItem::projectFileItem() void QMakeScopeItem::reloadProject() { kdDebug(9024) << "Reloading Project" << endl; - QListViewItem* item = firstChild(); + TQListViewItem* item = firstChild(); while( item ) { - QListViewItem* olditem = item; + TQListViewItem* olditem = item; item = olditem->nextSibling(); delete olditem; } - QMap<GroupItem::GroupType, GroupItem*>::iterator it; + TQMap<GroupItem::GroupType, GroupItem*>::iterator it; for ( it = groups.begin() ; it != groups.end() ; ++it ) { GroupItem* s = it.data(); - QListView* l = s->listView(); + TQListView* l = s->listView(); if(l) l->removeItem(s); delete s; @@ -837,9 +837,9 @@ void QMakeScopeItem::reloadProject() init(); } -void QMakeScopeItem::disableSubprojects( const QStringList& dirs ) +void QMakeScopeItem::disableSubprojects( const TQStringList& dirs ) { - QStringList::const_iterator it = dirs.begin(); + TQStringList::const_iterator it = dirs.begin(); for( ; it != dirs.end() ; ++it) { if( scope->variableValues("SUBDIRS").findIndex(*it) != -1 ) @@ -850,7 +850,7 @@ void QMakeScopeItem::disableSubprojects( const QStringList& dirs ) else { QMakeScopeItem* newitem = new QMakeScopeItem( this, s->scopeName(), s ); - QListViewItem* lastitem = firstChild(); + TQListViewItem* lastitem = firstChild(); while( lastitem && lastitem->nextSibling() ) lastitem = lastitem->nextSibling(); if( lastitem ) @@ -861,7 +861,7 @@ void QMakeScopeItem::disableSubprojects( const QStringList& dirs ) } -int QMakeScopeItem::compare( QListViewItem* i, int , bool ) const +int QMakeScopeItem::compare( TQListViewItem* i, int , bool ) const { QMakeScopeItem* other = dynamic_cast<QMakeScopeItem*>(i); if( !i ) @@ -874,52 +874,52 @@ int QMakeScopeItem::compare( QListViewItem* i, int , bool ) const return 0; } -QMap<QString, QString> QMakeScopeItem::getLibInfos( QString basePath ) +TQMap<TQString, TQString> QMakeScopeItem::getLibInfos( TQString basePath ) { - QMap<QString, QString> result; + TQMap<TQString, TQString> result; if ( scope->variableValues( "TARGET" ).front().isEmpty() ) result["shared_lib"] = "-l"+scope->projectName(); else result["shared_lib"] = "-l"+scope->variableValues( "TARGET" ).front(); - QString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); + TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() ); if ( !scope->variableValues( "DESTDIR" ).front().isEmpty() ) { - if ( QDir::isRelativePath( scope->variableValues( "DESTDIR" ).front() ) ) - tmpPath += QString( QChar( QDir::separator() ) ) + scope->variableValues( "DESTDIR" ).front(); + if ( TQDir::isRelativePath( scope->variableValues( "DESTDIR" ).front() ) ) + tmpPath += TQString( TQChar( TQDir::separator() ) ) + scope->variableValues( "DESTDIR" ).front(); else tmpPath = scope->variableValues( "DESTDIR" ).front(); } else { - tmpPath += QString( QChar( QDir::separator() ) ); + tmpPath += TQString( TQChar( TQDir::separator() ) ); } - tmpPath = QDir::cleanDirPath( tmpPath ); + tmpPath = TQDir::cleanDirPath( tmpPath ); result["shared_libdir"] = "-L"+tmpPath; if ( scope->variableValues( "TARGET" ).front().isEmpty() ) - result["shared_depend"] = tmpPath+QString(QChar(QDir::separator()))+"lib"+scope->projectName()+".so"; + result["shared_depend"] = tmpPath+TQString(TQChar(TQDir::separator()))+"lib"+scope->projectName()+".so"; else - result["shared_depend"] = tmpPath+QString(QChar(QDir::separator()))+"lib"+scope->variableValues( "TARGET" ).front()+".so"; + result["shared_depend"] = tmpPath+TQString(TQChar(TQDir::separator()))+"lib"+scope->variableValues( "TARGET" ).front()+".so"; if ( scope->variableValues( "TARGET" ).front().isEmpty() ) - result["static_lib"] = tmpPath+QString(QChar(QDir::separator()))+"lib"+scope->projectName()+".a"; + result["static_lib"] = tmpPath+TQString(TQChar(TQDir::separator()))+"lib"+scope->projectName()+".a"; else - result["static_lib"] = tmpPath+QString(QChar(QDir::separator()))+"lib"+scope->variableValues( "TARGET" ).front()+".a"; + result["static_lib"] = tmpPath+TQString(TQChar(TQDir::separator()))+"lib"+scope->variableValues( "TARGET" ).front()+".a"; result["static_depend"] = result["static_lib"]; if ( scope->variableValues( "TARGET" ).front().isEmpty() ) - result["app_depend"] = tmpPath + QString( QChar( QDir::separator() ) ) + scope->projectName(); + result["app_depend"] = tmpPath + TQString( TQChar( TQDir::separator() ) ) + scope->projectName(); else - result["app_depend"] = tmpPath + QString( QChar( QDir::separator() ) ) + scope->variableValues( "TARGET" ).front(); + result["app_depend"] = tmpPath + TQString( TQChar( TQDir::separator() ) ) + scope->variableValues( "TARGET" ).front(); - QString map; - for( QMap<QString, QString>::const_iterator it = result.begin(); it != result.end(); ++it ) + TQString map; + for( TQMap<TQString, TQString>::const_iterator it = result.begin(); it != result.end(); ++it ) map += "["+it.key() + "=>" +it.data() + "],"; kdDebug(9024) << "Running getLibInfo for" << scope->projectName() << "|" << map << endl; return result; diff --git a/buildtools/qmake/qmakescopeitem.h b/buildtools/qmake/qmakescopeitem.h index b2c84345..7c02a33a 100644 --- a/buildtools/qmake/qmakescopeitem.h +++ b/buildtools/qmake/qmakescopeitem.h @@ -12,8 +12,8 @@ #ifndef _QMAKESCOPEITEM_H_ #define _QMAKESCOPEITEM_H_ -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> class Scope; class QMakeScopeItem; @@ -28,10 +28,10 @@ class qProjectItem : public QListViewItem public: enum Type { Subproject, Group, File }; - qProjectItem( Type type, QListView *parent, const QString &text ); - qProjectItem( Type type, qProjectItem *parent, const QString &text ); + qProjectItem( Type type, TQListView *parent, const TQString &text ); + qProjectItem( Type type, qProjectItem *parent, const TQString &text ); - QString scopeString; + TQString scopeString; Type type() { return typ; } @@ -47,28 +47,28 @@ class GroupItem : public qProjectItem public: enum GroupType {NoType, Sources, Headers, Forms, Distfiles, Images, Resources, Lexsources, Yaccsources, Translations, IDLs, InstallRoot, InstallObject, MaxTypeEnum }; - static GroupType groupTypeForExtension( const QString &ext ); - static void groupTypeMeanings( GroupItem::GroupType type, QString& title, QString& ext ); + static GroupType groupTypeForExtension( const TQString &ext ); + static void groupTypeMeanings( GroupItem::GroupType type, TQString& title, TQString& ext ); - GroupItem( QListView *lv, GroupType type, const QString &text, QMakeScopeItem* spitem ); + GroupItem( TQListView *lv, GroupType type, const TQString &text, QMakeScopeItem* spitem ); - void removeFileFromScope( const QString& filename); - void addFileToScope( const QString& filename); - void addInstallObject( const QString& objectname); + void removeFileFromScope( const TQString& filename); + void addFileToScope( const TQString& filename); + void addInstallObject( const TQString& objectname); void removeInstallObject( GroupItem* item ); // qmake INSTALLS support - QPtrList<GroupItem> installs; - QPtrList<FileItem> files; + TQPtrList<GroupItem> installs; + TQPtrList<FileItem> files; -// QStringList str_files; -// QStringList str_files_exclude; +// TQStringList str_files; +// TQStringList str_files_exclude; // end qmake INSTALLS support GroupType groupType; QMakeScopeItem* owner; protected: - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); }; @@ -76,10 +76,10 @@ protected: class FileItem : public qProjectItem { public: - FileItem( QListView *lv, const QString &text ); + FileItem( TQListView *lv, const TQString &text ); - QString uiFileLink; - QString localFilePath; + TQString uiFileLink; + TQString localFilePath; }; /** @@ -88,30 +88,30 @@ public: class QMakeScopeItem : public qProjectItem { public: - QMakeScopeItem( QListView *parent, const QString &text, Scope *s, TrollProjectWidget* widget ); - QMakeScopeItem( QMakeScopeItem *parent, const QString &text, Scope* ); - void updateValues( const QString& var, const QStringList& values ); - void addValue( const QString& var, const QString& value ); - void removeValue( const QString& var, const QString& value ); - void addValues( const QString& var, const QStringList& values ); - void removeValues( const QString& var, const QStringList& values ); - void disableSubprojects( const QStringList& ); + QMakeScopeItem( TQListView *parent, const TQString &text, Scope *s, TrollProjectWidget* widget ); + QMakeScopeItem( QMakeScopeItem *parent, const TQString &text, Scope* ); + void updateValues( const TQString& var, const TQStringList& values ); + void addValue( const TQString& var, const TQString& value ); + void removeValue( const TQString& var, const TQString& value ); + void addValues( const TQString& var, const TQStringList& values ); + void removeValues( const TQString& var, const TQStringList& values ); + void disableSubprojects( const TQStringList& ); void reloadProject(); - int compare( QListViewItem* i, int col, bool ascending ) const; + int compare( TQListViewItem* i, int col, bool ascending ) const; ~QMakeScopeItem(); - QMap<GroupItem::GroupType, GroupItem*> groups; + TQMap<GroupItem::GroupType, GroupItem*> groups; Scope* scope; - QString relativePath(); - QString getLibAddPath( QString ); - QString getLibAddObject( QString ); - QString getSharedLibAddObject( QString ); - QString getApplicationObject( QString ); - QString getIncAddPath( QString downDirs ); - FileItem* createFileItem(const QString& file); - GroupItem* createGroupItem(GroupItem::GroupType type, const QString& name, QMakeScopeItem* scopeitem); - QMap<QString, QString> getLibInfos( QString ); + TQString relativePath(); + TQString getLibAddPath( TQString ); + TQString getLibAddObject( TQString ); + TQString getSharedLibAddObject( TQString ); + TQString getApplicationObject( TQString ); + TQString getIncAddPath( TQString downDirs ); + FileItem* createFileItem(const TQString& file); + GroupItem* createGroupItem(GroupItem::GroupType type, const TQString& name, QMakeScopeItem* scopeitem); + TQMap<TQString, TQString> getLibInfos( TQString ); QMakeScopeItem* projectFileItem(); diff --git a/buildtools/qmake/scope.cpp b/buildtools/qmake/scope.cpp index c090861b..3f182ded 100644 --- a/buildtools/qmake/scope.cpp +++ b/buildtools/qmake/scope.cpp @@ -13,13 +13,13 @@ #include <kdebug.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qpair.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqpair.h> #include <qmakedriver.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kdirwatch.h> @@ -31,16 +31,16 @@ #include "trollprojectpart.h" #include "qmakedefaultopts.h" -const QStringList Scope::KnownVariables = QStringList() << "QT" << "CONFIG" << "TEMPLATE" << "SUBDIRS" << "VERSION" << "LIBS" << "target.path" << "INSTALLS" << "MAKEFILE" << "TARGETDEPS" << "INCLUDEPATH" << "TARGET" << "DESTDIR" << "DEFINES" << "QMAKE_CXXFLAGS_DEBUG" << "QMAKE_CXXFLAGS_RELEASE" << "OBJECTS_DIR" << "UI_DIR" << "MOC_DIR" << "IDL_COMPILER" << "IDL_OPTIONS" << "RCC_DIR" << "IDLS" << "RESOURCES" << "IMAGES" << "LEXSOURCES" << "DISTFILES" << "YACCSOURCES" << "TRANSLATIONS" << "HEADERS" << "SOURCES" << "INTERFACES" << "FORMS" ; +const TQStringList Scope::KnownVariables = TQStringList() << "QT" << "CONFIG" << "TEMPLATE" << "SUBDIRS" << "VERSION" << "LIBS" << "target.path" << "INSTALLS" << "MAKEFILE" << "TARGETDEPS" << "INCLUDEPATH" << "TARGET" << "DESTDIR" << "DEFINES" << "QMAKE_CXXFLAGS_DEBUG" << "QMAKE_CXXFLAGS_RELEASE" << "OBJECTS_DIR" << "UI_DIR" << "MOC_DIR" << "IDL_COMPILER" << "IDL_OPTIONS" << "RCC_DIR" << "IDLS" << "RESOURCES" << "IMAGES" << "LEXSOURCES" << "DISTFILES" << "YACCSOURCES" << "TRANSLATIONS" << "HEADERS" << "SOURCES" << "INTERFACES" << "FORMS" ; -const QStringList Scope::KnownConfigValues = QStringList() << "debug" << "release" << "debug_and_release" << "warn_on" << "warn_off" << "staticlib" << "dll" << "plugin" << "designer" << "create_pkgconf" << "create_libtool" << "qt" << "console" << "windows" << "x11" << "thread" << "exceptions" << "stl" << "rtti" << "opengl" << "thread" << "ordered" << "precompile_header" << "qtestlib" << "uitools" << "dbus" << "assistant" << "build_all" << "help"; +const TQStringList Scope::KnownConfigValues = TQStringList() << "debug" << "release" << "debug_and_release" << "warn_on" << "warn_off" << "staticlib" << "dll" << "plugin" << "designer" << "create_pkgconf" << "create_libtool" << "qt" << "console" << "windows" << "x11" << "thread" << "exceptions" << "stl" << "rtti" << "opengl" << "thread" << "ordered" << "precompile_header" << "qtestlib" << "uitools" << "dbus" << "assistant" << "build_all" << "help"; -Scope::Scope( const QMap<QString, QString>& env, const QString &filename, TrollProjectPart* part ) +Scope::Scope( const TQMap<TQString, TQString>& env, const TQString &filename, TrollProjectPart* part ) : m_root( 0 ), m_incast( 0 ), m_parent( 0 ), m_num(0), m_isEnabled( true ), m_part(part), m_defaultopts(0), m_environment( env ) { if ( !loadFromFile( filename ) ) { - if( !QFileInfo( filename ).exists() ) + if( !TQFileInfo( filename ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -60,7 +60,7 @@ Scope::Scope( const QMap<QString, QString>& env, const QString &filename, TrollP Scope::~Scope() { - QMap<unsigned int, Scope*>::iterator it; + TQMap<unsigned int, Scope*>::iterator it; for ( it = m_scopes.begin() ; it != m_scopes.end() ; ++it ) { Scope* s = it.data(); @@ -80,7 +80,7 @@ Scope::~Scope() } // Simple/Function Scopes -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* scope, +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* scope, QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) : m_root( scope ), m_incast( 0 ), m_parent( parent ), m_num(num), m_isEnabled( true ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) @@ -89,14 +89,14 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent } //Subdirs -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, const QString& filename, +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, const TQString& filename, TrollProjectPart* part, bool isEnabled ) : m_root( 0 ), m_incast( 0 ), m_parent( parent ), m_num(num), m_isEnabled( isEnabled ), m_part(part), m_defaultopts(0), m_environment( env ) { if ( !loadFromFile( filename ) ) { - if( !QFileInfo( filename ).exists() && QFileInfo( QFileInfo( filename ).dirPath( true ) ).exists() ) + if( !TQFileInfo( filename ).exists() && TQFileInfo( TQFileInfo( filename ).dirPath( true ) ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -114,27 +114,27 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent } //Include Scope -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const QString& path, - const QString& incfile, QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const TQString& path, + const TQString& incfile, QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) : m_root( 0 ), m_incast( incast ), m_parent( parent ), m_num(num), m_isEnabled( true ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) { - QString absfilename; - QString tmp = incfile.stripWhiteSpace(); + TQString absfilename; + TQString tmp = incfile.stripWhiteSpace(); if( tmp.contains(")" ) ) tmp = tmp.mid(0, tmp.find(")") ); if( tmp.startsWith( "\"" ) ) tmp = tmp.mid( 1, tmp.length()-2 ); - if( QFileInfo(tmp).isRelative() ) + if( TQFileInfo(tmp).isRelative() ) { - absfilename = QDir::cleanDirPath( path + QString( QChar( QDir::separator() ) ) + tmp ); + absfilename = TQDir::cleanDirPath( path + TQString( TQChar( TQDir::separator() ) ) + tmp ); }else - absfilename = QDir::cleanDirPath( tmp ); + absfilename = TQDir::cleanDirPath( tmp ); if ( !loadFromFile( absfilename ) ) { - if( !QFileInfo( absfilename ).exists() && QFileInfo( QFileInfo( absfilename ).dirPath( true ) ).exists() ) + if( !TQFileInfo( absfilename ).exists() && TQFileInfo( TQFileInfo( absfilename ).dirPath( true ) ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( absfilename ); @@ -150,9 +150,9 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent init(); } -bool Scope::loadFromFile( const QString& filename ) +bool Scope::loadFromFile( const TQString& filename ) { - if ( !QFileInfo(filename).exists() || QMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) + if ( !TQFileInfo(filename).exists() || QMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) { kdDebug( 9024 ) << "Couldn't parse project: " << filename << endl; if( DomUtil::readBoolEntry( *m_part->projectDom(), @@ -179,20 +179,20 @@ void Scope::saveToFile() const return; } - QString filename; + TQString filename; if ( scopeType() == ProjectScope ) filename = m_root->fileName() ; else if ( scopeType() == IncludeScope ) - filename = m_parent->projectDir() + QString( QChar( QDir::separator() ) ) + m_incast->projectName; + filename = m_parent->projectDir() + TQString( TQChar( TQDir::separator() ) ) + m_incast->projectName; if ( filename.isEmpty() ) return ; m_part->dirWatch()->stopScan(); - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_WriteOnly ) ) { - QTextStream out( &file ); - QString astbuffer; + TQTextStream out( &file ); + TQString astbuffer; m_root->writeBack( astbuffer ); out << astbuffer; file.close(); @@ -208,7 +208,7 @@ void Scope::saveToFile() const m_part->dirWatch()->startScan(); } -void Scope::addToPlusOp( const QString& variable, const QStringList& values ) +void Scope::addToPlusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -216,7 +216,7 @@ void Scope::addToPlusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "+=", values, false ); } -void Scope::removeFromPlusOp( const QString& variable, const QStringList& values ) +void Scope::removeFromPlusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -225,7 +225,7 @@ void Scope::removeFromPlusOp( const QString& variable, const QStringList& values } -void Scope::addToMinusOp( const QString& variable, const QStringList& values ) +void Scope::addToMinusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -233,7 +233,7 @@ void Scope::addToMinusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "-=", values, false ); } -void Scope::removeFromMinusOp( const QString& variable, const QStringList& values ) +void Scope::removeFromMinusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -241,7 +241,7 @@ void Scope::removeFromMinusOp( const QString& variable, const QStringList& value updateVariable( variable, "-=", values, true ); } -void Scope::addToEqualOp( const QString& variable, const QStringList& values ) +void Scope::addToEqualOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -249,7 +249,7 @@ void Scope::addToEqualOp( const QString& variable, const QStringList& values ) updateVariable( variable, "=", values, false ); } -void Scope::removeFromEqualOp( const QString& variable, const QStringList& values ) +void Scope::removeFromEqualOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -257,7 +257,7 @@ void Scope::removeFromEqualOp( const QString& variable, const QStringList& value updateVariable( variable, "=", values, true ); } -void Scope::setPlusOp( const QString& variable, const QStringList& values ) +void Scope::setPlusOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "+=") ) ) return; @@ -266,7 +266,7 @@ void Scope::setPlusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "+=", values, false ); } -void Scope::setEqualOp( const QString& variable, const QStringList& values ) +void Scope::setEqualOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "=") ) ) return; @@ -275,7 +275,7 @@ void Scope::setEqualOp( const QString& variable, const QStringList& values ) updateVariable( variable, "=", values, false ); } -void Scope::setMinusOp( const QString& variable, const QStringList& values ) +void Scope::setMinusOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "-=") ) ) return; @@ -284,14 +284,14 @@ void Scope::setMinusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "-=", values, false ); } -QStringList Scope::variableValuesForOp( const QString& variable , const QString& op ) const +TQStringList Scope::variableValuesForOp( const TQString& variable , const TQString& op ) const { - QStringList result; + TQStringList result; if( !m_root ) return result; - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { QMake::AST* ast = *it; @@ -308,9 +308,9 @@ QStringList Scope::variableValuesForOp( const QString& variable , const QString& return result; } -QStringList Scope::variableValues( const QString& variable, bool checkIncParent, bool fetchFromParent, bool evaluateSubScopes ) +TQStringList Scope::variableValues( const TQString& variable, bool checkIncParent, bool fetchFromParent, bool evaluateSubScopes ) { - QStringList result; + TQStringList result; if ( !m_root ) return result; @@ -329,7 +329,7 @@ QStringList Scope::variableValues( const QString& variable, bool checkIncParent, return result; } -void Scope::calcValuesFromStatements( const QString& variable, QStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const +void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const { if( !m_root ) return; @@ -351,7 +351,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu m_parent->calcValuesFromStatements( variable, result, true, this->m_incast, fetchFromParent, setDefault, evaluateSubScopes ); } - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { if ( stopHere && *it == stopHere ) @@ -368,7 +368,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu } else if ( assign->op == "+=" ) { - for ( QStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) + for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { if ( result.findIndex( *sit ) == -1 ) result.append( *sit ); @@ -376,7 +376,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu } else if ( assign->op == "-=" ) { - for ( QStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) + for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { if ( result.findIndex( *sit ) != -1 ) result.remove( *sit ); @@ -388,7 +388,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu if( ast->nodeType() == QMake::AST::IncludeAST ) { QMake::IncludeAST* iast = static_cast<QMake::IncludeAST*>(ast); - QValueList<unsigned int> l = m_scopes.keys(); + TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; @@ -408,7 +408,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu QMake::ProjectAST* past = static_cast<QMake::ProjectAST*>(ast); if( past->isFunctionScope() || past->isScope() ) { - QValueList<unsigned int> l = m_scopes.keys(); + TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; @@ -445,7 +445,7 @@ Scope::ScopeType Scope::scopeType() const return InvalidScope; } -QString Scope::scopeName() const +TQString Scope::scopeName() const { if ( !m_root ) return ""; @@ -457,31 +457,31 @@ QString Scope::scopeName() const return m_root->scopedID; else if ( m_root->isProject() ) { - if( m_parent && QDir::cleanDirPath( m_parent->projectDir() ) != QDir::cleanDirPath( projectDir() ) ) + if( m_parent && TQDir::cleanDirPath( m_parent->projectDir() ) != TQDir::cleanDirPath( projectDir() ) ) { return URLUtil::getRelativePath( m_parent->projectDir(), projectDir() ); - }else if ( m_parent && QDir::cleanDirPath( m_parent->projectDir() ) == QDir::cleanDirPath( projectDir() ) ) + }else if ( m_parent && TQDir::cleanDirPath( m_parent->projectDir() ) == TQDir::cleanDirPath( projectDir() ) ) { return fileName(); }else - return QFileInfo( projectDir() ).fileName() ; + return TQFileInfo( projectDir() ).fileName() ; } - return QString(); + return TQString(); } -QString Scope::fileName() const +TQString Scope::fileName() const { if( !m_root ) return ""; if ( m_incast ) return m_incast->projectName; else if ( m_root->isProject() ) - return QFileInfo( m_root->fileName() ).fileName(); + return TQFileInfo( m_root->fileName() ).fileName(); else return m_parent->fileName(); } -Scope* Scope::createFunctionScope( const QString& funcName, const QString& args ) +Scope* Scope::createFunctionScope( const TQString& funcName, const TQString& args ) { if ( !m_root ) return 0; @@ -503,7 +503,7 @@ Scope* Scope::createFunctionScope( const QString& funcName, const QString& args return 0; } -Scope* Scope::createSimpleScope( const QString& scopename ) +Scope* Scope::createSimpleScope( const TQString& scopename ) { if ( !m_root ) return 0; @@ -516,7 +516,7 @@ Scope* Scope::createSimpleScope( const QString& scopename ) m_root->addChildAST( new QMake::NewLineAST() ); /* We can't unconditionally add the scope name to CONFIG, scope might be win32 which may only be in CONFIG under windows. if ( m_part->isQt4Project() ) - addToPlusOp( "CONFIG", QStringList( scopename ) ); + addToPlusOp( "CONFIG", TQStringList( scopename ) ); */ Scope* simpleScope = new Scope( m_environment, getNextScopeNum(), this, ast, m_defaultopts, m_part ); @@ -530,7 +530,7 @@ Scope* Scope::createSimpleScope( const QString& scopename ) } -Scope* Scope::createIncludeScope( const QString& includeFile, bool negate ) +Scope* Scope::createIncludeScope( const TQString& includeFile, bool negate ) { if ( !m_root ) return 0; @@ -566,7 +566,7 @@ Scope* Scope::createIncludeScope( const QString& includeFile, bool negate ) } -Scope* Scope::createSubProject( const QString& projname ) +Scope* Scope::createSubProject( const TQString& projname ) { if( !m_root ) return 0; @@ -574,30 +574,30 @@ Scope* Scope::createSubProject( const QString& projname ) if( variableValuesForOp( "SUBDIRS", "-=").findIndex( projname ) != -1 ) removeFromMinusOp( "SUBDIRS", projname ); - QString realprojname = resolveVariables(projname); + TQString realprojname = resolveVariables(projname); if( variableValuesForOp( "SUBDIRS", "-=").findIndex( realprojname ) != -1 ) removeFromMinusOp( "SUBDIRS", realprojname ); - QDir curdir( projectDir() ); + TQDir curdir( projectDir() ); if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { - QString filename; + TQString filename; if( !realprojname.endsWith(".pro") ) { if ( !curdir.exists( realprojname ) ) if ( !curdir.mkdir( realprojname ) ) return 0; curdir.cd( realprojname ); - QStringList entries = curdir.entryList("*.pro", QDir::Files); + TQStringList entries = curdir.entryList("*.pro", TQDir::Files); if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) == -1 ) - filename = curdir.absPath() + QString(QChar(QDir::separator()))+entries.first(); + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else - filename = curdir.absPath() + QString(QChar(QDir::separator()))+curdir.dirName()+".pro"; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; }else - filename = curdir.absPath() + QString(QChar(QDir::separator())) + realprojname; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator())) + realprojname; kdDebug( 9024 ) << "Creating subproject with filename:" << filename << endl; @@ -606,9 +606,9 @@ Scope* Scope::createSubProject( const QString& projname ) if ( s->scopeType() != InvalidScope ) { if( s->variableValues("TEMPLATE").isEmpty() ) - s->setEqualOp("TEMPLATE", QStringList("app")); + s->setEqualOp("TEMPLATE", TQStringList("app")); s->saveToFile(); - addToPlusOp( "SUBDIRS", QStringList( realprojname ) ); + addToPlusOp( "SUBDIRS", TQStringList( realprojname ) ); m_scopes.insert( getNextScopeNum(), s ); return s; } else @@ -685,7 +685,7 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) if ( !m_root || !m_scopes.contains( num ) ) return false; - QValueList<QMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); + TQValueList<QMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); if ( it != m_root->m_children.end() ) { QMake::AssignmentAST * tempast = static_cast<QMake::AssignmentAST*>( *it ); @@ -695,18 +695,18 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) if( !project ) return false; - QString projdir = project->scopeName(); + TQString projdir = project->scopeName(); if ( deleteSubdir ) { - QDir projdir = QDir( projectDir() ); - QString dir = project->scopeName(); + TQDir projdir = TQDir( projectDir() ); + TQString dir = project->scopeName(); if( !dir.endsWith(".pro") ) { - QDir subdir = QDir( projectDir() + QString( QChar( QDir::separator() ) ) + dir ); + TQDir subdir = TQDir( projectDir() + TQString( TQChar( TQDir::separator() ) ) + dir ); if ( subdir.exists() ) { - QStringList entries = subdir.entryList(); - for ( QStringList::iterator eit = entries.begin() ; eit != entries.end() ; ++eit ) + TQStringList entries = subdir.entryList(); + for ( TQStringList::iterator eit = entries.begin() ; eit != entries.end() ; ++eit ) { if( *eit == "." || *eit == ".." ) continue; @@ -718,15 +718,15 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) } }else { - QDir d( project->projectDir() ); + TQDir d( project->projectDir() ); kdDebug(9024) << "removed subproject?:" << d.remove( dir ) << endl; } } - QValueList<QMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); + TQValueList<QMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); if ( foundit != m_root->m_children.end() ) { QMake::AssignmentAST * ast = static_cast<QMake::AssignmentAST*>( *foundit ); - updateValues( ast->values, QStringList( projdir ), true, ast->indent ); + updateValues( ast->values, TQStringList( projdir ), true, ast->indent ); if( m_varCache.contains( "SUBDIRS" ) ) m_varCache.erase( "SUBDIRS" ); }else @@ -739,12 +739,12 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) return false; } -void Scope::updateValues( QStringList& origValues, const QStringList& newValues, bool remove, QString indent ) +void Scope::updateValues( TQStringList& origValues, const TQStringList& newValues, bool remove, TQString indent ) { if( !m_root ) return; - for ( QStringList::const_iterator it = newValues.begin(); it != newValues.end() ; ++it ) + for ( TQStringList::const_iterator it = newValues.begin(); it != newValues.end() ; ++it ) { if ( origValues.findIndex( *it ) == -1 && !remove ) { @@ -767,8 +767,8 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, origValues.append( indent ); }else if ( origValues.isEmpty() ) origValues.append(" "); - QString newval = *it; - QRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)"); + TQString newval = *it; + TQRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)"); newval.replace(re, "\\1$(\\2)\\3"); if( (newval).contains(" ") || (newval).contains("\t") || (newval).contains( getLineEndingString() ) || (newval).contains("#") ) origValues.append( "\""+newval+"\"" ); @@ -777,9 +777,9 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, origValues.append( getLineEndingString() ); } else if ( origValues.findIndex( *it ) != -1 && remove ) { - QStringList::iterator posit = origValues.find( *it ); + TQStringList::iterator posit = origValues.find( *it ); posit = origValues.remove( posit ); - while( posit != origValues.end() && ( (*posit).find( QRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 + while( posit != origValues.end() && ( (*posit).find( TQRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 || (*posit).stripWhiteSpace() == "" ) ) { posit = origValues.remove( posit ); @@ -790,13 +790,13 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, || origValues.last() == getLineEndingString() || origValues.last().stripWhiteSpace() == "" ) && !origValues.isEmpty() ) origValues.pop_back(); - if( !origValues.isEmpty() && origValues.last().find( QRegExp("\\\\[ \t]*#") ) != -1 ) + if( !origValues.isEmpty() && origValues.last().find( TQRegExp("\\\\[ \t]*#") ) != -1 ) origValues[origValues.count()-1] = origValues[origValues.count()-1].mid(origValues[origValues.count()-1].find( "#") ); if( !origValues.isEmpty() && origValues.last().find( getLineEndingString() ) == -1 ) origValues.append(getLineEndingString()); } -void Scope::updateVariable( const QString& variable, const QString& op, const QStringList& values, bool removeFromOp ) +void Scope::updateVariable( const TQString& variable, const TQString& op, const TQStringList& values, bool removeFromOp ) { if ( !m_root || listIsEmpty( values ) ) return ; @@ -821,7 +821,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->scopedID == variable && !Scope::isCompatible( assignment->op, op ) ) { - for ( QStringList::const_iterator it = values.begin() ; it != values.end() ; ++it ) + for ( TQStringList::const_iterator it = values.begin() ; it != values.end() ; ++it ) { if ( op == "+=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) { @@ -832,7 +832,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->op == "-=" ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -843,7 +843,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( op == "-=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -860,7 +860,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->op == "+=" && assignment->values.findIndex( *it ) != -1 ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -892,10 +892,10 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } } -QValueList<QMake::AST*>::iterator Scope::findExistingVariable( const QString& variable ) +TQValueList<QMake::AST*>::iterator Scope::findExistingVariable( const TQString& variable ) { - QValueList<QMake::AST*>::iterator it; - QStringList ops; + TQValueList<QMake::AST*>::iterator it; + TQStringList ops; ops << "=" << "+="; for ( it = m_root->m_children.begin(); it != m_root->m_children.end() ; ++it ) @@ -920,7 +920,7 @@ void Scope::init() kdDebug(9024) << "Initializing Scope: " << scopeName() << this << endl; m_maxCustomVarNum = 1; - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::ProjectAST ) @@ -931,7 +931,7 @@ void Scope::init() else if ( ( *it ) ->nodeType() == QMake::AST::IncludeAST ) { QMake::IncludeAST * i = static_cast<QMake::IncludeAST*>( *it ); - QString filename = i->projectName; + TQString filename = i->projectName; if( i->projectName.stripWhiteSpace().startsWith("$") ) { filename = resolveVariables(i->projectName, *it); @@ -944,36 +944,36 @@ void Scope::init() // Check wether TEMPLATE==subdirs here too! if ( m->scopedID == "SUBDIRS" && variableValues("TEMPLATE").findIndex("subdirs") != -1 ) { - for ( QStringList::const_iterator sit = m->values.begin() ; sit != m->values.end(); ++sit ) + for ( TQStringList::const_iterator sit = m->values.begin() ; sit != m->values.end(); ++sit ) { - QString str = *sit; + TQString str = *sit; if ( containsContinue( str ) || isComment( str ) || str == getLineEndingString() || str == "." || str == "./" || (str).stripWhiteSpace() == "" ) continue; - QDir subproject; - QString projectfile; + TQDir subproject; + TQString projectfile; kdDebug(9024) << "reading subproject: " << str << endl; if( str.startsWith("$") ) str = resolveVariables(str, *it); if( str.endsWith(".pro") ) { - subproject = QDir( projectDir(), "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + subproject = TQDir( projectDir(), "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); projectfile = str; }else { - QString dir = str; - if( QFileInfo( dir ).isRelative() ) - dir = projectDir() + QString( QChar( QDir::separator() ) ) + dir; - subproject = QDir( dir, - "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + TQString dir = str; + if( TQFileInfo( dir ).isRelative() ) + dir = projectDir() + TQString( TQChar( TQDir::separator() ) ) + dir; + subproject = TQDir( dir, + "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); if( !subproject.exists() ) { kdDebug(9024) << "Project Dir doesn't exist, trying to find name.subdir variable:" << str << endl; if( !variableValues(str+".subdir").isEmpty() ) { kdDebug(9024) << "Found name.subdir variable for " << str << endl; - subproject = QDir( projectDir() + QString( QChar( QDir::separator() ) ) + subproject = TQDir( projectDir() + TQString( TQChar( TQDir::separator() ) ) + variableValues(str+".subdir").first(), - "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); }else continue; } @@ -1012,21 +1012,21 @@ void Scope::init() } } -QString Scope::projectName() const +TQString Scope::projectName() const { if( !m_root ) return ""; - return QFileInfo( projectDir() ).fileName(); + return TQFileInfo( projectDir() ).fileName(); } -QString Scope::projectDir() const +TQString Scope::projectDir() const { if( !m_root ) return ""; if ( m_root->isProject() ) { - return QFileInfo( m_root->fileName() ).dirPath( true ); + return TQFileInfo( m_root->fileName() ).dirPath( true ); } else { @@ -1034,16 +1034,16 @@ QString Scope::projectDir() const } } -const QMap<unsigned int, QMap<QString, QString> > Scope::customVariables() const +const TQMap<unsigned int, TQMap<TQString, TQString> > Scope::customVariables() const { - QMap<unsigned int, QMap<QString, QString> > result; + TQMap<unsigned int, TQMap<TQString, TQString> > result; if( !m_root ) return result; - QMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for ( ; it != m_customVariables.end(); ++it ) { - QMap<QString,QString> temp; + TQMap<TQString,TQString> temp; temp[ "var" ] = it.data()->scopedID; temp[ "op" ] = it.data()->op; temp[ "values" ] = it.data()->values.join("").stripWhiteSpace(); @@ -1052,7 +1052,7 @@ const QMap<unsigned int, QMap<QString, QString> > Scope::customVariables() const return result; } -void Scope::updateCustomVariable( unsigned int id, const QString& name, const QString& newop, const QString& newvalues ) +void Scope::updateCustomVariable( unsigned int id, const TQString& name, const TQString& newop, const TQString& newvalues ) { if( !m_root ) return; @@ -1067,7 +1067,7 @@ void Scope::updateCustomVariable( unsigned int id, const QString& name, const QS } } -unsigned int Scope::addCustomVariable( const QString& var, const QString& op, const QString& values ) +unsigned int Scope::addCustomVariable( const TQString& var, const TQString& op, const TQString& values ) { QMake::AssignmentAST* newast = new QMake::AssignmentAST(); newast->scopedID = var; @@ -1092,12 +1092,12 @@ void Scope::removeCustomVariable( unsigned int id ) } } -bool Scope::isVariableReset( const QString& var ) +bool Scope::isVariableReset( const TQString& var ) { bool result = false; if( !m_root ) return result; - QValueList<QMake::AST*>::const_iterator it = m_root->m_children.begin(); + TQValueList<QMake::AST*>::const_iterator it = m_root->m_children.begin(); for ( ; it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) @@ -1113,14 +1113,14 @@ bool Scope::isVariableReset( const QString& var ) return result; } -void Scope::removeVariable( const QString& var, const QString& op ) +void Scope::removeVariable( const TQString& var, const TQString& op ) { if ( !m_root ) return ; QMake::AssignmentAST* ast = 0; - QValueList<QMake::AST*>::iterator it = m_root->m_children.begin(); + TQValueList<QMake::AST*>::iterator it = m_root->m_children.begin(); for ( ; it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) @@ -1135,11 +1135,11 @@ void Scope::removeVariable( const QString& var, const QString& op ) } } -bool Scope::listIsEmpty( const QStringList& values ) +bool Scope::listIsEmpty( const TQStringList& values ) { if ( values.size() < 1 ) return true; - for ( QStringList::const_iterator it = values.begin(); it != values.end(); ++it ) + for ( TQStringList::const_iterator it = values.begin(); it != values.end(); ++it ) { if ( ( *it ).stripWhiteSpace() != "" && ( *it ).stripWhiteSpace() != "\\" ) return false; @@ -1147,7 +1147,7 @@ bool Scope::listIsEmpty( const QStringList& values ) return true; } -bool Scope::isCompatible( const QString& op1, const QString& op2) +bool Scope::isCompatible( const TQString& op1, const TQString& op2) { if( op1 == "+=" ) return ( op2 == "+=" || op2 == "=" ); @@ -1158,21 +1158,21 @@ bool Scope::isCompatible( const QString& op1, const QString& op2) return false; } -bool Scope::listsEqual(const QStringList& l1, const QStringList& l2) +bool Scope::listsEqual(const TQStringList& l1, const TQStringList& l2) { - QStringList left = l1; - QStringList right = l2; + TQStringList left = l1; + TQStringList right = l2; // left.sort(); // right.sort(); return (left == right); } -QStringList Scope::cleanStringList(const QStringList& list) const +TQStringList Scope::cleanStringList(const TQStringList& list) const { - QStringList result; - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + TQStringList result; + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - QString s = *it; + TQString s = *it; if( s.stripWhiteSpace() != "" && !containsContinue(s) && s.stripWhiteSpace() != getLineEndingString() @@ -1192,8 +1192,8 @@ void Scope::reloadProject() if ( !m_root || !m_root->isProject() ) return; - QString filename = m_root->fileName(); - QMap<unsigned int, Scope*>::iterator it; + TQString filename = m_root->fileName(); + TQMap<unsigned int, Scope*>::iterator it; for ( it = m_scopes.begin() ; it != m_scopes.end() ; ++it ) { Scope* s = it.data(); @@ -1207,7 +1207,7 @@ void Scope::reloadProject() if ( m_root->isProject() ) delete m_root; - if ( !loadFromFile( filename ) && !QFileInfo( filename ).exists() ) + if ( !loadFromFile( filename ) && !TQFileInfo( filename ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -1215,7 +1215,7 @@ void Scope::reloadProject() init(); } -Scope* Scope::disableSubproject( const QString& dir) +Scope* Scope::disableSubproject( const TQString& dir) { if( !m_root || ( m_root->isProject() && !m_incast ) ) return 0; @@ -1225,23 +1225,23 @@ Scope* Scope::disableSubproject( const QString& dir) else if( scopeType() != Scope::IncludeScope ) removeFromPlusOp( "SUBDIRS", dir ); - QDir curdir( projectDir() ); + TQDir curdir( projectDir() ); if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { curdir.cd(dir); - QString filename; - QStringList entries = curdir.entryList("*.pro", QDir::Files); + TQString filename; + TQStringList entries = curdir.entryList("*.pro", TQDir::Files); if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) != -1 ) - filename = curdir.absPath() + QString(QChar(QDir::separator()))+entries.first(); + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else - filename = curdir.absPath() + QString(QChar(QDir::separator()))+curdir.dirName()+".pro"; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; kdDebug( 9024 ) << "Disabling subproject with filename:" << filename << endl; Scope* s = new Scope( m_environment, getNextScopeNum(), this, filename, m_part, false ); - addToMinusOp( "SUBDIRS", QStringList( dir ) ); + addToMinusOp( "SUBDIRS", TQStringList( dir ) ); m_scopes.insert( getNextScopeNum(), s ); return s; } @@ -1249,20 +1249,20 @@ Scope* Scope::disableSubproject( const QString& dir) return 0; } -QString Scope::resolveVariables( const QString& value ) const +TQString Scope::resolveVariables( const TQString& value ) const { - return resolveVariables(QStringList(value), 0).front(); + return resolveVariables(TQStringList(value), 0).front(); } -QString Scope::resolveVariables( const QString& value, QMake::AST* stopHere ) const +TQString Scope::resolveVariables( const TQString& value, QMake::AST* stopHere ) const { - return resolveVariables(QStringList(value), stopHere).front(); + return resolveVariables(TQStringList(value), stopHere).front(); } -QStringList Scope::variableValues( const QString& variable, QMake::AST* stopHere, bool fetchFromParent ) const +TQStringList Scope::variableValues( const TQString& variable, QMake::AST* stopHere, bool fetchFromParent ) const { - QStringList result; + TQStringList result; if ( !m_root ) return result; @@ -1272,13 +1272,13 @@ QStringList Scope::variableValues( const QString& variable, QMake::AST* stopHere return result; } -QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stopHere ) const +TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* stopHere ) const { - QStringList result = values; - QMap<QString, QStringList> variables; - for( QStringList::iterator it = result.begin(); it != result.end(); ++it ) + TQStringList result = values; + TQMap<TQString, TQStringList> variables; + for( TQStringList::iterator it = result.begin(); it != result.end(); ++it ) { - QRegExp re("\\$\\$([^{}\\) /]*)( |\\)|/|$)"); + TQRegExp re("\\$\\$([^{}\\) /]*)( |\\)|/|$)"); int pos = 0; while( pos >= 0 ) { @@ -1290,13 +1290,13 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) { - variables[re.cap(1)] = QFileInfo( fileName() ).baseName(); + variables[re.cap(1)] = TQFileInfo( fileName() ).baseName(); } } pos += re.matchedLength(); } } - re = QRegExp("\\$\\$\\{([^\\)\\}]*)\\}"); + re = TQRegExp("\\$\\$\\{([^\\)\\}]*)\\}"); pos = 0; while( pos >= 0 ) { @@ -1308,15 +1308,15 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) { - variables[re.cap(1)] = QFileInfo( fileName() ).baseName(); + variables[re.cap(1)] = TQFileInfo( fileName() ).baseName(); } } pos += re.matchedLength(); } } - re = QRegExp("\\$\\$\\(([^\\)\\}]*)\\)"); + re = TQRegExp("\\$\\$\\(([^\\)\\}]*)\\)"); pos = 0; - QMap<QString, QString> envvars; + TQMap<TQString, TQString> envvars; while( pos >= 0 ) { pos = re.search( (*it), pos ); @@ -1326,17 +1326,17 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop if( m_environment.contains( re.cap(1) ) != -1 ) envvars[re.cap(1)] = m_environment[ re.cap(1) ]; else if ( ::getenv( re.cap(1).local8Bit() ) != 0 ) - envvars[re.cap(1)] = QString::fromLocal8Bit( ::getenv( re.cap(1).local8Bit() ) ); + envvars[re.cap(1)] = TQString::fromLocal8Bit( ::getenv( re.cap(1).local8Bit() ) ); pos += re.matchedLength(); } } - for( QMap<QString, QString>::const_iterator it2 = envvars.begin(); it2 != envvars.end(); ++it2 ) + for( TQMap<TQString, TQString>::const_iterator it2 = envvars.begin(); it2 != envvars.end(); ++it2 ) { (*it).replace("$$("+it2.key()+")", it2.data() ); } - for( QMap<QString, QStringList>::const_iterator it2 = variables.begin(); it2 != variables.end(); ++it2 ) + for( TQMap<TQString, TQStringList>::const_iterator it2 = variables.begin(); it2 != variables.end(); ++it2 ) { - for( QStringList::const_iterator it3 = it2.data().begin(); it3 != it2.data().end(); ++it3 ) + for( TQStringList::const_iterator it3 = it2.data().begin(); it3 != it2.data().end(); ++it3 ) { (*it).replace("$$"+it2.key(), *it3 ); (*it).replace("$${"+it2.key()+"}", *it3 ); @@ -1346,43 +1346,43 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop return result; } -void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) +void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res ) { - QString myRelPath = URLUtil::getRelativePath( projectDirectory, projectDir() ); - QString file; - QStringList values; - QString header = ""; + TQString myRelPath = URLUtil::getRelativePath( projectDirectory, projectDir() ); + TQString file; + TQStringList values; + TQString header = ""; if( variableValues("TEMPLATE",false ).findIndex("subdirs") == -1 ) { values = variableValues( "INSTALLS" ,false, false ); - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = values.begin(); it != values.end(); ++it ) { if ( ( *it ) == "target" ) continue; - QStringList files = variableValues( *it + ".files" ,false, false ); - QStringList::iterator filesit = files.begin(); + TQStringList files = variableValues( *it + ".files" ,false, false ); + TQStringList::iterator filesit = files.begin(); for ( ;filesit != files.end(); ++filesit ) { - file = myRelPath + QString(QChar(QDir::separator())) + *filesit; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *filesit; file = resolveVariables( file ); if( file.contains("*") ) { - QFileInfo fi( projectDirectory + QString( QChar( QDir::separator() ) ) + file ); - QDir absDir = fi.dir( true ); + TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); + TQDir absDir = fi.dir( true ); absDir.setNameFilter( fi.fileName() ); - absDir.setFilter( QDir::Files | QDir::Readable | QDir::NoSymLinks ); - QStringList list = absDir.entryList(); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + absDir.setFilter( TQDir::Files | TQDir::Readable | TQDir::NoSymLinks ); + TQStringList list = absDir.entryList(); + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - res.insert( QDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+QString( QChar( QDir::separator() ) )+*it ) ) ); + res.insert( TQDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+TQString( TQChar( TQDir::separator() ) )+*it ) ) ); } } else { - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } } @@ -1390,39 +1390,39 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "LEXSOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "YACCSOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "DISTFILES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); if( file.contains("*") ) { - QFileInfo fi( projectDirectory + QString( QChar( QDir::separator() ) ) + file ); - QDir absDir = fi.dir( true ); + TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); + TQDir absDir = fi.dir( true ); absDir.setNameFilter( fi.fileName() ); - absDir.setFilter( QDir::Files | QDir::Readable | QDir::NoSymLinks ); - QStringList list = absDir.entryList(); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + absDir.setFilter( TQDir::Files | TQDir::Readable | TQDir::NoSymLinks ); + TQStringList list = absDir.entryList(); + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - res.insert( QDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+QString( QChar( QDir::separator() ) )+*it ) ) ); + res.insert( TQDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+TQString( TQChar( TQDir::separator() ) )+*it ) ) ); } } else { - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } @@ -1431,33 +1431,33 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "RESOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } values = variableValues( "IMAGES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "TRANSLATIONS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "IDLS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } if ( m_part->isTMakeProject() ) @@ -1465,11 +1465,11 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "INTERFACES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); - if( QFileInfo(projectDir()+QString(QChar(QDir::separator())) + *it+".h").exists() ) - res.insert( QDir::cleanDirPath( file+".h" ) ); + res.insert( TQDir::cleanDirPath( file ) ); + if( TQFileInfo(projectDir()+TQString(TQChar(TQDir::separator())) + *it+".h").exists() ) + res.insert( TQDir::cleanDirPath( file+".h" ) ); } } else @@ -1477,25 +1477,25 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "FORMS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); if( !m_part->isQt4Project()) { - header = projectDir()+QString(QChar(QDir::separator())) + *it+".h"; - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); - header = projectDir()+QString(QChar(QDir::separator())) + *it+".cpp"; - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + *it+".h"; + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + *it+".cpp"; + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); } else { - header = projectDir()+QString(QChar(QDir::separator())) + "ui_" +*it; - header.replace(QRegExp("\\.ui$"),".h"); - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + "ui_" +*it; + header.replace(TQRegExp("\\.ui$"),".h"); + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); } } } @@ -1504,44 +1504,44 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) kdDebug(9024) << "scope:" << scopeType() << " found values: " << values << endl; for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "HEADERS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } - QMap<unsigned int, Scope*>::const_iterator it = m_scopes.begin(); + TQMap<unsigned int, Scope*>::const_iterator it = m_scopes.begin(); for( ; it != m_scopes.end(); ++it ) { it.data()->allFiles( projectDirectory, res ); } } -QStringList Scope::allFiles( const QString& projectDir ) +TQStringList Scope::allFiles( const TQString& projectDir ) { - QStringList result; - std::set<QString> files; + TQStringList result; + std::set<TQString> files; allFiles( projectDir, files ); - for( std::set<QString>::const_iterator it = files.begin(); it != files.end() ; ++it ) + for( std::set<TQString>::const_iterator it = files.begin(); it != files.end() ; ++it ) result.append( *it ); kdDebug(9024) << "all files: " << result << endl; return result; } -QString Scope::findCustomVarForPath( const QString& path ) +TQString Scope::findCustomVarForPath( const TQString& path ) { - QString result; + TQString result; if( !m_root ) return result; - QMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for( ; it != m_customVariables.end(); ++it ) { kdDebug(9024) << "Checking " << path << " against " << cleanStringList(it.data()->values) << endl; @@ -1564,12 +1564,12 @@ void Scope::loadDefaultOpts() m_defaultopts = new QMakeDefaultOpts(); if( DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/disableDefaultOpts", true ) ) { - m_defaultopts->readVariables( m_part->qmakePath(), QFileInfo( m_root->fileName() ).dirPath( true ) ); + m_defaultopts->readVariables( m_part->qmakePath(), TQFileInfo( m_root->fileName() ).dirPath( true ) ); } } } -QString Scope::getLineEndingString() const +TQString Scope::getLineEndingString() const { if( scopeType() == ProjectScope ) @@ -1577,13 +1577,13 @@ QString Scope::getLineEndingString() const switch( m_root->lineEnding() ) { case QMake::ProjectAST::Windows: - return QString("\r\n"); + return TQString("\r\n"); break; case QMake::ProjectAST::MacOS: - return QString("\r"); + return TQString("\r"); break; case QMake::ProjectAST::Unix: - return QString("\n"); + return TQString("\n"); break; } }else if( m_parent ) @@ -1593,18 +1593,18 @@ QString Scope::getLineEndingString() const return "\n"; } -QString Scope::replaceWs(QString s) +TQString Scope::replaceWs(TQString s) { return s.replace( getLineEndingString(), "%nl").replace("\t", "%tab").replace(" ", "%spc"); } -bool Scope::containsContinue(const QString& s ) const +bool Scope::containsContinue(const TQString& s ) const { - return( s.find( QRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 - || s.find( QRegExp( "\\\\\\s*#" ) ) != -1 ); + return( s.find( TQRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 + || s.find( TQRegExp( "\\\\\\s*#" ) ) != -1 ); } -bool Scope::isComment( const QString& s) const +bool Scope::isComment( const TQString& s) const { return s.startsWith("#"); } @@ -1668,7 +1668,7 @@ void Scope::PrintAST::leaveFunctionScope( QMake::ProjectAST* p ) QMake::ASTVisitor::leaveFunctionScope(p); } -QString Scope::PrintAST::replaceWs(QString s) +TQString Scope::PrintAST::replaceWs(TQString s) { return s.replace("\n", "%nl").replace("\t", "%tab").replace(" ", "%spc"); } @@ -1698,9 +1698,9 @@ void Scope::PrintAST::processInclude( QMake::IncludeAST* a) QMake::ASTVisitor::processInclude(a); } -QString Scope::PrintAST::getIndent() +TQString Scope::PrintAST::getIndent() { - QString ind; + TQString ind; for( int i = 0 ; i < indent ; i++) ind += " "; return ind; diff --git a/buildtools/qmake/scope.h b/buildtools/qmake/scope.h index e8f40eb9..5cc609ce 100644 --- a/buildtools/qmake/scope.h +++ b/buildtools/qmake/scope.h @@ -12,9 +12,9 @@ #ifndef _SCOPE_H_ #define _SCOPE_H_ -#include <qstring.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqmap.h> #include <set> #include "qmakeast.h" @@ -38,68 +38,68 @@ public: IncludeScope, InvalidScope }; - static const QStringList KnownVariables; - static const QStringList KnownConfigValues; + static const TQStringList KnownVariables; + static const TQStringList KnownConfigValues; - Scope( const QMap<QString, QString>& env, const QString &filename, TrollProjectPart* part ); + Scope( const TQMap<TQString, TQString>& env, const TQString &filename, TrollProjectPart* part ); ~Scope(); void saveToFile() const; // Changing variable values - void addToPlusOp( const QString& variable, const QStringList& values ); - void removeFromPlusOp( const QString& variable, const QStringList& values ); - void addToMinusOp( const QString& variable, const QStringList& values ); - void removeFromMinusOp( const QString& variable, const QStringList& values ); - void addToEqualOp( const QString& variable, const QStringList& values ); - void removeFromEqualOp( const QString& variable, const QStringList& values ); - void setPlusOp( const QString& variable, const QStringList& values ); - void setEqualOp( const QString& variable, const QStringList& values ); - void setMinusOp( const QString& variable, const QStringList& values ); + void addToPlusOp( const TQString& variable, const TQStringList& values ); + void removeFromPlusOp( const TQString& variable, const TQStringList& values ); + void addToMinusOp( const TQString& variable, const TQStringList& values ); + void removeFromMinusOp( const TQString& variable, const TQStringList& values ); + void addToEqualOp( const TQString& variable, const TQStringList& values ); + void removeFromEqualOp( const TQString& variable, const TQStringList& values ); + void setPlusOp( const TQString& variable, const TQStringList& values ); + void setEqualOp( const TQString& variable, const TQStringList& values ); + void setMinusOp( const TQString& variable, const TQStringList& values ); // Checks wether a line like VAR = exists in this subscope - bool isVariableReset( const QString& var ); + bool isVariableReset( const TQString& var ); // Fetch the valuelist for the variable op combination inside this scope - QStringList variableValuesForOp( const QString& variable, const QString& op ) const; + TQStringList variableValuesForOp( const TQString& variable, const TQString& op ) const; // Fetch the variable values by running over the statements and adding/removing/setting // as the encountered op's say, begin with the parent projects variableValues list - QStringList variableValues( const QString& variable, bool checkIncParent = true, bool fetchFromParent = true, bool evaluateSubScopes = false ); + TQStringList variableValues( const TQString& variable, bool checkIncParent = true, bool fetchFromParent = true, bool evaluateSubScopes = false ); // Remove a variable+Op combination from the scope, if existant - void removeVariable( const QString& var, const QString& op ); + void removeVariable( const TQString& var, const TQString& op ); // Getting to know what type of scope this is ScopeType scopeType() const; // This returns the function+args, the scopename or the pro/pri file // depending on the type of scope - QString scopeName() const; + TQString scopeName() const; // Returns the projectName for this scope, this is equal to the last part of the projectDir() - QString projectName() const; + TQString projectName() const; // Returns just the filename of this project's .pro file - QString fileName() const; + TQString fileName() const; // Returns the absolute path of the dir containing the .pro file - QString projectDir() const; + TQString projectDir() const; // get the parent Scope Scope* parent() const { return m_parent; } // Fetching sub-scopes - const QValueList<Scope*> scopesInOrder() const { return m_scopes.values(); } + const TQValueList<Scope*> scopesInOrder() const { return m_scopes.values(); } // Working on SubScopes /* * creates a new function scope at the end of this (Sub-)AST and returns the Scope wrapping it */ - Scope* createFunctionScope( const QString& funcName, const QString& args ); + Scope* createFunctionScope( const TQString& funcName, const TQString& args ); /* * creates a new simple scope at the end of this (Sub-)AST and returns the Scope wrapping it */ - Scope* createSimpleScope( const QString& scopename ); + Scope* createSimpleScope( const TQString& scopename ); /* * creates a new function scope at the end of this (Sub-)AST @@ -107,14 +107,14 @@ public: * It returns the Scope wrapping the include-AST, the function scope AST * can be accessed easily using the parent() method. */ - Scope* createIncludeScope( const QString& includeFile, bool negate = false ); + Scope* createIncludeScope( const TQString& includeFile, bool negate = false ); /* * creates a new subproject in dir (create's dir if necessary) * If this scope is not a project scope the subproject will be added to this * Scope only, i.e. it is not seen in the project-files list of subdirs */ - Scope* createSubProject( const QString& dir ); + Scope* createSubProject( const TQString& dir ); /* delete the given function scope */ bool deleteFunctionScope( unsigned int ); @@ -129,38 +129,38 @@ public: bool isQt4Project() const ; /* Provide a Map of Custom variables */ - const QMap<unsigned int, QMap<QString, QString> > customVariables() const; + const TQMap<unsigned int, TQMap<TQString, TQString> > customVariables() const; - unsigned int addCustomVariable( const QString& var, const QString& op, const QString& values ); + unsigned int addCustomVariable( const TQString& var, const TQString& op, const TQString& values ); /* Removes the variable with the given id if it exists */ void removeCustomVariable( unsigned int ); /* Update the values of the variable/operation combo var+op to values */ - void updateCustomVariable( unsigned int, const QString&, const QString& , const QString& ); + void updateCustomVariable( unsigned int, const TQString&, const TQString& , const TQString& ); - // Checks wether a QStringList contains any values that are not whitespace or \\n - static bool listIsEmpty( const QStringList& values ); + // Checks wether a TQStringList contains any values that are not whitespace or \\n + static bool listIsEmpty( const TQStringList& values ); /* returns wether this is an enabled subproject or a disabled one */ bool isEnabled() { return m_isEnabled; } - QStringList cleanStringList(const QStringList& list) const; + TQStringList cleanStringList(const TQStringList& list) const; /* Reload a project scope */ void reloadProject(); /* creates a new disabled Scope child and add SUBDIRS -= dir to this scope */ - Scope* disableSubproject( const QString& ); + Scope* disableSubproject( const TQString& ); /* return the "position" of this scope in the list of scopes */ unsigned int getNum() { return m_num; } - QStringList allFiles( const QString& ); + TQStringList allFiles( const TQString& ); - QString resolveVariables( const QString& ) const; + TQString resolveVariables( const TQString& ) const; - QString findCustomVarForPath( const QString& ); + TQString findCustomVarForPath( const TQString& ); #ifdef DEBUG void printTree(); @@ -183,77 +183,77 @@ private: * if op is -= removes values from any occurence of = and += * if op is = removes values frmo any occurence of -= */ - void updateVariable( const QString& variable, const QString& op, const QStringList& values, bool removeFromOp ); + void updateVariable( const TQString& variable, const TQString& op, const TQStringList& values, bool removeFromOp ); /* * Helper Function to change the origValues list with the values from newValues * depending on the state of "remove" either adds or removes all entries from newValues * to origValues if they didn't exist there yet */ - void updateValues( QStringList& origValues, const QStringList& newValues, bool remove = false, QString indent = " " ); + void updateValues( TQStringList& origValues, const TQStringList& newValues, bool remove = false, TQString indent = " " ); /* * Finds an existing variable, returns the end() of the statemenst if it is not found */ - QValueList<QMake::AST*>::iterator findExistingVariable( const QString& variable ); + TQValueList<QMake::AST*>::iterator findExistingVariable( const TQString& variable ); // Private constructors for easier subscope creation /* * just initializes the lists from the scope */ - Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* root, QMakeDefaultOpts*, TrollProjectPart* part ); + Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* root, QMakeDefaultOpts*, TrollProjectPart* part ); /* * reads the given filename and parses it. If it doesn't exist creates an empty * ProjectAST with the given filename */ - Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, const QString& filename, TrollProjectPart* part, bool isEnabled = true ); + Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, const TQString& filename, TrollProjectPart* part, bool isEnabled = true ); /* * Creates a scope for an include statement, parses the file and initializes the Scope * Create an empty ProjectAST if the file cannot be found or parsed. */ - Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const QString& path, const QString& incfile, QMakeDefaultOpts*, TrollProjectPart* part ); + Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const TQString& path, const TQString& incfile, QMakeDefaultOpts*, TrollProjectPart* part ); // runs through the statements until stopHere is found (or the end is reached, if stopHere is 0), // using the given list as startvalue // Changes the list using the +=, -=, = operations accordingly - void calcValuesFromStatements( const QString& variable, QStringList& result, bool, QMake::AST* stopHere = 0, bool fetchFromParent = true, bool setDefault = true, bool evaluateSubScopes = false ) const; + void calcValuesFromStatements( const TQString& variable, TQStringList& result, bool, QMake::AST* stopHere = 0, bool fetchFromParent = true, bool setDefault = true, bool evaluateSubScopes = false ) const; // Check wether the two operators are compatible - static bool isCompatible( const QString& op1, const QString& op2); + static bool isCompatible( const TQString& op1, const TQString& op2); // Check wether the 2 lists are equal, regardless of element order. - static bool listsEqual(const QStringList& , const QStringList& ); + static bool listsEqual(const TQStringList& , const TQStringList& ); // Load and Save project files, these only work on ProjectScope's - bool loadFromFile( const QString& filename ); + bool loadFromFile( const TQString& filename ); - QString funcScopeKey( QMake::ProjectAST* funcast ) const { return funcast->scopedID + "(" + funcast->args + ")"; } + TQString funcScopeKey( QMake::ProjectAST* funcast ) const { return funcast->scopedID + "(" + funcast->args + ")"; } unsigned int getNextScopeNum() { if( m_scopes.isEmpty() ) return 0; else return (m_scopes.keys().last()+1); } - QStringList lookupVariable( const QString& var ); + TQStringList lookupVariable( const TQString& var ); - QStringList resolveVariables( const QStringList&, QMake::AST* = 0 ) const; - QStringList variableValues( const QString& variable, QMake::AST*, bool fetchFromParent = true ) const; - QString resolveVariables( const QString& , QMake::AST* ) const; + TQStringList resolveVariables( const TQStringList&, QMake::AST* = 0 ) const; + TQStringList variableValues( const TQString& variable, QMake::AST*, bool fetchFromParent = true ) const; + TQString resolveVariables( const TQString& , QMake::AST* ) const; // This function determines the currently used String for fileending, it can be \n, \r or \r\n - QString getLineEndingString() const; - bool isComment( const QString& ) const; - bool containsContinue( const QString& ) const; - void allFiles( const QString&, std::set<QString>& ); + TQString getLineEndingString() const; + bool isComment( const TQString& ) const; + bool containsContinue( const TQString& ) const; + void allFiles( const TQString&, std::set<TQString>& ); void loadDefaultOpts(); QMake::ProjectAST* m_root; QMake::IncludeAST* m_incast; - QMap<unsigned int, QMake::AssignmentAST*> m_customVariables; - QMap<unsigned int, Scope*> m_scopes; + TQMap<unsigned int, QMake::AssignmentAST*> m_customVariables; + TQMap<unsigned int, Scope*> m_scopes; Scope* m_parent; unsigned int m_maxCustomVarNum; - QString replaceWs(QString); + TQString replaceWs(TQString); // The "position" inside the parent scope that this scope starts at @@ -261,8 +261,8 @@ private: bool m_isEnabled; TrollProjectPart* m_part; QMakeDefaultOpts* m_defaultopts; - QMap<QString, QStringList> m_varCache; - QMap<QString,QString> m_environment; + TQMap<TQString, TQStringList> m_varCache; + TQMap<TQString,TQString> m_environment; #ifdef DEBUG class PrintAST : QMake::ASTVisitor @@ -291,10 +291,10 @@ private: virtual void processInclude( QMake::IncludeAST* a); - QString replaceWs(QString); + TQString replaceWs(TQString); private: - QString getIndent(); + TQString getIndent(); int indent; }; diff --git a/buildtools/qmake/trolllistview.cpp b/buildtools/qmake/trolllistview.cpp index 2c91251b..3bf99a0e 100644 --- a/buildtools/qmake/trolllistview.cpp +++ b/buildtools/qmake/trolllistview.cpp @@ -20,7 +20,7 @@ #include "trolllistview.h" -TrollListView::TrollListView(TrollProjectWidget *widget, QWidget *parent, +TrollListView::TrollListView(TrollProjectWidget *widget, TQWidget *parent, TrollProjectWidget::TrollProjectView view, const char *name) :KListView(parent, name), m_widget(widget), m_view(view) { @@ -30,7 +30,7 @@ TrollListView::~TrollListView() { } -void TrollListView::focusOutEvent( QFocusEvent */* e*/ ) +void TrollListView::focusOutEvent( TQFocusEvent */* e*/ ) { m_widget->setLastFocusedView(m_view); } diff --git a/buildtools/qmake/trolllistview.h b/buildtools/qmake/trolllistview.h index 66f70960..5fd79b30 100644 --- a/buildtools/qmake/trolllistview.h +++ b/buildtools/qmake/trolllistview.h @@ -28,10 +28,10 @@ class TrollListView : public KListView { Q_OBJECT public: - TrollListView(TrollProjectWidget *widget, QWidget *parent, TrollProjectWidget::TrollProjectView view, const char *name = 0); + TrollListView(TrollProjectWidget *widget, TQWidget *parent, TrollProjectWidget::TrollProjectView view, const char *name = 0); ~TrollListView(); protected: - virtual void focusOutEvent(QFocusEvent *e); + virtual void focusOutEvent(TQFocusEvent *e); private: TrollProjectWidget *m_widget; diff --git a/buildtools/qmake/trollprojectpart.cpp b/buildtools/qmake/trollprojectpart.cpp index 6d2f5b3a..d59c5b4b 100644 --- a/buildtools/qmake/trollprojectpart.cpp +++ b/buildtools/qmake/trollprojectpart.cpp @@ -15,9 +15,9 @@ #include "trollprojectpart.h" -#include <qdir.h> -#include <qfileinfo.h> -#include <qwhatsthis.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqwhatsthis.h> #include <kdeversion.h> #include <kdebug.h> #include <kdialogbase.h> @@ -26,7 +26,7 @@ #include <kmessagebox.h> #include <kdirwatch.h> #include <kstatusbar.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <kdevgenericfactory.h> #include <kaction.h> #include <kparts/part.h> @@ -60,7 +60,7 @@ typedef KDevGenericFactory<TrollProjectPart> TrollProjectFactory; static const KDevPluginInfo data("kdevtrollproject"); K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( data ) ) -TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStringList& args ) +TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQStringList& args ) : KDevBuildTool(&data, parent, name ? name : "TrollProjectPart") { setInstance(TrollProjectFactory::instance()); @@ -80,7 +80,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr m_widget = new TrollProjectWidget(this); m_widget->setIcon(SmallIcon("qmakerun")); m_widget->setCaption(i18n("QMake Manager")); - QWhatsThis::add(m_widget, i18n("<b>QMake manager</b><p>" + TQWhatsThis::add(m_widget, i18n("<b>QMake manager</b><p>" "The QMake manager project tree consists of two parts. The 'overview' " "in the upper half shows the subprojects, each one having a " ".pro file. The 'details' view in the lower half shows the " @@ -90,9 +90,9 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr KAction *action; - const QIconSet icon(SmallIcon("compfile")); + const TQIconSet icon(SmallIcon("compfile")); action = new KAction( i18n("Compile &File"), "compfile", 0, - m_widget, SLOT(slotBuildOpenFile()), + m_widget, TQT_SLOT(slotBuildOpenFile()), actionCollection(),"build_compilefile" ); action->setToolTip(i18n("Compile file")); action->setWhatsThis(i18n("<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>" @@ -101,7 +101,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr action = new KAction( i18n("&Build Project"), "make_kdevelop", Key_F8, - m_widget, SLOT(slotBuildProject()), + m_widget, TQT_SLOT(slotBuildProject()), actionCollection(), "build_build_project" ); action->setToolTip(i18n("Build project")); action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>" @@ -109,7 +109,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Rebuild Project"),"rebuild" , 0, - m_widget, SLOT(slotRebuildProject()), + m_widget, TQT_SLOT(slotRebuildProject()), actionCollection(),"build_rebuild_project" ); action->setToolTip(i18n("Rebuild project")); action->setWhatsThis(i18n("<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>" @@ -117,7 +117,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Install Project"),"install" , 0, - m_widget, SLOT(slotInstallProject()), + m_widget, TQT_SLOT(slotInstallProject()), actionCollection(),"build_install_project" ); action->setToolTip(i18n("Install project")); action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> from the project directory.<br>" @@ -125,7 +125,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Clean Project"), 0, - m_widget, SLOT(slotCleanProject()), + m_widget, TQT_SLOT(slotCleanProject()), actionCollection(), "build_clean_project" ); action->setToolTip(i18n("Clean project")); action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>" @@ -133,7 +133,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Dist-Clean Project"), 0, - m_widget, SLOT(slotDistCleanProject()), + m_widget, TQT_SLOT(slotDistCleanProject()), actionCollection(), "build_distclean_project" ); action->setToolTip(i18n("Dist-Clean project")); action->setWhatsThis(i18n("<b>Dist-Clean project</b><p>Runs <b>make distclean</b> command from the " @@ -141,13 +141,13 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("Execute Main Program"), "exec", SHIFT+Key_F9, - this, SLOT(slotBuildAndExecuteProject()), + this, TQT_SLOT(slotBuildAndExecuteProject()), actionCollection(), "build_execute_project" ); action->setToolTip(i18n("Execute main program")); action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently selected subproject if it is an application or the program specified in project settings, <b>Run Options</b> tab.")); action = new KAction( i18n("&Build Subproject"), "make_kdevelop", Key_F7, - m_widget, SLOT(slotBuildTarget()), + m_widget, TQT_SLOT(slotBuildTarget()), actionCollection(), "build_build_target" ); action->setToolTip(i18n("Build subproject")); action->setWhatsThis(i18n("<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. " @@ -156,7 +156,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Rebuild Subproject"), "rebuild", 0, - m_widget, SLOT(slotRebuildTarget()), + m_widget, TQT_SLOT(slotRebuildTarget()), actionCollection(),"build_rebuild_target" ); action->setToolTip(i18n("Rebuild subproject")); action->setWhatsThis(i18n("<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. " @@ -165,7 +165,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Install Subproject"), "install", 0, - m_widget, SLOT(slotInstallTarget()), + m_widget, TQT_SLOT(slotInstallTarget()), actionCollection(),"build_install_target" ); action->setToolTip(i18n("Install subproject")); action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> from the current subproject directory. " @@ -174,7 +174,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Clean Subproject"), 0, - m_widget, SLOT(slotCleanTarget()), + m_widget, TQT_SLOT(slotCleanTarget()), actionCollection(), "build_clean_target" ); action->setToolTip(i18n("Clean subproject")); action->setWhatsThis(i18n("<b>Clean subproject</b><p>Runs <b>make clean</b> from the current subproject directory. " @@ -183,7 +183,7 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("&Dist-Clean Subproject"), 0, - m_widget, SLOT(slotDistCleanTarget()), + m_widget, TQT_SLOT(slotDistCleanTarget()), actionCollection(), "build_distclean_target" ); action->setToolTip(i18n("Dist-Clean subproject")); action->setWhatsThis(i18n("<b>Dist-Clean subproject</b><p>Runs <b>make distclean</b> from the current" @@ -192,22 +192,22 @@ TrollProjectPart::TrollProjectPart(QObject *parent, const char *name, const QStr "in the project settings dialog, <b>Make Options</b> tab.")); action = new KAction( i18n("Execute Subproject"), "exec", 0, - this, SLOT(slotBuildAndExecuteTarget()), + this, TQT_SLOT(slotBuildAndExecuteTarget()), actionCollection(), "build_execute_target" ); action->setToolTip(i18n("Execute subproject")); action->setWhatsThis(i18n("<b>Execute subproject</b><p>Executes the target program for the currently selected subproject. " "This action is allowed only if a type of the subproject is 'application'. The type of the subproject can be " "defined in <b>Subproject Settings</b> dialog (open it from the subproject context menu).")); - connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), - this, SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( makeFrontend(), SIGNAL(commandFinished(const QString&)), - this, SLOT(slotCommandFinished(const QString&)) ); + connect( makeFrontend(), TQT_SIGNAL(commandFinished(const TQString&)), + this, TQT_SLOT(slotCommandFinished(const TQString&)) ); - QString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); - QString m_qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", ""); - QString qtversion = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/version", "3"); + TQString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); + TQString m_qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", ""); + TQString qtversion = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/version", "3"); if( m_defaultQtDir.isEmpty() || !isValidQtDir( m_defaultQtDir ) ) { @@ -233,7 +233,7 @@ TrollProjectPart::~TrollProjectPart() delete m_widget; } -QString TrollProjectPart::makeEnvironment() +TQString TrollProjectPart::makeEnvironment() { // Get the make environment variables pairs into the environstr string // in the form of: "ENV_VARIABLE=ENV_VALUE" @@ -242,7 +242,7 @@ QString TrollProjectPart::makeEnvironment() DomUtil::PairList envvars = DomUtil::readPairListEntry(*projectDom(), "/kdevtrollproject/make/envvars", "envvar", "name", "value"); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; bool hasQtDir = false; for (it = envvars.begin(); it != envvars.end(); ++it) { @@ -257,7 +257,7 @@ QString TrollProjectPart::makeEnvironment() if( !hasQtDir && !isQt4Project() && !DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "").isEmpty() ) { - environstr += QString( "QTDIR=" ) + EnvVarTools::quote( DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "") ) + QString( " PATH=$QTDIR/bin:$PATH " ); + environstr += TQString( "QTDIR=" ) + EnvVarTools::quote( DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", "") ) + TQString( " PATH=$QTDIR/bin:$PATH " ); } KConfigGroup grp( kapp->config(), "MakeOutputView" ); @@ -269,7 +269,7 @@ QString TrollProjectPart::makeEnvironment() void TrollProjectPart::projectConfigWidget(KDialogBase *dlg) { - QVBox *vbox; + TQVBox *vbox; vbox = dlg->addVBoxPage(i18n("Run Options"), i18n("Run Options"), BarIcon( "make", KIcon::SizeMedium )); RunOptionsWidget *optdlg = new RunOptionsWidget(*projectDom(), "/kdevtrollproject", buildDirectory(), vbox); @@ -280,32 +280,32 @@ void TrollProjectPart::projectConfigWidget(KDialogBase *dlg) QMakeOptionsWidget *qm = new QMakeOptionsWidget( projectDirectory(), *projectDom(), "/kdevtrollproject", vbox); - connect( dlg, SIGNAL(okClicked()), w4, SLOT(accept()) ); - connect( dlg, SIGNAL(okClicked()), qm, SLOT(accept()) ); - connect( dlg, SIGNAL(okClicked()), optdlg, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w4, TQT_SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), qm, TQT_SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), optdlg, TQT_SLOT(accept()) ); } -void TrollProjectPart::openProject(const QString &dirName, const QString &projectName) +void TrollProjectPart::openProject(const TQString &dirName, const TQString &projectName) { mainWindow()->statusBar()->message( i18n("Loading Project...") ); - QString defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); + TQString defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); if( !isQt4Project() && ( defaultQtDir.isEmpty() || !isValidQtDir( defaultQtDir ) ) ) { bool doask = true; while( doask ) { KURLRequesterDlg dlg( i18n("Choose Qt3 directory"), - i18n("Choose the Qt3 directory to use. This directory needs to have an include directory containing qt.h.") + i18n("Choose the Qt3 directory to use. This directory needs to have an include directory containing tqt.h.") , m_widget, 0); dlg.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - dlg.urlRequester() ->setURL( QString::null ); + dlg.urlRequester() ->setURL( TQString::null ); dlg.urlRequester() ->completionObject() ->setDir( "/" ); - if ( dlg.exec() == QDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() ) + if ( dlg.exec() == TQDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() ) { - QString qtdir = dlg.urlRequester()->url(); + TQString qtdir = dlg.urlRequester()->url(); if( !isValidQtDir( qtdir ) ) { if( KMessageBox::warningYesNo( m_widget, @@ -313,7 +313,7 @@ void TrollProjectPart::openProject(const QString &dirName, const QString &projec "project might not work properly without one.\nPlease make " "sure you give a directory that contains a bin with the " "qmake binary in it and for Qt3 project also contains an " - "include directory with qt.h in it.\nDo you want to try " + "include directory with tqt.h in it.\nDo you want to try " "setting a Qt directory again?"), i18n("Wrong Qt directory given")) == KMessageBox::Yes @@ -342,7 +342,7 @@ void TrollProjectPart::openProject(const QString &dirName, const QString &projec } } } - QString qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", ""); + TQString qmakePath = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", ""); if( qmakePath.isEmpty() || !isExecutable( qmakePath ) ) { bool doask = true; @@ -351,12 +351,12 @@ void TrollProjectPart::openProject(const QString &dirName, const QString &projec KURLRequesterDlg dlg( i18n("Choose QMake executable"), i18n("Choose the QMake binary to use. QMake is used to generate Makefiles from the project files."), m_widget, 0); dlg.urlRequester() ->setMode( KFile::Directory | KFile::LocalOnly ); - dlg.urlRequester() ->setURL( QString::null ); + dlg.urlRequester() ->setURL( TQString::null ); dlg.urlRequester() ->completionObject() ->setDir( "/" ); - if ( dlg.exec() == QDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() ) + if ( dlg.exec() == TQDialog::Accepted && !dlg.urlRequester() ->url().isEmpty() ) { - QString qmake = dlg.urlRequester()->url(); + TQString qmake = dlg.urlRequester()->url(); if( !isExecutable( qmake ) ) { if( KMessageBox::warningYesNo( m_widget, @@ -399,7 +399,7 @@ void TrollProjectPart::openProject(const QString &dirName, const QString &projec m_widget->openProject(dirName); - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); // Set the default directory radio to "executable" if (DomUtil::readEntry(dom, "/kdevtrollproject/run/directoryradio") == "" ) { DomUtil::writeEntry(dom, "/kdevtrollproject/run/directoryradio", "executable"); @@ -415,18 +415,18 @@ void TrollProjectPart::closeProject() } -QString TrollProjectPart::projectDirectory() const +TQString TrollProjectPart::projectDirectory() const { return m_widget->projectDirectory(); } -QString TrollProjectPart::buildDirectory() const +TQString TrollProjectPart::buildDirectory() const { return m_widget->projectDirectory(); } -QString TrollProjectPart::projectName() const +TQString TrollProjectPart::projectName() const { return m_projectName; } @@ -468,27 +468,27 @@ void TrollProjectPart::slotBuildAndExecuteTarget() * if run/directoryradio == custom * The custom directory absolute path */ -QString TrollProjectPart::runDirectory() const +TQString TrollProjectPart::runDirectory() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); - QString cwd; + TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevtrollproject/run/useglobalprogram", true) ) { cwd = defaultRunDirectory("kdevtrollproject"); }else { - QString name = m_widget->getCurrentOutputFilename(); + TQString name = m_widget->getCurrentOutputFilename(); if( name.findRev("/") != -1 ) name = name.right( name.length()-name.findRev("/")-1 ); cwd = DomUtil::readEntry( dom, "/kdevtrollproject/run/cwd/" + name ); } if( cwd.isEmpty() ) { - QString destpath = m_widget->getCurrentTarget(); - if( QDir::isRelativePath( destpath ) ) + TQString destpath = m_widget->getCurrentTarget(); + if( TQDir::isRelativePath( destpath ) ) { - destpath = m_widget->subprojectDirectory() + QString( QChar( QDir::separator() ) ) + destpath; + destpath = m_widget->subprojectDirectory() + TQString( TQChar( TQDir::separator() ) ) + destpath; } destpath = destpath.left( destpath.findRev("/") ); cwd = destpath; @@ -509,16 +509,16 @@ QString TrollProjectPart::runDirectory() const */ -QString TrollProjectPart::mainProgram() const +TQString TrollProjectPart::mainProgram() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if( DomUtil::readBoolEntry(dom, "/kdevtrollproject/run/useglobalprogram", false) ) { - QString DomMainProgram = DomUtil::readEntry(dom, "/kdevtrollproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry(dom, "/kdevtrollproject/run/mainprogram"); - if ( DomMainProgram.isEmpty() ) return QString(); + if ( DomMainProgram.isEmpty() ) return TQString(); if ( DomMainProgram.startsWith("/") ) // assume absolute path { @@ -535,7 +535,7 @@ QString TrollProjectPart::mainProgram() const KMessageBox::error( m_widget, "There's no selected subproject!\n" "Unable to determine the main program", "No selected subproject found" ); kdDebug ( 9020 ) << k_funcinfo << "Error! : There's no active target! -> Unable to determine the main program in TrollProjectPart::mainProgram()" << endl; - return QString::null; + return TQString::null; } if ( m_widget->currentSubproject()->scope->variableValues("TEMPLATE").findIndex("app") == -1 ) @@ -545,19 +545,19 @@ QString TrollProjectPart::mainProgram() const "to be the selected subproject, set a main program under\n" "Project -> Project Options -> Run Options", "Selected subproject is not a library" ); kdDebug ( 9020 ) << k_funcinfo << "Error! : Active target isn't binary (" << m_widget->currentSubproject()->scope->variableValues("TEMPLATE").join(" ") << ") ! -> Unable to determine the main program in TrollProjectPart::mainProgram()" << endl; - return QString::null; + return TQString::null; } - QString destpath = m_widget->getCurrentTarget(); - if( QDir::isRelativePath( destpath ) ) + TQString destpath = m_widget->getCurrentTarget(); + if( TQDir::isRelativePath( destpath ) ) { - destpath = m_widget->subprojectDirectory() + QString( QChar( QDir::separator() ) ) + destpath; + destpath = m_widget->subprojectDirectory() + TQString( TQChar( TQDir::separator() ) ) + destpath; } return destpath; } } -QString TrollProjectPart::debugArguments() const +TQString TrollProjectPart::debugArguments() const { if( DomUtil::readBoolEntry(*projectDom(), "/kdevtrollproject/run/useglobalprogram", true ) ) { @@ -568,8 +568,8 @@ QString TrollProjectPart::debugArguments() const } } -/** Retuns a QString with the run command line arguments */ -QString TrollProjectPart::runArguments() const +/** Retuns a TQString with the run command line arguments */ +TQString TrollProjectPart::runArguments() const { if( DomUtil::readBoolEntry(*projectDom(), "/kdevtrollproject/run/useglobalprogram", true) ) { @@ -581,34 +581,34 @@ QString TrollProjectPart::runArguments() const } -QString TrollProjectPart::activeDirectory() const +TQString TrollProjectPart::activeDirectory() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); return DomUtil::readEntry(dom, "/kdevtrollproject/general/activedir"); } -QStringList TrollProjectPart::allFiles() const +TQStringList TrollProjectPart::allFiles() const { return m_widget->allFiles(); } -void TrollProjectPart::addFile(const QString &fileName) +void TrollProjectPart::addFile(const TQString &fileName) { - QStringList fileList; + TQStringList fileList; fileList.append ( fileName ); - this->addFiles ( QStringList( fileName ) ); + this->addFiles ( TQStringList( fileName ) ); } -void TrollProjectPart::addFiles ( const QStringList &fileList ) +void TrollProjectPart::addFiles ( const TQStringList &fileList ) { - QStringList files = fileList; - for (QStringList::iterator it = files.begin(); it != files.end(); ++it) + TQStringList files = fileList; + for (TQStringList::iterator it = files.begin(); it != files.end(); ++it) { - if( !QFileInfo( *it ).isRelative() ) + if( !TQFileInfo( *it ).isRelative() ) { *it = URLUtil::relativePathToFile( projectDirectory(), *it ); } @@ -617,19 +617,19 @@ void TrollProjectPart::addFiles ( const QStringList &fileList ) } -void TrollProjectPart::removeFile(const QString & /* fileName */) +void TrollProjectPart::removeFile(const TQString & /* fileName */) { /// \FIXME -/* QStringList fileList; +/* TQStringList fileList; fileList.append ( fileName ); this->removeFiles ( fileList );*/ } -void TrollProjectPart::removeFiles ( const QStringList& fileList ) +void TrollProjectPart::removeFiles ( const TQStringList& fileList ) { /// \FIXME missing remove files functionality -// QStringList::ConstIterator it; +// TQStringList::ConstIterator it; // // it = fileList.begin(); // @@ -641,33 +641,33 @@ void TrollProjectPart::removeFiles ( const QStringList& fileList ) emit removedFilesFromProject ( fileList ); } /* -void TrollProjectPart::startMakeCommand(const QString &dir, const QString &target) +void TrollProjectPart::startMakeCommand(const TQString &dir, const TQString &target) { partController()->saveAllFiles(); - QFileInfo fi(dir + "/Makefile"); + TQFileInfo fi(dir + "/Makefile"); if (!fi.exists()) { - int r = KMessageBox::questionYesNo(m_widget, i18n("There is no Makefile in this directory. Run qmake first?"), QString::null, i18n("Run qmake"), i18n("Do Not Run")); + int r = KMessageBox::questionYesNo(m_widget, i18n("There is no Makefile in this directory. Run qmake first?"), TQString::null, i18n("Run qmake"), i18n("Do Not Run")); if (r == KMessageBox::No) return; startQMakeCommand(dir); } - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); if (target=="clean") { - QString cmdline = DomUtil::readEntry(dom, "/kdevtrollproject/make/makebin"); + TQString cmdline = DomUtil::readEntry(dom, "/kdevtrollproject/make/makebin"); if (cmdline.isEmpty()) cmdline = MAKE_COMMAND; cmdline += " clean"; - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += dir; dircmd += " && "; cmdline.prepend(makeEnvironment()); makeFrontend()->queueCommand(dir, dircmd + cmdline); } - QString cmdline = DomUtil::readEntry(dom, "/kdevtrollproject/make/makebin"); + TQString cmdline = DomUtil::readEntry(dom, "/kdevtrollproject/make/makebin"); if (cmdline.isEmpty()) cmdline = MAKE_COMMAND; if (!DomUtil::readBoolEntry(dom, "/kdevtrollproject/make/abortonerror")) @@ -675,7 +675,7 @@ void TrollProjectPart::startMakeCommand(const QString &dir, const QString &targe int jobs = DomUtil::readIntEntry(dom, "/kdevtrollproject/make/numberofjobs"); if (jobs != 0) { cmdline += " -j"; - cmdline += QString::number(jobs); + cmdline += TQString::number(jobs); } if (DomUtil::readBoolEntry(dom, "/kdevtrollproject/make/dontact")) cmdline += " -n"; @@ -683,7 +683,7 @@ void TrollProjectPart::startMakeCommand(const QString &dir, const QString &targe cmdline += " "; cmdline += target; - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += dir; dircmd += " && "; @@ -692,10 +692,10 @@ void TrollProjectPart::startMakeCommand(const QString &dir, const QString &targe } */ -void TrollProjectPart::startQMakeCommand(const QString &dir, bool recursive) +void TrollProjectPart::startQMakeCommand(const TQString &dir, bool recursive) { - QFileInfo fi(dir); - QString cmdline; + TQFileInfo fi(dir); + TQString cmdline; if ( isTMakeProject() ) { @@ -710,10 +710,10 @@ void TrollProjectPart::startQMakeCommand(const QString &dir, bool recursive) cmdline += " -recursive "; } - //QString cmdline = QString::fromLatin1( isTMakeProject() ? "tmake " : "qmake " ); + //TQString cmdline = TQString::fromLatin1( isTMakeProject() ? "tmake " : "qmake " ); // cmdline += fi.baseName() + ".pro"; - QDir d(dir); - QStringList l = d.entryList("*.pro"); + TQDir d(dir); + TQStringList l = d.entryList("*.pro"); if( l.isEmpty() || ( l.count() && l.findIndex( projectName() + ".pro" ) != -1 ) ) cmdline += projectName()+".pro"; @@ -722,9 +722,9 @@ void TrollProjectPart::startQMakeCommand(const QString &dir, bool recursive) else cmdline += l[0]; -// cmdline += QString::fromLatin1( " -o Makefile" ); +// cmdline += TQString::fromLatin1( " -o Makefile" ); - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += KProcess::quote(dir); dircmd += " && "; @@ -732,28 +732,28 @@ void TrollProjectPart::startQMakeCommand(const QString &dir, bool recursive) makeFrontend()->queueCommand(dir, dircmd + cmdline); } -void TrollProjectPart::queueCmd(const QString &dir, const QString &cmd) +void TrollProjectPart::queueCmd(const TQString &dir, const TQString &cmd) { makeFrontend()->queueCommand(dir, cmd); } -void TrollProjectPart::slotCommandFinished( const QString& command ) +void TrollProjectPart::slotCommandFinished( const TQString& command ) { Q_UNUSED( command ); // if( m_buildCommand != command ) // return; // -// m_buildCommand = QString::null; +// m_buildCommand = TQString::null; m_timestamp.clear(); - QStringList fileList = allFiles(); - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = allFiles(); + TQStringList::Iterator it = fileList.begin(); while( it != fileList.end() ){ - QString fileName = *it; + TQString fileName = *it; ++it; - m_timestamp[ fileName ] = QFileInfo( projectDirectory(), fileName ).lastModified(); + m_timestamp[ fileName ] = TQFileInfo( projectDirectory(), fileName ).lastModified(); } emit projectCompiled(); @@ -772,14 +772,14 @@ void TrollProjectPart::slotCommandFinished( const QString& command ) bool TrollProjectPart::isDirty() { - QStringList fileList = allFiles(); - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = allFiles(); + TQStringList::Iterator it = fileList.begin(); while( it != fileList.end() ){ - QString fileName = *it; + TQString fileName = *it; ++it; - QMap<QString, QDateTime>::Iterator it = m_timestamp.find( fileName ); - QDateTime t = QFileInfo( projectDirectory(), fileName ).lastModified(); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( fileName ); + TQDateTime t = TQFileInfo( projectDirectory(), fileName ).lastModified(); if( it == m_timestamp.end() || *it != t ){ return true; } @@ -793,46 +793,46 @@ KDevProject::Options TrollProjectPart::options( ) const return UsesQMakeBuildSystem; } -bool TrollProjectPart::isValidQtDir( const QString& path ) const +bool TrollProjectPart::isValidQtDir( const TQString& path ) const { - QFileInfo inc( path + QString( QChar( QDir::separator() ) )+ - "include"+QString( QChar( QDir::separator() ) )+ - "qt.h" ); + TQFileInfo inc( path + TQString( TQChar( TQDir::separator() ) )+ + "include"+TQString( TQChar( TQDir::separator() ) )+ + "tqt.h" ); return ( isQt4Project() || ( !isQt4Project() && inc.exists() ) ); } -void TrollProjectPart::buildBinDirs( QStringList & dirs ) const +void TrollProjectPart::buildBinDirs( TQStringList & dirs ) const { if( !isQt4Project() ) { - QString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); + TQString m_defaultQtDir = DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/root", ""); if( !m_defaultQtDir.isEmpty() ) - dirs << (m_defaultQtDir + QString( QChar( QDir::separator() ) ) + "bin" ); - dirs << ( ::getenv("QTDIR") + QString( QChar( QDir::separator() ) ) + "bin" ); + dirs << (m_defaultQtDir + TQString( TQChar( TQDir::separator() ) ) + "bin" ); + dirs << ( ::getenv("QTDIR") + TQString( TQChar( TQDir::separator() ) ) + "bin" ); } - QStringList paths = QStringList::split(":",::getenv("PATH")); + TQStringList paths = TQStringList::split(":",::getenv("PATH")); dirs += paths; - QString binpath = QDir::rootDirPath() + "bin"; + TQString binpath = TQDir::rootDirPath() + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; - binpath = QDir::rootDirPath() + "usr" + QString( QChar( QDir::separator() ) ) + "bin"; + binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; - binpath = QDir::rootDirPath() + "usr" + QString( QChar( QDir::separator() ) ) + "local" + QString( QChar( QDir::separator() ) ) + "bin"; + binpath = TQDir::rootDirPath() + "usr" + TQString( TQChar( TQDir::separator() ) ) + "local" + TQString( TQChar( TQDir::separator() ) ) + "bin"; if( dirs.findIndex( binpath ) != -1 ) dirs << binpath; } -QString TrollProjectPart::findExecutable( const QString& execname ) const +TQString TrollProjectPart::findExecutable( const TQString& execname ) const { - QStringList dirs; + TQStringList dirs; buildBinDirs( dirs ); - for( QStringList::Iterator it=dirs.begin(); it!=dirs.end(); ++it ) + for( TQStringList::Iterator it=dirs.begin(); it!=dirs.end(); ++it ) { - QString designer = *it + QString( QChar( QDir::separator() ) ) + execname; + TQString designer = *it + TQString( TQChar( TQDir::separator() ) ) + execname; if( !designer.isEmpty() && isExecutable( designer ) ) { return designer; @@ -841,26 +841,26 @@ QString TrollProjectPart::findExecutable( const QString& execname ) const return ""; } -bool TrollProjectPart::isExecutable( const QString& path ) const +bool TrollProjectPart::isExecutable( const TQString& path ) const { - QFileInfo fi(path); + TQFileInfo fi(path); return( fi.exists() && fi.isExecutable() ); } -QString TrollProjectPart::findQtDir() +TQString TrollProjectPart::findQtDir() { - QStringList qtdirs; + TQStringList qtdirs; if( !isQt4Project() ) qtdirs.push_back( ::getenv("QTDIR") ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt"+QString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt"+QString( QChar( QDir::separator() ) )+QString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"share"+QString( QChar( QDir::separator() ) )+"qt"+QString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); - qtdirs.push_back( QDir::rootDirPath()+"usr" ); - qtdirs.push_back( QDir::rootDirPath()+"usr"+QString( QChar( QDir::separator() ) )+"lib"+QString( QChar( QDir::separator() ) )+"qt" ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString( TQChar( TQDir::separator() ) )+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"share"+TQString( TQChar( TQDir::separator() ) )+"qt"+TQString("%1").arg( DomUtil::readEntry( *projectDom(), "/kdevcppsupport/qt/version", "3") ) ); + qtdirs.push_back( TQDir::rootDirPath()+"usr" ); + qtdirs.push_back( TQDir::rootDirPath()+"usr"+TQString( TQChar( TQDir::separator() ) )+"lib"+TQString( TQChar( TQDir::separator() ) )+"qt" ); - for( QStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it ) + for( TQStringList::Iterator it=qtdirs.begin(); it!=qtdirs.end(); ++it ) { - QString qtdir = *it; + TQString qtdir = *it; if( !qtdir.isEmpty() && isValidQtDir(qtdir) ) { return qtdir; @@ -870,25 +870,25 @@ QString TrollProjectPart::findQtDir() } -QStringList recursiveProFind( const QString &currDir, const QString &baseDir ) +TQStringList recursiveProFind( const TQString &currDir, const TQString &baseDir ) { - QStringList fileList; + TQStringList fileList; - if( !currDir.contains( QString( QChar ( QDir::separator() ) ) +".." ) - && !currDir.contains( QString( QChar( QDir::separator() ) )+".") ) + if( !currDir.contains( TQString( TQChar ( TQDir::separator() ) ) +".." ) + && !currDir.contains( TQString( TQChar( TQDir::separator() ) )+".") ) { - QDir dir(currDir); - QStringList dirList = dir.entryList(QDir::Dirs ); - QStringList::Iterator idx = dirList.begin(); + TQDir dir(currDir); + TQStringList dirList = dir.entryList(TQDir::Dirs ); + TQStringList::Iterator idx = dirList.begin(); for( ; idx != dirList.end(); ++idx ) { - fileList += recursiveProFind( currDir + QString( QChar( QDir::separator() ) ) + (*idx),baseDir ); + fileList += recursiveProFind( currDir + TQString( TQChar( TQDir::separator() ) ) + (*idx),baseDir ); } - QStringList newFiles = dir.entryList("*.pro *.PRO"); + TQStringList newFiles = dir.entryList("*.pro *.PRO"); idx = newFiles.begin(); for( ; idx != newFiles.end(); ++idx ) { - QString file = currDir + QString( QChar( QDir::separator() ) ) + (*idx); + TQString file = currDir + TQString( TQChar( TQDir::separator() ) ) + (*idx); fileList.append( file.remove( baseDir ) ); } } @@ -900,12 +900,12 @@ QStringList recursiveProFind( const QString &currDir, const QString &baseDir ) /*! \fn TrollProjectPart::distFiles() const */ -QStringList TrollProjectPart::distFiles() const +TQStringList TrollProjectPart::distFiles() const { - QStringList sourceList = allFiles(); + TQStringList sourceList = allFiles(); // Scan current source directory for any .pro files. - QString projectDir = projectDirectory(); - QStringList files = recursiveProFind( projectDir, projectDir + QString( QChar( QDir::separator() ) ) ); + TQString projectDir = projectDirectory(); + TQStringList files = recursiveProFind( projectDir, projectDir + TQString( TQChar( TQDir::separator() ) ) ); return sourceList + files; } diff --git a/buildtools/qmake/trollprojectpart.h b/buildtools/qmake/trollprojectpart.h index 3e571e85..945fb10a 100644 --- a/buildtools/qmake/trollprojectpart.h +++ b/buildtools/qmake/trollprojectpart.h @@ -16,10 +16,10 @@ #ifndef _TROLLPROJECTPART_H_ #define _TROLLPROJECTPART_H_ -#include <qdict.h> -#include <qguardedptr.h> -#include <qmap.h> -#include <qdatetime.h> +#include <tqdict.h> +#include <tqguardedptr.h> +#include <tqmap.h> +#include <tqdatetime.h> #include "kdevbuildtool.h" @@ -33,7 +33,7 @@ class TrollProjectPart : public KDevBuildTool Q_OBJECT public: - TrollProjectPart( QObject *parent, const char *name, const QStringList &args ); + TrollProjectPart( TQObject *parent, const char *name, const TQStringList &args ); ~TrollProjectPart(); bool isTMakeProject() const { return m_tmakeProject; } @@ -41,26 +41,26 @@ public: bool isDirty(); KDirWatch* dirWatch(); virtual Options options() const; - QStringList distFiles() const; - inline QString qmakePath() const { return DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "");; } + TQStringList distFiles() const; + inline TQString qmakePath() const { return DomUtil::readEntry(*projectDom(), "/kdevcppsupport/qt/qmake", "");; } protected: - virtual void openProject(const QString &dirName, const QString &projectName); + virtual void openProject(const TQString &dirName, const TQString &projectName); virtual void closeProject(); - virtual QString projectDirectory() const; - virtual QString projectName() const; - virtual QString mainProgram() const; - virtual QString activeDirectory() const; - virtual QStringList allFiles() const; - virtual void addFile(const QString &fileName); - virtual void addFiles ( const QStringList &fileList ); - virtual void removeFile(const QString &fileName); - virtual void removeFiles ( const QStringList &fileList ); - virtual QString buildDirectory() const; - virtual QString runDirectory() const; - virtual QString debugArguments() const; - virtual QString runArguments() const; + virtual TQString projectDirectory() const; + virtual TQString projectName() const; + virtual TQString mainProgram() const; + virtual TQString activeDirectory() const; + virtual TQStringList allFiles() const; + virtual void addFile(const TQString &fileName); + virtual void addFiles ( const TQStringList &fileList ); + virtual void removeFile(const TQString &fileName); + virtual void removeFiles ( const TQStringList &fileList ); + virtual TQString buildDirectory() const; + virtual TQString runDirectory() const; + virtual TQString debugArguments() const; + virtual TQString runArguments() const; virtual DomUtil::PairList runEnvironmentVars() const; private slots: @@ -68,31 +68,31 @@ private slots: void slotBuild(); // void slotClean(); // void slotExecute(); - void slotCommandFinished( const QString& command ); + void slotCommandFinished( const TQString& command ); void slotBuildAndExecuteProject(); void slotBuildAndExecuteTarget(); private: -// void startMakeCommand(const QString &dir, const QString &target); - void startQMakeCommand(const QString &dir, bool recursive = false ); -// void execute(const QString &directory, const QString &command); - void queueCmd(const QString &dir, const QString &cmd); - QString makeEnvironment(); - - QString findQtDir(); - QString findExecutable( const QString& path ) const; - void buildBinDirs( QStringList& ) const; - bool isValidQtDir( const QString& path ) const; - bool isExecutable( const QString& path ) const; - - QGuardedPtr<TrollProjectWidget> m_widget; - QString m_projectName; +// void startMakeCommand(const TQString &dir, const TQString &target); + void startQMakeCommand(const TQString &dir, bool recursive = false ); +// void execute(const TQString &directory, const TQString &command); + void queueCmd(const TQString &dir, const TQString &cmd); + TQString makeEnvironment(); + + TQString findQtDir(); + TQString findExecutable( const TQString& path ) const; + void buildBinDirs( TQStringList& ) const; + bool isValidQtDir( const TQString& path ) const; + bool isExecutable( const TQString& path ) const; + + TQGuardedPtr<TrollProjectWidget> m_widget; + TQString m_projectName; bool m_tmakeProject; - QMap<QString, QDateTime> m_timestamp; + TQMap<TQString, TQDateTime> m_timestamp; bool m_executeProjectAfterBuild; bool m_executeTargetAfterBuild; - QString m_buildCommand; + TQString m_buildCommand; KDirWatch* m_dirWatch; diff --git a/buildtools/qmake/trollprojectwidget.cpp b/buildtools/qmake/trollprojectwidget.cpp index 7668dbd7..087367bd 100644 --- a/buildtools/qmake/trollprojectwidget.cpp +++ b/buildtools/qmake/trollprojectwidget.cpp @@ -25,29 +25,29 @@ #include <config.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qheader.h> -#include <qsplitter.h> -#include <qptrstack.h> -#include <qtextstream.h> -#include <qcombobox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqheader.h> +#include <tqsplitter.h> +#include <tqptrstack.h> +#include <tqtextstream.h> +#include <tqcombobox.h> #include <kprocess.h> -#include <qtimer.h> -#include <qdir.h> -#include <qregexp.h> -#include <qinputdialog.h> -#include <qwhatsthis.h> -#include <qvaluestack.h> +#include <tqtimer.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqinputdialog.h> +#include <tqwhatsthis.h> +#include <tqvaluestack.h> #include <kfiledialog.h> -#include <qtooltip.h> +#include <tqtooltip.h> #include <kdebug.h> #include <klistview.h> #include <kmessagebox.h> #include <kpopupmenu.h> #include <kregexp.h> #include <kurl.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <iostream> #include <kparts/part.h> #include <kaction.h> @@ -80,105 +80,105 @@ #include <kapplication.h> TrollProjectWidget::TrollProjectWidget( TrollProjectPart *part ) - : QVBox( 0, "troll project widget" ), m_shownSubproject( 0 ), m_rootSubproject( 0 ), + : TQVBox( 0, "troll project widget" ), m_shownSubproject( 0 ), m_rootSubproject( 0 ), m_rootScope ( 0 ), m_part ( part ), m_configDlg( 0 ), m_filesCached(false) { - QSplitter * splitter = new QSplitter( Vertical, this ); + TQSplitter * splitter = new TQSplitter( Vertical, this ); ////////////////// // PROJECT VIEW // ////////////////// - overviewContainer = new QVBox( splitter, "Projects" ); + overviewContainer = new TQVBox( splitter, "Projects" ); overviewContainer->setMargin ( 2 ); overviewContainer->setSpacing ( 2 ); - // overviewContainer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); - // splitter->setResizeMode(overviewContainer, QSplitter::FollowSizeHint); + // overviewContainer->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); + // splitter->setResizeMode(overviewContainer, TQSplitter::FollowSizeHint); - projectTools = new QHBox( overviewContainer, "Project buttons" ); + projectTools = new TQHBox( overviewContainer, "Project buttons" ); projectTools->setMargin ( 2 ); projectTools->setSpacing ( 2 ); // Add subdir - addSubdirButton = new QToolButton ( projectTools, "Add subproject button" ); + addSubdirButton = new TQToolButton ( projectTools, "Add subproject button" ); addSubdirButton->setPixmap ( SmallIcon ( "folder_new" ) ); - addSubdirButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, addSubdirButton->sizePolicy().hasHeightForWidth() ) ); + addSubdirButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, addSubdirButton->sizePolicy().hasHeightForWidth() ) ); addSubdirButton->setEnabled ( true ); - QToolTip::add( addSubdirButton, i18n( "Add subproject" ) ); - QWhatsThis::add( addSubdirButton, i18n( "<b>Add subproject</b><p>Creates a <i>new</i> or adds an <i>existing</i> subproject to a currently selected subproject. " + TQToolTip::add( addSubdirButton, i18n( "Add subproject" ) ); + TQWhatsThis::add( addSubdirButton, i18n( "<b>Add subproject</b><p>Creates a <i>new</i> or adds an <i>existing</i> subproject to a currently selected subproject. " "This action is allowed only if a type of the subproject is 'subdirectories'. The type of the subproject can be " "defined in <b>Subproject Settings</b> dialog (open it from the subproject context menu)." ) ); // Create scope - createScopeButton = new QToolButton ( projectTools, "Create scope button" ); + createScopeButton = new TQToolButton ( projectTools, "Create scope button" ); createScopeButton->setPixmap ( SmallIcon ( "qmake_scopenew" ) ); - createScopeButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, createScopeButton->sizePolicy().hasHeightForWidth() ) ); + createScopeButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, createScopeButton->sizePolicy().hasHeightForWidth() ) ); createScopeButton->setEnabled ( true ); - QToolTip::add( createScopeButton, i18n( "Create scope" ) ); - QWhatsThis::add( createScopeButton, i18n( "<b>Create scope</b><p>Creates QMake scope in the project file in case the subproject is selected or creates nested scope in case the scope is selected." ) ); + TQToolTip::add( createScopeButton, i18n( "Create scope" ) ); + TQWhatsThis::add( createScopeButton, i18n( "<b>Create scope</b><p>Creates QMake scope in the project file in case the subproject is selected or creates nested scope in case the scope is selected." ) ); // build - buildProjectButton = new QToolButton ( projectTools, "Make button" ); + buildProjectButton = new TQToolButton ( projectTools, "Make button" ); buildProjectButton->setPixmap ( SmallIcon ( "make_kdevelop" ) ); - buildProjectButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, buildProjectButton->sizePolicy().hasHeightForWidth() ) ); + buildProjectButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, buildProjectButton->sizePolicy().hasHeightForWidth() ) ); buildProjectButton->setEnabled ( true ); - QToolTip::add( buildProjectButton, i18n( "Build project" ) ); - QWhatsThis::add( buildProjectButton, i18n( "<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>" + TQToolTip::add( buildProjectButton, i18n( "Build project" ) ); + TQWhatsThis::add( buildProjectButton, i18n( "<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>" "Environment variables and make arguments can be specified " "in the project settings dialog, <b>Make Options</b> tab." ) ); // rebuild - rebuildProjectButton = new QToolButton ( projectTools, "Rebuild button" ); + rebuildProjectButton = new TQToolButton ( projectTools, "Rebuild button" ); rebuildProjectButton->setPixmap ( SmallIcon ( "rebuild" ) ); - rebuildProjectButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, rebuildProjectButton->sizePolicy().hasHeightForWidth() ) ); + rebuildProjectButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, rebuildProjectButton->sizePolicy().hasHeightForWidth() ) ); rebuildProjectButton->setEnabled ( true ); - QToolTip::add( rebuildProjectButton, i18n( "Rebuild project" ) ); - QWhatsThis::add( rebuildProjectButton, i18n( "<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>" + TQToolTip::add( rebuildProjectButton, i18n( "Rebuild project" ) ); + TQWhatsThis::add( rebuildProjectButton, i18n( "<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>" "Environment variables and make arguments can be specified " "in the project settings dialog, <b>Make Options</b> tab." ) ); // run - executeProjectButton = new QToolButton ( projectTools, "Run button" ); + executeProjectButton = new TQToolButton ( projectTools, "Run button" ); executeProjectButton->setPixmap ( SmallIcon ( "exec" ) ); - executeProjectButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, executeProjectButton->sizePolicy().hasHeightForWidth() ) ); + executeProjectButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, executeProjectButton->sizePolicy().hasHeightForWidth() ) ); executeProjectButton->setEnabled ( true ); - QToolTip::add( executeProjectButton, i18n( "Execute main program" ) ); - QWhatsThis::add( executeProjectButton, i18n( "<b>Execute main program</b><p>Executes the main program specified in project settings, <b>Run Options</b> tab." ) ); + TQToolTip::add( executeProjectButton, i18n( "Execute main program" ) ); + TQWhatsThis::add( executeProjectButton, i18n( "<b>Execute main program</b><p>Executes the main program specified in project settings, <b>Run Options</b> tab." ) ); // spacer - QWidget *spacer = new QWidget( projectTools ); + TQWidget *spacer = new TQWidget( projectTools ); projectTools->setStretchFactor( spacer, 1 ); // Project configuration - projectconfButton = new QToolButton ( projectTools, "Project configuration button" ); + projectconfButton = new TQToolButton ( projectTools, "Project configuration button" ); projectconfButton->setPixmap ( SmallIcon ( "configure" ) ); - projectconfButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, projectconfButton->sizePolicy().hasHeightForWidth() ) ); + projectconfButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, projectconfButton->sizePolicy().hasHeightForWidth() ) ); projectconfButton->setEnabled ( true ); - QToolTip::add( projectconfButton, i18n( "Subproject settings" ) ); - QWhatsThis::add( projectconfButton, i18n( "<b>Subproject settings</b><p>Opens <b>QMake Subproject Configuration</b> dialog for the currently selected subproject. " + TQToolTip::add( projectconfButton, i18n( "Subproject settings" ) ); + TQWhatsThis::add( projectconfButton, i18n( "<b>Subproject settings</b><p>Opens <b>QMake Subproject Configuration</b> dialog for the currently selected subproject. " "It provides settings for:<br>subproject type and configuration,<br>include and library paths,<br>lists of dependencies and " "external libraries,<br>build order,<br>intermediate files locations,<br>compiler options." ) ); // Project button connections - connect ( addSubdirButton, SIGNAL ( clicked () ), this, SLOT ( slotAddSubproject () ) ); - connect ( createScopeButton, SIGNAL ( clicked () ), this, SLOT ( slotCreateScope () ) ); + connect ( addSubdirButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotAddSubproject () ) ); + connect ( createScopeButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotCreateScope () ) ); - connect ( buildProjectButton, SIGNAL ( clicked () ), this, SLOT ( slotBuildProject () ) ); - connect ( rebuildProjectButton, SIGNAL ( clicked () ), this, SLOT ( slotRebuildProject () ) ); - connect ( executeProjectButton, SIGNAL ( clicked () ), m_part, SLOT ( slotBuildAndExecuteProject () ) ); + connect ( buildProjectButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotBuildProject () ) ); + connect ( rebuildProjectButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotRebuildProject () ) ); + connect ( executeProjectButton, TQT_SIGNAL ( clicked () ), m_part, TQT_SLOT ( slotBuildAndExecuteProject () ) ); - connect ( projectconfButton, SIGNAL ( clicked () ), this, SLOT ( slotConfigureProject () ) ); + connect ( projectconfButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotConfigureProject () ) ); // Project tree overview = new TrollListView( this, overviewContainer, SubprojectView, "project overview widget" ); -// overview->setResizeMode( QListView::LastColumn ); +// overview->setResizeMode( TQListView::LastColumn ); overview->setSorting( -1 ); overview->header() ->hide(); - overview->addColumn( QString::null ); + overview->addColumn( TQString::null ); // Project tree connections - connect( overview, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotOverviewSelectionChanged( QListViewItem* ) ) ); - connect( overview, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ), - this, SLOT( slotOverviewContextMenu( KListView*, QListViewItem*, const QPoint& ) ) ); + connect( overview, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotOverviewSelectionChanged( TQListViewItem* ) ) ); + connect( overview, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ), + this, TQT_SLOT( slotOverviewContextMenu( KListView*, TQListViewItem*, const TQPoint& ) ) ); ///////////////// @@ -186,128 +186,128 @@ TrollProjectWidget::TrollProjectWidget( TrollProjectPart *part ) ///////////////// // Details tree - detailContainer = new QVBox( splitter, "Details" ); + detailContainer = new TQVBox( splitter, "Details" ); detailContainer->setMargin ( 2 ); detailContainer->setSpacing ( 2 ); - // detailContainer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); + // detailContainer->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); // Details Toolbar - fileTools = new QHBox( detailContainer, "Detail buttons" ); + fileTools = new TQHBox( detailContainer, "Detail buttons" ); fileTools->setMargin ( 2 ); fileTools->setSpacing ( 2 ); // Add new file button - newfileButton = new QToolButton ( fileTools, "Create new file" ); + newfileButton = new TQToolButton ( fileTools, "Create new file" ); newfileButton->setPixmap ( SmallIcon ( "filenew" ) ); - newfileButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, newfileButton->sizePolicy().hasHeightForWidth() ) ); + newfileButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, newfileButton->sizePolicy().hasHeightForWidth() ) ); newfileButton->setEnabled ( true ); - QToolTip::add( newfileButton, i18n( "Create new file" ) ); - QWhatsThis::add( newfileButton, i18n( "<b>Create new file</b><p>Creates a new file and adds it to a currently selected group." ) ); + TQToolTip::add( newfileButton, i18n( "Create new file" ) ); + TQWhatsThis::add( newfileButton, i18n( "<b>Create new file</b><p>Creates a new file and adds it to a currently selected group." ) ); // Add existing files button - addfilesButton = new QToolButton ( fileTools, "Add existing files" ); + addfilesButton = new TQToolButton ( fileTools, "Add existing files" ); addfilesButton->setPixmap ( SmallIcon ( "fileimport" ) ); - addfilesButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, addfilesButton->sizePolicy().hasHeightForWidth() ) ); + addfilesButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, addfilesButton->sizePolicy().hasHeightForWidth() ) ); addfilesButton->setEnabled ( true ); - QToolTip::add( addfilesButton, i18n( "Add existing files" ) ); - QWhatsThis::add( addfilesButton, i18n( "<b>Add existing files</b><p>Adds existing files to a currently selected group. It is " + TQToolTip::add( addfilesButton, i18n( "Add existing files" ) ); + TQWhatsThis::add( addfilesButton, i18n( "<b>Add existing files</b><p>Adds existing files to a currently selected group. It is " "possible to copy files to a current subproject directory, create symbolic links or " "add them with the relative path." ) ); // remove file button - removefileButton = new QToolButton ( fileTools, "Remove file" ); + removefileButton = new TQToolButton ( fileTools, "Remove file" ); removefileButton->setPixmap ( SmallIcon ( "button_cancel" ) ); - removefileButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, removefileButton->sizePolicy().hasHeightForWidth() ) ); + removefileButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, removefileButton->sizePolicy().hasHeightForWidth() ) ); removefileButton->setEnabled ( true ); - QToolTip::add( removefileButton, i18n( "Remove file" ) ); - QWhatsThis::add( removefileButton, i18n( "<b>Remove file</b><p>Removes file from a current group. Does not remove file from disk." ) ); + TQToolTip::add( removefileButton, i18n( "Remove file" ) ); + TQWhatsThis::add( removefileButton, i18n( "<b>Remove file</b><p>Removes file from a current group. Does not remove file from disk." ) ); // build selected file - buildFileButton = new QToolButton ( fileTools, "Make file button" ); + buildFileButton = new TQToolButton ( fileTools, "Make file button" ); buildFileButton->setPixmap ( SmallIcon ( "compfile" ) ); - buildFileButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, buildFileButton->sizePolicy().hasHeightForWidth() ) ); + buildFileButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, buildFileButton->sizePolicy().hasHeightForWidth() ) ); buildFileButton->setEnabled ( true ); - QToolTip::add( buildFileButton, i18n( "Compile file" ) ); - QWhatsThis::add( buildFileButton, i18n( "<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>" + TQToolTip::add( buildFileButton, i18n( "Compile file" ) ); + TQWhatsThis::add( buildFileButton, i18n( "<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>" "Environment variables and make arguments can be specified " "in the project settings dialog, <b>Make Options</b> tab." ) ); // build - buildTargetButton = new QToolButton ( fileTools, "Make sp button" ); + buildTargetButton = new TQToolButton ( fileTools, "Make sp button" ); buildTargetButton->setPixmap ( SmallIcon ( "make_kdevelop" ) ); - buildTargetButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, buildTargetButton->sizePolicy().hasHeightForWidth() ) ); + buildTargetButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, buildTargetButton->sizePolicy().hasHeightForWidth() ) ); buildTargetButton->setEnabled ( true ); - QToolTip::add( buildTargetButton, i18n( "Build subproject" ) ); - QWhatsThis::add( buildTargetButton, i18n( "<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. " + TQToolTip::add( buildTargetButton, i18n( "Build subproject" ) ); + TQWhatsThis::add( buildTargetButton, i18n( "<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. " "Current subproject is a subproject selected in <b>QMake manager</b> 'overview' window.<br>" "Environment variables and make arguments can be specified " "in the project settings dialog, <b>Make Options</b> tab." ) ); // rebuild - rebuildTargetButton = new QToolButton ( fileTools, "Rebuild sp button" ); + rebuildTargetButton = new TQToolButton ( fileTools, "Rebuild sp button" ); rebuildTargetButton->setPixmap ( SmallIcon ( "rebuild" ) ); - rebuildTargetButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, rebuildTargetButton->sizePolicy().hasHeightForWidth() ) ); + rebuildTargetButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, rebuildTargetButton->sizePolicy().hasHeightForWidth() ) ); rebuildTargetButton->setEnabled ( true ); - QToolTip::add( rebuildTargetButton, i18n( "Rebuild subproject" ) ); - QWhatsThis::add( rebuildTargetButton, i18n( "<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. " + TQToolTip::add( rebuildTargetButton, i18n( "Rebuild subproject" ) ); + TQWhatsThis::add( rebuildTargetButton, i18n( "<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. " "Current subproject is a subproject selected in <b>QMake manager</b> 'overview' window.<br>" "Environment variables and make arguments can be specified " "in the project settings dialog, <b>Make Options</b> tab." ) ); // run - executeTargetButton = new QToolButton ( fileTools, "Run sp button" ); + executeTargetButton = new TQToolButton ( fileTools, "Run sp button" ); executeTargetButton->setPixmap ( SmallIcon ( "exec" ) ); - executeTargetButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, executeTargetButton->sizePolicy().hasHeightForWidth() ) ); + executeTargetButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, executeTargetButton->sizePolicy().hasHeightForWidth() ) ); executeTargetButton->setEnabled ( true ); - QToolTip::add( executeTargetButton, i18n( "Execute subproject" ) ); - QWhatsThis::add( executeTargetButton, i18n( "<b>Execute subproject</b><p>Executes the target program for the currently selected subproject. " + TQToolTip::add( executeTargetButton, i18n( "Execute subproject" ) ); + TQWhatsThis::add( executeTargetButton, i18n( "<b>Execute subproject</b><p>Executes the target program for the currently selected subproject. " "This action is allowed only if a type of the subproject is 'application'. The type of the subproject can be " "defined in <b>Subproject Settings</b> dialog (open it from the subproject context menu)." ) ); // spacer - spacer = new QWidget( fileTools ); + spacer = new TQWidget( fileTools ); projectTools->setStretchFactor( spacer, 1 ); // Configure file button - excludeFileFromScopeButton = new QToolButton ( fileTools, "Exclude file" ); + excludeFileFromScopeButton = new TQToolButton ( fileTools, "Exclude file" ); excludeFileFromScopeButton->setPixmap ( SmallIcon ( "configure_file" ) ); - excludeFileFromScopeButton->setSizePolicy ( QSizePolicy ( ( QSizePolicy::SizeType ) 0, ( QSizePolicy::SizeType ) 0, 0, 0, excludeFileFromScopeButton->sizePolicy().hasHeightForWidth() ) ); + excludeFileFromScopeButton->setSizePolicy ( TQSizePolicy ( ( TQSizePolicy::SizeType ) 0, ( TQSizePolicy::SizeType ) 0, 0, 0, excludeFileFromScopeButton->sizePolicy().hasHeightForWidth() ) ); excludeFileFromScopeButton->setEnabled ( true ); - QToolTip::add( excludeFileFromScopeButton , i18n( "Exclude file" ) ); - QWhatsThis::add( excludeFileFromScopeButton , i18n( "<b>Exclude file</b><p>Exclude the selected file from this scope." ) ); + TQToolTip::add( excludeFileFromScopeButton , i18n( "Exclude file" ) ); + TQWhatsThis::add( excludeFileFromScopeButton , i18n( "<b>Exclude file</b><p>Exclude the selected file from this scope." ) ); // detail tree details = new TrollListView( this, detailContainer, DetailsView, "details widget" ); details->setRootIsDecorated( true ); - details->setResizeMode( QListView::LastColumn ); + details->setResizeMode( TQListView::LastColumn ); details->setSorting( -1 ); details->header() ->hide(); - details->addColumn( QString::null ); + details->addColumn( TQString::null ); // Detail button connections - connect ( addfilesButton, SIGNAL ( clicked () ), this, SLOT ( slotAddFiles () ) ); - connect ( newfileButton, SIGNAL ( clicked () ), this, SLOT ( slotNewFile () ) ); - connect ( removefileButton, SIGNAL ( clicked () ), this, SLOT ( slotRemoveFile () ) ); - connect ( buildFileButton, SIGNAL ( clicked () ), this, SLOT ( slotBuildSelectedFile () ) ); - connect ( excludeFileFromScopeButton, SIGNAL ( clicked () ), this, SLOT ( slotExcludeFileFromScopeButton() ) ); + connect ( addfilesButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotAddFiles () ) ); + connect ( newfileButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotNewFile () ) ); + connect ( removefileButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotRemoveFile () ) ); + connect ( buildFileButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotBuildSelectedFile () ) ); + connect ( excludeFileFromScopeButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotExcludeFileFromScopeButton() ) ); // Detail tree connections - connect( details, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotDetailsSelectionChanged( QListViewItem* ) ) ); - connect( details, SIGNAL( executed( QListViewItem* ) ), - this, SLOT( slotDetailsExecuted( QListViewItem* ) ) ); - connect( details, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ), - this, SLOT( slotDetailsContextMenu( KListView*, QListViewItem*, const QPoint& ) ) ); - - connect ( buildTargetButton, SIGNAL ( clicked () ), this, SLOT ( slotBuildTarget () ) ); - connect ( rebuildTargetButton, SIGNAL ( clicked () ), this, SLOT ( slotRebuildTarget () ) ); - connect ( executeTargetButton, SIGNAL ( clicked () ), m_part, SLOT ( slotBuildAndExecuteTarget () ) ); + connect( details, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotDetailsSelectionChanged( TQListViewItem* ) ) ); + connect( details, TQT_SIGNAL( executed( TQListViewItem* ) ), + this, TQT_SLOT( slotDetailsExecuted( TQListViewItem* ) ) ); + connect( details, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ), + this, TQT_SLOT( slotDetailsContextMenu( KListView*, TQListViewItem*, const TQPoint& ) ) ); + + connect ( buildTargetButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotBuildTarget () ) ); + connect ( rebuildTargetButton, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotRebuildTarget () ) ); + connect ( executeTargetButton, TQT_SIGNAL ( clicked () ), m_part, TQT_SLOT ( slotBuildAndExecuteTarget () ) ); buildTargetButton->setEnabled( false ); rebuildTargetButton->setEnabled( false ); executeTargetButton->setEnabled( false ); m_configDlg = new ProjectConfigurationDlg( overview, this, this ); - connect( m_part->dirWatch(), SIGNAL( dirty(const QString&) ), this, SLOT( slotProjectDirty(const QString&) ) ); + connect( m_part->dirWatch(), TQT_SIGNAL( dirty(const TQString&) ), this, TQT_SLOT( slotProjectDirty(const TQString&) ) ); } @@ -317,28 +317,28 @@ TrollProjectWidget::~TrollProjectWidget() } -void TrollProjectWidget::openProject( const QString &dirName ) +void TrollProjectWidget::openProject( const TQString &dirName ) { - QDomDocument & dom = *( m_part->projectDom() ); + TQDomDocument & dom = *( m_part->projectDom() ); m_subclasslist = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , "subclass", "sourcefile", "uifile" ); - QString projectfile = DomUtil::readEntry( dom, "/kdevtrollproject/qmake/projectfile", "" ); + TQString projectfile = DomUtil::readEntry( dom, "/kdevtrollproject/qmake/projectfile", "" ); m_showFilenamesOnly = DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/enableFilenamesOnly", false ); m_showVariablesInTree = DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/showVariablesInTree", true ); - QString proname; + TQString proname; if( projectfile.isEmpty() ) { - QFileInfo fi( dirName ); - QDir dir( dirName ); - // QString proname = item->path + "/" + fi.baseName() + ".pro"; + TQFileInfo fi( dirName ); + TQDir dir( dirName ); + // TQString proname = item->path + "/" + fi.baseName() + ".pro"; - QStringList l = dir.entryList( "*.pro" ); + TQStringList l = dir.entryList( "*.pro" ); - QString profile; + TQString profile; if( l.count() && l.findIndex( m_part->projectName() + ".pro") != -1 ) profile = m_part->projectName()+".pro"; else if( l.isEmpty() || ( l.count() && l.findIndex( fi.baseName() + ".pro") != -1 ) ) @@ -346,7 +346,7 @@ void TrollProjectWidget::openProject( const QString &dirName ) else profile = l[0]; - proname = dirName + QString( QChar( QDir::separator() ) ) + profile; + proname = dirName + TQString( TQChar( TQDir::separator() ) ) + profile; } else { proname = projectfile; @@ -393,10 +393,10 @@ void TrollProjectWidget::closeProject() delete m_rootScope; } -QStringList TrollProjectWidget::allFiles() +TQStringList TrollProjectWidget::allFiles() { if( !m_rootScope ) - return QStringList(); + return TQStringList(); if( m_filesCached ) return m_allFilesCache; m_allFilesCache = m_rootScope->allFiles( m_rootScope->projectDir() ); @@ -404,19 +404,19 @@ QStringList TrollProjectWidget::allFiles() return m_allFilesCache; } -QString TrollProjectWidget::projectDirectory() +TQString TrollProjectWidget::projectDirectory() { if ( !m_rootScope ) - return QString::null; //confused + return TQString::null; //confused return m_rootScope->projectDir(); } -QString TrollProjectWidget::subprojectDirectory() +TQString TrollProjectWidget::subprojectDirectory() { if ( !m_shownSubproject ) - return QString::null; + return TQString::null; return m_shownSubproject->scope->projectDir(); } @@ -431,7 +431,7 @@ void TrollProjectWidget::setupContext() bool hasSourceFiles = true; bool hasSubdirs = false; - QStringList tmpl = m_shownSubproject->scope->variableValues( "TEMPLATE" ); + TQStringList tmpl = m_shownSubproject->scope->variableValues( "TEMPLATE" ); if ( tmpl.findIndex( "lib" ) != -1 ) { @@ -471,9 +471,9 @@ void TrollProjectWidget::setupContext() details->setEnabled( hasSourceFiles ); } -void TrollProjectWidget::slotOverviewSelectionChanged( QListViewItem *item ) +void TrollProjectWidget::slotOverviewSelectionChanged( TQListViewItem *item ) { - QString olddir = m_part->activeDirectory(); + TQString olddir = m_part->activeDirectory(); if ( !item ) { kdDebug(9024) << "Trying to select a non-existing item" << endl; @@ -484,7 +484,7 @@ void TrollProjectWidget::slotOverviewSelectionChanged( QListViewItem *item ) setupContext(); buildProjectDetailTree( m_shownSubproject, details ); - QDomDocument &dom = *( m_part->projectDom() ); + TQDomDocument &dom = *( m_part->projectDom() ); DomUtil::writeEntry( dom, "/kdevtrollproject/general/activedir", m_shownSubproject->relativePath() ); if ( m_configDlg && m_configDlg->isShown() ) { @@ -493,33 +493,33 @@ void TrollProjectWidget::slotOverviewSelectionChanged( QListViewItem *item ) emit m_part->activeDirectoryChanged( olddir, m_part->activeDirectory() ); } -QString TrollProjectWidget::getCurrentTarget() +TQString TrollProjectWidget::getCurrentTarget() { if ( !m_shownSubproject ) return ""; - QString destdir = getCurrentDestDir(); + TQString destdir = getCurrentDestDir(); if ( destdir.isEmpty() ) return getCurrentOutputFilename(); else - return destdir + QString( QChar( QDir::separator() ) ) + getCurrentOutputFilename(); + return destdir + TQString( TQChar( TQDir::separator() ) ) + getCurrentOutputFilename(); } -QString TrollProjectWidget::getCurrentDestDir() +TQString TrollProjectWidget::getCurrentDestDir() { if ( !m_shownSubproject ) return ""; - QStringList destdir = m_shownSubproject->scope->variableValues( "DESTDIR", true, true, true ); + TQStringList destdir = m_shownSubproject->scope->variableValues( "DESTDIR", true, true, true ); return m_shownSubproject->scope->resolveVariables(m_shownSubproject->scope->variableValues( "DESTDIR", true, true, true ).front()); } -QString TrollProjectWidget::getCurrentOutputFilename() +TQString TrollProjectWidget::getCurrentOutputFilename() { if ( !m_shownSubproject ) return ""; if ( m_shownSubproject->scope->variableValues( "TARGET", true, true, true ).isEmpty() ) { - QString exe = m_shownSubproject->scope->resolveVariables(m_shownSubproject->scope->fileName()); - return exe.replace( QRegExp( "\\.pro$" ), "" ); + TQString exe = m_shownSubproject->scope->resolveVariables(m_shownSubproject->scope->fileName()); + return exe.replace( TQRegExp( "\\.pro$" ), "" ); } else { @@ -533,14 +533,14 @@ void TrollProjectWidget::cleanDetailView( QMakeScopeItem *item ) // it is a subdir template if ( item && details->childCount() ) { - QListViewItem* i = details->firstChild(); + TQListViewItem* i = details->firstChild(); while( i ) { - QListViewItem* old = i; + TQListViewItem* old = i; i = i->nextSibling(); details->takeItem(old); } -// QMapIterator<GroupItem::GroupType, GroupItem*> it1 = item->groups.begin() ; +// TQMapIterator<GroupItem::GroupType, GroupItem*> it1 = item->groups.begin() ; // for ( ; it1 != item->groups.end(); ++it1 ) // { // // After AddTargetDialog, it can happen that an @@ -560,8 +560,8 @@ void TrollProjectWidget::buildProjectDetailTree( QMakeScopeItem *item, KListView if ( !listviewControl || item->scope->variableValues( "TEMPLATE" ).findIndex("subdirs") != -1 ) return ; - QMapIterator<GroupItem::GroupType, GroupItem*> it2 = item->groups.begin(); - QListViewItem* lastItem = 0; + TQMapIterator<GroupItem::GroupType, GroupItem*> it2 = item->groups.begin(); + TQListViewItem* lastItem = 0; for ( ; it2 != item->groups.end(); ++it2 ) { listviewControl->insertItem( it2.data() ); @@ -570,16 +570,16 @@ void TrollProjectWidget::buildProjectDetailTree( QMakeScopeItem *item, KListView lastItem = it2.data(); if ( it2.key() == GroupItem::InstallRoot ) { - QListViewItem* lastinstallitem = 0; - QPtrListIterator<GroupItem> it3( it2.data() ->installs ); + TQListViewItem* lastinstallitem = 0; + TQPtrListIterator<GroupItem> it3( it2.data() ->installs ); for ( ; it3.current(); ++it3 ) { it2.data() ->insertItem( *it3 ); if ( lastinstallitem ) it3.current()->moveItem(lastinstallitem); lastinstallitem = it3.current(); - QPtrListIterator<FileItem> it4( ( *it3 ) ->files ); - QListViewItem* lastfileitem = 0; + TQPtrListIterator<FileItem> it4( ( *it3 ) ->files ); + TQListViewItem* lastfileitem = 0; for ( ; it4.current(); ++it4 ) { ( *it3 ) ->insertItem( *it4 ); @@ -595,8 +595,8 @@ void TrollProjectWidget::buildProjectDetailTree( QMakeScopeItem *item, KListView } else { - QPtrListIterator<FileItem> it3( it2.data() ->files ); - QListViewItem* lastfileitem = 0; + TQPtrListIterator<FileItem> it3( it2.data() ->files ); + TQListViewItem* lastfileitem = 0; for ( ; it3.current(); ++it3 ) { it2.data() ->insertItem( *it3 ); @@ -612,7 +612,7 @@ void TrollProjectWidget::buildProjectDetailTree( QMakeScopeItem *item, KListView listviewControl->setCurrentItem( 0 ); } -void TrollProjectWidget::slotDetailsExecuted( QListViewItem *item ) +void TrollProjectWidget::slotDetailsExecuted( TQListViewItem *item ) { if ( !item ) return ; @@ -625,7 +625,7 @@ void TrollProjectWidget::slotDetailsExecuted( QListViewItem *item ) FileItem *fitem = static_cast<FileItem*>( pvitem ); - QString filePath; + TQString filePath; if( m_shownSubproject->scope->scopeType() == Scope::IncludeScope ) { filePath = m_shownSubproject->scope->parent()->projectDir(); @@ -633,9 +633,9 @@ void TrollProjectWidget::slotDetailsExecuted( QListViewItem *item ) { filePath = m_shownSubproject->scope->projectDir(); } - filePath += QChar( QDir::separator() ) + m_shownSubproject->scope->resolveVariables( fitem->localFilePath ); + filePath += TQChar( TQDir::separator() ) + m_shownSubproject->scope->resolveVariables( fitem->localFilePath ); - bool isUiFile = QFileInfo( fitem->text( 0 ) ).extension() == "ui"; + bool isUiFile = TQFileInfo( fitem->text( 0 ) ).extension() == "ui"; kdDebug(9024) << "Opening file: " << filePath << endl; if ( isTMakeProject() && isUiFile ) { @@ -686,10 +686,10 @@ void TrollProjectWidget::slotExecuteTarget() } - QString program = KProcess::quote( "." + QString( QChar( QDir::separator() ) ) + getCurrentOutputFilename() ); + TQString program = KProcess::quote( "." + TQString( TQChar( TQDir::separator() ) ) + getCurrentOutputFilename() ); // Build environment variables to prepend to the executable path - QString runEnvVars = QString::null; + TQString runEnvVars = TQString::null; DomUtil::PairList list = DomUtil::readPairListEntry( *( m_part->projectDom() ), "/kdevtrollproject/run/envvars", "envvar", "name", "value" ); @@ -709,7 +709,7 @@ void TrollProjectWidget::slotExecuteTarget() bool inTerminal = DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/run/terminal" ); - m_part->appFrontend() ->startAppCommand( subprojectDirectory() + QString( QChar( QDir::separator() ) ) + getCurrentDestDir(), program, inTerminal ); + m_part->appFrontend() ->startAppCommand( subprojectDirectory() + TQString( TQChar( TQDir::separator() ) ) + getCurrentDestDir(), program, inTerminal ); } @@ -718,7 +718,7 @@ void TrollProjectWidget::slotBuildProject() if ( m_part->partController() ->saveAllFiles() == false ) return ; //user cancelled - QString dir = projectDirectory(); + TQString dir = projectDirectory(); if ( !m_rootSubproject ) return ; @@ -726,8 +726,8 @@ void TrollProjectWidget::slotBuildProject() createMakefileIfMissing( dir, m_rootSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString buildcmd = constructMakeCommandLine( m_rootSubproject->scope ); + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString buildcmd = constructMakeCommandLine( m_rootSubproject->scope ); m_part->queueCmd( dir, dircmd + buildcmd ); } @@ -736,7 +736,7 @@ void TrollProjectWidget::slotInstallProject() if ( m_part->partController() ->saveAllFiles() == false ) return ; //user cancelled - QString dir = projectDirectory(); + TQString dir = projectDirectory(); if ( !m_rootSubproject ) return ; @@ -744,8 +744,8 @@ void TrollProjectWidget::slotInstallProject() createMakefileIfMissing( dir, m_rootSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString buildcmd = constructMakeCommandLine( m_rootSubproject->scope ) + " install"; + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString buildcmd = constructMakeCommandLine( m_rootSubproject->scope ) + " install"; m_part->queueCmd( dir, dircmd + buildcmd ); } @@ -758,12 +758,12 @@ void TrollProjectWidget::slotBuildTarget() // can't build from scope if ( m_shownSubproject->scope->scopeType() != Scope::ProjectScope ) return ; - QString dir = subprojectDirectory(); + TQString dir = subprojectDirectory(); createMakefileIfMissing( dir, m_shownSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString buildcmd = constructMakeCommandLine( m_shownSubproject->scope ); + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString buildcmd = constructMakeCommandLine( m_shownSubproject->scope ); m_part->queueCmd( dir, dircmd + buildcmd ); } @@ -776,19 +776,19 @@ void TrollProjectWidget::slotInstallTarget() // can't build from scope if ( m_shownSubproject->scope->scopeType() != Scope::ProjectScope ) return ; - QString dir = subprojectDirectory(); + TQString dir = subprojectDirectory(); createMakefileIfMissing( dir, m_shownSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString buildcmd = constructMakeCommandLine( m_shownSubproject->scope ) + " install"; + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString buildcmd = constructMakeCommandLine( m_shownSubproject->scope ) + " install"; m_part->queueCmd( dir, dircmd + buildcmd ); } void TrollProjectWidget::slotRebuildProject() { m_part->partController() ->saveAllFiles(); - QString dir = this-> projectDirectory(); + TQString dir = this-> projectDirectory(); if ( !m_rootSubproject ) return ; @@ -796,8 +796,8 @@ void TrollProjectWidget::slotRebuildProject() createMakefileIfMissing( dir, m_rootSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString rebuildcmd = constructMakeCommandLine( m_rootSubproject->scope ) + " clean && " + constructMakeCommandLine( m_rootSubproject->scope ); + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString rebuildcmd = constructMakeCommandLine( m_rootSubproject->scope ) + " clean && " + constructMakeCommandLine( m_rootSubproject->scope ); m_part->queueCmd( dir, dircmd + rebuildcmd ); } @@ -811,12 +811,12 @@ void TrollProjectWidget::slotRebuildTarget() if ( m_shownSubproject->scope->scopeType() != Scope::ProjectScope ) return ; - QString dir = subprojectDirectory(); + TQString dir = subprojectDirectory(); createMakefileIfMissing( dir, m_shownSubproject ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString rebuildcmd = constructMakeCommandLine( m_shownSubproject->scope ) + " clean && " + constructMakeCommandLine( m_shownSubproject->scope ); + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString rebuildcmd = constructMakeCommandLine( m_shownSubproject->scope ) + " clean && " + constructMakeCommandLine( m_shownSubproject->scope ); m_part->queueCmd( dir, dircmd + rebuildcmd ); } @@ -827,7 +827,7 @@ void TrollProjectWidget::slotCreateScope( QMakeScopeItem *spitem ) else spitem = m_shownSubproject; CreateScopeDlg dlg( spitem, this ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { spitem->scope->saveToFile( ); spitem->sortChildItems( 0, true ); @@ -845,31 +845,31 @@ void TrollProjectWidget::slotAddSubproject( QMakeScopeItem *spitem ) m_filesCached = false; m_allFilesCache.clear(); - QString projectdir = spitem->scope->projectDir(); + TQString projectdir = spitem->scope->projectDir(); KURLRequesterDlg dialog( i18n( "Add Subproject" ), i18n( "Please enter a name for the subproject: " ), this, 0 ); KURLRequester* req = dialog.urlRequester(); req->setMode( KFile::Directory | KFile::File | KFile::LocalOnly ); req->setFilter( "*.pro|QMake Project Files (*.pro)" ); - req->setURL( QString() ); + req->setURL( TQString() ); req->fileDialog()->setURL( KURL::fromPathOrURL( projectdir ) ); req->completionObject() ->setDir( projectdir ); - if ( dialog.exec() == QDialog::Accepted && !dialog.urlRequester() ->url().isEmpty() ) + if ( dialog.exec() == TQDialog::Accepted && !dialog.urlRequester() ->url().isEmpty() ) { - QString subdirname; - if ( !QDir::isRelativePath( dialog.urlRequester() ->url() ) ) + TQString subdirname; + if ( !TQDir::isRelativePath( dialog.urlRequester() ->url() ) ) subdirname = URLUtil::getRelativePath( projectdir, dialog.urlRequester()->url() ); else subdirname = dialog.urlRequester()->url(); - while( subdirname.endsWith( QString(QChar(QDir::separator())) ) ) + while( subdirname.endsWith( TQString(TQChar(TQDir::separator())) ) ) subdirname = subdirname.left(subdirname.length()-1); if( !subdirname.endsWith(".pro") ) { kdDebug(9024) << "Cleaned subdirname: " << subdirname << endl; - QDir dir( projectdir ); - QString realdir = spitem->scope->resolveVariables( subdirname ); + TQDir dir( projectdir ); + TQString realdir = spitem->scope->resolveVariables( subdirname ); if ( !dir.exists( realdir ) ) { if ( !dir.mkdir( realdir ) ) @@ -880,15 +880,15 @@ void TrollProjectWidget::slotAddSubproject( QMakeScopeItem *spitem ) return ; }else { - QFile f( dir.absPath()+"/"+realdir+"/"+realdir+".pro" ); + TQFile f( dir.absPath()+"/"+realdir+"/"+realdir+".pro" ); f.open( IO_WriteOnly ); f.close(); } } }else { - QString realdir = spitem->scope->resolveVariables( subdirname ); - QFile f( projectdir+"/"+realdir ); + TQString realdir = spitem->scope->resolveVariables( subdirname ); + TQFile f( projectdir+"/"+realdir ); f.open( IO_WriteOnly ); f.close(); } @@ -898,9 +898,9 @@ void TrollProjectWidget::slotAddSubproject( QMakeScopeItem *spitem ) } } -void TrollProjectWidget::addSubprojectToItem( QMakeScopeItem* spitem, const QString& subdirname ) +void TrollProjectWidget::addSubprojectToItem( QMakeScopeItem* spitem, const TQString& subdirname ) { - QListViewItem* item = spitem->firstChild(); + TQListViewItem* item = spitem->firstChild(); while( item ) { QMakeScopeItem* sitem = static_cast<QMakeScopeItem*>(item); @@ -924,7 +924,7 @@ void TrollProjectWidget::addSubprojectToItem( QMakeScopeItem* spitem, const QStr if( subproject ) { new QMakeScopeItem( spitem, subproject->scopeName(), subproject ); -// QListViewItem* lastitem = spitem->firstChild(); +// TQListViewItem* lastitem = spitem->firstChild(); // while( lastitem->nextSibling() != 0 ) // lastitem = lastitem->nextSibling(); // newitem->moveItem( lastitem ); @@ -966,7 +966,7 @@ void TrollProjectWidget::slotRemoveSubproject( QMakeScopeItem *spitem ) } } -void TrollProjectWidget::slotOverviewContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +void TrollProjectWidget::slotOverviewContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ) { if ( !item ) return ; @@ -1066,7 +1066,7 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, QListViewItem *it int r = popup.exec( p ); - QString relpath = spitem->relativePath(); + TQString relpath = spitem->relativePath(); if ( r == idAddSubproject ) { slotAddSubproject( spitem ); @@ -1090,12 +1090,12 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, QListViewItem *it else if ( r == idBuild ) { slotBuildTarget(); - // m_part->startMakeCommand(projectDirectory() + relpath, QString::fromLatin1("")); + // m_part->startMakeCommand(projectDirectory() + relpath, TQString::fromLatin1("")); } else if ( r == idInstall ) { slotInstallTarget(); - // m_part->startMakeCommand(projectDirectory() + relpath, QString::fromLatin1("")); + // m_part->startMakeCommand(projectDirectory() + relpath, TQString::fromLatin1("")); } else if ( r == idRebuild ) { @@ -1112,7 +1112,7 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, QListViewItem *it else if ( r == idQmake ) { - m_part->startQMakeCommand( projectDirectory() + QString(QChar(QDir::separator())) + relpath ); + m_part->startQMakeCommand( projectDirectory() + TQString(TQChar(TQDir::separator())) + relpath ); } else if ( r == idQmakeRecursive ) { @@ -1126,7 +1126,7 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, QListViewItem *it } } -void TrollProjectWidget::addFileToCurrentSubProject( GroupItem *titem, const QString &filename ) +void TrollProjectWidget::addFileToCurrentSubProject( GroupItem *titem, const TQString &filename ) { m_filesCached = false; @@ -1134,7 +1134,7 @@ void TrollProjectWidget::addFileToCurrentSubProject( GroupItem *titem, const QSt titem->addFileToScope( filename ); } -void TrollProjectWidget::addFileToCurrentSubProject( GroupItem::GroupType gtype, const QString &filename ) +void TrollProjectWidget::addFileToCurrentSubProject( GroupItem::GroupType gtype, const TQString &filename ) { if ( !m_shownSubproject ) return ; @@ -1157,7 +1157,7 @@ void TrollProjectWidget::addFileToCurrentSubProject( GroupItem::GroupType gtype, * Method adds a file to the current project by grouped * by file extension */ -void TrollProjectWidget::addFiles( QStringList &files, bool relativeToProjectRoot ) +void TrollProjectWidget::addFiles( TQStringList &files, bool relativeToProjectRoot ) { if ( !m_shownSubproject ) return ; @@ -1165,22 +1165,22 @@ void TrollProjectWidget::addFiles( QStringList &files, bool relativeToProjectRoo m_filesCached = false; m_allFilesCache.clear(); - for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { - QString fileName = *it; + TQString fileName = *it; kdDebug(9024) << "Adding file:" << fileName << " " << relativeToProjectRoot << endl; if ( m_shownSubproject->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) != -1 && !fileName.endsWith(".pro") ) { ChooseSubprojectDlg dlg( this, false ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { if ( dlg.selectedSubproject() && dlg.selectedSubproject()->scope->variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { fileName = URLUtil::getRelativePath( dlg.selectedSubproject()->scope->projectDir() , - QDir::cleanDirPath( + TQDir::cleanDirPath( m_shownSubproject->scope->projectDir()+ - QString(QChar(QDir::separator()))+ + TQString(TQChar(TQDir::separator()))+ fileName ) ); overview->setCurrentItem( dlg.selectedSubproject() ); @@ -1192,21 +1192,21 @@ void TrollProjectWidget::addFiles( QStringList &files, bool relativeToProjectRoo } } - QFileInfo info( fileName ); - QString ext = info.extension( false ).simplifyWhiteSpace(); + TQFileInfo info( fileName ); + TQString ext = info.extension( false ).simplifyWhiteSpace(); - QString noPathFileName; + TQString noPathFileName; if( relativeToProjectRoot ) - noPathFileName = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), QDir::cleanDirPath(projectDirectory()+QString(QChar(QDir::separator()))+fileName ) ); + noPathFileName = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), TQDir::cleanDirPath(projectDirectory()+TQString(TQChar(TQDir::separator()))+fileName ) ); else - noPathFileName = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), QDir::cleanDirPath(m_shownSubproject->scope->projectDir()+QString(QChar(QDir::separator()))+fileName ) ); + noPathFileName = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), TQDir::cleanDirPath(m_shownSubproject->scope->projectDir()+TQString(TQChar(TQDir::separator()))+fileName ) ); if( DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/replacePaths", false ) ) { - QString var = m_shownSubproject->scope->findCustomVarForPath( QFileInfo( noPathFileName ).dirPath() ); + TQString var = m_shownSubproject->scope->findCustomVarForPath( TQFileInfo( noPathFileName ).dirPath() ); if( !var.isEmpty() ) { - noPathFileName = "$${"+var+"}"+QString( QChar( QDir::separator() ) )+QFileInfo( noPathFileName ).fileName(); + noPathFileName = "$${"+var+"}"+TQString( TQChar( TQDir::separator() ) )+TQFileInfo( noPathFileName ).fileName(); } } @@ -1219,16 +1219,16 @@ void TrollProjectWidget::addFiles( QStringList &files, bool relativeToProjectRoo if( ext == "pro" ) { - addSubprojectToItem( findSubprojectForPath( QFileInfo( fileName ).dirPath() ), QFileInfo( fileName ).fileName() ); + addSubprojectToItem( findSubprojectForPath( TQFileInfo( fileName ).dirPath() ), TQFileInfo( fileName ).fileName() ); }else { addFileToCurrentSubProject( GroupItem::groupTypeForExtension( ext ), noPathFileName ); slotOverviewSelectionChanged( m_shownSubproject ); kdDebug(9024) << "emitting" << relativeToProjectRoot << " " << fileName << endl; if( relativeToProjectRoot ) - emitAddedFile ( projectDirectory()+QString( QChar( QDir::separator() ) ) + fileName ); + emitAddedFile ( projectDirectory()+TQString( TQChar( TQDir::separator() ) ) + fileName ); else - emitAddedFile ( m_shownSubproject->scope->projectDir()+QString( QChar( QDir::separator() ) ) + fileName ); + emitAddedFile ( m_shownSubproject->scope->projectDir()+TQString( TQChar( TQDir::separator() ) ) + fileName ); } } @@ -1238,9 +1238,9 @@ void TrollProjectWidget::addFiles( QStringList &files, bool relativeToProjectRoo void TrollProjectWidget::slotAddFiles() { static KURL lastVisited; - QString cleanSubprojectDir = QDir::cleanDirPath( m_shownSubproject->scope->projectDir() ); - QString title, filter; - QString otherTitle, otherFilter; + TQString cleanSubprojectDir = TQDir::cleanDirPath( m_shownSubproject->scope->projectDir() ); + TQString title, filter; + TQString otherTitle, otherFilter; GroupItem* item = dynamic_cast<GroupItem*>( details->selectedItem() ); GroupItem::GroupType type = item ? item->groupType : GroupItem::NoType; @@ -1265,7 +1265,7 @@ void TrollProjectWidget::slotAddFiles() filter, this, "Insert existing files", - true, new QComboBox( false ) ); + true, new TQComboBox( false ) ); dialog->setMode( KFile::Files | KFile::ExistingOnly | KFile::LocalOnly ); @@ -1275,7 +1275,7 @@ void TrollProjectWidget::slotAddFiles() } dialog->exec(); - QStringList files = dialog->selectedFiles(); + TQStringList files = dialog->selectedFiles(); lastVisited = dialog->baseURL(); for ( unsigned int i = 0; i < files.count(); i++ ) @@ -1286,13 +1286,13 @@ void TrollProjectWidget::slotAddFiles() { // Copy selected files to current subproject folder // and add them to the filelist - QString filename = KURL( files[ i ] ).fileName(); - KIO::NetAccess::file_copy( files[ i ], cleanSubprojectDir + QString( QChar( QDir::separator() ) ) + filename, -1, false, false, this ); - QFile testExist( cleanSubprojectDir + QString( QChar( QDir::separator() ) ) + filename ); + TQString filename = KURL( files[ i ] ).fileName(); + KIO::NetAccess::file_copy( files[ i ], cleanSubprojectDir + TQString( TQChar( TQDir::separator() ) ) + filename, -1, false, false, this ); + TQFile testExist( cleanSubprojectDir + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) { - QStringList files( filename ); + TQStringList files( filename ); addFiles( files, false ); } } @@ -1307,12 +1307,12 @@ void TrollProjectWidget::slotAddFiles() *proc << files[ i ]; *proc << cleanSubprojectDir; proc->start(KProcess::Block); - QString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); + TQString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); // and add them to the filelist - QFile testExist( cleanSubprojectDir + QString( QChar( QDir::separator() ) ) + filename ); + TQFile testExist( cleanSubprojectDir + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) { - QStringList files( filename ); + TQStringList files( filename ); addFiles( files, false ); } } @@ -1321,8 +1321,8 @@ void TrollProjectWidget::slotAddFiles() case AddFilesDialog::Relative: { // Form relative path to current subproject folder - QString theFile = files[ i ]; - QStringList files( URLUtil::relativePathToFile( cleanSubprojectDir , theFile ) + TQString theFile = files[ i ]; + TQStringList files( URLUtil::relativePathToFile( cleanSubprojectDir , theFile ) ); addFiles( files, false ); } @@ -1338,12 +1338,12 @@ GroupItem* TrollProjectWidget::getInstallRoot( QMakeScopeItem* item ) return 0; } -GroupItem* TrollProjectWidget::getInstallObject( QMakeScopeItem* item, const QString& objectname ) +GroupItem* TrollProjectWidget::getInstallObject( QMakeScopeItem* item, const TQString& objectname ) { GroupItem * instroot = getInstallRoot( item ); if ( !instroot ) return 0; - QPtrListIterator<GroupItem> it( instroot->installs ); + TQPtrListIterator<GroupItem> it( instroot->installs ); for ( ;it.current();++it ) { if ( ( *it ) ->groupType == GroupItem::InstallObject && @@ -1370,13 +1370,13 @@ void TrollProjectWidget::slotNewFile() { if ( gitem->groupType == GroupItem::InstallObject ) { - // QString relpath = m_shownSubproject->path.mid(projectDirectory().length()); + // TQString relpath = m_shownSubproject->path.mid(projectDirectory().length()); bool ok = FALSE; - QString filepattern = KInputDialog::getText( + TQString filepattern = KInputDialog::getText( i18n( "Insert New Filepattern" ), i18n( "Please enter a filepattern relative the current " "subproject (example docs/*.html):" ), - QString::null, &ok, this ); + TQString::null, &ok, this ); if ( ok && !filepattern.isEmpty() ) { addFileToCurrentSubProject( gitem, filepattern ); @@ -1386,12 +1386,12 @@ void TrollProjectWidget::slotNewFile() } if ( gitem->groupType == GroupItem::InstallRoot ) { - // QString relpath = m_shownSubproject->path.mid(projectDirectory().length()); + // TQString relpath = m_shownSubproject->path.mid(projectDirectory().length()); bool ok = FALSE; - QString install_obj = KInputDialog::getText( + TQString install_obj = KInputDialog::getText( i18n( "Insert New Install Object" ), i18n( "Please enter a name for the new object:" ), - QString::null, &ok, this ); + TQString::null, &ok, this ); if ( ok && !install_obj.isEmpty() ) { gitem->addInstallObject( install_obj ); @@ -1404,7 +1404,7 @@ void TrollProjectWidget::slotNewFile() } } KDevCreateFile * createFileSupport = m_part->extension<KDevCreateFile>( "KDevelop/CreateFile" ); - QString fcext; + TQString fcext; if( gitem ) { switch ( gitem->groupType ) @@ -1434,16 +1434,16 @@ void TrollProjectWidget::slotNewFile() fcext = "qrc"; break; default: - fcext = QString::null; + fcext = TQString::null; } } KDevCreateFile::CreatedFile crFile = - createFileSupport->createNewFile( fcext, projectDirectory() + QString(QChar(QDir::separator()))+ m_shownSubproject->relativePath() ); + createFileSupport->createNewFile( fcext, projectDirectory() + TQString(TQChar(TQDir::separator()))+ m_shownSubproject->relativePath() ); } void TrollProjectWidget::slotRemoveFile() { - QListViewItem * selectedItem = details->currentItem(); + TQListViewItem * selectedItem = details->currentItem(); if ( !selectedItem ) return ; @@ -1460,7 +1460,7 @@ void TrollProjectWidget::slotRemoveFile() void TrollProjectWidget::slotExcludeFileFromScopeButton() { - QListViewItem * selectedItem = details->currentItem(); + TQListViewItem * selectedItem = details->currentItem(); if ( !selectedItem ) return ; qProjectItem *pvitem = static_cast<qProjectItem*>( selectedItem ); @@ -1474,7 +1474,7 @@ void TrollProjectWidget::slotExcludeFileFromScopeButton() gitem->removeFileFromScope( fitem->text( 0 ) ); } -void TrollProjectWidget::slotDetailsSelectionChanged( QListViewItem *item ) +void TrollProjectWidget::slotDetailsSelectionChanged( TQListViewItem *item ) { if ( !item ) { @@ -1516,7 +1516,7 @@ void TrollProjectWidget::slotDetailsSelectionChanged( QListViewItem *item ) } } -void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ) { if ( !item ) return ; @@ -1525,7 +1525,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite if ( pvitem->type() == qProjectItem::Group ) { GroupItem * titem = static_cast<GroupItem*>( pvitem ); - QString title, ext; + TQString title, ext; GroupItem::groupTypeMeanings( titem->groupType, title, ext ); KPopupMenu popup( this ); @@ -1583,7 +1583,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite "add them with the relative path." ) ); } int r = popup.exec( p ); - QString cleanSubprojectPath = QDir::cleanDirPath( m_shownSubproject->scope->projectDir() ); + TQString cleanSubprojectPath = TQDir::cleanDirPath( m_shownSubproject->scope->projectDir() ); if ( r == idSetInstObjPath ) { @@ -1591,7 +1591,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite "(example /usr/local/share/... ):" ), this, 0 ); dialog.urlRequester() ->setMode( KFile::Directory ); dialog.urlRequester() ->setURL( titem->owner->scope->variableValues( titem->text( 0 ) + ".path" ).front() ); - if ( dialog.exec() == QDialog::Accepted ) + if ( dialog.exec() == TQDialog::Accepted ) { titem->owner->scope->setEqualOp( titem->text( 0 ) + ".path", dialog.urlRequester() ->url() ); titem->owner->scope->saveToFile( ); @@ -1600,11 +1600,11 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite else if ( r == idInsNewFilepatternItem ) { bool ok = FALSE; - QString filepattern = KInputDialog::getText( + TQString filepattern = KInputDialog::getText( i18n( "Add Pattern of Files to Install" ), i18n( "Enter a pattern relative to the current " "subproject (example docs/*.html):" ), - QString::null, &ok, this ); + TQString::null, &ok, this ); if ( ok && !filepattern.isEmpty() ) { addFileToCurrentSubProject( titem, filepattern ); @@ -1617,11 +1617,11 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite ext + "|" + title + " (" + ext + ")", this, "Add existing files", - true, new QComboBox( false ) ); + true, new TQComboBox( false ) ); dialog->setMode( KFile::Files | KFile::ExistingOnly | KFile::LocalOnly ); - if ( dialog->exec() == QDialog::Rejected ) + if ( dialog->exec() == TQDialog::Rejected ) return ; - QStringList files = dialog->selectedFiles(); + TQStringList files = dialog->selectedFiles(); for ( unsigned int i = 0;i < files.count();++i ) { switch ( dialog->mode() ) @@ -1630,13 +1630,13 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite { // Copy selected files to current subproject folder // and add them to the filelist - QString filename = KURL( files[ i ] ).fileName(); - KIO::NetAccess::file_copy( files[ i ], cleanSubprojectPath + QString( QChar( QDir::separator() ) ) + filename, -1, false, false, this ); - QFile testExist( cleanSubprojectPath + QString( QChar( QDir::separator() ) ) + filename ); + TQString filename = KURL( files[ i ] ).fileName(); + KIO::NetAccess::file_copy( files[ i ], cleanSubprojectPath + TQString( TQChar( TQDir::separator() ) ) + filename, -1, false, false, this ); + TQFile testExist( cleanSubprojectPath + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) { - QStringList files( filename ); + TQStringList files( filename ); addFiles( files, false ); } } @@ -1651,12 +1651,12 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite *proc << files[ i ]; *proc << cleanSubprojectPath; proc->start(KProcess::Block); - QString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); + TQString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); // and add them to the filelist - QFile testExist( cleanSubprojectPath + QString( QChar( QDir::separator() ) ) + filename ); + TQFile testExist( cleanSubprojectPath + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) { - QStringList files( filename ); + TQStringList files( filename ); addFiles( files, false ); } } @@ -1665,8 +1665,8 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite case AddFilesDialog::Relative: { // Form relative path to current subproject folder - QString theFile = files[ i ]; - QStringList files( URLUtil::relativePathToFile( cleanSubprojectPath, theFile ) + TQString theFile = files[ i ]; + TQStringList files( URLUtil::relativePathToFile( cleanSubprojectPath, theFile ) ); addFiles( files, false ); } @@ -1684,7 +1684,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite else if ( r == idInsNewFile ) { KDevCreateFile * createFileSupport = m_part->extension<KDevCreateFile>( "KDevelop/CreateFile" ); - QString fcext; + TQString fcext; switch ( titem->groupType ) { case GroupItem::Sources: @@ -1712,7 +1712,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite fcext = "qrc"; break; default: - fcext = QString::null; + fcext = TQString::null; } KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile( fcext, cleanSubprojectPath ); @@ -1721,10 +1721,10 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite else if ( r == idInsInstallObject ) { bool ok = FALSE; - QString install_obj = KInputDialog::getText( + TQString install_obj = KInputDialog::getText( i18n( "Add Install Object" ), i18n( "Enter a name for the new object:" ), - QString::null, &ok, this ); + TQString::null, &ok, this ); if ( ok && !install_obj.isEmpty() ) { titem->addInstallObject( install_obj ); @@ -1733,13 +1733,13 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite } else if ( r == idLUpdate ) { - QString cmd = "lupdate "; + TQString cmd = "lupdate "; cmd += m_shownSubproject->scope->fileName(); m_part->appFrontend() ->startAppCommand( m_shownSubproject->scope->projectDir(), cmd, false ); } else if ( r == idLRelease ) { - QString cmd = "lrelease "; + TQString cmd = "lrelease "; cmd += m_shownSubproject->scope->fileName(); m_part->appFrontend() ->startAppCommand( m_shownSubproject->scope->projectDir(), cmd, false ); }else if( r == idRemoveFile ) @@ -1808,7 +1808,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite if ( !( gitem->groupType == GroupItem::InstallObject ) ) { KURL::List urls; - urls.append( m_shownSubproject->scope->projectDir() + QChar( QDir::separator() ) + m_shownSubproject->scope->resolveVariables( fitem->localFilePath ) ); + urls.append( m_shownSubproject->scope->projectDir() + TQChar( TQDir::separator() ) + m_shownSubproject->scope->resolveVariables( fitem->localFilePath ) ); FileContext context( urls ); m_part->core() ->fillContextMenu( &popup, &context ); } @@ -1828,29 +1828,29 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite else if ( r == idViewUIH ) { kdDebug(9024) << "Opening:" << fitem->text(0) << ";" << fitem->text(0).replace(".ui","") << endl; - m_part->partController() ->editDocument( KURL( m_shownSubproject->scope->projectDir() + QChar( QDir::separator() ) + + m_part->partController() ->editDocument( KURL( m_shownSubproject->scope->projectDir() + TQChar( TQDir::separator() ) + fitem->localFilePath.replace(".ui","") + ".h" ) ); } else if ( r == idSubclassWidget ) { - QStringList newFileNames; - newFileNames = m_part->languageSupport() ->subclassWidget( m_shownSubproject->scope->projectDir() + QChar( QDir::separator() ) + fitem->localFilePath ); + TQStringList newFileNames; + newFileNames = m_part->languageSupport() ->subclassWidget( m_shownSubproject->scope->projectDir() + TQChar( TQDir::separator() ) + fitem->localFilePath ); kdDebug(9024) << "got new filenames: " << newFileNames << endl; if ( !newFileNames.empty() ) { - QDomDocument & dom = *( m_part->projectDom() ); + TQDomDocument & dom = *( m_part->projectDom() ); for ( uint i = 0; i < newFileNames.count(); ++i ) { - QString srcfile_relpath = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), newFileNames[ i ] ) ; + TQString srcfile_relpath = URLUtil::getRelativePath( m_shownSubproject->scope->projectDir(), newFileNames[ i ] ) ; newFileNames[i] = URLUtil::getRelativePath( projectDirectory(), newFileNames[ i ] ) ; - QString uifile_relpath = m_shownSubproject->relativePath() + QChar( QDir::separator() ) + fitem->localFilePath; + TQString uifile_relpath = m_shownSubproject->relativePath() + TQChar( TQDir::separator() ) + fitem->localFilePath; DomUtil::PairList list = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , "subclass", "sourcefile", "uifile" ); list << DomUtil::Pair( srcfile_relpath, uifile_relpath ); DomUtil::writePairListEntry( dom, "/kdevtrollproject/subclassing", "subclass", "sourcefile", "uifile", list ); - // newFileNames[i] = newFileNames[i].replace(QRegExp(projectDirectory()+"/"),""); + // newFileNames[i] = newFileNames[i].replace(TQRegExp(projectDirectory()+"/"),""); qWarning( "new file: %s", newFileNames[ i ].latin1() ); } m_subclasslist = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , @@ -1861,30 +1861,30 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite } else if ( r == idUpdateWidgetclass ) { - QString noext = fitem->text( 0 ); + TQString noext = fitem->text( 0 ); if ( noext.findRev( '.' ) > -1 ) noext = noext.left( noext.findRev( '.' ) ); - QStringList dummy; - QString uifile = fitem->uiFileLink; - if ( uifile.findRev( QString( QChar( QDir::separator() ) ) ) > -1 ) + TQStringList dummy; + TQString uifile = fitem->uiFileLink; + if ( uifile.findRev( TQString( TQChar( TQDir::separator() ) ) ) > -1 ) { - QStringList uisplit = QStringList::split( QString( QChar( QDir::separator() ) ), uifile ); + TQStringList uisplit = TQStringList::split( TQString( TQChar( TQDir::separator() ) ), uifile ); uifile = uisplit[ uisplit.count() - 1 ]; } - m_part->languageSupport() ->updateWidget( m_shownSubproject->scope->projectDir() + QString( QChar( QDir::separator() ) ) + uifile, noext ); + m_part->languageSupport() ->updateWidget( m_shownSubproject->scope->projectDir() + TQString( TQChar( TQDir::separator() ) ) + uifile, noext ); } else if ( r == idUISubclasses ) { - QDomDocument & dom = *( m_part->projectDom() ); + TQDomDocument & dom = *( m_part->projectDom() ); DomUtil::PairList list = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , "subclass", "sourcefile", "uifile" ); - SubclassesDlg *sbdlg = new SubclassesDlg( m_shownSubproject->relativePath() + QChar( QDir::separator() ) + fitem->localFilePath, + SubclassesDlg *sbdlg = new SubclassesDlg( m_shownSubproject->relativePath() + TQChar( TQDir::separator() ) + fitem->localFilePath, list, projectDirectory() ); if ( sbdlg->exec() ) { - QDomElement el = DomUtil::elementByPath( dom, "/kdevtrollproject" ); - QDomElement el2 = DomUtil::elementByPath( dom, "/kdevtrollproject/subclassing" ); + TQDomElement el = DomUtil::elementByPath( dom, "/kdevtrollproject" ); + TQDomElement el2 = DomUtil::elementByPath( dom, "/kdevtrollproject/subclassing" ); if ( ( !el.isNull() ) && ( !el2.isNull() ) ) { el.removeChild( el2 ); @@ -1901,7 +1901,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, QListViewItem *ite GroupItem * titem = static_cast<GroupItem*>( item->parent() ); bool ok = FALSE; - QString filepattern = KInputDialog::getText( + TQString filepattern = KInputDialog::getText( i18n( "Edit Pattern" ), i18n( "Enter a pattern relative to the current " "subproject (example docs/*.html):" ), @@ -1928,7 +1928,7 @@ void TrollProjectWidget::removeFile( QMakeScopeItem *spitem, FileItem *fitem ) m_filesCached = false; m_allFilesCache.clear(); - QString realfilename = spitem->scope->resolveVariables( fitem->localFilePath ); + TQString realfilename = spitem->scope->resolveVariables( fitem->localFilePath ); if ( KMessageBox::warningYesNo( this, "<qt>" + i18n( "Do you want to delete the file <strong>%1</strong> from the project and your disk?" ) @@ -1942,24 +1942,24 @@ void TrollProjectWidget::removeFile( QMakeScopeItem *spitem, FileItem *fitem ) return; }else { - kdDebug(9024) << "Deleting file as the user wished: " << spitem->scope->projectDir() + QString( QChar( QDir::separator() ) ) + realfilename << endl; - KIO::NetAccess::del( KURL::fromPathOrURL( spitem->scope->projectDir() + QString( QChar( QDir::separator() ) ) + realfilename ), 0 ); + kdDebug(9024) << "Deleting file as the user wished: " << spitem->scope->projectDir() + TQString( TQChar( TQDir::separator() ) ) + realfilename << endl; + KIO::NetAccess::del( KURL::fromPathOrURL( spitem->scope->projectDir() + TQString( TQChar( TQDir::separator() ) ) + realfilename ), 0 ); } if ( gitem->groupType != GroupItem::InstallObject ) { - QString removedFileName = spitem->relativePath() + QString( QChar( QDir::separator() ) ) + realfilename; - if ( removedFileName.startsWith( QDir::rootDirPath() ) ) + TQString removedFileName = spitem->relativePath() + TQString( TQChar( TQDir::separator() ) ) + realfilename; + if ( removedFileName.startsWith( TQDir::rootDirPath() ) ) removedFileName = removedFileName.mid( 1 ); emitRemovedFile( removedFileName ); } //remove subclassing info - QDomDocument &dom = *( m_part->projectDom() ); + TQDomDocument &dom = *( m_part->projectDom() ); DomUtil::PairList list = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , "subclass", "sourcefile", "uifile" ); - QPtrList<DomUtil::Pair> pairsToRemove; + TQPtrList<DomUtil::Pair> pairsToRemove; DomUtil::PairList::iterator it; for ( it = list.begin(); it != list.end(); ++it ) { @@ -1973,8 +1973,8 @@ void TrollProjectWidget::removeFile( QMakeScopeItem *spitem, FileItem *fitem ) { list.remove( *pair ); } - QDomElement el = DomUtil::elementByPath( dom, "/kdevtrollproject" ); - QDomElement el2 = DomUtil::elementByPath( dom, "/kdevtrollproject/subclassing" ); + TQDomElement el = DomUtil::elementByPath( dom, "/kdevtrollproject" ); + TQDomElement el2 = DomUtil::elementByPath( dom, "/kdevtrollproject/subclassing" ); if ( ( !el.isNull() ) && ( !el2.isNull() ) ) { el.removeChild( el2 ); @@ -1984,19 +1984,19 @@ void TrollProjectWidget::removeFile( QMakeScopeItem *spitem, FileItem *fitem ) gitem->removeFileFromScope( fitem->text( 0 ) ); } -void TrollProjectWidget::emitAddedFile( const QString &fileName ) +void TrollProjectWidget::emitAddedFile( const TQString &fileName ) { - emit m_part->addedFilesToProject( QStringList( fileName ) ); + emit m_part->addedFilesToProject( TQStringList( fileName ) ); } -void TrollProjectWidget::emitRemovedFile( const QString &fileName ) +void TrollProjectWidget::emitRemovedFile( const TQString &fileName ) { - emit m_part->removedFilesFromProject( QStringList( fileName ) ); + emit m_part->removedFilesFromProject( TQStringList( fileName ) ); } -QString TrollProjectWidget::getUiFileLink( const QString &relpath, const QString& filename ) +TQString TrollProjectWidget::getUiFileLink( const TQString &relpath, const TQString& filename ) { DomUtil::PairList::iterator it; for ( it = m_subclasslist.begin();it != m_subclasslist.end(); ++it ) @@ -2013,28 +2013,28 @@ void TrollProjectWidget::slotBuildOpenFile() if ( !part || !part->url().isLocalFile() ) return ; - QString fileName = part->url().path(); - QFileInfo fi( fileName ); - QString sourceDir = fi.dirPath(); - QString baseName = fi.baseName( true ); + TQString fileName = part->url().path(); + TQFileInfo fi( fileName ); + TQString sourceDir = fi.dirPath(); + TQString baseName = fi.baseName( true ); kdDebug( 9024 ) << "Compiling " << fileName << "in dir " << sourceDir << " with baseName " << baseName << endl; - QString buildDir = sourceDir; - QString target = baseName + ".o"; + TQString buildDir = sourceDir; + TQString target = baseName + ".o"; m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); // m_part->startMakeCommand(buildDir, target); - QPtrList<QMakeScopeItem> list = findSubprojectForFile( fi ); + TQPtrList<QMakeScopeItem> list = findSubprojectForFile( fi ); QMakeScopeItem *spitem; for ( spitem = list.first(); spitem; spitem = list.next() ) { - QString buildcmd = constructMakeCommandLine( spitem->scope ); - QString dircmd = "cd " + KProcess::quote( spitem->scope->projectDir() ) + " && " ; + TQString buildcmd = constructMakeCommandLine( spitem->scope ); + TQString dircmd = "cd " + KProcess::quote( spitem->scope->projectDir() ) + " && " ; kdDebug( 9024 ) << "builddir " << spitem->scope->projectDir() << ", cmd " << dircmd + buildcmd + " " + target << endl; m_part->queueCmd( spitem->scope->projectDir(), dircmd + buildcmd + " " + target ); } @@ -2046,7 +2046,7 @@ void TrollProjectWidget::slotBuildOpenFile() void TrollProjectWidget::slotExecuteProject() { - QString program = m_part->mainProgram(); + TQString program = m_part->mainProgram(); if ( program.isEmpty() ) { KMessageBox::sorry( this, i18n( "Please specify the executable name in the " @@ -2067,12 +2067,12 @@ void TrollProjectWidget::slotExecuteProject() } } - if ( !program.startsWith( QDir::rootDirPath() ) ) - program.prepend( "." + QString( QChar( QDir::separator() ) ) ); + if ( !program.startsWith( TQDir::rootDirPath() ) ) + program.prepend( "." + TQString( TQChar( TQDir::separator() ) ) ); // Build environment variables to prepend to the executable path - QString runEnvVars = QString::null; + TQString runEnvVars = TQString::null; DomUtil::PairList list = DomUtil::readPairListEntry( *( m_part->projectDom() ), "/kdevtrollproject/run/envvars", "envvar", "name", "value" ); @@ -2112,7 +2112,7 @@ void TrollProjectWidget::slotDistCleanTarget() runClean(m_shownSubproject, "distclean"); } -void TrollProjectWidget::runClean( QMakeScopeItem* item, const QString& cleantargetname ) +void TrollProjectWidget::runClean( QMakeScopeItem* item, const TQString& cleantargetname ) { // no subproject selected m_part->partController() ->saveAllFiles(); @@ -2122,24 +2122,24 @@ void TrollProjectWidget::runClean( QMakeScopeItem* item, const QString& cleantar if ( item->scope->scopeType() != Scope::ProjectScope ) return ; - QString dir = item->scope->projectDir(); + TQString dir = item->scope->projectDir(); createMakefileIfMissing( dir, item ); m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); - QString dircmd = "cd " + KProcess::quote( dir ) + " && " ; - QString rebuildcmd = constructMakeCommandLine( item->scope ) + " "+cleantargetname; + TQString dircmd = "cd " + KProcess::quote( dir ) + " && " ; + TQString rebuildcmd = constructMakeCommandLine( item->scope ) + " "+cleantargetname; m_part->queueCmd( dir, dircmd + rebuildcmd ); } -QString TrollProjectWidget::constructMakeCommandLine( Scope* s ) +TQString TrollProjectWidget::constructMakeCommandLine( Scope* s ) { - QString makeFileName; + TQString makeFileName; if ( s ) makeFileName = s->resolveVariables( s->variableValues( "MAKEFILE", true, true, true ).front() ); - QDomDocument & dom = *( m_part->projectDom() ); + TQDomDocument & dom = *( m_part->projectDom() ); - QString cmdline = DomUtil::readEntry( dom, "/kdevtrollproject/make/makebin" ); + TQString cmdline = DomUtil::readEntry( dom, "/kdevtrollproject/make/makebin" ); if ( cmdline.isEmpty() ) cmdline = MAKE_COMMAND; if ( !makeFileName.isEmpty() ) @@ -2153,7 +2153,7 @@ QString TrollProjectWidget::constructMakeCommandLine( Scope* s ) if ( jobs != 0 && runmultiple ) { cmdline += " -j"; - cmdline += QString::number( jobs ); + cmdline += TQString::number( jobs ); } if ( DomUtil::readBoolEntry( dom, "/kdevtrollproject/make/dontact" ) ) cmdline += " -n"; @@ -2165,44 +2165,44 @@ QString TrollProjectWidget::constructMakeCommandLine( Scope* s ) } -void TrollProjectWidget::createMakefileIfMissing( const QString &dir, QMakeScopeItem *item ) +void TrollProjectWidget::createMakefileIfMissing( const TQString &dir, QMakeScopeItem *item ) { - QFileInfo fi; - QFileInfo fi2; + TQFileInfo fi; + TQFileInfo fi2; kdDebug(9024) << "Makefile:" << item->scope->variableValues( "MAKEFILE", true, true, true ) << endl; if ( item->scope->variableValues( "MAKEFILE", true, true, true ).isEmpty() ) { - fi.setFile( dir + QString( QChar( QDir::separator() ) ) + "Makefile" ); - fi2.setFile( dir + QString( QChar( QDir::separator() ) ) + "makefile" ); + fi.setFile( dir + TQString( TQChar( TQDir::separator() ) ) + "Makefile" ); + fi2.setFile( dir + TQString( TQChar( TQDir::separator() ) ) + "makefile" ); } else { - QString realmf = item->scope->resolveVariables( item->scope->variableValues( "MAKEFILE", true, true, true ).front() ); + TQString realmf = item->scope->resolveVariables( item->scope->variableValues( "MAKEFILE", true, true, true ).front() ); fi.setFile( realmf ); - fi2.setFile( dir + QString( QChar( QDir::separator() ) ) + realmf ); + fi2.setFile( dir + TQString( TQChar( TQDir::separator() ) ) + realmf ); } if ( !fi.exists() && !fi2.exists() ) { - int r = KMessageBox::questionYesNo( this, i18n( "There is no Makefile in this directory. Run qmake first?" ), QString::null, i18n( "Run qmake" ), i18n( "Do Not Run" ) ); + int r = KMessageBox::questionYesNo( this, i18n( "There is no Makefile in this directory. Run qmake first?" ), TQString::null, i18n( "Run qmake" ), i18n( "Do Not Run" ) ); if ( r == KMessageBox::No ) return ; m_part->startQMakeCommand( dir ); } } -QMakeScopeItem* TrollProjectWidget::findSubprojectForPath( const QString& relPath ) +QMakeScopeItem* TrollProjectWidget::findSubprojectForPath( const TQString& relPath ) { if( !m_rootSubproject ) return 0; - QStringList dirs = QStringList::split("/", relPath); + TQStringList dirs = TQStringList::split("/", relPath); QMakeScopeItem* pitem = static_cast<QMakeScopeItem*>(m_rootSubproject); - for( QStringList::iterator it = dirs.begin(); it != dirs.end(); ++it) + for( TQStringList::iterator it = dirs.begin(); it != dirs.end(); ++it) { - QListViewItem* item = pitem->firstChild(); + TQListViewItem* item = pitem->firstChild(); while( item ) { QMakeScopeItem* sitem = static_cast<QMakeScopeItem*>(item); - if( QFileInfo( sitem->scope->projectDir() ).fileName() == *it ) + if( TQFileInfo( sitem->scope->projectDir() ).fileName() == *it ) { pitem = sitem; break; @@ -2212,37 +2212,37 @@ QMakeScopeItem* TrollProjectWidget::findSubprojectForPath( const QString& relPat return pitem; } -QPtrList<QMakeScopeItem> TrollProjectWidget::findSubprojectForFile( QFileInfo fi ) +TQPtrList<QMakeScopeItem> TrollProjectWidget::findSubprojectForFile( TQFileInfo fi ) { - QPtrList<QMakeScopeItem> list; + TQPtrList<QMakeScopeItem> list; findSubprojectForFile( list, m_rootSubproject, fi.absFilePath() ); return list; } -void TrollProjectWidget::findSubprojectForFile( QPtrList<QMakeScopeItem> &list, QMakeScopeItem * item, QString absFilePath ) +void TrollProjectWidget::findSubprojectForFile( TQPtrList<QMakeScopeItem> &list, QMakeScopeItem * item, TQString absFilePath ) { if( !item ) return; - QDir d( item->scope->projectDir() ); + TQDir d( item->scope->projectDir() ); - QStringList vars = item->scope->variableValues( "SOURCES" ); - for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) + TQStringList vars = item->scope->variableValues( "SOURCES" ); + for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) { - QFileInfo fi2( d, item->scope->resolveVariables( *it ) ); + TQFileInfo fi2( d, item->scope->resolveVariables( *it ) ); if ( absFilePath == fi2.absFilePath() ) list.append( item ); } vars = item->scope->variableValues( "HEADERS" ); - for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) + for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) { - QFileInfo fi2( d, item->scope->resolveVariables( *it ) ); + TQFileInfo fi2( d, item->scope->resolveVariables( *it ) ); if ( absFilePath == fi2.absFilePath() ) list.append( item ); } - QListViewItem * child = item->firstChild(); + TQListViewItem * child = item->firstChild(); while ( child ) { QMakeScopeItem * spitem = dynamic_cast<QMakeScopeItem*>( child ); @@ -2320,7 +2320,7 @@ QMakeScopeItem * TrollProjectWidget::findSubprojectForScope( QMakeScopeItem * sc return findSubprojectForScope( dynamic_cast<QMakeScopeItem *>( scope->parent() ) ); } -void TrollProjectWidget::focusInEvent( QFocusEvent * /*e*/ ) +void TrollProjectWidget::focusInEvent( TQFocusEvent * /*e*/ ) { switch ( m_lastFocusedView ) { @@ -2360,7 +2360,7 @@ void TrollProjectWidget::runQMakeRecursive( QMakeScopeItem* proj ) void TrollProjectWidget::slotBuildSelectedFile() { - QListViewItem * selectedItem = details->currentItem(); + TQListViewItem * selectedItem = details->currentItem(); if ( !selectedItem ) return ; qProjectItem *pvitem = static_cast<qProjectItem*>( selectedItem ); @@ -2373,24 +2373,24 @@ void TrollProjectWidget::slotBuildSelectedFile() void TrollProjectWidget::buildFile( QMakeScopeItem* spitem, FileItem* fitem ) { - QFileInfo fi( spitem->scope->projectDir() + QChar( QDir::separator() ) + spitem->scope->resolveVariables( fitem->localFilePath ) ); - QString sourceDir = fi.dirPath(); - QString baseName = fi.baseName( true ); + TQFileInfo fi( spitem->scope->projectDir() + TQChar( TQDir::separator() ) + spitem->scope->resolveVariables( fitem->localFilePath ) ); + TQString sourceDir = fi.dirPath(); + TQString baseName = fi.baseName( true ); kdDebug( 9024 ) << "Compiling " << spitem->scope->resolveVariables( fitem->text( 0 ) ) << "in dir " << sourceDir << " with baseName " << baseName << endl; - QString buildDir = sourceDir; - QString target = baseName + ".o"; + TQString buildDir = sourceDir; + TQString target = baseName + ".o"; if( !spitem->scope->variableValues("OBJECTS_DIR").isEmpty() ) - target = spitem->scope->resolveVariables( spitem->scope->variableValues("OBJECTS_DIR").first() )+ QString( QChar( QDir::separator() ) )+target; + target = spitem->scope->resolveVariables( spitem->scope->variableValues("OBJECTS_DIR").first() )+ TQString( TQChar( TQDir::separator() ) )+target; kdDebug( 9024 ) << "builddir " << buildDir << ", target " << target << endl; m_part->mainWindow() ->raiseView( m_part->makeFrontend() ->widget() ); // m_part->startMakeCommand(buildDir, target); - QString buildcmd = constructMakeCommandLine( spitem->scope ); - QString dircmd = "cd " + KProcess::quote( spitem->scope->projectDir() ) + " && " ; + TQString buildcmd = constructMakeCommandLine( spitem->scope ); + TQString dircmd = "cd " + KProcess::quote( spitem->scope->projectDir() ) + " && " ; kdDebug( 9024 ) << "builddir " << spitem->scope->projectDir() << ", cmd " << dircmd + buildcmd + " " + target << endl; m_part->queueCmd( spitem->scope->projectDir(), dircmd + buildcmd + " " + target ); @@ -2428,12 +2428,12 @@ void TrollProjectWidget::slotDisableSubproject( QMakeScopeItem* spitem ) if( spitem->scope->variableValues("TEMPLATE").findIndex("subdirs") != -1 ) { - QStringList subdirs = spitem->scope->variableValues( "SUBDIRS" ); + TQStringList subdirs = spitem->scope->variableValues( "SUBDIRS" ); DisableSubprojectDlg dlg( subdirs ); if( dlg.exec() ) { - QStringList values = dlg.selectedProjects(); - QListViewItem* item = spitem->firstChild(); + TQStringList values = dlg.selectedProjects(); + TQListViewItem* item = spitem->firstChild(); while( item ) { if( values.findIndex( item->text(0) ) != -1 ) @@ -2448,7 +2448,7 @@ void TrollProjectWidget::slotDisableSubproject( QMakeScopeItem* spitem ) }else { QMakeScopeItem* parent = static_cast<QMakeScopeItem*>(spitem->parent()); - parent->disableSubprojects( QStringList( spitem->scope->scopeName() ) ); + parent->disableSubprojects( TQStringList( spitem->scope->scopeName() ) ); delete spitem; parent->scope->saveToFile(); m_shownSubproject = parent; @@ -2456,21 +2456,21 @@ void TrollProjectWidget::slotDisableSubproject( QMakeScopeItem* spitem ) } } -void TrollProjectWidget::slotProjectDirty(const QString& path) +void TrollProjectWidget::slotProjectDirty(const TQString& path) { kdDebug(9024) << "File is dirty:" << path << " using method " << endl; if( KMessageBox::warningYesNo(this, i18n("The project file \"%1\" has changed on disk\n(Or you have \"%2\" opened in the editor, which also triggers a reload when you change something in the QMake Manager).\n\nDo you want to reload it?").arg(path).arg(path), i18n("Project File Changed"), i18n("Reload"), i18n("Do Not Reload"), "trollproject_reload_project_file" ) != KMessageBox::No ) { m_part->dirWatch()->stopScan(); - QListViewItemIterator it(m_rootSubproject); - QValueList<QMakeScopeItem*> itemstoreload; + TQListViewItemIterator it(m_rootSubproject); + TQValueList<QMakeScopeItem*> itemstoreload; while( it.current() ) { QMakeScopeItem* projectitem = static_cast<QMakeScopeItem*>( it.current() ); if( projectitem->scope->scopeType() == Scope::ProjectScope || projectitem->scope->scopeType() == Scope::IncludeScope ) { - QString projectfile = projectitem->scope->projectDir() + QString(QChar(QDir::separator())) + projectitem->scope->fileName(); + TQString projectfile = projectitem->scope->projectDir() + TQString(TQChar(TQDir::separator())) + projectitem->scope->fileName(); if( projectfile == path ) { itemstoreload.append(projectitem); @@ -2479,7 +2479,7 @@ void TrollProjectWidget::slotProjectDirty(const QString& path) it++; } - QValueList<QMakeScopeItem*>::const_iterator reloadit = itemstoreload.begin(); + TQValueList<QMakeScopeItem*>::const_iterator reloadit = itemstoreload.begin(); for( ; reloadit != itemstoreload.end() ; ++reloadit ) { (*reloadit)->reloadProject(); @@ -2517,13 +2517,13 @@ bool TrollProjectWidget::showVariablesInTree() const } -QMap<QString,QString> TrollProjectWidget::qmakeEnvironment() const +TQMap<TQString,TQString> TrollProjectWidget::qmakeEnvironment() const { - QMap<QString,QString> map; + TQMap<TQString,TQString> map; DomUtil::PairList envvars = DomUtil::readPairListEntry(*m_part->projectDom(), "/kdevtrollproject/make/envvars", "envvar", "name", "value"); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; bool hasQtDir = false; for (it = envvars.begin(); it != envvars.end(); ++it) { diff --git a/buildtools/qmake/trollprojectwidget.h b/buildtools/qmake/trollprojectwidget.h index 19595f78..7983f4d7 100644 --- a/buildtools/qmake/trollprojectwidget.h +++ b/buildtools/qmake/trollprojectwidget.h @@ -20,18 +20,18 @@ #ifndef _TROLLPROJECTWIDGET_H_ #define _TROLLPROJECTWIDGET_H_ -#include <qdict.h> -#include <qlistview.h> -#include <qmap.h> -#include <qstrlist.h> -#include <qvbox.h> -#include <qtoolbutton.h> +#include <tqdict.h> +#include <tqlistview.h> +#include <tqmap.h> +#include <tqstrlist.h> +#include <tqvbox.h> +#include <tqtoolbutton.h> #include <kiconloader.h> #include <klocale.h> #include <kdeversion.h> -#include <qbutton.h> -#include <qfileinfo.h> -#include <qptrlist.h> +#include <tqbutton.h> +#include <tqfileinfo.h> +#include <tqptrlist.h> #include "choosesubprojectdlg.h" #include "newwidgetdlg.h" #include "domutil.h" @@ -49,45 +49,45 @@ public: TrollProjectWidget( TrollProjectPart *part ); ~TrollProjectWidget(); - void openProject( const QString &dirName ); + void openProject( const TQString &dirName ); void closeProject(); /** * A list of the (relative) names of all subprojects (== subdirectories). */ - //QStringList allSubprojects(); + //TQStringList allSubprojects(); /** * A list of the (relative) names of all libraries. */ - QStringList allLibraries(); + TQStringList allLibraries(); /** * A list of all files that belong to the project. **/ - QStringList allFiles(); + TQStringList allFiles(); /** * The top level directory of the project. **/ - QString projectDirectory(); + TQString projectDirectory(); /** * The directory of the currently active subproject. */ - QString subprojectDirectory(); + TQString subprojectDirectory(); /** * The directory of the currently active subproject. */ - QString getCurrentTarget(); + TQString getCurrentTarget(); - QString getCurrentDestDir(); + TQString getCurrentDestDir(); - QString getCurrentOutputFilename(); + TQString getCurrentOutputFilename(); - void addFileToCurrentSubProject( GroupItem *titem, const QString &filename ); - void addFileToCurrentSubProject( GroupItem::GroupType gtype, const QString &filename ); - void addFiles( QStringList &files, bool relativeToProjectRoot = true ); - void emitAddedFile( const QString &name ); - void emitRemovedFile( const QString &name ); + void addFileToCurrentSubProject( GroupItem *titem, const TQString &filename ); + void addFileToCurrentSubProject( GroupItem::GroupType gtype, const TQString &filename ); + void addFiles( TQStringList &files, bool relativeToProjectRoot = true ); + void emitAddedFile( const TQString &name ); + void emitRemovedFile( const TQString &name ); - QString getUiFileLink( const QString &path, const QString& filename ); + TQString getUiFileLink( const TQString &path, const TQString& filename ); bool isTMakeProject(); enum TrollProjectView { SubprojectView, DetailsView }; @@ -122,78 +122,78 @@ public slots: void slotRemoveFile(); protected: - virtual void focusInEvent( QFocusEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); private slots: - void slotOverviewSelectionChanged( QListViewItem *item ); - void slotOverviewContextMenu( KListView *, QListViewItem *item, const QPoint &p ); - void slotDetailsSelectionChanged( QListViewItem* ); - void slotDetailsExecuted( QListViewItem *item ); - void slotDetailsContextMenu( KListView *, QListViewItem *item, const QPoint &p ); + void slotOverviewSelectionChanged( TQListViewItem *item ); + void slotOverviewContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ); + void slotDetailsSelectionChanged( TQListViewItem* ); + void slotDetailsExecuted( TQListViewItem *item ); + void slotDetailsContextMenu( KListView *, TQListViewItem *item, const TQPoint &p ); void slotExcludeFileFromScopeButton(); void slotAddSubproject( QMakeScopeItem *spitem = 0 ); void slotRemoveSubproject( QMakeScopeItem *spitem = 0 ); void slotCreateScope( QMakeScopeItem *spitem = 0 ); void slotRemoveScope( QMakeScopeItem *spitem = 0 ); void slotDisableSubproject( QMakeScopeItem* spitem = 0 ); - void slotProjectDirty( const QString& ); + void slotProjectDirty( const TQString& ); void createQMakeScopeItems(); private: void cleanDetailView( QMakeScopeItem *item ); - void runClean( QMakeScopeItem*, const QString& ); + void runClean( QMakeScopeItem*, const TQString& ); void buildProjectDetailTree( QMakeScopeItem *item, KListView *listviewControl ); void removeFile( QMakeScopeItem *spitem, FileItem *fitem ); - void addSubprojectToItem( QMakeScopeItem*, const QString& ); + void addSubprojectToItem( QMakeScopeItem*, const TQString& ); void setupContext(); - // void parseScope(QMakeScopeItem *item,QString scopeString, Scope *scope); + // void parseScope(QMakeScopeItem *item,TQString scopeString, Scope *scope); GroupItem* getInstallRoot( QMakeScopeItem *item ); - GroupItem* getInstallObject( QMakeScopeItem *item, const QString& objectname ); - QString constructMakeCommandLine( Scope* s = 0 ); + GroupItem* getInstallObject( QMakeScopeItem *item, const TQString& objectname ); + TQString constructMakeCommandLine( Scope* s = 0 ); - void createMakefileIfMissing( const QString &dir, QMakeScopeItem *item ); + void createMakefileIfMissing( const TQString &dir, QMakeScopeItem *item ); void runQMakeRecursive( QMakeScopeItem* proj); void buildFile( QMakeScopeItem* spitem, FileItem* fitem); - /*fileName: full base file name like QFileInfo::baseName ( true )*/ - QPtrList<QMakeScopeItem> findSubprojectForFile( QFileInfo fi ); - void findSubprojectForFile( QPtrList<QMakeScopeItem> &list, QMakeScopeItem * item, QString absFilePath ); - QMakeScopeItem* findSubprojectForPath( const QString& ); - // QString makeEnvironment(); + /*fileName: full base file name like TQFileInfo::baseName ( true )*/ + TQPtrList<QMakeScopeItem> findSubprojectForFile( TQFileInfo fi ); + void findSubprojectForFile( TQPtrList<QMakeScopeItem> &list, QMakeScopeItem * item, TQString absFilePath ); + QMakeScopeItem* findSubprojectForPath( const TQString& ); + // TQString makeEnvironment(); TrollProjectWidget::SaveType dialogSaveBehaviour() const; QMakeScopeItem *findSubprojectForScope( QMakeScopeItem *scope ); void reloadProjectFromFile( QMakeScopeItem* item ); - QMap<QString,QString> qmakeEnvironment() const; + TQMap<TQString,TQString> qmakeEnvironment() const; - QVBox *overviewContainer; + TQVBox *overviewContainer; KListView *overview; - QHBox *projectTools; - QToolButton *addSubdirButton; - QToolButton *createScopeButton; + TQHBox *projectTools; + TQToolButton *addSubdirButton; + TQToolButton *createScopeButton; - QToolButton *buildProjectButton; - QToolButton *rebuildProjectButton; - QToolButton *executeProjectButton; + TQToolButton *buildProjectButton; + TQToolButton *rebuildProjectButton; + TQToolButton *executeProjectButton; - QToolButton *buildTargetButton; - QToolButton *rebuildTargetButton; - QToolButton *executeTargetButton; + TQToolButton *buildTargetButton; + TQToolButton *rebuildTargetButton; + TQToolButton *executeTargetButton; - QToolButton *buildFileButton; - QToolButton *projectconfButton; + TQToolButton *buildFileButton; + TQToolButton *projectconfButton; - QVBox *detailContainer; + TQVBox *detailContainer; KListView *details; - QHBox *fileTools; - QToolButton *addfilesButton; - QToolButton *newfileButton; - QToolButton *removefileButton; - QToolButton *excludeFileFromScopeButton; + TQHBox *fileTools; + TQToolButton *addfilesButton; + TQToolButton *newfileButton; + TQToolButton *removefileButton; + TQToolButton *excludeFileFromScopeButton; DomUtil::PairList m_subclasslist; QMakeScopeItem *m_shownSubproject; @@ -207,7 +207,7 @@ private: bool m_filesCached; bool m_showFilenamesOnly; bool m_showVariablesInTree; - QStringList m_allFilesCache; + TQStringList m_allFilesCache; friend class ChooseSubprojectDlg; friend class ProjectConfigurationDlg; |