diff options
author | Evgeniy A. Dushistov <dushistov@mail.ru> | 2022-02-08 12:35:04 +0300 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-02-15 08:39:31 +0000 |
commit | 1d73f76faceb4b70b4eedab110400db7fddf6eb9 (patch) | |
tree | 0786596752bc85749c33fe8f40887ae39f008475 | |
parent | 4931b7aa30f256c20573d283561aa432fecf8f38 (diff) |
Fix parsing of float numbers with different locales
This MR merge last changes from litehtml, mainly for
https://github.com/litehtml/litehtml/commit/bb04a50f93e94de0aa9a0be0b9b6e7435051dbf6
to fix parsing CSS on machines with locales where "." is not decimial
delimiter. For example in french locale "," used for decimial delimter.
Change-Id: I8d50ed25e9717224078eaf48150c02281eeb2ae5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
m--------- | src/3rdparty/litehtml | 0 | ||||
-rw-r--r-- | src/container_qpainter.cpp | 2 | ||||
-rw-r--r-- | src/container_qpainter_p.h | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdparty/litehtml b/src/3rdparty/litehtml -Subproject 6236113734bb0a28467e5999e86fdd2834be8e0 +Subproject e7fa81d19b2f752f9f68b0494442f34a94e8f14 diff --git a/src/container_qpainter.cpp b/src/container_qpainter.cpp index ccd2591..ab11ce7 100644 --- a/src/container_qpainter.cpp +++ b/src/container_qpainter.cpp @@ -558,7 +558,7 @@ void DocumentContainerPrivate::draw_text(litehtml::uint_ptr hdc, painter->drawText(toQRect(pos), 0, QString::fromUtf8(text)); } -int DocumentContainerPrivate::pt_to_px(int pt) +int DocumentContainerPrivate::pt_to_px(int pt) const { // magic factor of 11/12 to account for differences to webengine/webkit return m_paintDevice->physicalDpiY() * pt * 11 / m_paintDevice->logicalDpiY() / 12; diff --git a/src/container_qpainter_p.h b/src/container_qpainter_p.h index 074f8d7..3d5267b 100644 --- a/src/container_qpainter_p.h +++ b/src/container_qpainter_p.h @@ -96,7 +96,7 @@ public: // document_container API litehtml::uint_ptr hFont, litehtml::web_color color, const litehtml::position &pos) override; - int pt_to_px(int pt) override; + int pt_to_px(int pt) const override; int get_default_font_size() const override; const litehtml::tchar_t *get_default_font_name() const override; void draw_list_marker(litehtml::uint_ptr hdc, const litehtml::list_marker &marker) override; |