Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53642

Improve QCanBus::instance()->createDevice()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • 5.8.0 Alpha
    • 5.7.0 Beta
    • SerialBus: CAN Bus
    • None
    • 5ddd6bb219102b9561ab7a85cc9c9b8feba17e58 a345430678366db1a0540b4a38718bb12c0962c9

    Description

      • I'd like to get more information when the above call fails, like "cannot load shared library pcanbasic.dll". For now, the function can only return nullptr.
      • From programmers side, it's hard to remember, that backendName is a QByteArray and deviceInterfaceName is a QString. This could be changed to all be QString.

      So I'd suggest to have an overload in 5.8 to get the error string:

       QCanBus::instance()->createDevice(
         const QString &backendName,
         const QString &deviceInterfaceName,
         QString *errorString = nullptr);
      

      Attachments

        For Gerrit Dashboard: QTBUG-53642
        # Subject Branch Project Status CR V

        Activity

          People

            aha_1980 André Hartmann
            aha_1980 André Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes