Commit f44f1e7922fe27bb4e28da24eedeaee0b6827158

Authored by Wiebe Cazemier
1 parent c1a010a3

Fix incorrect heap object throw

FlashMQTests/mainappthread.cpp
@@ -53,6 +53,6 @@ void MainAppThread::waitForStarted() @@ -53,6 +53,6 @@ void MainAppThread::waitForStarted()
53 QThread::msleep(10); 53 QThread::msleep(10);
54 54
55 if (n++ > 500) 55 if (n++ > 500)
56 - throw new std::runtime_error("Waiting for app to start failed."); 56 + throw std::runtime_error("Waiting for app to start failed.");
57 } 57 }
58 } 58 }
FlashMQTests/twoclienttestcontext.cpp
@@ -134,7 +134,7 @@ void TwoClientTestContext::onClientError(const QMQTT::ClientError error) @@ -134,7 +134,7 @@ void TwoClientTestContext::onClientError(const QMQTT::ClientError error)
134 errStr = "Socket timeout"; 134 errStr = "Socket timeout";
135 135
136 QString msg = QString("Client %1 error code: %2 (%3). Initiated delayed reconnect.\n").arg(_sender->clientId()).arg(error).arg(errStr); 136 QString msg = QString("Client %1 error code: %2 (%3). Initiated delayed reconnect.\n").arg(_sender->clientId()).arg(error).arg(errStr);
137 - throw new std::runtime_error(msg.toStdString()); 137 + throw std::runtime_error(msg.toStdString());
138 } 138 }
139 139
140 void TwoClientTestContext::onReceiverReceived(const QMQTT::Message &message) 140 void TwoClientTestContext::onReceiverReceived(const QMQTT::Message &message)