diff --git a/src/commands.cpp b/src/commands.cpp index 4dfb8fb..5b99cbf 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -27,11 +27,13 @@ class CharCommand : public QUndoCommand CharCommand::CharCommand(Chunks * chunks, CCmd cmd, qint64 charPos, char newChar, QUndoCommand *parent) : QUndoCommand(parent) + , _chunks(chunks) + , _charPos(charPos) + , _wasChanged(false) + , _newChar(newChar) + , _oldChar('\0') + , _cmd(cmd) { - _chunks = chunks; - _charPos = charPos; - _newChar = newChar; - _cmd = cmd; } bool CharCommand::mergeWith(const QUndoCommand *command) diff --git a/src/qhexedit.cpp b/src/qhexedit.cpp index 34409dd..732ff81 100644 --- a/src/qhexedit.cpp +++ b/src/qhexedit.cpp @@ -11,23 +11,22 @@ // ********************************************************************** Constructor, destructor QHexEdit::QHexEdit(QWidget *parent) : QAbstractScrollArea(parent) + , _addressArea(true) + , _addressWidth(4) + , _asciiArea(true) + , _bytesPerLine(16) + , _hexCharsInLine(47) + , _highlighting(true) + , _overwriteMode(true) + , _readOnly(false) + , _hexCaps(false) + , _dynamicBytesPerLine(false) + , _editAreaIsAscii(false) + , _chunks(new Chunks(this)) + , _cursorPosition(0) + , _lastEventSize(0) + , _undoStack(new UndoStack(_chunks, this)) { - _addressArea = true; - _addressWidth = 4; - _asciiArea = true; - _overwriteMode = true; - _highlighting = true; - _readOnly = false; - _cursorPosition = 0; - _lastEventSize = 0; - _hexCharsInLine = 47; - _bytesPerLine = 16; - _editAreaIsAscii = false; - _hexCaps = false; - _dynamicBytesPerLine = false; - - _chunks = new Chunks(this); - _undoStack = new UndoStack(_chunks, this); #ifdef Q_OS_WIN32 setFont(QFont("Courier", 10)); #else