| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Change-Id: I838c7305d4649f953c5bb972f1aa51dbb078afe2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I1e62e3772dbd5f17d9ad69025b23e3726386c2bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Change-Id: I87a7ba1a77b0671559616a3ea4722bcc233af32d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\
| |
| |
| | |
Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
|
| |
| |
| |
| |
| |
| |
| | |
Reduces our number of gcc 7 warnings
Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ie93c6d0a8256bc466d3419408b753d5f3738aa6b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's a Qt 3 compatibility vehicle, and as such inherits the now-alien
property to distinguish empty and null strings. Particularly worrisome
is the following asymmetry:
QString("") == QString::null // false
QString("") == QString(QString::null) // true
Instead of fixing this behavior, recognize that people might use it as
a weird way to call isNull(), albeit one that once was idiomatic, and
simply deprecate everything that deals with QString::null.
[ChangeLog][QtCore][QString] QString::null is now deprecated. When
used to construct a QString, use QString() instead. When used to
compare to a QString, replace with QString::isNull().
Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
|
| |
| |
| |
| |
| | |
Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ib387390b796c3cab6de4ce94e0d217280a300df8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I8c136024c3bf431529033a806be646d867919daa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie11f178ce22e2fafdfdf1760288e90563569e0cb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I385ce6e37611b7ba32503ef5d041628dd764fe23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/network/network-chat/peermanager.cpp
src/widgets/util/qsystemtrayicon.cpp
src/widgets/util/qsystemtrayicon_qpa.cpp
src/widgets/util/qsystemtrayicon_win.cpp
src/widgets/util/qsystemtrayicon_x11.cpp
Change-Id: I1c026df83818c0ccaf956980370e7522960627db
|
| |
| |
| |
| |
| | |
Change-Id: I171aed5d134db88f211da0e1a6ce236e32f3c35c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I2f31357e91b01f826ef44710f477b80fde1f3fbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I6093559dd7b8df578ebd050655fb9bd07e5f6809
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I36e5c850068c2f9ac2ae078a3734ddb88d88c532
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I23b23fcaf6fcc655d38a06495127b108975f4a58
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I8f9d5ef6b7f7102e56816677f1d3a5b5144b7083
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
configure
qmake/Makefile.unix.macos
qmake/Makefile.unix.win32
qmake/generators/win32/msvc_vcproj.cpp
src/3rdparty/pcre/qt_attribution.json
src/corelib/io/qsettings.cpp
src/corelib/kernel/qdeadlinetimer.cpp
src/platformsupport/kmsconvenience/qkmsdevice.cpp
src/platformsupport/kmsconvenience/qkmsdevice_p.h
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
tests/manual/qstorageinfo/printvolumes.cpp
tools/configure/configureapp.cpp
Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/network/socket/qnativesocketengine_winrt.cpp
tools/configure/configureapp.cpp
tools/configure/environment.cpp
Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249.
Conflicts:
header.BSD-NEW
qmake/Makefile.win32
src/openglextensions/qopenglextensions.cpp
src/openglextensions/qopenglextensions.h
src/winmain/qtmain_win.cpp
src/winmain/qtmain_winrt.cpp
tools/configure/configureapp.cpp
util/glgen/qopenglextensions.cpp.header
util/glgen/qopenglextensions.h.header
Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QModelIndex is not safe to be used to store an index as it is designed
to be discarded right after use as the index information can change.
Therefore a QPersistentModelIndex should be used instead to store the
index. Subsequently the m_index does not need to be updated whenever
the model changes anymore as this is already done for us.
Task-number: QTBUG-49907
Change-Id: Icc93e410de2821c503ea15a7a1dd9ae32634914e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
mkspecs/features/mac/default_post.prf
mkspecs/features/uikit/default_post.prf
Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Avoid looking up by key twice in a row in various locations, but instead
using iterators and index lookup.
Change-Id: I61a079115199ab9c041ad3a26d36b45ee3f775e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/gui/painting/qcoregraphics.mm
src/network/access/qnetworkrequest.h
src/plugins/platforms/cocoa/qcocoahelpers.mm
Change-Id: I81266414c06ea2edf63cbc7e93a86bd5d66a31a5
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QString::fromLatin1 always allocates memory, but there are
cases where we can avoid/reduce allocations or/and reduce
text size, e.g.:
QStringBuilder expressions
Fix: replace QString::fromLatin1 with QL1S
QString::fromLatin1().arg(String) pattern
Fix: replace with QStringBuilder
Overloaded functions with QL1S arg
Fix: replace QString::fromLatin1 with QL1S
In rare cases if there is no overloaded function
with QL1S and we have deal with string literal,
replace QString::fromLatin1 with QStringLiteral.
Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: I843994939f126ced22f7fe978ec4403f599fc7c9
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Done-with: Andriy Gerasika <andriy.gerasika@gmail.com>
Change-Id: I90883a491dbddb005c3d756c339e42285d50e437
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Drop the use of QVLA, and the loop. Put all of the code into
QT_NO_SHORTCUT.
Change-Id: I49b8e9aa403ea793fd2f3701a521776c33b64a3c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace it with QL1S in QStringBuilder expressions
and in overloaded functions.
Replace patterns 'QString::number() + QStringLiteral'
and 'QStringLiteral + QString::number()' with
QString::asprintf.
Saves some text size.
Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new modular configuration system requires one global
header per module, that is included by all other files in
this module.
That header will later on #include the configuration file
for Qt Widgets. For now it defines the Q_WIDGETS_EXPORT
macro for this library.
Change-Id: I6698989b952b9bac94d086d9f219e03c000f7d53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
qmake/generators/win32/msvc_vcproj.cpp
src/corelib/global/qnamespace.h
src/corelib/global/qnamespace.qdoc
src/corelib/io/qfsfileengine_win.cpp
src/corelib/tools/tools.pri
src/network/ssl/qsslconfiguration_p.h
src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
src/plugins/platforms/windows/windows.pri
src/src.pro
src/tools/bootstrap/bootstrap.pro
src/tools/uic/cpp/cppwriteinitialization.cpp
src/widgets/dialogs/qfilesystemmodel.cpp
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
configure
src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
src/network/access/qnetworkaccessmanager.cpp
src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
src/widgets/widgets/qlineedit_p.cpp
src/widgets/widgets/qlineedit_p.h
src/winmain/winmain.pro
tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
tools/configure/configureapp.cpp
Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The window is required to be able to determine the correct
scale factor for the screen when High DPI scaling is active.
Change-Id: I8f776684396d055754093f62e0d33bd7e23cb52b
Task-number: QTBUG-52943
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Query the native parent widget if the widget does not have a window handle.
The window is required to be able to determine the correct
scale factor for the screen when High DPI scaling is active.
Change-Id: Ibaf5e8e7b07327ea635d2f726acea76c2c95bda3
Task-number: QTBUG-52943
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.
But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.
This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.
In this second part, replace
qWarning() << "" << non-QString
with
qWarning("..%.", non-QString).
QString (and QUrl etc) have special escaping handling when streamed
into QDebug, so leave those alone. They also seem to expand to less
code than the qPrintable() alternative, so there's no reason to
replace them.
Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui,
Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds.
Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, a tab's text is used as its accessibleName.
When a tab's text is empty, there is no API to set
the tab's accessibleName. The two APIs are added to
set and return the accessibleName property of a tab.
Task-number: QTBUG-46530
Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.
This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.
Conflicts:
mkspecs/features/default_post.prf
src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
src/3rdparty/sqlite/sqlite3.c
src/corelib/tools/qsimd_p.h
src/gui/kernel/qevent.cpp
src/gui/kernel/qwindowsysteminterface.cpp
src/gui/kernel/qwindowsysteminterface_p.h
src/plugins/bearer/blackberry/blackberry.pro
src/plugins/platforms/cocoa/qcocoasystemsettings.mm
src/plugins/platformthemes/gtk2/gtk2.pro
src/plugins/styles/bb10style/bb10style.pro
src/sql/drivers/sqlite2/qsql_sqlite2.cpp
tools/configure/configureapp.cpp
Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
|
| |
| |
| |
| |
| |
| |
| |
| | |
this fixes static builds by ensuring that all dependencies are exported.
Task-number: QTBUG-51071
Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I975ee556913707e8595b2a89f1bba4299187bcfb
Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a last resort"
This reverts commit 4c71db756741d35ccb32dc4c32aa1823264c85df.
It's too risky for 5.6, we should let it cook in dev for a while
and backport when ready.
Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
resort
Resetting focus_window and other internal QGuiApplication variables before
calling setVisible(false) and destroying the platform window means that the
platform window can't reason about whether or not it was the focus window
unless it can resolve that using native APIs. We should let the platform
window take care of resetting the focus window and related states, and
only execute our fallback logic if the plugin doesn't do the right
thing.
We also use QPA to update the state instead of modifying the internal
QGuiApplication variables directly, so that events and signals are
emitted as a result of the reset.
The QLineEdit test gets two added calls to processEvents(), since
assuming that activateWindow() is synchronous is not correct, and
would result in the QMenu resetting the focus window to 0 on destroy.
Task-number: QTBUG-46414
Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QAccessibleTextWidget::attributes()
Saves ~100b in text size.
Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Boris Dušek <me@dusek.me>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QMap<QByteArray, QString> was only used to hold key/value pairs
until they were serialized into a QString at the end of the function.
Serialize into QString directly instead, dropping the temporary QMap.
The problem is that we'd like to keep the line formatting central
while at the same time harnessing the power of QStringBuilder.
This is possible with a templated function with an input/output
parameter:
format_attr(QString &result, const char *key, T &&value)
format_attr(result, text-foo, str + str2 + str3);
Or with return type deduction:
formatted(const char *key, T &&value) -> decltype((expr)) { return expr; }
result += formatted(text-foo, str + str2 + str3);
I don't like out parameters, and we can't rely on auto return
type deduction, yet, so I opted for a miniature expression
template solution that can only match the expression
attr[key] = value;
where 'key' is a const char* and 'value' can be anything that
QStringBuilder supports. This allows to keep the syntax of a map
while at the same time serializing to QString immediately.
The only behavioral difference to the old code is that the
attributes are no longer sorted, but order doesn't matter.
Saves more than 10KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.
Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This needs to be handled a bit carefully, because Qt containers
will detach upon being iteratoed over using range-for.
In the cases of this patch, that cannot happen, because all
containers are marked as const (either by this patch or before).
Separate patches will deal with other situations.
Apart from being more readable, range-for loops are also the
most efficient for loop.
This patch shaves almost 2K of text size off an optimized Linux
AMD64 GCC 4.9 build.
Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|