- fix: option "don't add leading zeros to line numbers" not work

This commit is contained in:
royqh1979 2021-11-13 17:15:07 +08:00
parent 966aac5d4a
commit c4b61b8985
5 changed files with 13 additions and 9 deletions

View File

@ -8,6 +8,7 @@ Version 0.8.7 For Dev-C++ 7 Beta
- enhancement: shift+mouse wheel to scroll horizontally
- fix: greatly reduces paste time
- fix: auto indent shouldn't use preprocessor's indent to calculate
- fix: option "don't add leading zeros to line numbers" not work
Version 0.8.6 For Dev-C++ 7 Beta
- enhancement: greatly reduces memory usage for symbol parsing ( memory needed for bits/stdc++.h reduced from 150m+ to 80m+)

View File

@ -48,7 +48,7 @@ bool CppRefacter::findOccurence(Editor *editor, const BufferCoord &pos)
bool CppRefacter::findOccurence(const QString &statementFullname, SearchFileScope scope)
{
PCppParser parser;
Editor * editor;
Editor * editor=nullptr;
std::shared_ptr<Project> project;
if (scope == SearchFileScope::currentFile) {
editor = pMainWindow->editorList()->getEditor();

View File

@ -95,7 +95,11 @@ QString SynGutter::formatLineNumber(int line)
{
line += (mLineNumberStart - 1);
QString result = QString::number(line);
return QString(mAutoSizeDigitCount - result.length(),'0') + result;
if (mLeadingZeros) {
return QString(mAutoSizeDigitCount - result.length(),'0') + result;
} else {
return result;
}
}
int SynGutter::realGutterWidth(int charWidth)
@ -315,10 +319,9 @@ void SynGutter::setBorderColor(const QColor &value)
}
SynEditMark::SynEditMark(QObject *parent)
SynEditMark::SynEditMark(QObject * /*parent*/)
{
mBookmarkNum = -1;
}
int SynEditMark::Char() const
@ -405,7 +408,7 @@ void SynEditMark::setLine(int line)
}
}
SynBookMarkOpt::SynBookMarkOpt(QObject *parent)
SynBookMarkOpt::SynBookMarkOpt(QObject */*parent*/)
{
mDrawBookmarksFirst = true;
mEnableKeys = true;

View File

@ -5991,7 +5991,7 @@ void SynEdit::mouseMoveEvent(QMouseEvent *event)
mimeData->setText(selText());
drag->setMimeData(mimeData);
Qt::DropAction dropAction = drag->exec(Qt::CopyAction | Qt::MoveAction);
drag->exec(Qt::CopyAction | Qt::MoveAction);
//drag->setPixmap(iconPixmap);
//BeginDrag(false);
}
@ -6146,7 +6146,7 @@ void SynEdit::dragMoveEvent(QDragMoveEvent *event)
showCaret();
}
void SynEdit::dragLeaveEvent(QDragLeaveEvent *event)
void SynEdit::dragLeaveEvent(QDragLeaveEvent *)
{
setCaretXY(mDragCaretSave);
setBlockBegin(mDragSelBeginSave);

View File

@ -807,8 +807,8 @@ void DarkFusionStyle::drawControl(ControlElement element, const QStyleOption *op
case CE_MenuItem:
// Draws one item in a popup menu.
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
QColor highlightOutline = highlightedOutline;
QColor highlight = option->palette.highlight().color();
//QColor highlightOutline = highlightedOutline;
//QColor highlight = option->palette.highlight().color();
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
painter->save();
int w = 0;