Commit Graph

25604 Commits

Author SHA1 Message Date
Thiago Macieira
9b30c15942 QLocale: Add Q_ENUM for QLocale::Script
Change-Id: I7e6338336dd6468ead24ffff141129d557330f00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-28 18:38:12 +00:00
Nico Vertriest
07a6f15a94 Doc: corrected minor language mistake
Task-number: QTBUG-42977
Change-Id: Icdd70a41c9ef72224992d59342f4f97c65de78fc
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-28 13:09:15 +00:00
Topi Reinio
616f690761 Doc: Use a navigation separator in the simple offline template
As we cannot style the navigation elements freely with the restricted
version of CSS that QTextBrowser supports, we need to inject
separator elements between the prev/next page links.

This change adds a 'bullet' character wrapped in a <span> as a
separator. A rule is added to the standard offline CSS to hide the
separator as it's not needed there.

Change-Id: I13220a2a60e2d3063f94bc7dff0e4320d0bed4f6
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-28 11:55:05 +00:00
Friedemann Kleint
7daae2c2c7 Windows: Delay-initialize pluggable touch devices.
Move touch device initialization code to QWindowsContext and
replace the assert on the touch device in QWindowsMouseHandler
by a call to the initTouch().

Task-number: QTBUG-48849
Change-Id: If8573b8283ef94e7fd015f6edc626e3c8cc0b139
Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-28 09:23:46 +00:00
Joerg Bornemann
c66b492ced fix vcxproj linker options
Commit 4bb004de94 broke the linker
options in generated Visual Studio projects.
We need to call fixLibFlags on QMAKE_LIBS and QMAKE_LIBS_PRIVATE.

Task-number: QTBUG-48936
Change-Id: I2f12bf0117d27104cd34f2f43fdeb7b948fa375e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 18:30:27 +00:00
Marc Mutz
474bee61e4 QtNetwork: convert some QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.

This change is safe, because the QDateTimes are only used for
comparison with other QDateTimes, which, from a quick glance around,
seem to be mostly, if not exclusively, in UTC. Comparsions work
across time zones, but the comparison between UTC date-times is
fastest.

Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.

Change-Id: I6859d886d8dc8e0a52fbe394fbb7b93a87b4739a
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-27 18:27:59 +00:00
Alex Trotsenko
1e32ade79c QIODevice: fix interleaving read() and write() in text mode under Windows
Skip the correct number of bytes in the read buffer when expanding '\n'
into "\r\n" upon writing.

Change-Id: I5b01fc47c330dee5c83001abf0acd7d63d790b96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 18:24:34 +00:00
Andy Shaw
a91c40868b Check if the session is valid before connecting to it
Since there are circumstances where the session is not yet created after
start() is called then we should check if the session is valid before
connecting to it.

Change-Id: I94236f76e4be2433a8c96eb91ce2d4b4d42f2fd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-27 18:00:22 +00:00
Andy Shaw
95b1982e47 Return early if there is no text at the offset
Change-Id: I9d0b1e6e054a48bac34fb4e51b656c475f5638b4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-27 18:00:14 +00:00
Dmitry Shachnev
08be8691f7 Fix QStorageInfo on BSD4 systems
- On NetBSD, the defines were not properly defined;
- On all other BSD systems, we use statfs which does not have f_frsize
  member, revert to using f_bsize there.

Task-number: QTBUG-48267
Change-Id: Ia1ed484ac61a615fcbb5b45affb516b5e86a64b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-27 17:59:44 +00:00
hjk
33486e0ae7 Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possible
Faster.

Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81
Reviewed-by: Marc Reilly <marc.reilly@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
(cherry picked from qtcreator/a439483d704113286370e7e93e0e6bc16199d8ab)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:51 +00:00
Daniel Teske
99a4a62977 QMakeGlobals::expandEnvVars: Make sane
Use indexOf() to match individual characters, which is a lot faster than
QRegExp. As a side effect, don't try to expand what we just inserted.

Change-Id: I964fbd92055f2f2649e7d8ed5739cf1fc7cae927
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/2cc17a61eb6d0fee80fd388fcc5be03a59e4f2b5)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:48 +00:00
Christian Kandeler
b7205053ed Remove Qt version checks.
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.

Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
(cherry picked from qtcreator/847f10e9ccc8c3541782a790e04c85c6b4c701da)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:43 +00:00
hjk
ba2d6bb968 Use Qt 5's QStringList::join(QChar)
Less typing and less cycles than join(QString) where appropriate

Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
(cherry picked from qtcreator/6431ab2c799553623ec3fe6a79f1e85484558dd6)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:30 +00:00
Oswald Buddenhagen
7b1a8e047c consider qt resource paths absolute
this fixes an assertion failure with qt4 mingw specs when PATH contains
a "." element.

Task-number: QTCREATORBUG-12528
Change-Id: I2b6b7e02cf38881d40bd78bb0d705f7d58d0736c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
(cherry picked from qtcreator/d0428a05220ed0550dd84cdb8299a1fb37b0fe72)
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-10-27 17:54:27 +00:00
Oswald Buddenhagen
193c6d2ebb avoid that a bad qmakespec path crashes the evaluator
assigning a relative path to QMAKESPEC or QMAKESPEC_ORIGINAL (in the qt4
windows legacy code) would lead to an assert further down the line.
just ignore such attempts silently.

Task-number: QTCREATORBUG-8477
Change-Id: Ie53d0ef004c743284b85de4e89f112e0161ff4b7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/e017a1dc8b2030e509d6198315e9f6a9869667e7)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:19 +00:00
Daniel Teske
b4e6409fea add ProFile::tokPtrEnd()
just syncing up with qtcreator.

Change-Id: I2bda6961f6f1164bdc58acd78fa3d2221977f0cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/765ad6c3d28813d4baa0aeafd03076ba76557d3d)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:15 +00:00
Oswald Buddenhagen
a8010f2d03 fix raw data leak in $$sprintf()
it could be only triggered by abusing the function (no expansion
actually done), and nobody is using this to start with, but still ...

Change-Id: I3d4a23ae4d1eea07955572d8213094e0dc218f6d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/cdc2a0f72334268684e0407e9b04b3188e00d4bf)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:11 +00:00
Oswald Buddenhagen
07ada2fb60 micro-optimization: use ProStringList::join(QChar) overload
Change-Id: I25c6205df78da7fbee0ad1b04476f528f376b7a6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/701a82d3a2185702c09dfecb361853fc18947807)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:08 +00:00
Tobias Hunger
eba9769b7e QmakeParser: Do not leak temporaries into cache of files
This prevents an access to free'd memory when opening qtcreator.pro.

Looks like qml2puppet.pro gets added to that cache in QMakeVfs::writeFile
with part of the including pro-file's filename in it. That part gets
cleaned when that containing ProFile goes out of scope, leaving a key in
QMakeVfs::m_files free'd but accessible.

Change-Id: I80b43d2fbb66c214647497ea97e6e3a587e274d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/336c3159617cdb3edd35021b5fb312d4d43f9a84)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:05 +00:00
Daniel Teske
771724d2f4 ProParser: Plug raw data leak
QProcessEnvironment caches keys, so we must not pass it QStrings created with
fromRawData()

Task-number: QTCREATORBUG-9142
Change-Id: I29fade02f3bc4110fafb1b04d44f2e653951a2ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/99f15f1706868c4b2f84bc4164451bd69b3b8188)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:54:02 +00:00
Oswald Buddenhagen
bbf2f1dbbf don't complain about missing include()s during cumulative evaluation
it produces simply too many false positives.

Change-Id: I3dfa109866450babe5c16f84665ad22024d99e42
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/08bae158320f6d73bf44fcf43f45f51a01334544)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:53:58 +00:00
Oswald Buddenhagen
3f723ff9a9 execute some loops even in cumulative mode
we execute foreach loops now. this is (mostly) safe nowadays, because
a previous change added precautions against exponential value list
growth, so it's unlikely that two nested loops would keep the cpu busy
for a day as before.

we continue to exclude forever loops and loops with excessive integer
counts.

Task-number: QTBUG-8550
Change-Id: Iaa116086986cc7fd5023834753f791dd205102e5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/dd4d594c787a62fa8aa12695c5d115c71b59bacd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:53:54 +00:00
Daniel Teske
e59d39c6fd QmakeProject: Fix crash on updating sources
ProFileCacheManager::discardFile(s) may remove an entry from
the ProfileCache only when it is unused (which is the case iff
ent->locker is zero).

Change-Id: I9df2079087af6bd0d35dd121db6222e8a6ec9389
Task-number: QTCREATORBUG-14730
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtcreator/dedcd25924743e494055c1e0195aeef0f3983a1d)
(cherry picked from qtcreator/b335b2a083e456e2b44b1e9454a0f4cd41e2a397)
(cherry picked from qtcreator/a027cbcd7051c634a51b6029dcb8a5b4bfe8b046)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 17:53:50 +00:00
Joerg Bornemann
691671893a fix race in ANGLE build
The flex and bison rules generated the same files for debug and release.
This conflicts in parallel builds, e.g. when using jom.

Task-number: QTBUG-49003
Change-Id: I6f64760d83292e8bfad6fd0b4f8fbdd386e2213b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 17:02:47 +00:00
Friedemann Kleint
69032adda0 Windows QPA: Fix debug operators.
Enclose all debug operators within QT_NO_DEBUG_STREAM, declare
all public ones and make the others static. Add operators for
POINT and WINDOWPLACEMENT.

Task-number: QTBUG-48449
Change-Id: I33f2dba2bf486a8f5cb11f11f4e2b37cce086def
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-27 15:27:05 +00:00
Gabriel de Dietrich
8b9346c740 Item Views: Avoid reentrant call in updateEditorGeometries()
This may result in incrementing an invalid iterator after the
iterator's container has changed. Also, for this to happen,
the view needs to have an active editor.

The reentrant call happens as follows in QTreeView, after the
model adds new rows to the view:

    QTreeView::rowsInserted()
    QAbstractItemView::rowsInserted()
    QAbstractItemView::updateEditorGeometries()
    QTreeView::visualRect()
    QAbstractItemViewPrivate::executePostedLayout()
    QTreeView::doItemsLayout()
    QAbstractItemView::doItemsLayout()
    QTreeView::updateGeometries()
    QAbstractItemView::updateGeometries()
    QAbstractItemView::updateEditorGeometries()

Other concrete item view classes may be prone to the same issue.

The fix consists in relayouting the items if needed, which should
trigger calling updateEditorGeometries() again. This doesn't
invalidate previous optimizations regarding item relayouting since
we only force relayouting when it'll be done by visualRect().

Change-Id: Id31507fdc8d9a84d50265298191d690d1a06792b
Task-number: QTBUG-48968
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-27 11:58:32 +00:00
Marc Mutz
29a7f5571c QtWidgets: use printf-style qWarning/qDebug where possible (I)
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 first part, replace
   qWarning() << "...";
with
   qWarning("...");

Change-Id: I1f6869b024103c98262f1deae014e0d7337a541c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-27 11:10:24 +00:00
Marc Mutz
f8eeabcf5c QNetworkReplyHttpImpl: convert some QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.

This change is safe, because the QDateTime is only used to
compare against a copy of itself, adjusted by some seconds,
which doen't care which TZ the date-time is in, to get a
time_t, which is much faster done from a UTC time, and
to calculate the seconds to expirationTime, which, from a
quick glance around, seem to be mostly, if not exclusively,
in UTC. secsTo() works across time zones, but the comparison
between UTC date-times is fastest.

Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.

Change-Id: I22aa5350b29493f01fb503ef5ec68a964ca95cf3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-27 11:10:01 +00:00
Eskil Abrahamsen Blomfeldt
39e023b805 Remove historical +4 padding in QFontEngine::alphaMapForGlyph()
Back in the old days, we would pad the output from the font engines
to work around problems with the GL1 paint engine such as issues
with linear sampling, etc. This is no longer needed. Padding is
moved into the glyph cache, and in addition to reducing performance,
the extra padding is also making alphaMapForGlyph() and
alphaMapBoundingBox() fall out of sync when you fall back to
QPainterPath drawing the glyph. The result of this was that,
when prepared, the glyph cache was sometimes not made large enough
to hold what alphaMapForGlyph() actually produced, depending on
the size and order of glyphs, and glyphs ending up at the end of rows
would sometimes be missing from the output.

[ChangeLog][Text] Fixed some instances of missing glyphs when
drawing large fonts.

Change-Id: Ia5982392fe1637f6ebc740db9f226fbb91f75166
Task-number: QTBUG-47547
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-10-27 09:01:47 +00:00
Liang Qi
e0d0e4a9a2 Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-26 21:29:32 +00:00
Thiago Macieira
00f35b4ae7 Move pointer size detection entirely to qprocessordetection.h
This commit removes the legacy ptrsize check, which was deficient
because it did not work for multiarch systems (when we supported fat
OS X binaries) and did not work for bootstrap builds because the size
might be different when cross-compiling.

Instead, let's rely on the predefined preprocessor macros to detect
correctly. As a nice side-effect, this fixes 64-bit Android builds
cross-compiled from Windows.

Task-number: QTBUG-48932
Change-Id: I1d0f78915b5942aab07cffff140f9a52b9342f23
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-10-26 19:57:54 +00:00
Andy Nichols
3b447ae1f3 Add qgltf support to qmake
qgltf is a tool provided by the Qt3D module that enables 3D assets to
be defined in qmake project files, and have them converted to an
efficient binary format at build time.  The qmake feature will convert
all 3D assets specified by the QT3D_MODELS variable to the qgltf
format and add the new model asset to the project as a Qt resource
file.

Change-Id: If7250d6f23a06254b1ed0e408057723763aad8c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-26 16:29:25 +00:00
Maurice Kalinowski
30d02f468f WinRT: Retrieve color settings on Windows 10
Windows 10 uses one enum for all target platforms. Use
ApiInformationStatics to identify whether enum values are accessible at
runtime.

Change-Id: Ib77c9d2a2b5cf1655fbe7d937d0c83cc4cdd9ee9
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-26 12:19:47 +00:00
Martin Koller
2f7d3cf559 Android: auto-detect MIME type for local files to make openUrl work
[ChangeLog][QtCore][Android]
Fixed the opening of a local file using QDesktopServices::openUrl().

For a local file to be viewed with
QDesktopServices::openUrl(), Android needs to be given
the MIME type otherwise it does not start an Intent to view the file.

Task-number: QTBUG-45585
Change-Id: Ifcfce4bff35011f205cfadbdb2b37a1780dac87d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-26 11:35:15 +00:00
Joerg Bornemann
c20f92a0fa fix growth of event queue in QWinOverlappedIoNotifier::waitFor*
Do not emit _q_notified when we're in a wait function. Otherwise,
the queued signals could pile up in the event queue.

Task-number: QTBUG-48653
Change-Id: I071863e2356e17c7004e3b7ca359967cb115e343
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-26 11:02:27 +00:00
Dmitry Shachnev
b7c4f15d67 Undef HAVE_WAITID if needed constants are not defined
That is the case on Hurd, where the code currently breaks because Hurd
does not have WEXITED or WNOWAIT defined.

Change-Id: I4b13633612b1168d36c949d9e8b35bc05bca7d5c
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-26 10:48:12 +00:00
Paul Olav Tvete
7532fb4e61 Xcb: fix crash on screen power save
Handle various cases where we have null QScreen or QPlatformScreen
pointers. With this change, I can run Qt Creator for several days.
Before, it would crash multiple times per day with a two-monitor
setup.

Change-Id: I0923d886ae2a4199ac37edd711ddd4f6f99df93d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-10-26 10:05:20 +00:00
Marc Mutz
a38df3f3ba Android: use Q_UNIMPLEMENTED()
... instead of explicit qWarnings()

Change-Id: I986a11bf519eaefd400813776d173b0ab2c2bc62
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-26 09:29:58 +00:00
Morten Johan Sørvig
b2d24dc347 Android: Add opt-in high-dpi support
Opt-in by setting android.app.auto_screen_scale_factor
to true in AndroidManifest.xml. This will enable
devicePixelRatio scaling in QtGui using a scale
factor provided by Android DisplayMetrics.

Note that the Android style is not currently supported:
it already accounts for different display densities
which results in incorrect visual sizes when enabling
devicePixelRatio scaling.

Implementation: Bring DisplayMetrics::density through
to setDisplayMetrics in androidjnimain.cpp, similar
to what is done for "scaledDensity". Override
QPlatformScreen::pixelDensity(), which forwards the
scale factor to QtGui.

[The difference between "density" and "scaledDensity"
is that the former is a physical display density factor
which corresponds closely to devicePixelRatio in Qt,
while the latter also includes the Android global font
scale factor.]

Scale the global font pixel size in qandroidplatformtheme.cpp
to keep the visual font size constant.

Based on an initial patch from Daiwei Li <daiweili@suitabletech.com>

Task-number: QTBUG-46615
Change-Id: Ia51f99bf6dda485a57413949246c7b32cb47e8dd
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-10-26 09:27:54 +00:00
Morten Johan Sørvig
45bb9c29e8 Fix QHighDPiScaling initialization issues
Call QHighDpiScaling::updateHighDpiScaling() in init_plaform(),
after the platform integration has been created and most platforms
have populated the screen list. Keep the existing udpate call for
the platforms that don't, but guard against calling it twice.

Task-number: QTBUG-47947
Change-Id: Ib73bea7c4ab42e7acf6532f3a3100e1fc29acc2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-10-26 09:25:38 +00:00
Marc Mutz
a681b90418 QNetworkAccessCache: convert QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.

This change is safe, because the timestamp member is only
ever handled inside, and the calculation of the time difference
does not depend on any particular time zone.

Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.

Change-Id: I6c9190a4253ce5972871ab1f12870f8ae9891966
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-26 09:00:26 +00:00
Eskil Abrahamsen Blomfeldt
4f4da7462b Support overlapping contours in glyph rasterizer fallback
Truetype fonts should be rasterized with a winding fill
as documented in e.g. Microsoft's specs.

Failing to do this caused a bug when doing native
rendering in Qt Quick for fonts that were large enough
that the fallback path was taken when drawing the glyphs
into the cache. If the glyph had overlapping contours,
they would be subtracted from the shape.

[ChangeLog][Text] Fixed an uncommon rendering error with
fonts containing overlapping contours.

Task-number: QTBUG-41197
Change-Id: I0e4a4432ba3f902bc3ea59d8f4dbd12a295630b2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-10-26 08:07:55 +00:00
Maks Naumov
1721c83c27 QPathSegments::Intersection: reduce struct size 24 -> 16 bytes
Only for systems where qreal is double(8 bytes).

Change-Id: I3fd6b5d4279c41102ead24eef287bb37847398c1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-10-26 08:23:45 +00:00
Shawn Rutledge
51dac9890d xcb: better error reporting when shmget() fails
Change-Id: I160ebc07f25fd08b86ca5494cb149c5fc7c70086
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-26 07:34:13 +00:00
Samuel Nevala
a8455ac5fa ANGLE: Fix winrt backing store to support feature level 9_3 devices.
Partially revert c7abf81786. Instead of using the ES3 entry point,
use ES2 for framebuffer blitting. This means that a small change is
required to ANGLE for the blit behave the same as ES3 (applied only for
Windows Store apps).

Task-Id: QTBUG-48266
Change-Id: Idc51f00a659c91f740876be071eb71bff69e0e38
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-24 09:41:03 +00:00
Liang Qi
7df107f026 Cocoa: Implement QPlatformInputContext::locale().
Listen to NSTextInputContextKeyboardSelectionDidChangeNotification.

Task-number: QTBUG-48772
Change-Id: Icea4ef61fd184edbe65a7f195318832a22c312ab
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-10-24 05:51:20 +00:00
Liang Qi
6bc1ce9c16 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/corelib/kernel/qcfsocketnotifier.cpp
	src/tools/qdoc/qdocindexfiles.cpp

Change-Id: Iae365b23afc611de8794f22cceae8b210d25aa8a
2015-10-23 23:14:22 +02:00
Frederik Gladhorn
129d268246 Fix alignment in qConvertARGB64PMToA2RGB30PM_sse2
_mm_load_si128 requires 16 byte alignment. This crashes on 32 bit Windows
builds.

Change-Id: Ib6c30eba726747bbab56467eada820521981a80c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-23 21:11:43 +00:00
Alex Trotsenko
ccca3ffdc2 QNativeSocketEngine: declare PacketHeaderOption enum as a bit field
It should be possible to use these constants simultaneously and to
handle them separately from each other.

Change-Id: I0c48a3c25456b487c9d6139b05105ada20f34be6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-23 18:21:07 +00:00