Build
- Use absolute file paths by using $$PWD variable. - Adds unit testing project + unit-test for serialization. - Adds ADS_IMPORT define possibility for static code include. Core - Fixes usage of QBuffer.. missed the QBuffer::open() call..
This commit is contained in:
@@ -7,7 +7,9 @@ class QSplitter;
|
||||
|
||||
// DLL Export API
|
||||
#ifdef _WIN32
|
||||
#ifdef ADS_EXPORT
|
||||
#if defined(ADS_IMPORT)
|
||||
#define ADS_EXPORT_API
|
||||
#elif defined(ADS_EXPORT)
|
||||
#define ADS_EXPORT_API __declspec(dllexport)
|
||||
#else
|
||||
#define ADS_EXPORT_API __declspec(dllimport)
|
||||
|
||||
@@ -129,9 +129,10 @@ class InMemoryWriter
|
||||
{
|
||||
public:
|
||||
InMemoryWriter();
|
||||
bool write(OffsetsHeaderEntry::Type type, const QByteArray& data);
|
||||
bool write(qint32 entryType, const QByteArray& data);
|
||||
bool write(const SectionIndexData& data);
|
||||
QByteArray toByteArray() const;
|
||||
qint32 offsetsCount() const { return _offsetsHeader.entriesCount; }
|
||||
|
||||
private:
|
||||
QBuffer _contentBuffer;
|
||||
@@ -146,12 +147,11 @@ class InMemoryReader
|
||||
public:
|
||||
InMemoryReader(const QByteArray& data);
|
||||
bool initReadHeader();
|
||||
bool read(OffsetsHeaderEntry::Type type, QByteArray &data);
|
||||
bool read(qint32 entryType, QByteArray &data);
|
||||
qint32 offsetsCount() const { return _offsetsHeader.entriesCount; }
|
||||
|
||||
private:
|
||||
QByteArray _data;
|
||||
QBuffer _buff;
|
||||
|
||||
OffsetsHeader _offsetsHeader;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user