diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2017-09-27 19:47:38 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2017-10-06 20:17:15 +0000 |
commit | c513cbaee4d8819a2ebb27396be6c056b1f5856f (patch) | |
tree | 0a3fe4811ebe62b811a3f4f95ebd8d9602f5af13 /examples/serialport/blockingslave/dialog.h | |
parent | 466705128376bd5d60ec23eec7af37d3bf6649fe (diff) | |
download | qtserialport-c513cbaee4d8819a2ebb27396be6c056b1f5856f.tar.gz |
Revamp the Blocking Slave Example
* Use the 'const' keywords more.
* Split very long lines.
* Use the 'm_' prefixes for all class members.
* Use the QOverload in signal/slot casting.
* Use more member class initializations.
* Remove QT_USE_NAMESPACE macro.
* Use from(to)Utf8 instead of from(to)Local8Bit.
Task-number: QTBUG-60652
Change-Id: I64bfaf93672dc69f4d10bcaaa0c1c6dd87267d3e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/serialport/blockingslave/dialog.h')
-rw-r--r-- | examples/serialport/blockingslave/dialog.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/serialport/blockingslave/dialog.h b/examples/serialport/blockingslave/dialog.h index 0e59410..c8f80a6 100644 --- a/examples/serialport/blockingslave/dialog.h +++ b/examples/serialport/blockingslave/dialog.h @@ -51,10 +51,10 @@ #ifndef DIALOG_H #define DIALOG_H -#include <QDialog> - #include "slavethread.h" +#include <QDialog> + QT_BEGIN_NAMESPACE class QLabel; @@ -80,18 +80,18 @@ private slots: void activateRunButton(); private: - int transactionCount; - QLabel *serialPortLabel; - QComboBox *serialPortComboBox; - QLabel *waitRequestLabel; - QSpinBox *waitRequestSpinBox; - QLabel *responseLabel; - QLineEdit *responseLineEdit; - QLabel *trafficLabel; - QLabel *statusLabel; - QPushButton *runButton; + int m_transactionCount = 0; + QLabel *m_serialPortLabel = nullptr; + QComboBox *m_serialPortComboBox = nullptr; + QLabel *m_waitRequestLabel = nullptr; + QSpinBox *m_waitRequestSpinBox = nullptr; + QLabel *m_responseLabel = nullptr; + QLineEdit *m_responseLineEdit = nullptr; + QLabel *m_trafficLabel = nullptr; + QLabel *m_statusLabel = nullptr; + QPushButton *m_runButton = nullptr; - SlaveThread thread; + SlaveThread m_thread; }; #endif // DIALOG_H |