Commit Graph

18952 Commits

Author SHA1 Message Date
Aleix Pol
d2792d2ed9 Fix screenForGeometry on a corner case
QRect only deals with integers, and I had a window set on the corner and
without a size. When this screen was created, it was reported to be on the
wrong screen, thus created there wrong.
The reason for this is that ::center is not prepared for this use.
QRect(QPoint(500,500), QSize()).center() is QRect(499, 499)

Change-Id: I24e57182f84873306f180749e96368d6da1147a9
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-16 16:01:03 +00:00
Nico Vertriest
d0f57439d0 Doc: Added info about sorting in QItemSelectionModel::selectedIndexes
Task-number: QTBUG-40726
Change-Id: I450f9735fbbdc6574e8a14ea0076a28ee65077de
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-16 15:26:11 +00:00
Nico Vertriest
90c81366d1 Doc: added specs to setHorizontalHeaderItem()
Added that adding an item deletes an existing one

Task-number: QTBUG-42105
Change-Id: Ibcf08e6e2bf9c9239e7eca5aa48f2f30c8417fec
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-16 15:26:04 +00:00
Nico Vertriest
50f91545a3 Doc: removed 2 invalid external links in external resources.
Link to Using a Designer UI File

Task-number: QTBUG-49251
Change-Id: I9d2e5ad746ce5c3933f28b8159e381dcdb8e643a
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-16 15:25:56 +00:00
Nico Vertriest
c81fcffed8 Doc: Corrected minor typo
Task-number: QTBUG-27499
Change-Id: I20b8da6300b84a107f6f581b99c63a39f8455d6c
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-16 15:25:47 +00:00
Nico Vertriest
5c4c5dd7a2 Doc: corrected snippet QSqlTableModel
Wrongly used QSQLQueryModel previously

Task-number: QTBUG-35860
Change-Id: I059ba45e54ac67b75b68eb0b804f66642b87a29f
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-16 15:25:35 +00:00
Oswald Buddenhagen
778e6de8a2 move addition of libdl to right project
Change-Id: Ifae8b906ef3767d9c21f09953076bd640829858f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-16 14:40:27 +00:00
Oswald Buddenhagen
79cdc7a26c remove abuse of module include path overrides
these modules simply have no "proper" include paths (they are used only
within qtbase, with explicit INCLUDEPATH statements).

Change-Id: Iec6aa6ae0bc449eb8cac2fa1c86a791755eec06e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-16 14:40:24 +00:00
Konstantin Ritt
e593e5aa67 QChar: Simplify case convertion code with template magic
Same as in QString, though simpler a bit due to fixed-length sequence.

Change-Id: Idd6670a7b6415f5d515987c30931d16b73dd280e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-16 14:34:13 +00:00
Konstantin Ritt
c267646867 Move CasexTraits from qstring.cpp to qunicodetables_p.h
and implement TitlecaseTraits as well,
to be re-used in the following commit.

Change-Id: I5c0bff42fe3b9bc9c2454cc16916cc2be87f604f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-16 14:34:04 +00:00
Konstantin Ritt
4d5b57825a QFontEngineFT: Optimize format convertion code with template magic
Avoids in-loop check for every pixel by costs of slightly bigger code.

Change-Id: I8321d0945ac6b677786431670b2316c60e4db492
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-16 14:33:51 +00:00
Konstantin Ritt
6a7155997b QFontEngineFT: Revise the legacy LCD filter implementation
Use an optimized version of the intra-pixel filter found
in FreeType's _ft_lcd_filter_legacy().
Gives us somewhat better accuracy and better performance.

Change-Id: Id4200b67e6ff55f605037c3e5464fef8bb03fbde
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-16 14:33:37 +00:00
Eskil Abrahamsen Blomfeldt
a856c4a902 Fix falsely reported style for fallback font
In change 8f6b328410 we override
the fontDef of the fallback font with the fontDef of the
original font (with the family name replaced) to fix a
regression where boldness was not inherited by the fallback
font.

This caused a bug, though, since the contents of the fontDef
would now misrepresent the actual font used. The side effect
of this was that isSmoothlyScalable() returned false because
the family and styleName combination we claim to have did
not exist in the font database. Result: We fell back to
native rendering for the font even though it's scalable.

Weight and style are the only parts that should be inherited,
since they are synthesized. So rather than overwriting
the fontDef completely, we copy the weight and style when
needed.

The bug in QTBUG-42963 is still fixed after this change.

[ChangeLog][Text] Fixed problem where fallback fonts for text
with certain styles would be reported as unscalable.

Change-Id: I95ef67f818852aea5a6ae8df789a52364ecb59a6
Task-number: QTBUG-47547
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-11-16 14:33:23 +00:00
Tor Arne Vestbø
96cebb46c2 OS X: Don't forward key events to popup window if it's a tooltip
676edc006e introduced a regression by not filtering the active
popup window for tooltips, which is what the corresponding mouse
handler in QNSView does.

Change-Id: I5091dba0dd43be2e859ea360dfd812c0f081fd32
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-16 14:26:44 +00:00
Friedemann Kleint
3d6975af4b Compile minimalegl QPA plugin on Windows/WinRT.
Add event dispatchers.

Change-Id: I548b50d1ec648fa8cb6c77881c95125f361343f0
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-14 18:22:29 +00:00
Friedemann Kleint
08a4b7f745 Windows: Move GUI event dispatcher to QtPlatformSupport.
This makes it possible to reuse it for the minimalegl QPA plugin.

Change-Id: I1c3dbaf67f32294a5d0e03cc1eb8557049b810a5
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-11-14 18:22:01 +00:00
Timur Pocheptsov
d29fbbd6eb Make CoreFoundation event dispatcher available on OS X also
CoreFoundation event dispatcher on OS X can help users working with
QtBluetooth from either non-GUI threads or non-GUI applications.

Change-Id: Ie0793e7f49074a8ea9059251cd7c9bdf7953c206
Task-number: QTBUG-48758
Task-number: QTBUG-46625
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-13 21:38:31 +00:00
Friedemann Kleint
10d311d9d2 Windows/Direct2D: Handle screen changes after window creation.
Call QWindowSystemInterface::handleWindowScreenChanged() in
QWindowsIntegration::createPlatformWindow() should the effective
screen be different from the initial screen due to the geometry.

In order to avoid code duplication in the Direct2D plugin, fold the
helper method createWindowData() into
QWindowsIntegration::createPlatformWindow() and introduce a new
virtual helper to create the actual platform window for
QWindowsDirect2DIntegration to hook in.

Task-number: QTBUG-48379
Change-Id: I49c7a50a12245691414ab49bffe802239a87d2d6
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-13 21:24:34 +00:00
Konstantin Ritt
26e66694fa QFontEngineFT: Minor optimization to convertGRAYToARGB()
Precalculate everything we can and use faster loop.
Make inlined as it is used just in a single place.

Change-Id: If3c33d60739eb4ce896020321442ae81edd1c13d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 20:43:27 +00:00
Konstantin Ritt
c1da13f6db QTextEngine: Apply CoreText specific post-processing for QFE::Mac only
These tricks has no meaning to other font engines (i.e. to FreeType).

Change-Id: I0410693d4d159367d760433062506691dc7c4610
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 20:43:13 +00:00
Konstantin Ritt
50af66293d QTextEngine: Do not disable graphite2 HB shaper backend
This fixes-up bf013c9e74 by specifying
graphite2 shaper in a "safe" shaper list, one used for non-CoreText
font engines (currently, FreeType font engine only).

Make the the comment and the code a bit cleaner about the fallback
shaper list.

Change-Id: Ib0cedc0b593023c9ee771e8e98c314d9c8f13037
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 20:43:10 +00:00
Konstantin Ritt
2316db05a8 QFontEngine: Check for AAT support only with HB-NG
HB-old is unable to handle these anyways.

Change-Id: Ibe69b5d030134b8a0a76dc966b6dfc6b5ff9a883
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 20:43:06 +00:00
Konstantin Ritt
3a3e2193d7 QUnicodeTables generator: Minor clean-up & stricter checks
Use static_cast instead of C-style cast;
ushort -> unsigned short;
Avoid a lvalue in qGetProp();
Minor styling fixes.

Change-Id: Ic6412e28ac9316a587d32d0e674d21f672967fd6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 20:42:20 +00:00
Konstantin Ritt
0f336e8565 Introduce png_dependency.pri
Just like any other x_dependency.pri, it shall be included instead of
linking with png lib directly.

Change-Id: I698c8a8137f937d2e2c5f5dc9b9188b780c9e49a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-11-13 20:42:12 +00:00
Nico Vertriest
037b05ac76 Doc: corrected error in doc static plugins
Task-number: QTBUG-43160
Change-Id: I94f92318cec095391050b2af90980010bd1066b9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-13 20:33:44 +00:00
Olivier Goffart
d6b45853f5 Make qt_findAtNxFile return the source device pixel ratio
QTextImageHandler needs it.
And QQuickImageBase will also need it.

Change-Id: Ica5d17519c4c6c06e25bab7d2b1d3733f4058425
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-13 15:05:12 +00:00
Olivier Goffart
45be405408 Document performance of QMutex
Change-Id: I4de2fd5ba717975b5de98ffe7ca6348afbed1b2f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-13 15:05:08 +00:00
Olivier Goffart
1de3fe0f9b Docs: Add a note clarifying that Q_MOVABLE_TYPE is not about move semantics
Change-Id: Ib1fb9ac00c0437ed2312c46e3e97d7ece05ba8e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-13 15:05:06 +00:00
Liang Qi
6f84d50457 move styleOverride from QApplicationPrivate to QGuiApplicationPrivate
* -style option is also used in other cases than widget world

Change-Id: I8555d309a7b9df0d26ad7a7b930411260537180e
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-11-13 14:58:11 +00:00
Orgad Shaneh
bee361209f JSON: Fix MSVC2013 warnings
json_p.h(283) : warning C4800: 'uint64_t' : forcing value to bool 'true' or 'false' (performance warning)
json_p.h(546) : warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
qjsonvalue.cpp(176) : warning C4244: '=' : conversion from 'int64_t' to 'double', possible loss of data
qjsonvalue.cpp(518) : warning C4244: 'return' : conversion from 'const double' to 'int', possible loss of data

Change-Id: I2a24f90f7615aeb47f747ecbe3b580f23773ebda
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-13 03:56:20 +00:00
Kai Koehne
351853e04d Do not overwrite detailed error message if process fails to launch
On Unix we get a detailed error message when a process fails to start,
but later on we overwrite it with a generic "Process fails to start".
Fix this by keeping the original error message (if one is available).

This fixes a regression introduced in commit 5147f73ac3.

Task-number: QTBUG-49286
Change-Id: Idd0f0fed9773d39f2947fc3e532b51e670952caf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-12 14:17:40 +00:00
Edward Welbourne
4890c75d0d Prefer "daylight-saving time" and "DST" over "daylight time".
The first two are the "proper" terms; the last is a colloquialism.
Also amended "daylight savings" (which summons to mind a hybrid of
"daylight robbery" and "bargain-basket savings").
Improved related wording in many of the places amended.

Task-number: QTBUG-49308
Change-Id: I726f18a344b2fe37f765a14684d1447c8b7ab00c
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-12 14:13:35 +00:00
Edward Welbourne
708424c305 Eliminate duplicate "between"
Change-Id: I548e2df4cb94e41bb5247fc6977a3c3f67bf0bda
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-12 14:13:26 +00:00
Samuel Nevala
5956d8715c winrt: Make dialog and window behave similarly.
Status bar visibility can be controlled from dialog and
dialog size is screen size.

Change-Id: Ia8e932a9e1e1549a17d12532639391335760f9e0
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-12 06:43:30 +00:00
Oliver Wolff
b91389fef0 winrt: Clean up QNativeSocketEngine
WinRT/Windows Phone "coding guidelines" are now used for the native
socket engine as well.
    - Whenever an operation is expected to succeed
      Q_ASSERT_SUCCEEDED is used.
    - QWinRTFunctions::await is used for waiting for async operations
    - Improved error handling

Change-Id: I6c8d64731da5c94b911a5190231c7c8f68d9c261
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-12 06:43:27 +00:00
Nico Vertriest
51b19c0d86 Doc: Added more details to QIODevice::readAll()
Task-number: QTBUG-43666
Change-Id: Ibe56a72f9fa7a31a320aceda645fde9b08645271
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-09 09:33:59 +00:00
Richard Moe Gustavsen
abf47610c7 iOS: only force-finish start-up from file engine when on main thread
The authorization dialog that grants the application access to the
assets will only show after returning back from
applicationDidFinishLaunching. Therefore, trying to load an asset from
main before qApp->exec() would normally fail. To remedy that, we added
a path that starts a QEventLoop for a split second to force the
application init process to finish. But this can only work if we
start it from the main thread.

A bug with this is seen in QML FileDialog, since it (clumsy enough)
starts to iterate, in a separate thread, all the files in its currently
set directory upon start-up construction (which should be fixed as
well). The result is that the application gets dead-locked on start-up.

Change-Id: I0047272d53314752903960b33f88b33dc0d7e78d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-09 08:50:36 +00:00
Maurice Kalinowski
566399937b winrt: Fix filedialog show on Windows 10
The file picker must be used inside the Xaml thread, otherwise execution
will fail without giving any warning or error.

Task-number: QTBUG-48389
Change-Id: I917e88e95993da04be3d7cd34344ffd68ee71cdd
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-09 08:24:07 +00:00
Oliver Wolff
702a98bfb0 winrt: Also list current profile in QNetworkInterface::allInterfaces
GetConnectionProfiles does not list the current profile, so
"allInterfaces" also has to use GetInternetConnectionProfile.

Task-number: QTBUG-49121
Change-Id: I80a3ea1bfddfe502c84376ca90a7e1fe5d3020c3
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-09 08:24:04 +00:00
Oliver Wolff
20208225ee winrt: Enable generic bearer management plugin
Task-number: QTBUG-48738
Change-Id: Ic3698ca1e95aa90083295bf7c41a5f4f66b36f1d
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-11-09 08:23:58 +00:00
Alex Trotsenko
9ffbc139d1 QNativeSocketEngine: fix build in debug mode under Unix
Change-Id: I197e4853cd3ddd7543bbdb12cecc19c0ed2c9ee2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-09 05:58:23 +00:00
Lorn Potter
e996d68f61 Make UnknownAccessibility not block requests
This allows requests to proceed without needing bearer plugins.

Task-number: QTBUG-49267
Change-Id: Ie5ce188ddefebd14d666bb5846e8f93ee2925ed1
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2015-11-06 19:52:38 +00:00
Friedemann Kleint
7a42c8c15c Testlib: Replace linked lists in QTestTablePrivate by std::vector.
This speeds up tests/auto/corelib/tools/qchar which spends a lot
of time in QTestTablePrivate::elementAt(), QTestTablePrivate::dataAt()
from 6s to 500ms on an average Linux machine.

Task-number: QTBUG-38890
Change-Id: I16b75819f88ca7974a581affd8409f7b4038a712
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-06 18:24:24 +00:00
Allan Sandfeld Jensen
9f66b1dd71 Set private inline QRgba64 methods always inline
By setting them always inline we ensure they will never generate symbols.

Change-Id: I2c815c4fe2cb498187656e0b25ef4499258885ff
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-11-06 16:59:04 +00:00
Friedemann Kleint
73b7096822 Fix build of PostgreSQL plugin with -Werror on Windows/64bit.
Fix MSVC warning:
sql\drivers\psql\qsql_psql.cpp(452): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

Change-Id: I44a902a9169efa568dcd82bdc08c5b97e661d65a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-11-06 16:48:17 +00:00
Edward Welbourne
e9b051f0ca Fix false claim in comment.
Given that % and / have a defined consistency relation, neither is any
better defined for -ve operands than the other.  The code is in fact
avoiding using -ve operands, not preferring "well-defined" / over
(allegedly less so) %, as it claimed.

Change-Id: I666690872f078c0f21f9af7a227c2bbf291704e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-11-06 08:49:45 +00:00
Friedemann Kleint
0d14cdd30e QWindowsEGLContext: Fix overly specific EGL include path.
Allow for using other EGL implementations besides ANGLE.

Change-Id: I64ceca477912150425e4a9328001cc911bd351bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-11-05 18:56:11 +00:00
Marc Mutz
491ccf3b85 Mark qt_from_latin1() as nothrow
It's used from a different TU, too, so we can't rely on the
compiler to inspect it to draw this conclusion itself.

This function has technically not a wide contract, because
the output buffer needs to be large enough to hold the result.
However, this precondition cannot be checked from within the
function, therefore no assertion can ever be added and the
nothrow marker becomes acceptable (even desireable).

Change-Id: I2dc6c4f3d9d8147c6483865c5c4bbc8e9af291b7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-05 14:38:05 +00:00
Marc Mutz
4d76352ae0 QUtf8: remove an unused variable
'need' was never anything but zero, so drop it.

Change-Id: I4b52107afc7ed47c19ae1942cef0c92cbd0e1a36
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-05 13:57:40 +00:00
Konstantin Ritt
56c1755c3d Re-generate Unicode data tables
Change-Id: I53fb254709764e56e9889531655fe6046f15b251
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-05 08:25:06 +00:00