This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Remove tooltip assistant popups in KDevelop.appimage

Tags: None
(comma "," separated)
jnnmllr
Registered Member
Posts
7
Karma
0
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 :)
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
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.
jnnmllr
Registered Member
Posts
7
Karma
0
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.

Image
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
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.
jnnmllr
Registered Member
Posts
7
Karma
0
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:
Code: Select all
cmake --version
cmake version 3.9.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).

Code: Select all
g++ --version
g++ (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Code: Select all
gdb --version
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
But does your project use cmake? And did you open it using the CMake project manager?


I'm working on the KDevelop IDE.
jnnmllr
Registered Member
Posts
7
Karma
0
scummos wrote:But does your project use cmake? And did you open it using the CMake project manager?

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 :)
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
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.
jnnmllr
Registered Member
Posts
7
Karma
0
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)

Image

Image

Image

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;
}
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
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.
jnnmllr
Registered Member
Posts
7
Karma
0
scummos wrote: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.

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
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
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.
yifengsun
Registered Member
Posts
1
Karma
0
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
dbien
Registered Member
Posts
1
Karma
0
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;
}


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]