[Bug 75936] Only show classes of active target/dir in classtree

Jeroen Dierckx JeDi at linux.be
Thu Mar 25 19:43:09 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=75936      




------- Additional Comments From JeDi linux be  2004-03-25 19:45 -------
I experimented a bit (but I'm not very familiar with the kdevelop framework, so I'm not sure if I'm doing this the right way) with the code, and (for me) my classview now only shows the classes of the active directory.
I've only added this for the qmake manager, but other managers should be similar.

Things I've added/changed:

- In kdevproject.h (in lib/interfaces), I've added a signal: void activeDirectoryChanged();

- In trollprojectpart.h (in buildtools/qmake), I've added a slot: void slotActiveDirectoryChanged();
- In trollprojectpart.cpp (in buildtools/qmake), I've implemented the slot: it just calls "emit activeDirectoryChanged();".

- In trollprojectwidget.cpp (in buildtools/qmake), I've added the following code to the TrollProjectWidget::slotOverviewSelectionChanged(QListViewItem *item) function (after the other commands):
    m_part->slotActiveDirectoryChanged();

- In classviewwidget.cpp (in parts/classview), I've added the following code to the insertFile( const QString& fileName ) function (after the first if-test):
    QString activePath = m_part->project()->activeDirectory();
    QString relFile = m_part->project()->relativeProjectFile(fileName);
    if(!relFile.startsWith(activePath))
      return;

The choice to only show the classes of the active target should probably an option...

Hope this feature will be in kdevelop soon...

Greetz,
JeDi




More information about the KDevelop-devel mailing list