> On 30.12.2013 23:35, Israel wrote: >> I want it to access the XML file from a relative ~/.config/ >> so far it seems I can only hard code the location.. > Check out QStandardPaths: > http://qt-project.org/doc/qt-5.0/qtcore/qstandardpaths.html > > QStandardPaths::writableLocation with QStandardPaths::ConfigLocation > should give you the interesting path. > > Otherwise QDir::homePath() could be used, too. > > So yeah, you need some slim C++ for that. Hey Israel,
can you elaborate on what API you're using to read the XML? Are you using QML or C++? Most QML APIs don't actually cope with filenames. For instance LocalStorage takes strings which are stored under filenames based on the checksum internally. Similarly U1Db doesn't require paths by default. XMLListModel can take filenames but has no writing capability. If you use C++, QStandardPaths is indeed the way to go if you need a filename or implement a QML component. And this is actually used in several C++ components. I'm actually looking to write an overview of different storage methods inspired by this thread. The individual APIs are a bit scattered for somebody starting afresh. ciao, Christian
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