mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:46:03 +00:00
UI: ControlWorker: Handle errorOccurred() signal.
This commit is contained in:
parent
e063421819
commit
76dd73a728
@ -88,6 +88,11 @@ void ControlWorker::setupForAsync()
|
||||
socket()->setParent(this);
|
||||
|
||||
connect(socket(), &QLocalSocket::disconnected, this, &ControlWorker::disconnected);
|
||||
connect(socket(), &QLocalSocket::errorOccurred, this,
|
||||
[&](QLocalSocket::LocalSocketError socketError) {
|
||||
qWarning() << "Client error:" << id() << socketError << errorString();
|
||||
abort();
|
||||
});
|
||||
connect(socket(), &QLocalSocket::readyRead, this, &ControlWorker::processRequest);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
QLocalSocket *socket() const { return m_socket; }
|
||||
|
||||
int id() const;
|
||||
|
||||
QString errorString() const;
|
||||
|
||||
void setupForAsync();
|
||||
|
Loading…
Reference in New Issue
Block a user