Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Running unit tests that use QWidgets no longer works over ssh on osx in QT5
Forum Updated to NodeBB v4.3 + New Features

Running unit tests that use QWidgets no longer works over ssh on osx in QT5

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tpatja
    wrote on last edited by
    #1

    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. 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?

    Thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Indeed several things have changed between 4 and 5.

      You should post this question on the interest mailing list, you'll find there Qt's developers/maintainers (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tpatja
        wrote on last edited by
        #3

        Thanks. I'll post on the interest list.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved