MainWindow: Show line numbers in SQL log

This commit is contained in:
Martin Kleusberg
2014-07-31 21:19:41 +02:00
parent ccfc3519f8
commit 5f4066c351
2 changed files with 10 additions and 5 deletions

View File

@@ -1156,10 +1156,10 @@ void MainWindow::logSql(const QString& sql, int msgtype)
{
if(msgtype == kLogMsg_User)
{
ui->editLogUser->append(sql);
ui->editLogUser->appendPlainText(sql);
ui->editLogUser->verticalScrollBar()->setValue(ui->editLogUser->verticalScrollBar()->maximum());
} else {
ui->editLogApplication->append(sql);
ui->editLogApplication->appendPlainText(sql);
ui->editLogApplication->verticalScrollBar()->setValue(ui->editLogApplication->verticalScrollBar()->maximum());
}
}

View File

@@ -278,7 +278,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>281</width>
<width>278</width>
<height>444</height>
</rect>
</property>
@@ -920,7 +920,7 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QTextEdit" name="editLogUser">
<widget class="SqlTextEdit" name="editLogUser">
<property name="font">
<font>
<family>Monospace</family>
@@ -931,7 +931,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="editLogApplication">
<widget class="SqlTextEdit" name="editLogApplication">
<property name="font">
<font>
<family>Monospace</family>
@@ -1493,6 +1493,11 @@
<header>qcustomplot.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>SqlTextEdit</class>
<extends>QTextEdit</extends>
<header>sqltextedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>dbTreeWidget</tabstop>