Bug 296415

Summary: JJ: Add a diagnostics dialog to the Help menu
Product: [Applications] amarok Reporter: Bart Cerneels <bart.cerneels>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: wishlist CC: andrzej, myriam
Priority: NOR    
Version: 2.5-git   
Target Milestone: 2.6   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 2.6
Sentry Crash Report:
Attachments: Screenshot of the Tomahawk diagnostics dialog.
Screenshot of initial solution

Description Bart Cerneels 2012-03-20 08:09:30 UTC
Created attachment 69750 [details]
Screenshot of the Tomahawk diagnostics dialog.

Tomahawk has a dialog in it's help menu that lists information useful for debugging user problems. This would include:
- Amarok version (released or git-describe string)
- kdelibs version (separate for any components in the future)
- Qt version
- Phonon version and versions of backends
- Phonon backend in use (VLC, gstreamer, ...)
- Installed scripts + version
- Installed plugins + version
- Running scripts
- Enabled plugins
Comment 1 Myriam Schweingruber 2012-03-20 09:18:51 UTC
Working on that, thanks Bart :)
Comment 2 Andrzej J. R. Hunt 2012-03-31 14:46:54 UTC
Created attachment 70038 [details]
Screenshot of initial solution

Hi, I've almost finished implementing a diagnostics dialog (Sorry, I never noticed it was being worked on until I'd finished). Screenshot is attached. I still need to check how I can get the Phonon Backend and actually implement the copy to clipboard button.

I'm using ScriptManager::scripts(key) to get a list of scripts. Internally this searches m_scripts for all the scripts with category key. However I want all the scripts, meaning I have to run scripts(key) three times, with 3 hardcoded parameters (a similar thing is done in ScriptsConfig to get all the scripts). Instead I think it would be more sensible to return the complete list of scripts. Should I add a parameterless scripts function returning all scripts, and modify the ScriptsConfig to use this as well? (We have exactly the same case with PluginManager.)

Finally a question specific to the dialog: is the way running scripts/plugins are shown in my preview ok, or would you prefer sorting into separate lists of running and non-running scripts (would be quite simple to do).
Comment 3 Myriam Schweingruber 2012-04-01 17:28:00 UTC
FWIW: thanks for the work, but please submit it to http://reviewboard.kde.org

As a general rule: working on Frree Software usually means talking to the team before starting things to avoid duplicate work, and of course, reading information beforehand. What did you not understand in the status ASSIGNED?
Comment 4 Bart Cerneels 2012-04-02 06:31:29 UTC
(In reply to comment #2)
> Created attachment 70038 [details]
> Screenshot of initial solution
> 
> Hi, I've almost finished implementing a diagnostics dialog (Sorry, I never
> noticed it was being worked on until I'd finished). Screenshot is attached.
> I still need to check how I can get the Phonon Backend and actually
> implement the copy to clipboard button.

The screenshot looks perfect, can't wait to see the code. One minor nitpick: we always spell Qt with the lower case t, we make jokes about apple QuickTime towards those who don't ;)

> 
> I'm using ScriptManager::scripts(key) to get a list of scripts. Internally
> this searches m_scripts for all the scripts with category key. However I
> want all the scripts, meaning I have to run scripts(key) three times, with 3
> hardcoded parameters (a similar thing is done in ScriptsConfig to get all
> the scripts). Instead I think it would be more sensible to return the
> complete list of scripts. Should I add a parameterless scripts function
> returning all scripts, and modify the ScriptsConfig to use this as well? (We
> have exactly the same case with PluginManager.)

I think that makes sense. If it works you could just use default argument QString() as special case to return all.

> 
> Finally a question specific to the dialog: is the way running
> scripts/plugins are shown in my preview ok, or would you prefer sorting into
> separate lists of running and non-running scripts (would be quite simple to
> do).

yup, separate the ones running and non running. I think this will help to quickly spot problematic scripts. And you should do the same for plugins, which are either enabled or disabled.
Comment 5 Myriam Schweingruber 2012-06-18 13:36:41 UTC
This is implemented now.