Decided to use signal slot mechanism
The automatic cross thread activation is probably worth it.
This commit is contained in:
parent
14ab400ccb
commit
abd4020ddf
3 changed files with 34 additions and 63 deletions
|
|
@ -32,11 +32,9 @@ QueryTab::QueryTab(MainWindow *win, QWidget *parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_dbConnection.setStateChangeReceiver(
|
||||
[this, win](auto s) { win->QueueTask([this, s]() { connectionStateChanged(s); }); });
|
||||
m_dbConnection.setNoticeReceiver(
|
||||
[this, win](auto n) { win->QueueTask([this, n]() { receiveNotice(n); }); });
|
||||
|
||||
connect(&m_dbConnection, &ASyncDBConnection::onStateChanged, this, &QueryTab::connectionStateChanged);
|
||||
connect(&m_dbConnection, &ASyncDBConnection::onNotice, this, &QueryTab::receiveNotice);
|
||||
|
||||
QFont font;
|
||||
font.setFamily("Source Code Pro");
|
||||
font.setFixedPitch(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue