Commit 788722e135f6a782ed16fa0294a302b45a9d312b
1 parent
85bf95aa
Clean up some warnings
Showing
1 changed file
with
18 additions
and
2 deletions
openbr/plugins/process.cpp
| ... | ... | @@ -30,6 +30,8 @@ public: |
| 30 | 30 | // signals for our sever |
| 31 | 31 | connect(&server, SIGNAL(newConnection()), this, SLOT(receivedConnection() )); |
| 32 | 32 | connect(this, SIGNAL(pulseStartServer(QString)), this, SLOT(startServerInternal(QString)), Qt::BlockingQueuedConnection); |
| 33 | + connect(this, SIGNAL(pulseOutboundConnect(QString)), this, SLOT(startConnectInternal(QString) ), Qt::BlockingQueuedConnection); | |
| 34 | + | |
| 33 | 35 | |
| 34 | 36 | // internals, cause work to be done by the main thread because reasons. |
| 35 | 37 | connect(this, SIGNAL(pulseSignal()), this, SLOT(sendSignalInternal()), Qt::BlockingQueuedConnection); |
| ... | ... | @@ -85,11 +87,13 @@ public slots: |
| 85 | 87 | // informative. |
| 86 | 88 | void outboundConnectionError(QLocalSocket::LocalSocketError socketError) |
| 87 | 89 | { |
| 90 | + (void) socketError; | |
| 88 | 91 | //qDebug() << key << " outbound socket error " << socketError; |
| 89 | 92 | } |
| 90 | 93 | |
| 91 | 94 | void outboundStateChanged(QLocalSocket::LocalSocketState socketState) |
| 92 | 95 | { |
| 96 | + (void) socketState; | |
| 93 | 97 | //qDebug() << key << " outbound socket state changed to " << socketState; |
| 94 | 98 | } |
| 95 | 99 | |
| ... | ... | @@ -101,11 +105,13 @@ public slots: |
| 101 | 105 | |
| 102 | 106 | void inboundConnectionError(QLocalSocket::LocalSocketError socketError) |
| 103 | 107 | { |
| 108 | + (void) socketError; | |
| 104 | 109 | //qDebug() << key << " inbound socket error " << socketError; |
| 105 | 110 | } |
| 106 | 111 | |
| 107 | 112 | void inboundStateChanged(QLocalSocket::LocalSocketState socketState) |
| 108 | 113 | { |
| 114 | + (void) socketState; | |
| 109 | 115 | //qDebug() << key << " inbound socket state changed to " << socketState; |
| 110 | 116 | } |
| 111 | 117 | |
| ... | ... | @@ -132,7 +138,7 @@ public slots: |
| 132 | 138 | |
| 133 | 139 | void readSignalInternal() |
| 134 | 140 | { |
| 135 | - while (inbound->bytesAvailable() < sizeof(readSignal) ) { | |
| 141 | + while (inbound->bytesAvailable() < qint64(sizeof(readSignal)) ) { | |
| 136 | 142 | bool size_ready = inbound->waitForReadyRead(-1); |
| 137 | 143 | if (!size_ready) |
| 138 | 144 | { |
| ... | ... | @@ -237,6 +243,13 @@ public slots: |
| 237 | 243 | server.close(); |
| 238 | 244 | } |
| 239 | 245 | |
| 246 | + | |
| 247 | + void startConnectInternal(QString remoteName) | |
| 248 | + { | |
| 249 | + outbound.connectToServer(remoteName); | |
| 250 | + } | |
| 251 | + | |
| 252 | + | |
| 240 | 253 | signals: |
| 241 | 254 | void pulseStartServer(QString serverName); |
| 242 | 255 | void pulseSignal(); |
| ... | ... | @@ -244,6 +257,7 @@ signals: |
| 244 | 257 | void pulseReadSerialized(); |
| 245 | 258 | void pulseSendSerialized(); |
| 246 | 259 | void pulseShutdown(); |
| 260 | + void pulseOutboundConnect(QString serverName); | |
| 247 | 261 | |
| 248 | 262 | |
| 249 | 263 | public: |
| ... | ... | @@ -280,11 +294,12 @@ public: |
| 280 | 294 | |
| 281 | 295 | void connectToRemote(const QString & remoteName) |
| 282 | 296 | { |
| 283 | - outbound.connectToServer(remoteName); | |
| 297 | + emit pulseOutboundConnect(remoteName); | |
| 284 | 298 | |
| 285 | 299 | QMutexLocker locker(&outboundLock); |
| 286 | 300 | while (outbound.state() != QLocalSocket::ConnectedState) { |
| 287 | 301 | outboundWait.wait(&outboundLock,30*1000); |
| 302 | + | |
| 288 | 303 | } |
| 289 | 304 | } |
| 290 | 305 | |
| ... | ... | @@ -404,6 +419,7 @@ void shutUp(QtMsgType type, const QMessageLogContext &context, const QString &ms |
| 404 | 419 | // Please tell me more about how you want every single god damn thing to be created from and used by exactly one thread. |
| 405 | 420 | // It does not matter, so shut up already. |
| 406 | 421 | // p.s. I hope you die. |
| 422 | + (void) type; (void) context; (void) msg; | |
| 407 | 423 | } |
| 408 | 424 | |
| 409 | 425 | ... | ... |