summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews
Commit message (Collapse)AuthorAgeFilesLines
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-1518-111/+111
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-031-7/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/accessible/qaccessiblecache_mac.mm src/gui/accessible/qaccessiblecache_p.h src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/kernel/qwidget_qpa.cpp Manually moved change in qwidget_qpa.cpp to qwidget.cpp (cd07830e3b27da7e96a0a83f91ba08c168b45e62) Change-Id: Ia51f471f9b53de2f3b07d77ea89db9303ac8961d
| * Address Book example: Fix QTableView column sortingTopi Reinio2014-07-021-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | Rearrange the code so that QTableView::setSortingEnabled() is called after setting up the sort filter. This ensures that new entries added to the model always follow the column header's sort order. Task-number: QTBUG-39585 Change-Id: Iaec8aa9342981817a019473ba12bad52cdbdfbb8 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | simpletreemodel example: rename parent() to parentItem() for clarityDavid Faure2014-05-253-18/+18
|/ | | | | | | | | | I show this example during trainings, and parent() is too much like QObject::parent(), QModelIndex::parent() and our model's parent() [which calls this method], so it's less confusing if this is called something clearer like parentItem(). Change-Id: I101342051349d94c4a3bc3d4bc332194d6779293 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CustomSortFilterModel example: fix build with QT_NO_CURSORAndrew Knight2014-03-061-0/+2
| | | | | Change-Id: Icb40e49365114fedd5f1ef118dbd61ff2c413863 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-5/+5
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-092-4/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add clear button and side action to customsortfiltermodel example.Friedemann Kleint2013-09-127-33/+223
| | | | | | | | Demonstrate the new side widgets feature of QLineEdit. Change-Id: I1c4289c652abf2209e50601871249008fdec4f6b Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QAbstractScrollArea - add SizeAdjustPolicy and viewportSizeHintChristoph Schleifenbaum2013-04-222-1/+3
| | | | | | | | | | This patch adds SizeAdjustPolicy to QAbstractScrollArea. If it is set to AdjustToContents it will make use of the new protected viewportSizeHint() (BC since it was reserved in Qt5). This function returns a suggested size based on contents. Change-Id: I5d8aa517e88b8b21c5712e62b4d574c3aad99d3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-1613-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Compile fix when QT_NO_PRINTDIALOG is definedPaul Olav Tvete2013-02-262-2/+2
| | | | | | | ...but QT_NO_PRINTER isn't. Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1899-99/+99
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-212-3/+3
| | | | | | | | | | | 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>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-1717-36/+34
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove QT+=widgets from SUBDIRS projectsOswald Buddenhagen2012-12-171-2/+0
| | | | | | | it makes no sense whatsoever Change-Id: Ica7c764575079a12512ee2eb62a995ebbefa09a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-176-6/+0
| | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix compile with -DQT_NO_DRAGANDDROPMontel Laurent2012-12-051-0/+1
| | | | | Change-Id: Ic7b42ae164f913f270c8350c2de6ce35f0be8c2a Reviewed-by: David Faure <david.faure@kdab.com>
* Fix memory leak. PrinterDialog is not deleted when close itMontel Laurent2012-11-301-3/+4
| | | | | Change-Id: I9f0a300cdaf9803bc2ad723946ac4d0f825cc28b Reviewed-by: David Faure <david.faure@kdab.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-2920-62/+19
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* re-enable coloreditorfactory and stardelegate examplesOswald Buddenhagen2012-11-281-1/+3
| | | | | | Change-Id: I99b1a1967973ea28acd9e37c922f96e9dca8875d Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* remove apparently unused fileOswald Buddenhagen2012-11-281-8/+0
| | | | | Change-Id: Ie8b60b9e63c5783674cbac3bbe277f58d3059ea3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* delete .desktop files of examplesOswald Buddenhagen2012-11-2817-187/+0
| | | | | | | | | they were added without an explanation, and they can't be particularly useful (because they contain hard-coded paths and refer to non-existing icons). Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Always use QAIM to get the default flags.Stephen Kelly2012-11-285-5/+5
| | | | | Change-Id: I801f5c8023e3e3672fde28139a7f34f640e650f5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove remaning TARGET.EPOCHEAPSIZE settings from examples.hjk2012-11-271-2/+0
| | | | | | | Not needed anymore. Change-Id: I28b6566e1498afb68295c16e8786fe8bc0256361 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-2620-39/+39
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QtBase: examples/widgets/itemviews code styleDavid Schulz2012-11-2266-385/+355
| | | | | Change-Id: I78a7745f7dc3add3fd7780220118d1b35b50a941 Reviewed-by: hjk <qthjk@ovi.com>
* QtBase: examples/widgets/itemviews/addressbook codestyleDavid Schulz2012-11-2211-73/+69
| | | | | Change-Id: I710d67018351c34ef14ac30edcca81aba7ff5ad3 Reviewed-by: hjk <qthjk@ovi.com>
* Fix building of examples.Friedemann Kleint2012-11-2120-40/+40
| | | | | | | | | | | - Correct install path of widget examples to contain widgets directory in target tree. - Add missing resources. Task-number: QTBUG-27977 Change-Id: If4cb117998892b0b165d7678367553d3a7553b91 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Use QStringList::join(QChar) overload where applicable [examples]Marc Mutz2012-09-232-3/+3
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I1d0c9782cc1522d937b930531720e32d4c8f7ce8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2299-813/+813
| | | | | | | | 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>
* Doc: Use QStyledItemDelegate and frameless spinboxes in spinbox delegate exampleGeir Vattekar2012-09-182-3/+4
| | | | | | | | Task-number: QTBUG-18847 Change-Id: I5347a1028b6f45a60e43fb75f6d362efecb6880b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* examples: Mark ctor's as explicitSergio Ahumada2012-09-177-7/+7
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: Ida9f9c2f0c8608c35b0137b2512a6747afd69515 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Moving .qdoc files under examples/widgets/docGabriel de Dietrich2012-08-20158-0/+11794
Updated those .qdoc files to refer to the new relative examples emplacement. Images and snippets to be moved later. Also grouped all widgets related examples under widgets. Change-Id: Ib29696e2d8948524537f53e8dda88f9ee26a597f Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>