- fix: errors in debug console

- fix: speed up the parsing process of debugger
This commit is contained in:
royqh1979@gmail.com 2021-10-02 17:38:29 +08:00
parent 25070cc491
commit de625755e5
5 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
Version 0.3.0 Version 0.5.0
- enhancement: support C++ using type alias; - enhancement: support C++ using type alias;
- fix: when press shift, completion popu window will hide - fix: when press shift, completion popu window will hide
- enhancement: options in debugger setting widget, to skip system/project/custom header&project files when step into - enhancement: options in debugger setting widget, to skip system/project/custom header&project files when step into

View File

@ -1573,8 +1573,7 @@ void MainWindow::buildContextMenus()
}); });
mDebugConsole_SelectAll=createActionFor( mDebugConsole_SelectAll=createActionFor(
tr("Select All"), tr("Select All"),
ui->debugConsole, ui->debugConsole);
QKeySequence("Ctrl+A"));
connect(mDebugConsole_SelectAll, &QAction::triggered, connect(mDebugConsole_SelectAll, &QAction::triggered,
[this]() { [this]() {
ui->debugConsole->selectAll(); ui->debugConsole->selectAll();

View File

@ -469,7 +469,7 @@
<enum>QTabWidget::North</enum> <enum>QTabWidget::North</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>4</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tabDebugConsole"> <widget class="QWidget" name="tabDebugConsole">
<attribute name="title"> <attribute name="title">
@ -817,7 +817,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>946</width> <width>946</width>
<height>22</height> <height>25</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">

View File

@ -3,7 +3,7 @@
#include <QStringList> #include <QStringList>
#define DEVCPP_VERSION "0.2.2" #define DEVCPP_VERSION "0.5.0"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#define APP_SETTSINGS_FILENAME "redpandacpp.ini" #define APP_SETTSINGS_FILENAME "redpandacpp.ini"

View File

@ -684,12 +684,12 @@ void QConsole::keyPressEvent(QKeyEvent *event)
QAbstractScrollArea::keyPressEvent(event); QAbstractScrollArea::keyPressEvent(event);
} }
void QConsole::focusInEvent(QFocusEvent *event) void QConsole::focusInEvent(QFocusEvent *)
{ {
showCaret(); showCaret();
} }
void QConsole::focusOutEvent(QFocusEvent *event) void QConsole::focusOutEvent(QFocusEvent *)
{ {
hideCaret(); hideCaret();
} }
@ -715,7 +715,9 @@ void QConsole::paintEvent(QPaintEvent *event)
nL2 = std::min(std::max(mTopRow + (rcClip.bottom() + mRowHeight - 1) / mRowHeight, 1), maxScrollHeight() + mRowsInWindow - 1); nL2 = std::min(std::max(mTopRow + (rcClip.bottom() + mRowHeight - 1) / mRowHeight, 1), maxScrollHeight() + mRowsInWindow - 1);
QPainter cachePainter(mContentImage.get()); QPainter cachePainter(mContentImage.get());
cachePainter.setFont(font()); cachePainter.setFont(font());
painter.fillRect(rcClip,mBackground); if (viewport()->rect() == rcClip) {
painter.fillRect(rcClip, mBackground);
}
paintRows(cachePainter,nL1,nL2); paintRows(cachePainter,nL1,nL2);
painter.drawImage(rcClip,*mContentImage,rcClip); painter.drawImage(rcClip,*mContentImage,rcClip);
} }