Commit Graph

23322 Commits

Author SHA1 Message Date
Konstantin Ritt
a37daf99ad [DiagLib] Sync QChar enums
These values were added as part of upgrading to Unicode 7.0

Change-Id: Ib208828a7685ba4f89f0e2f06033f74c8ff13532
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-05-01 05:35:46 +00:00
Romain Pokrzywka
6c4b0e443f Move QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO definition to gcc-base.conf
The flags are the same across all GCC flavors so put the definition
in the common gcc-base.conf instead of duplicating it in g++-base.conf
and clang.conf

Change-Id: I1ba2c3c314d3a02b559c384aecef74240f69f659
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-30 20:19:14 +00:00
Allan Sandfeld Jensen
041cbe4b38 Add missing RGB32 <-> RGB30 convertions
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.

Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 19:27:39 +00:00
Allan Sandfeld Jensen
68faf3a9bb Fix QImage format after inplace conversion
Some inplace conversions would not set the requested image format in
the returned image, due to the same conversion being used for several
destination formats.

This patch ensures all inplace conversions return the right format,
and adds testing infrastructure to easily test iterate over all formats
so that they all can be tested.

Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 15:26:26 +00:00
Friedemann Kleint
4e88f1aaea Windows QPA plugin: Fix debug formatting.
- Introduce QDebugStateSaver for all debug operators.
- Remove the "Flags=" from enumerations since their type is now output
  by default.
- Added some spaces since the previous formatting relied on space=true
  as a result of some debug operators erroneously returning debug.space(),
  which is now fixed in qtbase.
- Fixed formatting, added noquote() where necessary, added some newlines,
  used stream modifiers instead of QString::number(n, 16) to output
  hex numbers.
- Fix indentation.

Change-Id: I64123a4262916e21448cda2aa61ae1100f07291a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-30 10:27:37 +00:00
Allan Sandfeld Jensen
52ddfb36c8 Fix two errors in RGB30 conversions
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.

Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 10:00:21 +00:00
Alexander Volkov
fe086ddb9e xcb: Fix updating physical screen size
X server may return an empty physical screen size, for example
on VNC, Xephyr or some not very well supported hardware.
In this case it's possible to use the size of the virtual desktop,
but until now it was done only in the QXcbScreen constructor.

Move it to QXcbScreen::updateGeometry() and calculate physical screen
size using the DPI of the virtual desktop.

Task-number: QTBUG-45564
Change-Id: I6b757818a2fcefdd7b2c0aa31b840a88d625d6ae
Reviewed-by: Daniel Vrátil <dvratil@redhat.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-04-30 09:55:07 +00:00
Frederik Gladhorn
631eb12dd2 The qpluginloader machtest needs Q_AUTOTEST_EXPORT
Doing a build on OS X without -developer-build fails.

Change-Id: I49c178ab2428177d9dd94f84620595a4bc132244
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-30 06:32:23 +00:00
Katja Marttila
2596f95b3b Fix QTreeView ending up in wrong state when drag
Changed state in MouseRelease so that QTreeView
does not end up in wrong state if drag is started
but not completed.

Task-number: QTBUG-44773
Change-Id: I0b665d2944f2b696bc4b7e79689d110aefa3f194
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2015-04-29 15:21:43 +00:00
Allan Sandfeld Jensen
7f8da2179b Convert opaque indexed images over RGB32
There is no reason to use the more expensive ARGB32 conversions when
there is no alpha channel involved.

Change-Id: Ifcb325352b8c806ef755db385121a2939c5825b2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-28 21:43:50 +00:00
Erik Verbruggen
fc51e86ca4 QStateMachine: optimize conflict calculation.
Done by using in-place removal from the list of transitions using
iterators.

Change-Id: I6dced4b214b49b3dcd3ba19ca4cd81a601f81bb6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-28 12:54:08 +00:00
Marko Kangas
0abf5ec7c4 Add support to set text/uri-list mimedata via setData()
Fixed issue that text/uri-list mimedata got from QMimeData::data()
was corrupted after setting it back via QMimeData::setData()

Change-Id: I2377523a9286519402ab9127ed7f3fa66e39a679
Task-number: QTBUG-45486
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-28 12:46:35 +00:00
Allan Sandfeld Jensen
f15d6c3fa9 Preserve QImage metadata in image transforms
Some QImage methods were not preserving image metadata, or only
preserving some of it. This adds the missing parts and adds a test for
metadata.

Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-28 12:42:12 +00:00
Caroline Chao
1576f62eaf Tests: Use blacklist for failing tst_qfilesystemwatcher tests
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: I34374ed7269f941c330c65d97fe083c83d3df461
Task-number: QTBUG-33574
Task-number: QTBUG-30943
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-28 12:35:21 +00:00
Marc Mutz
84b739158d QIODevice: fix data loss when reading large amounts from sequential devices
In certain situations, when reading a large amount of data from
sequential devices with QIODevice::readAll(), content was lost when
passing a qint64 value > QByteArray::MaxSize into QByteArray::resize(),
which takes an int. The result of the conversion to int is either negative or
calculated mod 2^32. In any case, it will at some point be < QByteArray::size(),
which prompts QByteArray to truncate, losing already-read content.

Fix by adding an explicit size check before calling QByteArray::resize().

This shows once more that an API that uses int for sizes is dangerous.
Esp. on 64-bit platforms.

Change-Id: I30fbfad0bf37476c34141b6f3786e7e0fc8e1e74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-28 07:15:51 +00:00
Alexander Volkov
39683b2980 QSystemTrayIcon: Fix the placement of title and message in a balloon
Swap title and message parameters in the QBalloonTip::showBalloon() call.
It was wrong in f277c07467 on xcb platform.

Task-number: QTBUG-43428
Change-Id: I18e354703d9fa9c196b2789e6df263debdb7ce06
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-04-27 19:32:06 +00:00
Oswald Buddenhagen
0823e3f746 make headers-only modules work for framework builds
Change-Id: I00125883335c5b8cc556b4e4c964e11c55aa989b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 18:58:50 +00:00
Oswald Buddenhagen
6cb495dee3 make QMAKE_FRAMEWORK_VERSION work independently of TEMPLATE
QMAKE_BUNDLE_DATA itself does as well, and it can refer to versioned
resources.

Change-Id: I3d9bf23c2ff81dbb1cd929f3f0e0ce1e67f3258a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 18:58:47 +00:00
Jacek Całusiński
0635b1a69d Moc: test if superclass list is not empty before accessing first()
Accessing QList().first() with an empty superclassList caused assertion
fail. Added check to fix it.

Change-Id: I1aff35e0d267fc0e670beadba1bd196b175a4da8
Co-authored-with: Olivier Goffart <ogoffart@woboq.com>
Task-number: QTBUG-45790
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-27 16:14:17 +00:00
Stephen Kelly
2886935f96 cmake: Don't mark header-only frameworks with the FRAMEWORK property.
CMake INTERFACE targets may only have whitelisted properties, and
FRAMEWORK is not in the whitelist in released CMake versions.

Change-Id: I27cd0cfbe1b52f25c91bf1b3c0d55879bed91bdf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2015-04-27 13:52:53 +00:00
Friedemann Kleint
d1e4ba0692 Windows: Add "Segoe UI Emoji" and "Segoe UI Symbol" as fallback fonts.
This enables rendering of Emoji symbols.

Task-number: QTBUG-45811
Change-Id: I7cb128dab717870929e02ea9ec253f36fef29804
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-27 13:31:15 +00:00
Joerg Bornemann
fc08ac53a0 remove superfluous method re-implementation
Remove a superfluous implementation of
VcprojGenerator::replaceExtraCompilerVariables.
The implementation in the base class is exactly the same.
Use that instead.

Change-Id: Ie7d995be1b0d55fbefd15ae6b7a992237d97839c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 13:25:27 +00:00
Christian Strømme
3753667b2b Android: Make foreign windows expect global coordinates.
The foreign window implementation was trying to handle parent/child
relationships, but it's not supported by the platform implementation
and was therefore causing more problems then it was solving. E.g.,
even simple use cases, such as the parent moving or re-sizing its
geometry would not be handle correctly.
With this change the parent/child relationship is removed and the
geometry of the foreign window will always expect the geometry to
be in the global coordinate system.

Task-number: QTBUG-43391
Change-Id: I02a1f9cb9eb9fb5ace9b7e912c523bda7c5bfd5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-27 13:05:22 +00:00
Caroline Chao
411a3490fd Tests: Blacklist tst_QHostInfo::abortHostLookupInDifferentThread
Remove the insignificant_test CONFIG option in favor of a BLACKLIST
file. This test has been found failing on OpenSuse in CI.

Change-Id: Ibc6af3c30277fec7e422e8bbeccd9437de2a61ce
Task-number: QTBUG-23837
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-04-27 11:52:25 +00:00
Laszlo Agocs
291eb172e3 Avoid setting a swap interval for pbuffers
As per GL_EXT_swap_control this results in BadWindow.

Task-number: QTBUG-45705
Change-Id: Ia3e3f66f326d8f6145d82f33f964b0d6996f0959
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-27 11:51:47 +00:00
Topi Reinio
3e7cf5981a qdoc: Resolve base classes for a class declared in a namespace
For classes declared in a namespace, QDoc needs to take account
the fact that its base classes typically are not qualified with
the namespace name if those base classes are from the same
namespace.

There already was code for this, but it was disabled by a macro.
This change re-enables it, and adds an additional check to
restart the search in valid namespaces only.

Change-Id: Ia07dcb783b59de5fc9ddcfd43000a63c6c74ebe1
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-04-27 11:47:34 +00:00
Topi Reinio
b71535a923 Doc: Bring QSizeF/QPointF::isNull() documentation up to date
Since Qt 5.0 (commit 09dd19df) sign is ignored when testing
whether a QPointF or QSizeF is null.

This updates the documentation accordingly.

Change-Id: I3de1c748f3caa63b8bd8990006de5ba572eac83e
Task-number: QTBUG-45669
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-04-27 11:45:16 +00:00
Topi Reinio
21c90bcc98 qdoc: Sanitize anchors in URLs for functions
When QDoc constructs the full path to a documentation node, it
must construct a clean anchor reference. Intra-page links use
a different code path, so the links e.g. from Member Functions
list to their detailed descriptions always work, but using the
link command to link to functions with certain characters (such
as 'operator==') failed because the node name was used as-is and
not sanitized ('operator-eq-eq').

This change moves HtmlGenerator::cleanRef() static function to
its parent class, Generator, and takes it into use in
Generator::fullDocumentLocation().

Change-Id: Ic939ffa3ae0f4495ef2a30eff0d4a1de65ea3e8f
Task-number: QTBUG-45629
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-04-27 11:44:06 +00:00
Andy Shaw
4dd896785b MySQL: Add support for the timeout options via the connectionOptions
Task-number: QTBUG-321
Change-Id: I0bbc1ae713fb0278a9973f8e87f28f1b3f1c49ce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-04-27 11:39:29 +00:00
Friedemann Kleint
4bafef9890 QMainWindow::restoreDockWidget(): Fix positioning of floating docks with native decoration.
Use QWidget::move() to position floating dock widgets.
Add a test for QMainWindow::restoreDockWidget().

Task-number: QTBUG-45780
Change-Id: I945917728a663916e8c225b9d3d2a75fa508d68f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-26 13:15:57 +00:00
Marc Mutz
9c4cbc0cc7 QGenericMatrix: remove one of two non-initializing ctors
...and port to the remaining one.

Can't do the same for QMatrix4x4, because that class is exported.

Change-Id: I5448921af9e9194532be1b9f8d739b5c418a5e0b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-26 12:40:43 +00:00
Marc Mutz
2447dd2659 QGenericMatrix: remove copy ctor
The compiler-generated one is just fine.

Change-Id: Iaacc56d4224c69b66823cc64640a00117c44d3cc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-26 12:40:37 +00:00
Nikita Baryshnikov
b089579dc3 QDir: sort-by-size remove two unconditional branches
recent change ad03511256 made r be
arbitrary, not just -1, 0, +1, and now it doesn't make sense to have two
unneeded unconditional branches in the sort-by-size case

Change-Id: I9d80210846e89e3e8c574f0c32e04b05202b8a5b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-25 12:49:05 +00:00
Allan Sandfeld Jensen
bc162382e5 Short-cut SSE4 unpremultiply
Even with SSE4 optimized unpremultiply it is still significantly faster
to skip the calculation on alpha values 0 and 255.

Change-Id: Iafe658fea8eacf35a857f292952b0c1ee056139c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-25 00:15:52 +00:00
Marc Mutz
ce302a53df Simplify QQuaternion::operator!=()
Change-Id: I5043c86362f5126c52d768b51774086869429e08
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-24 13:51:20 +00:00
Caroline Chao
cf5e3f37f4 Tests: Blacklist task260974_menuItemRectangleForComboBoxPopup
On OS X 10.10. This test in tst_QComboBox is currently failing in CI.

Change-Id: Ie326f79a900c3ae926c7ebe5bb5880dd422cee60
Task-number: QTBUG-45531
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-24 13:43:06 +00:00
Sérgio Martins
1c33c37d4c QVector: Save one copy-CTOR call if we don't realloc
Change-Id: Ie0f2eb922500bc3d76852939cf2c5d28d65a43ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-24 06:56:15 +00:00
Oswald Buddenhagen
3378aa45c2 fix distclean targets
this makes the distclean targets work throughout qt.
the dreaded confclean target is aliased to distclean.

Task-number: QTBUG-8202
Task-number: QTBUG-20566
Change-Id: I7ac8e3b5b0110825dc93e4fa885281db91c6cf83
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:57 +00:00
Oswald Buddenhagen
6e2e0e061f automatically distclean internally generated artifacts
specifically, .prl, .pc, and .la files, and QMAKE_SUBSTITUTES outputs.

Change-Id: I27685125668f0ec2aa81a8f003d3605accf2ab36
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:54 +00:00
Oswald Buddenhagen
0ce189d20f fix distclean target for plugins under unix
Change-Id: I5ebaba8575dfac9597e1ead92d42955ff626e1b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:52 +00:00
Oswald Buddenhagen
455ae6a32c support headers-only modules
automatically set TEMPLATE=aux if qt_no_install_library is set.

Change-Id: Iccceda468da762b181fdd5c8e511bf6ed19af599
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:49 +00:00
Oswald Buddenhagen
6d1ea28aa3 make linkerSupportsFlag() use gold linker if detected
subsequent tests should depend on the detected linker, obviously.

Change-Id: I09aa9f1f2ef789f0ae0829f9122211fc4e1ad518
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:46 +00:00
Oswald Buddenhagen
8f3b2f9f02 compilerSupportsFlag(): remove bogus .o suffix from test executables
this function does not just compile, but it also links, so the output
file should have no object file extension.

Change-Id: I65dd9bd334478545ceeabe9d1aacb44d9583cdd7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:42 +00:00
Gatis Paeglis
f99a270f10 Remove unused counter variable
Change-Id: I4069fdb75c2ef27fd4ac30de0963472c89165b20
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-04-23 15:27:50 +00:00
Gunnar Sletta
c33f203222 Fix typo when resolving EGL extension.
Change-Id: I28a237660e0f6b2583014f79a3a13edc46ef6d0e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-04-23 11:54:36 +00:00
Allan Sandfeld Jensen
f657ecdc5d Fix inplace double mirroring on odd sized images
The QImage inplace mirroring method, failed to handle the middle line
when mirroring both ways (rotate 180). In both other mirroring cases
the middle can be left untouched, but in this case it needs to be
mirrored half way.

To make the logic simpler, double mirroring will now mirror half the
lines instead of half of every line.

Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-23 10:14:48 +00:00
Friedemann Kleint
c3737573ce uic: Delay the setting of QPushButton::default.
For the property to take effect, the button must have its
parent set. This might not be the case when a container like
for example QTabWidget is involved. Move the setting of the
property to the bottom of setupUi.

Task-number: QTBUG-44406
Change-Id: Ic2013865a020986475fa28f2e3805c63d4de8ed0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-23 09:59:51 +00:00
Friedemann Kleint
6545404afa Windows: Fix QLockFile hanging when file cannot be created.
Return QLockFile::PermissionError when file does not exist, preventing
the stale file detection logic from triggering.

Add Windows-only autotest trying to create a lock file in
a system folder guarded with checks for elevated processes
and UAC virtualization.

Task-number: QTBUG-45631
Change-Id: I1790f8f925660f6bf1df94c2ced901e6ec57cbb0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-04-23 09:59:43 +00:00
Friedemann Kleint
1f2ce78f16 tst_QFileSystemWatcher: Improve diagnostics.
Add a special signal spy that records the time and path received
to obtain information on what triggered it for the flaky
cases where more than the expected signals were emitted.

Task-number: QTBUG-30943
Change-Id: I67510ce5e8e19b49c0ca41457f8357b720cade76
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-23 09:59:38 +00:00
Friedemann Kleint
319f3c89b1 Add debug operator for QPrinterInfo.
Add formatting helper to private class QPrintDevice and
use that to implement debug operators for QPrintDevice and QPrinterInfo.

Sample output:
(QPrinterInfo(id="HP_Color_LaserJet_CM6030_MFP", state=0, name="HP Color LaserJet CM6030 MFP", makeAndModel="HP Color LaserJet CM6030 MFP Postscript (recommended)", default, defaultPageSize=QPageSize("Letter", "Letter", 612x792pt, 2), supportsCustomPageSizes, physicalPageSize=(278, 396)..(907, 1296), defaultResolution=600, defaultDuplexMode=0, defaultColorMode=1, supportedMimeTypes=( "application/pdf" "application/postscript" "image/gif" "image/png" "image/jpeg" "image/tiff" "text/html" "text/plain")))

Task-number: QTBUG-44991
Change-Id: I187414d2f68871e38ace0bd66661d2e37712f662
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-04-23 09:59:30 +00:00