You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.7.3 was not compiling with gcc 3.4.2 on MINGW - yes I know it's a very old gcc version - but that's what I am on and the fix was simple - wrap 64-bit literals with Q_INT64_C()
Another issue I faced was that sometimes the Widget after creation would be set to readonly and I was unable to edit contents. My code never touches the readOnly property. Looking at the qhexedit.cpp, I see that _readOnly is never explicitly initialized - so I guess this could happen?
Here's a patch for both issues -
diff --git a/extra/qhexedit2/src/chunks.cpp b/extra/qhexedit2/src/chunks.cpp--- a/extra/qhexedit2/src/chunks.cpp+++ b/extra/qhexedit2/src/chunks.cpp@@ -6,7 +6,7 @@
#define BUFFER_SIZE 0x10000
#define CHUNK_SIZE 0x1000
-#define READ_CHUNK_MASK 0xfffffffffffff000+#define READ_CHUNK_MASK Q_INT64_C(0xfffffffffffff000)
// ***************************************** Constructors and file settings
diff --git a/extra/qhexedit2/src/qhexedit.cpp b/extra/qhexedit2/src/qhexedit.cpp--- a/extra/qhexedit2/src/qhexedit.cpp+++ b/extra/qhexedit2/src/qhexedit.cpp@@ -98,7 +98,7 @@ int QHexEdit::addressWidth()
{
qint64 size = _chunks->size();
int n = 1;
- if (size > 0x100000000){ n += 8; size /= 0x100000000;}+ if (size > Q_INT64_C(0x100000000)){ n += 8; size /= Q_INT64_C(0x100000000);}
if (size > 0x10000){ n += 4; size /= 0x10000;}
if (size > 0x100){ n += 2; size /= 0x100;}
if (size > 0x10){ n += 1; size /= 0x10;}
@@ -858,6 +858,7 @@ void QHexEdit::init()
setCursorPosition(0);
verticalScrollBar()->setValue(0);
_modified = false;
+ _readOnly = false;
}
void QHexEdit::adjust()
The text was updated successfully, but these errors were encountered:
v0.7.3 was not compiling with gcc 3.4.2 on MINGW - yes I know it's a very old gcc version - but that's what I am on and the fix was simple - wrap 64-bit literals with Q_INT64_C()
Another issue I faced was that sometimes the Widget after creation would be set to readonly and I was unable to edit contents. My code never touches the readOnly property. Looking at the qhexedit.cpp, I see that _readOnly is never explicitly initialized - so I guess this could happen?
Here's a patch for both issues -
The text was updated successfully, but these errors were encountered: