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

Use dedicated enum ConfigurationKey instead int as function parameter

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 6.2.0 Alpha, 6.2
    • 5.15.2
    • SerialBus: CAN Bus
    • None
    • All
    • 227060f8c17aaf90fe542ad6079a6badaf410a0d (qt/qtserialbus/dev)

      In qcanbusdevice.h, we have the following prototypes:

      virtual void setConfigurationParameter(int key, const QVariant &value);
      QVariant configurationParameter(int key) const;
      QVector<int> configurationKeys() const; 

      Was there a reason to use int for the key, and not the dedicated enum ConfigurationKey?

      Do we want to change that for Qt 6?

      If the enum is kept as-is (i.e. no enum class), it should be even source compatible with existing code.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes