diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2017-09-04 10:33:26 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2017-09-22 14:51:48 +0000 |
commit | 7ef515b5c0b212d865168b64519902b35c0215fd (patch) | |
tree | 8384aa7c729ab73f89435502fd260f8b87c584f8 /examples/corelib/ipc/localfortuneclient/client.h | |
parent | ce019efb5cfcc0bce516a761be4295c568994a31 (diff) |
Modernize the Local Fortune Client and Server examples
Task-number: QTBUG-60625
Change-Id: I8ae77b782b580baf84cd5f353f8d584f674fb014
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'examples/corelib/ipc/localfortuneclient/client.h')
-rw-r--r-- | examples/corelib/ipc/localfortuneclient/client.h | 13 |
1 files changed, 6 insertions, 7 deletions
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 <QDialog> +#include <QDataStream> #include <qlocalsocket.h> 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 |