D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
bcooksley added inline comments. INLINE COMMENTS > dhaumann wrote in kformatprivate.cpp:121 > Would it make sense to mention with which MSVC version this was tested? At > some point in time, this may be fixed, and then the comment is wrong. For the record, the current version of MSVC in use is 19.14.26430.0 (MSVS 2017, v15.7.3) REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14122 To: bruns, #frameworks, kossebau, bcooksley Cc: dhaumann, kde-frameworks-devel, michaelh, ngraham, bruns
D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
dhaumann added inline comments. INLINE COMMENTS > kformatprivate.cpp:121 > { KFormat::UnitPrefix::Nano, 1e-9, bpow(-30), u'n' }, > -{ KFormat::UnitPrefix::Micro, 1e-6, bpow(-20), u'µ' }, > +// Thanks to broken MSVC, we can not use u'µ', but have to use the > unicode codepoint > +{ KFormat::UnitPrefix::Micro, 1e-6, bpow(-20), QChar(0xB5) }, Would it make sense to mention with which MSVC version this was tested? At some point in time, this may be fixed, and then the comment is wrong. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14122 To: bruns, #frameworks, kossebau, bcooksley Cc: dhaumann, kde-frameworks-devel, michaelh, ngraham, bruns
D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
This revision was automatically updated to reflect the committed changes. Closed by commit R244:5c3f5eade4cc: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build (authored by bruns). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D14122?vs=37776=37819#toc REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D14122?vs=37776=37819 REVISION DETAIL https://phabricator.kde.org/D14122 AFFECTED FILES src/lib/util/kformatprivate.cpp To: bruns, #frameworks, kossebau, bcooksley Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
bcooksley accepted this revision. bcooksley added a comment. This revision is now accepted and ready to land. Thanks for uploading this, that looks fine to me! REPOSITORY R244 KCoreAddons BRANCH msvc_fix REVISION DETAIL https://phabricator.kde.org/D14122 To: bruns, #frameworks, kossebau, bcooksley Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
bruns added a dependency: D14121: KFormat: Add unit tests for mili/micro SI prefixes. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D14122 To: bruns, #frameworks, kossebau, bcooksley Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D14122: KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
bruns created this revision. bruns added reviewers: Frameworks, kossebau, bcooksley. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. bruns requested review of this revision. REVISION SUMMARY MSVC is unable to parse UTF-8 sequences when the file has no BOM (byte order mark), and fails with "error C2015: too many characters in constant". TEST PLAN run kformattest unit test REPOSITORY R244 KCoreAddons BRANCH msvc_fix REVISION DETAIL https://phabricator.kde.org/D14122 AFFECTED FILES src/lib/util/kformatprivate.cpp To: bruns, #frameworks, kossebau, bcooksley Cc: kde-frameworks-devel, michaelh, ngraham, bruns