Commit Graph

1374 Commits

Author SHA1 Message Date
José Millán Soto
009cd671ec Do not check isActiveWindow in QAccessibleWidget::state
QWidget::isActiveWindow() was being checked in QAccessibleWidget::state
to determine if a widget is focusable. As a result, focusable widgets
were reported to be not focusable when the window was not active.

Change-Id: I73c47181ed132a84f0251cb67d0e20912e29a1a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-08 03:13:10 +01:00
Rohan McGovern
3ae3aa0e51 Improved stability of tst_qsemaphore (especially on mac)
Timers are not entirely precise; if we ask for a timeout of
10000 milliseconds, we might time out in 9999 instead.
Also, we know the expected elapsed time in each case, so do a fuzzy
comparison against that time.

Previously the test was verifying that the elapsed time was greater than
or equal to the timeout in the case where a timeout was expected, which
means the test would not detect bugs which incorrectly caused the
timeout to occur later than it should.

(cherry picked from qt4 commit 9a2573dc13b3e8df6cd15bef64370ea407480fc7)

Change-Id: I91d0c81f989ab43a3c48f6abbb4c5b28e2b35402
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-08 02:10:51 +01:00
Rohan McGovern
f50a84008e Improved stability of tst_qhttpsocketengine
This autotest assumed that various network operations could always be
completed within 5 seconds.  Notably, it assumed that an attempt to
resolve a nonexistent hostname would always result in an error within
5 seconds.  In my testing, it usually takes 4-6 seconds to complete,
but occasionally takes as much as 13 seconds.

(cherry picked from qt4 commit c85faef67b6a7e8fcedb4ce800282d41f5b79ec1)

Change-Id: I982ecf6ebc1bb8ee2184cf5592cb2684474c870b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-08 02:10:44 +01:00
Mark Brand
f5e1da12f0 QSqlTableModel::removeRows(): don't emit extra beforeDelete
Qt 5 seems like a welcome opportunity to stop emitting this
spurious beforeDelete signal.

Change-Id: Ib8628343ca9b8fdd85c154a206c7e2bf2c4c9dc1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-07 22:05:51 +01:00
Jonas Gastal
63f634322b Don't allow cd'ing to above root.
Task-number: QTBUG-23893
Change-Id: Ifc6e22f135a1f6bff7c0fa8bef3ea7e1042ae819
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2012-02-07 22:05:51 +01:00
Shane Kearns
deea48ef6a Fix QFile autotest not to require elevated privilege to pass
The open test case tests opening a device path on windows.
As this requires privilege elevation, the test fails when running
nmake check from a console.
As the CI machines appear to run tests with admin privileges, first
check opening the device using the windows API. If that succeeds, then
opening using QFile should succeed. If that fails, the opening using
QFile should fail.
(Since Windows vista, members of the "administrators" group do not run
at elevated privilege all the time. The user needs to opt in via a
UAC prompt or "run as administrator". This is similar to using the
sudo command on unix)

Ran the test as administrator and normally. Now passes in both cases.

Change-Id: Ibd7682eceb61e35d4912fa0392df536f4331f6ed
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-07 20:03:43 +01:00
Kim Motoyoshi Kalland
ba1cf5dae3 Removed image format specific template functions in raster engine.
Simplified the raster engine by treating image formats in a more
generic way and removed some unused code.

Change-Id: Ib3979a1a6e3e6f17c5002248545779ec36fff7c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-02-07 15:52:01 +01:00
João Abecasis
5a92dd6124 Detect incompatibilities in repeated type registration
QMetaType used to register a typeName and factory functions for
creation/destruction of objects. While it would be possible for a single
type name to be registered matching different actual types and memory
layouts, there was little that could be done about it.

Now that QMetaType is tracking type information with a direct impact on
data layout and ABI (size and type flags) it is important that we check
and detect binary incompatibilities as early as possible.

[Such incompatibilities could arise from type name re-use (technically,
ODR violations) or, more commonly, as version mismatch between different
shared libraries or plugins.]

Only type size and flags are checked as function pointers to inline and
template or otherwise non-exported functions could trivially differ
across translation units and shared libraries.

When registering typedef types, a check is made to ensure the same name
doesn't get registered as different types.

Change-Id: I8211c3de75d4854ce8fafdb620d3a931c206e0c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-07 09:47:51 +01:00
Jędrzej Nowacki
b8cf1d6bdc Remove QMetaType::unregisterType().
The function hasn't been working properly. It was not well tested, for
example it is undefined how QVariant should behave if it contains an
instance of an unregistered type.

Concept of unregistering types was inspired by plug-in system, but in
most supported platforms we do not unload plug-ins.

Idea of type unregistering may block optimizations in meta object
system, because it would be not possible to cache a type id.
QMetaType::type() could return different ids for the same name.

Currently QMetaType::unregisterType() is not used in Qt.

Change-Id: I878b6e8d91de99f9bcefeab73af2e2ba0bd0cba0
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-07 08:53:18 +01:00
Jędrzej Nowacki
56265031b7 Align QVariant::UserType and QMetaType::User
There is no point in keeping separate values which should mean the
same.

QVariant::UserType was used also to construct a valid, null QVariant,
containing an instance of unknown custom type. The concept was strange
and useless as there was no operation that could be done on such
QVariant. Therefore it was dropped.

Please note that the patch slightly changes behavior of different
functions accepting a type id as parameter. Before QVariant::UserType
was an invalid type from QMetaType perspective (id 127 was not assigned
to any built-in type), but QMetaType::User points to the first registered
custom type.

Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2012-02-07 08:52:32 +01:00
Martin Petersson
a650500729 tst_qnetworkreply: remove no such signal warnings
The QNetworkReply finished signal does not have a bool parameter.

Change-Id: I87bd0410545f7a2fc2ab63cca90548f0585bf7a0
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
2012-02-07 08:42:58 +01:00
Jason McDonald
9221757cde Fix error in qgraphicsanchorlayout1 autotest.
QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.

Change-Id: Ic958c4e5c15dd53a48479099b6b07803af6cb789
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-07 08:29:19 +01:00
Jason McDonald
cfd8a9a448 Fix error in qcssparser autotest.
QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.

Change-Id: Ifceaff4c5a7f1b6408ec57196298e3f3038910c9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-07 08:29:06 +01:00
Friedemann Kleint
8cb26f8511 Complete split of QtConcurrent.
- Fix exports.
- Fix tests.

Acked-by:  Thiago Macieira <thiago.macieira@intel.com>

Change-Id: I2df923ba74b468f5ee09b3a48ae3d09920751365
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-06 16:48:22 +01:00
John Layt
23457bd6d9 SIC: QLocale: Make QSystemLocale a private class
As discussed on list and approved by Lars and Thiago.

Make QSystemLocale private to give us time and space to change it to a
better implementation.

Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-05 17:50:04 +01:00
John Layt
1e3833bed8 QString: Make convert to number methods only use C locale
Ensure consistent conversions by not using the system default locale.

Change-Id: I60db9fc4f465c0254f3213419e57d7879aaddd65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-05 17:49:42 +01:00
Lars Knoll
96501b0a18 Move QtConcurrent into its own module
Task-number: QTBUG-20892

Change-Id: I614500aafb6428915509983608bbb0ade4e4f016
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 17:49:16 +01:00
Jędrzej Nowacki
92b1124752 Add movability tests for QByteArray.
QByteArray is declared as movable but it was not tested before.

Change-Id: I4fb636f8705c3fd792a768872206203ee5fd4ddb
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-05 13:07:56 +01:00
John Layt
fc24979e43 QDateTime: Remove Julian Calendar
Convert QDate to only use Gregorian calendar and not Julian calendar
before 1582.  In future the Julian can be used via proper calendar
classes.

Change-Id: I547a3550332057a0ab1be616706630b6afaceffc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 00:26:07 +01:00
John Layt
8327fa7c11 QDateTime: Store Julian Day as qint64
Store the QDate Julian Day number as an qint64 instead of uint32 to
enable support for dates before 2 January 4713 BCE.  This changes the
possible date range to be approx 2.5 Quadrillion BC to 2.5 Quadrillion
AD. A qint32 was not used as it only covers 5 million BCE to 5 million
CE which does include Geological or Astronomical time.

The effective supported date range is currently 4800 BCE to 1.4 million
CE due to restrictions in existing conversion formulas.  The effective
range will be extended later with new formulas.

Change-Id: Ib4345369455b31d4edae8c933b7721e76414e914
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 00:26:07 +01:00
Kent Hansen
b184dd0a01 Bring qmetaobjectbuilder in sync with moc
qmetaobjectbuilder should generate meta-objects of the same version
as moc; in the future, when the moc version is bumped, QMOB has to
be adapted at the same time.

QMOB was generating version 4 meta-objects. This patch makes it
generate version 6 (the current version). This also fixes a bug with
using qt_static_metacall with QMOB (setStaticMetacallFunction()); it
was already using the version 6 qt_static_metacall signature, which
isn't compatible with version 4.

Also add tests that ensure that the QMOB-generated meta-object works
with real objects; in particular we want to test the codepaths in Qt
that check for version >= 4.

Change-Id: I64a151ea5c947a6f8b7a00e85a39866446c735e9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-03 15:09:03 +01:00
Andy Shaw
5bab4744ba Handle the 'real' datatype correctly in the SQLite driver
The 'real' datatype should be seen as a QVariant::Double type and not as
a QVariant::String type otherwise it does not get presented correctly
when using a non Qt application to access it.

Test is included for QSqlQuery.

Task-number: QTBUG-16373

Change-Id: Ie323ce49eb95e4d6bb4c3814ba9a957a63f4b259
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
(cherry picked from commit b23631015c23a49e3b4d296ea0a6266bfce3d4f1)
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-02-03 15:09:03 +01:00
Pekka Vuorela
c802a5d272 Remove QInputContext
This has only been around as compatibility interface for Qt4
but is now replaced by QPlatformInputContext.

Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-03 11:01:34 +01:00
Kurt Korbatits
e1f1d0e5a1 Fixed qsharedpointer unittest on windows
- Use source file location as working directory for externaltests

Change-Id: Ic05259f48eece920b348ccbde9ba80c90dedfdd2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-03 01:40:26 +01:00
Pierre Rossi
da5d9e664f Un-guard a QRawFont autotest.
Let's just run this test on all platforms.

Change-Id: Iffec0ddfa8a73fd9e1af1c5ea3b49c337fa8a026
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-02-03 01:40:22 +01:00
Bradley T. Hughes
df516aa9f4 Don't include config.tests/unix/openssl/openssl.pri (again)
This file was removed in commit ba9302b8a9.
Commit 8fad23f326 removed openssl.pri from
src/network/ssl/ssl.pri, but not from the qsslsocket autotest.

Change-Id: Ic1a576ee7f0ee3d68471121ba636b94ce7bae455
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-03 01:40:07 +01:00
Giuseppe D'Angelo
3578e05b29 Merge QStyleOption*V{2,3,4} classes together
In order to keep binary compatibility, Qt 4 introduced V{2,3,4}
classes for QStyleOption subclasses. They're simple, low level
containers for various members with public access (no accessors
required).

In Qt 5.0 we can break BC, so this patch moves the members
from the derived classes into the ``base'' ones.
The ``base'' ones get a version bump matching the highest
version available, and the V{2,3,4} classes become typedefs.

This change can cause problems in code that used QStyleOption
directly, especially QStyleOptionViewItem, because the old V4
fields get default initialization but the QStyle subclasses
detect that the option is a V4 option and expect all fields
to be properly initialized. The fix in such places is to
properly initialize all fields.

Task-number: QTBUG-23522
Change-Id: I2f782da09ca5cc8c4cbafc07448fb0d33153a251
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-02 20:18:55 +01:00
Gunnar Sletta
75711510b1 Improve QSurface / QWindow API a bit and use that to avoid errors
Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-02 17:20:24 +01:00
Kent Hansen
4b1ba7c792 Fix QString::operator=(QLatin1String) for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made QString::operator=(QLatin1String) work in that case.

Change-Id: Ie77eabd2f8f036531d67cd8051a7b6305b386ccf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-02 11:10:04 +01:00
Kent Hansen
7edd623957 Fix QTextStream and QDebug operator<< for QLatin1String
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QTextStream and QDebug << operators work in that case.

Change-Id: I94d051ce2ebfb2d2a403b96d25e040c80a54bf7c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-02 11:10:04 +01:00
Kent Hansen
35b19be478 Fix QString(QLatin1String) constructor for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QString(QLatin1String) constructor work in that case.

Change-Id: I4f4f07a956144b7ea4aa9c58a61c755fb99ef1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-02 11:10:04 +01:00
Kent Hansen
ec9833388f Fix operator==(QLatin1String, QLatin1String) and friends for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QLatin1String comparison operators work in that case.

Change-Id: I234ba851e67a6f5cfbb46fb6f0b22623ce40be28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-02 11:10:04 +01:00
Pekka Vuorela
71726ccf67 Renamed QInputPanel as QInputMethod
QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.

Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.

Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-02 11:10:04 +01:00
Kurt Korbatits
3ddfa8d0ea Fixed selftests unittest on windows
- Needed to add toLower() for compare as c:\ and C:\ was causing
  a failure.

Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-02 05:42:07 +01:00
Kurt Korbatits
5fa777de96 Fixed qfile unittest on windows
- Changed to set working directory based on subprogram
  stdinprocess's directory location.
- Changed QProcess execution of subprograms to use
  relative paths.

Change-Id: Idbccca635f0f61adba9721bcceeceb0a8a961dcf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 05:42:07 +01:00
Jason McDonald
ef25df9fec Add selftest for xpass in a data-driven test.
Change-Id: I9491d1e17ad31453ec353a11c9efb31522a16459
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 05:42:07 +01:00
Jason McDonald
4d1dcaef19 Improve readability of expectfail selftest.
Rename some of the test functions to improve consistency, and change the
order so that all the xfail tests are together (some new xpass tests
will be added later).

Change-Id: Ice1ac5bf61bc26109bb0d08f72eb74e1a0424101
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 05:42:07 +01:00
Jason McDonald
58c617c798 Add testlib selftest for counting of test results.
The test simply generates each possible pair of Pass, Fail and Skip
results.  At present the test simply serves to demonstrate the current
shortcomings of testlib's plain text logging, namely:

* If a test function passes for all data rows, that is counted as one
  pass, but each skipped or failed row counts as one skip or fail.

* Only skipped and failed rows are reported individually in the test
  output. Passed rows are not reported, so it is impossible to see how
  many rows were executed.

* A skip followed by a pass will be reported as an overall pass for the
  test function, but the same rows in reverse order will not report any
  overall result for the test function.

Future commits will attempt to correct these problems.

Task-number: QTBUG-22124
Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 05:42:07 +01:00
Kurt Korbatits
835c53490b Changed qtextbrowser unittest to work from install directory
- Changed qtextbrowser unittest to use TESTDATA and QFINDTESTDATA

Change-Id: I0ac7c990640d492d5ec94f5824c022a2b5075103
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 04:04:53 +01:00
Kurt Korbatits
c298c7b73b Changed qlabel unittest to work from install directory
- Changed qlabel unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Ide6755cd79caf91b553fb6b1412da6fbab583720
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-02 04:04:53 +01:00
Thorbjørn Lund Martsum
15f253a46a Introduce QItemDelegate::destroyEditor virtual invoked at editor close
This provides a stronger mechanism e.g when inheriting QItemDelegate.

It makes some things much easier e.g avoid delete of an editor
and maybe only delete depending on what the editor says itself.

This introduces a new virtual function.

Task-number: QTBUG-2299

Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-02 01:56:03 +01:00
Thorbjørn Lund Martsum
f0a8a4293a Extending the auto test for QHeaderView
This is a test that verifies correct behaviour of qheaderview.
It includes test of swapSections, moveSection, rowcount-change,
resizeSection, hideSection and position lookup.

Change-Id: Idc1fe8167f2d95dee5c5b1161cb633cbf9495d17
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-01 16:26:11 +01:00
Friedemann Kleint
b44e67e1ca Windows: Fix inclusion of <windows.h>
- Always use <qt_windows.h> as the last file to be included.
- Remove it from some headers, use Qt::HANDLE instead of HANDLE.
- Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE.
- Add NOMINMAX to qt_windows.h to avoid problems with the
  min/max macros.
- Remove <windows.h> from qplatformdefs.h (VS2005)

Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-01 11:06:19 +01:00
Kai Koehne
d394ca7f27 QtDebug: Include file, line, function information
Record the file, line, and function where a qDebug, qWarning, qCritical
or qFatal call happens, and make this information available in a custom
message handler.

The patch uses the C preprocessor to replace qDebug, qWarning, ... with
a line that also records the current file, line, and function. Custom
message handlers can access this information via a new QMessageLogContext
argument.

Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d
Reviewed-by: David Faure <faure@kde.org>
2012-02-01 02:16:32 +01:00
Thorbjørn Lund Martsum
96f1fe8855 QHeaderView - preventing negative section sizes.
This patch removes the posibility to call resizeSection
with negative sizes.

Sections with negative sizes affect the other sections,
and it does not seem to have a useful, well-defined semantic.

The length can also become negative - and visualIndexAt
work strange.

Change-Id: I632beb160649fa10e2106314557b8c5a106aa3cf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-01 02:16:08 +01:00
Stephen Kelly
a512e210ac Add the event loop quitlock feature to QtCore.
A feature of a ref-counted quit (managed by a quit-lock class)
is added to both QEventLoop and QCoreApplication.

This allows, for example, an event loop to quit() when there is
no more work for it to do.

quitOnLastWindowClosed is implemented in terms of the refcount in
QCoreApplication so that jobs can be completed before the
application quits.

Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-31 23:22:15 +01:00
Simon Hausmann
298330bd43 Add support for cleanup functions for data-constructed QImages
A QImage can be constructed with a provided buffer, that has to be
kept alive for the live-time of the QImage and all its copies.
Frameworks like CoreGraphics or Cairo offer a similar method of
creating image objects and also offer the ability to provide a callback
function that is called when the image is destroyed.

This patch adds this functionality to QImage by extending the
QImage constructors that take a raw image buffer pointer.

Change-Id: Ia6342408c560ef49b498c9e4664b4602febb0fcd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-31 16:21:17 +01:00
João Abecasis
2bf186a2e5 Allow function types to be registered without workarounds
Commit 4b8ceb41ae added the requirement
that pointed-to types need to be registered when registering pointer
types. Unfortunately, the implementation also affects function pointer
types.

This change whitelists 0, 1, 2 and 3 argument functions as not deriving
from QObject, forgoing the need to workaround details of the type
registration implementation when registering those function pointer
types.

Change-Id: I4d855e9d70a8179a6e31b84623ad5bf063e0d6d8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 16:17:55 +01:00
Lars Knoll
3855233dab Remove many deprecated methods
Remove methods that have been marked as deprecated
before Qt 4.6. Keep others, but inline them
where possible and mark them as QT_DEPRECATED_SINCE(5, 0).

Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-31 16:17:55 +01:00
Kai Koehne
ef63b7befd Mac: Fix compilation with -qtnamespace set
Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-31 16:17:55 +01:00