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. binary and source compatibility breakage in 6.7

binary and source compatibility breakage in 6.7

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 264 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.
  • D Offline
    D Offline
    drwho 0
    wrote on last edited by
    #1

    The return type of QAndroidApplication::context() changed in Qt6.7. Is the line below for Qt6.0 to pre 6.7 abusing the api? or did Qt break their version policy?

    #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
    	QAndroidJniObject nsdManager = QAndroidJniObject("qtzeroconf/QZeroConfNsdManager", "(JLandroid/content/Context;)V", reinterpret_cast<quint64>(this), QtAndroid::androidActivity().object());
    #elif (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
    	// either this line abuses the Qt api or Qt broke their version policy in 6.7
    	QJniObject nsdManager = QAndroidJniObject("qtzeroconf/QZeroConfNsdManager", "(JLandroid/content/Context;)V", reinterpret_cast<quint64>(this), QNativeInterface::QAndroidApplication::context());
    #else
    	QJniObject nsdManager = QAndroidJniObject("qtzeroconf/QZeroConfNsdManager", "(JLandroid/content/Context;)V", reinterpret_cast<quint64>(this), QNativeInterface::QAndroidApplication::context().object<jobject>());
    #endif
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      See https://bugreports.qt.io/browse/QTBUG-123900 - "QNativeInterface which doesn't provide source compatibility."

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • D drwho 0 has marked this topic as solved on
      • D Offline
        D Offline
        drwho 0
        wrote on last edited by
        #3

        Thank you for pointing that out. I can accept a merger request in my project now.

        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