new SQLTableWidget::debugEnabled property

This commit is contained in:
2020-10-09 11:42:33 +03:00
parent cadfe1259e
commit f53d5bd53b
2 changed files with 9 additions and 5 deletions

View File

@@ -334,7 +334,7 @@ SQLTableWidget::SQLTableWidget(QWidget * parent): QWidget(parent), filters_group
model = 0;
timer = 0;
connection_name = QSqlDatabase::defaultConnection;
filters_active = first_update = true;
filters_active = first_update = debug = true;
table_opened = read_only = false;
ui->labelNew->setFixedSize(preferredIconSize(1.2, this));
ui->labelFilter->setFixedSize(preferredIconSize(1.2, this));
@@ -463,7 +463,7 @@ void SQLTableWidget::setTableName(const QString & t) {
first_update = true;
table_ = t;
if (!QSqlDatabase::database(connection_name).isOpen()) {
qDebug() << "[setTableName] Database in not opened!";
if (debug) qDebug() << "[setTableName] Database in not opened!";
setTableVisible(false);
timer = startTimer(1000);
return;