Page 1 of 1

extend the LoadFile parameter

Posted: Sun Feb 07, 2021 2:58 pm
by theadib
Hello Daniel,

I am author of that qJsonRPC plugin that has "open" function to open files.

Now a user has problems to open bundler ".out" files silently.

The problems is that the import dialogue has input for additional filelist filename.
But if that can not be changed that lead to potential errors on importing.

My idea is to extend the FileIOFilter::LoadParameters by additional QHash<QString, QVariant>.
In that way I could extend the functionality of the actual import function by passing additional parameter without changing the API.

What do you thing?

Regards, Adib.
--

Re: extend the LoadFile parameter

Posted: Sun Feb 07, 2021 8:06 pm
by daniel
Wouldn't it be better to have a custom 'BunderFilter::loadFile' method and call it directly?

Re: extend the LoadFile parameter

Posted: Fri Feb 19, 2021 11:36 pm
by theadib
there is this RPC "open" function with filename as parameter and some paramters to suppress the parameter dialog.

However some paramter should get some values from the caller (in the bundler it should be "lists.txt" filename)
If I have to decide that is the bundler::loadFile() function, then I have to decide and make the file extension magic in the plugin.
But the plugin does not have this parameter.

So I wanted a generic way to pass the parameter and use/bind as late as possible in the call hirarchy.

Regards, Adib.

Re: extend the LoadFile parameter

Posted: Sat Feb 20, 2021 5:41 pm
by daniel
Ok, in that case I guess you can extend the FileIOFilter::LoadParameters structure. I'll wait for the PR.