Skip to content

Commit

Permalink
Update QHexEdit library to 0.8.3
Browse files Browse the repository at this point in the history
This adds support for editing the ASCII data on the right side of the
hex editor widget.
  • Loading branch information
MKleusberg committed Feb 14, 2017
1 parent 81c0cf3 commit b5345fe
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 129 deletions.
3 changes: 1 addition & 2 deletions libs/qhexedit/qhexedit.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TEMPLATE = lib

QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
QT += core gui widgets

CONFIG += staticlib
CONFIG += debug_and_release
Expand Down
8 changes: 4 additions & 4 deletions libs/qhexedit/src/chunks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

// ***************************************** Constructors and file settings

Chunks::Chunks()
Chunks::Chunks(QObject *parent): QObject(parent)
{
QBuffer *buf = new QBuffer();
QBuffer *buf = new QBuffer(this);
setIODevice(*buf);
}

Chunks::Chunks(QIODevice &ioDevice)
Chunks::Chunks(QIODevice &ioDevice, QObject *parent): QObject(parent)
{
setIODevice(ioDevice);
}
Expand All @@ -32,7 +32,7 @@ bool Chunks::setIODevice(QIODevice &ioDevice)
}
else // Fallback is an empty buffer
{
QBuffer *buf = new QBuffer();
QBuffer *buf = new QBuffer(this);
_ioDevice = buf;
_size = 0;
}
Expand Down
7 changes: 4 additions & 3 deletions libs/qhexedit/src/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ struct Chunk
qint64 absPos;
};

class Chunks
class Chunks: public QObject
{
Q_OBJECT
public:
// Constructors and file settings
Chunks();
Chunks(QIODevice &ioDevice);
Chunks(QObject *parent);
Chunks(QIODevice &ioDevice, QObject *parent);
bool setIODevice(QIODevice &ioDevice);

// Getting data out of Chunks
Expand Down
Loading

0 comments on commit b5345fe

Please sign in to comment.