[Development] New library in qtbase

Jake Petroules Jake.Petroules at qt.io
Sat Nov 26 06:36:16 CET 2016


> On Nov 25, 2016, at 3:51 PM, Samuel Gaist <samuel.gaist at edeltech.ch> wrote:
> 
> Hi,
> 
> As requested by Thiago in https://codereview.qt-project.org/#/c/166456/ I’d like to open a discussion about adding a new library in qtbase.
> 
> Why this discussion ?
> 
> Currently in work a pluggable notification system developed in its own library in qtbase.
> 
> Why add a new library ?
> 
> Originally the submission was integrated in QPA however after some thoughts and discussion, it was reworked to avoid that so that developers of non-GUI application could also take advantage of notifications without the need of a QGuiApplication.
> 
> One of my motivation to move the code in its own library was that the second implementation provided a run-time plugin selection mechanism much like the QtSql module. After further discussion, the plugin selection has been moved to build-time.
> 
> The library as it is currently could even be in its own repository however the goal in the long run is to replace the code used in QSystemTrayIcon by calls to this module which at this time duplicates the showMessage logic for macOS. Therefore having it as a separated repo would mean that qtbase would depend on it to be build which IMHO is not an option.
> 
> So basically we are at this point:
> 
> 1) Keep the new notifications module

I would rather it be a separate module, QtGui is becoming large.

> 2) Move the code in the gui module since QImage might be used

Maybe we can have two modules - QtNotifications and QtGraphicalNotifications, only the latter of which depends on QtGui.

For Qt 6 I'd like to separate QtGui into two modules, one which handles just general graphics and imaging (QtGraphics), and another which handles the windowing system abstraction and user interface primitives (QtUi or QtGui). Of course that's a separate discussion but it would help situations like this...

> In any case, the outcome of this discussion should likely be written in a QUIP so we have a clear set of rules about adding new libraries in existing Qt modules.
> 
> Thank you for your attention
> 
> Samuel
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

Anyways, +1 overall.
-- 
Jake Petroules - jake.petroules at qt.io
The Qt Company - Silicon Valley
Qbs build tool evangelist - qbs.io



More information about the Development mailing list