Skip to content

Commit 5f4066c

Browse files
committed
MainWindow: Show line numbers in SQL log
1 parent ccfc351 commit 5f4066c

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/MainWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,10 +1156,10 @@ void MainWindow::logSql(const QString& sql, int msgtype)
11561156
{
11571157
if(msgtype == kLogMsg_User)
11581158
{
1159-
ui->editLogUser->append(sql);
1159+
ui->editLogUser->appendPlainText(sql);
11601160
ui->editLogUser->verticalScrollBar()->setValue(ui->editLogUser->verticalScrollBar()->maximum());
11611161
} else {
1162-
ui->editLogApplication->append(sql);
1162+
ui->editLogApplication->appendPlainText(sql);
11631163
ui->editLogApplication->verticalScrollBar()->setValue(ui->editLogApplication->verticalScrollBar()->maximum());
11641164
}
11651165
}

src/MainWindow.ui

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
<rect>
279279
<x>0</x>
280280
<y>0</y>
281-
<width>281</width>
281+
<width>278</width>
282282
<height>444</height>
283283
</rect>
284284
</property>
@@ -920,7 +920,7 @@
920920
<property name="currentIndex">
921921
<number>0</number>
922922
</property>
923-
<widget class="QTextEdit" name="editLogUser">
923+
<widget class="SqlTextEdit" name="editLogUser">
924924
<property name="font">
925925
<font>
926926
<family>Monospace</family>
@@ -931,7 +931,7 @@
931931
<bool>true</bool>
932932
</property>
933933
</widget>
934-
<widget class="QTextEdit" name="editLogApplication">
934+
<widget class="SqlTextEdit" name="editLogApplication">
935935
<property name="font">
936936
<font>
937937
<family>Monospace</family>
@@ -1493,6 +1493,11 @@
14931493
<header>qcustomplot.h</header>
14941494
<container>1</container>
14951495
</customwidget>
1496+
<customwidget>
1497+
<class>SqlTextEdit</class>
1498+
<extends>QTextEdit</extends>
1499+
<header>sqltextedit.h</header>
1500+
</customwidget>
14961501
</customwidgets>
14971502
<tabstops>
14981503
<tabstop>dbTreeWidget</tabstop>

0 commit comments

Comments
 (0)