Ref T404, fixed the UTF issues for hotkeys

* QStringLiteral expects UTF16 for MSVC compilers
* we use descriptive names now
* UTF flag for MSVC compilers
* added the SLACK discussion as comment under https://dev.swift-project.org/T404
This commit is contained in:
Klaus Basan
2018-11-07 23:24:31 +01:00
parent 021a9a53e5
commit 180214e4f0
2 changed files with 10 additions and 2 deletions

View File

@@ -70,6 +70,14 @@ contains(BLACK_CONFIG, ProfileRelease) {
msvc:!llvm: QMAKE_CXXFLAGS *= /bigobj msvc:!llvm: QMAKE_CXXFLAGS *= /bigobj
################################
# Force UTF-8 source code in MSVC
################################
msvc: QMAKE_CXXFLAGS *= /utf-8
# msvc: QMAKE_CXXFLAGS *= /source-charset:utf-8
# /utf-8 sets both the source charset and execution charset to UTF-8
################################ ################################
# No gigantic MinGW obj files # No gigantic MinGW obj files
################################ ################################

View File

@@ -57,8 +57,8 @@ namespace BlackMisc
switch (m_keyCode) switch (m_keyCode)
{ {
case Key_Multiply: return QStringLiteral("×"); case Key_Multiply: return QStringLiteral("NumMultiply"); // return QStringLiteral(u"×");
case Key_Divide: return QStringLiteral("÷"); case Key_Divide: return QStringLiteral("NumDivide"); // return QStringLiteral(u"÷");
case Key_Numpad0: return QStringLiteral("Num0"); case Key_Numpad0: return QStringLiteral("Num0");
case Key_Numpad1: return QStringLiteral("Num1"); case Key_Numpad1: return QStringLiteral("Num1");
case Key_Numpad2: return QStringLiteral("Num2"); case Key_Numpad2: return QStringLiteral("Num2");