← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Filemanager and homePath()

 

Hi all,

Thank you guys for your help.

I tried using this instead
import org.nemomobile.folderlistmodel 1.0 (used in filemanager)
of this
import Qt.labs.folderlistmodel 1.0 (used in Music)

homePath() is usable and works in the first of them, but not in the one I'm currently using, so I have to move away from it. However, I seem to be unable to find any documentation about it, and the current FolderListModel I'm using doesn't not work together with the nemomobile one.

I also agree with Carlos. It would be very helpful if Canonical could create these more needed variables to be usable without any C++ knowledge. It is, for me at least, much harder and I don't even know how the header and source file works. Nor am I even slightly interested. This might seem a bit ignorant, but I'm a user of PHP and Python - I don't want to compile stuff. At least not my own.

Again, thanks.

Vänlig hälsning / Yours sincerely,
 Daniel Holm
 IT Consultant
 Web Developer
 Student
 d.holmen@xxxxxxxxx
 http://www.danielholm.se

Den ons 15 maj 2013 19:38:24 skrev Carlos Jose Mazieri:
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




References