Commit Graph

23502 Commits

Author SHA1 Message Date
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
Oswald Buddenhagen
e8dc128d1d don't fail to fix path separators in extra compilers' clean targets
this affects only files explicitly listed via the .clean member without
placeholders, so more or less a corner case.

Change-Id: I7bd55948130aaee116d1a4bebbad0c445b76197b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:58 +00:00
Oswald Buddenhagen
f228404c24 untangle handling extra compiler .clean member, take 2
fixes clean targets of (most) extra compilers being empty.

amends commit 0812b5b318.

Task-number: QTBUG-45132
Change-Id: I069bca124587df261597a4f8183a4695cd834e29
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:54 +00:00
Oswald Buddenhagen
5fb0b71a12 fix {ALL,CLEAN,DISTCLEAN}_DEPS writeout to makefile
it helps enormously to put spaces between target names ...

Task-number: QTBUG-45533
Change-Id: Ic41f8287c6c37761b1be3ad7c383b5c7fb714b12
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:51 +00:00
Oswald Buddenhagen
12ffa58539 don't overengineer DESTDIR calculation
just like in qt_plugin.prf, the DESTDIR setting is actually fixed per
module type.

Change-Id: I5837b5884699f0d50e4067733af8aacbab93bc42
Reviewed-by: Stephen Kelly <ske@ableton.com>
2015-04-23 09:49:23 +00:00
Oswald Buddenhagen
c4d82dbfc0 make diff between aux and app TEMPLATEs smaller
people may use extra compilers which refer to CXXFLAGS & co., so set
them up "as normal".

Change-Id: I858ca63370a7aed66e04f5417da078b896feefc4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:49:14 +00:00
Stephen Kelly
9e410d9cd4 cmake: Don't populate legacy variables for header-only modules.
As these are a new type, there is no legacy code to support.

Change-Id: Ie5abd353563d68d0449a07e06065f34db805f710
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-23 09:49:10 +00:00
Joerg Bornemann
3c1cb24fe4 fix extra compilers with indirect outputs in VS projects
Evaluate the .output variable of the extra compiler to determine
the file extension of its output.
The VS project generator needs it to determine the filter that
will contain the output file.

Change-Id: Iab1e154a712342401e17421c08975fad13967a5b
Task-number: QTBUG-45717
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-23 09:49:01 +00:00
Friedemann Kleint
32341e8ef8 Fix FPE in QApplicationPrivate::dispatchEnterLeave() due to invalid cursor position.
QGuiApplicationPrivate::lastCursorPosition is initialized to qInf(),
qIn(). Under some circumstances, this is passed to dispatchEnterLeave()
which causes an FPE in QPointF::toPoint().

Move the invocation of QPointF::toPoint() to the if-branch handling the
enter list, which already fixes the FPE. To be extra sure, clamp to
QWIDGETSIZE_MAX.

Task-number: QTBUG-45501
Change-Id: I2d1407415e6360196730d23ee319d1ee6981d1f5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-23 09:25:58 +00:00
Allan Sandfeld Jensen
63d5a42b59 Revert "Remove separate SSE4 unpremultiply function"
Could causedSSE4 instructions to be used on non SSE4 machines
in cases when qUnpremultiplywas not inlined.

This reverts commit 964ccc5853.

Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919
Task-number: QTBUG-45741
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-23 09:25:28 +00:00
Caroline Chao
6535912add Tests: Remove tst_QGraphicsIten::sorting from the BLACKLIST file
The test tst_QGraphicsIten::sorting is blacklisted but always passing.

Change-Id: I69bbd4b4bbe227267e16ab5558ddabe7d2c0b1b3
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:50:50 +00:00
Caroline Chao
5a3a59b1c1 Tests: Blacklist tst_QGraphicItem::ensureUpdateOnTextItem
On OS X 10.10. This test is currently failing in CI.

Change-Id: I1b3a33b404c915e83c5e4fa0a7af69d1b941d93c
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:50:47 +00:00
Friedemann Kleint
3e42eeeec1 Improve tst_uic.
- Make the version regexp a member variable, avoiding repeated
  construction.
- Use QVERIFY2() with error message for opening files.
- On failure, try to locate the standard diff tool and produce
  diff output for comparison, which should make for example
  copyright header changes much easier.

Task-number: QTBUG-44406
Change-Id: Ic759899c1da3394e3eb0cee7b1c722f0945714d3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-22 10:23:53 +00:00
Friedemann Kleint
e1350c56c1 fixqt4headers.pl: Improve detection of Qt 5 location.
Obtain the location of the include files by querying
the qmake variable QT_INSTALL_HEADERS by default, which
can be overridden by the command line option.

Task-number: QTBUG-45662
Change-Id: I03a781e9b98f5e2980dbaef86eedd05aec0103ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-22 10:23:41 +00:00
Friedemann Kleint
e0c83fb658 qsystemdetection.h: Check existence of define WINAPI_FAMILY_PHONE_APP.
It is missing in MinGW and causes warnings like:
src/corelib/global/qsystemdetection.h:109:24: error: "WINAPI_FAMILY_PHONE_APP" is not defined [-Werror=undef]
in QtScript and headersclean failures in Active Qt.

Task-number: QTBUG-45666
Change-Id: I167d9d5b33faddfbbcf44bdcce5e86fb43614fa9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-22 10:23:32 +00:00
Erik Verbruggen
9ff550807d Remove unused private field from test.
Change-Id: I6f991f35a035ed9ff28ff8548b647916db85db39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2015-04-22 10:16:32 +00:00
Erik Verbruggen
e2405dd63f QStateMachine: replaced Q_FOREACH with foreach.
Change-Id: I2bd0f9d7ef1d6f236e2afa9fc5b75c5a6f61a250
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-22 10:16:26 +00:00
Erik Verbruggen
7d84eb7025 Cocoa: Stop using deprecated -convertBaseToScreen:.
Replaced by -convertRectToScreen:.

Change-Id: I38e2b5918a5ee528d6ce65f676e542e365d610a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:16 +00:00
Erik Verbruggen
1fe2349762 Cocoa: stop using the deprecated NSInputManager.
Replaced by NSTextInputContext.

Change-Id: I694b28b766f8bf1d37e0ee87ff503e33d205f8ab
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:12 +00:00
Erik Verbruggen
5350ee7ad5 Cocoa: fix compiler warning.
/Users/erik/dev/qt5-stable/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm:137:18: warning: case value not in enumerated type 'NSEventSubtype'
      [-Wswitch]
            case QtCocoaEventSubTypePostMessage:
                 ^

Change-Id: Ib496e61a6939f021c90234fef3689b1643003ddd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:08 +00:00
Erik Verbruggen
56cdd12649 Cocoa: fix compiler warning.
/Users/erik/dev/qt5-stable/qtbase/src/plugins/platforms/cocoa/qnsview.mm:702:22: warning: incompatible pointer types assigning to 'QNSView_QtNS *' from
      'NSView *' [-Wincompatible-pointer-types]
        targetView = popup->contentView();
                     ^~~~~~~~~~~~~~~~~~~~

Change-Id: I9e7e25ee9b6dc80ee6f438dc85417838039d440a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:04 +00:00
Gatis Paeglis
628fa13ea4 Fix "Unsupported extension used" error
This error message was a result of calling *_randr_* functions
in QXcbWindow::updateGeometry without checking if the X server
provides the XRandR extension.

Change-Id: I165f201c32ca0f4976f9ff9b9f17323098940511
Task-number: QTBUG-45624
Task-number: QTBUG-45388
Task-number: QTBUG-45312
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Kundrát <jkt@kde.org>
2015-04-21 23:18:50 +00:00
Oswald Buddenhagen
4c96367410 make fileFixify() calling convention somewhat sane
instead of allowing arbitrary input and output base paths, restrict them
to the project input and output dirs (in any permutation), which are the
only cases ever used anyway.
this permits much clearer call sites, and allows later optimizations.

Change-Id: I48d149a4417af5c858e66ec57c476a5bc6b17f17
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:20 +00:00
Oswald Buddenhagen
6234dec41f unhack Xcode shadow building
explicitly use the correct directories instead of temporarily changing
into the output dir. this makes the code less obfuscated.

Change-Id: Ia935987f486151ae556910703cc20945c7610ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:17 +00:00
Oswald Buddenhagen
2c0730839b Revert "Use relative path for QMAKE_BUNDLE_DATA"
turns out that a relative path makes some versions of Xcode crash.
so use an absolute path again.
fileFixify() has been fixed for shadow builds to make this possible.

This reverts commit 6ccf0a326e.

Task-number: QTBUG-45424
Change-Id: Ica87c6c29f990f56e42c399b6d9b1c7eacdd13a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-04-21 12:06:13 +00:00
Oswald Buddenhagen
6accf40a14 make fileFixify(FileFixifyAbsolute) pay attention to in_dir
... instead of sheepishly assuming qmake_pwd().
it also canonicalizes consistently with the relative output path now.

Change-Id: I86231f7259179020643405f3c0e696a74031aa4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:10 +00:00
Oswald Buddenhagen
ed4bdd3eec fileFixify(): remove bizarre canonicalization
it would trigger only if the input file name was already absolute,
matched the native path separator, and some (likely) other conditions.

as this behavior was almost unpredictable, it would be not very useful.
so save ourselves the headache and just remove it.

Change-Id: Ic457f487f6d0ce9f7a5f192859c9efa9c2de2b63
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-21 12:06:06 +00:00
Oswald Buddenhagen
b532250237 remove pointless argument to build_args()
it's always empty.

Change-Id: Icd97b5ac5b77c119174fdce2671f69c88c607428
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:03 +00:00
Oswald Buddenhagen
8e380c2021 remove redundant definition of ANGLE_ENABLE_D3D11
config.pri already defines it (as needed).

Change-Id: If0e87d23a560c6de37457b2d8d3a84b6dc16396f
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-04-21 12:05:59 +00:00
Oswald Buddenhagen
497974abe3 don't try to include non-existing private module .pri
amends b8f79e7095.

Change-Id: If4358634a66947d7644224466b239e470d15afda
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:05:56 +00:00
Oswald Buddenhagen
e662dc21b8 disable automatic PCH compilation for headers-only modules
there is neither a point in building a PCH that will never be used, nor
does it even work with the aux TEMPLATE.

Change-Id: I2fe11f951f81adf5e15066ed60f983003c76b451
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:05:53 +00:00
Oswald Buddenhagen
3444e23652 make QMAKE_CXX/CROSS_COMPILE verification work under windows
automatically append the .exe extension. this is done unconditionally,
which means that providing it in the spec is wrong by definition.

don't use system("which") (which won't do what we want in a windows
shell), but scan PATH ourselves. as a bonus, this is also faster.

to avoid fetching and splitting the path multiple times, factor out a
function in spec_pre.prf.

Change-Id: I95f0fa285c158b347d45422111f91540e3a595fd
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-04-21 12:05:50 +00:00