Commit Graph

99 Commits

Author SHA1 Message Date
Sergio Ahumada
d309574c03 tst_QIcon: Fix availableSizes() and task223279_inconsistentAddFile()
Copy some needed files into a local folder when QtWidgets is not
available.

Task-number: QTBUG-31993
Change-Id: I93b65bda198c22a60e979c119de8de683a78bb53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-15 16:28:25 +02:00
Sergio Ahumada
d1a6de21c3 tst_QIcon: Mark availableSizes() and task223279_inconsistentAddFile() as XFAIL
Task-number: QTBUG-31993
Change-Id: I10e39951fb38b950633805a44ea4c0edaf55635e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-27 23:14:16 +02:00
Bjoern Breitmeyer
c9e1c947d4 Disabled test on WINCE.
The winapi call used to load the icon does not
support the arguments on windows ce

Change-Id: Ia600eb9b05d5eb40778d8c281e6ce8278bfd7177
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-27 02:45:21 +02:00
Debao Zhang
dd4220b6e6 QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:42 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Samuel Rødal
711773776e Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.
QImage is supposed to maintain the invariant that each scan-line begins
on a 4-byte boundary, so we need to verify that this is the case before
using the optimized path of short-cutting QImage::copy() by referencing
the source image's bits directly.

Task-number: QTBUG-14766
Change-Id: I0a178aeb2f34cc64f98deae9470b55b5c53fcb06
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 15:00:35 +01:00
Oliver Wolff
53dc49ffc8 Check for network module when building according auto tests
Change-Id: I68013bf8e07be8d202b3253f997d4f4db05335a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:53 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Samuel Rødal
733430636d Fixed crashes when using QImage in combination with QCoreApplication.
As long as fonts weren't used we supported using QImage in combination
with QCoreApplication in 4.x, and there's no reason we can't continue
doing so.

Task-number: QTBUG-29643
Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-02-14 10:55:33 +01:00
Samuel Rødal
62d25e4d4f Fixed QPixmapCache associating path with wrong QPixmap.
QPixmap::load() would not detach, so multiple paths could get associated
with the same QPixmap, causing the wrong pixmap to be shown.

Task-number: QTBUG-29639
Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-02-12 15:21:57 +01:00
Samuel Rødal
af84313c62 Fixed crash in image reader when reading certain BMP files.
If the high bit in a mask is set, for instance if the mask is
0xff000000, and we shift it to the right by 24 positions, since the mask
was not declared as unsigned we ended up with a mask value of
0xffffffff. We then add 1 to this value and divide by the result,
causing a division by zero crash.

The masks need to be declared unsigned to prevent sign bit extension
when shifting right.

Task-number: QTBUG-29194
Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-06 09:59:56 +01:00
Morten Johan Sørvig
a9458a1755 Clean up logical dpi for QImage.
Revert to the pre highdpi-patch behaviour.

Before, both physical and logical DPI would be based
on the dpmx/dpmy variables, which could be changed
with setDotsPerMeter(). The highdpi patch introduced
separate ldpmx/ldpmy variables, which were not
changed by setDotsPerMeter().

This broke when loading images: setDotsPerMeter
would be called but the logical dpi would not change.

Remove ldpmx/ldpmy. Keep scaling the physical dpi
by the devicePixelRatio, which will be set to 1 by
default.

Task-number: QTBUG-29187
Change-Id: I0d6f5f3b8efae5fb1adc0a50b22a5da78324a282
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-31 10:39:38 +01:00
Frederik Gladhorn
7df08a8b63 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-23 22:12:54 +01:00
Allan Sandfeld Jensen
06e4b1cff4 QImage plugins should report supported mime types
Introduces the methods QImageReader::supportedMimeTypes and
QImageWriter::supportedMimeTypes which corresponds to the similar
supportedImageFormats methods, except they return lists of MIME types.

Task-number: QTBUG-28177
Change-Id: Ibb0e264a12eaf972a8bfd6bd891dcd9f89efd085
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-23 17:19:22 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Michael Brasser
f156e578d7 Ensure raster pixmap cache key is the same as that of pixmap.toImage()
This is done to support texture uploads in an image provider. It ensures
we can load the texture using QImage in the image provider, and when
it is later painted as a pixmap, the cacheKey will be identical
(assuming no format conversion was required).

Change-Id: I54229511ed91ce5430cc478af5aff0d96685a2da
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-11 21:24:23 +01:00
Stephen Kelly
cc69dff01b Gui: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: I95b8b4b674e85b2b3c374931f6231d60f35be984
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:39:08 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
aavit
a3a4114f53 Fixes: out of bounds memory access in QImage autotest
A pointer to the data of one qimage is used, with an offset, in a copy.
In the mono case, that could lead to overflow: the last row would
of the copy would stretch 1 byte beyond the end of the allocated
area. Fix by reducing the height of the copy, so that it keeps
within the allocated memory.

Task-number: QTBUG-28322

Change-Id: I09abfc83f738f8af000fc50f8c94f63dba3a6cfe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-12-20 16:48:36 +01:00
aavit
d91c1422a9 Fix GIF image decoding: do not zero transparent pixels
For the special transparent color index, the decoder would skip
writing anything out (thus leaving the pixels at 0 rgba value).
Although correct for later frames, for the initial frame this would
loose the color information for such pixels (which one otherwise
could have made visible e.g. by converting then image to an
alpha-less image format).

Change-Id: I316cefce8f21797feedebfbf98296ad84eaa4b99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qt/c309d424f45dc0e7b62fbbbabf20dbfe355f48a7)
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2012-11-09 16:07:51 +01:00
Sergio Ahumada
67a0f546c5 test: Remove dead code from tst_QPixmap
Change-Id: I1945a0f431364f47a43cf7f600ad38fdba5f4a08
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-27 00:24:16 +02:00
Sergio Ahumada
c3237f58ab test: Remove tst_QPixmap::grabWindow() function
QPixmap::grabWindow() was deprecated by 41914453d3

Task-number: QTBUG-20863
Change-Id: I7e675c124cd96cf1815b65e57f3fba19e5065066
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-25 16:22:43 +02:00
Konstantin Ritt
008e5ba61a Invalidate old QImage data if load()/loadFromData() has failed
This guarantees one will never get `!img.isNull()` after
load()/loadFromData() has failed, even if the image was
not null before.
Apply the same fix to QPixmap and QPicture.

Change-Id: Ida1ad6a6f0fc830df8e75ada0c163fc2d3360dea
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-10 13:24:23 +02:00
David Sansome
c3ffcbd9a2 Scale icons returned by QIcon::fromTheme.
The icon engine behind icons that are loaded from QIcon::fromTheme does
not scale any pixmaps that it returns. When using an icon theme with an
incomplete set of icons (for example, only a "128x128" folder),
QIcon::pixmap will always return 128x128 pixmaps even if you ask for
one of size 22x22.

This is contrary to the QIcon::pixmap documentation that says "The
pixmap might be smaller than requested, but never larger."

This patch uses the same code that is in the main QIcon class in the
PixmapEntry QIconLoaderEngineEntry to scale pixmaps if they are too big.

Change-Id: Ic25a3628ac82cfb899574245f658490a2dd49d54
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-10 08:45:22 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Samuel Rødal
c1e5f600ab Made QImage::fill(uint pixel) for RGB888 accept QRgb values.
Previously QImage::fill() for Format_RGB888 expected a BGR value
instead of the RGB order defined by QRgb, making it counter intuitive to
use related to the 32-bit formats.

Fixed the QPixelLayout data for RGB888 and changed the byte order of
quint24 based on what the optimized image conversion routines expect.

Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-29 16:53:00 +02:00
Stephen Kelly
dbe4b45f9b Remove some dead code wrapped in Q_WS_QWS.
Change-Id: Ie1ee8c4af603b924abe40145041357981d174445
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-03 11:24:28 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-01 15:37:46 +02:00
Friedemann Kleint
6ae168f8ce Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().
Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-20 16:47:11 +02:00
Friedemann Kleint
8761840397 Implement waitForWindowExposed and friends for widget windows.
- Implement waitForWindowExposed() for toplevel windows.
- Implement waitForWindowShown(QWidget *) and mark as
  deprecated in line with waitForWindowShown(QWindow*).
- Use in tests.
- Simplify tests (collapse waitForExposed, setActive
  into setActiveWindow, waitForActive), remove most
  hard-coded timeouts.
- Stabilize graphicsview tests by using waitForWindowActive.

Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-20 09:27:28 +02:00
Bjoern Breitmeyer
32db7de207 fixed unittest builds for wince
removed printsupport tests for wince as there
is no print support on wince and removed the special
handling for wince from 4.8 on some tests as the dependent
modules are not part of qt base anymore

Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 21:14:09 +02:00
Kent Hansen
027cd4c1b9 Make qicon autotest build without widgets
Change-Id: Ic6176404076bac956d00d57c99e0bbf0ac78beca
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-08 08:23:24 +02:00
Kent Hansen
fe6fe39415 Make qpixmap autotest build without widgets
Change-Id: Iabf1e6815a2af79d9da84c0e2bb9c2de52cb698f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:38:41 +02:00
Kent Hansen
c6d3942ea7 Make qpicture autotest build without widgets
Change-Id: Id2047dace7b3087f1c7b83545f5e122ab936d33c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:38:38 +02:00
Kent Hansen
17e233e7c3 Make qmovie autotest build without widgets
Change-Id: Ie53b183e99de08c3cc35f4932b7aabf4bf5b0940
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:38:36 +02:00
Rohan McGovern
177070cb7b Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows.  Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.

Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-28 07:33:01 +02:00
Olivier Goffart
6c06e14a49 QIcon: move back to QtGui
-  Move the files and tests
git mv src/widgets/kernel/qicon* qrc/gui/image/
git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/

 - update the include of QIcon
git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon"
git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon"

 - Adapt QIcon \ingroup documentation
sed -i s/QtWidgets/QtGui/ src/gui/images/qicon*

 - Adapt export macro
sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon*

 - Update .pri and .pro files

 - Remove the use of QStyle::alignedRect by copying its content (and
   adapt slightly

 - Use QGuiApplication::palette() instead of QApplication::palette()

 - Add a hook in QGuiApplicationPrivate to call the
   QStyle::generatedIconPixmap() from QtWidgets

Another commit follows to adjust QMetaType::Icon and move the QVariant
and QMetaType icon handler back in QtGui

Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-18 21:42:38 +02:00
Konstantin Ritt
3cfcceae43 QJpegHandler: add an embedded text support
texts for the textKeys are stored each in a separate COM(ment) section
so that the maximum text's size is almost 65KB

Task-number: QTBUG-10568
Task-number: QTBUG-111

Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-05-16 04:24:50 +02:00
Girish Ramakrishnan
36547f4eff Expose QPA API under qpa/*
The main reasons for doing this are:
1. _qpa.h end up in the master QtGui include file. QtGui is meant for
userland applications. qpa code is neither binary nor source compatible.
Inadvertant use of QPA api makes the user code binary-incompatible.
2. syncqt creates forwarding headers for non-private header files. This
gives people the impression that this is public API.

As discussed on the mailing list, even though QPA api is internal and subject
to change, it needs to  treated differently from private headers since they
will be used by  in-qtbase and out-of-qtbase plugins.

This commit does the following:
1. The _qpa in QPA header files is dropped.
2. syncqt now treats any file with qplatform prefix as a special file and
moves it to qpa/ directory. The recommended way of using QPA API in plugins
is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API
from multiple modules (for example, qplatformfoo might be in QtPrintSupport)
3. The user needs to explicitly add QT += <module>-private to get access to
the qpa api.
4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo
includes.

This commit does not change the cpp filenames. This requires a more careful
merging of existing non qpa cpp files and existing cpp files on a case by
case basis. This can be done at anytime.

The following files are not renamed as part of this changed but will be fixed
as part of a future change:
src/gui/kernel/qgenericpluginfactory_qpa.h
src/gui/kernel/qgenericplugin_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa.h

files were renamed using

    for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done
    for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done

includes were renamed using script

for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do
    sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \
        -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \
        -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \
        $file
done

Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-05-07 20:25:24 +02:00
Thiago Macieira
575ede308e Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtGui]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I2850033159508ebb1ff7564e15b99a146dbee94c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-04 12:45:52 +02:00
aavit
878a01b2d1 Implement inline downscaling in png reader, to save memory
Instead of allocating and reading the entire image and then scaling it
down, this code reads only one line at a time and scales it on the
fly.

Change-Id: I61fde307146c11dcd90ca617cc2e7f85dd3b66c4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 10:37:02 +02:00
Konstantin Ritt
17ebedf5fc get rid of QT_NO_IMAGE_TEXT switcher
Change-Id: Ie72f907ffb959f629af6a414959348a992c4c941
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-04-25 10:29:56 +02:00
Robin Burchell
7be255156f Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 10:46:19 +02:00
Thiago Macieira
bd112dab56 Make tst_qmovie work in shadow builds
Change-Id: I8fe4b5e98ce2fb1ac8420bf568f5c9c973165fbf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Debao Zhang
db390d46c3 Move the auto test of QPixmap::grabWidget() from QPixmap to QWidget
Change-Id: Id565fa1eb8fe13c62a93a5afa39a5701ce7b20ea
QPixmap::grabWidget is deprecated, which calls QWidget::grab() at present.
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Debao Zhang
2e886cfbcb Move tst_qicon.cpp and tst_qpixmapfilter.cpp to QtWidgets
QIcon and QPixmapFilter belong to QtWidgets instead of QtGui.

Change-Id: I6d82811e04046edb0cc67c55970c161612e86d3f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 10:48:40 +01:00
Debao Zhang
9f86923b5c tst_qimagereader: does not depend on QtWidgets
Both tst_qimagereader.cpp and tst_qimagewriter.cpp do not depend on
QtWidgets.

Change-Id: I7e8b31c23db203c44ccb4cd4e8e747d18c5d7ed7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-09 11:05:04 +01:00