summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.h
Commit message (Collapse)AuthorAgeFilesLines
* QComboBox: Modernise connect statementsAxel Spoerl2023-09-291-15/+0
| | | | | | | | | | | | | | Replace string based syntax with PMF. Use QObjectPrivate::connect. Rename _q_ functions. Fix dangling connections in QComboBox d'tor: Completely disconnect model, instead of only disconnecting QObject::destroyed. Task-number: QTBUG-117644 Pick-to: 6.6 6.5 Change-Id: Ie87ac4881029ed1ef2f5c627f631cc54ccb39706 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Consistent indentation for all Q_PROPERTYsAndreas Buhr2021-06-241-1/+2
| | | | | | | | Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I8c97a0b2de2bed78456322be271724fc47479d83 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Make initStyleOption virtual for various classesThorbjørn Lund Martsum2020-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | Often a simple change in the styleoptions is needed in e.g a paintEvent, but it was impossible without copying the whole paint-function which is not always trivial and also wouldn't be kept up-to-date if it was changed in Qt. The initStyleOption is similar to viewOptions in QAbstractTableView and it is handy that this function is virtual. Furthermore QStyledItemDelegate::initStyleOption is already virtual. This change only makes initStyleOption virtual for public classes. [ChangeLog][QtWidgets] InitStyleOption has been made virtual in public Qt classes to make override of stylebehavior more simple. Change-Id: I38974c6d4dd0793ca5976ecf3aa28892215a1579 Task-number: QTBUG-77642 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QComboBox: Remove deprecated auto-completion propertiesVolker Hilsheimer2020-05-061-21/+0
| | | | | | | | | | | | The replacement is to set, and configure, a QCompleter directly via setCompleter. With the removal of the separate properties in QComboBox, the configuration of the completer is not maintained if the line edit is replaced. A QCompleter is created and set implicitly when the line edit is set, unless the line edit came with a completer. This is what the auto test verifies as well. Change-Id: I9a4c73db5e39a2558aad346c0904be6deb4f1cd2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove deprecated QComboBox::SizeAdjustPolicy enum valueVolker Hilsheimer2020-04-271-5/+1
| | | | | Change-Id: Ia8ae2eb11b86bc615e1297d7fabd1afcb821557c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * Fix deprecation of QComboBox:::currentIndexChanged(const QString&)Lars Knoll2020-03-251-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Don't introduce another overload with two parameters. Users want a simple signal to connect to, not another overload. Deprecate the currentIndexChanged(QString) overload, usage of that can/should get replaced by currentTextChanged(). This partially reverts commit 11dc7b35c8c3957bd19087a5e3ae7cfc4f1a3343. Change-Id: I5e7d16413f3d62b1a5a7a197f510af2c45cdfa55 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-281-2/+5
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * QComboBox: deprecate SizeAdjustPolicy::AdjustToMinimumContentLengthVolker Hilsheimer2020-02-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As per ### Qt 6 comment and pre-existing documentation, one of the other enum values should be used anyway. Only usage in QtWidgets is in QFileDialog, replace it there with appropriate alternative. [ChangeLog][QtWidgets][QComboBox] the SizeAdjustPolicy value AdjustToMinimumContentLength is deprecated, use AdjustToContents or AdjustToContentsOnFirstShow instead. Change-Id: I22deaa31fbb6c09e87c814e120eb7ee27c177ea9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QComboBox: remove currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-191-6/+0
| | | | | | | | | | | | | | Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-131-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * QComboBox: deprecate currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-111-0/+5
| | | | | | | | | | | | | | Task-number: QTBUG-81845 Change-Id: Ia0ff5321423a5d3d4853bd425dd7236926f16047 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QComboBox: remove deprecated signalsVitaly Fanaskov2020-02-101-6/+0
| | | | | | | | | | | | | | | | | | | | | | The following signals have been removed: - void activated(const QString &); - void highlighted(const QString &); Task-number: QTBUG-81845 Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Make setModel() virtualAndrew Patterson2019-12-061-1/+1
|/ | | | | | | Task-number: QTBUG-74255 Change-Id: I354e547dd75019a964f4b8e4f087a72e610816f3 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QComboBox: add property placeholderTextChristian Ehrlicher2019-11-151-0/+4
| | | | | | | | | | | | | | | | | QComboBox had no option to tell the user that he must select an item - there was no placeholder text like e.g. in QLineEdit. This feature is widely used in html forms so we should support it also. Therefore add a new property 'placeholderText' to specify a text which should be shown when the current selected index is invalid. [ChangeLog][QtWidgets][QComboBox] QComboBox got a new property 'placeholderText' Change-Id: If6dac45c9f43455474e267907b0b0d893301c611 Fixes: QTBUG-1556 Fixes: QTBUG-2776 Fixes: QTBUG-77141 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-101-4/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/time/qdatetime.cpp src/widgets/widgets/qcombobox.h Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
| * QComboBox: revert deprecation of currentIndexChanged(QString)Christian Ehrlicher2019-07-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | QComboBox::currentIndexChanged(QString) was deprecated due to the fact that there is a currentTextChanged(QString) signal but this signal is not equivalent to the other since it's also emitted when the lineedit text changes. Therefore revert the deprecation of this signal. Fixes: QTBUG-76890 Change-Id: Ia314116a5ac4e43e60383da9e729e24ffb3e8b30 Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-141-1/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * QComboBox: add QT_DEPRECATED_X() for deprecated functionsChristian Ehrlicher2019-05-091-1/+4
| | | | | | | | | | | | | | | | | | QT_DEPRECATED_X() was not added with d6d33f0b80dd85043c71f71a3ed5485d6014e6c4 for the deprecated QComboBox functions - Add them now. Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QtBase: introduce QT_DEPRECATED_VERSION/QT_DEPRECATED_VERSION_XChristian Ehrlicher2019-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_DEPRECATED_VERSION(major, minor) and QT_DEPRECATED_VERSION_X(major, minor, text) outputs a deprecation warning if QT_DEPRECATED_WARNINGS_SINCE is equal or greater than the version specified as major, minor. This allows the user to hide deprecation warnings which can't yet be fixed for their codebase because the minimum required Qt version does not provide the replacement function. If QT_DEPRECATED_WARNINGS_SINCE is not set by the user, it's set to QT_DISABLE_DEPRECATED_BEFORE if available, otherwise to QT_VERSION. [ChangeLog][QtCore][QtGlobal] Add new macros QT_DEPRECATED_VERSION and QT_DEPRECATED_VERSION_X to conditionally display deprecation warnings Change-Id: I61b1a7624c9b870695c9e3274313de636f804b5d Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | QComboBox: add two new signals textHighlighted() and textActivated()Christian Ehrlicher2019-02-231-3/+9
|/ | | | | | | | | | | | | To avoid overloaded signals for highlighted() and activated() add two new signals textHighlighted()/textActivated() and deprecate the old QString overloads. [ChangeLog][QtWidgets][QComboBox] Two new signals textHighlighted() and textActivated() were added to replace highlighted()/activated() QString overloads Change-Id: I62df7e606b335b5c756315a800654d7d0de442bd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QComboBox: deprecate signal currentIndexChanged(const QString &)Christian Ehrlicher2019-02-121-0/+3
| | | | | | | | | | | | QComboBox has two overloaded signals currentIndexChanged(). This results in a need to use QOverload<>::of or similar when using the new signal/slot syntax. Since there is already a signal 'currentTextChanged()' which is emitted too, deprecate 'currentIndexChanged(const QString &)'. Change-Id: Iadac8930de1721b042fa1daea097c8ab5378738e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QtWidgets: mark obsolete functions as deprecatedChristian Ehrlicher2019-02-061-0/+4
| | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QLayout::margin()/setMargin() - QComboBox::autoCompletion()/setAutoCompletion() - QComboBox::autoCompletionCaseSensitivity() - QComboBox::setAutoCompletionCaseSensitivity() - QTextStream& operator<<(QTextStream&, const QSplitter&) - QTextStream& operator>>(QTextStream&, QSplitter&); Change-Id: Ic16b36bf647413b5b3ea2d9105981b95370b3178 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-5/+6
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Convert features.spinbox to QT_[REQUIRE_]CONFIGStephan Binner2017-09-121-0/+1
| | | | | | | | | | Change-Id: Idecb6927c20ff009795b0ad94bbb7199df98a8f8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.completer to QT_[REQUIRE_]CONFIGStephan Binner2017-09-041-5/+5
| | | | | | | | | | Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-18/+18
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Convert features.combobox to QT_[REQUIRE_]CONFIGStephan Binner2017-07-251-4/+2
| | | | | Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-281-1/+1
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add qtwidgetsglobal.h and qtwidgetsglobal_p.hLars Knoll2016-07-141-0/+1
| | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Widgets. For now it defines the Q_WIDGETS_EXPORT macro for this library. Change-Id: I6698989b952b9bac94d086d9f219e03c000f7d53 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QComboBox: Implement support for IM queries with QVariant argumentRichard Moe Gustavsen2016-04-141-0/+1
| | | | | | Change-Id: If59c36fa1b18a0d5562047dd06758fbcdbf63bc7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fixed build breaks that result after disabling "contextmenu" featureShrikant Dhumal2015-09-091-0/+2
| | | | | Change-Id: I261f927ee720e0c65abd18417e1ac48dbee820df Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* QtWidgets: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-061-1/+1
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: Ie67d235151ca8d4ef5e721c9cf4a6fd32bd167a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QtWidgets: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-081-2/+2
| | | | | Change-Id: Id5280c1d9feab95e1506569f3d0eb23eeb74935f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-18/+18
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * QComboBox: fix item activation via completerJ-P Nurmi2013-08-081-2/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-31146 Change-Id: I64291f397d80bf934152f63e629810540abf466e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Add QComboBox::currentDataGiuseppe D'Angelo2013-05-271-1/+2
|/ | | | | | | | | | | | | | | | Convenience function that returns user data for the current item, analogous to currentText(). This avoids to having to write the cumbersome QVariant variant = comboBox->itemData(comboBox->currentIndex()); (It's quite common to put strings as text and the corresponding enum values as user data.) Change-Id: I8c7632c647c5583d18e4e22703aeb4447d73162d Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-191-1/+1
| | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QComboBox: new signal currentTextChangedMark Brand2012-10-261-1/+2
| | | | | | | | | | | 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>
* QComboBox: fix use in QDataWidgetMapper/QItemDelegateMark Brand2012-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | 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 816c5540179362500dfc175b77f05abf3ef25233 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* make currentText the USER property for QComboBoxMark Brand2012-08-101-2/+2
| | | | | | | | | | | | | QItemDelegate takes the USER property as the value to be set using model->setData(). The text is what is expected. follow-up to b1b87a73012342dc1619a8e907ea9954d59ca564 which in Qt 4.8.0 broke the interaction between QComboBox and QItemDelegate used by QDataWidgetMapper and item views. Task-number: QTBUG-26501 Change-Id: I005a0a6af5265ee22baf417957e520992d16d6e1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>