Chis your answers are clear as day, but I still can&#39;t get the filePath.to print out.<br><br>So this is what I have, pretty much verbatim of what you have:<br>MySlot(QString str)<br>{<br>&nbsp; QString filePath;<br>&nbsp; Solid::Device device(str);<br>
&nbsp; Solid::StorageAccess *storageAccess = <a href="http://device.as">device.as</a>&lt;Solid::StorageAccess&gt;();<br>&nbsp; if(storageAccess) {<br>&nbsp;&nbsp;&nbsp;&nbsp; if(!storageAccess-&gt;isAccessible()) { //device is plugged in but not mounted<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qDebug() &lt;&lt; &quot;Make accesible...&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; storageAccess-&gt;setup();<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; qDebug() &lt;&lt; &quot;File path is: &quot; &lt;&lt; storageAccess-&gt;filePath();<br>&nbsp;&nbsp;&nbsp;&nbsp; setupSelectedSlot(SetupDashBoardView::FileSettings);<br>
&nbsp; }<br><br>Here is the output form the command line when a usb is device is loaded (the results are the same on two computers)<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host_scsi_device_lun0&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host_scsi_device_lun0_scsi_generic&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/storage_serial_Kingston_DataTraveler_2_0_0000024774_0_0&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/volume_uuid_7062_BD74&quot;<br>Make accesible...<br>File path is:&nbsp; &quot;&quot;<br><br>As you can see setup() is called.&nbsp; <br><br><br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host_scsi_device_lun0&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/usb_device_951_1603_0000024774_if0_scsi_host_scsi_device_lun0_scsi_generic&quot;<br>Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/storage_serial_Kingston_DataTraveler_2_0_0000024774_0_0&quot;<br>
Device changed&nbsp; &quot;/org/freedesktop/Hal/devices/volume_uuid_7062_BD74&quot;<br>Make accesible...<br>File path is:&nbsp; &quot;&quot;<br><br>Could it be a timing issue. Or do you have any ideas<br><br>Regards<br>David<br><br>
<br><br><div class="gmail_quote">On Tue, Jun 10, 2008 at 7:10 PM, Christopher Blauvelt &lt;<a href="mailto:cblauvelt@gmail.com">cblauvelt@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br><br><div class="gmail_quote">On Tue, Jun 10, 2008 at 7:31 PM, David Boosalis &lt;<a href="mailto:david.boosalis@gmail.com" target="_blank">david.boosalis@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Chris.<br><br>The signal gets generated from a USB being plugged in.&nbsp; I use the following to connect the signal to the slog given:<br><br>&nbsp; connect(DeviceNotifier::instance(), <br>&nbsp;&nbsp;&nbsp; &nbsp; SIGNAL(deviceAdded(const QString &amp;)),<br>


&nbsp;&nbsp;&nbsp; &nbsp; this, <br>&nbsp;&nbsp;&nbsp; &nbsp; SLOT(slotSolidDeviceChanged(const QString &amp;)));<br>&nbsp; <br>&nbsp; connect(Solid::DeviceNotifier::instance(), <br>&nbsp;&nbsp;&nbsp; &nbsp; SIGNAL(deviceRemoved(const QString &amp;)),<br>&nbsp;&nbsp;&nbsp; &nbsp; this, <br>&nbsp;&nbsp;&nbsp; &nbsp; SLOT(slotSolidDeviceChanged(const QString &amp;)));<br>


<br>This was taken from the solid tutorial. Maybe I am getting an extraneous signal when I plug in the usb stick because the qDebug statement for filePath below prints nothing for hte filePath argument. I am using hte latest build of the depot for all my coding work.&nbsp; You mentioned something about StorgeAccess::setup(), I&#39;ll research this call, as I am not sure where to put it.<br>


<br></blockquote></div></div>filePath() gives you the path to where the device is *mounted*.&nbsp; The signal you&#39;re receiving is sent when the device is plugged in, regardless of whether it&#39;s mounted or not.&nbsp; If you plug in your USB device, and it&#39;s not mounted you catch the signal that a device was added but since it&#39;s not mounted filePath() will return QString().<br>

<br>Try this in your slot:<div class="Ih2E3d"><br>qDebug() &lt;&lt; &quot;Device changed &quot; &lt;&lt; str;<br>&nbsp; QString filePath;<br>&nbsp; Solid::Device device(str);<br></div>&nbsp; Solid::StorageAccess *accessStorage = <a href="http://device.as" target="_blank">device.as</a>&lt;Solid::StorageAccess&gt;();<br>

&nbsp; if(storageAccess) {<br>&nbsp;&nbsp;&nbsp;&nbsp; if(!storageAccess-&gt;isAccessible()) { //device is plugged in but not mounted<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; storageAccess-&gt;setup();<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; qDebug() &lt;&lt; &quot;File path is: &quot; &lt;&lt; storageAccess-&gt;filePath();<br>

&nbsp; }<br>
<br><br>
&gt;&gt; Visit <a href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to unsubscribe &lt;&lt;<br>
<br></blockquote></div><br>