Registered Member
|
Hi,
I would like to know if there is a way to remove the assistant popup tooltip? I can see errors with the toolview for parser errors and it seems that the only way would be to disable background parsing altogether? EDIT: I am using kdevelop appimage 5.1.2 on ubuntu 16.04 Thanks |
Global Moderator
|
You mean the popup asking you to e.g. insert an include or pick a different variable name? No, that cannot be turned off. Maybe we can figure out why it annoys you, and fix that?
I'm working on the KDevelop IDE.
|
Registered Member
|
Well the tooltips show no matter where my mouse is on the editor screen of KDevelop. The message shows even if the error is untrue.
Here's one of the tooltip popup errors that appears on every line i put my mouse cursor on. |
Global Moderator
|
Then something else is broken. The messages come from a compiler, if it is passed the right settings, they are not wrong.
Which build system do you use? If not cmake/qmake, did you setup your include paths correctly?
I'm working on the KDevelop IDE.
|
Registered Member
|
I did not setup any include paths. I am using kdevelop appimage 5.1.2 on ubuntu 16.04
Here are my versions of cmake, g++ and gdb:
|
Global Moderator
|
But does your project use cmake? And did you open it using the CMake project manager?
I'm working on the KDevelop IDE.
|
Registered Member
|
yes, i do have cmake installed. I never used the CMake project manager because i always opened a new project using Project > New From Template > Standard > Terminal. Other than that i may be confused about what you're talking about. Thanks |
Global Moderator
|
Hm, then you should be using the cmake manager. I'm not sure what's wrong. Do any missing includes show up in the problems toolview at the bottom? Can you maybe screenshot the whole document, not just the popup?
I'm working on the KDevelop IDE.
|
Registered Member
|
I've reinstalled my OS because I was at a point where i could build the code but i couldn't execute it because of this message: (error : ** Failure: /media/1304929a/prog/N6/ has failed to start ***)
Now that i have reinstalled my OS and g++-5 i still have the previous errors: (almost every line in my fonctions.hpp has a squiggly green line with the same popup error) and here is my main(), (fonctions.hpp and affichage.hpp do not have any #includes) #include <iostream> #include <cstring> #include <cctype> #include <iomanip> #include <cmath> #include "fonctions.hpp" #include "affichage.hpp" int main () { menuPrincipal(); std::wcout << L"Programme principal quitté" << std::endl; return 0; } |
Global Moderator
|
The underlines are at weird places, looks like the ranges are screwed up. That's a bug. However, if you actually fix the reason for the warning, they will probably go away ... your expression results are unused and there is no apparent reason to compute them.
I'm working on the KDevelop IDE.
|
Registered Member
|
Are you talking about ranges in my code or in kdevelop? And I don't understand the warnings, almost all lines of my fonctions.hpp are underlined with the squiggly green lines but I use all of my fonctions in fonctions.hpp in my affichage.hpp file. I've actually opened the same code in code::blocks and everything works fine with no errors. If you are aware of any way I could disable the squiggly green lines or the popup tooltip giving the errors, it would greatly be appreciated. (or any way of changing the source code in kdevelop) thanks |
Global Moderator
|
Your code does stuff like
if ( foo ) (a++) + (b++) else if(...) That makes no sense. I line 2, you compute (a++) + (b++) but you do not use the result for anything. That's why KDevelop warns you that you compute a value but discard the result. Code::blocks probably doesn't do that check. Our application is still buggy because the range it indicates for the error is wrong, but if you fix your code, the underlines will go away as well.
I'm working on the KDevelop IDE.
|
Registered Member
|
I also got very annoyed by the tooltips, and spent some time to disable it by modifying source code. Here is what I did in case someone else need it.
# apt source kdevplatform # cd kdevplatform-5.1.2 # vim ./plugins/contextbrowser/contextbrowser.cpp *** look for the below lines and insert a "return nullptr" like the position below. TopDUContext* topContext = DUChainUtils::standardContextForUrl(view->document()->url()); if (topContext) { + return nullptr; // first pass: find problems under the cursor const auto problems = findProblemsUnderCursor(topContext, position); # debuild -i -us -uc -b # dpkg -i ../*.deb |
Registered Member
|
A better fix that still allows tooltips when hovering over items but rids tooltips when hovering over empty space is this:
diff --git a/plugins/contextbrowser/contextbrowser.cpp b/plugins/contextbrowser/contextbrowser.cpp index ad0c0e28b0..25275d8523 100644 --- a/plugins/contextbrowser/contextbrowser.cpp +++ b/plugins/contextbrowser/contextbrowser.cpp @@ -593,6 +593,9 @@ QWidget* ContextBrowserPlugin::navigationWidgetForPosition(KTextEditor::View* vi // first pass: find problems under the cursor const auto problems = findProblemsUnderCursor(topContext, position, itemRange); if (!problems.isEmpty()) { + return nullptr; + if (problems == m_currentToolTipProblems && m_currentToolTip) { return nullptr; } @@ -628,6 +631,9 @@ QWidget* ContextBrowserPlugin::navigationWidgetForPosition(KTextEditor::View* vi // second pass: find closest problem to the cursor const auto problems = findProblemsCloseToCursor(topContext, position, view, itemRange); if (!problems.isEmpty()) { + return nullptr; + if (problems == m_currentToolTipProblems && m_currentToolTip) { return nullptr; } |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]