Commit Graph

16391 Commits

Author SHA1 Message Date
Tasuku Suzuki
f568e43e10 Make qtbase compile with QT_NO_GESTURES
Change-Id: I90f173265e177ff37ce80da3983080651856259d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 19:36:47 +01:00
Morten Johan Sørvig
263fdd15da Don't force create the platform window.
This causes all sorts of unintended side effects and
is generally a bad idea.

Task-number: QTBUG-32988
Change-Id: Iebdae34764be4cfd9ced47aa93789871e0455ab3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-01-10 17:15:21 +01:00
Peter Hartmann
6fd205d579 network proxy tests: adapt proxy authentication to new server
The tests pass with the new test server image. Once we are using the
new test server we can remove the test for the host not found error.

Change-Id: Iac8ba6d8ce31b0865b33a003086aac0339afe338
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-01-10 17:14:29 +01:00
Tasuku Suzuki
2dc04430ba Make qtbase compile with QT_NO_DOM
Change-Id: I98bef84ca9bf86bf7dddd3ca2a3d8210a8e46a16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 17:14:29 +01:00
Jürgen Hunold
c6b91576a6 Use custom -I,-D and -L flags when building arch-test
Needed for using alternate stdlib implementation like libc++ with clang.

Change-Id: I1782f62f5e2ea95e6cff8a1ed646362c0a31645c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 17:14:29 +01:00
Thiago Macieira
9598448758 Remove #ifdef from outside test functions
It's usually a bad idea to surround slots or signals with #ifdef since
moc may not parse it the same way the compiler does.

Change-Id: I6a3623ed7cb9fbc1b966df9d60f71b7fdf91acfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-01-10 17:14:29 +01:00
Joerg Bornemann
e1f89037c3 fix memory leaks in MSVC generators
Change-Id: I11bfc8259ac4e175c9ecc37d64f1d2e5037f15aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 17:14:29 +01:00
Gatis Paeglis
b088e4827f Fix bug on X11 with WA_TranslucentBackground and native child windows.
The native child windows need to inherit the parent's visual in order
to have a translucent background as well.

Surface with type QSurface::OpenGLSurface should not be forced to use
the parent window's visual - the parent visual for instance, might not
even be GL capable.

Changing WA_TranslucentBackground during runtime is not supported, for
two reasons:

1) Other platform plugins seem not to support it
2) It would require recreating X windows.

Task-number: QTBUG-29625

Change-Id: Ic1474dd2de99069027481c7db6bf865f9b8d616d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-01-10 15:37:51 +01:00
Tasuku Suzuki
eb5c0f4b12 Make qtbase compile with QT_NO_XMLSTREAMWRITER
Change-Id: I6d2447ba0875117e8a50d1aa3133bd5ea098d51a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 04:53:36 +01:00
Thiago Macieira
e0a21c71f4 Don't check if a file exists before opening it
If the file doesn't exist, open() will fail. But open() might fail
even if the file exists(), which would lead to bad follow-up code. In
any case, this saves one unnecessary stat(2).

Change-Id: Ic99507c9dc07a4387ee6a4fe9c24830fca54e095
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-10 02:35:21 +01:00
Thiago Macieira
47a0d64dcf Fix QtWidget function-unused warnings found by Clang 3.4
qwidgetbackingstore.cpp:72:20: error: unused function 'qRectIntersects' [-Werror,-Wunused-function]

Change-Id: Ia3afe8f0547fa86804093281db89efabe68b34a1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-10 02:33:50 +01:00
Thiago Macieira
52441ecd44 Remove unused member m_eglApi
It's not used anywhere. Found by Clang 3.4:

qeglplatformcontext_p.h:80:13: error: private field 'm_eglApi' is not used [-Werror,-Wunused-private-field]

Change-Id: I37ce240a9d07ef570e0814de366dbb7cd13ad714
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-10 02:33:45 +01:00
Thiago Macieira
17da13baaa Fix unused function warnings in qtriangulator.cpp
qIntersectionPoint with ints wasn't used, qDot was only used in debug
mode. Found by Clang 3.4.

Change-Id: I4b5699f75eb88331df54bf5a289133914d80b299
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-10 02:33:41 +01:00
Thiago Macieira
f4d3196e4f Fix function-not-used warnings detected by Clang 3.4
These functions have been turned to static (although inline), which
means they need to be used or marked as possibly unused.

qglobal.h:712:37: error: unused function 'qFuzzyCompare' [-Werror,-Wunused-function]

Change-Id: Ie2ee713d26c86e0574b579c1ea42b9404c3d2035
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-10 02:33:37 +01:00
Thiago Macieira
bbcdfb324b Fix file descriptor leak in the perf event counter
We opened the counter at every start(), even if we had already started
before. Some of the benchlib's options caused it to start() and stop()
over and over again, like -minimumvalue and -minimumtotal, which could
leak to fd exhaustion (EMFILE).

Change-Id: Ifeb7cca65c758877be600dc22928bea74f499934
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-01-10 02:33:32 +01:00
Thiago Macieira
eaedc04d90 Autotest: Fix QDateTime failure if the test got run West of Greenwich
There was a comment about the test failing for max() because of an
overflow. That happens if you're at UTC or ahead of it (to the East of
the Prime Meridian), which is how this test usually gets run (UTC,
Europe/Oslo, Europe/Helsinki, Pacific/Auckland). But if you're behind
UTC (to the West of the Prime Meridian), then the overflow happens for
min().

Change-Id: Iebba49d1303e9f18f5038f5cf23c77bf83e5fd4b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-09 22:49:23 +01:00
Tim Blechmann
c8a8e0fb18 zlib: rename z_errmsg symbol to avoid name clash when linking statically
Task-number: QTBUG-35301
Change-Id: I298fba7270ee49d4e2dfc624b18aa13ce25864be
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-09 20:14:48 +01:00
John Layt
d76f05e955 QPdfWriter - Fix setting of margins
The setting of margins wasn't being passed to the base class, so calling
margins() wouldn't return the new values.

Change-Id: I86c30f28fb0430f4b9d6e180a59cad354b489289
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-09 18:16:02 +01:00
John Layt
c07c9bcf4a QPdfPaintEngine - Remove postscript flag
Remove a now unneeded postscript flag.

Change-Id: I307e4a64aa7ba4eed396530ffbf3bca5ae73e9c2
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-09 18:15:50 +01:00
Mitch Curtis
62c4e288a1 Mitigate performance regression in isExpandedEntityValueTooLarge().
46a8885ae4 fixed a security issue [1],
but also caused a large performance regression. This patch improves
the performance from ~98 seconds to ~.1 second for 1000 entities,
using the benchmark in the bug report:

"0": 0 msecs per iteration (total: 0, iterations: 1)
"250": 1,547 msecs per iteration (total: 1,547, iterations: 1)
"500": 12,254 msecs per iteration (total: 12,254, iterations: 1)
"750": 45,506 msecs per iteration (total: 45,506, iterations: 1)
"1000": 98,112 msecs per iteration (total: 98,112, iterations: 1)

"0": 0 msecs per iteration (total: 0, iterations: 1)
"250": 6 msecs per iteration (total: 6, iterations: 1)
"500": 25 msecs per iteration (total: 25, iterations: 1)
"750": 58 msecs per iteration (total: 58, iterations: 1)
"1000": 102 msecs per iteration (total: 102, iterations: 1)

[1] http://lists.qt-project.org/pipermail/announce/2013-December/000036.html

Task-number: QTBUG-35919

Change-Id: I6a6a1a6b606a8033a8f66e294cb55bbd8bdb8a03
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-01-09 17:54:24 +01:00
Shawn Rutledge
7c03f00a4e GTK FileDialog: don't convert QUrl to QString prematurely
File dialog APIs are being converted to QUrls as much as possible.

Task-number: QTBUG-35947
Task-number: QTBUG-35948
Change-Id: I98d86249ac5018c3b7439065ae6ad7f1c7422a08
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-09 17:54:23 +01:00
Oswald Buddenhagen
08127d93b4 don't make msvc see digraphs
Task-number: QTBUG-35816
Change-Id: I996a86233f771d6a466c5c5eb6116df14cd00dbd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-01-09 17:48:32 +01:00
Friedemann Kleint
b4c28856f1 Windows: Silence warning in QWindowsFileDialogHelper::selectFile().
The function is invoked from the QFileDialog constructor in
save file mode when passing a non-existing file.

Task-number: QTBUG-35703

Change-Id: I5c13efb9b6789404b28739f6ce88ed87b594b6e4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-09 12:28:52 +01:00
Friedemann Kleint
131a511194 Ensure that the Qt5Core library does not contain "QTMETADATA ".
In the event the plugin loader encounters it due to some configuration
problem, it is otherwise detected as a plugin causing a crash
when trying to read the meta data.

Task-number: QTBUG-35970

Change-Id: I34182b3a61125e3b192dfd4b1dc03bd1e98c693e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-09 12:28:46 +01:00
Sérgio Martins
f0f6c1d0ed Fix evdevtouch build with -qtnamespace
Change-Id: Ibac69cfa44eff33d8cc172fc16cf105fff4c12b1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-09 00:10:07 +01:00
Joerg Bornemann
46b397d67f fix detection for multiple VS installations
In the case of multiple VS installations, a static variable wasn't
initialized. That led to wrong values in subsequent calls of the
detection function.

[ChangeLog][qtbase][qmake] fix detection for multiple VS installations

Task-number: QTBUG-35530
Change-Id: I3fc23bc99679fff640f39578a7074d16fe923334
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-01-08 13:05:55 +01:00
Christian Strømme
2b3f293d89 Android: Refactor the InputType mapping code.
- Fix issue where input flags and classes where wrongly mixed.
- Adds DATETIME class (support for Qt::ImhDate/Qt::ImhTime).
- Adds TYPE_NUMBER_VARIATION_PASSWORD for API level > 10.

Task-number: QTBUG-35198
Change-Id: I794159ca7c19d38b0b97521448cef0f5112ee8ba
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-01-07 23:27:01 +01:00
Morten Johan Sørvig
6112f8938c Make QRubberBand transparent on Mac OS X
Restore Q_WS_MAC code path.

Task-number: QTBUG-35987
Change-Id: I1ad50dd93e9c7116963e09d94ad114bcb6a1c31f
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-07 21:38:17 +01:00
Oswald Buddenhagen
65a676372c do not look for mkspecs/ directories in project trees
this pretty surprising behavior would interfere with building the
examples from an installed qt tree with qmakes from other qt builds.

.qmake.conf (and .qmake.cache) files provide a possibility to explicitly
"anchor" project roots, so there is no point in having a second, even
more magic way to do it.

Task-number: QTBUG-35485
Change-Id: I8fd4fda67cabafdf55e7a98282dcdfaffb4a405e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-01-07 19:46:16 +01:00
Oswald Buddenhagen
183b862fe0 make the pkg-config error message more precise
while the meaning of the error message is actually pretty obvious from
the context, some people apparently expect an equivalence with their
package manager's terminology.

Change-Id: Ie7a31887bf5086e5d1d7de7e339a6d08571a4d01
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-07 19:45:15 +01:00
Frederik Gladhorn
8059541199 Stabilize one function in tst_qpauseanimation.cpp
Under load the timing may go wrong.

Change-Id: Iaa947fb9adcfccd2568337adbb17094996cce827
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-07 19:21:16 +01:00
Liang Qi
35f2a61426 QKeySequence: return Qt::Key_unknown with invalid modifiers on OS X
This also fixes the auto test, tst_QKeySequence::parseString() with
Win+A and Simon+G.

[ChangeLog][QtGui][OS X][QKeySequence] return Qt::Key_unknown with
invalid modifiers on OS X

Task-number: QTBUG-24406
Change-Id: Ie90393c9691f443c7c359cb3a487609a9691bc44
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-01-07 18:55:10 +01:00
Liang Qi
dbaff44ff1 test: fix tst_QPushButton::sizeHint() with Mac style on Mac OS X
The style name should be macintosh, not mac.

This also reverts commit 2f46ea9fd6.

Task-number: QTBUG-23680
Change-Id: I7fd06da165ca5bc99801c13af13fdb3d35119566
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-01-07 18:55:07 +01:00
Liang Qi
3b2143bdf7 Revert "Skip tst_QMenu::QTBUG_10735_crashWithDialog() on Mac OS X"
This test doesn't fail any more.

This reverts commit 6f21509ac0.

Task-number: QTBUG-23677
Change-Id: Idc094ce0c90b8d3ba0a75d93ccef8da4801605c7
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-01-07 18:55:04 +01:00
Liang Qi
183a3ca2ec Cocoa: fix gnu emacs style shortcut for action in menu
The regression was introduced in bdebec4e2e.

Cocoa QPA plugin only could handle the shortcut with one key sequence, not the
multiple key sequences. We just let Qt to handle those cases.

Task-number: QTBUG-33627

Change-Id: I3898308d9f4ecda8bd716d8b286f05f9f311774a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-01-07 12:53:16 +01:00
Tor Arne Vestbø
702bda5cc9 iOS: Use in-place string renaming to rename main() instead of ld
Processing the object file with ld strips away debug information for
the main() function, resulting in the debugger not being able to
break on specific lines of the function.

It also causes issues when externing sybols in main's object file.

We revert back to the approach of using the strings in-line in the
object file (which is why we keep the name the same length, 'qtmn').

Task-number: QTBUG-35553
Change-Id: I8b0acee36f48ecfefa2e4fd008a842365713d985
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-06 20:58:28 +01:00
Robin Burchell
e48aa2a402 Support discovery of key evdev devices.
Change-Id: Iac2751b51fb0af9fba181c26ad788f25eb0b02f7
Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-01-06 20:55:47 +01:00
John Layt
f956ffa9cc QPagedPaintDevice - Fix size of ISO B9 page
The ISO B9 page size is 44 x 62 mm, not 33 x 62 mm.

Task-number: QTBUG-35966
Change-Id: Ieb2dcd120c51bd7a8997151f2470775ea0b89e08
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-06 20:39:31 +01:00
John Layt
ba3804004a QPageSetupWidget - Fix input of Custom paper size
Currently if selecting the Custom paper size in the page setup widget
the custom size inputs are not enabled to allow you to actually enter
your custom size.  Fix the handling of custom paper size to allow manual
size entry and fix orientation change.

Change-Id: I73b521976ca13c0164441a724bb277c19205d7c9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-01-06 20:39:20 +01:00
John Layt
df56ef1651 QprintDialog - Fix loss of page settings.
If you click on the properties button and change the page settings and
click OK, then click properties a second time and click cancel, then
your original changes are forgotten.  Ensure the properties dialog is
only deleted if the OK button has never been clicked.

Change-Id: I81be8a2c941eeec36c03647d7fea8f498154930a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-01-06 20:39:14 +01:00
Tor Arne Vestbø
c719c38403 Don't define MAC_OS_X_VERSION_MIN_REQUIRED on iOS
Lack of the define is commonly used (and recommended by Apple) as a way
to distinguish iOS from OS X.

Task-number: QTBUG-35888
Change-Id: I5f3327e001c0af630984fbfde780d9b0c3e30754
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-01-06 15:29:56 +01:00
David Faure
e5bfb9719b QTestLib: use QT_MESSAGE_PATTERN when showing debug output
This makes debugging much more convenient, being able to see e.g.
the method name where qDebug is used. Note that this doesn't break
ignored messages, since qMessageFormatString is only called after
the test for ignored messages.

Change-Id: I7fc96e3f19efe48ac3a30fdd63e5b495c0d86e02
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-01-06 13:24:14 +01:00
James Turner
bf32528f4b Add support for OpenType (.otf) fonts
FreeType already has support for the file format, so simply
ensure they are picked up by the generic database. (Other backends, 
such as Windows, already had support)

[ChangeLog][QtGui] Qt's generic font database now adds OpenType fonts (.otf).

Change-Id: Ief5a3329e66b8066aad284172afd004f2cdfaebb
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-06 13:04:03 +01:00
Laszlo Agocs
bd5cea5ba8 Resurrect QGLWidget::renderPixmap()
This function has been completely broken since Qt 5.0. Unfortunately
the autotest's verification steps were somewhat faulty so returning
a null pixmap from renderPixmap() did not trigger a failure.

The implementation is now done with framebuffer objects and pixel
readback. This is not ideal performance-wise, but is the only option.
In Qt 4 pixmaps were often backed by platform dependent native pixmaps
that could be used as rendering targets for OpenGL content. This is not
an option anymore since pixmaps are raster backed on all the major platforms.

Task-number: QTBUG-33186
Change-Id: I8f558e33bf7967ac3be439fd5a3eac07b6444be5
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-01-06 12:57:20 +01:00
Sérgio Martins
63fd793fc3 Fix include guard typo.
Change-Id: If9400eb5965c739334b3638731e7c80834de72b8
Reviewed-by: David Faure <david.faure@kdab.com>
2014-01-06 12:56:34 +01:00
Shawn Rutledge
e37616bbad QFileDialog::setDirectory() and directory() should be symmetric
QFileDialog::setDirectory() calls options->setInitialDirectory().
Then QFileDialogPrivate::helperPrepareShow() calls it again with the
result of QFileDialog::directory().  Assuming there are cases where
that's actually necessary, we need QFileDialog::directory() to return
the same one which was previously set in setDirectory().

Task-number: QTBUG-35779
Change-Id: Iac1f88c770ff1ef06a7f884f9a42d72674c967ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-06 12:55:30 +01:00
Uli Schlachter
ffac6ee267 XCB: Fix pixmap leak
In qt_xcb_XPixmapFromBitmap(), a new pixmap is generated for the caller.
This pixmap has to be freed after use. However,
createNonStandardCursor() didn't do this and instead leaked the pixmap.

Change-Id: I6fee180ec6508db9e82a5bb028957e7d9f7a4632
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-01-05 21:04:43 +01:00
Thiago Macieira
8b17f13c09 Fix mtdev auto-detection
The source code is valid C++. But not valid C.

Change-Id: I43126001d33caef050b0bc8c248cf9f3b01091df
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-04 03:21:41 +01:00
Thiago Macieira
a8d9878d48 Fix Qt build when mtdev is detected
If it's detected, we have "mtdev" in QT_CONFIG, not in CONFIG. With
the bad test, libQt5PlatformSupport.prl would not get -lmtdev and, in
turn, the evdevtouch generic plugin would fail to link.

Change-Id: I5dab57b648e66943f98a22527717a20be35f02a4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-04 03:21:41 +01:00
Thiago Macieira
e4aeace515 Keep the configure listing of features alphabetical
Change-Id: I0786b26a89e3e592bc47cb016ee7876ea7238c69
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-01-04 01:54:04 +01:00