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

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

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.7.0 Beta
    • Fix Version/s: 5.8.0 Alpha
    • Component/s: SerialBus: CAN Bus
    • Labels:
      None
    • Commits:
      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            aha_1980 André Hartmann
            Reporter:
            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