Angus Leeming wrote:

> Jean-Marc Lasgouttes wrote:
>> Angus> Here you go. All works well here, with both Qt and with XForms.
>> 
>> It looks good. Just one question: why do you need trim below?
>> 
>> -    return result_path;
>> +    return trim(result_path);
> 
> If you press "Cancel"
>> I general, a file name can begn with a space, can't it?
> 
> It can? ... Yup, it can :)
> 
> If you press Cancel, you get an empty string, which I use as the test for
> whether to modify the widget in the Qt dialogs. They were (some of them
> were) converting the std::string to QString and then using
> QString::isNull() as the test and this test was failing. I guess that
> it'll work perfectly now that the QString is made at the very last
> instant, as the widget is altered.
> 
> I'll remove the trim().

I've done so and everything continues to work as I'd expect. Would you like
me to commit the patch?

-- 
Angus

Reply via email to