Commit Graph

168 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
Thorbjørn Lund Martsum
125016ad24 QHeaderView - length returns wrong value fix
setSectionHidden called with (logindex, true) will
sometimes prevent a (correct) call to
resizeSection(logicalIndex, 0).
This seems a bit odd - however it does execute
d->doDelayedResizeSections().
Therefore the section is going to be hidden later.

However it is a problem that the length meanwhile is wrong.
(That is a value that is not the sum of the sections)

This is fixed by execute updates before returning the
length.

Task-number: QTBUG-14242

Change-Id: Ia1d2f6db3213792b250a6a37942b56554261cd3a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-30 06:29:42 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Pekka Vuorela
1166ad8603 QWidgets to use QGuiApplication focus object change notifications
Moving away from deprecated QInputPanel inputItem.

Small behavioral changes:
- On focus proxy widgets, disabling WA_InputMethodEnabled on
proxy will no longer disable input method for proxy target.
- setEnabled(false) on proxy widget will no longer disable
input method for target as a special case.

Change-Id: Ifb5b7144d29bd3aefdde7cf4a0bd396db06e67e2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-27 13:28:03 +01:00
Jędrzej Nowacki
389fc8885b Fix a typo in tst_qtreewidget autotest.
Change-Id: I573467c3fdfc4b3d059b216258d39944ac546061
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-26 17:22:03 +01:00
Andrew den Exter
4dae8c1aff Remove QTextControl and QLineControl.
QtWidgets and QtDeclarative now both have their own versions of these
so there's no need to keep them around any longer.

Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 22:35:12 +01:00
Andrew den Exter
c0d30db45c Add a changed() signal to QValidator.
This provides a general notification of changes that may change the
validity of previously validated input.

Change-Id: I5ec6f127af60fdca68605fee903a08758bc01360
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 00:58:12 +01:00
Bradley T. Hughes
1831abb5bb Remove QEventLoop::DeferredDeletion
This flag has been deprecated since Qt 4.4, so remove it.
tst_QApplication had 2 nearly identical tests, one for testing the
QEventLoop::DeferredDeletion flag, and one to test sendPostedEvents()
with QEvent::DeferredDelete. The latter is the preferred way, so keep
that test, but remove the test for the obsoleted flag.

Change-Id: Icdb7483c32b3c920bda31d2bbb4f7414ece6d826
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
1196b70cf2 Ignore known tst_QStyleSheetStyle failures on Mac OS X
Task-number: QTBUG-23686
Change-Id: I566f3b3491576325389862bac2ad7c8526dd930b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
36493a7a41 Ignore tst_QStyleSheetStyle::hoverColors() failures on Mac OS X
Qt::WA_UnderMouse is not working at the moment, causing this test to
fail.

Task-number: QTBUG-23685
Change-Id: If167311b09ba8fc3d04d056590588b595825c443
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
8fdf8baa88 Ignore tst_QSizeGrip failures on Mac OS X
This test currently fails on Mac, mark it as insignificant.

Task-number: QTBUG-23681
Change-Id: I7355cda953966778d651fafaff837f1083eeb3f4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
6f21509ac0 Skip tst_QMenu::QTBUG_10735_crashWithDialog() on Mac OS X
This test currently hangs, preventing the autotest from finishing.

Task-number: QTBUG-23677
Change-Id: I3c5f56c10735d65fb35de4e22a1e2e6414532309
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
1d0d44a53a Ignore tst_QMenu::keyboardNavigaction() failure on Mac OS X
The shortcut0 test data fails, indicating that keyboard navigation via
shortcuts doesn't work on Mac OS X for the time being. Mark the failure
as expected.

Task-number: QTBUG-23684
Change-Id: I199222a87c09e6f491e5dcd21c9f65c28ecbb86d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
2f46ea9fd6 Skip tst_QPushButton::sizeHint() with Mac style on Mac OS X
QStyleFactory cannot create the Mac style, so skip the test for now.

Task-number: QTBUG-23680
Change-Id: I2ae61aab152cd8a4e6a7270902df40dd3cc6df3b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
9f0ddaae41 Mark tst_QDateTimeEdit with insignificant_test on Mac OS X
This tests has numerous failures on Mac OS X, ignore the test for now.

Task-number: QTBUG-23674
Change-Id: I29bcfd379a6a13f9859e96c5cc6dc7e932feaf4a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
cae2b0f0e8 Mark tst_QComboBox::hide() with QEXPECT_FAIL() on Mac OS X
Task-number: QTBUG-23678

Change-Id: I6ced2aa9392f2688ee982113addef7fffcf4b9f2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
ceed394199 Ignore tst_QAbstractSlider failures on Mac OS X
Mark current failures as expected.

Task-number: QTBUG-23679
Change-Id: Ic574dbb0fea3a21ef9963ef16bdf85da4c809036
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 14:47:10 +01:00
Bradley T. Hughes
9d87e1db1f Expect tst_QWizard::setPixmap() failure on Mac OS X
Task-number: QTBUG-23701

Change-Id: Iba5b926e57c1565856d17bbfbff4d1da75645ad4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:16 +01:00
Bradley T. Hughes
e3c59443c6 Expect tst_QFileDilaog:clearLineEdit() failure on Mac OS X
Task-number: QTBUG-23703

Change-Id: I981de80d6946d3637c493bede0adb1b90a539261
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:08 +01:00
Bradley T. Hughes
855505ea35 Do not expect tst_QFileDialog::selectFiles() failure on Mac OS X
This test no longer fails:

XPASS  : tst_QFiledialog::selectFiles() '!listView->selectionModel()-
   Loc: [tst_qfiledialog.cpp(915)]

Change-Id: Ib790c0f81b3d383117cceceaacbf0c3d6a673404
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:34:00 +01:00
Bradley T. Hughes
fdfec806f9 Do not mark tst_QGraphicsWidget as insignificant anymore
Allow new failures in this test to block CI.

Change-Id: I1c7e797740be2f77f82d00943f6f2018b686481f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:45 +01:00
Bradley T. Hughes
664528b7f3 Expect tst_QGraphicsWidget::updateFocusChain...() failure on Mac OS X
tst_QGraphicsWidget::updateFocusChainWhenChildDie() currently fails due
to what appears to be window activation.

Task-number: QTBUG-23699
Change-Id: I404f90d32dba64d558598d97cf805b6c025e6456
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:16 +01:00
Bradley T. Hughes
619fbc129d Fix XPASS in tst_QGraphicsWidget on Mac OS X
Don't expect failure from these 2 tests anymore:

XPASS  : tst_QGraphicsWidget::initStyleOption(all) COMPARE()
   Loc: [tst_qgraphicswidget.cpp(1162)]
XPASS  : tst_QGraphicsWidget::initialShow2() COMPARE()
   Loc: [tst_qgraphicswidget.cpp(3196)]

Change-Id: Ibd1178f8cab480fa9fad9c829083a4862749c60b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:33:12 +01:00
Bradley T. Hughes
37167e3420 Fix XPASS in tst_QGraphicsView on Mac OS X
These tests now fail with XPASS on Mac OS X, so remove/skip the
QEXPECTED_FAIL(). Unfortunately we don't know which commit fixed this.

Change-Id: Id919a2c9d56fd7c4dee8ccb8aa3293efdce603b2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:58 +01:00
Bradley T. Hughes
34b3336866 Expect tst_QGraphicsProxyWidget::updateAndDelete() failure on Mac OS X
Task-number: QTBUG-23700

Change-Id: Ic472cea966761afc1e6e17479588b8b53ec4786c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 09:32:52 +01:00
Bradley T. Hughes
ba21ca7b5b Replace Q_WS_MAC with Q_OS_MAC in tests/auto/widgets
tst_qwidget.cpp will not build/link without tst_qwidget_mac_helpers.mm,
so re-add it to the build as well.

Change-Id: I55130f62c215c4b82683d90456e31fdb09f833a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 09:32:43 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Robin Burchell
7c247d3e70 Obsolete QInputDialog::getInteger() 'officially'.
It has long since been obsolete in code and removed from the documentation, but
was never marked QT_DEPRECATED. Do so, and inline the implementation.

Change-Id: Ic7bfdaf76269b7f9addeba83e64bc9525c581dda
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-22 22:10:02 +01:00
Bradley T. Hughes
f188d8a005 Expect tst_QTreeView::editTriggers() failure on Mac OS X
EditKeyPressed 4 test data fails, all other test data for the function
pass.

Task-number: QTBUG-23696
Change-Id: Ied56bd0b653ad4dcc2b6451b486aae7cad134211
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:27 +01:00
Bradley T. Hughes
cdfb3f29c2 Expect tst_QColumnView::moveCursor() failure on Mac OS X
Both test data fail.

Task-number: QTBUG-23697
Change-Id: Iee4b08a88db33c72c584e326e928863af61c8dd4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:22 +01:00
Bradley T. Hughes
e6a538a3ed Expect tooltip related test failures on Mac OS X
Mark test failures related to tool tips with QEXPECT_FAIL(). See
QTBUG-23707 for description of the failures.

Change-Id: I753256d1db748cef41cf1898620647c4cbacc472
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:50:09 +01:00
Bradley T. Hughes
0d12500240 Ignore failures from tst_QWidget_window on Mac OS X
The tst_windowFilePathAndwindowTitle test currently fails, so mark the
failures as expected failures for now.

Task-number: QTBUG-23682
Change-Id: If64a82c919b218b5c1c38ce5228081bb46fe70ac
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-20 08:49:43 +01:00
Bradley T. Hughes
a84d893bae Add "nswindow" resource to the Cocoa native interface implementation
This will return the NSWindow* for the given QWindow*. Port the QWidget
autotest helper to use the native interface and the "nswindow" resource.

Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
e87813bfa2 Remove the tst_QWidget::retainHIView() test
Qt is Cocoa only now, and does not use HIView anymore, making this test
is meaningless. The testAndRelease() and createAndRetain() helper
functions are also no longer needed.

Change-Id: I26180a4670c8e7445741d3aab510c4da7b65388c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00