diff --git a/FlashMQTests/mainappthread.cpp b/FlashMQTests/mainappthread.cpp index f00204b..c9fcae2 100644 --- a/FlashMQTests/mainappthread.cpp +++ b/FlashMQTests/mainappthread.cpp @@ -53,6 +53,6 @@ void MainAppThread::waitForStarted() QThread::msleep(10); if (n++ > 500) - throw new std::runtime_error("Waiting for app to start failed."); + throw std::runtime_error("Waiting for app to start failed."); } } diff --git a/FlashMQTests/twoclienttestcontext.cpp b/FlashMQTests/twoclienttestcontext.cpp index af2dc32..b2eebb3 100644 --- a/FlashMQTests/twoclienttestcontext.cpp +++ b/FlashMQTests/twoclienttestcontext.cpp @@ -134,7 +134,7 @@ void TwoClientTestContext::onClientError(const QMQTT::ClientError error) errStr = "Socket timeout"; QString msg = QString("Client %1 error code: %2 (%3). Initiated delayed reconnect.\n").arg(_sender->clientId()).arg(error).arg(errStr); - throw new std::runtime_error(msg.toStdString()); + throw std::runtime_error(msg.toStdString()); } void TwoClientTestContext::onReceiverReceived(const QMQTT::Message &message)