Query tab will now show multiple data tabs if it get's multiple results

with tuples.
This commit is contained in:
Eelke Klein 2017-01-25 06:54:21 +01:00
parent 424cbc9e2e
commit b6d986051b
21 changed files with 349 additions and 113 deletions

View file

@ -250,6 +250,7 @@ void ASyncDBConnection::Thread::doNewCommand()
}
}
if (!command.empty() && m_connection.sendQuery(command)) {
m_timer.start();
doStateCallback(State::QuerySend);
}
else {
@ -290,9 +291,11 @@ void ASyncDBConnection::Thread::waitForResult()
while ( ! finished && ! m_connection.isBusy()) {
auto res(m_connection.getResult());
{
qint64 ms = m_timer.restart();
std::lock_guard<std::mutex> lg(m_commandQueue.m_mutex);
m_commandQueue.m_queue.front().on_result(res);
m_commandQueue.m_queue.front().on_result(res, ms);
if (res == nullptr) {
m_timer.invalidate();
m_commandQueue.m_queue.pop();
doStateCallback(State::Connected);
finished = true;