From 7ef515b5c0b212d865168b64519902b35c0215fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 4 Sep 2017 10:33:26 +0200 Subject: Modernize the Local Fortune Client and Server examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-60625 Change-Id: I8ae77b782b580baf84cd5f353f8d584f674fb014 Reviewed-by: Jędrzej Nowacki --- examples/corelib/ipc/localfortuneclient/client.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'examples/corelib/ipc/localfortuneclient/client.h') diff --git a/examples/corelib/ipc/localfortuneclient/client.h b/examples/corelib/ipc/localfortuneclient/client.h index 8e628efcee..0c1ede94c9 100644 --- a/examples/corelib/ipc/localfortuneclient/client.h +++ b/examples/corelib/ipc/localfortuneclient/client.h @@ -52,11 +52,11 @@ #define CLIENT_H #include +#include #include QT_BEGIN_NAMESPACE -class QDialogButtonBox; class QLabel; class QLineEdit; class QPushButton; @@ -68,7 +68,7 @@ class Client : public QDialog Q_OBJECT public: - Client(QWidget *parent = 0); + explicit Client(QWidget *parent = nullptr); private slots: void requestNewFortune(); @@ -77,16 +77,15 @@ private slots: void enableGetFortuneButton(); private: - QLabel *hostLabel; QLineEdit *hostLineEdit; - QLabel *statusLabel; QPushButton *getFortuneButton; - QPushButton *quitButton; - QDialogButtonBox *buttonBox; + QLabel *statusLabel; QLocalSocket *socket; - QString currentFortune; + QDataStream in; quint32 blockSize; + + QString currentFortune; }; #endif -- cgit v1.2.3