diff options
Diffstat (limited to 'externals/qhexedit')
| -rw-r--r-- | externals/qhexedit/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | externals/qhexedit/qhexedit_p.cpp | 4 | ||||
| -rw-r--r-- | externals/qhexedit/qhexedit_p.h | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/externals/qhexedit/CMakeLists.txt b/externals/qhexedit/CMakeLists.txt index 29ed5d2ba..b1f631f95 100644 --- a/externals/qhexedit/CMakeLists.txt +++ b/externals/qhexedit/CMakeLists.txt | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | set(CMAKE_AUTOMOC ON) | 1 | set(CMAKE_AUTOMOC ON) |
| 2 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
| 2 | 3 | ||
| 3 | set(SRCS | 4 | set(SRCS |
| 4 | commands.cpp | 5 | commands.cpp |
| @@ -10,6 +11,8 @@ set(HEADERS | |||
| 10 | qhexedit.h | 11 | qhexedit.h |
| 11 | qhexedit_p.h) | 12 | qhexedit_p.h) |
| 12 | 13 | ||
| 13 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
| 14 | |||
| 15 | add_library(qhexedit STATIC ${SRCS} ${HEADERS}) | 14 | add_library(qhexedit STATIC ${SRCS} ${HEADERS}) |
| 15 | if(USE_QT5) | ||
| 16 | target_link_libraries(qhexedit Qt5::Core Qt5::Widgets) | ||
| 17 | endif() | ||
| 18 | |||
diff --git a/externals/qhexedit/qhexedit_p.cpp b/externals/qhexedit/qhexedit_p.cpp index c16f4ce4d..2a6885de8 100644 --- a/externals/qhexedit/qhexedit_p.cpp +++ b/externals/qhexedit/qhexedit_p.cpp | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | #include <QtGui> | ||
| 2 | |||
| 3 | #include "qhexedit_p.h" | 1 | #include "qhexedit_p.h" |
| 4 | #include "commands.h" | 2 | #include "commands.h" |
| 5 | 3 | ||
| @@ -437,7 +435,7 @@ void QHexEditPrivate::keyPressEvent(QKeyEvent *event) | |||
| 437 | if (!_readOnly) | 435 | if (!_readOnly) |
| 438 | { | 436 | { |
| 439 | /* Hex input */ | 437 | /* Hex input */ |
| 440 | int key = int(event->text()[0].toAscii()); | 438 | int key = int(event->text()[0].toLatin1()); |
| 441 | if ((key>='0' && key<='9') || (key>='a' && key <= 'f')) | 439 | if ((key>='0' && key<='9') || (key>='a' && key <= 'f')) |
| 442 | { | 440 | { |
| 443 | if (getSelectionBegin() != getSelectionEnd()) | 441 | if (getSelectionBegin() != getSelectionEnd()) |
diff --git a/externals/qhexedit/qhexedit_p.h b/externals/qhexedit/qhexedit_p.h index 138139b90..1c2c11cc2 100644 --- a/externals/qhexedit/qhexedit_p.h +++ b/externals/qhexedit/qhexedit_p.h | |||
| @@ -5,6 +5,9 @@ | |||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | #include <QtGui> | 7 | #include <QtGui> |
| 8 | #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) | ||
| 9 | #include <QtWidgets> | ||
| 10 | #endif | ||
| 8 | #include "xbytearray.h" | 11 | #include "xbytearray.h" |
| 9 | 12 | ||
| 10 | class QHexEditPrivate : public QWidget | 13 | class QHexEditPrivate : public QWidget |