summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Revert logic when building with --force-assertsHarald Fernengel2011-11-161-14/+2
| | | | | | | | | | This reverts commit f109f5b8a9c7e6939dfd6c6f72a3b67548f5483c. Instead of disabling the asserts, rather enable the debug code so the asserts actually trigger. Change-Id: I6f62588d836de5c926294241e8d7196a963e4aac Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
* Fix Q_ASSERT usage in case -force-asserts is enabledEckhart Koppen2011-11-161-0/+12
| | | | | | | | | | | Certain Q_ASSERT usages are not compiling with -force-asserts since they are checking for instance variables or other items which are not available in release mode. This fix guards the asserts to only be enabled in debug mode. Change-Id: I2ed74e3d5118608361e8c924e93d8ff0efdc8eab Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QDockWidget titlebar button positioning on Mac OS XPasi Matilainen2011-11-151-0/+101
| | | | | | | | | | | Move the QDockWidget close and float buttons from the right end of the dock widget title bar to the left end to avoid Mac App Store rejection. Task-number: QTBUG-19493 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 3b2bd144b7873daf2e7119248dbac7c0f0253993) Change-Id: I3b2bd144b7873daf2e7119248dbac7c0f0253993
* Fixed memory leak in Windows Vista style widgetsTero Ahola2011-11-151-0/+1
| | | | | | | | | | | | | The animations are now deleted in destruction of the Vista style. With the previous implementation the animations were not deleted for instance if you move mouse cursor off from a widget with hover animation (like QPushButton). Task-number: QTBUG-21532 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 261bbb12003dab0e45b5814f85dd74aa64bcfb79) Change-Id: I261bbb12003dab0e45b5814f85dd74aa64bcfb79
* Integrate testcocoon support into Qt build system.Rohan McGovern2011-11-151-0/+8
| | | | | | | | | | | | To instrument a Qt application or library with the TestCocoon coverage tool, do `CONFIG+=testcocoon' in the application .pro file. To instrument Qt itself with testcocoon, use the `-testcocoon' configure option. Change-Id: Ie77109a078d11ea51f7a073621e0df9c752c44ae Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@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
* Disable qmacstyle test on Mac OS XBradley T. Hughes2011-11-141-1/+1
| | | | | | | | | | | The QMacStyle is not built as part of QtWidgets at the moment (see the TODO in src/widgets/styles/styles.pri), so disable the test for now. I've included a comment in styles.pri to re-enable the test once the style is done. Change-Id: Ia6ea130135586f107ba257bf2c6c2c7187a830b6 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove unused Mac codeJiang Jiang2011-11-141-5/+0
| | | | | Change-Id: I226ff0928cdeb70bb7f71ccace5066a430c3b05c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix QPlainTextEdit when using Qt::TextSelectableByKeyboard flagjahonkon2011-11-141-1/+1
| | | | | | | | | | | It is not possible to select text with keyboard when specifying only Qt::TextSelectableByKeyboard flag. Task-number: QTBUG-18952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 054fa68b6ae852e84f2d44a73260b4282286f5ab) Change-Id: I054fa68b6ae852e84f2d44a73260b4282286f5ab
* Mac: Fix the color of check marks in menus with stylesheetTero Ahola2011-11-141-3/+7
| | | | | | | | | | Task-number: QTBUG-16989 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com> (cherry picked from commit 22c7a2f69e833789e9b5613f809ea43561624482) Change-Id: I22c7a2f69e833789e9b5613f809ea43561624482
* Fixed wrong QGroupBox check stateMarkku Heikkila2011-11-141-0/+4
| | | | | | | | | | Handle mouserelease only if mouse is pressed in QGroupBox. Task-number: QTBUG-19170 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit df819cfe17f6dfd089096063524932fc4975804f) Change-Id: Idf819cfe17f6dfd089096063524932fc4975804f
* Fix QDateEdit calendar pop-up having wrong datejahonkon2011-11-141-0/+2
| | | | | | | | | | | | | | When the calendar pops up it moves the date to maximum instead of keeping the current date. Problem was caused by QCalendarPopup signalling date change to QDateTimeEdit during internal date synchronization from QDateTimeEdit to QCalendarPopup. Task-number: QTBUG-11422 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com> (cherry picked from commit b0c09896a239197411027e773214a2635744695c) Change-Id: Ib0c09896a239197411027e773214a2635744695c
* Factor out QPlatformTheme from QPlatformPlugin.Friedemann Kleint2011-11-113-5/+5
| | | | | | | | | | | | | | | | | | 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>
* Add API to clear the current index. Symmetric with clearing selection.Stephen Kelly2011-11-112-1/+10
| | | | | Change-Id: I08070f4fdf26898d5b6edd5259f011f9b3c75512 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make this API virtual to make selection proxying possible.Stephen Kelly2011-11-111-1/+1
| | | | | Change-Id: Ie93c8b38c59d347026a68eae03687d9017b3d048 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPlatformDialogHelper: Split class hierarchy, decouple from DialogFriedemann Kleint2011-11-1110-52/+203
| | | | | | | | | | | | | | | | | | | | | - 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>
* Repaint QProgressBar when minimum or maximum changedTero Ahola2011-11-111-4/+10
| | | | | | | | | | | | | | The implementation of QProgressBar::setMinimum and setMaximum did not repaint the widget. This caused the widget to be shown incorrectly in case you call setMinimum or setMaximum but not setValue. Task-number: QTBUG-22121 (cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QProgressBar causing timer event spamTero Ahola2011-11-112-23/+37
| | | | | | | | | | | | | | | On Windows you will get a lot of timer events if you use QProgressBar widget. This is because QWindowsStyle uses a timer to animate a progress bar with unknown state (min and max values both zero). The issue was fixed by starting the timer only if needed. Task-number: QTBUG-10501 (cherry picked from commit 72e61b127470b044e370af7017fa8a5b0538244f) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: If9ff2ab99929d9b85a7ffa8f6fd47b045b982f67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Doc: Added more appropriate links to help reduce confusion.David Boddie2011-11-111-0/+2
| | | | | | | | | Task-number: QTBUG-19919 (cherry picked from commit 26c29a2dd7efa4c66063d1255e1f694462cbae85) (cherry picked from commit 8304ca4edd7bd71dd0398451e62a281eac54d0a6) Change-Id: Icd45465723f9077f109459df002556be81dddb33 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QWidget text editors to commit text on their own on losing focusPekka Vuorela2011-11-106-8/+8
| | | | | Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QTextEdit to use tentative commit instead of QInputPanel::commit()Pekka Vuorela2011-11-102-5/+25
| | | | | | | Latter to be deprecated. Change-Id: I2c302c73a7ab2f4201af6a3c6fb4a64a4760263e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Implement partial tentativeCommit support in QTextEditPekka Vuorela2011-11-105-10/+36
| | | | | | | Available on plain text for now, html support still pending. Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove unused MMX/3DNOW/SSE/SSE2/SSSE3/NEON custom compiler logicBradley T. Hughes2011-11-101-158/+0
| | | | | | | | The QtWidgets module doesn't contain any code that needs these custom compilers (that code has been move to QtGui). Change-Id: I655e478908bfa0b646e68210f6215d9ffbb1f81e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove unnecessary variable self-assignmentBradley T. Hughes2011-11-091-2/+0
| | | | | | | | | | | | | | | | | Assigning an int variable to itself is unnecessary and pointless, remove them. styles/qplastiquestyle.cpp:932:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ styles/qplastiquestyle.cpp:939:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ Change-Id: I0118874028bf43992bcce07f87b46b48868436cc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Widgets: Remove dialog functionality from QGuiPlatformPlugin.Friedemann Kleint2011-11-094-129/+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>
* Make usage of internal QVariant space.Jędrzej Nowacki2011-11-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | Each QVariant instance has internal storage which may be used for well-know basic types. This patch changes the behavior by delegating type dependent operation to QMetaType class which knows more types than QVariant itself. The patch significantly reduce amount of code in QVariant implementation. There are few side effects of this patch: - better performance: * for Core types when using Gui (QGuiVariant is able to construct Core types) * for small custom types (QVariant::Private::Data is used for all types that has size small enough) - comparing two QVariants can give different result for small custom types (binary comparison instead of pointer comparison) Change-Id: Ic17fa500d6a882110bfba896fd456c8e6c7a63a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Cocoa cursor support: Add QCocoaCursor.Morten Sorvig2011-11-081-522/+0
| | | | | | | Port the Qt 4 mac implementation. Change-Id: I3bc6fd0b5a0398dcf43a5aaa3b498bb74b42c105 Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* Bump QCoreApplicationPrivate::app_compile_version to 0x050000Bradley T. Hughes2011-11-071-6/+2
| | | | | | | | | The minimum compile version is 0x050000 now, it cannot be less. Remove checks for 0x040200 in the widget code, which provided compatibility in the 4.x series for binaries compiled with 4.0 and 4.1. Change-Id: Ia01da90de26dca6aeeb79d29c754cbeeecf809af Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QLineEdit - made mouse interactions commit preeditPekka Vuorela2011-11-055-16/+83
| | | | | | | | | | | | | | | | Simplifying input context mouse handling rules by making the editor in charge when text gets committed and selected. This includes: - Allowing selection to start on top of preedit. Commits once a single character gets selected - Double click to commit preedit before selecting a word. - Only sending events to input context that happen on top of preedit. - Committing preedit when a mouse press happens outside of it, allowing to move cursor to click position. Change-Id: I9dab00ea3445055ffd0d7cae540a1197c5748509 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix broken indendation with hard tabsPekka Vuorela2011-11-051-4/+4
| | | | | | Change-Id: I1aa161ddab55f11683b2eee3c205505a829013c4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Support tentative commit string with input method.Pekka Vuorela2011-11-053-5/+38
| | | | | | | | | Tentative commit string allows input method to notify editor what is expected to be committed in the place of preedit. This commit adds such support in QLineEdit. Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QTextEdit - mouse events to override input contextPekka Vuorela2011-11-052-100/+121
| | | | | | | | | | - Selection can start on top of preedit - Mouse press outside preedit commits - Double click to commit on top of preedit Change-Id: Ia2698d97d354a677d935de1a8fd9ed53a161ca5e Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Prevent timestamps in widgets' touch events from disappearingLaszlo Agocs2011-11-043-6/+10
| | | | | Change-Id: I096914eb2b02ad9c4a5c0462a1f4b76ef17c3957 Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Add QT_MODULE(Gui) macroSergio Ahumada2011-11-031-0/+2
| | | | | | | | | Fixing `macros' function test of `tst_headers' Task-number: QTQAINFRA-324 Change-Id: Ib6fcf276108bbb5515a72f3f17b373de82a599fc Reviewed-by: Olivier Goffart <ogoffart@kde.org> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtGui: Fix compilation with gcc 4.4Friedemann Kleint2011-11-031-2/+2
| | | | | | | | | | | | - Do not mix QStringLiteral and Q_TR_NOOP. - Replace static QString member variables by - static member functions to return the strings. - Use tr() since QAccessibleActionInterface declares it. Acked-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: Iabbee8ef61a5d7bfd35978a3f1cce1866329d065 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Revert "Fix use of qMax() with floating point constants"Sergio Ahumada2011-11-011-1/+1
| | | | | | | This reverts commit 4e1b8720c1498edbb7a5bd37f622fdd3feb07850 Change-Id: I5e52a86119b522888b69fa261ebfa9168f885864 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix use of qMax() with floating point constantsSergio Ahumada2011-10-301-1/+1
| | | | | | | | When passing floating point constants make sure to cast them as qreal's. Change-Id: I17e7ee407ac4f92ce947f6a384aa4d64edb8e983 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Windows and X11 from src/widgets/platforms.Robin Burchell2011-10-2869-52031/+6
| | | | | | | | | | This is dead code, unused with QPA in place, so remove it to avoid confusion caused through grepping for class names existing in both old and new places. Mac code is left in place for now, as some of it is still in use. Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-2/+2
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compiler warnings.Friedemann Kleint2011-10-272-2/+4
| | | | | | | | - Fix gcc 4.6.X warnings about assigned but unused variables - Remove trailing ';' from inline functions (Clang) Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add QT_BEGIN_HEADER/QT_END_HEADER macrosSergio Ahumada2011-10-271-0/+4
| | | | | | | | | Fixing `macros' function test of `tst_headers' Task-number: QTQAINFRA-324 Change-Id: I9e78d5f33dcd89718d90e0d2a40a02eba80f6ca9 Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Compilation fix (cannot assign const pointer to non-const pointer)Bradley T. Hughes2011-10-271-1/+1
| | | | | | | | After reinterpret_casting to const NSString *, we need to const_cast to drop the cast to match the return type. Change-Id: I3d202aec10e719a48f29d96b81621492936ac6ad Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fixed resource leak when setting QProgressBar style sheetTero Ahola2011-10-271-1/+2
| | | | | | | | | | | Task-number: QTBUG-19110 Merge-request: 2687 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit ecd78168271cfe71715e074a50752712f4aa3229) Change-Id: I49fdf0f74b903313089eb8cd778c80a19d34b461 Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Add default actions to QAccessibleWidget.Frederik Gladhorn2011-10-272-1/+34
| | | | | Change-Id: I9f251aad663fd0b8db2ef068c6581241d91c090d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Native file dialog support for MacMorten Sorvig2011-10-2711-74/+277
| | | | | | | | | | * 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>
* Readded PrintSupport for WindowsOliver Wolff2011-10-253-2158/+0
| | | | | | | | | | The prepared plugin architecture for printing support was used as much as possible but some functionality had to be done in src/printsupport. Change-Id: Ic8446cb8018a0970b4da97c1912ba6dc20d2a09f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Multiline editors not to limit anchor position inputMethodQueryPekka Vuorela2011-10-241-1/+1
| | | | | | | | | | | | The queries were limited to current block, because that is the available surrounding text. Input method side, however, cannot then distinguish between anchor being really at start or end of the surrounding text, or beyond it. Without the limitation there at least is a way to know anchor is at unknown territory. Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>