forked from qt-creator/qt-creator
BinEditor: Use inline member initialization
Change-Id: If70532c94b5a446dbb6595d635f4c03b69a5d65c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
eb33d26090
commit
55722ac5a4
@@ -141,22 +141,7 @@ private:
|
|||||||
BinEditorWidget::BinEditorWidget(QWidget *parent)
|
BinEditorWidget::BinEditorWidget(QWidget *parent)
|
||||||
: QAbstractScrollArea(parent), d(new BinEditorWidgetPrivate(this))
|
: QAbstractScrollArea(parent), d(new BinEditorWidgetPrivate(this))
|
||||||
{
|
{
|
||||||
m_bytesPerLine = 16;
|
|
||||||
m_ieditor = nullptr;
|
|
||||||
m_baseAddr = 0;
|
|
||||||
m_blockSize = 4096;
|
|
||||||
m_size = 0;
|
|
||||||
m_addressBytes = 4;
|
|
||||||
init();
|
init();
|
||||||
m_unmodifiedState = 0;
|
|
||||||
m_readOnly = false;
|
|
||||||
m_hexCursor = true;
|
|
||||||
m_cursorPosition = 0;
|
|
||||||
m_anchorPosition = 0;
|
|
||||||
m_lowNibble = false;
|
|
||||||
m_cursorVisible = false;
|
|
||||||
m_caseSensitiveSearch = false;
|
|
||||||
m_canRequestNewWindow = false;
|
|
||||||
setFocusPolicy(Qt::WheelFocus);
|
setFocusPolicy(Qt::WheelFocus);
|
||||||
setFrameStyle(QFrame::Plain);
|
setFrameStyle(QFrame::Plain);
|
||||||
|
|
||||||
|
@@ -155,12 +155,12 @@ private:
|
|||||||
using BlockMap = QMap<qint64, QByteArray>;
|
using BlockMap = QMap<qint64, QByteArray>;
|
||||||
BlockMap m_data;
|
BlockMap m_data;
|
||||||
BlockMap m_oldData;
|
BlockMap m_oldData;
|
||||||
int m_blockSize;
|
int m_blockSize = 4096;
|
||||||
BlockMap m_modifiedData;
|
BlockMap m_modifiedData;
|
||||||
mutable QSet<qint64> m_requests;
|
mutable QSet<qint64> m_requests;
|
||||||
QByteArray m_emptyBlock;
|
QByteArray m_emptyBlock;
|
||||||
QByteArray m_lowerBlock;
|
QByteArray m_lowerBlock;
|
||||||
qint64 m_size;
|
qint64 m_size = 0;
|
||||||
|
|
||||||
int dataIndexOf(const QByteArray &pattern, qint64 from, bool caseSensitive = true) const;
|
int dataIndexOf(const QByteArray &pattern, qint64 from, bool caseSensitive = true) const;
|
||||||
int dataLastIndexOf(const QByteArray &pattern, qint64 from, bool caseSensitive = true) const;
|
int dataLastIndexOf(const QByteArray &pattern, qint64 from, bool caseSensitive = true) const;
|
||||||
@@ -180,32 +180,32 @@ private:
|
|||||||
void asDouble(qint64 offset, double &value, bool old) const;
|
void asDouble(qint64 offset, double &value, bool old) const;
|
||||||
QString toolTip(const QHelpEvent *helpEvent) const;
|
QString toolTip(const QHelpEvent *helpEvent) const;
|
||||||
|
|
||||||
int m_bytesPerLine;
|
int m_bytesPerLine = 16;
|
||||||
int m_unmodifiedState;
|
int m_unmodifiedState = 0;
|
||||||
int m_readOnly;
|
int m_readOnly = false;
|
||||||
int m_margin;
|
int m_margin = 0;
|
||||||
int m_descent;
|
int m_descent = 0;
|
||||||
int m_ascent;
|
int m_ascent = 0;
|
||||||
int m_lineHeight;
|
int m_lineHeight = 0;
|
||||||
int m_charWidth;
|
int m_charWidth = 0;
|
||||||
int m_labelWidth;
|
int m_labelWidth = 0;
|
||||||
int m_textWidth;
|
int m_textWidth = 0;
|
||||||
int m_columnWidth;
|
int m_columnWidth = 0;
|
||||||
qint64 m_numLines;
|
qint64 m_numLines = 0;
|
||||||
qint64 m_numVisibleLines;
|
qint64 m_numVisibleLines = 0;
|
||||||
|
|
||||||
quint64 m_baseAddr;
|
quint64 m_baseAddr = 0;
|
||||||
|
|
||||||
bool m_cursorVisible;
|
qint64 m_cursorPosition = 0;
|
||||||
qint64 m_cursorPosition;
|
qint64 m_anchorPosition = 0;
|
||||||
qint64 m_anchorPosition;
|
bool m_cursorVisible = false;
|
||||||
bool m_hexCursor;
|
bool m_hexCursor = true;
|
||||||
bool m_lowNibble;
|
bool m_lowNibble = false;
|
||||||
bool m_isMonospacedFont;
|
bool m_isMonospacedFont = true;
|
||||||
|
bool m_caseSensitiveSearch = false;
|
||||||
|
|
||||||
QByteArray m_searchPattern;
|
QByteArray m_searchPattern;
|
||||||
QByteArray m_searchPatternHex;
|
QByteArray m_searchPatternHex;
|
||||||
bool m_caseSensitiveSearch;
|
|
||||||
|
|
||||||
QBasicTimer m_cursorBlinkTimer;
|
QBasicTimer m_cursorBlinkTimer;
|
||||||
|
|
||||||
@@ -236,10 +236,10 @@ private:
|
|||||||
QStack<BinEditorEditCommand> m_undoStack, m_redoStack;
|
QStack<BinEditorEditCommand> m_undoStack, m_redoStack;
|
||||||
|
|
||||||
QBasicTimer m_autoScrollTimer;
|
QBasicTimer m_autoScrollTimer;
|
||||||
Core::IEditor *m_ieditor;
|
Core::IEditor *m_ieditor = nullptr;
|
||||||
QString m_addressString;
|
QString m_addressString;
|
||||||
int m_addressBytes;
|
int m_addressBytes = 4;
|
||||||
bool m_canRequestNewWindow;
|
bool m_canRequestNewWindow = false;
|
||||||
QList<Markup> m_markup;
|
QList<Markup> m_markup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user