Skip to content

Commit

Permalink
MainWindow: Show line numbers in SQL log
Browse files Browse the repository at this point in the history
  • Loading branch information
MKleusberg committed Jul 31, 2014
1 parent ccfc351 commit 5f4066c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>281</width>
<width>278</width>
<height>444</height>
</rect>
</property>
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 5f4066c

Please sign in to comment.