summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QProgressDialog: make the cancel button retranslate on LanguageChangeMarc Mutz2014-07-301-2/+1
| | | | | | | | | | | | | | It is documented to be, and the LanguageChange event is caught and processed. However, retranslateStrings() uses QProgressDialog::setCancelButtonText(), which unconditionally sets useDefaultCancelText=true, blocking any further changes to the button text by subsequent LanguageChange events. The fix is to use extracted QProgressDialogPrivate::setCancelButtonText() which - quite intentionally - doesn't set useDefaultCancelText. Task-number: QTBUG-40504 Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: Extract Method QProgressDialogPrivate::setCancelButtonText()Marc Mutz2014-07-301-7/+14
| | | | | | | | This is in preparation of a fix for the broken online-retranslatability of the cancel button. Change-Id: Ie62540766e50e1f1ec07d251cc56a2ee0745d434 Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: don't crash when setting the same {bar,button,label} againMarc Mutz2014-07-301-0/+14
| | | | | | | | | | The associated test has unearthed that setBar() fails to make the new bar a child of the progress dialog. This will be fixed in a separate commit. Task-number: QTBUG-40502 Change-Id: I2d09ebb07ae6395449a4efe38a638df831eebdd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Accessibility: Top level widgets should only be in the hierarchy onceFrederik Gladhorn2014-07-303-16/+12
| | | | | | | | | On Linux for example Orca gets confused when showing a dialog that is a child of another widget since it would show up twice in the hierarchy. Task-number: QTBUG-39444 Change-Id: I84773ecc3d6774a652dbeb29ad201779f5b3191c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix documented default value of QProgressDialog::maximumMarc Mutz2014-07-301-1/+1
| | | | | | | | Seems to have been a cut'n'paste from 'minimum'. Change-Id: Ifc3a4441809a9fc75ecac621cff59950235f6bc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Reduce the default frame rate of style animationsJ-P Nurmi2014-07-303-4/+38
| | | | | | | | Halves the amount of paint events triggered by transient scrollbars. Task-number: QTBUG-30316 Change-Id: Ifdf968d5c45013332758a6b751ce11d1ef2a2ca8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMdiArea: Store focus widget when new QMdiSubWindow is added.Friedemann Kleint2014-07-302-16/+29
| | | | | | | | | | | Introduce function QMdiSubWindowPrivate::storeFocusWidget() to store focus widget and call this when de-activating a sub window. Change restoreFocus() to return a bool and call it from QMdiSubWindowPrivate::setActive(). Task-number: QTBUG-38378 Change-Id: I18dbe66ce85213ca5b4907b5a09126544415351a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Streamline debug output of QMainWindowLayout.Friedemann Kleint2014-07-302-42/+44
| | | | | | | | | Remove define Q_DEBUG_MAINWINDOW_LAYOUT and dependent exported function, introduce operators for QDebug. Task-number: QTBUG-38761 Change-Id: I7794cffbfaea20ead0eac9e8ace4e3a910c50f95 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* add buttons to QTabletEventShawn Rutledge2014-07-282-2/+2
| | | | | | | | | | | | | Until now, it has been necessary for tablet-oriented applications which care about multi-button styli to reject each tablet event and wait for the mouse event in order to know which buttons are pressed. This patch adds the new API and also the X11/xcb implementation. [ChangeLog][QtCore][Tablet support] Added buttons to QTabletEvent Task-number: QTBUG-39458 Change-Id: If2c9ec1ceacc1700a82686c5fc6f568f9111055a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QUrl: fromLocalFile(QString()) should lead to an empty URL.David Faure2014-07-262-3/+4
| | | | | | | | | | | | | | This is much more useful than the URL "file:", it allows to use "empty path" and "empty URL" for the same meaning (e.g. not set). QFileDialog actually uses "file:" though, as the URL for the "My Computer" item in the sidebar. This patch preserves that. [ChangeLog][QtCore][QUrl] QUrl::fromLocalFile now returns an empty URL if the input string is empty. Change-Id: Ib5ce1a3cdf5f229368e5bcd83c62c1d1ac9f8a17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLineEdit: Emit textEdited() when the clear button is clicked.Friedemann Kleint2014-07-243-3/+14
| | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] The signal textEdited() is now emitted when the user clicks the clear button created by setClearButtonEnabled() as well. Task-number: QTBUG-40287 Change-Id: Iacd303ffd1533f27cfa68a6120cdd370e3d31ddc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-243-3/+8
|\
| * Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-223-3/+8
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget_qpa.cpp src/widgets/widgets.pro Change-Id: I697eec936c4e1a6c360edc8f0b472e23c0461ecb
| | * 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>
* | | QFileDialog: emit urlsSelected+urlSelected in accept().David Faure2014-07-243-12/+17
| | | | | | | | | | | | | | | | | | | | | Not just filesSelected+fileSelected (which only happens for local files). Change-Id: Ife592c3c921231356f96cbc2871b6d724a15d2c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QMainWindow:::restoreDockWidget(): Restore to correct screen.Friedemann Kleint2014-07-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the placeholder top level geometry to determine the screen. Task-number: QTBUG-40155 Change-Id: If56b239200e9daf754b0963574367cf7891c5f40 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QInputDialog: simplify signalForMember()Marc Mutz2014-07-231-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of playing clever tricks with the index variable, simply scan through the list of argument-carrying signals and, if nothing fits there, fall explicitly back to accepted(). Change-Id: I1be49ce601edb854cc1bab5be994b2c09fe31b3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QInputDialog: use a switch instead of a string pointer tableMarc Mutz2014-07-231-10/+25
|/ / | | | | | | | | | | | | | | | | | | | | Effects on Linux AMD64 GCC 4.9-trunk -O2 stripped release: text: -72B data: -64B relocs: -4 Change-Id: Ie312e12ba42f58fa5dd61da1e64b9c22bf4738b2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fusion style: Use QStyleHelper::dpiScaled() where applicable.Friedemann Kleint2014-07-211-57/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running unscaled on a high resolution display, some items are too small. This patch converts most values returned by QFusionStyle::pixelMetric() via QStyleHelper::dpiScaled(). Some adjustments have been done to RadioButton, CheckBox, Slider and SpinBox. On systems with 96dpi, FusionStyle should still look exactly as before this patch. Task-number: QTBUG-40277 Task-number: QTBUG-38858 Change-Id: I2683a8a4db615d01c08f4d6f559417b995c0eb1a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Implement QApplication::topLevelAt() using QGuiApplication::topLevelAt().Friedemann Kleint2014-07-181-10/+3
| | | | | | | | | | | | | | | | Reducing code duplication, preparing for High-DPI support. Task-number: QTBUG-38858 Change-Id: Id0ed12db4b5cadd0eef79afd0ac62f58a7b01901 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | QGroupBox: Exclude top level widgets from child event handling.Friedemann Kleint2014-07-151-0/+2
| | | | | | | | | | | | | | | | | | Prevent the QGroupBox from changing the enabled state of dialogs parented on it. Task-number: QTBUG-40132 Change-Id: I91cc6ccf5ade0b3a491020ed947d4aceca62d7b6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Fix various issues with qandroidstylePhilippe Lelong2014-07-102-67/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | -Add style for checkable QGroupBox -Add style for checkable QItemView -Fix QSpinboxes contents size and position -Fix QTreeView and QTableView headers size and position -Fix Slider thumb position incorrect if minimum is not zero Task-number: QTBUG-38717 Task-number: QTBUG-38325 Task-number: QTBUG-37965 Change-Id: I737f8d6f2d1c25d16aca0ce5de6b81884839409d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-104-3/+13
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-104-3/+13
| |\| | | | | | | | | | Change-Id: Ia12ffdb27ecdf25c2a2bdb0eed1945387502108a
| | * 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>
* | | Added autoHide property to QTabBarIvan Komissarov2014-07-105-1/+74
|/ / | | | | | | | | | | | | | | | | This property is used to automatically hide tab bar if it has only one tab. Originally-by: Denis Kovalskiy <denimnumber1@gmail.com> Change-Id: I6967f760010fa55bad6a5986c29abe7ccf625cf8 Reviewed-by: David Faure <david.faure@kdab.com>
* | QFileDialog: compile with QT_NO_URL_CAST_FROM_STRING.David Faure2014-07-092-1/+3
| | | | | | | | | | | | | | This is useful to detect confusions between local paths and URLs. Change-Id: I1aa72ae10186984812691c8a1a4e843db3c85246 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | qfiledialog: clean up dead code.David Faure2014-07-091-51/+0
| | | | | | | | | | | | | | | | | | Q_WS_WIN is never defined, and the qt_win_get_* functions don't exist anymore. The QPA plugin takes care of doing the Windows-specific handling for the file dialog. Change-Id: Icdf9aed7da3db8ed2bd71d60f821869340ec1041 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Mention Qt::ToolButtonFollowStyle in QToolBar/QMainWindow documentationDavid Faure2014-07-093-2/+11
| | | | | | | | | | | | | | | | | | | | Improve the existing docu for Qt::ToolButtonFollowStyle in QToolButton and show the same text in all other widgets that have toolButtonStyle property (QToolBar and QMainWindow). Change-Id: I26ff0ed332f8bd10b542a4111c6ae48a963d5667 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Refactor custom/standard color selectors in QColorDialog.Friedemann Kleint2014-07-081-25/+33
| | | | | | | | | | | | | | | | Introduce an enumeration for the rows/columns and use std::find() to find the matching colors. Change-Id: If8b7f76d48beab470f6cac0bfdeaf56058237e94 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QWidget: Set screen on top-level windows only.Friedemann Kleint2014-07-081-1/+2
| | | | | | | | | | Change-Id: Iea7fbe253ff3144d9988fd14790296e211075d3b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Use QDropEvent::acceptProposedAction() in drop handlers of QAbstractItemView.Friedemann Kleint2014-07-081-10/+13
| | | | | | | | | | | | | | | | | | Fix updating of the drop cursor when the user presses/releases the shift key while dragging. Task-number: QTBUG-39822 Change-Id: I1d9d3a80d349f7e405db24f8f7dc372428c34f52 Reviewed-by: David Faure <david.faure@kdab.com>
* | Accessibility: Improve handling current valueFrederik Gladhorn2014-07-071-9/+1
| | | | | | | | | | | | | | | | | | Value interfaces on OS X and iOS can be strings, so can the value property of MSAA. Before we'd always only send doubles, instead change it to use strings as well. Change-Id: I1b4410c68238ba7a69a5507d87c251f2ac61c568 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Support transparency in qt5 system tray icons, regardless of tray visualLeo Franchi2014-07-041-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports the Qt4 method of supporting the system tray window visual that has an alpha channel as well as ones that do not. We detect whether or not we have a 32-bit format and either use a Qt::transparent background, or call xcb_clear_region before painting the icon. [ChangeLog][Linux/XCB] Fix transparency of tray icons in cases where there is no alpha channel or system tray visual. Task-number: QTBUG-35832 Change-Id: I43d500c39846d2916dd39f8c47c8d85e59b49cae Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-042-6/+20
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-032-6/+20
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * 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>
* | | Doc: Removed "url" variable from qdocconf files.Jerome Pasion2014-07-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | url is set in qtbase/doc/global which is inherited by the Qt 5 module qdocconf files. Change-Id: Ieffa174f598f4a3b8ce8be9bfae7ca9b6981f12b Reviewed-by: Martin Smith <martin.smith@digia.com>
* | | Fix compiling with -no-openglNiels Weber2014-07-041-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-39982 Change-Id: Ib3fc49c89472fbaf77abea0b463e380725440613 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Update copyright to 2014 for accessibilityFrederik Gladhorn2014-07-0416-16/+16
| | | | | | | | | | | | | | | Change-Id: I4210456122bf8a6d3730f017f3ce6dd1a1bcb3f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Fix build with -no-accessibilityFrederik Gladhorn2014-07-031-1/+5
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ib66d806b978c9e187d614fe1c553db7dc2b4ffaa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | | Add fixme-comment to QWidgetResizeHandler.Friedemann Kleint2014-07-031-0/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-34352 Change-Id: I2415bdf125f90f5cd4f5af55e7ec6bb8ef48217e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Implement QWidget::grabCursor(const QCursor&).Friedemann Kleint2014-07-032-23/+47
| | | | | | | | | | | | | | | | | | | | | | | | Implement using QGuiApplication::setOverrideCursor(). Task-number: QTBUG-39311 Change-Id: I83e289bfd5e911c31f08df9a4fc17fb8a0cf27f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>