<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin Pitt &#187; Qt</title>
	<atom:link href="http://www.piware.de/tag/qt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piware.de</link>
	<description>addicted to Ubuntu development</description>
	<lastBuildDate>Fri, 03 Feb 2012 07:03:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Interrogation with Apport hooks / Qt developer needed</title>
		<link>http://www.piware.de/2009/06/interrogation-with-apport-hooks-qt-developer-needed/</link>
		<comments>http://www.piware.de/2009/06/interrogation-with-apport-hooks-qt-developer-needed/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 14:04:01 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://martinpitt.wordpress.com/?p=85</guid>
		<description><![CDATA[So far, Apport package hooks were limited to collecting data from the local system. However, a lot of debugging recipes and standard bug triage ping pong involves asking the reporter further questions which need reponses from a human. This can range from a very simple information message box &#8220;Now, please plug in the camera which [...]]]></description>
			<content:encoded><![CDATA[<p>So far, <a href="https://wiki.ubuntu.com/Apport/DeveloperHowTo">Apport package hooks</a> were limited to collecting data from the local system. However, a lot of debugging recipes and standard bug triage ping pong involves asking the reporter further questions which need reponses from a human. This can range from a very simple information message box &#8220;Now, please plug in the camera which is not detected&#8221; until a complex decision tree based on the symptoms the user sees.</p>
<p>As <a href="https://wiki.ubuntu.com/DesktopTeam/Specs/Karmic/SymptomBasedBugReporting">discussed at UDS Barcelona</a>, Apport will grow this functionality in Karmic. A first preview is available in <a href="https://launchpad.net/~pitti/+archive/ppa">my PPA</a>. The GUI looks horrible, but the API for hooks won&#8217;t change any more, so you can now begin to develop your interactive hooks.</p>
<p>Example:</p>
<pre>
import apport.hookutils

def add_info(report, ui):
    apport.hookutils.attach_alsa(report)

    ui.information('Now playing test sound...')

    report['AplayOut'] = apport.hookutils.command_output(['aplay',
            '/usr/share/sounds/question.wav'])

    response = ui.yesno('Did you hear the sound?')
    if response == None: # user cancelled
        raise StopIteration
    report['SoundAudible'] = str(response)
</pre>
<p>Please see the <a href="http://bazaar.launchpad.net/%7Epitti/apport/interactive-hooks/annotate/head%3A/doc/package-hooks.txt">package-hooks.txt documentation</a> for details.</p>
<p>I implemented all currently existing UI functions (information, yes/no question, file selector, multiple choice dialog) for GTK and CLI, and all except the multiple choice dialog for Qt. Anyone willing to hack on an implementation of <code>ui_question_choice()</code> similar to what the <a href="http://bazaar.launchpad.net/%7Epitti/apport/interactive-hooks/annotate/head%3A/gtk/apport-gtk">GTK frontend</a> is doing?</p>
<p><strong>Update:</strong>I merged Richard Johnson&#8217;s branch (thanks!) and uploaded a new package into my PPA. apport-qt is now fully functional.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2009/06/interrogation-with-apport-hooks-qt-developer-needed/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

