Commit Graph

26946 Commits

Author SHA1 Message Date
Tor Arne Vestbø
f24536f8a5 Add tool to namespace Objective-C classes at link time
The feature is enabled by CONFIG += unsupported/objc_namespace,
but can be easily integrated into other build systems such as
CMake or native Xcode by modifying the LD and LDFLAGS equivalent
for each build system.

This is a less resource-intensive alternative to using multiple
Qt builds with different -qtnamespace settings.

Note: The feature is not supported in any way, and should be
used with care.

Change-Id: Ibb8ba1159db36efd7106c117cc2210c7e2e24784
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-29 14:41:21 +00:00
Friedemann Kleint
50489f2e41 Windows QPA: Fix drag cursor and hotspot for pixmaps with DPR.
Introduce separate scale factors for hot spot and pixmap and
set the devicePixelRatio of the scaled pixmap to 1 matching that
of the target pixmap which will be converted to a Windows cursor.

Change-Id: I0b0f6c6a79589ec954b5a1a09a86b87c91b5147d
Task-number: QTBUG-46068
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-01-29 14:16:09 +00:00
Friedemann Kleint
3cd69671db Windows QPA: Fix position of the fake touch drag cursor window for HighDPI.
Use QCursor::pos() to obtain the position in device independent pixels.

Change-Id: Ia54701c556188f40ba678341125114d113ffe8c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-29 14:15:43 +00:00
Sze Howe Koh
6dafafeff1 Doc: Properly document old platform-specific functions
qt_mac_set_dock_menu() needs a \relates command to show up properly.
"\since 5.2" produces "This function was introduced in Qt 5.2", which is
wrong; the function existed in Qt 4.

qt_set_sequence_auto_mnemonic() is referenced by the QShortcut class
ref, but the page that hosted it in qtdoc.git is being removed. Thus,
its description is now transferred here.

Change-Id: If009a45f1d04541787925cf230ed7b59c7db0b39
Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-29 13:43:59 +00:00
Maurice Kalinowski
2515e1eb3d winrt: cleanup testcases
We have to make sure that the plugins to be tested are located inside
the virtual sandbox / relative to the application binary. Launching via
winrtrunner, a test can find those plugins then. It is not possible to
those via TESTDATA and extract them to temp, as LoadPackagedLibrary only
loads inside the sandbox.

Unfortunately this also implies that running those tests inside Visual
Studio will fail, as Visual Studio copies the virtual sandbox to another
location missing the plugins. For automated testing this should not
matter though.

Change-Id: I70f5ef2d56b3cf526b731fd885f12583c8f6e103
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-29 13:35:48 +00:00
Kai Koehne
7c797b4905 Bump copyright year to 2016
Bump copyright year in tool output and user visible strings to 2016.

Task-number: QTBUG-50578
Change-Id: I2f4aa9089c6672726f554cba7e6009b425d27683
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-01-29 13:30:04 +00:00
Tor Arne Vestbø
98dedefd0c Don't send regular key press event if it matched a shortcut
Regression after ee9621b9dc.

Change-Id: If4a5595d7f191563d0636ccee20cf0ac8c7c0f1f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-29 12:55:41 +00:00
Konstantin Ritt
293731cd4b QWindowsFontEngine: Get rid of some dead code
Q_DEAD_CODE_FROM_QT4_WINCE was never defined anywhere and there are
no other engines that do similar trick; so remove the code at all.
Consider this "feature" lost in WinCE history ;)

Change-Id: I99183a07ccb45b6b970cd33414708288bd0d7efa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-29 11:25:03 +00:00
Konstantin Ritt
3e5719ae7b QFont: Fix possible cache misses due to misprepared cache key
Parse the requested family before we're looking/saving into the cache,
thus hitting the cached EngineData for:
* quoted family names (eg. QFont("'Arial'"))
* non-simplified family names (eg. QFont(" Arial  "))
* substituted family names (\sa QFont::insertSubstitution())
* explicit fallback list, where possible (eg. QFont("Tahoma, Arial"))

This also improves the cache hitting for the font engines in some cases.

Change-Id: I18cdc3e8d669cccec961f84e9b27329402e2b7ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-29 11:24:49 +00:00
Liang Qi
270cc073b7 Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2016-01-29 12:55:06 +00:00
Joerg Bornemann
0ec1e13234 Do not build QWindowsPipeWriter on Windows CE
QWindowsPipeWriter is not used in the Windows CE port.

Change-Id: I068dd2408bb21a7e2a86886e0692b1636016ff6a
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2016-01-29 10:55:04 +00:00
Cédric Bonnier
e536523dbd Doc: Remove Qt3 compatibility functions from QToolButton
QToolButton's detailed description mentioned setToggleButton and
setPopupDelay which have been removed in Qt5.
Removed typo dependant > dependent

Task-number: QTBUG-50761
Change-Id: I9a2ff79a512127982c7961dee79fe2751f12cf43
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-29 10:38:40 +00:00
Edward Welbourne
81514c19c1 Revert "Correct floordiv() to cope with implementation-defined division."
This reverts commit cd9625fc3c.
The ambiguity in division, with negative operands, goes away in C++11
(where division is defined to truncate, hence round towards zero), so
we no longer need to be robust against it in 5.7.  Added suitable
commentary to make clear that we are relying on that.

Change-Id: Id2c0d421bad4bcec87de9cc9519cd00df2456930
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-29 10:35:17 +00:00
Edward Welbourne
c459ea84c4 Set correct Section type for QDateTimeParser::last
Setting it to FirstSection was obviously wrong and left LastSection
nowhere set ...

Change-Id: I26260182e9d986b41b5f3a5d6df94540a5fc116a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-29 10:35:09 +00:00
Edward Welbourne
2736d7921d Don't let a good day cause date-time parser to forget a conflict.
Setting conflicts to isSet & DaySection cleared it if we hadn't seen
the day stipulated, even if there had been a conflict (e.g. over year)
before we hit the day-of-week that didn't match the (unset, so
defaulting to) 1st of the month.  Explicitly test for conflict and
only set conflicts (to true) if there is a conflict.  Added regression
test.

Change-Id: I7363eb66a8bb808d341738d14969039834f50db8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-29 10:35:03 +00:00
Edward Welbourne
ee6463ffd3 Refactor one QDateTimeParser::sectionText() via the other.
Avoid duplicated code thereby.

Change-Id: Icb4e95887e92e8fe8f172329cc383f9e868874a4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-29 10:34:57 +00:00
Edward Welbourne
fbe7000ba3 Make initializers into declare-and-initialize.
Eliminates separate declaration line, makes unambiguous that all are
initialized.

Change-Id: Ib419a385b38f98070c06428da246d4580b0a0dbc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-29 10:34:48 +00:00
Edward Welbourne
54ece34283 Avoid shadowing in QDateTimeParser::findAmPm.
A parameter was called index; but an inner block re-used that name.
Rename the parameter.

Change-Id: I2fa18f32aa129c5b1d8de6c4b6571438eeefea14
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-01-29 10:34:39 +00:00
Liang Qi
a81036c3cc Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I7831f560165fa08882ae54efeaea1f0146c3358c
2016-01-29 11:13:41 +01:00
Laszlo Agocs
61efb292d2 Add a makespec for 64-bit Tegra X1 boards
Which is basically same as the Jetson K1 Pro, with SDK and compiler
options adjusted.

Change-Id: Ic0aa8144aad12e832ae440212f6a06f52668415d
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2016-01-29 09:28:57 +00:00
Alex Trotsenko
7ff655360f Integrate QProcess into QIODevice's multistreaming infrastructure
As a result, this patch eliminates double-buffering in QProcess.

Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-29 09:14:44 +00:00
Alex Trotsenko
8f92baf5c9 Adapt QFileDevice to use QIODevice's write buffer
Also, bump the TypeInformationVersion field in qtHookData, to notify
the Qt Creator developers that the offset of QFilePrivate::fileName
was changed and dumpers should be adapted.

Change-Id: I71bc5f509b733c0ab3430cd47ff08961f0388839
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-29 09:14:36 +00:00
Anton Kudryavtsev
f416561702 QNetworkHeadersPrivate: use erase and std::remove_if with QList
... instead of using erase in a loop, with quadratic complexity.

Change-Id: I91053ddb58639615e8864e5be20861e7cceb815e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-29 08:16:00 +00:00
Marc Mutz
49388f3dfd QGraphicsAnchorLayout: return a struct instead of a QList
... of QLists. The returned list was only ever exactly of
size one or two, and two only if a local QList in the
getGraphParts() function was not empty.

Instead of using a QList to return those QLists, use a
small struct of two QLists. This way, we avoid copying,
memory allocations, and the code becomes a lot clearer,
because we can give the members of the struct meaningful
names, instead of at(0) and at(1).

As a consequence, at the call site, the loop over the
result can now be collapsed into an if.

Saves ~1200b in text size on optimized GCC 5.3 Linux
AMD64 builds.

Change-Id: I5c2a3b3be0edcc418b310551abca51c410aca7c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-29 06:16:28 +00:00
Marc Mutz
587c183608 QFontComboBox: optimize handling of icons for delegate
Instead of move-assigning a new QIcon to the default-
constructed members, initialize them directly in the
ctor-init-list. Do this for the other data member, too,
for consistency.

Also use QStringLiteral instead of QLatin1String as
the argument to the QIcon ctor. This is correct, since
the string will never be modified, and saves two memory
allocations.

Change-Id: I9398bbe9d0fd63db9b6cf856dd240ab334364518
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-01-29 06:16:17 +00:00
Marc Mutz
f2d1f3f1c7 QColor: plaster API with Q_DECL_NOTHROW
This is mostly straight-forward, but some things are worth noting:

1. Yes, this is necessary. The noexcept operator looks for noexcept tagging,
   not at the contents of the function to determine whether to return true.
   The more conditionally-noexcept functions are used, the more important it
   becomes that low-level classes are correctly marked noexcept. In that, it
   is like constexpr.
2. In accordance with the rules governing noexcept specifications for the
   standard library itself, the get*() functions, as well as any function
   taking (but not returning) channel values as ints or qreals, or taking
   QStrings are not marked as noexcept, since they have preconditions and
   thus a narrow contract. Narrow-contract functions should not be noexcept.
   All other functions have wide contracts (ie. no preconditions).
3. Any function returning QString can throw (bad_alloc).
   Consequently, they, too, are not marked nothrow.

Change-Id: I023356ba1b9a4b057e613cd45380a89b222dc09d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-29 06:16:13 +00:00
Anton Kudryavtsev
74a7454b37 QNetworkProxyFactory: don't re-call QUrl::scheme() in if-else chain.
... Just cache it.

Change-Id: Iae70e09233b237d904ab100f46f8dc7ab9ac8e04
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-29 05:31:15 +00:00
Louai Al-Khanji
e65ffae850 QEventDispatcherUNIX: Clean up thread_pipe logic
Change-Id: Ic13ad54a5b3c7bd3e3e5921b3dbbe321690fad21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-29 03:49:24 +00:00
Mark Brand
dae6445e26 update bundled sqlite to 3.10.0.2
Thanks to gunnar.roth@gmx.net for updating the WinCE patch.

Change-Id: I131e0ee9141efdbd377e096aae0959311a601830
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-01-29 00:13:12 +00:00
Marc Mutz
d9229d849f qmake: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them
with C++11 range-for loops.

Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:21 +00:00
Marc Mutz
e31541fa6f qmake: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().

Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:18 +00:00
Marc Mutz
8d7e913248 qmake: eradicate Q_FOREACH loops [rvalues]
... by replacing them with C++11 range-for loops.

This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.

Change-Id: I5834620bf82f3442da7b2838363d351a0fb960a0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:15 +00:00
Marc Mutz
3f3140d38a qmake: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.

The functions QMakeProject::values(), QMakeMetaInfo::values()
and QHashIterator::value() all return by const-reference,
so they can be passed to range-for without further changes.

Change-Id: Ic3b39ed8ff8cd7a6f287f1aa9d61a1acd67d7aaa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:11 +00:00
Marc Mutz
c9cb20c01a qmake: don't iterate over .keys()
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).

Change-Id: Icac867c30e63863cfa44a382eedd4d6df2070a59
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:07 +00:00
Marc Mutz
dce2612a7c qmake: replace a Q_FOREACH loop with QList::op+=
Change-Id: Ibaa49f0d6ea5cbcb5d4d305ec9c55286eac5046e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:04 +00:00
Volker Krause
e5cd556cd1 Make documentation readable with dark color schemes.
All other colors are hard-coded in here, only the background followed the
palette.

Change-Id: If8033a72f85f953358ffeec4edd80a36b8494c7f
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-28 20:07:10 +00:00
Shawn Rutledge
8c843712da Doc: a QScreen can be a placeholder if there are no screens attached
As of change a094af0017, X11 now joins
other platforms in having a fake screen if no physical screens are
attached, rather than ever allowing QGuiApplication::screens() to
return an empty list or QGuiApplication::primaryScreen() to return
null.  This is more consistent across platforms and helps to prevent
bugs in applications which want to use QScreen in some context but
fail to check whether it exists.

[ChangeLog][X11] In case there are no physical screens attached,
QGuiApplication::screens() and QGuiApplication::primaryScreen() will
return a placeholder QScreen object.

Task-number: QTBUG-42985
Change-Id: I0f58afbfe2a034fb9e872a5d1dbdabad2c7dbf9e
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-01-28 19:17:32 +00:00
Shawn Rutledge
e6de387ea0 Polish the Tablet example
- Introduce Qt 5 signal-slot connection syntax.
- Merge MainWindow::createMenus()/createActions()
  into MainWindow::createMenus(), removing the need
  to store the actions as member variables.
  Use QMenu::addAction() for brevity.
- For actions in QActionGroups, carry the Valuator enum
  in QAction::data so that the slot to handle the selection
  does not need to compare the QAction pointer itself.
- Use a non-modal QColorDialog, so that the user
  can change colors more easily while drawing.
- Choose saner shortcut keys: control-Q should not
  override the default usage for quitting the application,
  and using shortcuts for About dialogs is anyway dubious.
- Improve the example documentation.

Change-Id: I57aaf5f5b885c13a953482dbcc41275dd3d6bff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-28 19:17:08 +00:00
Friedemann Kleint
910f719bd1 Refactor QStandardPaths for Desktop Windows.
Replace the large switch in QStandardPaths::writableLocation()
by a function mapping QStandardPaths::StandardLocation
to the int clsid required by SHGetSpecialFolderPath(). Warn if
SHGetSpecialFolderPath() fails for config location and append
prefixes (cache/application name/organization) only on success.

Change the logic in QStandardPaths::standardLocations() to append
the writable location first, avoiding the prepend().

Task-number: QTBUG-50570
Change-Id: I9d80e83d1ca7af3ea8d3ac2c720ee981b1b2c32a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-28 19:01:20 +00:00
Marc Mutz
7236721bf8 QJsonObject has random-access iterators
... but they were only marked as bidirectional.

Fixed.

This change is slightly BiC, because if some class used tag
dispatching on this iterator type, a recompile might now
pick a different overload, and the old one may not be
available to a user anymore (no longer instantiated).

I do not think Qt uses that technique, yet, though. Not on
iterator categories, at least.

Change-Id: I75fb334af7e191f882d11575dec83c879a6b50ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-28 18:38:34 +00:00
Konstantin Ritt
5f472cae71 QFontCache: Centralize the engine type safety check
We depend on the assumption QFontCache::findEngine(key) for key.multi=1
returns a font engine of type QFontEngine::Multi;
guarantee that by checking it in a single place.

Change-Id: I287da4fd62deb22fc5520cde5b0505bc44547609
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-01-28 18:24:08 +00:00
Anton Kudryavtsev
0f27d11285 Don't use QStringLiteral in comparisons
For QLatin1String, operator== is overloaded, so comparing to a latin-1
(C) string literal is efficient, since strlen() is comparatively fast.

OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.

So, just compare using QLatin1String instead.

Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-28 18:00:47 +00:00
Błażej Szczygieł
58f8dd4f92 QtWidgets: Allow to cover up the window container by another widget
When the window container already has a window handle, allow embedded
windows to use this handle as a parent. This change will allow proper
window stacking and clipping.

Task-number: QTBUG-50477
Change-Id: I8d656ecb99e0c42ae7a7ac461e5e5b5d801f5493
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-01-28 17:40:53 +00:00
Tor Arne Vestbø
ee9621b9dc Move shortcut handling back into QGuiApplication
c7e5e1d9e0 assumed shortcut handling could be done at the QPA
level, but this fails on async platforms where there are e.g
activation events in the QPA queue and we then try to handle
the shortcut synchronously.

This commit restores the handling to QtGui for non-OS X platforms,
and we should fix OS X by adding callbacks through the IME for
the special case of OS X.

Task-number: QTBUG-50467
Change-Id: I7460184cc60d0319f07771eec487325a17d7e7e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-28 16:30:26 +00:00
Tor Arne Vestbø
33bdb93ae1 Remove some old QT_MAC_USE_COCOA cruft
Change-Id: Ib9cb57563274c722023084e94f2cd439088366a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-28 16:30:24 +00:00
Erik Verbruggen
3a30a2fcb3 Allow QFinalStatePrivate to be subclassed.
- put it in a separate private header
- add a protected QFinalState constructor that takes a
  QFinalStatePrivate
- when passing through, also export QStatePrivate, so the linker can
  find the symbol

Change-Id: I8563da16739731d9d6142be438a8769fc29de148
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-28 16:24:46 +00:00
Paul Olav Tvete
efa2913e09 Compile fix for QT_NO_ACCESSIBILITY
Change-Id: I251518566f114e0e5528304c908bcaef0f026c67
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-01-28 14:10:55 +00:00
Pavel Geiger
eedf16c96f uic: Accept an -idbased argument
When we want to use qtTrId function instead QApplication::translate in
generated files it's not possible to use custom function with presented by
the --tr argument due to signature difference between qtTrId and
QApplication::translate function.

With this argument present, uic will generate qtTrId function with second
argument empty. When used together with --tr parameter it will use
presented function instead.

Change-Id: I0d986e4ea25ce58917fd9a2866b1eac0a4671502
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2016-01-28 14:07:43 +00:00
Anton Kudryavtsev
eea8494fa0 QTranslator: optimize string and char usage
Port a QString::fromLatin1() to QStringLiteral.
The string is never modified.

Wrap char in QLatin1Char to construct a QChar with 8-bit character.

Change-Id: I579ca9eae0c2a72ea893254f258b001063e9f64e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-28 14:03:44 +00:00
Anton Kudryavtsev
9ac8530591 QHttpNetworkHeaderPrivate: use erase and std::remove_if with QList
... instead of using erase in a loop, with quadratic complexity.

Change-Id: I9527923dcfc3201776a59de53dd5c03ca4d80063
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-28 14:03:35 +00:00