Re: [Development] Adding CPD support to Qt print dialog

2022-10-17 Thread G G
I have added CPDB support to the print dialog, and opened a pull request
here: https://codereview.qt-project.org/c/qt/qtbase/+/437301. It would be
great if anyone is able to review it.

To build qt with CPDB support, make sure you have CPDB frontend library:
https://github.com/openprinting/cpdb-libs and CPDB CUPS backend:
https://github.com/openprinting/cpdb-backend-cups installed. Their debian
packages are outdated, since I had to make some one time changes and
improvements to CPDB while adding support to the GTK and Qt print dialog.
Once you have both of them installed, the "configure" command should
automatically pick up on the CPDB backend and prefer it over the CUPS
backend.

For now, I have used "#if QT_CONFIG(cpdb) ... #endif"  constructs in the
UNIX print backend, and also added a CPDB Job widget, which shares the same
UI as CUPS Job widget but different implementation.

Thanks,
Gaurav


On Fri, Sep 16, 2022 at 3:50 AM Gaurav Guleria 
wrote:

> Hello all,
>
> I am Gaurav Guleria, a GSoC student, working with Till Kamppeter to add
> and improve Common Print Dialog (CPD) support to existing print dialogs
> like GTK and Qt. More about CPD can be read here:
> https://openprinting.github.io/projects/04-print-dialog/.
>
> I wanted to ask about your opinions on the implementation and the way we
> should proceed with it. I talked with a few people and read this old
> article here: https://wiki.qt.io/Qt-5-QtPrint, which suggests the Qt
> team prefers CPD support as a plugin rather than a direct integration
> into the QPrintDialog.
>
> Just to summarize briefly, implementing CPD support directly in the
> print dialog would mean that the Qt team wouldn't have to worry about
> any future CUPS changes, or any other print backends for that matter, as
> CPD will handle them all instead.
>
> It would be really helpful if you could share your views on this and
> give your suggestions.
>
> Thanks,
>
> Gaurav
>
>
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] Duplicated test data tags

2022-10-17 Thread Edward Welbourne via Development
Mitch Curtis (14 October 2022 03:40) replied:
>>> QTest::failOnWarning (introduced in 6.3) could also be used by tests
>>> to make that warning fail the test:
>>>
>>> https://doc.qt.io/qt-6/qtest.html#failOnWarning

Edward Welbourne (Friday, 14 October 2022 4:56 PM) answered:
>> True enough; but you would need to add that to the start of your
>> _data() function; I think a global setting is more in line with
>> what's needed.

Mitch Curtis (17 October 2022 02:59) asked:
> So even init() would be too late? I would have thought that would run
> before the data function.

It's only run before the test itself - from invokeTestOnData(), which is
what we loop over per call to the test function after we've built the
data table.

Eddy.
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development