In order to spot errors when connecting signals with slots you can use the attached script and start amarok like this:
amarok -d --nofork 2>&1 | ./filter-connect-issues.py

Of course you could just use the following:
amarok -d --nofork 2>&1 | grep '^Object::conncet:'

But using the python script you get a notification about an error as it occurs and not just when you look at the shell and you still see the full shell output.

        -panzi
#!/usr/bin/env python

import pynotify, sys
pynotify.init('Amarok')

for line in sys.stdin:
        if line.startswith('Object::connect:'):
                n = pynotify.Notification('Warning', '<p>%s</p>' % line
                        .replace('&', '&amp;').replace('<', 
'&lt;').replace('>', '&gt;'),
                        icon='amarok')
                n.set_urgency(pynotify.URGENCY_CRITICAL)
                n.show()
        sys.stdout.write(line)
_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel

Reply via email to