-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi everyone,
here are some 'recent' examples of error messages printed for X11 protocol errors: QXcbConnection::handleXcbError - QXcbConnection: XCB error: 170 (Unknown), sequence: 162, resource id: 90, major code: 146 (Unknown), minor code: 20 https://codereview.qt-project.org/#/c/108209/ (See my comment from Mar 14 8:52 AM) ~ > qtcreator -noload Welcome QXcbConnection: Failed to get the primary output of the screen Starting process: "/usr/bin/cmake" "--help" QXcbConnection: XCB error: 172 (Unknown), sequence: 158, resource id: 150, major code: 149 (Unknown), minor code: 20 https://bugreports.qt.io/browse/QTBUG-31389 (And lots of other comments in there) QXcbConnection: XCB error: 159 (Unknown), sequence: 156, resource id: 0, major code: 149 (Unknown), minor code: 20 https://codereview.qt-project.org/74133 These error messages are not really helpful. Here is a (bad[0]) example for a better error message: QXcbConnection: XCB error: 3 (Window), sequence: 7, resource id: 42, major code: 4 (DestroyWindow), minor code: 0 (Non-extension request / Unknown) The first of my three examples is what made me work on a library for figuring out more useful names than "Unknown" for these error messages. The result is xcb-util-errors: http://cgit.freedesktop.org/xcb/util-errors/ http://lists.freedesktop.org/archives/xcb/2015-April/010264.html Now I want to make Qt use this library for better error messages: https://codereview.qt-project.org/109873 The actual question that I want to ask with this mail: This is a new external dependency. Is it ok to add this dependency to Qt? I have some options to offer for this which only differ in their behavior when ./configure is called with -system-xcb (which is the default): (A) Handle this library like other xcb libraries: Require an installed copy with -system-xcb (the default) and use a bundled version with -qt-xcb. (B) Use an installed copy with -system-xcb if available, else use the bundled version. Always use the bundled version with -qt-xcb. (C) Use an installed copy with -system-xcb if available, else just print the numeric values without a human readable description. Use the bundled version with -qt-xcb. With (A) we have a new hard dependency which might be hard to satisfy for some people. For (B) I'm not sure about the source code structure that should be used. AFAIK the code in src/3rdparty/xcb is only used with -qt-xcb and ignored otherwise. Thus it would be inconsistent to put xcb-util-errors there. Note that (C) is worse than the current state where Qt at least contains some lookup tables for core (=not coming from some extension) X11 errors and events. What do you think and prefer? Does adding this dependency make sense at all? Cheers, Uli P.S.: Thanks to Shawn Rutledge und Alejandro Exojo for talking to me about this in #qt-labs. They came up with options (B) and (C). [0]: This is a bad example, because the current code would also generate such an error message for *this* example, since no X11 extensions are involved. However, this library works for all X11 protocol error and response numbers and also for all major and minor numbers (at least those for which a XCB XML protocol description is available, which only excludes some deprecated things). - -- - - Captain, I think I should tell you I've never actually landed a starship before. - - That's all right, Lieutenant, neither have I. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCAAGBQJVPT7nAAoJECLkKOvLj8sGWZUH/RgszVRfZaMw881Tq2f2cYT7 zXkTWaW9ZtrgG0BU8iS/u7QT34jAnaUDMPyXwAqYIn5NCxgda59+kurGDMuQU+C7 zmjLK6i7zR1m73FAYeOKGssiXUa2HpDLVeUwFNnUs0pQMvzq2zBEJOzmy6B8jATQ 9Jk0VBPiaOK/RdHY6LpSTSjAJx5sOI/+shr0zqnZT2Xr2qrdUbH5W7oC6F+4U31Z p0NIH54OF2jrbFOYdw2bYcs9lcelAnpsd/aXhoxI0hpVlbVPbUVMq+fiQqmQL8nd ZGqd2f/W79wNB3ODuwGazRErVdfKvbyl/yBEPGMyXxXZ7pLTsRDtMh7R78veTBk= =jhHf -----END PGP SIGNATURE----- _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development