QNetworkConfigurationManagerPrivate::defaultConfiguration() already has this logic if the Connman plugins defaultConfiguration() returns null. The order is:

No Active or Discovered SNAPs, find the perferred access point. The following priority order is used:

            1. Active Ethernet
            2. Active WLAN
            3. Active Other
            4. Discovered Ethernet
            5. Discovered WLAN
            6. Discovered Other