[Interest] running unit tests that use QWidgets no longer works over ssh on osx with QT5

Teemu patja tpatja at broadsoft.com
Tue Feb 18 11:21:13 CET 2014


Hi,

We have a bunch of unit tests written using QTestLib. Some tests use
classes like QAction and QMenu, but never draw anything to the screen or
access the clipboard. Those classes require us to instatiate a QApplication
instead of a QCoreApplication in the test runner. The tests are run on a
build server over an SSH connection.

Here is what happens:

QT4 (4.8.4):
_RegisterApplication(), FAILED TO establish the default connection to the
WindowServer, _CGSDefaultConnection() is NULL.
(tests run fine regardless of above warning)

QT5 (5.2.1):
PasteBoard: Error creating pasteboard: com.apple.pasteboard.clipboard
[-4960]
PasteBoard: Error creating pasteboard: com.apple.pasteboard.find [-4960]
_RegisterApplication(), FAILED TO establish the default connection to the
WindowServer, _CGSDefaultConnection() is NULL.
Bus error 10.
(runner aborts)

To reproduce the above, all you need to do is create a hello world that
instantiates a QApplication. It will abort on QT5 and work on QT4.

So, I gather that something has changed related to clipboard in the
initialization of QApplication between QT4 and QT5 on OSX.
Is there a workaround? Or any idea how to make running these tests on a
headless OSX machine work?

Has the QT project solved the above problem in the QT CI system?

Thanks in advance,

Teemu

-- 


This email is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. If 
you are not the intended recipient and have received this email in error, 
please notify BroadSoft, Inc. immediately by replying to this message, and 
destroy all copies of this message, along with any attachment, prior to 
reading, distributing or copying it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140218/e0c80005/attachment.html>


More information about the Interest mailing list