summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix build due to missing include when using a minimal config.Sérgio Martins2014-08-111-0/+1
| | | | | | | | | | | QStyle is used, so include it explicitly instead of relying on indirect inclusions. Build was broken when using a bunch of QT_NO_ defines, not sure which one triggers the failure though. Change-Id: Ib07218521648448576f1b55d2d91d1711c048f09 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix build with QT_NO_DRAGANDDROPSérgio Martins2014-08-111-9/+9
| | | | | | | viewportSizeHint() should be defined outside the QT_NO_DRAGANDDROP ifndef Change-Id: I7c23c820ea58b3614eb030dc5b0f290ad891ccb1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Font Database: Add support for private, system UI font familiesGabriel de Dietrich2014-08-112-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce QPlatformFontDatabase::isPrivateFontFamily() to allow testing for private, system UI font families. Both QFontComboBox and QFontDialog need to filter out those private font families which, by definition, should be hidden from the end user. (The textedit example had to be updated to fix the issue where the default font would be private. In 5.4, we will be adding an equivalent, public API in QFontDatabase, and a better solution for the textedit example and QTexEdit in general). In particular, on OS X and iOS, private fonts are used for the system UI font. Those have their font family name prefixed by a dot. QCoreTextFontDatabase knows about this, and makes sure those are tested positive as private font families. In order to have a cleaner layer separation, we moved the QPA theme font resolution from the platform theme classes into QCoreTextFontDatabase for both Cocoa and iOS QPA plugins. In both cases, we use CoreText's CTFontCreateUIFontForLanguage(), that nicely maps to the HITheme API we were using so far on Mac. That means one HITheme dependency less. We also cache the font descriptors we get for these font for each time QCTFD::populateFamilies() gets called. (While not common, this currently happens in auto-tests, like tst_QFontDatabase, and could happen in actual applications -- specially when adding and removing application fonts.) Change-Id: Ic6f0b60f9f597afee1a43596a669742dc546b97f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QFileDialog docs: remove misleading sentence about static functionsShawn Rutledge2014-08-061-3/+1
| | | | | | | | | Native dialogs are used whenever possible, not just when the dialog is instantiated via the static function. Task-number: QTBUG-36657 Change-Id: Ibad67114e67f8e2f9956037f8469542c72bfd8ea Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-305-36/+11
|\ | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| * Fix warning message when re-setting text on tooltipJoni Poikelin2014-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | Fix warning message that gets printed when changing tooltip message without rect and widget parameters for already shown tooltip widget. Task-number: QTBUG-39550 Change-Id: I69ed8747e5e77ca618525d74479c72e02b7ab897 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * move loading of testability driver from QApplication to QGuiApplicationMichael Zanetti2014-07-032-24/+0
| | | | | | | | | | | | | | | | | | | | This is useful without QWidget too. Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Mac: Don't register for Pan Gestures.Morten Johan Sørvig2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | This will enable touch events for the viewport widget, which has undesired side effects (see task). Fixes a regression from Qt 4. Task-number: QTBUG-38815 Change-Id: I7b9c0d1de985d1c82f946140fecf460fcfc5e686 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Fix QFileInfoGatherer threading issueBernd Weimer2014-06-301-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFileInfoGatherer has a QFileSystemWatcher member that lives in the same thread as the QFileInfoGatherer object. If only the poller engine is available for the file system watcher, the engine will only be created when addPaths() is called. However the latter was called from anohter thread (the QFileInfoGatherer thread). Hence the QPollingFileSystemWatcherEngine had its parent in a different thread and worse, this thread didn't have an event loop needed for the QTimer used in the poller engine. This fixes tst_qfilesystemmodel on platforms that only support the polling file system watcher engine. Task-Number: QTBUG-29366 Change-Id: I83b58b4237e3438a27e5cdde4b1e4126e4740a94 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Ensure transient parents are top level widgets.Friedemann Kleint2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | When a dialog was parented on a native child widget, its window handle was used as a transient parent. This confused QPlatformWindow::initialGeometry() among other things. Use top level window as is in Qt 4. Task-number: QTBUG-40195 Change-Id: Ic82adc276175f92adde825fb2551274351e41f30 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | make QtWidgets claim style pluginsOswald Buddenhagen2014-07-161-0/+1
| | | | | | | | | | Change-Id: Ibb3fea65d59c2a43cd024fd34abfe558956bec69 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QSplitter: Exclude top level widgets from child event handling.Friedemann Kleint2014-07-151-2/+4
| | | | | | | | | | | | | | | | | | Prevent the splitter from adding them to the layout or showing them. Task-number: QTBUG-40132 Change-Id: Ife2be0bbd7e489570ef41f6f72a034b356c65f18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Document QApplication::cursorFlashTime() can return -1İsmail Dönmez2014-07-071-0/+3
| | | | | | | | | | | | | | | | | | On Windows QApplication::cursorFlashTime() can return -1 if keyboard blinking is disabled. Add documentation for that case. Change-Id: I1e5d683573e55b045e2d9bd9804daf4be579fd02 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Fix typo in QGraphicsView documentation.Mitch Curtis2014-07-071-1/+1
| | | | | | | | | | Change-Id: Ib750a78e86b8af87d091705a1107ca1eccf32389 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fix QTimer with negative interval in QWidgetLineControl::setCursorBlinkPeriodİsmail Dönmez2014-07-061-1/+1
| | | | | | | | | | | | | | | | | | When keyboard blink is disabled, msec will be negative (-2 in my case). In that case if (msec) will evaluate to true and create a QTimer with a negative interval. Fix is to check for msec > 0. Change-Id: I5c8d82c3cdaf26a961c986f4164805aacfe3ae37 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Improve QListWidget documentation.Mitch Curtis2014-07-041-1/+8
| | | | | | | | | | | | | | | | | | Mention that removeItemWidget() isn't sufficient to remove a row. List related functions so that it's easy to see the relation between them. Change-Id: Ia1d467390f00976e2276d50df35dd555f7992a9a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Cocoa: Handle Qt::WA_ShowWithoutActivatingMorten Johan Sørvig2014-07-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Forward the flag to QWindow by setting the _q_showWithoutActivating property on the window in QWidgetPrivate::create_sys(). Implement by refusing to become the key window or first responder during QCocoaWindow::setVisible(). Task-number: QTBUG-19194 Change-Id: I8446927ec510d7226a5a7b51b7be49d2f9bfd098 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Cocoa: Fix Qt-in-namespace build.Tim Blechmann2014-07-021-1/+2
| | | | | | | | | | | | | | | | Wrap cocoa classes in namespace macros. Task-number: QTBUG-39382 Change-Id: Id840e666105afca21760fcb529b5765e0a534120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QMacStyle: Fix focus frame rendering in YosemiteGabriel de Dietrich2014-07-021-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | Using the HITheme API would result in the frame's right edge to be missing. Instead, we use the recommended technique to draw the focus ring around a custom NSCell. (See https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ControlCell/Articles/ManipulateCellControl.html) Change-Id: I12d4834d353b5cbd5893bf070b14ad0d8bb75634 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Mac Style: Fix QLineEdit frame in 10.10Gabriel de Dietrich2014-06-301-11/+9
| | | | | | | | | | | | | | | | Also removes some dead code. Change-Id: Id590bd56641918a163f8bad251e3e0e750adfc6f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Fix pixel noise in X11 systray icons that are not 22x22Allan Sandfeld Jensen2014-06-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a system tray icon is set to a non default size by an X11 system tray, the area beyond 22x22 will not be painted, since the first paint is performed before the first resize, and the first resize does not trigger expose either. The bug can be seen in KDE if the system tray is not 22 pixel height. This patch triggers updates on resize to ensure we always repaint fully on resize. Change-Id: Ia81d2329a2c9faff220f07163ac38cafbd520ffc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QMac/FusionStyle: fix the background color for transient scrollbarsJ-P Nurmi2014-06-304-2/+13
| | | | | | | | | | | | Task-number: QTBUG-39922 Change-Id: I4b313296ae845bc9e116494aa66c577b432b4a67 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | qtoolbar: add missing header on OSX.Mike McQuaid2014-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this you get: ``` widgets/qtoolbar.cpp:1047:5: error: incomplete type 'QPlatformNativeInterface' named in nested name specifier QPlatformNativeInterface::NativeResourceForIntegrationFunction function = ^~~~~~~~~~~~~~~~~~~~~~~~~~ qtbase/src/widgets/../../include/QtGui/../../src/gui/kernel/qguiapplication.h:57:7: note: forward declaration of 'QPlatformNativeInterface' class QPlatformNativeInterface; ``` Change-Id: I1301a8aa8b25eb12821e91125743be779e52db0f Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Mike McQuaid <mike@mikemcquaid.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QColorDialog: Do not update custom/standard color cells while picking.Friedemann Kleint2014-06-252-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay the updating of the custom/standard color cells to the mouse release of the color pick. This makes it possible to pre-select a custom color cell for assignment before the pick and prevents that from changing when its color is crossed by accident. Rename the existing method QColorDialogPrivate::setCurrentColor(QRgb) to setCurrentRgbColor() and move QColor::setCurrentColor() to QColorDialogPrivate, introducing an enumeration for specifying what to set. Task-number: QTBUG-39792 Change-Id: Ibfe96e345589346e8c72976a0335e901798f2766 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Add that the corner settings are saved/restored with the stateAndy Shaw2014-06-231-3/+6
| | | | | | | | | | Change-Id: Iee4c04291001470518176d8b3a49c08b52a6336e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | QComboBox: update focus policy when setting a new line editLiang Qi2014-06-212-8/+17
| | | | | | | | | | | | | | | | | | | | On OS X, the focus policy of QComboBox is different when editable or not. Task-number: QTBUG-39650 Change-Id: I394564f8a1a6d462e86d2497fe8874e6107a8a58 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Remove the widget from the stylesheet cache before polishingAndy Shaw2014-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | If the widget exists in the style rules cache before it polishes for the first time then it should be removed from styleSheetCache too so that the latest set stylesheet is used for the polishing. Task-number: QTBUG-39427 Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Use QModelIndex to get the data from underlying modelFriedemann Kleint2014-06-191-2/+2
| | | | | | | | | | | | | | Change-Id: Ibeb70079afd566c78289168540296b926f36d1af Initial-patch-by: Irfan Omair <irfan.omair@gmail.com> Task-number: QTBUG-27597 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Fix compilation in under -no-c++11 modeThiago Macieira2014-06-191-7/+10
| | | | | | | | | | | | | | | | | | IndexSetter can't be passed to QObject::connect() since C++98 templates require global types (they can't be function-local). Change-Id: I099322f835661d4679140b7810b50dbeb0e4b9e0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QFontComboBox sometimes became too wide because of wrong fixed sizeJan Arve Saether2014-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The fixed width should not be set on QFontComboBox itself, but on the popup. This regressed with commit bfb25c03523757d66974189e54dda97962206ef9, and caused assistants preferences dialog to become wider than the desktop. Change-Id: I2059794fc12d34837cdb7dfded80df57d102a6f0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Revert "Suppress move/resize events if they are the result of call to ↵Friedemann Kleint2014-06-131-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move()/resize()." This reverts commit a1c5198387fdb7db44a02bb94c56187874e67304. The idea of detecting non-spontaneous events by comparing against the widget's crect has problems when sequences of programmatic resizes occur. In addition, QWindowSystemInterface's queueing of events is problematic for this. Task-number: QTBUG-39611 Task-number: QTBUG-32590 Change-Id: I4674d8d5d5d432d938f7226b5790543335665c1f Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Revert "Revert "Fixed duplicate QMoveEvent generated for each QWidget::move ↵Friedemann Kleint2014-06-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | call"" This reverts commit c3e416296a1026d7ba99cf209f5e0720ff5050b1. The idea of detecting non-spontaneous events by comparing against the widget's crect has problems when sequences of programmatic resizes occur. In addition, QWindowSystemInterface's queueing of events is problematic for this. Task-number: QTBUG-39611 Task-number: QTBUG-32590 Change-Id: I9ff8049add147be23e064a513e8645ae04577c6c Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Doc: correct the format of Q_PLUGIN_METADATA macro in sample codesZhang Xingtao2014-06-121-1/+1
| | | | | | | | | | Change-Id: I464a0c0a590b0b90cf0fe7ccd448ee9bf704bd4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into ↵Sergio Ahumada2014-06-113-11/+13
|\ \ | | | | | | | | | refs/staging/5.3
| * | Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-113-11/+13
| |\| | | | | | | | | | Change-Id: I147a75ac74bd7b19dbeb99e1ec2836cc5bfc2806
| | * Fix failing qtdeclarativetextedit auto-testSimon Hausmann2014-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit c3baa7c1dc8c29bfe60e8e5c676c606d4f699005 the qtdeclarativetextedit tests in the qtquick1 module started failing. This was due to commit 852abfca6f4c349dce9b895956922f96d82df579 from 4.8 not being forward-ported from Qt 4 to Qt 5, hence the comment in c3baa7c1dc8c29bfe60e8e5c676c606d4f699005 about the missing mousePressEvent line. It was intentionally removed and instead used further down, which is what this patch adds and therefore acts as forward-port of 852abfca6f4c349dce9b895956922f96d82df579. Change-Id: I55978c961002382c1f228bf796c469c10686ba9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Suppress move/resize events if they are the result of call to move()/resize().Friedemann Kleint2014-06-061-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::resize() or QWidget::move() set the new size/position values and send events. The spontaneous events generated by the platform should be ignored in that case. Task-number: QTBUG-30744 Task-number: QTBUG-38768 Task-number: QTBUG-32590 Change-Id: I9c0ae38842ed76a8a88ca64fdc9bbe106b2766b7 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call"Friedemann Kleint2014-06-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A better fix is to check whether the widget already has the requested geometry when receiving the spontaneous event from the platform in QWidgetWindow and to suppress that. This reverts commit 72259baa76a0f1faa1983c720621676e9c15e15f. Task-number: QTBUG-32590 Change-Id: I4d7a9b4c340c2d6a427727ecb8de50c3d199f7a9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * Fix selection by dragging after double click in QWidgetTextControl.Friedemann Kleint2014-06-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove return in mouseMove depending on variable mousePressed which is not present in Qt 4. The variable was true in Qt versions before 5.3 due to an additional mouse press event received before a double click. Task-number: QTBUG-39023 Task-number: QTBUG-25831 Change-Id: I57ed9284961195c71df9e9b9d697b1cfbad7c228 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | QWidget: fix documentation for isEnabledTo(0)David Faure2014-06-111-1/+7
|/ / | | | | | | | | | | | | | | It is NOT always the same as isEnabled(). Added a unittest to prove it. Change-Id: I7717126835923e8c091249bfcdf81767c44fb5f7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Doc: Updated Layout examples.Jerome Pasion2014-06-102-1/+10
| | | | | | | | | | | | | | | | | | | | | | -added links to and from the overviews. -added information on how to run the example. -updated copyright. Task-number: QTBUG-33597 Change-Id: Ib049cb94f136caa6916878959ae830248bd236b5 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
* | Fix typo in QGraphicsTextItem::defaultTextColor() documentation.Mitch Curtis2014-06-101-1/+1
| | | | | | | | | | Change-Id: I6e255483d63a3024d9cbfe09a12f33d7fddf36c0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Remove unnecessary comma in QStackedWidget doc.Mitch Curtis2014-06-101-1/+1
|/ | | | | Change-Id: Iaa6102ea90c695eb2d81cc5d4fbd00dafc7783f5 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QApp: Method to check for native style usage.Christoph Schleifenbaum2014-06-052-0/+28
| | | | | | | | | | | | Adds QApplicationPrivate::usesNativeStyle to check whether the QApplication is using the native platform style. This can be needed internally to decided whether to let the platform plugins do stuff or do it interally, style dependent. E.g. letting the platform plugin popup a QMenu vs. letting the style draw one. Change-Id: Ibb5e11a4d9d1d2824685ff146786a9354ceef43c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Do not clear default button in QMessageBox::setDetailedText().Friedemann Kleint2014-06-041-0/+2
| | | | | | | | | | Store the value of QMessageBoxPrivate::autoAddOkButton temporarily when automatically adding the "Show Details..." button. Task-number: QTBUG-39334 Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QDialogButtonBox does not need TabFocusJan Arve Saether2014-05-311-3/+0
| | | | | | | | | | | | It will now share the same behavior as QGroupBox, which has NoFocus if its not checkable. This doesn't lure AT clients to stop and read its content (this is the case for android accessibility) (designer seems to generate a tooltip for each QDialogButtonBox, which will be read as the name). Change-Id: I6cfacdd9c01299521222c773634df1e36971d982 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Move native subwidgets in QWidget::scroll().Friedemann Kleint2014-05-282-6/+6
| | | | | | Task-number: QTBUG-38999 Change-Id: Ie22dcf61895bbfc575eaae4d1929516a8749de39 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* WinRT: Fix compile warningsMaurice Kalinowski2014-05-261-0/+3
| | | | | Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Account for the sort indicator being placed above the text on VistaAndy Shaw2014-05-263-9/+23
| | | | | | | | | | | In WindowsVista style and later the sort indicator is placed above the text as opposed to alongside it. Therefore the extra space given is moved to the common style allowing styles that have it placed differently to easily ensure it is not included. Task-number: QTBUG-19915 Change-Id: Ic21fcc1d95f4c3cc2eb9c465e1c8afb9b805389a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix loss of precision warningsFrederik Gladhorn2014-05-261-1/+1
| | | | | | | | Found by http://www.viva64.com/en/b/0251 Change-Id: I2a0c3dba74fef07c3119c9e57b343a8253ee7daa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>