summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-014-26/+27
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Accessibility: Use new updateAccessibility() API in widgets.Friedemann Kleint2012-02-012-3/+3
| | | | | Change-Id: Id69cc28a54abc675a991f2c657a446f38313ac6e Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QDir::NoDotAndDotDot is now QDir::NoDot|QDir::NoDotDot.Jonas M. Gastal2012-01-311-2/+2
| | | | | | Change-Id: I8ef7782258c2ec02ad2ec2a5d5cab90f53c62aa3 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove many deprecated methodsLars Knoll2012-01-312-61/+3
| | | | | | | | | | Remove methods that have been marked as deprecated before Qt 4.6. Keep others, but inline them where possible and mark them as QT_DEPRECATED_SINCE(5, 0). Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Windows: Fix compilation with -qtnamespaceKai Koehne2012-01-311-2/+2
| | | | | Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove Symbian and Maemo 5 code from QtWidgets.Xizhi Zhu2012-01-3111-157/+12
| | | | | Change-Id: I715c0ec70cbad05a6ba9737e49be9da7cbd65bf9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-303-16/+18
| | | | | | | Use prototypically for qwizard_win.cpp. Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3038-38/+38
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QSizeGrip: Fix Windows.Friedemann Kleint2012-01-271-6/+2
| | | | | | | Reactivate the old Windows code. Change-Id: Ied467cf83d89c76a0fa8edf3c76bb207cc2a70e0 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Decouple QPlatformTheme from QDialog.Friedemann Kleint2012-01-271-11/+26
| | | | | | | | | | - Use an enumeration for the dialog type. - Implemented on Windows and Mac Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2510-10/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QMessageBox: Clean up some Q_WS_WIN code.Friedemann Kleint2012-01-241-16/+20
| | | | | | | | Enable 'Close' of system menu according to whether escape button is present. Change-Id: I305e4732f781dbe2d81c2503ee278ec33579acdb Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove Qt 5 notes that would result in source incompatibility unnecessarily.Robin Burchell2012-01-241-1/+0
| | | | | | | Change-Id: Ib221ab078f9ff5c385d35699ee1d093b0e95557c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove invalid comment.Richard Moore2012-01-231-2/+1
| | | | | | | | | | No point in making this protected: it breaks existing code including the unit tests, and the base class has this method as public. Task-number: QTBUG-23524 Change-Id: I8fae019088fc368213ff7caa4b19fe7ab60488dd Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update contact information in license headers.Jason McDonald2012-01-2338-38/+38
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Obsolete QInputDialog::getInteger() 'officially'.Robin Burchell2012-01-222-29/+7
| | | | | | | | | It has long since been obsolete in code and removed from the documentation, but was never marked QT_DEPRECATED. Do so, and inline the implementation. Change-Id: Ic7bfdaf76269b7f9addeba83e64bc9525c581dda Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge overloads of QInputDialog::getText() and QInputDialog::getItem()Robin Burchell2012-01-212-39/+1
| | | | | Change-Id: Ifaefaa5c3faa698c8570da4ef00e130c211b2609 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge overloads of QFontDialog::getFont().Robin Burchell2012-01-212-23/+2
| | | | | | | | Per Qt 5 comment. Note that this leaves one overload of getFont() intact, as removing it would be a source-incompatible change. Change-Id: Ieb6ddfef9aa86750c14928ab2e0a9bfb84d322ab Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove note about source-incompatible change.Robin Burchell2012-01-211-1/+0
| | | | | | | | There's no real gain to be had from doing this. Change-Id: Ifa5fefe4a354cfe1f9a8a915a7041d0cfebccce1 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove unnecessary sizehint overload.Robin Burchell2012-01-212-11/+0
| | | | | | Change-Id: Id6b3e206d59df25f6252da48ac99265226313635 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Richard J. Moore <rich@kde.org>
* Change QMessageBox::question to default to yes/no buttons instead of okThorbjørn Lund Martsum2012-01-211-3/+1
| | | | | | | | | Beside that it also removes a suggestion about making Ok==Yes and No==Cancel. It would be a problem since we (at least) can have messageboxes with both yes, no and cancel. Change-Id: I567979b2e697e7103968d6512fe4835f86888ca3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Change visibility of eventFilter().Robin Burchell2012-01-201-3/+1
| | | | | Change-Id: I2d47e3d1f5a8fac5a1fe4638dce87a9e036f8544 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove Q_CC_NOKIAX86.Robin Burchell2012-01-191-2/+0
| | | | | | | | This is no longer supported. Change-Id: Ic393bc48c4c842514da69b6696cfb62b54360070 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Ensure proper locking in QFileInfoGathererBradley T. Hughes2012-01-121-2/+3
| | | | | | | | | | | | | | The mutex is used to protect the QFileSystemWatcher instance created by QFileInfoGatherer, except when calling getFileInfos(). Add a locker before using QFileSystemWatcher in this function. Note: it appears that QFileInfoGatherer is misusing QFileSystemWatcher by calling it from multiple threads. QFileSystemWatcher is an event driven class, and as such, not thread-safe. So far, no problems have been reported related to this, so I've left the code as-is. Change-Id: Ib1429d9399e37120acf8e8d3b989b83c4ce24203 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Docs: Forward-ported typo and link fixes from Qt 4.8Janne Anttila2012-01-111-2/+2
| | | | | | | | | | | | | This commit brings already accepted doc fixes to Qt5. Task-number: QTBUG-9224 Task-number: QTBUG-13442 Task-number: QTBUG-19858 Task-number: QTBUG-21447 Change-Id: I2ebc7c3e74427545367bdcec51e9e710a4925747 Merge-request: 1402 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix a crash in QDialog.Friedemann Kleint2012-01-101-2/+2
| | | | | | | Call d->helperDone before deleting 'this'. Change-Id: I06224f4d3a868dccd505b1f1d3ed56af6f339ba3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0538-39/+39
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QPlatformDialogHelpers: Reduce dependency on QDialog.Friedemann Kleint2011-12-149-215/+226
| | | | | | | | | | For each QDialog-derived class, introduce a Q[X]Options class containing the options of the dialog. An instance is shared between the QDialog (or dialog desktop component) and the helper. Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Silence -Woverloaded-virtual warnings in QFileDialogBradley T. Hughes2011-12-124-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPaintDevice::init() virtual, reimplemented in QWidget, is hidden by these declarations, and clang (and gcc with -Woverloaded-virtual) warns about this. There is no need to overload the init() name, use more descriptive names instead. dialogs/qsidebar_p.h:124:10: warning: 'QSidebar::init' hides overloaded virtual function [-Woverloaded-virtual] void init(QFileSystemModel *model, const QList<QUrl> &newUrls); ^ dialogs/qfiledialog_p.h:303:10: warning: 'QFileDialogLineEdit::init' hides overloaded virtual function [-Woverloaded-virtual] void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; } ^ dialogs/qfiledialog_p.h:314:10: warning: 'QFileDialogComboBox::init' hides overloaded virtual function [-Woverloaded-virtual] void init(QFileDialogPrivate *d_pointer); ^ dialogs/qfiledialog_p.h:330:10: warning: 'QFileDialogListView::init' hides overloaded virtual function [-Woverloaded-virtual] void init(QFileDialogPrivate *d_pointer); ^ dialogs/qfiledialog_p.h:342:10: warning: 'QFileDialogTreeView::init' hides overloaded virtual function [-Woverloaded-virtual] void init(QFileDialogPrivate *d_pointer); ^ kernel/qwidget.h:682:10: note: hidden overloaded virtual function 'QWidget::init' declared here void init(QPainter *painter) const; ^ Change-Id: I7a317a551b92fde966e61958dcaf25dea94d69b4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge QColorDialog::getColor() overloads.Robin Burchell2011-12-082-37/+3
| | | | | | | | Symbian-specific code was removed as a side effect of the merge. Change-Id: I01d28b2aa2fef16ce3988382c2b2a0436c46227c Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QtGui: Bring back HBITMAP/HICON conversion functions.Friedemann Kleint2011-11-281-2/+5
| | | | | | | | | | - Move the conversion functions from the Lighthouse plugin to QtGui as qt_pixmap/From/To/HBITMAP/HICON(). - Re-enable them in Widgets (QFileIconProvider, QWindowsStyle). - Use them in QtPrintSupport. Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix broken Solaris build (getpwnam_r usage)Iikka Eklund2011-11-181-1/+6
| | | | | | | | | | | | | Added ifdef inside qt_tildeExpansion function to use correct version of getpwnam_r depending on _C_POSIX_SOURCE version on Solaris platform. Task-number: QTBUG-21451 Merge-request: 1380 Reviewed-by: ossi (cherry picked from commit 48f64fc7ae9f0e9e8ab07ab60ccd55d3b053dfab) Change-Id: I48f64fc7ae9f0e9e8ab07ab60ccd55d3b053dfab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* qtbase: Warnings fixes.Friedemann Kleint2011-11-181-0/+1
| | | | | Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix for the button size calculation in qmessagebox.cppMikko Knuutila2011-11-141-1/+1
| | | | | | | | | | | Actually use the calculated size for needed space instead of just ignoring the return value. Task-number: QTBUG-16315 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 0792215fa8d227617a2080af9f12fd7f486b87d6) Change-Id: I0792215fa8d227617a2080af9f12fd7f486b87d6
* Factor out QPlatformTheme from QPlatformPlugin.Friedemann Kleint2011-11-111-2/+2
| | | | | | | | | | | | | | | | | | Implement QCocoaPlatformTheme. The menus and dialog API is moved from the platform to the theme plugin. (Both APIs contain references to QtWidget classes, which we are working towards removing.) The theme plugin is created after the platform plugin, first by asking the platform plugin, then by looking for a separate plugin if the platform does not specify a theme. Initial-patch-by: Morten Sorvig <msorvig@trolltech.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I2778cdd3a205c4ce35ead93e39fe6b4cd58a39f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QPlatformDialogHelper: Split class hierarchy, decouple from DialogFriedemann Kleint2011-11-118-42/+106
| | | | | | | | | | | | | | | | | | | | | - Introduce hierarchy of QPlatformDialogHelper-derived classes for font, color and file dialogs. - Start reducing dependencies on QDialog: * Remove QDialog-specifics from interface, introduce enumeration for DialogCode * Make the helpers Q_OBJECTS to be able to add the signals passed on to the QDialogs * Remove QDialogPrivate pointer - Split setVisible_sys() in show_sys() (factory method for native dialogs) and hide_sys(). Pass parent window to show_sys(), removing the necessity to query the QDialog for it - Introduce a styleHint() similar to QGuiApplication's for platform-specific - Fix compile in cocoa/windows, reduce depency on QDialog (-private) classes. Change-Id: Ic1cb715e1edf767f2cb18b9780341d189339ef1d Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Widgets: Remove dialog functionality from QGuiPlatformPlugin.Friedemann Kleint2011-11-093-112/+10
| | | | | | | | | | (as QGuiPlatformPlugin is deprecated) Clean up qdialog.cpp. Acked-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Change-Id: Id49d6cfe235d5afb4c89b0697c6b3980130a5299 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Widgets: Remove remains of Windows file dialog.Friedemann Kleint2011-11-084-1225/+2
| | | | | | | Also remove Windows-specific binary compatility hack from Qt4. Change-Id: I4b6914b357f21737e392745f907c770db9f7a641 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Widgets: Use QPlatformDialogHelper in QColorDialog/QFontDialog.Friedemann Kleint2011-11-085-25/+26
| | | | | Change-Id: Ib9a2f19679c2d4c8583742a918d61c1a98403843 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QWidgets: Delayed creation of the QPlatformDialogHelper.Friedemann Kleint2011-11-044-41/+52
| | | | | | | | | - Create helper only once and ensure deletion - Move nativeDialogInUse into QDialogPrivate, ensuring the native modal helper is called from QDialog::exec() only if it is true Change-Id: Id92b278bb051ce254458f276fbf7075689a7d491 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Native file dialog support for MacMorten Sorvig2011-10-278-72/+140
| | | | | | | | | | * New API: QPlatformDialogHelper to support native dialog on QPA. (Currently, It supports only file dialog.) * Modify QDialog* and QFileDialog* to support native dialog. * Add native file dialog support to cocoa platform plugin. Change-Id: I957f046748a27a33fd9f8af3c525feabd1b0f582 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Widgets: Remove Q_WS_QPA and qpa-sections from .pro files.Friedemann Kleint2011-10-218-136/+10
| | | | | | | | | | | | Enable compilation without -qpa. - Remove conditionals from Q_WS_QPA sections. - Rename precompiled header. - Remove gui-related Q_OS_SYMBIAN-#ifdef sections. - Leave other Q_WS code in for reference. Change-Id: I16326b631fff483aec8edd2f7a2e7a1822eab814 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Widgets: Remove Symbian-specific code.Friedemann Kleint2011-10-193-316/+1
| | | | | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: Ieee43d6650f5b1968fc7d77e618096701ffef941 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean-up a macro for CocoaMorten Sorvig2011-10-104-472/+0
| | | | | | | | | Remove the usage of Q_MAC_USE_COCOA and Carbon code paths. Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112 Reviewed-on: http://codereview.qt-project.org/5100 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Move the documentation for the classes to their modules.Casper van Donderen2011-10-0310-4/+13
| | | | | | | | | | | All documented classes under src/widgets should now be under the QtWidgets module in the documentation. The QtPrintSupport classes should now be under the QtPrintSupport module in the documentation. Change-Id: I236b15443b8b93a61578a1d10f52b64dba938f29 Reviewed-on: http://codereview.qt-project.org/5520 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Refactor accessibility for Qt5Jan-Arve Saether2011-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Moved most stuff to gui\accessible * Moved widget-specific stuff to widgets\accessible * Moved platform-specific code to either the bridge plugin (this was already the case) or to the platform plugin. * Added several classes and functions. These have not yet gone through an API review. The plan is to do that in a later commit. Classes: - QPlatformAccessibility - QWindowsAccessibility Functions: - QWindow *QAccessibleInterface::window(); - QPlatformAccessibility *QPlatformIntegration::accessibility() * The bridge code can now either be a plugin or integrated into the platform plugin * Mac accessibility is left out for now. Unix "should still work" (tm). These platforms should be fixed soon. Change-Id: Ib49ffa73b647ee0af90864544c2769440157f562 Reviewed-on: http://codereview.qt-project.org/5330 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Get rid of the last traces of QMimeSourceLars Knoll2011-09-292-2/+2
| | | | | | | | | | | The class has been deprecated since Qt 4.0, but couldn't be removed as QDropEvent inherited from it. Change-Id: I9caa19b30977a319e79255900dee8b2425783f46 Reviewed-on: http://codereview.qt-project.org/5754 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Widgets: Remove QT3_SUPPPORT.Friedemann Kleint2011-09-2810-315/+0
| | | | | | | | | | Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ie884f0cc9b3970b01c3c0c26600b1bcd92548077 Reviewed-on: http://codereview.qt-project.org/5629 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move printing into it's own libraryLars Knoll2011-08-1958-6740/+3
| | | | | | | | | | | | Create a libQtPrintSupport library that contains our current printing infrastructure. Long term this will get replaced with a libQtPrint, as the current architecture is not really maintainable. Change-Id: I7362fff6786b58c5b4e9213c23eda36d15048aa2 Reviewed-on: http://codereview.qt.nokia.com/3209 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Don't rely on QPrinter in widgetsLars Knoll2011-08-191-0/+1
| | | | | | | | | | | Use the QPagedPaintDevice instead for the current print() methods. Like this we can move the whole printing system into it's own library. Change-Id: I5e23fb3a9304eb3d12aa54959893601566249e23 Reviewed-on: http://codereview.qt.nokia.com/3208 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>