summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't test for equality if types can't be comparedVolker Hilsheimer2020-07-152-6/+12
| | | | | | | | | For types that don't have an operator==(), always trigger the binding and the changed notification. Task-number: QTBUG-85578 Change-Id: I41374f6d13c88106f4de83864e82172f3a248150 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow Windows accessibility backend to receive focus updatesAndre de la Rocha2020-07-151-5/+0
| | | | | | | | | | | | | | | | The removed code no longer applies to the current Windows accessibility backend, and was causing it to miss focus change events when the application UI contained one or more widgets associated with native window handles, or when the Qt::AA_NativeWindows application attribute was set. This caused accessibility tools like Narrator to miss changes in the focused widget. Fixes: QTBUG-81862 Pick-to: 5.15 Change-Id: I6e42d09c54e9e1338fc4b103eba8a0b2c4309e7f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Un-deprecate QMouseEvent::flags() and QGraphicsSceneMouseEvent::flags()Shawn Rutledge2020-07-154-7/+0
| | | | | | | | | | | | | | | | On one hand it looks like API clutter: a whole Qt namespace enum just to track whether an individual mouse click is about to geenerate a MouseButtonDblClick event. On the other hand, we should not remove it without replacing it somehow, so that users don't lose the workaround for QTBUG-25831 that it provides. That would be an invasive change because this flags property exists in QMouseEvent, QGraphicsSceneMouseEvent and in MouseArea { onClicked: doSomethingWith(mouse.flags) } Reverts a small part of 4e400369c08db251cd489fec1229398c224d02b4 Task-number: QTBUG-25831 Change-Id: I9a3b4f6cc6b858012186f10ed57689f8c0f5fd79 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Set QEventPoint::state properly in QSinglePointEventShawn Rutledge2020-07-151-0/+6
| | | | | | | | | | | | | | | | | | State was Unknown by default, and that is OK in widgets so far, because widgets pay attention to the event type, not QEventPoint::state(). But Qt Quick cares about that, because QEventPoint turns into QQuickEventPoint, in which state() has long been important, due to the semi-unified handling of mouse and touch events. If it was not a button that caused the event, state is Updated (the mouse is hovering or dragging, or it's an enter event, wheel event etc.) If more buttons are now held than before, state is Pressed. If fewer buttons are now held than before, state is Released. Amends 4e400369c08db251cd489fec1229398c224d02b4 Change-Id: I926d268982449e46e7ca713c4a6ee2014c28c645 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Accept NAME attribute for any propertiesUlf Hermann2020-07-151-2/+0
| | | | | | | | At the time when we parse it we don't know if the property will be a QProperty. Change-Id: I720afa6d5ec284c727328db92c791771def82f41 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Work around compiler problems on MSVC 16.6.XLars Knoll2020-07-151-1/+2
| | | | | | | | | | | The compiler apparently doesn't resolve the emplace overload correctly to the rvalue version, leading to infinite recursion in the overload that takes a const Key & as argument. Take a copy to make it explicit. Change-Id: I22039d6ca1e2176c81e51b181c72f511dab662f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Compare the showDecorationSelected variable when caching the optionAndy Shaw2020-07-151-1/+2
| | | | | | | | | | | | Since the size of the display rect can change if showDecorationSelected is set then this should be included when seeing if the item is already cached. Change-Id: Ied6182337de5894d879c5ba5d1125b4869a11cc9 Pick-to: 5.15 Fixes: QTBUG-85451 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update documentation of Qt::TextDateEdward Welbourne2020-07-151-1/+1
| | | | | | | | | This follows up on commit 5ba66c5622e9e0da87a5037399b375d7e8cee554, which removed all locale-dependence from QDateTime; I neglected the doc of the DateFormat enum. Change-Id: I244db9c6e1ab47892162c7f441c2b4202662e6e4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QSystemLocalePrivate::substituteDigits(): change to move semanticsEdward Welbourne2020-07-151-6/+6
| | | | | | | | | | Rather than passing an in-out reference parameter and ignoring the return (of that parameter) use an actual rvalue ref parameter and move the value through the function, to make it easier for compilers to see how to optimize it. Change-Id: Ie239400345da012d8fb8a731394f1687b8b62430 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify uses of QSystemLocale::query()Edward Welbourne2020-07-152-61/+60
| | | | | | | | | | | | | | | QVariant::isNull() shall no longer return true when the variant does package an object, but that object's isNull() is true, so take care to catch QString-wrapping returns that contain an empty string, except where this is a valid return. Generally tidy code processing the returned value. At the same time, make the second argument of query() optional, since it's only used by a subset of the query types. Change-Id: I3dba9a59260f9f182ca277784c77277e2ea255e2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify qlocale_win's getLocaleInfo() and its _int variantEdward Welbourne2020-07-151-32/+28
| | | | | | | | | | | | One of the former's overloads was a template; it and its _int variant took an optional maxlen; no caller passed maxlen, only three callers didn't over-ride the template's <QString> default return value to <QVariant>; so eliminate maxlen and have it simply return QVariant, using .toString() on it where needed. Change-Id: Icf3ff32f167ee96cfbb6412613ecd7f0886a2fe9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMouseEvent: Set QEventPoint globalPressPosition and globalLastPositionShawn Rutledge2020-07-151-1/+5
| | | | | | | | | | | | | | | | | Qt Quick's MultiPointTouchArea compares the delta since press against the drag threshold to determine whether a gesture has started, for example. Since it can be configured to handle both mouse and touch, this needs to be done for mouse events in a similar way as it's done in QGuiApplicationPrivate::processTouchEvent(). Storing one global cursor position is not OK for multi-mouse support, but that's a problem for another time; so we keep using QGuiApplicationPrivate::lastCursorPosition for now. Amends 4e400369c08db251cd489fec1229398c224d02b4 Change-Id: I242565c4548878878a67074877468e5fde84a490 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove linuxofonoFriedemann Kleint2020-07-157-635/+0
| | | | | | | | | The module appears to be unused. Task-number: QTBUG-83255 Change-Id: I0b6942734b8b4fcfd90515ba12d751ffccfad15c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix namespaced buildGiuseppe D'Angelo2020-07-151-2/+0
| | | | | | | | | No need of redeclare the function (wrongly, w/o the namespace), we have the declaration already from qpaintdevice.h. Change-Id: Iab37c1ac8f059b7d93de7f6c8f0a2eeef2314f35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace emit with Q_EMIT in headerFabian Kosmale2020-07-141-1/+1
| | | | | | | This fixes tst_nokeywords.cpp in declarative Change-Id: Ia94c6c73a830a2eaac9288d9f73d43e63d7a5c17 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove wrapper APIs from QDesktopWidgetPrivateVolker Hilsheimer2020-07-141-45/+0
| | | | | Change-Id: I99e7d82a9e369fee23bcc565553ad9783fa862f9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Mark API in Q[Mutable]HashIterator as deprecatedKai Koehne2020-07-142-51/+222
| | | | | | | | | | The reverse iteration API got deprecated in code already in commit dbb54805f63f9e . Now also fix the documentation. Fixes: QTBUG-85482 Pick-to: 5.15 Change-Id: I3b575f60dabfe1005b9744d17c257da3e22817c5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qtypeinfo: Improve container checkFabian Kosmale2020-07-141-6/+13
| | | | | | | | | | | | | Smart pointers like QSharedPointer<T> do have a value_type, but their equality does not depend on T being comparable. Therefore, instead of simply checking for T::value_type, test for a few other container requirements. This also required to add an additional check for std::optional, as that one has an unconstrained operator== on MSVC. Change-Id: Iefd048f7aa360f4713ecd79f80acd7dae72ee18c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* moc: allow wrapper generation for QProperty in pimpl classFabian Kosmale2020-07-143-13/+56
| | | | | | | | | | | Previously, only QNotifiedProperty was supported. As moc cannot determine by itself whether the backing property is a QProperty or a QNotifiedProperty, allow NOTIFY false to indicate that it is a plain QProperty. For symmetry, NOTIFY true is also allowed and means that the backing property is a QNotifiedProperty. Change-Id: I66f3105c976ef084198ce8658bc07499a3cb1cd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Support digit-grouping correctlyEdward Welbourne2020-07-146-653/+652
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Read three more values from CLDR and add a byte to the bit-fields at the end of QLocaleData, indicating the three group sizes. This adds three new parameters to various low-level formatting functions. At the same time, rename ThousandsGroup to GroupDigits, more faithfully expressing what this (internal) option means. This replaces commit 27d139128013c969a939779536485c1a80be977e with a fuller implementation that handles digit-grouping in any of the ways that CLDR supports. The formerly "Indian" formatting now also applies to at least some locales for Bangladesh, Bhutan and Sri Lanka. Fixed Costa Rica currency formatting test that wrongly put a separator after the first digit; the locale (in common with several Spanish locales) requires at least two digits before the first separator. [ChangeLog][QtCore][Important Behavior Changes] Some locales require more than one digit before the first grouping separator; others use group sizes other than three. The latter was partially supported (only for India) at 5.15 but is now systematically supported; the former is now also supported. Task-number: QTBUG-24301 Fixes: QTBUG-81050 Change-Id: I4ea4e331f3254d1f34801cddf51f3c65d3815573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QLocale's integer formattingEdward Welbourne2020-07-142-127/+51
| | | | | | | | | Break out some shared code in the integer formatting to save duplicating it. Simplify what's left. Renamed some variables to match Qt style. Change-Id: I369a013802a267a94725302de0d1d33291c29538 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocalePrivate: rearrange number format statics and toolsEdward Welbourne2020-07-144-201/+130
| | | | | | | | | | | | Instead of passing lots of instance data around among public static methods and functions in qlocale_tools, do the work in instance methods that can access the relevant attributes of the locale when they need them. Incidentally reduces clutter in the global namespace. Add a signPrefix() to handle a repeated computation. Keep new internal methods private. Change-Id: I9556a960acac9fb645872337c61f509fb902984e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix floating-point 'g'-format's choice between 'e' and 'f' formsEdward Welbourne2020-07-142-43/+81
| | | | | | | | | | | | | | During review of a refactor (coming shortly), Thiago wondered what the magic numbers were. On closer examination, I concluded that they were wrong and wrote some tests to prove it. This commit adds those tests; replaces the misguided old code with something that passes them; and documents the reasons for the various parts of its decisions. In the process, tidy up QLocaleData::doubleToString() somewhat and rename some of its variables to conform to Qt coding style. Change-Id: Ibee43659b1bdb0707639cdb444cfe941c31d409f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify qlocale_win's currency formattingEdward Welbourne2020-07-141-11/+5
| | | | | | | | | | | | Use QLocaleData::c()'s instance method, rather than QLocaleData's static method, to format integers. This avoids the need to duplicate various arguments as literals, that the C locale provides as default. It also future-proofs against changes to the static methods. Change-Id: I5bba407cfc29e3f33d1e9fa878ddf35fff3b113c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtConcurrent: Get rid of multi-inheritance inside RunFunctionTaskBaseJarek Kobus2020-07-141-12/+14
| | | | | | | | Use aggregation instead. Prepare for using QPromise instead of QFutureInterface. Task-number: QTBUG-84702 Change-Id: Ic88564dca8c83a178a281cb843032292210a6d25 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* CMake: Fix call to qvkgen for cross-builds with toolsJoerg Bornemann2020-07-141-1/+10
| | | | | | | | We must not call the qvkgen tool that was built for the target but the one that's located in QT_HOST_PATH. Change-Id: I6d23a8e3abd84d449517630f3b9f0d50e333c327 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtGui: Clean up event headers, #3Friedemann Kleint2020-07-141-5/+0
| | | | | | | | - Remove unimplemented CT of QTabletEvent Task-number: QTBUG-72173 Change-Id: I22f88bc2962f2cf92cf33c9cba7081c0436affe6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Change QWindow/QWidget::map(To/From)(Global/Parent) to operate in floatFriedemann Kleint2020-07-1414-62/+144
| | | | | | | | | | | | | | | Change the functions to operate in float and add the QPoint versions as overload calling them. This is more in-line with the event accessors using float and allows for removing some workarounds using a delta when converting touch points. Leave QPlatformWindow::map(To/From)Global() as is for now and add helpers for float. Change-Id: I2d46b8dbda8adff26539e358074b55073dc80b6f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: add missing printStackTrace() in catch statementsAssam Boudjelthia2020-07-144-3/+21
| | | | | | Pick-to: 5.15 Change-Id: Id50743113fcdd450932111cfe1a563276f152bb1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Don't flatten link color in QTextHtmlParser::declarationsForNodeTor Arne Vestbø2020-07-141-2/+2
| | | | | | | | | | | It's still flattened in the next step, when the parser calls QTextHtmlParserNode::applyCssDeclarations, but this at least makes it clear where the problem is. Task-number: QTBUG-85567 Change-Id: I1ecc7d808c58297f40f6cf8de86dfa7035e167c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix gif parsing error for large imagesTang HaiXiang2020-07-141-2/+2
| | | | | | | | | | | | | | A very large GIF image resulted in cropping of image updates, due to the handler trying to protect against very large values. Increase that size from 200 to 16384, which is also the value used in the withinSizeLimit method. Fixes: QTBUG-85340 Pick-to: 5.15 Change-Id: I70888d76b378ee4f49694e90d7d753fae817ff2a Reviewed-by: Lu YaNing <luyaning@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Linux: fix crash in AtSpi adaptor when handling window activationLu YaNing2020-07-141-1/+3
| | | | | | | | | fix The window has been quickly activated or disabled will cause a crash . Fixes: QTBUG-84643 Pick-to: 5.15 Change-Id: I0fd0918a3fc1898ddffd97009a4e92702ecd9ed4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: make cleanup on error more prominant in SQL driver instructionsSamuel Gaist2020-07-131-1/+1
| | | | | | | | | | | | | The concerned paragraph is one that is very important as there are a lot of people building the MySQL and PostgreSQL plugins that are not successful on the first try. However, this text not being emphazized, many if not all miss the fact that just re-running qmake will give them the same result if the cleanup is not applied. This patch makes this point more visible. Pick-to: 5.15 Change-Id: Ib2b97e128a5dab3dc6d771b16b5315e4ad95a9b7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Remove support for users to create their own Qt::Desktop type widgetsVolker Hilsheimer2020-07-131-20/+15
| | | | | | | | | | [ChangeLog][QtWidgets][QWidget] Creating QWidget instances with the Qt::Desktop window type set is no longer supported. Change-Id: I712861d7104c4ae5cbdd5d54cd0134bf69eb144e Task-number: QTBUG-62094 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtGui: Clean up event headers, #2Friedemann Kleint2020-07-131-6/+0
| | | | | | | | | | - Remove unimplemented functions of QEventPoint - Remove forward declaration of devices Task-number: QTBUG-72173 Change-Id: I40e0451a6380ea7fbe58c49fe8fab1b432558c52 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move eglconvenience to QtGuiFriedemann Kleint2020-07-1366-289/+292
| | | | | | | Task-number: QTBUG-83255 Change-Id: I8a008d8906308dd73a0793db5b88d3a1b6fdaf5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix passing QDBusUnixFileDescriptors over peer-to-peer connectionsSteffen Kieß2020-07-135-12/+41
| | | | | | | | | | | | | | | | | | | Passing QDBusUnixFileDescriptors over peer-to-peer connections currently does not work, because QDBusConnectionPrivate::setPeer() does not set this->capabilities (unlike QDBusConnectionPrivate::setConnection() which is executed for bus connections). Keep track of whether the connection already has been authenticated, and once the connection does get authenticated, update this->capabilities. Note that sending a message directly after connecting (before any message has been received from the peer) might still fail if the message contains a QDBusUnixFileDescriptor. Pick-to: 5.15 Fixes: QTBUG-85396 Change-Id: Ib83213ebcd3255fb091c6faefb3618745b8d736c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix sporadic build failures of eglfs_kms_vsp2Joerg Bornemann2020-07-131-0/+1
| | | | | | | | | | The eglfs_kms_vsp2 subproject depends on eglfs_kms_support. Add the missing build dependency. Pick-to: 5.15 Fixes: QTBUG-85486 Change-Id: I1110d0f02166d9cdec1d734de679e2d36c6b026a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QtConcurrent: Get rid of code repetition for RunFunctionTask::run()Jarek Kobus2020-07-132-34/+21
| | | | | | Change-Id: If270982e54d2b11be00c71b9d012af629d181dfe Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* macOS: Use Cocoa to map key events to possible shortcut key sequencesTor Arne Vestbø2020-07-131-3/+19
| | | | | | | | For now we just verify that the Cocoa API produces the same keymaps as we get from Carbon. Once that's verified we can solidify the code. Change-Id: I0d2aa1bb0a006d29c0149e3ff2fd5299ba922326 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Modernize QCocoaKeyMapper key mapTor Arne Vestbø2020-07-132-53/+36
| | | | | Change-Id: I3e8a4cfa611b6ae575466c493aac438dc831e89a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Allow null resources in srbLaszlo Agocs2020-07-133-64/+135
| | | | | | | | | | In this case the srb represents the layout only, and can still be used to create a pipeline. For setShaderResources() one will then need to use another, layout compatible, srb that references valid resources. Change-Id: I3ea5b63df3be8847540ca4c0c40fbd29dbed8fb7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Use numeric_limits instead of hand-coded equivalentsEdward Welbourne2020-07-134-22/+20
| | | | | | | | | | | | | | As a comment noted, the reason for QLocaleData rolling its own values describing the ranges of digits and exponents in a double were all about std::numeric_limits's constants not being constexpr - which they have now been since C++11, so we can do away with our own. One of the constants was used in two places in the same way; so abstract that use out into an inline function in qlocale_tools, to save duplication and give somewhere to document it. Change-Id: I7e3740ece9b499c0ec434de18d70abe69e1fe079 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QRegExp and its remaining mentions out of QtCoreSona Kurazyan2020-07-137-5438/+0
| | | | | | Task-number: QTBUG-85235 Change-Id: Ibd6c98d952c1bb9916b64715c6430fb0d3fe3843 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Check returns of hex2int in get_hex_rgbRobert Loehning2020-07-131-0/+2
| | | | | | | | | | Avoids undefined behavior when trying to shift negative values. Fixes: oss-fuzz-21860 Fixes: oss-fuzz-23968 Pick-to: 5.15 5.12 Change-Id: I879c97624e3f8ba9cf01e0a3a682379cd8c4a199 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtGui: Clean up event headersFriedemann Kleint2020-07-132-3/+12
| | | | | | | | | | - Remove unimplemented QSinglePointEvent() - Remove forward declaration of QTouchEventTouchPointPrivate - Update copyright and add comment to qevent_ph.h Task-number: QTBUG-72173 Change-Id: Ie64b6071f2611001dcd8e3deec2f5ed382bb2312 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QVariant::setValue(): enable move semanticsGiuseppe D'Angelo2020-07-133-22/+36
| | | | | | | | | | | | Given we optimize for the case where the new value is of the same type of the one already stored in the variant, enable move assignment for that case. As a drive-by, avoid a path to detach() for data() if we know we're detached. Change-Id: I9abbdc10637ce77ebb747b49d83e1ef914d997bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCryptographicHash: explicitly activate the used union memberGiuseppe D'Angelo2020-07-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | A union member lifetime does not start automatically if one takes a pointer to a union member and writes into the member. Only the subscript syntax in an assignment features such automatic lifetime start [class.union§6]. In the other cases, one is allowed to get a pointer to the storage ([basic.life§6]) but has to start lifetime explicitly via placement new. Hence, do so, or we end up in UB land. We're left with the problem of reset() which may be called multiple times. I think we can actually just create a new object in the same storage without destroying the pre-existing object by exploiting [basic.life§5]: reusing the storage causes lifetime end for the old object. Moreover, since the union is over trivial datatypes (C structs), there's no side effects in the destructor of the old object, so there is no need to call it. Drive by fix, apply some DRY for SHA3. Change-Id: Idc351568635e59d45421311f043956ab3aabf389 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Linus Jahn <lnj@kaidan.im>
* QVLA: use std::aligned_storageGiuseppe D'Angelo2020-07-121-5/+1
| | | | | | | Remove the hand-rolled union used only to achieve alignment. Change-Id: I8e635fa0d09042f30fd67d589db9bc384c0ec8ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringView: Remove outdated note about usage with QListLinus Jahn2020-07-121-4/+0
| | | | | Change-Id: Id1cef09642ccde701e57e8f0a3a3d0e5fcf47e5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>