Asserts in android-qt some proposal

Thomas Senyk thomas.senyk at nokia.com
Thu May 24 12:09:20 UTC 2012


If you use qrc:/  or :/
please be careful not not ruin the performance of "real" qresource accesses.

Quite some people (e.g. me) are willing the add some time to the start up time 
for having lightning fast file-access.

e.g. games will load a lot of resources (read: files) anyway because they'll 
need them eventually.

Greets
Thomas

On Wednesday, May 23, 2012 01:08:30 AM ext BogDan wrote:
> Hi,
> 
> 
>   I already tried your approach before I've made last changes to
> qandroidassertsfileenginehandler.cpp but it doesn't work in all cases (e.g.
> setting the following path to qml "assets:/main.qml" qt will change it to
> "/data/data/your.domain/assets:/main.qml"), so the easiest solution was to
> use qrc prefix ( "qrc:/" or ":/"). Anyway if you can do all the changes to
> allow "assets:/" usage, I'll be very happy to merge it! Please make sure
> that you'll test it properly !
> 
> 
> 
> Cheers,
> BogDan.
> 
> P.S. Please use the necessitas-devel mailing list to post proposals.
> 
> >Good day Bogdan.
> >I have some proposal to your great work on qt for android.
> > 
> >I saw you last commits to qandroidassertsfileenginehandler.cpp and have
> 
> some thoughts about them. In short my proposal is simple. How about to
> handle only specific scheme for asserts. In my case, I have many resources
> in app and current state of assets handler slow down application start time
> and work, so if try to check file in resources or on folder first, it may
> take a long time, slowing down app.
> 
> >But if use only specific scheme for assets, no need to find resource in
> 
> folder or in qrc.
> 
> >Something like that
> > 
> >QAbstractFileEngine * AndroidAssetsFileEngineHandler::create ( const
> 
> QString & fileName ) const
> 
> >{
> >    if(fileName.isEmpty())
> >        return 0;
> >    if
> 
> (!fileName.startsWith(QLatin1String("assets:/")))
> 
> >        return 0;
> >....
> > 
> >I hope my thoughts can help you in your great work.
> >Bye.
> 
> _______________________________________________
> Necessitas-devel mailing list
> Necessitas-devel at kde.org
> https://mail.kde.org/mailman/listinfo/necessitas-devel


More information about the Necessitas-devel mailing list