Commit Graph

98 Commits

Author SHA1 Message Date
Jani Honkonen
d2bba5e553 Fix a QListViewItem width when spacing is set
The listitem width was calculated incorrectly because spacing was
not considered. This fixes the second part of the reported bug where
spacing is set. Added some tests to catch the issue relating to the
reported bug.

Also added a test to check spacing in general.

Task-number: QTBUG-21804
Change-Id: Icc6326bce914264d882a60a9fc0ebe7d2a08dbf6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:52:09 +02:00
Jani Honkonen
d4385e48b8 Fix QListWidget scrolling with keys when there are hidden items
If the selected item is scrolled with keyboard keys the selected item
will go outside the visible area. The scrolling did not take hidden
items into account when calculating the amount to be scrolled.

Task-number: QTBUG-21804
Change-Id: I63da0248cec43be464898f9dc8167e739f00ccd0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:51:57 +02:00
Stephen Kelly
2ef3ac72fc Emit layoutChange signals when changing QPersistentModelIndexes.
This is necessary whenever QPersistentModelIndexes are changed. Omitting
it means that views are not able to react to the change, such as QTreeView
clearing its (manually held) QModelIndex cache, and the QItemSelectionModel
clearing the item from its storage.

It is necessary to change a QSortFilterProxyModel test which assumed setItem
does not have any such effect. That test is ported to setData instead.

Task-number: QTBUG-18539
Change-Id: Id7a602f18b9773ba4d11019418de886860d26d3e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-18 08:34:53 +02:00
Stephen Kelly
d19589b90a Make selectAll() do nothing if the mode is NoSelection.
Task-number: QTBUG-26687

Change-Id: Iaa0197efe64c61505e22e4a63a1f5c012af0bc78
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-15 11:38:37 +02:00
Stephen Kelly
146b7a9c8b Take scroll position into account when painting drag pixmap.
Task-number: QTBUG-26793

Change-Id: Ic19cb6581cd5838d26713998e152772a5d12da4f
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-10 21:59:47 +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
Stephen Kelly
2ade633c0a Ensure that we return an invalid QTableWidgetItem when none is available.
Task-number: QTBUG-26195

Change-Id: Iede4f51770bd8c8eab3558137aaf7b1721f25a87
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 16:40:07 +02:00
Stephen Kelly
dbe4b45f9b Remove some dead code wrapped in Q_WS_QWS.
Change-Id: Ie1ee8c4af603b924abe40145041357981d174445
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-03 11:24:28 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-01 15:37:46 +02:00
Friedemann Kleint
58ab483cdb Stabilize the QHeaderView test.
The test has a member QWidget *topLevel which it recreates
and shows in init() without waiting for it to be exposed
although it is not used in every test case. This apparently
interferes with some tests that create separate top levels.
Do not show in init(), delete the topLevel.
Add wait to the cases where the topLevel is shown.

Change-Id: Ib428020b36dc82991d41e68478fd583bdfb004c7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-31 11:57:21 +02:00
Friedemann Kleint
aaaf60aeab Remove usage of deprecated qWaitForWindowShown(QWidget *) method.
Remove usages from autotests with the exception of
widgets/kernel, widgets/widgets and widgets/graphicsview.

Change-Id: I917b2857ed0cd07a6b3dbcd69244f558086c6586
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 17:32:21 +02:00
Marc Mutz
5fd8dd19ea QtWidgets: use nullary version of qRegisterMetaType<T>("T")
Using qRegisterMetaType<T>() has the advantage that multiple calls
during a program run are much more efficient, since an inlined
atomic is used to store the result. It also ensures that
Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T")
will happily register anything.

Had to add Q_DECLARE_METATYPE to QFileInfo, for
QList<QPair<QString,QFileInfo>> of QFileSystemModel to work with
the partial specialisations of Q_DECLARE_METATYPE for QList, QPair.

In order to synchronize this change with other modules that did
their own Q_DECLARE_METATYPE(QFileInfo), a sync macro is defined
that can be tested in other modules, and will later be removed again.

Change-Id: I3004664e07e64cd885d5a03a57ff4e4379804aec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 13:33:05 +02:00
Friedemann Kleint
8761840397 Implement waitForWindowExposed and friends for widget windows.
- Implement waitForWindowExposed() for toplevel windows.
- Implement waitForWindowShown(QWidget *) and mark as
  deprecated in line with waitForWindowShown(QWindow*).
- Use in tests.
- Simplify tests (collapse waitForExposed, setActive
  into setActiveWindow, waitForActive), remove most
  hard-coded timeouts.
- Stabilize graphicsview tests by using waitForWindowActive.

Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-20 09:27:28 +02:00
Friedemann Kleint
a89c7e4020 Replace Q_WS_ in tests by Q_OS_ or check platform names.
Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
Sergio Ahumada
59339941e0 Fix some spelling errors
Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-07-11 14:52:37 +02:00
Thorbjørn Lund Martsum
43850e5295 QItemDelegate - add a more comprehensive test
This is a bigger test after this change:
c3e1abad4e

Beside the test of behavior it has the class
FastEditItemView which could be useful in the future.

QTestEventLoop::instance().enterLoop(1) does not perform well.
(IE it makes CI slower). My class could be used to extensions.
(or maybe even to remove a few of these calls)

Change-Id: I4f1460873cd07ddc482d5cfe462b59c47ebb189f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-09 12:07:48 +02:00
Thorbjørn Lund Martsum
5dc9036e18 QHeaderView - adding an auto test with saveState and restoreState
This test is nice to have regardless though the main reason for it
is a refactor of hiddenSections in QHeaderView.

Change-Id: Id41a1d5edda2ef75bf432a78cdb3e952303eae92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-05 13:13:58 +02:00
Thorbjørn Lund Martsum
524c3e05e8 QHeaderView - prevent negative default+minimum section sizes
In 96f1fe8855 we agreed that sections
with negative sizes did not make sense. Of the same reason default
section sizes and minimum section sizes should be not negative.

Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-04 18:00:41 +02:00
Giuseppe D'Angelo
dba22bc036 Move QStandardItem/QStandardItemModel to QtGui
The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's
little sense to still have these classes in QtWidgets.

This also copies and pastes a version of QWidgetItemData as
QStandardItemData inside qstandarditemmodel_p.h.

Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-06-29 22:42:19 +02:00
Janne Anttila
5281cba808 Fix qitemview and qdatetimeedit autotest builds for WinCE.
Defined missing SPI_GETPLATFORMTYPE macro as it was done in for example
in qwidget and qaccesiblity test cases.

Change-Id: I33a1e0119848911fbc4830299fcc1854f5259e86
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-06-21 00:58:29 +02:00
Jani Honkonen
a85d15259c Fix QListView::scrollTo() when there are hidden rows
This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988
from February

QListView does not consider hidden rows when scrolling to an item.
If there are hidden rows (or columns) before the selected item then
the visual index of an item is not the same as the row index
from the model. So scrolling will be off by the number of hidden
rows before the selected item.

Added a autotest for this also.

Task-number: QTBUG-21115
Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-14 10:11:26 +02:00
Markku Heikkila
9e75354aab Fix crash in QTreeWidgetItem::sortChildren when adding new item.
This is a cherry-pick of 4f388c383e39b598d997e21bd9a4f16d89bd0625
from February

Recursive call is caused if user code calls QtreeWidgetItem()::sortChildren and
sorting is enbled in QTreeWidget.

First call is from user code and second is caused by timer.
When timer expires second call is made.

This recursion is prevented with QTreeModel::SkipSorting skipSorting()
in QTreeWidgetItem::sortChildren();

Task-number: QTBUG-20345
Change-Id: Ibf73e69274423f31397a9e391bfba7d5c4103a3c
Reviewed-by: Markku Tapio Heikkilä <markku.heikkila@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-08 18:09:07 +02:00
Miikka Heikkinen
32fa7a5410 Fix tst_qlistwidget::fastScroll test case
tst_qlistwidget::fastScroll fails if the mouse cursor happens to be
over the tested widget, because that causes an item to highlight,
resulting in unexpected region of widget to be painted. Fixed by
forcing the mouse cursor off the widget before the test.

Task-number: QTBUG-24299
Change-Id: I8f45541feda44681179d43eda67d970d5fea4e40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-01 01:21:17 +02:00
Jiewen Wang
3be6ca3ee8 Eliminate QTreeWidget drag crash
In QTreeViewPrivate::adjustViewOptionsForIndex() wrong index had been
used when referencing to array of viewItems. Variable row is set to the
index of the QModelIndex, however it is not as same as the index in
viewItems[] when there was hidden item in treeWidget. Index of viewItems[]
should be used here. Unit test is added as well.

Change-Id: Idc7eda979e7d09c5a07bd6dffd92b7abbac10e67
Task-Id: QTBUG-25333
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-28 16:49:56 +02:00
Rohan McGovern
177070cb7b Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows.  Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.

Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-28 07:33:01 +02:00
Friedemann Kleint
061968d082 QWindowsBackingStore: Implement scroll.
Similar to XCB.

Task-number: QTBUG-24299
Task-number: QTBUG-24296 (partially fixed)

Change-Id: I4c9d813d9645f957f2caad0c4e395ce0d3d222cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-21 16:02:06 +02:00
kb
cff6e39cd1 Remove capitalization when specifying include-libraries.
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.

Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 21:34:08 +02:00
Girish Ramakrishnan
36547f4eff Expose QPA API under qpa/*
The main reasons for doing this are:
1. _qpa.h end up in the master QtGui include file. QtGui is meant for
userland applications. qpa code is neither binary nor source compatible.
Inadvertant use of QPA api makes the user code binary-incompatible.
2. syncqt creates forwarding headers for non-private header files. This
gives people the impression that this is public API.

As discussed on the mailing list, even though QPA api is internal and subject
to change, it needs to  treated differently from private headers since they
will be used by  in-qtbase and out-of-qtbase plugins.

This commit does the following:
1. The _qpa in QPA header files is dropped.
2. syncqt now treats any file with qplatform prefix as a special file and
moves it to qpa/ directory. The recommended way of using QPA API in plugins
is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API
from multiple modules (for example, qplatformfoo might be in QtPrintSupport)
3. The user needs to explicitly add QT += <module>-private to get access to
the qpa api.
4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo
includes.

This commit does not change the cpp filenames. This requires a more careful
merging of existing non qpa cpp files and existing cpp files on a case by
case basis. This can be done at anytime.

The following files are not renamed as part of this changed but will be fixed
as part of a future change:
src/gui/kernel/qgenericpluginfactory_qpa.h
src/gui/kernel/qgenericplugin_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa.h

files were renamed using

    for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done
    for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done

includes were renamed using script

for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do
    sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \
        -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \
        -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \
        $file
done

Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-05-07 20:25:24 +02:00
Stephen Kelly
8ec1594e63 Rename setResizeMode to setSectionResizeMode.
The overload of this method was renamed
in b64426248d but this one was not.

Change-Id: I60a6ddf0fcf9deea31ccf51e7b0db16c66023356
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2012-05-07 17:55:47 +02:00
Thiago Macieira
1eac22a1b9 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-03 06:10:20 +02:00
Stephen Kelly
99a620d2e2 Take account of spanned items in QTreeView when dragging.
Also remove some code which has been unused since it was introduced in
32182d107fa75e5619ecc91a81f50626f429ebe1

Task-number: QTBUG-25140
Change-Id: Ic7053d68d8200f845c1ae330342d27af7275e057
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@digia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-04-26 15:20:30 +02:00
Stephen Kelly
384eec86e5 Ensure that this widget has focus before sending a keypress.
This doesn't fix the bug, but confirms that it is CI flakyness.

Task-number: QTBUG-21098

Change-Id: Ic37a7574af88205371f4b2c24113d12b1386835c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 00:29:39 +02:00
Stephen Kelly
b780196a95 Add some more output to debug a flaky test.
Task-number: QTBUG-23638

Change-Id: Ib6a8634ede4b6461e41ce6843ac2654dcd1999f5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 00:29:39 +02:00
Jason McDonald
61c1c5a650 Re-enable the QItemDelegate test on Ubuntu 11.10.
This test used to be unstable, but has not failed for more than 400 CI
builds.

Task-number: QTBUG-23637
Change-Id: I0d92136aa9d641e447820ab19b53034f475f74da
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-19 04:13:04 +02:00
Stephen Kelly
7c3684dff7 Fix out of bounds use of QVector API.
This is a regression introduced by commit
22b7d21186.

Task-number: QTBUG-24965
Task-number: QTBUG-25140

Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d
Reviewed-by: David Faure <faure@kde.org>
2012-04-17 16:28:46 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Jason McDonald
73db181e83 Put bug numbers on same line as insignificant_test markers.
This makes it easier to find insignificant tests that have no associated
bug report.

Change-Id: Ia71d59da062818d3860b0365d063e044705267fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-16 03:10:22 +02:00
Robin Burchell
7be255156f Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 10:46:19 +02:00
Thorbjørn Lund Martsum
699f2424eb QHeaderView - rename many spans classes and variables
In (SHA) b800d8b94a the span model
was replaced with a plain section model. The code however still has
variables and classes called someting with spans which would be
confusing for possible new readers of the code.

This patch cleans up most of it. It only renames classes,functions
and variables (and not any semantics or the public API).

Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-11 01:42:12 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Stephen Kelly
dc6a1d186e Remove workaround for QComboBox not having a USER property.
QComboBox does in fact have a user property
since b1b87a73012342dc1619a8e907ea9954d59ca564.

Change-Id: I24eb2ef267cec5d8a9f7348954b703fa6df04fa5
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
2012-03-28 02:02:07 +02:00
Stephen Kelly
c3e1abad4e Add USER properties to QDateEdit and QTimeEdit.
Both classes had such components before, but there were issues with
the NOTIFY signal not being in the same class as the Q_PROPERTY.

This patch solves that problem by using a signal of a different name.

Task-number: QTBUG-15731
Change-Id: Ibc7ce4dba8a6b88c05d62a90e14d0101c5cd3082
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2012-03-28 02:01:49 +02:00
Friedemann Kleint
2c4845ce33 Fix some compiler warnings in tests.
- Unused variables
- Deprecated conversion from const char * to char *.

Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-27 16:35:39 +02:00
Thorbjørn Lund Martsum
fcc01e6c37 QHeaderView - minor fix to setDefaultSectionSize
This fixes a situation where we (wrongly) assume that
a section with size 0 is hidden. However a hidden
section should be one that we have called hideSection
(or setSectionHidden) on.

Change-Id: Ic14eded2666022f27434dc55927323a74910549c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-20 11:44:09 +01:00
Mark Brand
9e87104295 QTableView: call model->submit() on row change
QTreeView already does this in the exact same way. It's necessary to
call submit() so edit strategy OnRowChange in QSqlTableModel will
work as expected.

Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-15 00:50:47 +01:00
Thorbjørn Lund Martsum
b64426248d QHeaderView - renaming functions in Qt5
This patch renames the functions in Qt5 according to the
notes. It also renames resizeMode to be consistent.

The old functions are both marked with both QT_DEPRECATED
and '### Qt 6 - remove'

All usage of the function within the qtbase are also
changed to use the new functions.

Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-14 11:37:18 +01:00
Friedemann Kleint
83cabda862 Add fonts to QPlatformTheme.
- Remove QPlatformFontDatabase::defaultFonts() returning
  a hash containing widget name ->font and the Windows
  implementation.
- Add enumeration and font accessor to QPlatformTheme. The value
  returned for the enumeration value overwrites the default font
  of the font database.
- Implement for Windows, Mac and KDE.
- Add more Windows palettes.

Task-number: QTBUG-23686

Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-07 12:43:32 +01:00
David Faure
7a4b6f8cdd Fix inconsistent auto test executable names
Change-Id: I3b6b5b37e32be25d1b9933395c43f6d5aa5b8810
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 13:55:12 +01:00
Thorbjørn Lund Martsum
12c2a3d852 QHeaderView - fix setOffsetToSectionPosition a bit
It might be silly to have sections with size 0 without using hideSection.
Nevertheless we should still use the principle of least surprise.

It does not make sense that hiding a row 'far' away should affect
the semantics of setOffsetToSectionPosition on lower indexes.

Change-Id: Iaf847eba2ea4d28fc7bcfe3a27d62f432f6f61e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 14:55:06 +01:00
Miikka Heikkinen
f8e2753323 Make 'nmake check' succeed for widgets tests
Marked a bunch of tests insignificant, and skipped one crashing test
case in QApplication test, as that couldn't be made to pass simply by
marking the test insignificant.

Once the underlying issues are fixed, the tests need to be re-enabled.

Task-number: QTBUG-24203
Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-17 14:08:19 +01:00