From 07e1fc7bb93dc4c306d8e64f4cb88d42177cba2e Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Wed, 27 Sep 2017 19:56:10 +0300 Subject: Revamp the Blocking Master Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: I5ef9916cc1e6371dde97154f5f5683f85bc02e96 Reviewed-by: André Hartmann --- examples/serialport/blockingmaster/dialog.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'examples/serialport/blockingmaster/dialog.h') diff --git a/examples/serialport/blockingmaster/dialog.h b/examples/serialport/blockingmaster/dialog.h index aff8177..8d997fa 100644 --- a/examples/serialport/blockingmaster/dialog.h +++ b/examples/serialport/blockingmaster/dialog.h @@ -51,10 +51,10 @@ #ifndef DIALOG_H #define DIALOG_H -#include - #include "masterthread.h" +#include + QT_BEGIN_NAMESPACE class QLabel; @@ -82,18 +82,18 @@ private: void setControlsEnabled(bool enable); private: - int transactionCount; - QLabel *serialPortLabel; - QComboBox *serialPortComboBox; - QLabel *waitResponseLabel; - QSpinBox *waitResponseSpinBox; - QLabel *requestLabel; - QLineEdit *requestLineEdit; - QLabel *trafficLabel; - QLabel *statusLabel; - QPushButton *runButton; + int m_transactionCount = 0; + QLabel *m_serialPortLabel = nullptr; + QComboBox *m_serialPortComboBox = nullptr; + QLabel *m_waitResponseLabel = nullptr; + QSpinBox *m_waitResponseSpinBox = nullptr; + QLabel *m_requestLabel = nullptr; + QLineEdit *m_requestLineEdit = nullptr; + QLabel *m_trafficLabel = nullptr; + QLabel *m_statusLabel = nullptr; + QPushButton *m_runButton = nullptr; - MasterThread thread; + MasterThread m_thread; }; #endif // DIALOG_H -- cgit v1.2.1