summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorSacha <xsacha@gmail.com>2014-08-19 13:34:00 +0200
committerSacha <xsacha@gmail.com>2014-08-19 13:34:00 +0200
commit90f23020f53c94dab800f7348877aae483974512 (patch)
treedffeef80b636b9f8baee1f70820dc9536f7d8567 /externals
parentMerge pull request #55 from lioncash/string (diff)
downloadyuzu-90f23020f53c94dab800f7348877aae483974512.tar
yuzu-90f23020f53c94dab800f7348877aae483974512.tar.gz
yuzu-90f23020f53c94dab800f7348877aae483974512.tar.bz2
yuzu-90f23020f53c94dab800f7348877aae483974512.tar.lz
yuzu-90f23020f53c94dab800f7348877aae483974512.tar.xz
yuzu-90f23020f53c94dab800f7348877aae483974512.tar.zst
yuzu-90f23020f53c94dab800f7348877aae483974512.zip
Diffstat (limited to 'externals')
-rw-r--r--externals/qhexedit/CMakeLists.txt7
-rw-r--r--externals/qhexedit/qhexedit_p.cpp4
-rw-r--r--externals/qhexedit/qhexedit_p.h3
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 @@
set(CMAKE_AUTOMOC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(SRCS
commands.cpp
@@ -10,6 +11,8 @@ set(HEADERS
qhexedit.h
qhexedit_p.h)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
add_library(qhexedit STATIC ${SRCS} ${HEADERS})
+if(USE_QT5)
+ target_link_libraries(qhexedit Qt5::Core Qt5::Widgets)
+endif()
+
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 @@
-#include <QtGui>
-
#include "qhexedit_p.h"
#include "commands.h"
@@ -437,7 +435,7 @@ void QHexEditPrivate::keyPressEvent(QKeyEvent *event)
if (!_readOnly)
{
/* Hex input */
- int key = int(event->text()[0].toAscii());
+ int key = int(event->text()[0].toLatin1());
if ((key>='0' && key<='9') || (key>='a' && key <= 'f'))
{
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 @@
#include <QtGui>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include <QtWidgets>
+#endif
#include "xbytearray.h"
class QHexEditPrivate : public QWidget