Threaded Fortune Example: update example to use qintptr for descriptors
Pick-to: 6.5 Task-number: QTBUG-108875 Change-Id: Ie635a3d2c4c61a59547e8fed0ec84da8538968a3 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
0280b7eb96
commit
45717db7a5
@ -6,7 +6,7 @@
|
||||
#include <QtNetwork>
|
||||
|
||||
//! [0]
|
||||
FortuneThread::FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent)
|
||||
FortuneThread::FortuneThread(qintptr socketDescriptor, const QString &fortune, QObject *parent)
|
||||
: QThread(parent), socketDescriptor(socketDescriptor), text(fortune)
|
||||
{
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class FortuneThread : public QThread
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent);
|
||||
FortuneThread(qintptr socketDescriptor, const QString &fortune, QObject *parent);
|
||||
|
||||
void run() override;
|
||||
|
||||
@ -21,7 +21,7 @@ signals:
|
||||
void error(QTcpSocket::SocketError socketError);
|
||||
|
||||
private:
|
||||
int socketDescriptor;
|
||||
qintptr socketDescriptor;
|
||||
QString text;
|
||||
};
|
||||
//! [0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user