summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qnumeric.h: fix build with FreeBSDThiago Macieira9 hours1-0/+2
| | | | | | | | | | | | | | | | Their stdckdint.h is broken for C++ and Clang's implementation just falls back to it. global/qnumeric.h:280:12: error: use of undeclared identifier '_Bool' 280 | return ckd_add(r, v1, v2); | ^ /usr/include/stdckdint.h:16:3: note: expanded from macro 'ckd_add' 16 | (_Bool)__builtin_add_overflow((a), (b), (result)) | ^ Pick-to: 6.10 Change-Id: Ide6f468820478f46d21ffffdb825c8c1977a99f2 Reviewed-by: Ahmad Samir <[email protected]>
* Doc: Fix broken link to the Sinclair ZX SpectrumJoerg Bornemann9 hours1-1/+1
| | | | | | | | | The page that describes the Sinclair ZX Spectrum has moved. Update the link. Pick-to: 6.10 Change-Id: I12d3f0f8aa38e2b426ee322a55518e2f742b8423 Reviewed-by: Paul Wicking <[email protected]>
* QChar: avoid char{32→16}_t narrowing in canonicalOrderHelper()Marc Mutz20 hours1-6/+14
| | | | | | | | | | | | | | | | | Same pattern as in the previous few patches: the old code used a char32_t to temporarily store a UTF-16 code point, narrowing it back to char16_t in a call to QChar::surrogateToUcs4(), triggering Clang 21 -Wcharacter-conversion. Solution is also the same: keep the UTF-16 code unit in a separate variable, until we have determined whether it needs surrogate decoding or merely promotion to char32_t. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: I955948348d637c4fe13485808bef47a4ee58f7bf Reviewed-by: Ahmad Samir <[email protected]>
* QChar: scope variables tigher in canonicalOrderHelper()Marc Mutz20 hours1-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code defined four variables outside a complex loop (with a nested goto). These can all be defined at their point of initialization, though, improving readability of the function (a tiny bit...), because the tighter scope makes it obvious that the loop isn't carrying state in these variables from one iteration to the next. The construction is safe, because, in C++, a backwards goto will destroy all variables declared after the label¹, iow: u2 and c2 are re-created by each jump though `advance`. Found while trying to fix char32_t → char16_t narrowing highlighted by Clang 21's -Wcharacter-conversion. Fix function has many other problems (most prominently, said goto), but they're out of scope of this immediate patch series, though they should eventually be fixed. This is security-critical code; we ought not have to deal with assembler-esque C++ code in such components. Amends f4d02ecdbf54987a0bada20fe8f8537e90c051d8. As a drive-by, change the c variables from char16_t back to ushort, because they don't represent characters, but character combining classes, partially reverting 7b04e0012b40203970f27869db2ab3e838ffe359. ¹ https://en.cppreference.com/w/cpp/language/goto.html#Explanation Pick-to: 6.10 6.8 6.5 Change-Id: If06356483bc77a16812d2790bd98f793bc74faa2 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QChar: avoid char{32→16}_t narrowing in normalizationQuickCheckHelper()Marc Mutz20 hours1-3/+6
| | | | | | | | | | | | | | | | | Same pattern as in the previous few patches: the old code used a char32_t to temporarily store a UTF-16 code point, narrowing it back to char16_t in a call to QChar::surrogateToUcs4(), triggering Clang 21 -Wcharacter-conversion. Solution is also the same: keep the UTF-16 code unit in a separate variable, until we have determined whether it needs surrogate decoding or merely promotion to char32_t. Amends 2e0a4b13addf1f56112bac38448be96fb02f650d. Pick-to: 6.10 6.8 6.5 Change-Id: I291871c73b26a1766c30f0c1c6858e09d9693678 Reviewed-by: Ahmad Samir <[email protected]>
* QChar: remove confusing foldCase(ch, ch&) overloadMarc Mutz20 hours2-12/+1
| | | | | | | | | | | | | | | | | For years, I've been confused by the various foldCase() overloads, until Clang 21 -Wcharacter-conversion now forced me down the rabbit hole. Turns out that there's just one user of the ch,ch& overload and it's readily ported to the ch*,ch* overload, so do that and remove the now-unused overload. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: I8ddd22b08423540f58c1a5fe0ef36c93c8b337f1 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QChar: avoid char{32→16}_t narrowing in foldCase(char16_t*, char16_t*)Marc Mutz20 hours1-4/+6
| | | | | | | | | | | | | | | | | | | ... which triggers Clang 21 -Wcharacter-conversion. Instead of using the char32_t ucs4 variable to temporarily store the read from *ch, keep using *ch until we have determined whether it needs to be decoded as a surrogate pair or can simply be promoted to char32_t. Since this touches most lines of the function, anyway, take the opportunity to rename the first argument from 'ch' to 'cur', and change pointer arithmetic to indexing operations. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: I47a026fd509da8fa3dee4b6be30ac4432148d9c6 Reviewed-by: Ahmad Samir <[email protected]>
* QChar: fix the signature of foldCase(char32_t, char32_t&)Marc Mutz20 hours2-5/+5
| | | | | | | | | | | | | | | | | | | | | | | The only caller, ucstricmp(), passes UTF-16 code units, as implied by the implementation of foldCase(char32_t, char32_t&) (which decodes surrogate pairs, which shouldn't exist in UTF-32, and, if they do, not be decoded). Of course, the accumulator variables were char32_t, but only because C++ enforces this, due to the foldCase() signature. Fix by taking both arguments as char16_t instead of char32_t. As a drive-by, don't store the first argument in a char32_t and then narrow it for the QChar::*surrogate*() calls, use the argument instead. Found by Clang 21's -Wcharacter-conversion. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: Ic08b695749d7f68353a4af8703eb6a86ba88d567 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QChar: avoid char{32→16}_t narrowing in (de)composeHelper()Marc Mutz20 hours1-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The old code used a char32_t to temporarily store a UTF-16 code point. Upon finding it to be a surrogate, it then had to narrow it back to char16_t for the call to QChar::surrogateToUcs4(). It also invoked QChar(uint), a ctor which should have never existed to begin with. Rewrite the functions to keep the UTF-16 code point in a char16_t variable until it's inspected to be either safe for promotion to char32_t or else has been decoded (or decoding failed). This requires to write 'uc = c' twice instead of once, but allows us to add a comment on the failed-decoding path to guide the reader of the code, improving readability. Specifically declare `uc` as uninit'ed to provoke compiler warnings when code is changed to forget to assign to `uc`. Found by Clang 21's -Wcharacter-conversion. Amends the start of the public history. Pick-to: 6.10 6.8 6.5 Change-Id: I8d43b4c0e0b3852ddf730f349886bd6943b94f17 Reviewed-by: Ahmad Samir <[email protected]>
* QCborValue: rewrite nextUtf32Character to avoid narrowing char32_t → char16_tMarc Mutz20 hours1-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Ought to fix Clang 21 -Wcharacter-conversion in this function. Instead of storing the initial *ptr in r.c (a char32_t) and then narrowing it back to char16_t for the call to QChar::surrogateToUcs4(), store it in a separate variable and construct an R only in the return statement. Also move the len = 1 return from the end of the function to the (inverted) if (c < 0x80) near the start of the function. This is less assmebler-esque, so might execute slower (though it's all values, so the optimizer should have no problem rewirting this to the old code, if that was faster), but is much easier to read, which is not the sneezed at in a security-critical component. Amends d4c7da9a07dc1434692fe08a61ba22c794574c4f. Pick-to: 6.10 6.8 6.5 Change-Id: I1ce610fa80e3d874106c9c5b3a1d50bf99f39732 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* QTimer: fix clang -Wshorten-64-to-32 warningsAhmad Samir40 hours1-11/+16
| | | | | | | | | | | | | | std::chrono::milliseconds::count() does not return int, so assigning the result to an int variable triggers said warning. Fix by using q26::saturate_cast<int> and checking (or asserting) that the value didn't change. Amends 1ca89b65d85c5df971fac7c1f9d5678e0e0cf45b. Pick-to: 6.10 6.8 Change-Id: I419c931d04b533402335568cc2e9569cc627f117 Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QArrayDataOps::assign: improve for forward iterators (typical case)Thiago Macieira45 hours2-18/+48
| | | | | | | | | | | | | Similar to commit 7ed2db674328f1c96d06be5ffb15b8ffefeae545, which did this for QVarLengthArray. This disentangles the forward iterator case from the more complex, iterative input-only iterator one, because we know the final size from the beginning. This generates far better code for the more common uses of random-access iterators and especially that of trivial types. Change-Id: Ib71e489ae0dafb7a917bfffd3441d8c14b82ad46 Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QArrayDataOps::assign: simplify undoing the prepend optim. for trivialsThiago Macieira45 hours1-1/+6
| | | | | | | | | | | | | | | Since they are trivial, we don't need to loop destroying anything (dead code anyway), so help the compiler out and always store the new capacity begin. This may be storing the value that was already there if no element was removed from the beginning of the list, but it does remove a conditional. Further, this removes the entire looping over the prepend optimization buffer for new elements. We'll fall straight to the main assignment loop. Change-Id: I5338b6a53bffbda17a08fffd1d7eda72d57eff29 Reviewed-by: Fabian Kosmale <[email protected]>
* QArrayDataOps::assign: invert how we find the beginning of the capacityThiago Macieira45 hours1-12/+14
| | | | | | | | | | | | | | | Ideally the equation would be the same: offset = this->ptr - Data::dataStart(d, alignment); capacityBegin = this->ptr - offset; => capacityBegin = Data::dataStart(d, alignment) But codegen isn't as simple as that, so invert and use QADP::dataStart() to calculate the beginning of the allocated capacity and only if needed calculate how many elements we must destroy/overwrite. Change-Id: Ib716ed04c4684964ec0dfffd473c635456062bde Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QArrayDataOps::assign: reuse capacity if this is the last referenceThiago Macieira45 hours1-3/+17
| | | | | | | | | It's a waste to allocate new memory, then deref the old and free it, if we can still use it. This detach-me-for-growth code may be useful in other places too. Change-Id: Ie4d7300589ff21b0aa03fffdb7a74c01c385d842 Reviewed-by: Volker Hilsheimer <[email protected]>
* QArrayDataOps::assign: make the detaching case common to all iterator typesThiago Macieira45 hours1-9/+7
| | | | | | | | This only simplifies the code and enforces offset = size = 0 if we've just detached. Change-Id: Ia5d667fc0f528eaa154bfffde155e28f54f7a8ff Reviewed-by: Fabian Kosmale <[email protected]>
* QArrayDataOps: move assign() from QArrayDataPointerThiago Macieira45 hours5-101/+99
| | | | | | | | The implementation was already using the Ops (like in (*this)->emplace), so this is only natural. We want to access the extra operations anyway. Change-Id: Id1f422be54154f2c41b0fffd416dcb1916e8f022 Reviewed-by: Ahmad Samir <[email protected]>
* QNativeSocketEnginePrivate::setOption: simplify ugly perror() handlingThiago Macieira3 days1-13/+10
| | | | | | | | | | | With a macro. Drive-by clean up the VxWorks implementation of NonBlockingSocketOption, as we know v == 1 on input. Pick-to: 6.10 6.9 6.8 Change-Id: I917f5f39ded2fa338803fffd91002fca28d7faaa Reviewed-by: Mårten Nordheim <[email protected]>
* QApplication: reset WA_KeyboardFocusChange on focus changeChristian Ehrlicher3 days1-5/+9
| | | | | | | | | | | | | | | WA_KeyboardFocusChange is set when the user changes the focus by mouse but never cleared once the focus was changed e.g. with the mouse. The only way to clear it is to unfocus the whole top-level widget. This is results in focus rects in some style like fusion on checkboxes where there shouldn't be one. Fix it by clearing the attribute when the FocusReason is not keyboard. Fixes: QTBUG-141100 Pick-to: 6.10 Change-Id: I211e7f435c9fe748ee9925e35b481166b7446a55 Reviewed-by: Oliver Wolff <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Avoid float rounding errors in QDashStrokerRobert Löhning3 days1-2/+4
| | | | | | | | | | | | | | Calculations which should have a result of zero can lead to slightly different results when using floating point values. This patch fixes a case which could trigger an assert although all values passed to the public API were harmless. Credit to OSS-Fuzz for finding an SVG file which triggered this as issue 429123947. I derived the test from the values in the file. Pick-to: 6.10 6.8 Change-Id: I06d6f0f0bf6beb758f54423e16e9c5653ed8edf1 Reviewed-by: Eirik Aavitsland <[email protected]>
* qfloat16.h: scope warning suppression tighterMarc Mutz3 days1-4/+3
| | | | | | | | | | | | | | | | | The Clang -Wc99-extensions warning was fixed for Clang 5.0, and the function causing it (_cvtss_sh()) has since been replaced in commit c817b33b45f2886c89d8a768c61ffffaa46f67a4. That leaves the -Wold-style-cast suppression needed for _mm_cvtps_ph(), so put the suppression magic around just that call, amending 89c8dd30a12bbe44f4661a1b4dd5aec079e41cae. This exposes the rest of the function to warnings again, so not picking back, in case this unearths something. Once we have had a release cycle where this has caused no problems, we can reconsider. Change-Id: Ib489fd14c2337bfe64155ed5825c23f7a53b3cdc Reviewed-by: Ahmad Samir <[email protected]>
* QJsonParseError: fix clang -Wshorten-64-to-32 warningsAhmad Samir4 days2-2/+6
| | | | | | | | | Change it to qint64 in Qt7, as requested in code review, so as to make it easier to extend it in the future. Pick-to: 6.10 6.8 6.5 Change-Id: If893d719dd0457fac46fdd37ff95ce95222b1858 Reviewed-by: Thiago Macieira <[email protected]>
* Android: improve setting of platform window states and flagsAssam Boudjelthia4 days3-31/+15
| | | | | | | | | | | | | | | | | | | | | | | The current implementation had two issues: 1. Setting a flag before the window is shown has no effect, becuase the android platform window had its own flags data, but before the window is shown, the platform window isn't yet created, so that initial flag setting is lost. 2. The system UI was never updated when a flag has changed, as in the case of Qt::ExpandedClientAreaHint which affects the system the system UI visibility. This patch gets rid of rid of the platform window's separate internal tracking of states and flags to make things simpler. Also, it changes the way updateSystemUiVisibility() works by passing states/flags to it to be more flexible to handle all changes and cases. Fixes: QTBUG-140830 Pick-to: 6.10 6.8 6.5 Change-Id: Iff9f1b02a0a71320a3514e462de0cd6c1b8589fd Reviewed-by: Tor Arne Vestbø <[email protected]>
* Windows: Fix QWindowWindows::requestUpdateChristian Strømme4 days1-2/+4
| | | | | | | | | | | | | | It's very possible for the platform window to be released and recreated for a QWindow. We therefore still need to verify that we both have a platform window, and that it's the same window we triggered the update for. This change amends 31c38d5f766366931cd127f7323f9c26ac5de498 Fixes: QTBUG-141128 Pick-to: 6.10 Change-Id: Id6e3fcbe3c6d2d5aa30b2af256a74de2fc9e5f9e Reviewed-by: Tim Blechmann <[email protected]>
* Schannel: encode the peer name for SNIMårten Nordheim4 days1-1/+2
| | | | | | | | | | | | | | | Server Name Identification. We were just passing it to Schannel's API, which took a utf-16 string and then forwarded it to the network without changes. So instead we specifically pass it through QUrl and request it to encode any Unicode characters. Fixes: QTBUG-141061 Fixes: QTBUG-113028 Pick-to: 6.10 6.8 Change-Id: I33679c68e8e984deb92ff117bf5dd9d4fa4e351b Reviewed-by: Timur Pocheptsov <[email protected]>
* Fix implicit integer conversion loses build error on Intel VxWorksKarim Pinter4 days1-1/+1
| | | | | | | | | | | | | | | | Building Qt on VxWorks Intel platform results in implicit conversion loses integer precision build error. According to [1] the cast should be ok. [1] https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_extract_epi16&ig_expand=2927 Amends c817b33b45f2886c89d8a768c61ffffaa46f67a4. Fixes: QTBUG-140672 Pick-to: 6.10 6.8 6.5 Change-Id: Ic99dedac0cfc97ac84a9d0c9df24259bdab23e80 Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* QMenu: Do not close menu when seperator was clickedWladimir Leuschner4 days1-1/+1
| | | | | | | | | | Check before closing the menu, if the respective action is a seperator. In case it is a seperator do not close the menu. Fixes: QTBUG-141135 Pick-to: 6.10 Change-Id: I74127f2eaa2973be1f2355bd1aa21e9f9a67f234 Reviewed-by: Axel Spoerl <[email protected]>
* Doc: Create a group topic for listing user input examplesAlexei Cazacov4 days2-0/+13
| | | | | | | | | | | | This commit adds a new `\group` for user input and drag-and-drop examples. Previously, some of the examples from this group were orphaned topics and users could not navigate them by following links in docs. Task-number: QTBUG-140882 Pick-to: 6.10 Change-Id: I3dc9530a5c239b708ce2f1068e12c7aa25bcd2b8 Reviewed-by: Jerome Pasion <[email protected]>
* Doc: Fix CMake snippet on how to import Qt6*PrivateKai Köhne4 days2-4/+2
| | | | | | | | | | | | Commit e120fb78c94124fac0f9d381875c9de0721108ba does change the CMake API so that public Qt modules don't provide the targets of their private counterparts anymore. Adapt the snippets shown for CorePrivate, GuiPrivate accordingly. Pick-to: 6.10 Task-number: QTBUG-141152 Change-Id: I357f1e737e431c8e111dca2594b886e7567983cc Reviewed-by: Joerg Bornemann <[email protected]>
* QMacStyle: set NSStepperCell's control size to 'mini'Timur Pocheptsov4 days1-0/+5
| | | | | | | | | | | | | On macOS 26 this thing became rather large, not fitting into the simple clipping rectangle of a spinbox (in a native app such a stepper is taller than its controlled input, e.g. date/time edit). In Qt, with clipping applied, this looks not so nice; but by always setting the cell's control size to 'mini', we can have a properly looking spinbox, similar to what it was before. Fixes: QTBUG-140134 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I4c3798e84e602aceead5770963fde66e9c106e53 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* [docs] Discourage using namespace Qt;Marc Mutz5 days1-0/+4
| | | | | | | | | | It brings all the nested namespaces inside the Qt namespace into scope, which may have unwanted side effects. This is analogous to IWYU, but for `using namespace` directives. Pick-to: 6.10 6.8 6.5 Change-Id: I054a701458ca55915e5663e055b754c07b4007d4 Reviewed-by: Ahmad Samir <[email protected]>
* Mark remaining files in src/corelib/serialization as security-insignificantMarc Mutz5 days2-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The .gitignore file is obviously insignificant. The file format allows comments, so mark it. Invent a new reason string for that. The shell script is also insignificant. While it runs qlalr for the security-critical QtXmlStream classes, as a build-tool, it's not security-critical itself, and, unlike e.g. util/normalize/main.cpp, it doesn't itself contain code that ends up being compiled. Invent a new reason string for that. This completes the review of src/corelib/serialization: $ for i in $(find src/corelib/serialization -type f); do if ! grep -qE '^ *(//|#) *Qt[ -]Security +score:' "$i"; then echo "$i" fi done <nothing> QUIP: 23 Fixes: QTBUG-135194 Pick-to: 6.10 6.8 Change-Id: Id5d18244fe0e9d18b8891500a3a946ac530671a4 Reviewed-by: Edward Welbourne <[email protected]>
* Mark remaining corelib/text/*.qdoc files are insignificantMarc Mutz5 days2-0/+2
| | | | | | | | | | | | | | | | | | | This completes the security marking for this subdirectory: $ for i in $(find src/corelib/text -type f) ; do if ! grep -qE '^ *(//|#) .*Qt-Security +score:' "$i"; then echo "$i" fi done src/corelib/text/qt_attribution.json The JSON file was also explicitly marked in a previous commit. QUIP: 23 Fixes: QTBUG-135195 Pick-to: 6.10 6.8 Change-Id: Ia780a061541aa7f16d2b7303d91d747b31ccd2fb Reviewed-by: Matthias Rauter <[email protected]>
* Mark string collation classes as security-criticalMarc Mutz5 days7-0/+7
| | | | | | | | | | | | | | | | | QString and QByteArray are critical, too, and not because of their ownership semantics, but because of the algorithms operating on them. Collation is one of those algorithms. The headers are not decls-only, but they only contain trivial implementation (like (QChar*, int) -> QStringView forwarders, or the move SMFs or swap()), so are significant. QUIP: 23 Task-number: QTBUG-135195 Pick-to: 6.10 6.8 Change-Id: I2e3418fd74b12cbfa297576f25a37ec2ea050902 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Matthias Rauter <[email protected]>
* QUndoStack: fix two Coverity COPY_INSTEAD_OF_MOVE warningsMarc Mutz5 days1-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Coverity complained that, since the ActionState struct contains a QString, a copy is expensive while a move is possible. Make it so. To avoid explicit std::move() far away from the end of the scope (which impairs readability), use C++17 if-with-initializer to reduce the scope of the newX ActionState objects. This is a drive-by, since to move from them, we need to de-const the variables, anyway. Amends 31b0dadb0f371fc94652782c28024f135a0b6f4b. Pick-to: 6.10 6.8 Coverity-Id: 896353 Coverity-Id: 896351 Task-number: QTBUG-138567 Change-Id: Id365d9bd91773452d16634a3b862f3d23ad650b9 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Ali Kianian <[email protected]>
* QUndoStack: use idiomatic relational operatorsMarc Mutz5 days1-4/+11
| | | | | | | | | | | | | | | | | | | | Don't only define the inequality operator. Not even C++20 will synthesize equality from it. Instead, for C++20, default equality and, for non-C++20-builds, define inequality in terms of non-equality. Also =delete qHash(). Equality-comparable types ought to be hashable, but the code currently doesn't need this feature, so document this by deleting the qHash overload explicitly. This also prevents 3rd-parties from defining their own qHash(ActionState), an issue of which we have had several instances in Qt already, and which can lead to ODR violations. Amends 31b0dadb0f371fc94652782c28024f135a0b6f4b. Pick-to: 6.10 6.8 Task-number: QTBUG-138567 Change-Id: Ib766d44697cb763147eafceb5ffd947206bda979 Reviewed-by: Ivan Solovev <[email protected]>
* Doc: Fix instructions on how to use CorePrivateAlexei Cazacov5 days1-1/+1
| | | | | | | | | This commit fixes the cmake instructions for the CorePrivate use. Fixes: QTBUG-141173 Pick-to: 6.10 Change-Id: Ie572048c1a45df2369e022ead0e43c6660c30bf5 Reviewed-by: Alexandru Croitor <[email protected]>
* Doc: Clarify usage of QTextFormat::FontSizeAdjustmentDheerendra Purohit5 days1-2/+2
| | | | | | | | | | Specify that the value is an integer and is added to the base font size. Pick-to: 6.10 6.9 Fixes: QTBUG-130805 Change-Id: I4093fed2412cf009049fa28152a0d71ee2f81844 Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Marcus Tillmanns <[email protected]>
* Teach QKeySequence::toString(Native) about C0 Control PicturesTor Arne Vestbø5 days1-1/+4
| | | | | | | | | | | | | | | | | | | | | The Unicode C0 control codes correspond to the 32 control characters in ASCII from 0x00 and 0x1f. Since these are unprintable in their basic form, it makes sense to represent them as something printable via toString(). The Unicode Control Pictures block provides exactly that. We skip 0x0 (Null) as we don't distinguish between a missing key and the null character in Qt. Although there are also Control Pictures for space (0x20), del (0x7f), and others, we ignore these as they are not in C0. [ChangeLog][QtCore] QKeySequence::toString() now maps the C0 control characters to their equivialent in the Unicode Control Pictures block, if using QKeySequence::SequenceFormat::NativeText. Change-Id: I4525d08478ebeb2a321b035c96029a22fa5ed749 Reviewed-by: Edward Welbourne <[email protected]>
* QWinRegistryKey: de-pessimize stringValue()Marc Mutz5 days1-1/+3
| | | | | | | | | | | | | | | | | | | Don't create a QString object that we might not need (if the optional already contains one). Using value_or() with an argument that is not of trivial type is like having a function default argument of the same type: it's constructed whether we need it or not; one should use overloading instead (QTBUG-98117). Rewrite to the equally-readable check-and-return-else-default-construct. Amends 40523b68c14bf618bdc2d5438deebf34627be3af. Pick-to: 6.10 6.8 Task-number: QTBUG-98117 Change-Id: Iecd7fa9c3705c8416b5609e6d157079e10bfca59 Reviewed-by: Oliver Wolff <[email protected]>
* Reland "AndroidTestRunner: don't grant non-dangerous permissions"Assam Boudjelthia5 days1-0/+51
| | | | | | | | | | | | | | | Another attempt for 6db355c6cd1c668ee79bcdccfdc4d5cbc379833f. To avoid warnings like: Unable to grant 'android.permission.INTERNET' to 'org.qtproject.example.tst_android'. Probably the Android version mismatch. First, get the full list of dangerous permissions and check for each permission if it's dangerous or not before granting it. Change-Id: I79a605fe0dbaf1bb40fd95594381fded24a36f8d Reviewed-by: Alexey Edelev <[email protected]>
* Doc: Fix instructions on how to use GuiPrivateAlexei Cazacov6 days1-1/+1
| | | | | | | | | | This commit fixes the cmake instructions for the GuiPrivate use. Fixes: QTBUG-141106 Pick-to: 6.10 Change-Id: Ibb99ef4137e6fa5b394ccf4a33f8e080ca18dcbd Reviewed-by: Maycon Stamboroski <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* QObject: docs: clarify that "window system events" means the event loopAhmad Samir6 days1-2/+2
| | | | | | | Fixes: QTBUG-140923 Pick-to: 6.10 6.8 6.5 Change-Id: Ia8ee47715f787847204c3addf2d2d0e85e202685 Reviewed-by: Thiago Macieira <[email protected]>
* Docs: renew screenshot for (Document Layout)Eren Bursali6 days3-1/+1
| | | | | | | | | | | Exchanging old screenshot with a newer one and changing image to ".webp" in "https://doc.qt.io/qt-6/richtext-layouts.html" Fixes: QTBUG-140917 Pick-to: 6.10 Change-Id: I7e68833715f8d5230480ea68d6fe1203b4656a0e Reviewed-by: Kai Köhne <[email protected]>
* iOS: Add missing header guardsNils Petter Skålerud6 days4-0/+20
| | | | | | | | | | | Some iOS specific header files were missing header guards, causing unity builds to break. This patch adds them. Pick-to: 6.10 Change-Id: Ibcc08647dc56720b9c34e8edd0bec05bf00c146f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Windows11Style: Fix progressbar label drawingChristian Ehrlicher6 days1-20/+24
| | | | | | | | | | | | | The windows11 style only supports the label right of the progress bar content similar to the windowsvista/windows style. Also clean up the drawing code - the rect passed to them is already adjusted for the desired content. Pick-to: 6.10 Fixes: QTBUG-138054 Change-Id: I8bae8904d7e20e65ff35daa126d4444f1a57d9e9 Reviewed-by: Wladimir Leuschner <[email protected]> Reviewed-by: Oliver Wolff <[email protected]>
* appendNodeText: Don't split emojis with surrogate chars in twoAlbert Astals Cid6 days1-4/+8
| | | | | | | | | | | | | | | When parsing a document that assigns an anchor to text, we assign this anchor to the next immediate character. If this character was the low surrogate in a pair, we would end up splitting the surrogate and messing up the text. We use QStringIterator to make sure we always process surrogate pairs together and add the full pair to the resulting text. Fixes: QTBUG-140929 Pick-to: 6.10 Change-Id: I63ee03c251004d1a138f97462723fcc3798b9147 Reviewed-by: Albert Astals Cid <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* iOS: Fix namespace-mangling usage in qiosplatformaccessibilityNils Petter Skålerud6 days2-1/+3
| | | | | | | | | | | | This file prevents us from compiling Qt with a custom namespace, because these files use the Obj-C class 'QMacAccessibilityElement' with inconsistent mangling. This patch corrects the usage to be consistent. Pick-to: 6.10 Change-Id: Ic15b2b9294a301b1cdc934ecf5e666d3ec1a426f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Core: Move QMetaSequence docs and implementation to own fileUlf Hermann6 days3-468/+480
| | | | | | | | | | | This is in preparation for adding further inner classes to QMetaSequence that can't live in qmetacontainer.{h|cpp}. Also fix bogus references to QMetaSequence in QMetaContainer. Pick-to: 6.10 6.8 Task-number: QTBUG-140181 Change-Id: Ieed1a3766c7d9f930eac08e6c132e3b664a97ba7 Reviewed-by: Volker Hilsheimer <[email protected]>
* Core: Add documentation for QMetaAssociationUlf Hermann6 days3-23/+300
| | | | | | | | | | | | The documentation was missing. Create the documentation in a separate file, in preparation for adding further inner classes to QMetaAssociation that can't live in qmetacontainer.{h|cpp}. Also, move the two out of line methods into the same file. Pick-to: 6.10 6.8 Task-number: QTBUG-140181 Change-Id: I907ced8446ff0d63bcf73ae601130d541816402b Reviewed-by: Fabian Kosmale <[email protected]>