[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 309114] New: template class assistant crashes when trying to add file which already exists
From:       micom <airells.mail () gmail ! com>
Date:       2012-10-27 20:55:31
Message-ID: bug-309114-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=309114

            Bug ID: 309114
          Severity: normal
           Version: git master
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: template class assistant crashes when trying to add
                    file which already exists
    Classification: Unclassified
                OS: Linux
          Reporter: airells.mail@gmail.com
          Hardware: Other
            Status: UNCONFIRMED
         Component: filemanager
           Product: kdevplatform

there is a bug in the file: templateclassassistance.cpp

 foreach (const KUrl& fileUrl, fileUrls)
    {
        foreach (ProjectBaseItem* item, project->itemsForUrl(fileUrl.upUrl()))
        {
            if (ProjectFolderItem* folder = item->folder())
            {
                fileItems << project->projectFileManager()->addFile(fileUrl,
folder);
                break;
            }
        }
    }

    project->buildSystemManager()->addFilesToTarget(fileItems, target);

This : project->projectFileManager()->addFile(fileUrl, folder);

can return 0x0,  we are adding it to the fileItem,
then call :f

unction:project->buildSystemManager()->addFilesToTarget(fileItems, target);

which does 

 QString fileName = files[i]->fileName();    

it ofcourse leads us to HELL! because file[i] is 0x0 . 


Manage it needs to change class design. I will not provide it because its too
fresh code. Maybe still under construction.


Reproducible: Always

Steps to Reproduce:
1. Add template named ASD
2. Add second template named ASD ( in the same directory)
3. HELL


Expected Results:  
not HELL,  Heaven.

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic