Bug 287093 - Dual Tool Views when Build and Version Control Tool Views are Both Present
Summary: Dual Tool Views when Build and Version Control Tool Views are Both Present
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 287493 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-20 19:27 UTC by David E. Narvaez
Modified: 2011-11-25 09:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David E. Narvaez 2011-11-20 19:27:07 UTC
Version:           git master (using KDE 4.7.3) 
OS:                Linux

When you are in the code area, and you have both build and version control tool views present, and one of them active, if you then switch to another area and return to the Code area, both the Build and Version Control tools are active/displayed.

Reproducible: Always

Steps to Reproduce:
Using a project with version control:

1. Update the project (Version Control tool view shows up)
2. Build the project (Build tool view shows up)
3. Change to another area (Review/Debug)
4. Switch back to Code area

Actual Results:  
Both Build and Version Control areas are activated/displayed (some times only one of them is raised but both of them are highlighted in the tool views).

Expected Results:  
One of the two (the one that was actually active before switching out of the code area) should be raised.

My only clue is that both of them are created at the StandardOutputView factory which actually creates 2 more views I haven't tried yet (to see if it affects all of the views created by that factory).
Comment 1 David E. Narvaez 2011-11-20 21:23:35 UTC
More info: the issue can be replicated with all of the views of the StandardOutputView (tested with Version Control, Build, Debug and Run). The issue is due to the fact that all of them are created with id org.kdevelop.OutputView[0] so the loop at void MainWindowPrivate::reconstruct()[1] finds all of those tool views with the same id as the tool view that was active before moving out of the Code area.

[0] https://projects.kde.org/projects/extragear/kdevelop/kdevplatform/repository/revisions/702a99b14ad1379d6564e3e624370fd63162bb13/entry/plugins/standardoutputview/standardoutputview.cpp#L70
[1] https://projects.kde.org/projects/extragear/kdevelop/kdevplatform/repository/revisions/4191e1d10f69c0ca6d78ecc86dfdf230524eb7a9/entry/sublime/mainwindow_p.cpp#L298
Comment 2 Milian Wolff 2011-11-23 22:29:06 UTC
Git commit ff2ac655c1371f31fbabaa0c7a33cec368844a26 by Milian Wolff.
Committed on 23/11/2011 at 23:21.
Pushed by mwolff into branch 'master'.

make StandardOutputView OutputViewFactory id's unique

TODO: Question is whether this is enough, considering that
the numerical ID is random depending on the order of which
plugins get loaded. So far I see no problem with it as we
apparently only show these views when the first OutputJob
runs.

BUG: 287093

M  +2    -1    plugins/standardoutputview/standardoutputview.cpp

http://commits.kde.org/kdevplatform/ff2ac655c1371f31fbabaa0c7a33cec368844a26
Comment 3 András Manţia 2011-11-25 09:52:57 UTC
*** Bug 287493 has been marked as a duplicate of this bug. ***