[Development] QStandardPath search paths

Alan Alpert 416365416c at gmail.com
Wed Jul 31 20:48:29 CEST 2013


On Wed, Jul 31, 2013 at 11:23 AM, Thiago Macieira
<thiago.macieira at intel.com> wrote:
> On quarta-feira, 31 de julho de 2013 11:18:38, Alan Alpert wrote:
>> On Wed, Jul 31, 2013 at 11:13 AM, Thiago Macieira
>>
>> <thiago.macieira at intel.com> wrote:
>> > On quarta-feira, 31 de julho de 2013 11:05:56, Alan Alpert wrote:
>> >> Search paths make "asset:/main.qml" work on all platforms. I don't see
>> >> how QStandardPaths::locate would work here other than
>> >>
>> >> #ifndef Q_OS_ANDROID
>> >> QStandardPaths::locate(AssetPath, "main.qml");
>> >> #else
>> >> "asset:/main.qml";
>> >> #endif
>> >
>> > Why can't QStandardPaths::locate return "asset:/main.qml" ?
>>
>> Because it's not a proper filepath. Or does not not matter so long as
>> we maintain the VFS characteristics which allow QFile/QDir to pretend
>> it is?
>
> It's a file engine. File engines are bad. No one disputes that (yet we added
> another one).
>
> If QFile can open it, what's wrong with returning it, though?

I suppose that would work then. The goal is just that there's one line
for asset loading which does not need #ifdefs cross-platform, sounds
like we could make that work... until we kill off file engines of
course :P .

--
Alan Alpert



More information about the Development mailing list