← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Filemanager and homePath()

 

For things that are not available from QML, I think Ubuntu team would
provide a common interface for most required stuff people need to use
in QML, like Qt provides static functions through Qt.<function>,
Ubuntu would provide among others:

  QString  Ubuntu.homePath()
  QString  Ubuntu.getEnv( QString var )
  QString  Ubuntu.readFileContent(QString filename)
  bool       Ubuntu.createFileFromContent(QString filename, QString content)


Regards,
Carlos


On 5/15/13, Günter Schwann <guenter.schwann@xxxxxxxxxxxxx> wrote:
> On 05/14/2013 10:16 PM, Daniel Holm wrote:
>> Hi all,
>>
>> I'm trying to figure out how to get the home dir of the user with QML,
>> and I can see that Ubuntu filemanager, the core app, has a variable
>> that it uses to get the home dir: homePath()
>>
>> I can't find anything else about it, and I can't use it in Music.
>>
>> Could someone please help me? This is a big show stopper for packaging.
>>
>
> Time to use some C++ ;)
> My (strong) advice anyway would be to use QML for the UI _only_ and
> Qt/C++ for the model (engine, core, logic whatever you name it).
> Using different languages will even help you to keep these separate.
>
> Cheers
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References