Bug 140253

Summary: QMake manager cannot delete subproject after subproject type change
Product: [Applications] kdevelop Reporter: Ivan Vasic <ivasic>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ivan Vasic 2007-01-18 16:27:02 UTC
Version:           3.3.94 (SVN r623776) (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

Minor bug with QMake manager again.

How to reproduce:

1. Create new QMake project (Qt4)
2. Add new subproject with type 'subdirectories' (let's call it Parent)
3. Add another subproject (any type) into newly created (let's call it Child)
4. Now change 'Parent' subproject type to library instead of subdirectories.
5. 'Child' subproject is still included and when you try to remove it KDevelop will show internal error message box.


If you need more info let me know.
Comment 1 Andreas Pakulat 2007-01-18 16:51:33 UTC
SVN commit 624977 by apaku:

Who said I wouldn't commit to 3.4 anymore :)
Make it possible to delete subprojects when the parent project was changed from subdirs to app/lib template
BUG:140253


 M  +1 -1      scope.cpp  


--- branches/kdevelop/3.4/buildtools/qmake/scope.cpp #624976:624977
@@ -639,7 +639,7 @@
     if ( it != m_root->m_children.end() )
     {
         QMake::AssignmentAST * tempast = static_cast<QMake::AssignmentAST*>( *it );
-        if ( tempast->values.findIndex( "subdirs" ) != -1 )
+        if ( tempast->values.findIndex( "subdirs" ) != -1 || findExistingVariable( "TEMPLATE" ) != m_root->m_children.end() )
         {
             Scope* project = m_scopes[ num ];
             if( !project )