mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 21:47:58 -05:00
Add Qt5 option. Use Qt5 by default.
This commit is contained in:
7
externals/qhexedit/CMakeLists.txt
vendored
7
externals/qhexedit/CMakeLists.txt
vendored
@ -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()
|
||||
|
||||
|
4
externals/qhexedit/qhexedit_p.cpp
vendored
4
externals/qhexedit/qhexedit_p.cpp
vendored
@ -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())
|
||||
|
3
externals/qhexedit/qhexedit_p.h
vendored
3
externals/qhexedit/qhexedit_p.h
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user