Skip to content

Commit 900e450

Browse files
committed
fix: v2.3.7 RC1;
1 parent 9a3a810 commit 900e450

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

3rdparty/QHexView/document/qhexdocument.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ bool QHexDocument::existBookMark(qsizetype pos) {
390390
qsizetype QHexDocument::bookMarksCount() const { return _bookmarks.count(); }
391391

392392
void QHexDocument::applyBookMarks(const QMap<qsizetype, QString> &books) {
393-
if (books.size() >= QHEXVIEW_BOOKMARK_LIMIT) {
393+
if (books.size() > QHEXVIEW_BOOKMARK_LIMIT) {
394394
return;
395395
}
396396
_bookmarks = books;

3rdparty/QHexView/document/qhexmetadata.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ bool QHexMetadata::removeLineMetadata(const QHexMetadataItem &item) {
197197
[](const QPair<qsizetype, QHash<QHexMetadataItem, QHexLineMetadata>>
198198
&item) { return item.second.isEmpty(); });
199199
Q_EMIT metadataChanged();
200-
return r >= 0;
200+
return r > 0;
201201
}
202202

203203
bool QHexMetadata::removeMetadata(qsizetype offset) {
@@ -213,7 +213,7 @@ bool QHexMetadata::removeMetadata(qsizetype offset) {
213213

214214
auto r = m_metadata.removeIf(rmfn);
215215
Q_EMIT metadataChanged();
216-
return r >= 0;
216+
return r > 0;
217217
}
218218

219219
const QHexMetadataItem &QHexMetadata::at(qsizetype index) const {

src/class/workspacemanager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ bool WorkSpaceManager::saveWorkSpace(const QString &filename,
443443
}
444444

445445
jobj.insert("file", ff);
446-
jobj.insert("base", QString::number(data.infos.base, 16));
446+
jobj.insert("base", QString(QStringLiteral("0x") +
447+
QString::number(data.infos.base, 16)));
447448
jobj.insert("checksum", QString::fromUtf8(data.infos.checkSum.toHex()));
448449

449450
QJsonArray metas;

0 commit comments

Comments
 (0)