summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/qmakescopeitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/qmake/qmakescopeitem.cpp')
-rw-r--r--buildtools/qmake/qmakescopeitem.cpp69
1 files changed, 35 insertions, 34 deletions
diff --git a/buildtools/qmake/qmakescopeitem.cpp b/buildtools/qmake/qmakescopeitem.cpp
index 157b0894..c49bbe79 100644
--- a/buildtools/qmake/qmakescopeitem.cpp
+++ b/buildtools/qmake/qmakescopeitem.cpp
@@ -1,3 +1,4 @@
+
/***************************************************************************
* Copyright (C) 2006 by Andreas Pakulat *
* apaku@gmx.de *
@@ -43,7 +44,7 @@ qProjectItem::qProjectItem( Type type, qProjectItem *tqparent, const TQString &t
* Class GroupItem
*/
-GroupItem::GroupItem( TQListView *lv, GroupType type, const TQString &text, TQMakeScopeItem* spitem )
+GroupItem::GroupItem( TQListView *lv, GroupType type, const TQString &text, QMakeScopeItem* spitem )
: qProjectItem( Group, lv, text )
{
this->owner = spitem;
@@ -302,10 +303,10 @@ FileItem::FileItem( TQListView *lv, const TQString &text )
/*
- * Class TQMakeScopeItem
+ * Class QMakeScopeItem
*/
-TQMakeScopeItem::TQMakeScopeItem( TQListView *tqparent, const TQString &text, Scope* s, TrollProjectWidget* widget )
+QMakeScopeItem::QMakeScopeItem( TQListView *tqparent, const TQString &text, Scope* s, TrollProjectWidget* widget )
: qProjectItem( Subproject, tqparent, text ), scope( s ), m_widget( widget )
{
// configuration.m_template = TQTMP_APPLICATION;
@@ -313,13 +314,13 @@ TQMakeScopeItem::TQMakeScopeItem( TQListView *tqparent, const TQString &text, Sc
}
-TQMakeScopeItem::TQMakeScopeItem( TQMakeScopeItem *tqparent, const TQString &text, Scope* s )
+QMakeScopeItem::QMakeScopeItem( QMakeScopeItem *tqparent, const TQString &text, Scope* s )
: qProjectItem( Subproject, tqparent, text ), scope( s ), m_widget( tqparent->m_widget )
{
init();
}
-TQMakeScopeItem::~TQMakeScopeItem()
+QMakeScopeItem::~QMakeScopeItem()
{
TQMap<GroupItem::GroupType, GroupItem*>::iterator it;
for ( it = groups.begin() ; it != groups.end() ; ++it )
@@ -331,7 +332,7 @@ TQMakeScopeItem::~TQMakeScopeItem()
}
-TQString TQMakeScopeItem::relativePath()
+TQString QMakeScopeItem::relativePath()
{
if( !scope || !scope->tqparent() )
return "";
@@ -345,19 +346,19 @@ TQString TQMakeScopeItem::relativePath()
return URLUtil::getRelativePath( m_widget->projectDirectory(), scope->projectDir() );
}
}else
- return static_cast<TQMakeScopeItem*>( tqparent() ) ->relativePath();
+ return static_cast<QMakeScopeItem*>( tqparent() ) ->relativePath();
// if( !scope->tqparent() )
// return "";
// else if ( !scope->tqparent()->tqparent() || scope->scopeType() != Scope::ProjectScope )
// return scope->scopeName();
// else if ( scope->scopeType() == Scope::ProjectScope )
-// return ( static_cast<TQMakeScopeItem*>( tqparent() ) ->relativePath()
+// return ( static_cast<QMakeScopeItem*>( tqparent() ) ->relativePath()
// + TQString( TQChar( TQDir::separator() ) ) + scope->scopeName() );
// else
-// return ( static_cast<TQMakeScopeItem*>( tqparent() ) ->relativePath() );
+// return ( static_cast<QMakeScopeItem*>( tqparent() ) ->relativePath() );
}
-TQString TQMakeScopeItem::getSharedLibAddObject( TQString basePath )
+TQString QMakeScopeItem::getSharedLibAddObject( TQString basePath )
{
if ( scope->variableValues( "CONFIG" ).tqfindIndex( "dll" ) != -1 )
{
@@ -392,7 +393,7 @@ TQString TQMakeScopeItem::getSharedLibAddObject( TQString basePath )
return "";
}
-TQString TQMakeScopeItem::getApplicationObject( TQString basePath )
+TQString QMakeScopeItem::getApplicationObject( TQString basePath )
{
TQString tmpPath = URLUtil::getRelativePath(basePath, scope->projectDir() );
TQString destdir = scope->resolveVariables( scope->variableValues( "DESTDIR" ).front() );
@@ -419,7 +420,7 @@ TQString TQMakeScopeItem::getApplicationObject( TQString basePath )
return tmpPath + TQString( TQChar( TQDir::separator() ) ) + target;
}
-TQString TQMakeScopeItem::getLibAddObject( TQString basePath )
+TQString QMakeScopeItem::getLibAddObject( TQString basePath )
{
if ( scope->variableValues( "CONFIG" ).tqfindIndex( "dll" ) != -1 )
{
@@ -469,7 +470,7 @@ TQString TQMakeScopeItem::getLibAddObject( TQString basePath )
return ( "" );
}
-TQString TQMakeScopeItem::getLibAddPath( TQString basePath )
+TQString QMakeScopeItem::getLibAddPath( TQString basePath )
{
//PATH only add if shared lib
@@ -495,7 +496,7 @@ TQString TQMakeScopeItem::getLibAddPath( TQString basePath )
}
-TQString TQMakeScopeItem::getIncAddPath( TQString basePath )
+TQString QMakeScopeItem::getIncAddPath( TQString basePath )
{
TQString tmpPath = URLUtil::getRelativePath( basePath, scope->projectDir() );
tmpPath = TQDir::cleanDirPath( tmpPath );
@@ -503,7 +504,7 @@ TQString TQMakeScopeItem::getIncAddPath( TQString basePath )
return ( tmpPath );
}
-void TQMakeScopeItem::buildSubTree()
+void QMakeScopeItem::buildSubTree()
{
TQValueList<Scope*>::const_iterator it;
@@ -514,14 +515,14 @@ void TQMakeScopeItem::buildSubTree()
for ( it = scopes.begin(); it != scopes.end(); ++it )
{
if( (*it)->scopeType() != Scope::InvalidScope )
- new TQMakeScopeItem( this, ( *it )->scopeName(), ( *it ) );
+ new QMakeScopeItem( this, ( *it )->scopeName(), ( *it ) );
else
- kdDebug( 9024 ) << "No TQMakeScopeItem created" << endl;
+ kdDebug( 9024 ) << "No QMakeScopeItem created" << endl;
}
}
-void TQMakeScopeItem::init()
+void QMakeScopeItem::init()
{
if ( scope->scopeType() == Scope::SimpleScope )
{
@@ -565,14 +566,14 @@ void TQMakeScopeItem::init()
}
}
-GroupItem* TQMakeScopeItem::createGroupItem( GroupItem::GroupType type, const TQString& label, TQMakeScopeItem* 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* TQMakeScopeItem::createFileItem( const TQString& name )
+FileItem* QMakeScopeItem::createFileItem( const TQString& name )
{
TQString display = name;
if( m_widget->showFilenamesOnly() )
@@ -593,7 +594,7 @@ FileItem* TQMakeScopeItem::createFileItem( const TQString& name )
return fitem;
}
-void TQMakeScopeItem::buildGroups()
+void QMakeScopeItem::buildGroups()
{
if( scope->variableValues("TEMPLATE").tqfindIndex("subdirs") != -1 )
return;
@@ -720,7 +721,7 @@ void TQMakeScopeItem::buildGroups()
}
-void TQMakeScopeItem::removeValues( const TQString& var, const TQStringList& values )
+void QMakeScopeItem::removeValues( const TQString& var, const TQStringList& values )
{
for( TQStringList::const_iterator it = values.begin() ; it != values.end(); ++it )
{
@@ -728,7 +729,7 @@ void TQMakeScopeItem::removeValues( const TQString& var, const TQStringList& val
}
}
-void TQMakeScopeItem::addValues( const TQString& var, const TQStringList& values )
+void QMakeScopeItem::addValues( const TQString& var, const TQStringList& values )
{
for( TQStringList::const_iterator it = values.begin() ; it != values.end(); ++it )
{
@@ -736,7 +737,7 @@ void TQMakeScopeItem::addValues( const TQString& var, const TQStringList& values
}
}
-void TQMakeScopeItem::removeValue( const TQString& var, const TQString& value )
+void QMakeScopeItem::removeValue( const TQString& var, const TQString& value )
{
if( scope->scopeType() != Scope::IncludeScope && scope->variableValues( var ).tqfindIndex( value ) != -1 )
{
@@ -755,7 +756,7 @@ void TQMakeScopeItem::removeValue( const TQString& var, const TQString& value )
}
}
-void TQMakeScopeItem::addValue( const TQString& var, const TQString& value )
+void QMakeScopeItem::addValue( const TQString& var, const TQString& value )
{
if( scope->scopeType() != Scope::IncludeScope && scope->variableValues( var ).tqfindIndex( value ) == -1 )
{
@@ -769,7 +770,7 @@ void TQMakeScopeItem::addValue( const TQString& var, const TQString& value )
}
}
-void TQMakeScopeItem::updateValues( const TQString& var, const TQStringList& values )
+void QMakeScopeItem::updateValues( const TQString& var, const TQStringList& values )
{
TQStringList curValues = scope->variableValues( var, (scope->scopeType() != Scope::IncludeScope) );
TQStringList scopeValues = scope->variableValuesForOp( var, "+=" );
@@ -802,18 +803,18 @@ void TQMakeScopeItem::updateValues( const TQString& var, const TQStringList& val
// kdDebug(9024) << "---------------------------------------" << endl;
}
-TQMakeScopeItem* TQMakeScopeItem::projectFileItem()
+QMakeScopeItem* QMakeScopeItem::projectFileItem()
{
if( scope->scopeType() != Scope::ProjectScope )
{
- TQMakeScopeItem* tqparentitem = dynamic_cast<TQMakeScopeItem*>(tqparent());
+ QMakeScopeItem* tqparentitem = dynamic_cast<QMakeScopeItem*>(tqparent());
if( tqparentitem )
return tqparentitem->projectFileItem();
}
return this;
}
-void TQMakeScopeItem::reloadProject()
+void QMakeScopeItem::reloadProject()
{
kdDebug(9024) << "Reloading Project" << endl;
TQListViewItem* item = firstChild();
@@ -837,7 +838,7 @@ void TQMakeScopeItem::reloadProject()
init();
}
-void TQMakeScopeItem::disableSubprojects( const TQStringList& dirs )
+void QMakeScopeItem::disableSubprojects( const TQStringList& dirs )
{
TQStringList::const_iterator it = dirs.begin();
for( ; it != dirs.end() ; ++it)
@@ -849,7 +850,7 @@ void TQMakeScopeItem::disableSubprojects( const TQStringList& dirs )
return;
else
{
- TQMakeScopeItem* newitem = new TQMakeScopeItem( this, s->scopeName(), s );
+ QMakeScopeItem* newitem = new QMakeScopeItem( this, s->scopeName(), s );
TQListViewItem* lastitem = firstChild();
while( lastitem && lastitem->nextSibling() )
lastitem = lastitem->nextSibling();
@@ -861,9 +862,9 @@ void TQMakeScopeItem::disableSubprojects( const TQStringList& dirs )
}
-int TQMakeScopeItem::compare( TQListViewItem* i, int , bool ) const
+int QMakeScopeItem::compare( TQListViewItem* i, int , bool ) const
{
- TQMakeScopeItem* other = dynamic_cast<TQMakeScopeItem*>(i);
+ QMakeScopeItem* other = dynamic_cast<QMakeScopeItem*>(i);
if( !i )
return -1;
if( other->scope->getNum() < scope->getNum() )
@@ -874,7 +875,7 @@ int TQMakeScopeItem::compare( TQListViewItem* i, int , bool ) const
return 0;
}
-TQMap<TQString, TQString> TQMakeScopeItem::getLibInfos( TQString basePath )
+TQMap<TQString, TQString> QMakeScopeItem::getLibInfos( TQString basePath )
{
TQMap<TQString, TQString> result;