Commit Graph

4632 Commits

Author SHA1 Message Date
Kai Koehne
b11adb825c Logging: Be also more strict with value of logging rule
Only accept lower-case "true" and "false", as documented.

The old check didn't match either the documentation, nor the QSettings/
QVariant behavior (where, for a boolean value, any lower-cased content
that not empty, "0" or "false" is considered true).

Change-Id: I317d29c16a27f862001b9dff02e8298df8acf5a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-03 11:07:07 +02:00
Jędrzej Nowacki
3b18ea3cb8 Re-add missing test to kernel.pro
Patch 9a08483d76 introduced a regression,
tst_qmetatype test was not meant to be removed.

Change-Id: I5456ffbbd9d9f8e461f828c6183e46dabf67952b
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-02 03:07:12 +02:00
Fabian Bumberger
2c36469a16 QNX: Fix OpenGL autotest
On QNX grabbing the frame buffer returns the content of the back buffer.
In order to execute the OpenGL tests properly a swapBuffers is executed before
in order to be able to retrieve the content of the front buffer.

The patch also documents this platform behavior.

Change-Id: I7a501818ec6eea061f2f54f95854f68cb72e0534
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-01 23:35:21 +02:00
J-P Nurmi
0cb2c760c2 Item views: respect selection mode when closing an editor
Task-number: QTBUG-31411
Change-Id: I1a52eb739e0bc2afa7227f006461916df8ecaf48
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-04-01 05:27:00 +02:00
J-P Nurmi
cc08fc7bfd Item views: respect focus policy when closing an editor
Task-number: QTBUG-31411
Change-Id: Ib0a72755c35a553653ea014672d59979a550b7ae
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-04-01 05:26:50 +02:00
Friedemann Kleint
ebd8530cbc Make tst_qopengl more verbose.
Add more checks, compare size of converted images.

Task-number: QTBUG-31611

Change-Id: I995071f4be097c08aa2917be03fd7196882ae2c2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-31 19:50:37 +02:00
Samuel Gaist
35a11d6fce OS X QSettings auto test/writing check update
This patch aims to provide an updated test that follows changes started
in 10.7: new rule is that only root can access SystemScope settings. It
also disables the sync() workaround code path which is at least not
executed during the tst_QSettings execution and returns wrong value to
the test.

From Apple's documentation:
"Note that modification of some preferences domains (those not
belonging to the “Current User”) requires root privileges (or Admin
privileges prior to OS X v10.6)—see Authorization Services Programming
Guide for information on how to gain suitable privileges"

https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFPreferencesUtils/Reference/reference.html

[ChangeLog][QtCore][QSettings] QSettings now returns the correct value
for isWritable() when using SystemScope settings.

Task-number: QTBUG-9824
Task-number: QTBUG-21062
Task-number: QTBUG-22745

Change-Id: Ib6a1490ec596b99d189ec4de9a0f28ecfd684172
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-03-31 12:12:21 +02:00
Marc Mutz
de10bf4955 QEvent: document and check when registerEventTypes() returns -1
In tst_QEvent, add a check that exhausts the available event type ids and verifies
that registerEventTypes() returns -1 in that case, as documented.

I haven't found a way to test the other case in which -1 is returned.

Since this test operates on a global write-only registry the new test case needs
to keep track of whether the earlier test cases have run successfully. If they
didn't, skip this test case.

Change-Id: I68ea9d17d10dcec22175994aba269dd09c9adf43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-29 12:40:05 +01:00
Marc Mutz
ecdeaa4369 tst_QEvent: add another test-case for registerEventType()
A test for a hint > QEvent::MaxUser was missing.

Added.

Change-Id: I00c1c45f6673f35d4203df15b4ffc35f57273e46
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-29 12:36:27 +01:00
Israel Lins Albuquerque
075c876f9a [QtSql]QIBASE]add support for prepared queries in numRowsAffected
Prepared queries need to be handled as procedures.

Change-Id: I4b4d7743fe45c416ca83ceb942aa48d79731f2f8
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-29 08:46:00 +01:00
Friedemann Kleint
0fadbc7ed9 tst_qaccessibility: Introduce QTRY_VERIFY to menuTest().
Fixes failures on Windows 8.1.

Task-number: QTBUG-37822
Change-Id: I30460f430e2249555c4e857237e27aa9b03dfa1b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-28 22:52:19 +01:00
Friedemann Kleint
27fa02e29d tst_qgraphicsproxywidget: Fix hang in actionsContextMenu().
Change the test widget to use a non-single-shot timer
to hide the menu once it has become visible.
The test shows hangs on Windows 8.1 CI nodes.

Task-number: QTBUG-37822
Change-Id: I8fc782e53256616119920aef714f89f25863b39f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-28 22:52:19 +01:00
Friedemann Kleint
b980df3f3c Stabilize tst_qtoolbutton for Windows 8.1.
Ensure triggered() and task176137_autoRepeatOfAction()
are using an active main window. Change click timer in
triggered() to repeat until the menu is visible and
add a timer to close the widget and bail out if the
simulated click fails to close the menu.

Task-number: QTBUG-37822
Change-Id: If675660d02335bffd5caa89796914924dad1a909
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-28 22:52:19 +01:00
Leonard Lee
685f8fe550 Do not rely on the list of standard font sizes for QFontDialog.
QFontDialog should always show the correct size, even if the size
is not available in the list of standard font sizes. Native font
dialogs across common platforms show the correct size at all times.

Inside init() function, the size list requires proper initialization
since the initial value of size is zero.

Task-number: QTBUG-10317
Change-Id: Idc9e922ac95f797ac98bbf6c885e52828c4c48fd
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-03-28 22:52:19 +01:00
Lars Knoll
c4d8734c50 Avoid out of bounds memory reads when scaling images
The calculation of the width/height required for the
scaling algorithm was prone to floating point rounding
issues, where the lower value got rounded down, the higher
one rounded up. This could lead to a situation where we
iterated over one more line/pixel in the line than we have
in the source image.

Correct this by passing the dimension of the source image into
the function and bounds checking the values before iterating.

Task-number: QTBUG-35927
Change-Id: If44b2235a479224660d508a0504fec40d724763a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-28 22:52:19 +01:00
Sergio Ahumada
d688b7c07c Deprecate QFont::setRawName() and QFont::rawName()
We don't support xlfd fonts anymore and indeed QFont::setRawName()
is an empty method.

[Changelog][QtGui] QFont::setRawName() and QFont::rawName() are
deprecated.

Change-Id: Ic52d42a9bc200ba8b246dd4e28c77f84e086dad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-27 22:02:39 +01:00
Erik Verbruggen
dd453adbe7 Mac: make FSEvents-based QFileSystemWatcherEngine more robust.
- Record the last event ID with every callback. This event ID is passed
to FSEventStreamCreate when restarting the stream, so the watcher will
receive all events that occurred since invalidating the previous stream.

- Never start with kFSEventStreamEventIdSinceNow, because this will
generate a (bogus) soft-assert in FSEventStreamFlushSync in CarbonCore
when no event occurred since stream creation. The last globally
generated event ID is used instead to simulate the "now".

- Do not dispose and recreate the stream in the callback, but use a
queued signal-slot connection to schedule this on thread that owns the
watcher.

Change-Id: I02f5a845d9e27f9853ed97925ab9c7a5bc0dede1
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-27 17:51:21 +01:00
Friedemann Kleint
9a9feab102 Check for administrative rights in tst_qsettings.
Introduce function checking whether the system settings in
native format can be written to. If not, default to user scope or
skip the respective tests instead of failing.

Task-number: QTBUG-37822
Change-Id: I330aff9b79bb22254216f022af807e010bc8e8ba
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-27 17:51:21 +01:00
Eskil Abrahamsen Blomfeldt
76eefbe8af Android: Fix missing data from some autotests
After a test ended, we would instantly try to fetch its output,
but at this point, it might still not be available through the
adb interface, probably due to some cache synchronization in the
file system? Adding an arbitrary three second pause between
finishing the test and requesting the file fixes this. If the
error pops up later again, we could do something more robust,
like going in a loop for X seconds until the file has been fetched.
Especially if detecting task finish was successful.

Task-number: QTBUG-37444
Change-Id: I5442e1e0181f489b0626834a390e46c15bc0b371
Reviewed-by: Simo Fält <simo.falt@digia.com>
2014-03-27 15:17:24 +01:00
Fabian Bumberger
74cade1ee4 Fix application font removal when using FontConfig
This patch fixes an issue when a font that was added with
QFontDatabase::addApplicationFont can not be removed any more.
The reason for that is that QFontconfigDatabase::addApplicationFont
adds the font to the FontConfig application set from where it
cannot be removed any more and is picked up every time the font database
is repopulated (e.g. after a call to QFontDatabase::removeApplicationFont).

This also fixes the QFontDatabase autotest which unfortunately does
not fail on linux, because it tries to add "FreeMono" (which in most
cases is already there as a system font). So this patch removes FreeMono
and adds LED_REAL as test font.

Change-Id: I70fc823075923aa426da1eb3e052affcc416e399
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-03-27 14:41:53 +01:00
Fabian Bumberger
7ca958eb61 QNX: Fix QWindow autotest
On QNX a actual platform window is not created unless the window is explicitly
postet (raster) or a swapBuffers (opengl) is executed.

Change-Id: Ia06b97ea1a477d59e78d74d895c5d6ba6dd86edf
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-03-27 14:41:28 +01:00
Frederik Gladhorn
f16d690a2f Accessibility Mac: Fix handling of top level widget
This simplifies how we handle QNSView for accessibility purposes.
Instead of trying to half-merge the top level widget
(window->accessibleRoot) into the view, just have the view
always return it as child.
This makes the accessibility implementation for QNSView simpler
and makes applications that show a top level widget such as a button
possible. (We would return accessibility ignored for the button before).

As a side effect finding the active focus and hit-testing should be more reliable as
well.
Task-number: QTBUG-37794

Change-Id: Ib52037f88da8887a0bdc77204b0f3daddfe7709d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-03-27 14:37:16 +01:00
Laszlo Agocs
ad1c088a2a Fix the QOpenGL autotest's offscreen surface handling
Be more robust.

Change-Id: I0e37612681140530c81cfd0082cca61f0f21958c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-27 14:29:39 +01:00
Sergio Ahumada
eab7efd1ee Stabilize tst_QProcess::softExitInSlots()
This test takes more than 5000ms to finish some times, so waiting
for 10000ms should be enough to make it more stable on all
platforms.

  ../tst_qprocess.cpp:1072 :: [gui app]
  QTestLib: This test case check ("proc.waitedForFinished") failed because the requested timeout (5000 ms) was too short, 6150 ms would have been sufficient this time.

Change-Id: I266ad0e65bf3c84e73b7ca6543dc15335dad4c99
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-27 08:21:23 +01:00
Sergio Ahumada
5ee07bf691 Mark some tests as XFAIL on QNX
Extending this to stock QNX as well since it is not
BlackBerry 10 specific.

  - tst_QNumeric::floatDistance()
  - tst_QNumeric::floatDistance_double()
  - tst_QtJson::testNumbers_2()
  - tst_QtJson::toJsonLargeNumericValues()
  - tst_QtJson::parseNumbers()

Task-number: QTBUG-37066
Change-Id: If0e5d4fbefac5e8a0efed8ef8b1b7655ff6e7766
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-27 08:21:14 +01:00
Lars Knoll
5279134935 Reuse one QCollator instance for QString::localeAwareCompare
Constructing a QCollator is somewhat expensive, and made
localeAwareCompare really slow. As QCollator (at least with
the ICU implementation) is not thread safe, use one collator
per thread. This speeds up collation of a long list of strings
by a factor of 250 for the test case in the bug below.

Task-number: QTBUG-36149
Change-Id: I645cdc3546347d1dcc7a03b7563b628c7f756944
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-03-27 07:31:01 +01:00
Friedemann Kleint
5b00bb39f2 Polish tst_qsslsocket a bit.
Output the SSL library version, output socket error string on connection
failure consistently, silence numerous warnings about QIODevice not
being open in tst_QSslSocket::constructing.

Change-Id: Ia23d42de5b2daca55b2f6f50af025d61e99c52a0
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-26 07:22:35 +01:00
John Layt
d48db922d4 QPrintDialog - Add more options to manual test
Add all the available QPrinter options to the QPrintDialog manual test
to allow for testing presets.

Change-Id: Ia6394094fc9920da0d6c645793d51650404899d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-25 00:00:23 +01:00
John Layt
dbb6b58abe QPrintDialog - Convert manual test to .ui file
Convert the manual print dialogs test to use a ui file as subsequent
changes will add a lot more widgets.

Change-Id: I06ac54b67532f0eea1e91a2d9aca4f587d2fa332
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-25 00:00:23 +01:00
Konstantin Ritt
48679a3748 Fix tst_QTextScriptEngine failures on some platforms
The text shaping process has been unified for all platforms.

Task-number: QTBUG-23064
Task-number: QTBUG-24565
Task-number: QTBUG-26495

Change-Id: Ida4c4be85f1a72c04399d2e6760fa36b33a0464e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-24 21:37:31 +01:00
Shawn Rutledge
efcfa0b252 QGuiApplication: send TouchCancel when touch is interrupted by popup
QQuickWindow depends on maintaining state of known touch points
between events, so it needs to be notified when it will not be
receiving the corresponding release event for one or more.
This temporary fix needs to be reverted when we have a proper
event forwarding solution.

Task-number: QTBUG-37371

Change-Id: I5dc40af6feac425be8103c1586f8ebe3a6aad20d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-03-21 21:08:27 +01:00
Friedemann Kleint
374d0a0b8c Remove manual test qpainfo, which is superseded by the qtdiag tool.
Change-Id: Ibd6e8fc05495f6eb2adca22072df19530766858a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-21 18:34:43 +01:00
Fabian Bumberger
70624ed9d6 QNX: Fix QGraphicsItem autotest
Change-Id: I85b0938e6ebeb9f24e24b51a594c01b74167a177
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
2014-03-21 17:55:55 +01:00
Jens Bache-Wiig
23595107cd Respect scrollbar position setting on Mac
This was a regression from Qt 4.7.

[ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for
click-position on Mac.

Task-number: QTBUG-36314
Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-03-20 19:01:53 +01:00
Peter Hartmann
d9f5200fb8 network: add support for NTLM Session Security
tested manually with internal proxy.

Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com>

Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-20 19:01:53 +01:00
Kai Koehne
ba4d154737 Logging: Remove PatternFlag::Invalid from QLoggingRule
The flag is not orthogonal to the rest, and e.g. checking with

   flags & Invalid

will fail. Rather make it explicit by comparing with 0.

Change-Id: I428d5e71f5ecd05f61d543aaa78532548ef93d5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-20 19:01:53 +01:00
Laszlo Agocs
8adca56674 Resurrect advanced bindTexture() features in QtOpenGL
During the Qt 4 -> 5 migration the setting of the extension flags
in QOpenGLFunctions/Extensions suffered a regression: flags like
GenerateMipmap were never set. This led to the unfortunate sitation
that features that were tied to these flags, like compressed texture
support or mipmap generation, got disabled.

This is now corrected by checking for the extensions like Qt 4 did.

Task-number: QTBUG-37588
Change-Id: I4a7beb1b435af11e05f5304aa04df2ec63b34c18
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-20 14:11:33 +01:00
Kai Koehne
503d761c08 Print when logging rule is invalid.
Print a warning when an invalid logging rule is parsed.

Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-20 13:45:35 +01:00
Frederik Gladhorn
b8c96f2eb9 Accessibility: Improve QTextEdit
EditableTextInterface was implemented but not reported to the
accessibility bridges.
Newlines in QTextEdit when using QCursor::selectedText are returned as
unicode paragraphs, replace them by newlines.

[ChangeLog][QtWidgets][Accessibility] Fixed QTextEdit not reporting
newlines to accessibility frameworks and add editable text interface.

Change-Id: Iac21e70f5468a16f8abf242ae148290dbab3f8e4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-03-20 12:49:33 +01:00
Tobias Koenig
1f6e461533 Fix positional binding values order in QSqlQuery
Adapt the stringification code, that is used to produce the
keys for QSqlQuery::boundValues() return value, to keep the
right order of the binding values.

Task-number: QTBUG-12186
Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504
[ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-20 10:36:34 +01:00
Morten Johan Sørvig
5e03c4d97f QOpenGLWidget retina support.
Use device pixels where appropriate. 

Change-Id: Ia953e6da4034eecbfccf798701ec1b850eea9d5b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Friedemann Kleint
48773be981 Do not run tst_qcolumnview in parallel
Task-number: QTBUG-36395

Change-Id: Id1f5cfeca3f18d6d7d1f2354211e15d349dd7b8f
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-03-19 19:51:20 +01:00
J-P Nurmi
3a4b8cbc3d Fix tst_QColumnView::scrollTo()
The test relies on active focus, so activate the test window in
the beginning of the test to avoid undesired focus widget changes
by QApplication::setActiveWindow() during the test.

Task-number: QTBUG-36395
Change-Id: I6febec7d552224b1754aaf57520ed6d435d29563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-19 19:50:50 +01:00
Frederik Gladhorn
634b9b1e5c Do not run tst_qabstractitemview in parallel
This test waits for window activation and gets disturbed by mouse
movements.
The test duration is not long enough to justify the flakyness (around 10
seconds on my laptop).

Change-Id: I985044f954c09442220db3ca318045c04ef6bb77
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-03-19 01:02:03 +01:00
Jani Heikkinen
23b47a8d4e Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-03-17 13:48:12 +01:00
John Layt
2c175d3748 QPrinter - Expect failure of QPrinter page size test
The page size test can get confused when two printer papers have the
same size, but the code being tested is actaully correct.  Put a temp
QEXPECT_FAIL on the test and some debug statements so we can see why it
fails and fix the test as required.

Change-Id: I160ba2ed7344500d89bdcb9bb416863713fef84b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:29 +01:00
John Layt
833a43d56c QtPrintSupport - Fix QT_NO_PRINTER build
Fix the QT_NO_PRINTER build for issues that have accumulated over last
few months, and in the new changes already approved.

Change-Id: I9aed21dee861837fd1a68a96692c873a4f5be293
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:26 +01:00
John Layt
1ffd79bfb7 QPrinter - Fix winPageSize() on Mac and Linux
Using QPageSize internally provides the Windows ID on all platforms so
remove the conditional compile on the QPrinter api and add support to
the print engines.

Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:13 +01:00
John Layt
dbc50e06df QPrinter - Use QPageSize and QPageLayout
Use QPageSize and QPageMargins to get/set values in the print engines,
add api to directly set the values, and rewrite the docs to make the
paper-based api obsolete instead of the page-based api.

Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the
print engines to ensure no level of detail is lost, e.g. for custom
sizes passed to QPrinter.

[ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize
and QPageLayout in the public api to control the page layout for a
print job.

Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:10 +01:00
John Layt
ab42391cd0 QPrintEngine - Switch Windows to QPlatformPrintDevice
Change the Windows QPrintEngine implementation to use the
QPlatformPrintDevice to obtain device information, and use QPageSize to
obtain page size conversions.  A following change will use QPageLayout
to store that page size.

Change-Id: I990943e2b62ab6dab2c4d4a292c7ed7261beadf2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:04 +01:00
John Layt
9e29fab38d QPdfWriter - Use QPageSize and QPageLayout
Add support to QPdfWriter for QPageSize, QPageLayout, and resolution.

[ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting
the PDF orientation, layout and resolution by using QPageSize and
QPageLayout.

Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:52 +01:00
John Layt
b0428926ce QPrinterInfo - Switch to QPlatformPrintDevice
Change the QPrinterInfo implementation to use QPlatformPrintDevice as
the backend.  Remove all the old QPrinterInfo related code from the
QPA plugin.  Add public api to QPrinterInfo to support some features
from QPlatformPrintDevice.

[ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for
isRemote(), state(), defaultPageSize(), supportedPageSizes(),
supportsCustomPageSizes(), minimumPhysicalPageSize(),
maximumPhysicalPageSize(), supportedResolutions(),
availablePrinterNames(), and defaultPrinterName(). The use of
availablePrinters() is discouraged due to performance concerns.

Task-number: QTBUG-35248

Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:44 +01:00
John Layt
f50d46e5eb QPlatformPrintDevice - New QPA base class
Add a new QPA class to abstract Print Devices.  Each platform instance
will encapsulate all required details about a print device instead of
the code being distributed throughout the print engine and print
plugin.

Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:31 +01:00
John Layt
5eeed00f4d QPageLayout - Add new QPageLayout class
New QPageLayout to encapsulate page layout details including page size,
orientation and margins.  Scale may be added later.

Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.

[ChangeLog][QtGui] Added class QPageLayout to support handling page
layouts including the page size, orientation and margins.

Change-Id: Ife1ddd6c2a8d1516542be2eb37425111f41cd5c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-03-17 13:45:27 +01:00
John Layt
87d802465b QPageSize - Add new QPageSize class
New QPageSize class to encapsulate paper sizes and names to ensure all
sizes and conversions are consistent and match the Postscript standard
sizes.

Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.

[ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement
Adobe Postscript PPD standard page sizes. This class supports the
standard page sizes, names and keys from the PPD standard, and provides
convenient size and rect conversion methods.

Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:19 +01:00
John Layt
ad0163d088 QPrinter - Add page metric tests
Add more page metrics tests to expose the many bugs and inconsistencies
in the page layout handling.  No platform or pdf backend passes all
these tests so they are skipped for now, but following commits will use
the tests to ensure the re-write of the page layout handling fixes the
many problems in a consistent way for all backends.

Change-Id: Ic5b16aa08dfe2bd9a9191662fd2bbe6b913e15c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-03-17 13:45:14 +01:00
Jędrzej Nowacki
ac178eae4e Fix Q_DECLARE_METATYPE macro
The macro should stringify value of the given token not the token
itself.

Task-number: QTBUG-37547
Change-Id: I90f4fa613bd13d5a581828ab13f620b40dfd3593
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-03-17 13:05:07 +01:00
Frederik Gladhorn
a2850e54d5 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	src/gui/painting/qdrawhelper.cpp
	src/gui/painting/qdrawhelper_avx.cpp
	src/gui/painting/qdrawhelper_x86_p.h

Change-Id: I09352d05119f6fd000319074a2705b38361b2c90
2014-03-17 12:29:11 +01:00
Friedemann Kleint
037bc9b638 Add verbose messages to tst_qnetworkreply.
Task-number: QTBUG-37449

Change-Id: Ib3802ddd51b908a68d8c893ce49010aeeb117db8
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-15 10:45:17 +01:00
J-P Nurmi
49b14f7a8b Remove the _qt_filedialog_xxx hooks
These internal and obsolete hooks are no longer used. The correct way
to provide platform dialogs in Qt 5.x is to implement a platform theme
plugin, as was done for GTK+ 2.x.

Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-03-15 10:44:47 +01:00
Andrew Knight
42afaa992a d3dcompiler_qt: Remove control file semantics
This simplifies the compiler control semantics by always using the
packaged compiler if it is available. With no packaged compiler, the
service is assumed to be running if the directory structure is present.
Use of a packaged library can be overridden by setting the environment
variable QT_D3DCOMPILER_DISABLE_DLL to 1.

When the runtime compiler is used, the source will no longer be
logged, and the compilation output will no longer be cached.

Change-Id: Ib07f517e7043d7785bdfa9da55abd34df518eeed
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 22:40:24 +01:00
Janne Anttila
391c2c12ab Introduce GENERATED_TESTDATA variable and fix qresourceengine test.
testcase.prf cannot be loaded from pro file for various reasons,
see qtbase commit history for details.

Moved runtime testdata logic from pro file to testdata.prf, and
thus made is reusable in other test cases as well.

Change-Id: I500d08dc4951e4eda862071e4ddd3e0f6de8c3d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-14 22:39:58 +01:00
Friedemann Kleint
f83ce63fe3 Add GL information to qpainfo.
Task-number: QTBUG-31611
Change-Id: Ibf9bcb74ed8dbf8625e77ef0870d758a77ea65cb
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-14 22:39:27 +01:00
Friedemann Kleint
08f0dbd13c Fix spurious XPASS in tst_QGraphicsAnchorLayout.
Seen on Windows:

XPASS  : tst_QGraphicsAnchorLayout::stability() QCOMPARE(sameAsPreviousArrangement, true) returned TRUE unexpectedly.
tst_qgraphicsanchorlayout.cpp(1399) : failure location

Move check into loop with descriptive message on fail, do not error
out if it actually passes. This now typically prints:

XFAIL  : tst_QGraphicsAnchorLayout::stability() The layout has several solutions, but which solution it picks is not stable ( QRectF(30,0 0x10) != QRectF(30,0 10x10) , iteration 3 , item 4 )

Change-Id: Iae8553dbbcedeb70d5d672e3cefbd1f06a63d27d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-03-14 22:39:19 +01:00
David Faure
c4650779c4 Fix tst_qthreadpool under high load.
The tasks might not have run yet at the time of the QCOMPARE, so we need
to acquire on the semaphore in order to ensure that this is the case,
just like in the previous testcase.

Change-Id: I1da72bb07c2f53760b3bf912fc26aaf10ed18d48
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-14 22:38:49 +01:00
Janne Anttila
4b8aee7ca0 Fix qchar testdata installation.
NormalizationTest.txt does not exist in the project root, but under 'data'
directory. TESTDATA is converted to INSTALLS rules in testcase.prf.
INSTALLS rules generated in testcase.prf does not set 'no_check_exist'
CONFIG variable. Thus qmake will not install NormalizationTest.txt since
it cannot find it from defined location.

Even TESTDATA has been incorrectly defined, NormalizationTest.txt
has been found in majority of the platforms thanks to QFINDTESTDATA
flexibility. However it causes problems on sand-boxed platforms such
as WinRT.

Fixed by defining the relative path to NormalizationTest.txt in TESTDATA
so that qmake can find the file when processing INSTALLS variable.

Change-Id: Id9a28db2a00b17d2c0136e6ff32f421b21137898
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-03-14 18:19:00 +01:00
David Fries
e6cb06a835 correct send vs sent grammar
Correct the tense of send vs sent in comments and documentation.

Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-14 15:27:03 +01:00
Janne Anttila
f79202805e Disable UNC tests on WinRT.
Based on file system implementation for WinRT, the UNC paths are not
supported on WinRT, so lets disable corresponding tests as well.

Change-Id: Ib45ae618f39d5da39a822160096599b30204cf71
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-14 15:26:49 +01:00
Morten Johan Sørvig
7bd7699e17 Add sizeLessWindow test case.
Verify that QOpenGLContext works with QWindows that
do not have an explicit size set.

Task-number: QTBUG-35342

Change-Id: I91be7beb0062c5825fc58273c701c396b6423256
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-14 15:26:41 +01:00
Janne Anttila
71b5aa1a2a Removed unnecessary TESTDATA statement from qmessageauthenticationcode.
QMessageAuthenticationCode autotest does not have data folder for
TESTDATA. It seems that pro file is copy/pasted from another one which
actually have data. Removed the unnecessary statement since it caused
problems for https://codereview.qt-project.org/77981.

Change-Id: Ide753e5692bd2f469217760173a9b60f2f646770
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-03-14 15:26:21 +01:00
Shawn Rutledge
2258d8f9d0 Disable splashScreenModality test: dialog is going under splash screen
That's a bug, but this test causes CI problems until it's fixed.

Task-number: QTBUG-35169
Change-Id: I27b3a61437312d2217743670fa14510d9340d8c1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2014-03-14 15:26:10 +01:00
Kai Koehne
ef43967fcd Logging: Let user configure rules via QT_LOGGING_RULES
Check also for rules set in an environment variable QT_LOGGING_RULES.
This makes it even more convenient to set rules e.g. for just one run of an
application, without having to create a logging configuration file. It
is also more in place with the current way we enable/disable debugging
of parts of Qt via environment variables.

Change-Id: I4d05976f2b6c12bca472552ffa22345475cd01de
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
2014-03-13 13:26:51 +01:00
Kai Koehne
19693362e7 Use QStringRef for parsing of logging rules
Use QStringRef to speed up the parsing of the left side of logging rules.

Change-Id: Idd4d75496e3865d092f2802c45928a414c14c615
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:36 +01:00
Kai Koehne
2350c7e35c Make parsing of categories in logging rules more strict
Do not accept rules with wildcards in the middle.

Change-Id: If6fa71629c46bc4127aa8bd475643bc0e8a9f57c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:26 +01:00
Kai Koehne
b3871dc804 Make parsing of categories in logging rules consistent.
The documentation says that the left side of a logging rule has the syntax

<category>[.<type>]

with optional wildcard '*' as the first or the last character (or at
both positions.

However, so far we didn't allow

qt.*.debug

But what we did allow is implicit dropping of trailing '.', e.g.

qt.* matched also 'qt'

Fix these by splitting up the '.type' in advance, and then do string
matching only on the 'real' category names.

Change-Id: Iab50ad0fc673464e870f5ab8dfb3245d829b3107
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:14 +01:00
Kai Koehne
f6d0c67d30 QDebug: Allow text stream formatting for 64 bit numbers
Use the QTextStream stream operator for formatting 64 bit numbers,
just like we do for other numbers, too. This ensures all numbers in
a QDebug stream e.g. respect the hex and showbase modifiers.

The original reason for formatting qin64, quint64 with QString::number
is unclear (pre-dates the original qt4 git import). Maybe QTextStream
did lack proper support for 64 bit numbers back then.

Task-number: QTBUG-36841
Change-Id: I049516c2a8394c9c1a708f86c3d950418a20a957
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:02 +01:00
Sergio Ahumada
9f87c3663d tests: Mark tst_qdbus* tests as insignificant on OS X
D-Bus libraries were recently added to OS X 10.7 making these
tests to be executed for first time.

Task-number: QTBUG-37469
Change-Id: Ia7a74a45b18d4a645307f7fb7666236c5e009e5f
Reviewed-by: Simo Fält <simo.falt@digia.com>
2014-03-13 13:25:49 +01:00
Friedemann Kleint
eb0032687f Stabilize tst_qnetworkreply on Windows.
Do not close connection in slot bytesWritten() since that can
cause clients to fail with "Connection Closed". Instead, use
deleteLater() to close properly and prevent leaking the sockets.

FAIL!  : tst_QNetworkReply::qtbug28035browserDoesNotLoadQtProjectOrgCorrectly() 'waitForFinish(reply) == Success' returned FALSE. ( QUrl( "http://localhost:58240" )  failed: # 2 "Connection closed" )
..\tst_qnetworkreply.cpp(7067) : failure location

Task-number: QTBUG-37449

Change-Id: Ib92cb62fae523370b2fb45e1ccfa217559732bc8
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-03-13 13:25:35 +01:00
Simo Fält
e5785d6322 Fix network tests relying on troll.no
Replacing old troll.no domain with qt-project.org domain. Using troll.no
doesn't work anymore.

Change-Id: Ic6fa71b044d1adbdc66c875b47bfdc256a2afc8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-13 13:25:26 +01:00
Friedemann Kleint
9c5e441394 Skip the test 'abort' of tst_qftp.
The test takes too long and fails:

FAIL!  : tst_QFtp::abort(WithoutProxy:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL!  : tst_QFtp::abort(WithoutProxy:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL!  : tst_QFtp::abort(WithoutProxy:put_fluke01) 'bytesDone != bytesTotal' returned FALSE. ()
tst_qftp.cpp(1406) : failure location
FAIL!  : tst_QFtp::abort(WithSocks5Proxy:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL!  : tst_QFtp::abort(WithSocks5Proxy:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL!  : tst_QFtp::abort(WithoutProxyWithSession:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL!  : tst_QFtp::abort(WithoutProxyWithSession:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
FAIL!  : tst_QFtp::abort(WithoutProxyWithSession:put_fluke01) 'bytesDone != bytesTotal' returned FALSE. ()
tst_qftp.cpp(1406) : failure location
FAIL!  : tst_QFtp::abort(WithSocks5ProxyAndSession:get_fluke01) '(int)newData_ba.size() == bytesDone' returned FALSE. ()
tst_qftp.cpp(1886) : failure location
FAIL!  : tst_QFtp::abort(WithSocks5ProxyAndSession:get_fluke01) Network operation timed out
tst_qftp.cpp(1392) : failure location
Totals: 327 passed, 10 failed, 4 skipped
QtQA::App::TestRunner: warning: test duration (398 seconds) is dangerously close to maximum permitted time (450 seconds)
QtQA::App::TestRunner: warning: Either modify the test to reduce its runtime, or use a higher timeout.
QtQA::App::TestRunner: test failed, running again to see if it is flaky...

Change-Id: I122641f174927c6b3668df05c79f88e38b88042f
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-10 20:41:43 +01:00
Friedemann Kleint
e9a93e888d Increase timeout in tst_NetworkSelfTest.
Try to fix frequently failing test:

FAIL!  : tst_NetworkSelfTest::ftpProxyServer() Failed to receive data in step 32: timeout
tst_networkselftest.cpp(230) : failure location

on Windows. Introduce timeout constant, add message.

Change-Id: I709f0b34cd1cfe5d3c64cf61ccb7907bd616bc54
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-03-10 20:41:35 +01:00
Thiago Macieira
d1e2235553 Revert the QByteArrayList addition to Qt 5.3
This reverts commits f12b0f9a38
("QByteArrayList: optimize op+"),
f96f2fe367 ("Enable QByteArrayList
tests"), and 4f23f0530a ("new
QByteArrayList class").

This class is coming back in Qt 5.4.

[ChangeLog][CHANGELOG FIX] Remove the line about QByteArrayList being
added.

Change-Id: I890ab2b34a9b3e575512eb306d0f241143a867cf
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-08 00:21:53 +01:00
Samuel Gaist
be81c58845 Add Objective-C specific type converters to QByteArray
This patch adds the Objective-C NSData/CDataRef converters to
QByteArray

This will replace the current converters offered in QMacExtras

[ChangeLog][QtCore][Objective-C] Added NSData/CDataRef converters for
QByteArray

Change-Id: I7a0f14bee4271798db345f3c5efd26ac671a3ea4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-08 00:21:53 +01:00
Friedemann Kleint
898f7ea1ec Sanitize tst_qftp.
- Replace SRCDIR define by QFINDTESTDATA
- Replace QVERIFY by QCOMPARE where applicable
- Introduce QVERIFY2 with message for comparisons

Change-Id: Ib5a6b0f09428587281e1b9521e4d8a8117c1afdb
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-06 17:22:55 +01:00
Jędrzej Nowacki
9a08483d76 Try to speedup tst_qmetatype.cpp compilation with clang.
The test instantiates enormous amounts of templates in one compilation
unit. All clang versions, that I tested, suffers from performance issues
while compiling the test, the cost depends on the version. The most
affected are shipped by Apple.

Task-number: QTBUG-37237

Change-Id: I0959c1a4a6faee448ae1dae5c1e70ee06cefbd9c
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-03-06 17:22:55 +01:00
Jędrzej Nowacki
564297d7c4 Reduce clang compilation time of tst_qmetatype by ~50%
We do not need to check all possible basic type combinations in
the autoregistration test.

Change-Id: Ibfb97a93d9d1862e669d843988976690bbc83c74
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-03-06 17:22:55 +01:00
Jędrzej Nowacki
b0d8beb858 Simplify tst_QMetaType::automaticTemplateRegistration
Redundant and unused variadic macro arguments were removed. For macros
with known count of arguments, named arguments are preferred.
Common code was moved out from macros so it is not generated over and
over.

Change-Id: Ib5106555d0d3c6cadfbdbdbd614831240b6d762f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-03-06 17:22:55 +01:00
Friedemann Kleint
37f5935a89 tst_QGLThreads: Fix errors about makeCurrent() in different thread.
QFATAL : tst_QGLThreads::textureUploadInThread() Cannot make QOpenGLContext current in a different thread
QFATAL : tst_QGLThreads::painterOnPboInThread() Cannot make QOpenGLContext current in a different thread

Task-number: QTBUG-28264

Change-Id: I281cf0593e01b43456410a9a53746bbb15f34f24
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-06 17:22:55 +01:00
Friedemann Kleint
3d73e11ccc Increase CI timeout for cmake tests.
Change-Id: I1711f99f9e46f1d195684e3c3a714b00618dca2e
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-03-06 17:22:55 +01:00
Oliver Wolff
7aa1a7f1c1 spdy autotest: Fixed build with QT_NO_NETWORKPROXY
Task-number: QTBUG-37171
Change-Id: I835764978cf75592d46a20fa5f644f6accec43f5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-06 12:21:14 +01:00
Oliver Wolff
62742d037f spdy autotest: Fix build with QT_NO_OPENSSL
Task-number: QTBUG-37171
Change-Id: I76df40d53e1310c16f559f91c244c6162e35475e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-06 12:21:14 +01:00
Laszlo Agocs
efbea58665 Make QOpenGLFunctions able to resolve everything
At least if the platform plugin's QPlatformOpenGLContext implementation
supports it.

This completes the QOpenGLFunction changes necessary for dynamic loading
of the OpenGL implementation. Everything else is up to the platform plugin.

Change-Id: I710e6fbee3005360ecf02bc6ef976e1beb513819
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 12:21:14 +01:00
Sze Howe Koh
b83dc929ec Complete QJsonValue::fromVariant()
- QVariant can store (U)Int, (U)LongLong, Float and Double numbers.
  Previously, QJsonValue::fromVariant() converted Floats into Strings
  while converting the others to Doubles.
- Add unit tests for QJsonValue::fromVariant()

[ChangeLog][QtCore][JSON] QJsonValue::fromVariant() will now convert
single-precision Floats into Doubles instead of Strings

Change-Id: I457adbe29c37ada611d1c6d711c42866d63d4024
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-06 12:21:14 +01:00
Tor Arne Vestbø
9d79c3458c Disable the qmetatype test on Clang + ARM, it's causing OOM during build
And takes a very long time to build if it doesn't run out of memory.

Task-number: QTBUG-37237
Change-Id: I8c7fae4d2d99ad59c6d6306da2df554a05955446
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-04 15:59:05 +01:00
Andy Shaw
f07841bc7c Revert path() behavior to not expand a current path on a drive
In the original change - cfb44c6528 - when
querying for the path of a file that did not contain a slash after the
drive indicator it would get the current path and return that as the path
that the file resided on.

However this meant that it would take the current path at that time which
may not be the actual path that was expected. So it was decided that
it should revert back to the original behavior which was to just return
the drive letter followed by the colon which would thus indicate still
that it represented whatever the current path was on that drive.

Change-Id: Ic57ae9227882a66e9a4c4d6537d7f2cae829165a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-04 15:59:05 +01:00
Laszlo Agocs
4b2f35d04c Dynamic GL: remove exporting symbols
Remove the opengl proxy for now. Later it will either be moved into
a separate library or replaced by a QOpenGLFunctions-based approach.

This means that the -opengl dynamic configuration is not usable
for the time being. The rest of the enablers remain in place.

The convenience function QOpenGLFunctions::isES() is now moved to
QOpenGLContext and is changed to check the renderable type. This is
extremely useful since besides supporting dynamic GL it solves also
the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES
path when creating an ES-compatible context with a desktop OpenGL
implementation).

Task-number: QTBUG-36483
Task-number: QTBUG-37172
Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-04 15:59:05 +01:00
Sze Howe Koh
fe2ce05d23 Remove duplicated tests
tst_QtJson::testValueSimple() tested bool and double values twice

Change-Id: Ie6e58aab729c6ee20cb53d3b85746a05f7571f5e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-04 15:59:05 +01:00
Chris Colbert
6060dab13a Fix issue where revealed widget children do not receive paint event.
When a child of a widget is spontaneously revealed due to a call to
the parent 'resize' method, the child will not receive a paint event
if it has the WA_StaticContents and WA_OpaquePaintEvent flags set.

This is caused by the backing store being pre-emptively resized by the
call to setGeometry_sys, which causes QWidgetBackingStore::sync to skip
the block which handles the static contents.

There doesn't appear to be any reason to preemptively resize the backing
store, since it is always resized as-needed during the the 'sync' method.
This change-set removes the code which preemptively resizes the backing
store.

Task-number: QTBUG-35282
Change-Id: Ie9942854ca5322dfe0f98ed8100810161576be80
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-04 15:59:05 +01:00
Friedemann Kleint
b22ef59663 Remove use of templates in tst_qatomicinteger.
MSVC 2008 is confused by TypeInStruct being a template, resulting in

\tst_qatomicinteger.cpp(189) : error C2027: use of undefined type 'QStaticAssertFailure<Test>'
        with
        [
            Test=false
        ]

for int (and thus for all unsupported types). This appears to be a real
Heisenbug-nature compiler bug as it can also be fixed by adding
qDebug() << Q_ALIGNOF(TypeInStruct<T>)
before the static assert.

Task-number: QTBUG-37195

Change-Id: Ib2b60f3c1ffeb0b8bdeb1fb0c659655ce4ab10d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-04 15:59:05 +01:00
Friedemann Kleint
e531b46bed Turn off compiler optimization in tst_qtendian for MSVC2008.
This causes frequent compiler errors on Windows CE.

tests\auto\corelib\global\qtendian\tst_qtendian.cpp(140) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'd:\orcas\compiler\utc\src\P2\main.c[0xCCCCCCCC:0xCCCCCCCC]', line 243)

Task-number: QTBUG-37194

Change-Id: I2adbc1e3b1896fbe86780aa26a15e918333a09f2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-04 11:29:30 +01:00