diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-07-07 16:48:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-08 15:00:54 +0200 |
commit | 06f86fb7690343c8d2e1951e541156e6d8e48280 (patch) | |
tree | ff87e60f1124332bc79b264118c8317f245cb5fb | |
parent | 39f90528abda2f5ec7575acf2e1a352702a202e8 (diff) | |
download | qtserialport-06f86fb7690343c8d2e1951e541156e6d8e48280.tar.gz |
Use consistent style for local const
Should be:
* consistent name with the rest
* static as it is used only once inside the desired method
* const int instead of enum for sanity and consistency
Change-Id: I7a7a7b894a559d03b02a4358c87c464045950253
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r-- | src/serialport/qserialportinfo_mac.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/serialport/qserialportinfo_mac.cpp b/src/serialport/qserialportinfo_mac.cpp index 1a751df..2a9307c 100644 --- a/src/serialport/qserialportinfo_mac.cpp +++ b/src/serialport/qserialportinfo_mac.cpp @@ -59,12 +59,11 @@ QT_BEGIN_NAMESPACE -enum { MATCHING_PROPERTIES_COUNT = 6 }; - QList<QSerialPortInfo> QSerialPortInfo::availablePorts() { QList<QSerialPortInfo> serialPortInfoList; + static const int propertyCount = 6; int matchingPropertiesCounter = 0; @@ -185,7 +184,7 @@ QList<QSerialPortInfo> QSerialPortInfo::availablePorts() } // If all matching properties is found, then force break loop. - if (matchingPropertiesCounter == MATCHING_PROPERTIES_COUNT) + if (matchingPropertiesCounter == propertyCount) break; kr = ::IORegistryEntryGetParentEntry(entry, kIOServicePlane, &entry); |