[SailfishDevel] Update 1.0.3.8 changes LocalStorage location?

Mikael Hermansson mike at 7b4.se
Fri Jan 31 22:59:50 UTC 2014


Now we have a long thread with Jolla should have blablabla

whining about foo has no point and is just contra productive. And I personally not 
intrested as a developer see threads full with pointless/repeating discussions...

There probadly is places where Jolla has done it wrong but there also is in history 
where developers are lazy not reading documentations(like me) that breaks when 
stuff is upgraded.

Its natural that stuff breaks. Time to move on...

now can we instead be constructive and discuss what IS correct places to store data?

Now question is does those changes follow some Linux directory standards?

and where should the app config be stored?

correct?

~/.config/mycompany/myapp/...

Is for example below correct or wrong?

I have an AppInfo class that I use in my apps and share in QML

AppInfo::AppInfo(QString argv0) :
    QObject()
{
    QStringList path = 
QStandardPaths::standardLocations(QStandardPaths::ConfigLocation);
    config_path = path[0]+"/"+QFileInfo(argv0).baseName();
    app_name = QFileInfo(argv0).baseName().replace("harbour-", "");
    version = QString(VERSION);

    QDir dir(config_path);
    if (!dir.exists()){
        dir.mkdir(config_path);
        // FIXME failcheck
    }
}

foo = AppInfo("harbour-myapp")
 setRootConfig(....)

And when I use SQL Db:s in QML I do:

        /db/ = LocalStorage.openDatabaseSync("harbour-uradio", "1.0", 
"StorageDatabase", 100000);

Correct?

Regards

Mikael


On Friday 31 January 2014 23.02.09 Andreas Storbjörk wrote:
> Yes I know this now, but really, Harbour FAQ should have mentioned it.
> 
> A notification should have been sent out to app developers in advance
> that the following commit might cause problems:
> https://github.com/sailfish-sdk/libsailfishapp/commit/3febb7a2204cf13f01ab9e
> 9ff86a84afc9b137d7
> 
> 
> 
> Another issue that is not directly related to this, but maybe someone at
> Jolla reads this..
> 
> Harbour team has downgraded my app, SGAuth, down from v0.3-2 to v0.2-2
> without any notification. So on Jolla store the latest release is v0.2-2
> all of a sudden, but when I login to Harbour it shows v0.3-2 as the
> latest accepted version. And it has been more than 48 hours and still no
> reply from developer-care at ... is this common behaviour, changing version
> of the app without any notification?
> 
> On 31.1.2014 22:26, Andrey Kozhevnikov wrote:
> > probably you right, but system update cant check if you used empty
> > storage parameters in your app.
> > this situation should learn you write applications better from the
> > first lines of code :)
> > 
> > On 01.02.2014 02:24, Andreas Storbjörk wrote:
> >> I wasn't the only one who missed it in that case.. so it can't have
> >> been very obvious. And the system update should have take care of it
> >> anyhow.
> >> 
> >> On 31.1.2014 22:20, Andrey Kozhevnikov wrote:
> >>> i think it somewhere in local storage documentation you didnt read.
> >>> 
> >>> On 01.02.2014 02:18, Andreas Storbjörk wrote:
> >>>> There should have been a mention about this somewhere in the
> >>>> documentation from the beginning.
> >>>> Like when you create a new empty project, this is your .cpp:
> >>>> 
> >>>> int main(int argc, char *argv[])
> >>>> {
> >>>> 
> >>>>     // SailfishApp::main() will display "qml/template.qml", if you
> >>>> 
> >>>> need more
> >>>> 
> >>>>     // control over initialization, you can use:
> >>>>     //
> >>>>     //   - SailfishApp::application(int, char *[]) to get the
> >>>> 
> >>>> QGuiApplication *
> >>>> 
> >>>>     //   - SailfishApp::createView() to get a new QQuickView *
> >>>> 
> >>>> instance
> >>>> 
> >>>>     //   - SailfishApp::pathTo(QString) to get a QUrl to a resource
> >>>> 
> >>>> file
> >>>> 
> >>>>     //
> >>>>     // To display the view, call "show()" (will show fullscreen on
> >>>> 
> >>>> device).
> >>>> 
> >>>>     return SailfishApp::main(argc, argv);
> >>>> 
> >>>> }
> >>>> 
> >>>> Why wasn't there any mention of organizationName and
> >>>> organizationDomain here?
> >>>> 
> >>>> On 31.1.2014 22:02, Andrey Kozhevnikov wrote:
> >>>>> i mean: if you used appName and orgName before your app not affected.
> >>>>> 
> >>>>> On 01.02.2014 01:44, Stefan Brand wrote:
> >>>>>> Well, I just used the default sailfish app template from the SDK...
> >>>>>> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140131/7419a63c/attachment.html>


More information about the Devel mailing list