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

            Bug ID: 427481
           Summary: Quick Open plugin does not support nested project
                    directories
           Product: kdevelop
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: UI: QuickOpen
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Quick Open plugin assumes that a given path can belong to a single project. See
struct ProjectFile in
https://commits.kde.org/kdevelop?path=plugins/quickopen/projectfilequickopen.h.
When a file belongs to multiple open projects, closing one of the projects
removes the file from Quick Open file list.

STEPS TO REPRODUCE
1. Open a project that has a subdirectory with a CMakeLists.txt file in it.
2. Check that a file in the aforementioned subdirectory can be opened via Quick
Open search.
3. Open the aforementioned project's subdirectory as another project.
4. Check that the file from step 2 can still be opened via Quick Open search.
5. Close the subdirectory project.
6. Check if the file from step 4 can still be opened via Quick Open search.

OBSERVED RESULT
The file is no longer available in Quick Open list.

EXPECTED RESULT
The file is still available in Quick Open list.

ADDITIONAL INFORMATION
First of all: is there a use case for nested project directories? And should
KDevelop support file paths that belong to multiple open projects?

If this should be supported, a possible fix is to store a QVector projectPaths
in the ProjectFile struct. In ProjectFileDataProvider::fileRemovedFromSet(): if
the file to be removed has projectPaths.size() > 1, simply remove the project
path of the ProjectFileItem from projectPaths; if projectPaths.size() == 1,
remove the entire ProjectFile.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to