Commit Graph

204 Commits

Author SHA1 Message Date
Oswald Buddenhagen
ce66a61a71 mention that qt3support is gone
Change-Id: I08f01eef9d93876471d365ce09f5e1706e74312d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-18 17:28:35 +01:00
Oswald Buddenhagen
fd925d630f added changelog for linguist
Change-Id: Id4920837017de1496fa1a72581a3453e32dc93a2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-18 17:28:31 +01:00
Thiago Macieira
817bec7a23 Doc: Remove the mention of non-atomic convenience operators in QAtomic
For two reasons: 1) those operators are gone and 2) the ones that remain
are atomic.

Task-number: QTBUG-28532
Task-number: QTBUG-24627
Change-Id: I1e9d1b076d923546c1ee3d45f312066590f97416
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-12 01:17:19 +01:00
hjk
c7b6a3ccdf Remove references to pre-build examples from dist/README
We do not want to ship them anymore.

Change-Id: I62ac985cdf3f6d13327d1fd88262cc60efc4a230
Reviewed-by: Hanne Linaae <hanne.linaae@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-12-06 14:46:13 +01:00
David Faure
158f39ec78 Remove the TRUE and FALSE macros
They are completely unused in Qt, and are a potential source of
compilation errors in application code.

Change-Id: I6dfe2891f3b2365a30048f99c31e8e3a2425e62b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-06 12:49:02 +01:00
Sergio Ahumada
5ce64dd750 changes: Add a note about the copyright transfer from Nokia to Digia
Change-Id: I5dd888f4767bf579a96f676811b82d55c1398bf9
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-30 23:56:43 +01:00
J-P Nurmi
6dd9493028 changes-5.0.0: SC incompatible change - internalized QStyle subclasses
Change-Id: I06147f9774797c96efeaada7e0c134a769d28cdd
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-30 23:56:07 +01:00
Olivier Goffart
ef71d4ffcd Add few missing entries to the changelog related to QObject and moc
Change-Id: I96fa72f1a0669f0899e8079b214cac54e5d6edef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-30 18:43:18 +01:00
Samuel Rødal
6385a182f0 Added explicit threading API to QtOpenGL.
Since QtOpenGL/QGLContext is implemented in terms of
QtGui/QOpenGLContext which has stricter requirements about how it's
supposed to be used, we need to apply these requirements to QGLContext
as well.

This change adds QGLContext::moveToThread(QThread *) and documents it as
a necessity for making a context current on another thread.

Also introduces QGLPixelbuffer::context() to access the QGLContext of a
pixelbuffer, and made QGLWidget::context() return a non-const
QGLContext, since there's no good reason why it shouldn't, and it leads
to less const_cast clutter.

We could have introduced a backdoor in QOpenGLContext instead, making it
loosen its requirements, but that would have made it harder / impossible
to fully support threaded OpenGL in all the platforms.

Task-number: QTBUG-22560
Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 18:28:04 +01:00
David Faure
eca4936ea2 Move session management code from QApplication to QGuiApplication.
QSessionManager was already in QtGui, but not usable since the only API
to get to it was still in QtWidgets. Session management isn't related
to widgets, it also applies to QML apps on the desktop.

The virtual commitData and saveState methods have been removed,
given the two signals which exist since 4.2, and an additional
isSessionSaving() method was added instead.

Change-Id: I8099e70df133303e74456706827da21f013fcc6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 16:21:57 +01:00
Konstantin Ritt
dec4eb7ecc [SIC] QLocale: Update some language names with their modern values
Some of them were incorrectly spelled (for a while)

Change-Id: I871968e3bbdd2172f4c4dfb6e74729c05e7e8e01
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-24 06:15:25 +01:00
J-P Nurmi
553e216d89 Remove QApplication::type() and make QCoreApplication::Type internal
These Qt3 legacy application types do not match the application types
available in Qt5. Thus, the decision was to kill the confusing and
mostly useless type enum. Use for example qobject_cast instead to find
out the application type.

Task-number: QTBUG-28093
Change-Id: Ia8cf7c3ea98a3cea27f74760d62e519ea10bce9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-23 20:40:02 +01:00
Samuel Rødal
cc736c6858 Get rid of deprecated functionality in QtOpenGL.
We will in any case not be able to support this in Qt 5, so best to just
remove it to not give any false impressions.

Change-Id: Ib52e86007b9e6483bd973f13502b078792a9fa40
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-22 22:58:10 +01:00
Konstantin Ritt
3791d21f72 Update Qlocale data up to CLDR 22.1
Change-Id: Ie6ddfec14cb052e0b89230dc93290ff79488fb25
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 18:23:59 +01:00
John Layt
d48d83a1ac SIC QPrintSupport: Remove unused PPK_SuppressSystemPrintStatus
Print Engine key PPK_SuppressSystemPrintStatus was added in Qt4.1
for Cocoa dialog to suppress the progress dialog.  In Qt5 all cocoa
code has been removed and this key is now unused.

Change-Id: I3a91e9651e16f81611a9a736163f76acf9f20096
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-21 11:03:48 +01:00
Konstantin Ritt
ea82707e96 QTBF: Remove StartOfItem/EndOfItem enum values
Since the behavior of boundaryReasons() method has been changed a lot,
remove the StartWord/EndWord enum values to force the affected code be revised;
StartOfItem/EndOfItem must be used instead.

Change-Id: I3d1d97d2dbe9680d290646d8c3adb5558ca26bd7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-09 22:39:56 +01:00
Sergio Ahumada
0d2997862b Update dist/README file
Task-number: QTBUG-26063
Change-Id: Ic9ebc02e352b7f0c4352be8b7de44c917135730f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-07 19:32:19 +01:00
Jan Arve Saether
c360fbcd6c Do the actual removal of the Soft Keys API and related code
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
  Qt::WA_MergeSoftkeys
  Qt::WA_MergeSoftkeysRecursively

It also removes some "zombie" enums:
  Qt::WindowSoftkeysVisibleHint = 0x40000000,
  Qt::WindowSoftkeysRespondHint = 0x80000000,

  (The only implementation that used these were removed when
  qapplication_s60.cpp and qwidget_s60.cpp were removed.)

Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-29 20:27:27 +01:00
Mark Brand
2a806f8522 mention QComboBox::currentText changes in change list
Change-Id: Iaea8b8e7d86c29902d9c0d6a38058cea40f1c0b7
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-27 12:20:52 +02:00
Thorbjørn Lund Martsum
4fbdb969fb QHeaderView 5.0 - no emit of sortIndicatorChanged when unchanged
There is no reason to emit this when there is no change.

Change-Id: I34f0ceec7c4b0959b77bc5be3ce2c2ad55864598
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:23:46 +02:00
Thorbjørn Lund Martsum
67cabd464d Qt 5.0 - Add QHeaderView refactor to changes notes.
Some widgets users could get the picture that nothing has
happened in that area. So lets at least write that something
has been improved.

Change-Id: Ic314ab06d28e687986a8ab472d8b58830cb0ad90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:23:39 +02:00
Mark Brand
e370306530 mention slotification of select()/selectRow() in changes
This change does not affect source code compatibility. Therefore
it is mentioned in the general section.

Change-Id: I81ea30d18b01de69322d9527d0c2775b37d1d196
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-24 02:29:08 +02:00
Jens Bache-Wiig
087e4bc517 Remove Cleanlooks and Plastique
We have a new style Fusion that will replace these styles.
They will be moved to a separate
module rather than included in platforms that do not need them.

Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-22 19:36:43 +02:00
Samuel Rødal
b213d5bfa3 Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.

The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.

Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-22 19:36:43 +02:00
Sze Howe Koh
d7e8b57d0a Remove the QThread::terminated() signal
The signal is removed from the API; all references to it are removed
from documentation; the unit test that checks for its emission is
modified to listen for QThread::finished() instead.

The QThreadPrivate::terminated flag is also removed, as it served no
purpose other than to trigger the emission of QThread::terminated()

As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html
the signal is not guaranteed to be emitted after every termination,
rendering it useless.

Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-19 20:25:16 +02:00
Jason Barron
a61788d139 Change the default major version of QGLFormat to 2.
This is being changed because:
- The OpenGL paint engine in Qt only supports GL2
- QML2 only supports GL2
- QSurfaceFormat has a default value of 2

Applications that want to use GL1 on a QGLWidget will have to
explicitly request this format using QGLFormat::setVersion.

Task-number: QTBUG-27589

Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-19 02:43:05 +02:00
Samuel Rødal
7b8e10ddd0 Fixed inconsistent QPainter fill rules for aliased painting.
Qt 5 is the time to get rid of all the old inconsistencies in the raster
paint engine caused by trying to preserve the old X11 based
coordinate system where (0, 0) is in the center of the top-left pixel
instead of the upper left corner of said pixel. However, this was only
adhered for line drawing and path / rect filling, and not for image or
pixmap drawing and not at all when doing antialiased painting. By
defining the antialiased coordinate system as being the right one and
letting the aliased fill rules follow from that we finally end up with
some consistent behavior that doesn't lead to surprises and workarounds
in application code.

It is still possible for applications to get the old behavior by
setting the QPainter::Qt4CompatiblePainting render hint. This should
make porting easier for the few cases where an application relies on the
aliased fill rules we used to have in Qt 4.

Task-number: QTBUG-27500
Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 02:43:05 +02:00
Konstantin Ritt
da7111be51 QTextBoundaryFinder: Fix handling of break opportunities
Add BoundaryReason::BreakOpportunity flag that will be returned by the
boundaryReasons() when the boundary finder is at the break opportunity
position that might be not an item boundary.
This is the same as (StartWord || EndWord) in Grapheme and Sentence modes;
in Word and Line modes, BreakOpportunity flag might occur between the words
or in between of Line boundaries (e.g. in conjunction with SoftHyphen flag).
In other words, the text boundaries are always break opportunities, but not vice versa.

StartWord and EndWord flags has been deprecated by new StartOfItem and EndOfItem
flags which are not about the word boundaries only. In line breaking,
StartOfItem and EndOfItem are set for the mandatory breaks only.

Change-Id: I79bf297e2b988f5976f30cff0c8ca616385f6552
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-12 07:44:51 +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
Stephen Kelly
43325a23f3 Delete the QVariant ctors taking global Qt enum values.
They have unexpected results in Qt 5 (the Qt::GlobalColor one works
as expected in Qt 4, but was removed in Qt 5):

 QVariant v = QVariant(Qt::red);
 qDebug() << v; // QVariant(int, 7)
 v = Qt::red;
 qDebug() << v; // QVariant(int, 7)

The correct way is to use:

 QVariant v = QVariant::fromValue(QColor(Qt::red));

The deleted constructors are the ones for which there is a class
with an implicit constructor taking the enum, and that class is
a built-in metatype.

QLocale::Language and QKeySequence::StandardKey would also fit
the description, but I can't include the header for QKeySequence
as it is in QtGui, and I don't want to include the qlocale header
in qvariant.h. Putting a QLocale::Language is probably very
uncommon anyway.

The QTextFormat test is doing the wrong thing, but the result isn't
being tested. Added new tests which fail before the patch.

Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-10 08:45:22 +02:00
Konstantin Ritt
2672c4fa91 Update the Unicode Data and Algorithms up to Unicode 6.2
Version 6.2 of the Unicode Standard is a special release
dedicated to the early publication of the newly encoded Turkish lira sign.
In addition, there are some significant changes to the Unicode algorithms
for text segmentation and line breaking to improve breaking for emoji symbols.

For more details, see http://www.unicode.org/versions/Unicode6.2.0/

Change-Id: I21cfd4f307e41b41a19d36cce87f7a44c2661bc2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-09 03:04:41 +02:00
Marc Mutz
ac9be327f8 QFlags: use unsigned int when the enum's underlying is unsigned
Replace storage and operator int() return types with unsigned int
if the enum is unsigned.

This fixes a number of exisiting warnings, in particular with
Qt::MouseButton under GCC.

Change-Id: Ia12d36212329aec3e9d62a5fbd38809a6c2b36d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
3a29976eac Move QtConcurrent::Exception as QException back to QtCore
Leave the old name as a deprecated typedef; adapt users.

This is a prerequisite for moving QFuture back to QtCore.

Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Samuel Rødal
ccf0669da9 Added QGLPixelBuffer implementation using framebuffer objects.
Instead of having QGLPixelBuffer be a unusable stub implementation we
deprecate it and implement it in terms of QOpenGLFramebufferObject.
Framebuffer objects are anyway the recommended replacement for
pixelbuffers in modern OpenGL, as the context switching overhead is
avoided.

Change-Id: Ia220c358ee92813e87981d297c51d84525010322
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-27 18:35:55 +02:00
Marc Mutz
0842d32441 QFileSystemModel: fix permission mangling
The old code masked out write flags before returning permissions
from permissions() or data(FilePermissions) in order to force
QFileDialog to disable the rename and delete actions. This was to
fix Task 143519, but introduced QTBUG-20503.

Instead, revert to the pre-143519-bugfix code and do the necessary
check in QFileDialog directly.

Also add a testcase for 143519.

Reported-by: Gilles Pascual
Task-number: QTBUG-20503
Task-number: 143519

Change-Id: I140109341c0ed40722e3aac4327c2a740fb014c2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-09-26 04:03:41 +02:00
Marc Mutz
e44f1dabe4 QTestLib: clean up qCompare specialisation/overload mix
qCompare() was both overloaded and specialised, but always as a template.
This lead to the QIcon specialisation actually invoking
   qCompare(QFlags<void*>, ...)
when specifically asking for qCompare<void*>() (detected by adding
underlying-type detection to QFlags).

Fix by preferring overloading and not specialising anything.

Change-Id: Ie001ebb9dfb0847c6c33a3f45177a61579fd61ee
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-23 23:29:42 +02:00
Marc Mutz
15953e9503 QModelIndex: clean up integer size confusion in the API
QAIM::createIndex() took either int or quint32, but QMI::internalId()
returned qint64.

In the new interface, createIndex() takes, and internalId() provides,
integers of type quintptr.

This matches the storage size of the void* in the model index and
avoids truncation.

Remove the
  createIndex(int, int, quint32) and
  \obsolete createIndex(int,int,int)
overloads.

This makes a literal 0 in the third parameter ambiguous now.
The solutions have been noted in changes-5.0.0.

Change-Id: I0a0ecd8430eaf695129a4d09d14d4e30745485c4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-22 20:45:12 +02:00
John Layt
54b899f448 SIC: QtPrintSupport - Remove QAbstractPageSetupDialog
QAbstractPageSetupDialog is a completely unnecessary base class that
is not really abstract and is used nowhere else.  This changes merges
its methods into the QPageSetupDialog main class.

While technically SIC no-one else uses this so no apps should be
affected.

Change-Id: I59b1739f1c453c34c25d1664d5d042e7918db316
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-17 22:08:16 +02:00
Kai Koehne
4f4fc20d2d Mention logging related changes in changes-5.0.0 file
Change-Id: I6798a2b09fb0f832c32bac325fa0bcf40dbb854e
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-08 01:43:57 +02:00
J-P Nurmi
dd299a568b QStyle: make standardIcon() & layoutSpacing() virtual
Removes standardIconImplementation() and layoutSpacingImplementation()
that were added in Qt 4 as a workaround for binary compatibility reasons.

Change-Id: I45292dc6802310d6cda4f443bb7484b061af0138
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-31 18:56:35 +02:00
Marc Mutz
ca7be5c154 dist/changes-5.0.0: note that QtConcurrent is a separate library these days
Change-Id: Ib8ab6e40d9827697d1061a1b369e150f33d63be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:29:02 +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
96d5c28a11 Make QAbstractItemModel::sibling virtual.
This would allow implementations to create an optimized way to create
sibling indexes.

A typical pattern of QAIM implementation is to use the same internalPointer
for each row of a subtable of a model (such that the internalPointer is
related to the common parent of each set of rows) and differentiate on the
row value in the QModelIndex. Alternatively, it is also common to have the
internalPointer correspond directly to the row value for the QModelIndex.

In both cases it is possible for the implementation to optimally create a
sibling QModelIndex in the same column as a known row. Provide a virtual
method for them to do so.

Change-Id: I3b076abcd5f6087a4cb108fbc6dceeef15529987
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-23 15:54:02 +02:00
David Faure
9bb8035603 Document QTranslator::translate SIC (91d2ee5e09)
Detected by a unittest failure in KDE, due to the KDETranslator subclass
not being called anymore.

Change-Id: I0171117a677e2d58aba2f76bc27f7f1f7a521cc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-21 06:48:50 +02:00
Stephen Kelly
fe0a6e57a0 Remove QProxyModel from qtbase.
A copy is placed in uihelpers for anyone who might be using it.

Change-Id: I175f7bc5dcbf25a910d28bfd8985579866392938
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-20 21:10:01 +02:00
Stephen Kelly
f6c58d242a Add a changes file entry for QMetaType QObject related change.
Change-Id: I2f902ffe6b18034047114626dd4cbe9d2f96c2fc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 10:55:47 +02:00
Stephen Kelly
4d9d88af6f Remove QWidgetStar.
This allows us to remove the odd hacks to get the static metaobject
for the QWidget* metatype.

The QWidget* is still an automatic metatype thanks to the QObject
partial template specialization. It is registered as a metatype
at runtime automatically in qwidgetsvariant.cpp.

Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 10:55:47 +02:00
Kent Hansen
06f4f11419 Add some more of my 5.0.0 changes
Change-Id: I606a11cb11d1559476eab6532db22f4bc81fed90
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-08-14 12:49:37 +02:00
Stephen Kelly
c5d7ea5bad Only emit the clicked() signal from views if the left button is used.
This is consistent with QAbstractButton, QCalendarWidget,
QDialogButtonBox and QGroupBox (ie, all other widgets with
a clicked signal)

Task-number: QTBUG-26105

Change-Id: Ieafe988b5c03216796b69a7cd70ac1a03fc12b0a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 16:40:07 +02:00
Kent Hansen
9a0b7348b3 Make QSignalSpy copy QVariant parameters directly
Previously, a QVariant parameter would be wrapped inside a new
QVariant, and you would have to cast the QSignalSpy's QVariant to
a QVariant to get the actual value. This behavior was unintuitive
and undocumented.

Check if the parameter type is QVariant, and copy it directly if it
is. This makes the QSignalSpy's QVariant directly usable (no need to
"unwrap" the value in user code).

Existing tests that use QSignalSpy together with QVariant parameters
(such as tst_QPropertyAnimation::valueChanged()) and do cast the
QVariant parameter to a QVariant, continue to work after this change;
this is because qvariant_cast<QVariant>() returns its input value
(unchanged) when the type is not QMetaType::QVariant.

Task-number: QTBUG-21645
Change-Id: Ibfb171edd60c0d3f7ca1d5419e5c5f3d0380d5b3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-07 11:15:55 +02:00