From kde-core-devel Tue Sep 15 09:46:08 2009 From: Kevin Ottens Date: Tue, 15 Sep 2009 09:46:08 +0000 To: kde-core-devel Subject: Re: Mountable devices support in KDE Message-Id: <200909151146.13510.ervin () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125300796231278 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1541755.l79pCIthpy" --nextPart1541755.l79pCIthpy Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Monday 14 September 2009 17:35:34 David Faure wrote: > Ah, but we can only recognize /dev/sdb1 if it's already mounted; otherwise > (if it's not mounted and it's not in fstab), how can we find out it's a > mountable device? Via Solid maybe? Kevin? ;) Hm, something like: QList list =3D Solid::Device::listFromQuery( "[ IS StorageAccess and Block.device =3D=3D '/dev/sdb1' ]"); if (list.isEmpty()) { // Whoops, /dev/sdb1 isn't available, or is not something we can mount } else { // Cool! We found the thing to mount! } Would work I think. Regards. =2D-=20 K=E9vin 'ervin' Ottens, http://ervin.ipsquad.net "Ni le ma=EEtre sans disciple, Ni le disciple sans ma=EEtre, Ne font reculer l'ignorance." --nextPart1541755.l79pCIthpy Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkqvYmUACgkQB0u7y43syeIirACdFdj9e6Xd00wLKlOHFHaGJwr/ QewAnAwVJ10TDUqKBiDu62NsfXdJuh89 =lTqr -----END PGP SIGNATURE----- --nextPart1541755.l79pCIthpy--