diff options
Diffstat (limited to 'buildtools/qmake/trollprojectwidget.cpp')
-rw-r--r-- | buildtools/qmake/trollprojectwidget.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/buildtools/qmake/trollprojectwidget.cpp b/buildtools/qmake/trollprojectwidget.cpp index 148f8b22..4baf0b6b 100644 --- a/buildtools/qmake/trollprojectwidget.cpp +++ b/buildtools/qmake/trollprojectwidget.cpp @@ -339,9 +339,9 @@ void TrollProjectWidget::openProject( const TQString &dirName ) TQStringList l = dir.entryList( "*.pro" ); TQString profile; - if( l.count() && l.tqfindIndex( m_part->projectName() + ".pro") != -1 ) + if( l.count() && l.findIndex( m_part->projectName() + ".pro") != -1 ) profile = m_part->projectName()+".pro"; - else if( l.isEmpty() || ( l.count() && l.tqfindIndex( fi.baseName() + ".pro") != -1 ) ) + else if( l.isEmpty() || ( l.count() && l.findIndex( fi.baseName() + ".pro") != -1 ) ) profile = fi.baseName()+".pro"; else profile = l[0]; @@ -362,7 +362,7 @@ void TrollProjectWidget::openProject( const TQString &dirName ) m_rootSubproject->setOpen( true ); - if ( m_rootSubproject->firstChild() && m_rootSubproject->scope->variableValues( "TEMPLATE" ).tqfindIndex("subdirs") != -1 ) + if ( m_rootSubproject->firstChild() && m_rootSubproject->scope->variableValues( "TEMPLATE" ).findIndex("subdirs") != -1 ) { overview->setSelected( m_rootSubproject->firstChild(), true ); } @@ -433,11 +433,11 @@ void TrollProjectWidget::setupContext() TQStringList tmpl = m_shownSubproject->scope->variableValues( "TEMPLATE" ); - if ( tmpl.tqfindIndex( "lib" ) != -1 ) + if ( tmpl.findIndex( "lib" ) != -1 ) { runable = false; } - else if ( tmpl.tqfindIndex( "subdirs" ) != -1 ) + else if ( tmpl.findIndex( "subdirs" ) != -1 ) { hasSubdirs = true; runable = false; @@ -519,7 +519,7 @@ TQString TrollProjectWidget::getCurrentOutputFilename() if ( m_shownSubproject->scope->variableValues( "TARGET", true, true, true ).isEmpty() ) { TQString exe = m_shownSubproject->scope->resolveVariables(m_shownSubproject->scope->fileName()); - return exe.tqreplace( TQRegExp( "\\.pro$" ), "" ); + return exe.replace( TQRegExp( "\\.pro$" ), "" ); } else { @@ -557,7 +557,7 @@ void TrollProjectWidget::buildProjectDetailTree( QMakeScopeItem *item, KListView { // Insert all GroupItems and all of their tqchildren into the view - if ( !listviewControl || item->scope->variableValues( "TEMPLATE" ).tqfindIndex("subdirs") != -1 ) + if ( !listviewControl || item->scope->variableValues( "TEMPLATE" ).findIndex("subdirs") != -1 ) return ; TQMapIterator<GroupItem::GroupType, GroupItem*> it2 = item->groups.begin(); @@ -669,7 +669,7 @@ void TrollProjectWidget::slotExecuteTarget() // Only run application projects - if ( !m_shownSubproject->scope->variableValues( "TEMPLATE" ).isEmpty() && m_shownSubproject->scope->variableValues( "TEMPLATE" ).tqfindIndex( "app" ) == -1 ) + if ( !m_shownSubproject->scope->variableValues( "TEMPLATE" ).isEmpty() && m_shownSubproject->scope->variableValues( "TEMPLATE" ).findIndex( "app" ) == -1 ) return ; //only run once @@ -913,7 +913,7 @@ void TrollProjectWidget::addSubprojectToItem( QMakeScopeItem* spitem, const TQSt { spitem->scope->removeFromMinusOp( "SUBDIRS", subdirname ); delete item; - if( spitem->scope->variableValues( "SUBDIRS" ).tqfindIndex( subdirname ) != -1 ) + if( spitem->scope->variableValues( "SUBDIRS" ).findIndex( subdirname ) != -1 ) return; } } @@ -1026,7 +1026,7 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, TQListViewItem *i popup.tqsetWhatsThis( idAddSubproject, 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)." ) ); - if ( spitem->scope->variableValues( "TEMPLATE" ).tqfindIndex( "subdirs" ) == -1 ) + if ( spitem->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) == -1 ) popup.setItemEnabled( idAddSubproject, false ); idRemoveSubproject = popup.insertItem( SmallIcon( "remove_subdir" ), i18n( "Remove Subproject..." ) ); popup.tqsetWhatsThis( idRemoveSubproject, i18n( "<b>Remove subproject</b><p>Removes currently selected subproject. Does not delete any file from disk. Deleted subproject can be later added by calling 'Add Subproject' action." ) ); @@ -1051,11 +1051,11 @@ void TrollProjectWidget::slotOverviewContextMenu( KListView *, TQListViewItem *i popup.tqsetWhatsThis( idAddSubproject, i18n( "<b>Add subproject</b><p>Creates a <i>new</i> or adds an <i>existing</i> subproject to the currently selected scope. " "This action is allowed only if the type of the subproject is 'subdirectories'. The type of the subproject can be " "defined in the <b>Subproject Settings</b> dialog (open it from the subproject context menu)." ) ); - if ( spitem->scope->variableValues( "TEMPLATE" ).tqfindIndex( "subdirs" ) == -1 ) + if ( spitem->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) == -1 ) popup.setItemEnabled( idAddSubproject, false ); idDisableSubproject = popup.insertItem( SmallIcon( "remove_subdir" ), i18n( "Disable Subproject..." ) ); popup.tqsetWhatsThis( idRemoveSubproject, i18n( "<b>Disable subproject</b><p>Disables the currently selected subproject when this scope is active. Does not delete the directory from disk. The deleted subproject can be later added by using the 'Add Subproject' action." ) ); - if( spitem->scope->variableValues( "TEMPLATE" ).tqfindIndex( "subdirs" ) == -1 && spitem->scope->tqparent()->variableValues( "TEMPLATE" ).tqfindIndex( "subdirs" ) == -1 ) + if( spitem->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) == -1 && spitem->scope->tqparent()->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) == -1 ) popup.setItemEnabled( idDisableSubproject, false ); popup.insertSeparator(); idProjectConfiguration = popup.insertItem( SmallIcon( "configure" ), i18n( "Scope Settings" ) ); @@ -1144,7 +1144,7 @@ void TrollProjectWidget::addFileToCurrentSubProject( GroupItem::GroupType gtype, GroupItem *gitem = 0; - if ( m_shownSubproject->groups.tqcontains( gtype ) ) + if ( m_shownSubproject->groups.contains( gtype ) ) gitem = m_shownSubproject->groups[ gtype ]; if ( !gitem ) @@ -1170,12 +1170,12 @@ void TrollProjectWidget::addFiles( TQStringList &files, bool relativeToProjectRo TQString fileName = *it; kdDebug(9024) << "Adding file:" << fileName << " " << relativeToProjectRoot << endl; - if ( m_shownSubproject->scope->variableValues( "TEMPLATE" ).tqfindIndex( "subdirs" ) != -1 && !fileName.endsWith(".pro") ) + if ( m_shownSubproject->scope->variableValues( "TEMPLATE" ).findIndex( "subdirs" ) != -1 && !fileName.endsWith(".pro") ) { ChooseSubprojectDlg dlg( this, false ); if ( dlg.exec() == TQDialog::Accepted ) { - if ( dlg.selectedSubproject() && dlg.selectedSubproject()->scope->variableValues("TEMPLATE").tqfindIndex( "subdirs" ) != -1 ) + if ( dlg.selectedSubproject() && dlg.selectedSubproject()->scope->variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { fileName = URLUtil::getRelativePath( dlg.selectedSubproject()->scope->projectDir() , TQDir::cleanDirPath( @@ -1213,7 +1213,7 @@ void TrollProjectWidget::addFiles( TQStringList &files, bool relativeToProjectRo kdDebug(9024) << "calc filename:" << noPathFileName << endl; // GroupItem *gitem = 0; // GroupItem::GroupType gtype = GroupItem::groupTypeForExtension( ext ); -// if ( m_shownSubproject->groups.tqcontains( gtype ) ) +// if ( m_shownSubproject->groups.contains( gtype ) ) // gitem = m_shownSubproject->groups[ gtype ]; @@ -1307,7 +1307,7 @@ void TrollProjectWidget::slotAddFiles() *proc << files[ i ]; *proc << cleanSubprojectDir; proc->start(KProcess::Block); - TQString filename = files[ i ].right( files[ i ].length() - files[ i ].tqfindRev( '/' ) - 1 ); + TQString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); // and add them to the filelist TQFile testExist( cleanSubprojectDir + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) @@ -1333,7 +1333,7 @@ void TrollProjectWidget::slotAddFiles() GroupItem* TrollProjectWidget::getInstallRoot( QMakeScopeItem* item ) { - if ( item->groups.tqcontains( GroupItem::InstallRoot ) ) + if ( item->groups.contains( GroupItem::InstallRoot ) ) return item->groups[ GroupItem::InstallRoot ]; return 0; } @@ -1651,7 +1651,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *it *proc << files[ i ]; *proc << cleanSubprojectPath; proc->start(KProcess::Block); - TQString filename = files[ i ].right( files[ i ].length() - files[ i ].tqfindRev( '/' ) - 1 ); + TQString filename = files[ i ].right( files[ i ].length() - files[ i ].findRev( '/' ) - 1 ); // and add them to the filelist TQFile testExist( cleanSubprojectPath + TQString( TQChar( TQDir::separator() ) ) + filename ); if ( testExist.exists() ) @@ -1776,7 +1776,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *it popup.tqsetWhatsThis( idUpdateWidgetclass, i18n( "<b>Edit ui-subclass</b><p>Launches <b>Subclassing</b> wizard " "and prompts to implement missing in childclass slots and functions." ) ); } - if ( fitem->text( 0 ).tqcontains( ".ui" ) ) + if ( fitem->text( 0 ).contains( ".ui" ) ) { idSubclassWidget = popup.insertItem( SmallIconSet( "qmake_subclass" ), i18n( "Subclassing Wizard..." ) ); popup.tqsetWhatsThis( idSubclassWidget, i18n( "<b>Subclass widget</b><p>Launches <b>Subclassing</b> wizard. " @@ -1827,9 +1827,9 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *it } else if ( r == idViewUIH ) { - kdDebug(9024) << "Opening:" << fitem->text(0) << ";" << fitem->text(0).tqreplace(".ui","") << endl; + kdDebug(9024) << "Opening:" << fitem->text(0) << ";" << fitem->text(0).replace(".ui","") << endl; m_part->partController() ->editDocument( KURL( m_shownSubproject->scope->projectDir() + TQChar( TQDir::separator() ) + - fitem->localFilePath.tqreplace(".ui","") + ".h" ) ); + fitem->localFilePath.replace(".ui","") + ".h" ) ); } else if ( r == idSubclassWidget ) @@ -1850,7 +1850,7 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *it list << DomUtil::Pair( srcfile_relpath, uifile_relpath ); DomUtil::writePairListEntry( dom, "/kdevtrollproject/subclassing", "subclass", "sourcefile", "uifile", list ); - // newFileNames[i] = newFileNames[i].tqreplace(TQRegExp(projectDirectory()+"/"),""); + // newFileNames[i] = newFileNames[i].replace(TQRegExp(projectDirectory()+"/"),""); qWarning( "new file: %s", newFileNames[ i ].latin1() ); } m_subclasslist = DomUtil::readPairListEntry( dom, "/kdevtrollproject/subclassing" , @@ -1862,11 +1862,11 @@ void TrollProjectWidget::slotDetailsContextMenu( KListView *, TQListViewItem *it else if ( r == idUpdateWidgetclass ) { TQString noext = fitem->text( 0 ); - if ( noext.tqfindRev( '.' ) > -1 ) - noext = noext.left( noext.tqfindRev( '.' ) ); + if ( noext.findRev( '.' ) > -1 ) + noext = noext.left( noext.findRev( '.' ) ); TQStringList dummy; TQString uifile = fitem->uiFileLink; - if ( uifile.tqfindRev( TQString( TQChar( TQDir::separator() ) ) ) > -1 ) + if ( uifile.findRev( TQString( TQChar( TQDir::separator() ) ) ) > -1 ) { TQStringList uisplit = TQStringList::split( TQString( TQChar( TQDir::separator() ) ), uifile ); uifile = uisplit[ uisplit.count() - 1 ]; @@ -2426,7 +2426,7 @@ void TrollProjectWidget::slotDisableSubproject( QMakeScopeItem* spitem ) m_filesCached = false; m_allFilesCache.clear(); - if( spitem->scope->variableValues("TEMPLATE").tqfindIndex("subdirs") != -1 ) + if( spitem->scope->variableValues("TEMPLATE").findIndex("subdirs") != -1 ) { TQStringList subdirs = spitem->scope->variableValues( "SUBDIRS" ); DisableSubprojectDlg dlg( subdirs ); @@ -2436,7 +2436,7 @@ void TrollProjectWidget::slotDisableSubproject( QMakeScopeItem* spitem ) TQListViewItem* item = spitem->firstChild(); while( item ) { - if( values.tqfindIndex( item->text(0) ) != -1 ) + if( values.findIndex( item->text(0) ) != -1 ) delete item; item = item->nextSibling(); } @@ -2543,5 +2543,5 @@ TQMap<TQString,TQString> TrollProjectWidget::qmakeEnvironment() const #include "trollprojectwidget.moc" -//kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on +//kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on |