Commit Graph

2772 Commits

Author SHA1 Message Date
Tor Arne Vestbø
36a590c90d Don't compile UIC with -O2 inside Scratchbox
It makes QEMU crash when running the resulting binary.

Change-Id: I94e5d703205827dea88770336a8c5201e7333486
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-01-31 21:48:23 +01:00
jian liang
4ab6860172 add virtual destructor to QWindowSystemInterfacePrivate::WindowSystemEvent
Add a virtual destructor to
QWindowSystemInterfacePrivate::WindowSystemEvent class. Otherwise, in
QWindowSystemInterface::sendWindowSystemEvents() "delete event" can't
destruct the subclass of WindowSystemEvent properly.

Change-Id: Ic708f4ab61de88cd0015aa6e472d356b2de64583
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 21:48:23 +01:00
Thorbjørn Lund Martsum
a5201007f2 QHeaderView - fix to resizeSection patch (Ia812a747)
A minor simple adjustment to the update-patch for resizeSection.
( http://codereview.qt-project.org/#change,11267 )

We can't just return and ignore that we might needed to call
d->doDelayedResizeSections

Just because the header does not have updates enabled does not
mean that the view hasn't updates enabled - and even in
that situation we actually still wanted to keep this.

(It is only if the parent is not visible we safe can/should
skip this - but I will look into that later)

Change-Id: I771de086a07d1e7612a6bfea132d4d15f277ceb3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 20:01:10 +01:00
Thorbjørn Lund Martsum
c47b028749 QHeaderView::setOffsetToSectionPosition documentation update
The documentation has used the word visualIndex for the argument
to this function. That is however very misleading since this
visualIndex is not the same as 'visualIndex' as we have in

visualIndex(int logicalIndex)
logicalIndex(int visualIndex)
or visualIndexAt(int position)

Beside the above a variable name has also been changed from
visualIndex to actualVisualIndex.

Change-Id: I43808adfd7c287a349474ab1e2656c417c8cf3e9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 20:01:06 +01:00
Jonas M. Gastal
c22be73168 QDir::NoDotAndDotDot is now QDir::NoDot|QDir::NoDotDot.
Change-Id: I8ef7782258c2ec02ad2ec2a5d5cab90f53c62aa3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 20:01:02 +01:00
Simon Hausmann
fe7265a0bb Maliit: Fix enter on VKB not resulting in text input field acceptance
Pressing enter on the VKB should result in the emission of the accepted()
for text input fields in QML or the returnPressed() signal in QLineEdit.
In that case the Maliit input server calls our keyEvent method over DBus,
which this patch implements.

Change-Id: I46170c30315adaf21db0e232f53780ccaa67e4bf
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2012-01-31 19:57:33 +01:00
Jan Arne Petersen
b27bf9bb94 Rename meego to maliit platforminputcontext
Also build the plugin on linux systems with D-Bus. There is nothing
MeeGo or Maemo specific about this plugin or Maliit.

Task-number: QTBUG-22994
Change-Id: Idcccfb01f79166a54c5809741389b29ccac05a15
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-01-31 19:57:12 +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
Joerg Bornemann
9a4d30d999 MinGW build fixes for QWindowsPipeReader and friends
Change-Id: Ie4d6017c6fb918e7796d1a5e8863e9368e4e1894
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-31 16:17:55 +01:00
Kai Koehne
20beb5ff53 Windows: Fix compilation with -qtnamespace
Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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
Rafael Roquetto
eb60e93d34 mkdtemp() support for QNX platform
Change-Id: I30feebbbcdbe065e899a048da20ac887d4d48a4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2012-01-31 16:17:55 +01:00
aavit
4fce5d1795 Moving tiff image format support and libtiff out of qtbase
The tiff plugin and bundled libtiff is moving to the qtimageformats
project on Gerrit.

Task-number: QTBUG-23887
Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 14:31:04 +01:00
Frederik Gladhorn
bf9bdf5328 Use events for accessibility updates.
The problem with the old updates is that it was impossible
to send details about the update.
For the Linux implementation to work properly with AT-SPI I need to know
which state changed (currently I only get a generic "state changed" event)
or which part of the text was changed for long texts (imagine a word processor sending updates).

This also gives us more options when updating with events generated from not QObject based objects.

Change-Id: If0b6c83c523092565eb48e79f3f6de5a1b905ea8
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-31 12:02:33 +01:00
Chris Adams
cf52c268b0 Add public role names setter to QStandardItemModel
This allows QStandardItemModel to be usable in QML without requiring
clients to subclass it.

Task-number: QTBUG-15067
Change-Id: I867fcd8137132affdf21f37a9fa293e855a09a13
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 12:00:31 +01:00
Jonas M. Gastal
0e4fac3fbd Removing bad ###Qt5 note.
Implementating this would cause massive SC breakage and give little
gain.

Change-Id: I56a6d302fdd0e8b53d1f9154f3eaf9e1ee429f9d
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-31 11:43:40 +01:00
Xizhi Zhu
d1a2b53aaf Remove Symbian specific code from QtGui.
Change-Id: I450a78863462936d0b18e211763f274b59497109
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 07:08:20 +01:00
Anselmo L. S. Melo
8839a0a001 Fix QGuiApplication::topLevelWindows(), introducing allWindows()
As discussed on the development mailing list, the window list returned
by QGuiApplication::topLevellWindows() included all QWindows, even the
non top-level ones.
This commit introduces the new method allWindows(), which returns the list
of all QWindows, fixes the list returned by topLevelWindows() and also
introduces tests for both methods.

Change-Id: I761f0fcdec79f83949012c628655ed12cd18572c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 07:05:09 +01:00
Xizhi Zhu
e8105e4783 Remove Symbian and Maemo 5 code from QtWidgets.
Change-Id: I715c0ec70cbad05a6ba9737e49be9da7cbd65bf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 07:05:00 +01:00
John Layt
0436281771 QValidator: Don't fallback to C Locale when validating input
QIntValidator and QDoubleValidator used to accept C formatted input if
the input wasn't valid in the default locale.  This change removes this,
only the default locale is now used.

Change-Id: I8b2d8f9f3849abe3fcb5c12083aae542a76eaf90
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-31 07:02:11 +01:00
jian liang
9c1f3bce4d fix memory leak in QGuiApplicationPrivate
delete app_font object in QGuiApplicationPrivate's destructor

Change-Id: Iad0c5a69e03477f6c93fcf76c58bac001cbdffb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-31 04:56:17 +01:00
Lars Knoll
0f48d1a523 Remove QIconEngineV2 and fold it into QIconEngine
Change-Id: Ife590b7639f4aadcfbd4d77ca170285b623c14ae
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-31 04:56:14 +01:00
Uli Schlachter
9464458098 xcb: Check for SHM extension before using it
If we call any xcb_shm_*() function, libxcb will have to figure out
SHM's major number. However, if that fails because the SHM extension is
not available, xcb will disconnect from the server. Obviously, that's
not what we want and must be avoided.

Change-Id: I8eba5ff9e84e0e2017a5c0d88fda4efd0459bd1e
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 04:56:04 +01:00
Uli Schlachter
98d34beb03 xcb: Check for SYNC extension before using it
If we call any xcb_sync_*() function, libxcb will have to figure out
SYNC's major number. However, if that fails because the SYNC extension
is not available, xcb will disconnect from the server. Obviously,
that's not what we want and must be avoided.

Change-Id: I9a1032e1cfac074a52bafcb0772304bfd423e770
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 04:55:50 +01:00
Lars Knoll
7aac54d67f Remove non existant features from qfeature.h
This doesn't clean it all up, but at least removes
things that are clearly gone from Qt. We still
have way too many individual feature switches.

Change-Id: I7926ee8cf72567a86257f1e7b0d852f11ff5f4bb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 04:55:33 +01:00
Kurt Korbatits
0790756c93 Changed debug output to option in qminimalbackingstore.
- Added QT_DEBUG_BACKINGSTORE environment variable to enable
  debug output. Defaulting to no output if not set.

Change-Id: Id9c369031f946d77605321c8b28ab3378da8fbf9
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-31 04:55:05 +01:00
Robin Burchell
e24021691f Revert "Revert "Blow up earlier when adding test rows without columns.""
The problem in qmltest has now been fixed by adding a dummy column, so this
should be good to re-add. See qtdeclarative change id
I1bfed663fa7b58d71e0cf898db6bd8ae61dae46b.

This reverts commit 963958b4f62513cbc76fb06920de80f7f906f523.

Task-number: QTBUG-23845
Change-Id: I4b6755d3ea97a4624480cc008d280fc8e33743a6
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-01-31 04:55:02 +01:00
Holger Hans Peter Freyther
8f6ee81ee9 directfb: Use QPlatformPixmap::fromFile for Qt resources
Move to fromFile to load Qt resources for two reasons. The
first is that ::fromData creates a QBuffer on our raw data
and is passing that to the QImageReaders. Right now we there
is a QFile -> QByteArray -> QBuffer transition that wastes
cycles. The other reason is that QPlatformPixmap::fromData
did/does not check if the decoded image is null and might
cause a crash because of that.

Change-Id: I7cb92d84874323e7205ab28883cc0fe9ecca1e27
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-31 04:55:00 +01:00
Jason McDonald
e03386945f Update contact address in license headers.
Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-31 04:54:56 +01:00
John Layt
0e62fc73c9 QDateTime: Add validity checks
Check the validity of date/time before attempting to perform maths.

Change-Id: Ia6a2caf07c6c36f7d7fac713a77bc4eb456c6ed6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-31 04:18:37 +01:00
John Layt
35b96c0d3d QDateTime: Deprecate setYMD()
Change-Id: I077332df554fb750666d51486c97724411276679
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 04:02:25 +01:00
Lars Knoll
21b5d0e2c3 Fix bugs when using a non 0 terminated QLatin1String
A few methods in QString still assumed that QLatin1String
is always 0 terminated. Change this to rely on the size
provided by QLatin1String instead.

Change-Id: I9145a46e52ed8811f3b4e3d72d8a81a12588760a
Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-30 23:27:35 +01:00
Shane Kearns
f605e269dd Fix debug format string in windows socket engine
%l has no meaning, should be %li according to the arguments.

Change-Id: Ife9ec524109e021ad723865445e80b6bad51a5c6
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-30 20:18:53 +01:00
Shane Kearns
064a2316b0 Fix crashing debug message
The debug message could derefence a null pointer, this crashed when
running ssl autotests

Change-Id: I176aaa9f3cf3c6cc1512cdc34db06d4c79f92e73
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-30 20:18:44 +01:00
Lars Knoll
a4ab8d0bbc Add a null pointer check to QJsonObject::toVariantMap
If the object is null, simply return an empty variant map.
Added another test case checking conversion from QJsonArray
to a QVariantList.

Change-Id: Ieccd163e76630f7db7f41255acd9d1baf66bb38d
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
2012-01-30 18:49:27 +01:00
Xizhi Zhu
d3fdc132fe Remove Symbian specific code from QtCore.
Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-30 16:50:21 +01:00
Xizhi Zhu
0c29259fd7 Remove Symbian specific code in platformsupport.
Change-Id: I5f06f80ae47b2c9fcd93832c23a453a9193e6120
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-30 16:49:58 +01:00
Xizhi Zhu
105420936c Remove reference to Symbian in printsupport.
Change-Id: I63b3559cd9ec620d76a177f57096dd8d38ef834c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-30 16:49:46 +01:00
Xizhi Zhu
ad2930f825 Remove Symbian code from tools.
Change-Id: Id9d7b2b4f6bc8b558f92bc09b7956c49e5a3752a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-30 16:49:36 +01:00
Kent Hansen
283140742a Remove type id/name conversion for QVariant::UserType
QVariant::UserType does not correspond to an actual type named
"UserType". This logic didn't make sense.

Change-Id: I369911e514f7902fc863cb05174011d6fc15c447
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-30 16:40:19 +01:00
Jason McDonald
4c63838039 Remove pass/fail/skip count getters from QTestResult.
These functions are no longer used, as the counters have been moved to
QTestLog.

Change-Id: I7cd13fc92a18920706fcc712804c304f9c333969
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 16:40:14 +01:00
Jason McDonald
0d00841c5f Avoid non-standard indentation of license headers.
The strange indentation has made maintenance of license headers
difficult on several occasions.

Change-Id: Ib29a7e5275e2c7a2c13a3f32fd2479f34d3353ca
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 16:40:10 +01:00
Friedemann Kleint
870f19f44b Add native event filters to Windows, forward to Widgets.
Use prototypically for qwizard_win.cpp.

Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-30 16:40:02 +01:00
Richard Moore
b3a978d661 Make the pause modes a QFlags.
The intention is to add additional pause modes over time, this will
be easier if we can just test if a particular reason for pausing is
turned on. If we don't do this we'll end up having to check for each
enum value every time we check what is enabled.

Change-Id: I6b08f0e819b5593e3f6463c3dd175eff8625e155
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-30 16:39:56 +01:00
Jeremy Lainé
e54dc7c2b5 Add support for DNS lookups using native APIs
The QDnsLookup class provides asynchronous APIs for performing
DNS lookups. For now, the following lookups are supported:
- A and AAAA
- CNAME as defined per RFC 1035
- MX as defined per RFC 1035
- NS as defined per RFC 1035
- PTR as defined per RFC 1035
- SRV as defined per RFC 2782
- TXT as defined per RFC 1035

Task-number: QTBUG-10481
Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-30 16:39:46 +01:00
Stephen Kelly
d9468a9752 Change the type key for delegate editors to int.
Previous type of QVariant::Type does not allow for custom types.

While technically source incompatible I found no re-implementation
of this class in qttools or qt-creator (most likely to use it for
property editors). The virtual methods are not needed because
registerEditor is all the API that is really needed.

Task-number: QTBUG-1065

Change-Id: I2a9c578c444a80359416f2224a0ee03903bfe779
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-30 16:25:09 +01:00
Stephen Kelly
be1867b6c4 Add the QAbstractItemModel::canDropMimeData method.
Can be used by views to indicate whether a drop is allowed (eg
adequete permissions in a filesystem model).

Change-Id: Iefedb5399e44c8edc5f5df1403c8d5c0da618612
Reviewed-by: Peter Penz <peter.penz19@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-30 16:24:57 +01:00
Gunnar Sletta
3fe3d1dfdd Don't crash when source or target is null
Change-Id: I4992867ad764bd1bd175478c6be1094ca8a72812
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-30 14:43:27 +01:00