Commit Graph

4293 Commits

Author SHA1 Message Date
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
Lars Knoll
cf20c06756 QDirectPainter is gone in Qt5
Change-Id: I3ba8985c9c38be978198a4abd58775aa6f525968
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-01-31 11:58:03 +01:00
Andreas Hartmetz
ea2c9f764f Escape path names in qmake-generated Makefiles.
qmake-generated Makefiles since 4.6 (according to bug report) contain
recursive qmake invocations with absolute paths to .pro files, where the
absolute paths are not escaped.

Task-number: QTBUG-11776
Change-Id: I49772c7d9147efea3bb7b9623c61d92aa0bb6857
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-31 11:47:11 +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
ba9302b8a9 Remove Symbian specific code from qtbase.
Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 07:08:31 +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
Kai Koehne
0fdb881987 Windows: Fix autotests with -qtnamespace
Change-Id: If367429dafc283b3b2d57dab593060055f65659d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-31 04:56:06 +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
Mark Brand
6466314625 tst_qabstractitemmodel does not need QT += widgets
Change-Id: I6f615f849f77df19129efb82acaae387b17a787b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 04:55:47 +01:00
Kurt Korbatits
c8f88e6292 Changed qapplication unittest to work from installation directory
- Changed to use TESTDATA and installTestHelperApp()
- Changed to use QFINDTESTDATA instead of currentPath()

Change-Id: Ia24ebc758d5d0fdfcca951500766adefbcf9fe93
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-01-31 04:55:38 +01:00
Kurt Korbatits
4ca298f42b Changed qlibrary unittest to use applicationDirPath()
- Changed unittest to use QCoreApplication::applicationDirPath()
  instead of QDir::currentPath().

Change-Id: I398f7ea8b4426be85432d0eb3767ef6d59488d0a
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-01-31 04:55:35 +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
Kurt Korbatits
c0dd519f88 Fixed qstandardpaths unittest to check before using first()
- Added check to testLocateAll() to check count() before calling
  first().

Change-Id: I04e93c1f913972b26c517f2bbd08760f9898cc7a
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-01-31 04:24:04 +01:00
Kurt Korbatits
3f36f9b650 Changed qsplitter unittest to work from install directory
- Changed qsplitter unittest to use TESTDATA and QFINDTESTDATA

Change-Id: I5db0fbfb20e6bd0ec169e884f16c1ec819f4e449
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-01-31 04:23:31 +01:00
Kurt Korbatits
341161c26e Fixed qicon unittest to use QFINDTESTDATA
- Two cases of image.png not being found when run from install directory

Change-Id: I5f20b7a0ea0b120ce06c556b83bc20dd658a4f83
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-01-31 04:23:29 +01:00
Kurt Korbatits
a0cc33e35b Fixed qmovie unittest to use QFINDTESTDATA in jumpToFrame()
- jumpToFrame() updated to use QFINDTESTDATA

Change-Id: I1b5ff92722e389e714eb58b37996f3e933e95489
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-01-31 04:23:26 +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
08b5eb579f QDateTime: Add missing QDate Unit Tests
Change-Id: Idcc93cdc29739f0108b5629402b6b7a4b2c86657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-31 04:18:34 +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
Shane Kearns
e889d61380 Fix tst_QSslCertificate::toText on windows
Open the comparison file as text mode, so that it does not differ from
the dumped certificate in CRLF vs LF line endings.

Change-Id: I54d6ea6e37044059e89e762435657ebf5fa6cb39
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-30 20:18:37 +01:00
Shane Kearns
911ab74161 Fix link error in QSslSocket auto test
This has been broken for months, but invisible because the code causing
the link error is unreachable (due to QSKIP). So the link error only
occurs in debug builds with -O0.

Change-Id: I6093a7803bedf37bfc8c2d9ff0b28b2309b57959
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-30 20:18:28 +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
Lars Knoll
34e8dd5d6f Add the missing test file and give it a proper name.
Change-Id: Icb9bc2aab99d52b5ffbd6153ce94d64a494330d8
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-30 18:48:28 +01:00