Crash fix in management server
This commit is contained in:
parent
ff557589ee
commit
c7dafe9c00
2 changed files with 17 additions and 13 deletions
|
@ -2,6 +2,8 @@
|
|||
#define MANAGEMENTSERVER_H
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
|
||||
class QTcpServer;
|
||||
|
@ -22,7 +24,7 @@ public:
|
|||
QString readLine();
|
||||
qint64 writeCommand(const QString& message);
|
||||
|
||||
QTcpSocket* socket() const;
|
||||
QPointer<QTcpSocket> socket() const;
|
||||
|
||||
signals:
|
||||
void readyRead();
|
||||
|
@ -36,8 +38,8 @@ protected slots:
|
|||
void onSocketError(QAbstractSocket::SocketError socketError);
|
||||
|
||||
protected:
|
||||
QTcpServer* m_tcpServer;
|
||||
QTcpSocket* m_socket;
|
||||
QSharedPointer<QTcpServer> m_tcpServer;
|
||||
QPointer<QTcpSocket> m_socket;
|
||||
};
|
||||
|
||||
#endif // MANAGEMENTSERVER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue