THe QueryTool now reconnects when the connection is lost.
This commit is contained in:
parent
b87f587a40
commit
adb44fc157
2 changed files with 5 additions and 0 deletions
|
|
@ -307,6 +307,9 @@ void QueryTool::connectionStateChanged(ASyncDBConnection::State state)
|
|||
QString iconname;
|
||||
switch (state) {
|
||||
case ASyncDBConnection::State::NotConnected:
|
||||
startConnect();
|
||||
iconname = "red.png";
|
||||
break;
|
||||
case ASyncDBConnection::State::Connecting:
|
||||
iconname = "red.png";
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -465,6 +465,8 @@ void ASyncDBConnection::setupConnection(const ConnectionConfig &config)
|
|||
m_threadData->stop();
|
||||
m_thread.join();
|
||||
}
|
||||
|
||||
m_threadData.reset(new ASyncDBConnectionThread(this));
|
||||
m_threadData->m_config = config;
|
||||
m_thread = std::thread([this] () { m_threadData->run(); });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue