Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.0 Beta1
-
None
-
-
8
-
3f54c71b7 (dev), 1aedd4d7c (dev), 6c21f8103 (6.8), c3477a737 (6.8), fce31df44 (6.7), 850e27668 (6.7), 4636c0212 (tqtc/lts-6.5), 2399caabf (tqtc/lts-6.5), 80d93bafc (tqtc/lts-6.2), 1162989eb (tqtc/lts-6.2), 6ce758ccb (dev), 5e947802b (6.8), 9633a296e (dev)
-
Foundation Sprint 112, Foundation Sprint 113
Description
qvsnprintf.cpp has a fall-back implementation in case QT_VSNPRINTF isn't defined by qplatformdefs.h. However, it's horribly slow: QString::asprintf().toLocal8Bit() + another memcy().
The qplatformdefs.h's of affected platforms contain
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
It seems we're either not setting the correct #define ahead of #include <unistd.h> or these #ifdef's are just outdated.
Since we kinda require C99 these days, the function should be universally available.
Acceptance criteria:
- The fall-back is removed and replaced by
#ifndef QT_VSNPRINTF #error Need to define QT_VSNPRINTF in qplatformdefs.h. #endif
Attachments
For Gerrit Dashboard: QTBUG-127110 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
576067,2 | WASM: unconditionally define QT_(V)SNPRINTF | dev | qt/qtbase | Status: ABANDONED | +2 | +1 |
576931,3 | qvsnprintf: remove QString::asprintf() work-around | dev | qt/qtbase | Status: ABANDONED | 0 | +1 |
576932,2 | qvsnprintf: remove Windows work-around | dev | qt/qtbase | Status: ABANDONED | +2 | +1 |
577310,2 | q(v)snprintf(): mark the functions as \obsolete | dev | qt/qtbase | Status: MERGED | +2 | 0 |
577311,3 | [docs] qvsnprint(): mention %a and %ls differences on WASM/Android | dev | qt/qtbase | Status: MERGED | +2 | 0 |
577312,11 | Introduce QT_NO_QSNPRINTF and mark QtCore as qsnprintf-free | dev | qt/qtbase | Status: MERGED | +2 | 0 |
577348,6 | Make headers QT_NO_QSNPRINTF-clean | dev | qt/qtbase | Status: MERGED | +2 | 0 |
577364,2 | q(v)snprintf(): mark the functions as \obsolete | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
577365,2 | [docs] qvsnprint(): mention %a and %ls differences on WASM/Android | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
577398,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | dev | qt/qtconnectivity | Status: MERGED | +2 | +1 |
577423,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
577434,2 | Fix some qsnprintf() issues | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
577435,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | dev | qt/qtquick3d | Status: MERGED | +2 | +1 |
577495,2 | q(v)snprintf(): mark the functions as \obsolete | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
577500,2 | [docs] qvsnprint(): mention %a and %ls differences on WASM/Android | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
577560,2 | q(v)snprintf(): mark the functions as \obsolete | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
577563,2 | [docs] qvsnprint(): mention %a and %ls differences on WASM/Android | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
577574,2 | q(v)snprintf(): mark the functions as \obsolete | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
577575,2 | [docs] qvsnprint(): mention %a and %ls differences on WASM/Android | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
577670,2 | q(v)snprintf(): mark the functions as \obsolete | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
577679,2 | Fix some qsnprintf() issues | 6.8 | qt/qtquick3d | Status: MERGED | +2 | 0 |
578077,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | 6.8 | qt/qtquick3d | Status: MERGED | +2 | 0 |
578087,4 | Enable QT_NO_QSNPRINTF globally | dev | qt/qtbase | Status: MERGED | +2 | 0 |
578136,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | 6.8 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
579415,5 | Add __attribute__((format(printf()))) to q(v)nprintf() | dev | qt/qtbase | Status: MERGED | +2 | +1 |
579467,2 | Fix -Wformat issues in our headers | dev | qt/qtbase | Status: MERGED | +2 | 0 |
579746,2 | Fix -Wformat issues in our headers | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580055,4 | Deprecate q(v)snprintf() | dev | qt/qtbase | Status: MERGED | +2 | +1 |
580076,4 | Fix -Wformat issues in our headers | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
580085,2 | Fix some qsnprintf() issues | 6.7 | qt/qtquick3d | Status: ABANDONED | +2 | +1 |
580405,2 | Port to std::snprintf() and mark the module qsnprintf()-clean | 6.8 | qt/qtwebengine | Status: MERGED | +2 | 0 |
580817,2 | Add __attribute__((format(printf()))) to q(v)nprintf() | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580845,3 | Introduce QT_NO_QSNPRINTF and mark QtCore as qsnprintf-free | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580847,3 | Make headers QT_NO_QSNPRINTF-clean | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580853,3 | Add __attribute__((format(printf()))) to q(v)nprintf() | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
581131,2 | Fix -Wformat issues in our headers | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
581133,2 | Add __attribute__((format(printf()))) to q(v)nprintf() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
581493,2 | Fix -Wformat issues in our headers | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
581495,2 | Add __attribute__((format(printf()))) to q(v)nprintf() | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
581591,3 | Fix -Wformat issues in our headers | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
581594,4 | Add __attribute__((format(printf()))) to q(v)nprintf() | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | +1 |
582398,2 | Enable QT_NO_QSNPRINTF globally | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |