[Development] Moving QDesktopServices from Gui to Core?
Thiago Macieira
thiago.macieira at intel.com
Tue May 7 19:15:57 CEST 2024
On Tuesday 7 May 2024 10:03:21 GMT-7 Thiago Macieira wrote:
> So I want to know of a use-case where all of the following are true:
> * application is GUI-less (i.e., is a background service)
> * application has no GUI counterpart
> * application is definitely running in a GUI environment
Rethinking a little here, if we drill d own one level it may make sense.
Replace "application" with "library":
One may want to make a library that has no GUI dependency and implements some
network service. Therefore, they don't want to link to QtGui for
QDesktopServices. If the functionality is in QtCore, then they could request
the browser if the application is GUI.
The problem is that said library needs a fallback if the application is *not*
GUI. Moreover, I'd question the automatic launching of a browser as part of
this library's behaviour. A better design would be for it to emit a signal
indicating it requires something to happen and then to let the application or
a wrapping library to make a policy decision on what to do.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240507/f3153718/attachment.bin>
More information about the Development
mailing list