Changeset View
Standalone View
plugins/manpage/manpageplugin.cpp
Show All 12 Lines | 1 | /* This file is part of KDevelop | |||
---|---|---|---|---|---|
13 | Library General Public License for more details. | 13 | Library General Public License for more details. | ||
14 | 14 | | |||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License | ||
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to | ||
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | 18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "config-kdevelop.h" | ||||
21 | #include "manpageplugin.h" | 22 | #include "manpageplugin.h" | ||
22 | 23 | | |||
23 | #include "manpagedocumentation.h" | 24 | #include "manpagedocumentation.h" | ||
24 | #include "manpagemodel.h" | 25 | #include "manpagemodel.h" | ||
25 | 26 | | |||
26 | #include <interfaces/idocumentation.h> | 27 | #include <interfaces/idocumentation.h> | ||
27 | #include <interfaces/icore.h> | 28 | #include <interfaces/icore.h> | ||
28 | #include <interfaces/iprojectcontroller.h> | 29 | #include <interfaces/iprojectcontroller.h> | ||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 88 | if (declarationLanguage != cppLanguage && declarationLanguage != clangLanguage) | |||
88 | return {}; | 89 | return {}; | ||
89 | 90 | | |||
90 | // Don't show man-page documentation for files that are part of our project | 91 | // Don't show man-page documentation for files that are part of our project | ||
91 | if (core()->projectController()->findProjectForUrl(dec->topContext()->url().toUrl())) | 92 | if (core()->projectController()->findProjectForUrl(dec->topContext()->url().toUrl())) | ||
92 | return {}; | 93 | return {}; | ||
93 | 94 | | |||
94 | // Don't show man-page documentation for files that are not in /usr/include, because then we | 95 | // Don't show man-page documentation for files that are not in /usr/include, because then we | ||
95 | // most probably will be confusing the global function-name with a local one | 96 | // most probably will be confusing the global function-name with a local one | ||
96 | if (!dec->topContext()->url().str().startsWith(QLatin1String("/usr/"))) | 97 | if (!dec->topContext()->url().str().startsWith(QLatin1String("/usr/")) | ||
98 | && !dec->topContext()->url().str().startsWith(QLatin1String(KDEVELOP_INSTALL_PREFIX))) | ||||
kfunk: I wonder if we just want to remove that complete if-branch altogether... Not entirely sure what… | |||||
commit 194b97e1d14681d2470193beb746819a38e3ecee Author: David nolden <david.nolden.kde@art-master.de> Date: Thu Feb 3 11:39:24 2011 +0100 - Don't show manpage documentation for declarations that are not in /usr/ - Don't show manpage documentation for declarations that are in the current project It was very annoying to see manpage documentation just because the function-name accidentally matches something that has a manpage (for example "test") it sounds like a major cause for annoyance, but I agree that the current workaround might be a bit too much? but then again, why should we un-ignore stuff in the KDEVELOP_INSTALL_PREFIX?! mwolff: ```
commit 194b97e1d14681d2470193beb746819a38e3ecee
Author: David nolden <david.nolden.kde@art… | |||||
This extends David's logic to the situation where you have an entire parallel install in KDEVELOP_INSTALL_PREFIX, and thus a potentially large number of duplicate (or newer versions of) manpages in there. The manpage plugin is mostly an annoyance to me so I can drop this hunk (I usually turn the plugin off). I've been thinking lately that KDevelop c/should just interface with khelpcentre to handle manpage display (and probably only care about sections 2 and 3*). rjvbb: This extends David's logic to the situation where you have an entire parallel install in… | |||||
yes, let's drop this hunk (and then also the change to config-kdevelop.h.cmake mwolff: yes, let's drop this hunk (and then also the change to config-kdevelop.h.cmake
since it… | |||||
97 | return {}; | 99 | return {}; | ||
98 | 100 | | |||
99 | ///@todo Do more verification to make sure that we're showing the correct documentation for the declaration | 101 | ///@todo Do more verification to make sure that we're showing the correct documentation for the declaration | ||
100 | 102 | | |||
101 | QString identifier; | 103 | QString identifier; | ||
102 | IDocumentation::Ptr result; | 104 | IDocumentation::Ptr result; | ||
103 | 105 | | |||
104 | // First, try to find help for qualified identifier like 'std::vector' | 106 | // First, try to find help for qualified identifier like 'std::vector' | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |
I wonder if we just want to remove that complete if-branch altogether... Not entirely sure what it is trying to work-around.