Hello,
On 06/23/2015 05:08 PM, Alberto Mardegan wrote:
Hi,
On 23.06.2015 17:20, Frans Schreuder wrote:
> I would like to show the space available for downloading maps
in
> the OSMScout app. QStorageInfo::bytesAvailable() provides
exactly
> the information that I need, however when the application is
> confined, it returns the free space on "/" in stead of the
folder I
> specified which is "
> /home/phablet/.local/share/osmscout.fransschreuder/"
> Is there a way to get the space available as a normal user?
Just initialize the QStorageInfo object with the path to your
app's data:
QStorageInfo(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
http://doc.qt.io/qt-5/qstorageinfo.html#QStorageInfo-2
Ciao,
Alberto
>
That's exactly what I did, however it seems to be blocked by
AppArmor. When running "unconfined" it works fine with the right
path, without it it returns the free space of the "/" partition
|
signature.asc
Description: OpenPGP digital signature
--
Mailing list: https://launchpad.net/~ubuntu-phone
Post to : ubuntu-phone@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help : https://help.launchpad.net/ListHelp