Commit Graph

753 Commits

Author SHA1 Message Date
Shawn Rutledge
4c7881396e An RTL submenu should be right-aligned
Task-number: QTBUG-30595
Change-Id: Iac54cae70b5a2ac6be5a750279fb390bb158776a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 09:18:43 +02:00
Janne Anttila
453e4da6d1 Fix qgraphicsview autotest build for WEC7.
logicalDotsPerInchX returns qreal, and qreal in WEC7 is defined to
float instead  double. There is no required overload:
    qFuzzyCompare(float,double)
And for that reason build fails. Ensure qreal is casted to double which
is default type used by compilers for floating point literals such as
'96.0'.

Change-Id: I24c701715b3dcf1a2137256a1c251c19d0c1dbe9
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-17 19:49:18 +02:00
Janne Anttila
4f0770eaab Fix tst_qstyle autotest build for WEC7.
Apparently testAllFunctions method has been changed to take pointer,
but code inside different WinCE defines was not updated.

Change-Id: Id15380ecc1e85650d679cb7437923ff9c77057ae
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-17 19:49:02 +02:00
Frederik Gladhorn
aa3754d105 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Iee73c93067c5822d8dd51a8692e6da9df4ba49f5
2013-04-12 12:53:13 +02:00
Friedemann Kleint
26da8c34bb Stabilize tst_qcombobox.
- Remove member variable testWidget and instantiate on the stack
  to ensure tests do not interfere.
- Move widgets away from taskbar areas.
- Fix windows geometry warnings by making small windows frameless.
- Fix wrong target widget for key click in
  keyBoardNavigationWithMouse().

Task-number: QTBUG-30573
Change-Id: I6d9fad0f212814a67367baf446750e9bed0ebdb2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-11 06:52:07 +02:00
Sergio Ahumada
90297a64f2 Merge branch 'stable' into dev
Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
2013-04-10 15:42:22 +02:00
Andy Shaw
f5dc5225f6 When doing a PageDown or PageUp it should show the next set of cells
Before it would skip out a row depending on the size of the tableview.
Now it will show the next set of cells for the direction it is going in.

Change-Id: I02926d0b2187ffafffb63f7fff43c233b4d7d6af
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-09 22:38:32 +02:00
Stephen Kelly
b242ab7b10 Add missing wait for window shown.
Change-Id: I746a12dfa1b87a0d1393341ca3d641f73bcaee0a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-09 19:30:14 +02:00
Friedemann Kleint
54bd1102ad Stabilize tst_qcompleter.
- Use qWaitForWindowActive in task178797_activatedOnReturn().
- Remove hardcoded timeouts, use qWaitForWindowActive/Exposed.
- Instantiate widgets on stack or use QScopedPointer to ensure
  cleanup.
- Move widgets to a central location, avoiding taskbar areas.

Change-Id: I98991b70067dddab9aa69b1681fa80398ec8b1f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-05 11:28:47 +02:00
Jan Arve Saether
9d7ae6dfbe Fixed a bug where the MaximumSizeHint of a layout with spans was wrong
This was spotted while tracking down a similar bug related to spans.
This now also eliminates the Q_EXPECT_FAILs in
heightForWidthWithSpanning(), since it now finally works.

The problem was only for the maximum size, since the size of an ignored
row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed
values for a QGridLayoutBox).

Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-04 14:23:04 +02:00
Jan Arve Saether
4f072e2d3d Fixed a bug where spans across empty cells got broken.
If a row/column is only used only because of the spanning of an item,
the cell should be treated as it didn't exist. We keep track of this
with the "ignore" bit array.

The old code would always start from the row/column at position 1.
In the attached testcase this made the effectiveRowSpan become larger
than actually needed.

Task-number: QTBUG-30255

Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-03 14:52:25 +02:00
Debao Zhang
ba3418ae75 QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-28 02:02:14 +01:00
Debao Zhang
f6e739d9e3 QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}
Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 19:34:22 +01:00
Debao Zhang
1fb3d56efb QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()
Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
90d74f8602 QtWidgets tests: Don't call the empty function QApplication::syncX()
Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
f57a3c0ba3 tst_qgraphicseffectsource: Don't use the deprecated QGraphicsItem::children()
Change-Id: I0cc0c5284a675fb1c7f960e9790baa89c56112b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
d0ad02a766 tst_qtreeview: Use QRect::intersected instead of QRect::intersect
Change-Id: I4579929473a408b73f3ad9014ea30ce5a602259c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 10:18:02 +01:00
David Faure
a6e5ccbe22 QMdi: Don't emit subWindowActivated during StyleChange handling.
The handling of StyleChange de-maximizes the child window temporarily,
which was emitting subWindowActivated.
This would crash lokalize, because deactivating a window means deleting
the widgets associated with it, and style-change handling is done in
QApplication by looping over QApplication::allWidgets, which would then
contain dangling pointers.

Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7

Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-25 10:37:37 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
J-P Nurmi
5fd509c4d7 Tests: stabilize tst_QDockWidget on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
(cherry picked from commit 36e6632fa3)
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-03-20 09:58:06 +01:00
Samuel Rødal
677313fc0b Attempt to prevent tst_QWidget::scroll() from failing in CI.
Skip the test on X11 where it's consistently failing in CI but not when
trying to reproduce locally. Also attempt to make test slightly more
robust on other platforms (it's already #ifndef'd for Q_OS_MAC).

Task-number: QTBUG-30271
Change-Id: I6743eb99549abbd945e380a3a54ce8620000298a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-20 09:58:03 +01:00
J-P Nurmi
0554341d9f Tests: stabilize tst_qwidget::scroll on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Ie319892747bee60ea6f11e27b6c1bfb4731ef587
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-03-18 22:32:15 +01:00
J-P Nurmi
36e6632fa3 Tests: stabilize tst_QDockWidget on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-03-18 22:32:15 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Stephen Kelly
2a388e503f Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-03-13 23:35:18 +01:00
Friedemann Kleint
cc58912acd Stabilize tst_qscroller on Windows.
Change-Id: I2331f140e19ed6a2f78e48c91c653f483d8f3347
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-13 17:17:54 +01:00
Friedemann Kleint
b047f48612 Do not list desktop widgets and desktop screen widgets as top-levels.
Change-Id: Iea4905d802213848594d2ad0266696e5edb884f8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-12 18:13:37 +01:00
Tor Arne Vestbø
bb2d95ce43 Skip more QScroller tests on Mac, they are all flakey
Task-number: QTBUG-29950
Change-Id: Ieda94dbcab3d75678597544a029c5ca6d2dc8226
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-12 18:13:37 +01:00
Caroline Chao
a410273fab Fix wrong initial position
If the widget is larger than the screen,
its title bar top left corner will be shown
inside the screen.

Task-number: QTBUG-30142

Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-12 15:59:21 +01:00
Friedemann Kleint
eccef8c936 Fix warnings about overloaded virtuals in tests (CLANG).
Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-12 09:16:42 +01:00
Tor Arne Vestbø
77f7a8ef4c Skip tst_QScroller::scroll(), it's flakey and blocking CI
Task-number: QTBUG-30133
Change-Id: I2d91d92e49480b904dec9807d4763c461e809bd2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-12 09:16:42 +01:00
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Friedemann Kleint
d8e767e928 Fix warnings about unused field variables (CLANG).
Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Jan Arve Saether
aa2d10750a Fixed QTreeWidgetIterator to work with sorted QTreeWidget
We cannot access children directly, since that won't ensure that
the pending sort is executed. However, the functions we need are
there already and actually makes the code nicer.

Task-number: QTBUG-29903

Change-Id: I6899284275dd79b991896a5f08486b58d95f819d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-06 19:13:28 +01:00
Morten Johan Sørvig
7ee4ab1463 Cocoa: Improve expose event handling.
Send expose events on window and view show/hide
notifications. Implement QCocoaWindow::isExposed.

Close all windows on quit. This allows sending (de-)expose
events for those windows while the event loop is running.

Remove the flushWindowSystemEvents call in setVisible.
This function is called from application code. Flushing
window system events here is wrong since it can lead
to events being processed in the middle of the user
code call stack. flushWindowSystemEvents should only
be called as a result of (native) window system activity.

Skip one of the tst_qtooltip tests which becomes unstable/
fails in the CI system as a result of this change.

Task-number: QTBUG-29583
Change-Id: I3fb8b3f77e2b2e19dfeafba5d7dfcef602891d37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 11:43:22 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Alberto Mardegan
e3f36e7290 Make tst_qwidget more stable
This change fixes a failure of tst_qwidget under XFCE (Ubuntu 13.04).

Change-Id: Ic63e85a97ac6e44ce8c281a80ef4e83feecd9185
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-04 14:54:57 +01:00
J-P Nurmi
14dab5b2d7 Add QProxyStyle(QString key) constructor for convenience
The QStyle implementations are becoming private, so the following
slightly verbose pattern seems to be now repeated a lot:

    new QProxyStyle(QStyleFactory::create("windows"))

This change adds an alternative, more convenient constructor for
this particular use case:

    new QProxyStyle("windows")

Change-Id: I97ded597a0fd3225a6354ebea0abb367237430af
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-04 14:54:57 +01:00
Friedemann Kleint
7867f03f8a Stabilize tst_qprogressbar.
- Wait for shown to ensure events are processed.
- Move away from screen corners/potential task bar areas.

Change-Id: I2c3aa9b675c6b33ca0da67ee99cc6f76c502098a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-27 20:17:19 +01:00
Shawn Rutledge
153d613353 Transient QWindows centered; default-constructed geometry
Default-constructed geometry does not mean put the window at 0,0,
and it does not mean center the window on the screen: it means
let the window manager position the window.  If the window is
explicitly positioned at 0,0 though, that is a higher priority
than the transient hint; without this change, the transientFor property
had no effect.  On X11, transient means use center "gravity" to
make the transient window exactly centered.  But the user can still
override the geometry of a transient window, as with any window.
On OSX and Windows, neither transient window functionality nor smart
initial positioning are provided, so a window with no position set
will be centered on the screen, and a transient window will be put
at the center of its transientParent.

Change-Id: I4f5e37480eef5d105e45ffd60362a57f13ec55f5
Task-number: QTBUG-26903
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-24 20:41:05 +01:00
Frederik Gladhorn
dcb710dd87 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/features/unix/separate_debug_info.prf
	src/gui/kernel/qwindow_p.h
	src/plugins/platforms/cocoa/qcocoacursor.mm
	tests/auto/tools/moc/tst_moc.cpp

Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
2013-02-20 22:08:29 +01:00
Friedemann Kleint
4606ea5395 QProgressBar: Use localized numbers and percent sign.
Task-number: QTBUG-28751

Change-Id: I56aca3e0ee9c579297110c69d2d832c7a57f1ae7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
2013-02-20 08:15:26 +01:00
Jan Arve Saether
18f9eb797b QStackedLayout: Fix crash when focus widget is destroyed in hide()
We also have to make sure that when moving back to a page
that has a focusWidget(), the focus should go to the focusWidget()

Task-number: QTBUG-18242

Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:07:14 +01:00
Jan Arve Saether
64106705e7 Clean whitespace
Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:06:53 +01:00
Morten Johan Sørvig
73d32873cf Cocoa: Add QMdiSubWindow size grip back.
Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 08:53:55 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Tor Arne Vestbø
0768920dbd Remove ifdefs for supporting Mac OS <= 10.5
Qt5 requires Mac OS 10.6, so we can remove checks such as
if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6

Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:31:54 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Samuel Rødal
17e8286fef Fixed mouse double click events not bubbling up to parent widgets.
The bug was caused by changes b371f3f943
and 3bb9024952, which removed the event
forwarding that QWidget::mouseDoubleClickEvent() used to do without
making sure to call ignore() on the event like
QWidget::mousePressEvent() does.

Task-number: QTBUG-29680
Change-Id: I98af8052ad3dd1dea15d07a710aa9212ef5e4a68
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-14 10:55:33 +01:00
Thorbjørn Lund Martsum
08a632ac1a QTreeView::expandToDepth - add missing emit of expanded and collapsed
Just like other functions this function should emit expanded and
collapsed.

A part of fixing
Task-number: QTBUG-8176

Change-Id: I6d801f61e6f0cb8836634cc52f0be2b610f6c728
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-02 08:10:55 +01:00
Friedemann Kleint
40eaa72319 Do not run tst_qfilesystemmodel for MinGW.
Task-number: QTBUG-29403

Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-02-01 09:18:42 +01:00
Thorbjørn Lund Martsum
3260aec38e QTreeView - emit collapsed in collapseAll()
When we call call collapase we emit collapsed. Therefore it should
also be emitted on collapseAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: I20c1388fcbbb60d12debb4a0b3b0d9fed41e2563
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-31 13:12:40 +01:00
Thorbjørn Lund Martsum
80fa4b6c8e QTreeView - emit expanded on expandAll
When we call QTreeView::expand expanded is emitted.
For the same reason we should emit expanded on expandAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: Ie85e724eec50980c68f626ec47dec5c1e08cc085
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-31 13:12:32 +01:00
Sze Howe Koh
52a317092e Doc: Fix references to Qt Test
QtTestLib and QTestLib don't exist. The proper name is "QtTest" (code)
or "Qt Test" (English)

http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation
http://lists.qt-project.org/pipermail/interest/2012-December/005221.html

Files paths in qttestlib.qdocconf can't be changed easily however, as it
breaks things. So, they're left as they are.

Change-Id: Ifbc44ea858c453bedad8cd7723f847e67fc7a85a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-30 01:35:06 +01:00
Frederik Gladhorn
3eb588078e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
Stephen Kelly
d315e01218 Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.
It can be used to determine whether expand() should really expand.

Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-01-29 09:28:43 +01:00
Friedemann Kleint
00ad768f10 Do not execute tst_qfilesystemmodel in parallel.
It may interfere with other file system tests.

Task-number: QTBUG-29014
Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-29 07:30:45 +01:00
Pasi Petäjäjärvi
f3fc2078b8 Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
(cherry picked from commit 416e73a0fc)
2013-01-28 16:06:15 +01:00
Frederik Gladhorn
02ba93dd3d Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
2013-01-28 11:10:29 +01:00
Friedemann Kleint
322055b9c9 tst_qfilesystemmodel: Avoid commonly used folders.
Use the test's temporary directory instead of
QDir::temp() and the documents folder
instead of QDir::home(). Split out unrelated test
from data-driven sort test.

Task-number: QTBUG-29014

Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 09:41:39 +01:00
Mitch Curtis
5c5c9c26d2 Don't emit activated on clicking disabled itemview item.
A itemview item with its flags set to Qt::NoItemFlags is considered
disabled, and therefore should not cause the activated signal
to be emitted.

Task-number: QTBUG-20490
Change-Id: If824505c46f4fcadb9265ad6d1e9337f0cee32cf
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-26 21:22:22 +01:00
Gunnar Sletta
64134181db Introducing QWidget::createWindowContainer()
A QWidget that can embed a QWindow. This can be used
to embed a QWindow/QOpenGLContext based window or a
full QQuickView.

Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-25 14:11:07 +01:00
Frederik Gladhorn
627d9cbd3c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
2013-01-24 16:02:55 +01:00
Frederik Gladhorn
4730742f69 Stabilize tst_qabstractslider
When simulating hight load, this test failed 4 times out of 80 runs
on my machine.
With this patch I could no longer reproduce the failure.

Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-24 15:16:19 +01:00
Andreas Aardal Hanssen
6476d6728e Make sure QGraphicsItem notifies changes to focusScopeItem.
A glitch in QGraphicsItem's logic made it update the focusScopeItem
pointer, but fail to notify the change to QDeclarativeItem through the
d_ptr->focusScopeItemChange() virtual function, hindering
QDeclarativeItem from emitting focusChanged() correctly for focus
scopes that do not have focus.

Two lines were moved, and a comment updated to reflect the reason
why the "return" is needed at this point. It's clear that the
calls to focusScopeItemChange() are unrelated to the return.

Task-number: QTBUG-29260
Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>
2013-01-24 02:20:34 +01:00
Frederik Gladhorn
7df08a8b63 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-23 22:12:54 +01:00
Gunnar Sletta
2692db542e Implement focus handling of child windows for cocoa.
Change-Id: I1e05ef39aa67f8febdd27215d8ad05d26ece7caa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-23 12:41:35 +01:00
Pasi Petäjäjärvi
416e73a0fc Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:59 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Friedemann Kleint
aacf4d0263 Fix a crash when minimizing a QQuickWindow.
Send empty expose event and flush queue when minimizing.

Task-number: QTBUG-28439
Task-number: QTBUG-26424

Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-18 15:42:59 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Frederik Gladhorn
7075e29199 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qstyleanimation.cpp

Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
2013-01-16 01:22:45 +01:00
Orgad Shaneh
b6963f109a QMenu: Fix nested popup when keyboard shortcut is used
Task-number: QTBUG-20403

Change-Id: I2a5fe00dd16e9dc1ec0d742a8f48083fc2954996
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-01-14 16:28:21 +01:00
Jędrzej Nowacki
63c68cadec Enable tst_qwidgetsvariant test
The test for a magic reason was not build by default.

Change-Id: I21c7fc959d76d6faac0091495f965f3da6d415b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-11 12:02:21 +01:00
Stephen Kelly
ccbff3fce5 Clean up some metatype declarations and registrations
Change-Id: I0826f6502cc45279f29f248f5f28f4fc9e6c8b4e
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-09 18:19:12 +01:00
Sergio Ahumada
63f24f6ba8 Merge branch 'stable' into dev
Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
2013-01-09 11:49:47 +01:00
Oliver Wolff
083d2c8bb8 Removed hardcoded values from tst_qgraphicsview::scrollBarRanges
Instead of testing the "windows" and "motif" styles, that test should
actually test the scrollBarRanges for all available styles. To be able
to do that, the magic numbers 16 (width/height of scrollbars) and 4
(spacing for the faux motif style) were replaced and instead of setting
the explicit values in the data the "number of scrollbars/spacings to
add/remove" is saved in a struct and the value of these (depending
on the style) is obtained in the test run.

This change does not also cause the fusion style to also be tested but
also fixes this test for Windows 7 and 8 (Aero) where the scrollbar
width/height is not 16 but 17.

Task-number: QTBUG-28611
Task-number: QTBUG-29002
Change-Id: I5d103018fde81cee6e6e89cd414426768b2dc8e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-09 08:59:26 +01:00
Friedemann Kleint
54fd35b134 Fix warnings about not being able to set Window geometry on Windows.
Fully decorated windows cannot be smaller than 160x30 (Large fonts).
Enlarge Windows or remove Window frame  to get rid of decorations.

Task-number: QTBUG-28611
Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 13:54:04 +01:00
Frederik Gladhorn
cdf13ce286 Merge branch 'stable' into dev
Conflicts:
	tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp

Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
2013-01-07 15:18:16 +01:00
Stephen Kelly
ba82958af9 Widgets: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-04 18:44:31 +01:00
Jon Severinsson
cf2a75e41b Fix QGuiApplication::keyboardModifiers() and QGuiApplication::mouseButtons()
Previous commit b2363a935c fixed keyboardModifiers() after QPA event
processing, but broke QTestLib, which expects spontaneous input events
sent to qApp->notify() to update keyboardModifiers() and mouseButtons().
The commit also did not fix mouseButtons() after QPA event processing,
and missed keyboardModifiers() after QPA Tablet event processing.

This commit fixes all these shortcommings in b2363a935c.

Includes test case by David Faure <faure@kde.org>

Task-Number: QTBUG-26887
Change-Id: I8518b06c4ce86ea7b35120e3353a45ea2a81d356
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-04 13:20:06 +01:00
Frederik Gladhorn
ca2f44680c Merge branch 'stable' into dev
Conflicts:
	examples/widgets/painting/shared/shared.pri
	src/corelib/tools/qharfbuzz_p.h
	src/corelib/tools/qunicodetools.cpp
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase.cpp

Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
2013-01-04 11:12:05 +01:00
Stephen Kelly
4319f698c8 Remove metatype registration of built-in types.
As they are built-in, they are effectively registered at compile-time
already.

Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 16:15:37 +01:00
Thorbjørn Lund Martsum
28a21d98ef QAbstractItemView - allow deselect in single selection mode.
This patch allows single selection to be cleared with the normal
control modifier. This affects e.g QTreeView and QListView.

Task-number: QTBUG-8836
Change-Id: I7fd50b987acc3552b36657409568192763257536
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-02 16:09:14 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
J-P Nurmi
71fdc0d8a6 Tests: stabilize tst_QAbstractScrollArea::setScrollBars2()
Use QWidget::isVisibleTo(parent) instead of isVisible(), just like
QAbstractScrollArea::replaceScrollBar() does. This removes the need
of using QCoreApplication::processEvents() to deliver the actual
hide event just for testing if the scrollbar was requested to be
hidden as it should.

Change-Id: Ie9a816e7b871d280a4b3d9d76adb10601915bd56
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-12-20 21:16:53 +01:00
Friedemann Kleint
3e3451f429 QMdiArea: Increase minimum size for Windows 8/Large fonts.
Task-number: QTBUG-28611

Change-Id: I115a5fa6726ac99c2bbff4ec65d3f8856b2530df
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-12-18 12:50:58 +01:00
Friedemann Kleint
34e60228d4 Fix QStyle-test for Windows Aero / 8.
Increase tolerance  on Windows for the Aero style.

Set small top level widgets frameless to avoid warnings
about minimum size of decorated windows on Windows.

Task-number: QTBUG-28611
Change-Id: Ia4aec0cf0763da9955577054cb8cf81337fac134
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-12-18 10:53:57 +01:00
Friedemann Kleint
87dedd9b2d tst_qstyle: Fix compiler warning about unused variables.
Change-Id: Ida6a45be577cc1e21a2ba2b45f57b1e96c944fb2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-12-17 22:24:45 +01:00
Friedemann Kleint
d5d79f3c7f Use frameless widgets in tst_qgridlayout.
Avoid failures caused by minimum window widths on Windows Areo/8.

Task-number: QTBUG-28611
Change-Id: I9affcce84ab804a45fa1a12fb93ad0136e6ae877
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-12-17 22:24:38 +01:00
Andreas Aardal Hanssen
533105cadf Deactivating an inactive panel no longer causes unwanted deactivation.
QGraphicsItem::setActive() is by design not guarded against calls that
do not change the current activation state of the item (e.g., calling
setActive(true) on an active item or calling setActive(false) on an
inactive item). This is to ensure that it's possible to set explicit
activation state on items, either before they are added to a scene, or
while the scene itself is inactive.

Before this fix, calling setActive(false) on a panel item that is not
currently active would by accident clear activation from any other
panel that might have focus. After this fix, activation is only cleared
if the item setActive() was called on itself is the active panel, or
is the panel that will regain activation once the scene is reactivated.

Task-number: QTBUG-28544
Change-Id: Ic4752f1e4400f9a0660bc968834747610212bb52
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2012-12-17 19:37:34 +01:00
Andreas Aardal Hanssen
af8a6cdd87 Add new signal: QGraphicsScene::focusItemChanged().
This signal is emitted by QGraphicsScene whenever focus changes in the
scene (i.e., when an item gains or loses input focus, or when focus
passes from one item to another). You can connect to this signal if you
need to keep track of when other items gain input focus. It is
particularily useful for implementing virtual keyboards, input methods,
and cursor items.

Task-number: QTBUG-10570
Change-Id: I9cbbd9a2d15d6f568e1597c2c33ec049eb70f793
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2012-12-17 19:37:16 +01:00
Andreas Aardal Hanssen
ed15e4eb07 Fix focusproxy-relayed crash in QGraphicsItem destructor.
Makes tst_qgraphicsitem::tst_focusProxyDeletion not crash.

valgrind reported the error when running tst_qgraphicsitem. The crash
was very real; when deleting an item that has another item as a focus
proxy, the proxy still had a reference to the deleted item's focusProxy
pointer. I'm not a huge fan of whitebox testing but thought this crash
justifies a modification of the test to make it fail, instead of just
passing silently with a warning only given by valgrind and friends.

FTR the reason the test doesn't crash hard is that the memory is freed
but not reused within the scope of the test. So the access to the
pointer d_ptr->focusProxy succeeds, it just accesses memory that might
as well have been reclaimed. But this is quite undefined...

Task-number: QTBUG-28321
Change-Id: I2624631f5e5c2a8aa8bd4efe1fc128eba6c61f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-12-17 11:57:02 +01:00
Andreas Aardal Hanssen
d6f2d8dcb6 Make sure panels always gain focus when activated or tab is pressed.
This changes behavior, but I would argue it's a good change. If you
create a panel and activate it (e.g., by simply showing it or reparenting
it onto an already-visible item), you expect the panel to gain focus /
which is sort of the whole point of activating it. Prior to this change,
you had to have explicitly called setFocus() on one of the panel's
children, which would give that item subfocus, for that item to auto-
gain focus when the panel was activated. This change makes it more
automatic. If the panel itself or any of the widgets in its focus chain
can gain focus, they will gain focus when the panel is activated.

So the new logic is - if the panel already has a focus item, so if
someone explicitly set subfocus on an item before the panel is shown,
that item gets focus. Otherwise, if the panel itself can gain focus
(e.g., someone makes a line edit / text edit panel), it gains focus
when activated. Otherwise, we search the focus chain until we find
the first item that can gain focus. This last case is the file dialog
case, where the dialog itself can't gain focus but typically the
first item in the focus chain is the primary focus widget, such as
the search field or the directory list view.

The change also fixes this for the first Tab. If you clear focus on
a panel, the user expects to be able to press Tab to regain focus.
Prior to this change that didn't happen. Now, the panel or the first
in the focus chain that can get focus gets focus on first tab.

Task-number: QTBUG-28194
Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-12-17 08:58:04 +01:00
David Faure
92bd9aecfb Fix empty window title regression, add application display name to window title
This increases consistency a lot: all windows and dialogs from a Qt
application will show the app display name in the caption, on Windows and X11.
This helps identifying which app a dialog belongs to, which is especially
useful when the dialog is very generic and shows up unexpectedly.

For compatibility reasons, the app name is added to the caption only
if setApplicationDisplayName() was called -- or if the caption would be
completely empty. The standard Qt4 case (setWindowTitle + no display name)
is unchanged.

Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-12-14 08:56:02 +01:00
Marc Mutz
6f08748ec8 tst_QDialogButtonBox: fix typos
Change-Id: Iaf1b0ec47894cce7c5be702b2fad3106249cffd2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-12-13 10:19:20 +01:00
Friedemann Kleint
bf178c77dd QMenu: Do not set snapToMouse if a caused-widget exists.
When clicking at the bottom-right corner of a menu in a menu
bar, it appears at the wrong position. Add test and stabilize
RTL-tests by making sure the layout direction is cleared should
they fail.

Task-number: QTBUG-28031
Task-number: QTBUG-2596
Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-12 21:55:30 +01:00
Friedemann Kleint
303ff1bb12 test: Skip tst_QMdiArea::nativeSubWindows() on Windows/ANGLE.
Task-number: QTBUG-28545

Change-Id: Ifa698b9efe38654c8f8fbcc184db5d176df7ba47
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2012-12-12 10:57:08 +01:00
Andreas Aardal Hanssen
4a9c3b2433 Repair QGraphicsWidget focus chain when used with ItemIsPanel.
Add handling of the focus chain to QGraphicsItem::setFlags(), so that
the focus chain is repaired (panels pop out of the chain and non-panels
merge back in) when the ItemIsPanel flag is toggled. Add handling focus
chain to QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting for
panels.

Before this fix, you must enable the ItemIsPanel flag before adding
the item as a child to a parent panel, and you lose focus when using
the tab key to focus around a panel after it has been reparented into
another panel.

Task-number: QTBUG-28187
Change-Id: I1d0d81a90697eaf715a8a337c8bf6c2159329e68
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-12-07 09:11:59 +01:00
Andrew den Exter
ab97a44b6a Clear focus of GraphicsItem focus scopes and their children.
A focus scope has effective focus if one of its children is the focus item,
clearFocus() should remove effective focus from an item and its children
not just from the focus item.

Task-number: QTBUG-28328
Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
2012-12-04 01:50:02 +01:00
Sergio Ahumada
0df026de86 Stop using the name "Trolltech" in QSettings
Also change Trolltech for QtProject in other places

Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-03 03:47:08 +01:00
Marc Mutz
716d33d2a7 [QTBUG-27420] Make Q{Box,Grid,Form}Layout::takeAt() unparent a nested layout
QStackedLayout doesn't have support for QLayout, only QWidget, so
the issue doesn't arise there.

Reported-by: Johannes Schaub
Task-number: QTBUG-27420

Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-02 00:23:14 +01:00
J-P Nurmi
a0d379bc9a Style auto tests: kill QWindowsStyle dependencies
Change-Id: I135fe2b0aae81c73c1cca6272f71db07ecb3fa6b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 20:54:39 +01:00
J-P Nurmi
50a22d8418 tst_QLayout: use QStyleFactory instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I25ac344d349d07db94e2fbc9ef943e09c399f913
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-28 13:13:51 +01:00
J-P Nurmi
f308c296c5 tst_QWidget: use QStyleFactory instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-28 13:13:41 +01:00
J-P Nurmi
a3fe4c6337 GV auto tests: kill QWindowsStyle dependencies
Change-Id: I6236b7ca23897c5075bef21f5e62fe01f4cfc611
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-27 23:10:09 +01:00
Andreas Aardal Hanssen
bfb569b6e7 Ensure subfocus is not reset to 0 when hiding a panel.
When hiding any widget that is not a panel, it is correct to clear
subfocus. In case clearFocus() has been called, the result is that
focusItem() / focusWidget() points to 0, which is correct. Upon
reactivation, nothing gains input focus. When changing focus, the
following setSubFocus() call will ensure subfocus points to the new
widget.

When hiding a panel, however, it's essential that subfocus within
that panel is not cleared, otherwise, when re-showing the panel,
nothing will have focus, whereas the expected behavior is that focus
is restored to the last item that had focus, i.e., the focusItem()
a.k.a. subfocus widget.

Task-number: QTBUG-22256
Change-Id: I84d849a505764e074e1369fef923cef1ad5c0b1e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-26 21:23:15 +01:00
J-P Nurmi
8e7135c894 tst_QGridLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: If163aae6910c0b082a9bcca1ebbab66660cc005f
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
7caaab5262 tst_QFormLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: Ie28d4ea074938b17827aa803a2298f881946f7e5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
f1a743c165 tst_QBoxLayout: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I287c771a841ba96e445f0a0df96ea035be25ac74
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
f61a335589 tst_QMenuBar: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: I422e7d67fadbb169d19285aab0a8ba0f3d668697
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
J-P Nurmi
5ad4e14fb1 tst_QComboBox: use QProxyStyle instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.

Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-26 14:16:44 +01:00
Friedemann Kleint
eefec0e0be Fix keyboard grab in QWidgetWindow.
Task-number: QTBUG-28070
Change-Id: I6f55a2dd906ee896071137a5d47fb97c9a571b5f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-26 11:00:07 +01:00
J-P Nurmi
0bfc5b898d tst_QDateTimeEdit: remove redundant include
Change-Id: I3aeb90723b41b35e221b86b1767ed1ac45a9fe0c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-24 10:34:02 +01:00
J-P Nurmi
9b431d1253 tst_QToolButton: remove redundant include
Change-Id: Ie55a530a89b85a4f3369ee3205221fb01fa1773e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-24 10:33:54 +01:00
J-P Nurmi
86bbe5a43a Cleanup tst_QApplication
Remove redundant includes, remove references to deprecated
QApplication::GuiServer (passing that has no effect anymore), and use
QStyleFactory instead of referencing QWindowStyle directly (about to
become an internal class).

Change-Id: I08f94993a55ce6039c7694d8f7019cbd53594edc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-23 20:40:02 +01:00
Lars Knoll
43619db05d Emit destroyed() signal before children get deleted
Make sure we always emit the destroyed() signal before
we delete our children. This wasn't working correctly
for QWidget based classes, as the QWidget destructor
deletes all children itself.

Task-number: QTBUG-24672
Change-Id: Iecdff3489196271177edfeba1c4a2c5800e255af
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-23 17:04:00 +01:00
J-P Nurmi
27aa41cbba Made QMacStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QMacStyle directly.

Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-23 15:18:15 +01:00
J-P Nurmi
d25572cc7b tst_qlistview: remove redundant include
Change-Id: If33518159feb202fa041ac2809817dff5616249f
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-23 15:15:27 +01:00
J-P Nurmi
39dd8bbfab tst_qwizard: remove redundant include
Change-Id: I837aed1e5e601e67105562df2764327b7e8c44a6
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-23 15:15:20 +01:00
J-P Nurmi
7d48fd1c83 Made QWindowsMobileStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsMobileStyle directly.

Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-23 10:08:10 +01:00
J-P Nurmi
4fb0e52515 Made QWindowsCEStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsCEStyle directly.

Change-Id: I6b3c0554e7a2a4a5f0027f4ea1342fd332af89ad
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-23 10:08:10 +01:00
Pierre Rossi
b77749e997 Account for the item spacing when using QListView::scrollTo()
Somehow this bug managed to stay hidden until the introduction
of QFusionStyle.

Task-number: QTBUG-27675
Change-Id: I86b049b869e9f2951426dc67a485ad7c60ef1403
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-23 00:47:48 +01:00
Mitch Curtis
3249439b20 Remove warnings from qtbase.
geometryengine.cpp: In member function 'void
GeometryEngine::drawCubeGeometry(QGLShaderProgram*)':
geometryengine.cpp:159:93:  warning: cast to pointer from integer of
different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95:
warning: cast to pointer f rom integer ofdifferent size
[-Wint-to-pointer-cast]
benchmarking.cpp: In member function 'void TestBenchmark::multiple()':
benchmarking.cpp:85:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
benchmarking.cpp: In member function 'void TestBenchmark::series()':
benchmarking.cpp:120:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
qstandarditemmodel.cpp:2717:45: warning: unused variable 'd'
[-Wunused-variable]
qxcbconnection.cpp: In member function 'xcb_timestamp_t
QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning:
suggest  parentheses around assignment used as truth value
[-Wparentheses]
tst_qguiapplication.cpp: In constructor
'BlockableWindow::BlockableWindow()':  tst_qguiapplication.cpp:340:9:
warning:'BlockableWindow::enters' will be initialized after [-Wreorder]
tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves'
[-Wreorder] tst_qguiapplication.cpp:342:12:  waring: when initialized
here [-Wreorder]
tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value'
[-Wunused-parameter]
tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index'
[-Wunused-parameter]

Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-21 18:23:59 +01:00
J-P Nurmi
bb5e45d0a0 Made QWindowsXPStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsXPStyle directly.

Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-21 16:36:50 +01:00
J-P Nurmi
537efea52b Made QWindowsVistaStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsVistaStyle directly.

Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-21 16:36:50 +01:00
J-P Nurmi
9bc49b0bca Made QFusionStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QFusionStyle directly.

Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 11:03:48 +01:00
Samuel Rødal
9b62b01ddd Disable static contents optimization for now.
Since none of the platform backingstore implementations currently
implement this, skip trying to use the optimization for now to avoid
graphical glitches.

Task-number: QTBUG-27971
Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-11-15 18:15:50 +01:00
Thorbjørn Lund Martsum
fc271b4273 Regression fix to QHeaderView::setDefaultSectionSize
When the sections has been resized we need to calculate new values
for the section start-positions. Otherwise we break visualIndexAt
and sectionPosition.

This fixes a regression introduced in
b800d8b94a

Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-15 13:55:00 +01:00
Miikka Heikkinen
b8be2e67ea Change to enter/leave policy while grabbing.
Sending enter and leave events to other windows than the grabbing
window is not logical. The policy should be that only the grabbing
window receives enter and leave events.

Changed the documentation accordingly and provided the necessary
changes to Windows implementation.

Also removed explicit leave event generation for widgets when
popup is opened as that is now redundant.

tst_QWidget::underMouse() test was changed to behave according to
new logic.

Task-number: QTBUG-27871
Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 11:59:34 +01:00
Gabriel de Dietrich
9346cb9552 Widgets: Stop cursor blink timer when QLineEdit is read-only
This prevents unnecessary updates, since the cursor is not visible.

Change-Id: Iec54ed338a0cb526a03cd611de4d823e26f3d804
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-14 14:18:31 +01:00
Friedemann Kleint
39a0952687 Send enter to the child at the position of the QEnterEvent.
This was apparently done so in each of the widget_<platform>.cpp
in Qt 4.8. This then causes the cursor to be updated in
dispatchEnterLeave() on Windows and Linux.

Task-number: QTBUG-27871
Task-number: QTBUG-27585
Task-number: QTBUG-26424
Change-Id: Idf14cd96ccb36f7c2607853ed8b0024c36a5413c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-14 10:36:38 +01:00
Samuli Piippo
5208de1691 tests: Mark tst_qfilesystemmodel as insignificant on Mac
Task-number: QTBUG-27890

Change-Id: I8af9f019c00d38551ce04b4cdb4bb895a61a50c5
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-13 07:59:40 +01:00
Friedemann Kleint
2d07d3b4e3 Add a QEnterEvent containing the mouse position.
Enter handling requires knowledge of the mouse
position. Extend the enter handling of
QWindowSystemInterface to receive the position
(implemented for Windows, XCB and Mac), passing it
on to QEnterEvent. Dispatch QEnterEvent from
widgets code.

Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-10 20:08:28 +01:00
Oliver Wolff
d2e5c7787e Do not call QWidget::show/hideEvent twice
While handling events for Widgets and Windows in QWidgetWindow::event
makes sense for other events, it causes QWidget::show/hideEvent to be
called twice when handled like "the rest". Having that as one case here
seems to be the cleanest solution. Removing the call to showEvent from
QWidgetPrivate::show_helper (as proposed in the bug report) causes
autotests to fail and thus is not a viable option.

Additionally the expected result for the task221221 test for
QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was
restored.

Task-number: QTBUG-27199
Task-number: QTBUG-26424
Task-number: QTBUG-22565

Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-11-08 15:01:52 +01:00
Miikka Heikkinen
285f4daa47 Re-enable some skipped tests in tst_qwidget
Seems that these tests are now passing on Windows, so remove the skips.

Change-Id: Id30ef544502f97f8bc84f35f635e39912da3afe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-07 14:19:00 +01:00
Miikka Heikkinen
dde3f6a934 Fix excess enter events when showing modal dialog on button press
QApplicationPrivate::leaveAfterRelease was not properly cleared when
mouse event handling was interrupted by a modal dialog, which caused
every mouse move over the modal dialog to trigger enter event to the
widget under cursor.

Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event
without any buttons pressed is handled.

Task-number: QTBUG-27643
Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 08:44:38 +01:00
Miikka Heikkinen
715902051a Fix inconsistent leave/enter events for main window when popup is open
Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.

Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-11-06 20:26:43 +01:00
Sergio Ahumada
ccc4fbdf3f test: Remove some QSKIP's from tst_QStyle
Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-11-03 11:21:47 +01:00
J-P Nurmi
3c2bfbff5f Mac: refactor scrollbar animations
Get rid of QWidget-centric QMacStyle::eventFilter() and implement the
fade out animations for scrollbars using QNumberStyleAnimation-based
QFadeOutAnimation.

Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 19:49:22 +01:00
Mitch Curtis
61e0fa5d68 Make it obvious that adding a QLayout to QSplitter is not supported.
It does not make sense to add a QLayout to a QSplitter, since the
splitter manages its child widgets in the same manner as a QLayout.
The result of doing so is that the child widgets inside that layout
will lead to the splitter and the layout fighting to position the child
widgets.

QSplitter::addWidget should be used to add widgets directly to the
splitter instead.

Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679
Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-02 18:07:54 +01:00
Jens Bache-Wiig
28f36ebcc2 Fix progressbar animation on macstyle
The animation is not just supposed to run when indeterminate, but
also while it is progressing.

Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-02 18:07:35 +01:00
hjk
196c5bfe0f Compile fix for tst_qstylesheetstyle.cpp
There was a semicolon missing.

Change-Id: Id2eb843604907acf952d7d238f80ba8a7010ccd1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-01 16:12:15 +01:00
Stephen Kelly
3de5a8e78b Strip trailing whitespace in itemviews.
Using

 git ls-files -z |     xargs -0 sed -i 's/ \+$//'

in the relevant directories.

Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-01 16:10:32 +01:00
Sergio Ahumada
792eb1029d test: Remove QSKIP from tst_QListView::setCurrentIndexAfterAppendRowCrash
Change-Id: I8d48722b412895e43aa8a522354c5d67d83c19dd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-30 12:53:46 +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
5bddaf76e0 QComboBox: new signal currentTextChanged
Adds NOTIFY to currentText property.

Test included.

Change-Id: I3e92b585ad6697891d61537c82f6ab9e8beb1a00
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:24:19 +02:00
Mark Brand
84787d82ee QComboBox: fix use in QDataWidgetMapper/QItemDelegate
QItemDelegate and QDataWidgetMapper use the WRITE method on the USER
property to set a value in a widget. This did not work for QComboBox
whose USER property currentText lacked a WRITE method.

This change adds the missing setter and flags it as the WRITE method.

The setter setCurrentText() simply calls setEditText() if the combo
box is editable. Otherwise, if there is a matching text in the list,
currentIndex is set to the corresponding index.

Test included.

Follow-up to 816c554017 which restored
currentText as the USER property.

Task-number: QTBUG-26501
Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:24:00 +02:00
Friedemann Kleint
d0aa81ee10 Fix a crash in QFileDialog when selecting an invalid name filter.
When nameDetailsVisible is set to false and an invalid/empty
string is passed to selectNameFilter(), the regexp used to
strip the filter off the suffixes returns empty and a crash
occurs.

Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-26 11:51:56 +02:00