- independently of the config setting in drkonqirc propose debugging with KDevelop if a session is available
- default debugger is only displayed if ShowDebugButton=true in [DrKonqi]
- button is the first action button to be displayed
- fix adding/removing of the button to the button box
Details
- Reviewers
apol mwolff sitter - Group Reviewers
Plasma: Workspaces KDevelop - Commits
- R871:95b6b8b613c2: Show debug button when KDevelop session is running
- set ShowDebugButton=false, have no KDevelop session running
- force a crash (using src/tests/crashtest for instance)
- DrKonqi shows no debug button
- start a KDevelop session
- the button appears with the KDevelop session selectable
- quit DrKonqi, set ShowDebugButton=true
- crash again, the button now always is visible, including the default debugger as a selection
Diff Detail
- Repository
- R871 DrKonqi
- Branch
- nicebutton
- Lint
No Linters Available - Unit
No Unit Test Coverage
A few screenshots:
Before the patch:
- ShowDebugButton=false in drkonqirc
- ShowDebugButton=true in drkonqirc Note how the button is just floating.
After the patch:
- ShowDebugButton=false in drkonqirc, but with KDevelop running
addDebugger seems a bit much, no? Why don't you just have a m_debugButtonInBox member to track whether it is currently added or not? When it is already in the buttonBox running the for loop over the buttons is entirely unnecessary.
src/drkonqidialog.cpp | ||
---|---|---|
192 | CamelCase | |
195β196 | We always use curly braces for ifs in Plasma | |
251 | CamelCase Should be = false | |
253 | No single letter variables please. | |
264 | No single letter variables please. |
- Fix code style.
- Save state of the debug button in a member variable.
- Resize the dialog after inserting/removing the debug button.
Thanks for looking into this :D
Past self obviously still had to read the style guide and tried not to change header files.
I took your commit cc640cea as an example to resize the dialog after inserting or deleting the button.
Could you explain your thinking behind the adjustSize call please? The way I see it the window should scale up as necessary if the size hints are properly set (which they should be on master).
src/drkonqidialog.cpp | ||
---|---|---|
204 |
| |
211 | could probably just do away with this and merge the condition into the setEnabled call below. the variable doesn't seem to do much in the way of readability. |
- more style fixes
- do not adjustSize after adding the button, since that is redundant now
That's true, but only since your latest commits. Before, the text of the report button was cut off (in german for example) once the debug button got activated. I removed the call again.
Heh. Fair enough, I too ran down the wrong rabbit hole with the size issue until I noticed the policy was wrong.
Diff looks good now. Works very well too. π
Thanks for your review. It was the last in a series of patches and I'll try to advertise the whole "Debug your KDE application with KDevelop"-feature somewhere.