summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Link to topLevelChanged() in the docs of QDockWidget::floatingSergio Martins2016-10-071-1/+3
| | | | | | | | topLevelChanged() is emitted when the floating property changes. It's not very well named, it's easy to miss. Change-Id: Iabaa4fb3dc6190df43d719ed7565f0586816c6de Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* QTextEdit: don't show placeholder text while composing textRichard Moe Gustavsen2016-10-063-1/+8
| | | | | | | | | | | | | If using IM to compose text in QTextEdit, the placeholder text will show underneath until the text is committed. This patch will additionally check if the user is currently composing preedit text before deciding whether or not to draw the placeholder text. Task-number: QTBUG-55758 Change-Id: If7943c6c94fb96d46514a81caa118829e6e6a0f9 Reviewed-by: Liang Qi <liang.qi@qt.io>
* QDateTimeEdit: synchronize time-spec before initializing displayEdward Welbourne2016-09-271-1/+3
| | | | | | | | | | | | | | | | | QDateTimeEdit ignores the time-spec of its date-time value, using its own time-spec instead; mostly, this works because it first conforms the value to its own time-spec. However, during construction, before doing this, it set up its display data, which could leave it with a different time (rather than a different representation of the given time) than it was asked to use. Moved the updateTimeSpec() calls to immediately after setting value in QDateTimeEditPrivate::init() to ensure correct handling. Added test. Task-number: QTBUG-54781 Change-Id: I3b07c10997abb858fc0b40558bff96e3fdabbd83 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMenuBar: Get rid of QMenuBarPrivate::nativeMenuBarDmitry Shachnev2016-09-152-27/+5
| | | | | | | | | | | | | | | | | | | | Instead of trying to keep that variable in sync with platformMenuBar state, just check whether platformMenuBar exists instead. Now QMenuBar::isNativeMenuBar() is more reliable, and will not return true if the QPA plugin provides no platform menu bar. Also, remove useless restrictions for code using isNativeMenuBar(). That method is available on all platforms for a long time, not only on macOS or WinCE. This makes sure local menus do not appear if global menus are available, and setVisible(true) is called. Change-Id: I7a5944c64376b4714a38ad981089df8a151c3403 Task-number: QTBUG-54793 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QtWidgets: Fix enter/leave events on popup menusBłażej Szczygieł2016-09-152-58/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the sloppy menu popups - send the leave event to the last active menu (except Cocoa), because only currect active menu gets enter/leave events (currently Cocoa is an exception). Check that the menu really has a mouse before hiding the sloppy menu - don't rely on enter events. This patch removes some unnecessary synthetic mouse enter/leave events from QMenu which causes event duplications with different mouse cursor position. Refactor sloppy menu timer handling - start or restart timers on mouse move events. Enter/leave events are not reliable. Fixes: - better enter/leave events handling for native widget actions, - reduce duplicated enter/leave events for menu actions, - better handle torn off sloppy menus. Partially reverts: 0ed68f3f58c63bd1496cb268bd83881da180051f Amends: 57ecd5aeeb1f609206933be66b92fcdf703703d7 Task-number: QTBUG-53068 Change-Id: I7ad56ac1619db124915d373fab82d0512d44c90e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fixed glitch when dragging a movable QTabBar tabThorbjørn Lindeijer2016-09-121-2/+1
| | | | | | | | | | | | | | When you would start to drag a tab, and then drag it in the other direction along the point where you started the drag, the tab would fail to follow the mouse for a distance twice the "startDragDistance", before jumping to the mouse again. Fixed this by only taking into account the "startDragDistance" when checking whether a drag is started, and to rely on the "dragInProgress" variable otherwise. Change-Id: I5dd4ebd8340fef7e870f087be68c5097b49728cb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QToolButton: fix read of uninitialized variableSérgio Martins2016-09-051-2/+1
| | | | | | | | | | | | | | | | Calling style() can trigger a call into user code which can read the tool button's members before they are initialized ==3566== Conditional jump or move depends on uninitialised value(s) ==3566== at 0x421C39: MyProxyStyle::pixelMetric(QStyle::PixelMetric, QStyleOption const*, QWidget const*) const (MyProxyStyle.cpp:635) ==3566== by 0x504B8B1: QRenderRule::QRenderRule(QVector<QCss::Declaration> const&, QObject const*) (qstylesheetstyle.cpp:1004) ==3566== by 0x504D084: QStyleSheetStyle::renderRule(QObject const*, int, unsigned long long) const (qstylesheetstyle.cpp:1747) ==3566== by 0x504D4A5: QStyleSheetStyle::renderRule(QObject const*, QStyleOption const*, int) const (qstylesheetstyle.cpp:2023) ==3566== by 0x504FF02: QStyleSheetStyle::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const (qstylesheetstyle.cpp:5146) ==3566== by 0x517B2D0: QToolButtonPrivate::init() (qtoolbutton.cpp:193) Change-Id: I56bca15d3ec7cd7b255a83dca786532a2f9b9b48 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix QMainWindow::restoreDockWidget() with GroupedDraggingOlivier Goffart2016-08-304-46/+80
| | | | | | | | | | We need to account for the fact that the placeholder might be in a floating tab. Task-number: QTBUG-50491 Change-Id: I03d8e49cc40f58691154f5c3984f3b0670a974d5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* QAbstractSpinBox: Clear 'cleared' flag on receiving a keypressFriedemann Kleint2016-08-251-0/+2
| | | | | | | | | Prevent QAbstractSpinBoxPrivate::interpret() from bailing out in focus changes after text has been entered. Task-number: QTBUG-55249 Change-Id: I250b3c50f7db5de2e9356038df20f18ee059df11 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Fix grammar in QToolBar docsMitch Curtis2016-08-121-1/+1
| | | | | Change-Id: Ibc65fd7c95246c7b7e38fd7f0d16d83d7c3301d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-1211-24/+24
| | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QTabBar: Cache title text sizesGabriel de Dietrich2016-08-102-32/+58
| | | | | | | | | | | | | | | | | | | The first part adds QTabBarPrivate::initBasicStyleOption() which is basically QTabBar::initStyleOption() but without the expensive QFontMetrics::elidedText() call. That is because QTabBar::tabSizeHint() would call initStyleOption() and then immediately discard the result of that computation. Then, QTabBar::tabSizeHint() is modified to cache the calls to QFontMetrics::size(), which is also expensive. The cache is invalidated when the style or the font changes, or when the elide mode is set. Change-Id: I591b2e401af3576a2ebabc5b94f19ae157e28cf2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QComboBox: fix crash on setEditable(false) called from editTextChanged()Marc Mutz2016-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | QLineEdit::setText() emits QLineEdit::textChanged(), which is connected to QComboBox::editTextChanged(). When a user slot connected to editTextChanged() sets QComboBox::editable to false, the line edit will be deleted in setEditable() and when control returns to QComboBoxPrivate::setCurrentIndex(), the formerly non-null 'lineEdit' has changed to nullptr, leading to a nullptr dereference when attempting to set the completionPrefix on lineEdit->completer(). Fix by re-checking 'lineEdit' after returning from the QLineEdit::setText() call. Add a test. Task-number: QTBUG-54191 Change-Id: I94154796cfde73fb490f8471c48b9d6f62825a92 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix misleading code in QAbstractSpinBox::event()Marc Mutz2016-07-061-2/+1
| | | | | | | | | | | A static_cast never returns nullptr unless its argument already was nullptr. But we dereferenced 'event' already by the time we reach this code, so the if is always true. Fix by removing the temporary variable. Change-Id: Ia869d37eda74f0bcdd616e1f57f429cc86e9e525 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Allow to drag a QDockWidgetGroupWindow into one of its QDockWidgetOlivier Goffart2016-07-021-5/+2
| | | | | | | | This fixes the 2. of QTBUG-52108 Change-Id: Id887f470c7822f6b264d6b739e8658d9809f6609 Task-numer: QTBUG-52108 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix the QMainWindow context menu when there are floating tabsOlivier Goffart2016-07-021-3/+13
| | | | | | | | | | | If QMainWindow::GroupedDragging is enabled and there are QDockWidgetGroupWindow, we should still show actions for these QDockWidgets in the context menu Addresses point 4. of QTBUG-52108 Task-number: QTBUG-52108 Change-Id: I11ae401c4fe15e213b0f26e7579634e2062e953c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QDockWidget losing decoration on undocking when GroupedDragging is enabledOlivier Goffart2016-06-301-1/+2
| | | | | | | | | We should not remember the wrong undocked geometry. If the dockwidget is not floating, the geometry is not relative to the global coordinate, it makes no sense to store it. Task-number: QTBUG-53808 Change-Id: I242467d8da62d7c787eca2c784aeec646236cb44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QDockWidget: fix floating group tab window not having the right titleOlivier Goffart2016-06-252-5/+3
| | | | | | | | | | | | Before, we were relying on the ZOrderChange event to update the windows title or other flags of a floating tab window when tabs are changed. But this did not catch all the cases. For example, the first tab switch, or when tabs are dragged out. Task-number: QTBUG-53754 Task-number: QTBUG-52107 Change-Id: I1523ce85ceaa95f044bd81f8ccbac0a86978fb33 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Revert "End the drag if the dockwidget is being hidden"Olivier Goffart2016-06-221-2/+0
| | | | | | | | | | | | | | | | | This reverts commit 75b705fec8e9517047d7dfa98203edff69f2bf8a and 798e0064e9be78f8320ff25a9af50d1b5e5badb1. This broke drag and drop of QDockWidget if there is no animations (QTBUG-54185) and this caused numerous crash with GrouppedDragging: crashes when dropping on another floating QDockWidget, or when dragging away. The problem being that 'endDrag' would cause the QDockWidget to be hiden temporarily and it would recurse into 'endDrag' and have unwanted effects Task-number: QTBUG-54185 Change-Id: Icad9c6748448783e039bde205b60133f89f25e8e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QtWidgets: Open submenus also on left mouse button pressBłażej Szczygieł2016-06-081-4/+9
| | | | | | | | | | | | | | This patch allows to open submenus also on left mouse button press. Previously submenus could be opened only on right mouse button press as ContextMenu event which was inconvenient especially for long submenu popup timeout. Task-number: QTBUG-53054 Change-Id: I1bd78ed4436f738c8838f7f4687ffebb94b66725 Reviewed-by: Félix Bourbonnais <thor400.75@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QLineEdit: move to the beginning when receiving a MoveToStartOfLineGiuseppe D'Angelo2016-06-071-0/+1
| | | | | | | | | | | | The code dealing with shortcut overrides omitted this value from the checks. If the user had a shortcut installed with a key sequence matching MoveToStartOfLine, then that would result in the line edit not moving the cursor at the beginning of the line (unlike other similar sequences). Change-Id: If2e780068b3139390c79285d2205cc89285ba8b5 Task-number: QTBUG-52796 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QWidgetLineControl::Command - delete default ctor.Timur Pocheptsov2016-05-242-11/+12
| | | | | | | | | While dealing with Coverity's CID 11424 ('missing initializer'), it was recommended (by Marc, thanks) to get rid of Command's default ctor, since it's apparently not needed at all (replacing QVector with std::vector also). Change-Id: Ibe9d2789c67431a9810feb7db4fa1bce0b61921c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMenuBar: nested parenting fixFelix Bourbonnais2016-05-182-25/+33
| | | | | | | | | | | | | QMenuBar now receives a parent changed event for each of its parent, grand-parent, ... This fixes a crash caused by an invalid QWidget pointer and makes sure the keyboard shortcuts events are relayed to the menu bar in all parenting/re-parenting cases by installing an event filter on each parent Task-number: QTBUG-53205 Change-Id: I419e6cbc52e28a67fb08a848a7161b4cb8ae4ae5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
* QLineEdit: Fix icons being too small on a High DPI screen without scaling.Friedemann Kleint2016-05-123-22/+52
| | | | | | | | | | | Remove the hardcoded size 16 from QLineEditIconButton. Replace QLineEditPrivate::iconSize() by QLineEditPrivate::sideWidgetParameters() returning a struct SideWidgetParameters containing icon size, widget size and margins. The 32x32 icon will then be used on a High DPI screen without scaling. Task-number: QTBUG-49374 Change-Id: I23c4a0cd078a58581c940aacfa65a3ad493c12dc Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* QSplitter: Add note about ownership transfer to addWidget() and insertWidget()Stephan Binner2016-05-041-1/+5
| | | | | Change-Id: I971db2c25e4e667a416f58d148e18c4f11c349f1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix scroll regression near scroll-view endsAllan Sandfeld Jensen2016-04-291-2/+3
| | | | | | | | | Fix regression in a7b0cb467ca5c4a9447d049910c9e3f0abc5897c which caused it to be hard to start scrolling at the ends of a scroll-view if using fine grained scrolling events. Change-Id: I55f3210150b993281545c3ad5a7356d892fa30b5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix clang developer build due to -Winconsistent-missing-overrideSérgio Martins2016-04-281-8/+7
| | | | | | | | | The existing code keeps the overrides from each base class together, so also move them to the correct group after adding Q_DECL_OVERRIDE. Change-Id: I5d89fb4e7f9454ab0c9c6383f8245e64b95e84e9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Change scroll and text areas to respect native wheel focus ruleMarko Kangas2016-04-263-3/+3
| | | | | | | | | | [ChangeLog][QtWidgets][QAbstractScrollArea,QTextEdit,QPlainTextEdit] Changed focus to Qt::StrongFocus. That respects platforms' native guidelines. Task-number: QTBUG-52559 Change-Id: I2aa25d25bbc15facce85ceb7d4a4c1d0ac7df962 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTabBar: Fix crash when the tab being dragged is deleted programmatically.Friedemann Kleint2016-04-191-0/+3
| | | | | | | | | | Call QTabBarPrivate::moveTabFinished() from QTabBar::removeTab() to cancel any drag in progress to prevent crashes due to invalidated indexes. Task-number: QTBUG-52527 Change-Id: I5bd8cc6f55e5aea1f1a4710494ba5b92939a42ee Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove QDateTimeEditPrivate's duplication of QDateTimeParser code.Edward Welbourne2016-04-081-5/+0
| | | | | | | | | Both constructors set up the first, last and none members. QDateTimeEditPrivate wants first.pos = 0, different to its base, so keep that, but the rest merely duplicated. Change-Id: Ice22e0495112dc3427eb35b5b73420f42d7dafc1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QDateTimeEditPrivate: make clear which overrides are for which base.Edward Welbourne2016-04-081-12/+15
| | | | | | | | | | | The class does multiple inheritance and over-rides virtuals from both bases; it also declared the over-rides virtual rather than declaring them to be over-rides; so deploy Q_DECL_OVERRIDE and, while changing those lines, move them all together and document which belong to which base. Change-Id: Ica3958d6d24124a537983e7e94fce642284f1f24 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QDateTimeParser: new Section mask values simplify code.Edward Welbourne2016-04-082-7/+7
| | | | | | | | | Various |s of existing section flags were used repeatedly; naming these masks makes the relevant code easier to read. In QDateTimeEdit, add a comment to make clear that its Section enum is based on QDTP's. Change-Id: Ifd8364cd396a6d0d5ed7ae7dc4d31690f77edd30 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add some QChar::unicode() calls to brush over deprecation warninghjk2016-04-061-1/+1
| | | | | Change-Id: I16383254373289584818cd2b590d51d9e4a649c5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QToolButton: always restart the menu popup timerGiuseppe D'Angelo2016-04-062-1/+9
| | | | | | | | | | | | | | | | | | | | | | The logic for activating a delayed popup menu on QToolButton is a bit cumbersome: when the button is pressed, a timer is started. This timer however doesn't get reset if the button is released before the timer expires. Instead, the function triggered by the timer checks if the button is pressed at that time. If so, the popup menu is shown. This logic allows the user to press-release a QToolButton many times and suddenly get a popup menu appear way before the expected timeout for the popup expired. That's because the first press started the timer, and then the button happened to be down when the timer expired. Instead, always *re*start the timer on a button press, and cancel the timer when the button is released. Change-Id: I3e0849264fdb6f670d018ebb5012eb15fa699cfb Task-number: QTBUG-48906 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix regression in scaled QLabel on hi-res display.Jason Haslam2016-04-051-2/+4
| | | | | | | | | | | | | | The change in bc1796f for QTBUG-42503 only works for scaling down pixel-doubled images. Smaller images scale up incorrectly. Fixed by setting the devicePixelRatio of the scaled pixmap to the devicePixelRatio of the label. Also, caching was broken by not accounting for scaling by devicePixelRatio in the condition. Change-Id: I6e1503652e61683a16312c74f46b79d28c880848 Task-number: QTBUG-46846 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Accept partial line scrollsAllan Sandfeld Jensen2016-04-051-1/+9
| | | | | | | | | | | QAbstractSlider might register and use small scroll events that would scroll less than a single line. Since we consume the scroll-event we should accept it, so it doesn't scroll other widgets too. Task-number: QTBUG-49549 Change-Id: I7c64c5f6cae46f02ba21058abbecb791fc3c88eb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Refactor methods QTextEdit/QPlainTextEdit::inputMethodQuery().Friedemann Kleint2016-03-302-33/+29
| | | | | | | | Replace if / else if chain by switch() and return the value instead of reassigning it. Change-Id: Ib87c54bbf9911a58d3ae764b71f19f33d59590ce Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTextEdit::inputMethodQuery(): Preserve types when applying offset.Friedemann Kleint2016-03-301-5/+5
| | | | | | | | | | | | | The old code converted QRectF into QRect when applying the offset. Change the offset point to QPointF and change the conversions accordingly. Add an autotest similar to that of QPlainTextEdit. This minimizes rounding errors and prevents conversions since the input method logic mostly uses qreal. Task-number: QTBUG-51923 Change-Id: I0c2f80ccae028d8bbbb97ec603f8782f69959c76 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMacStyle: Return a guess for SE_ProgressBarGroove's rectGabriel de Dietrich2016-03-291-1/+1
| | | | | | | | | | QMacStyle doesn't know how to accurately compute SE_ProgressBarGroove But, since we only need the progress bar's main dimension, its rect is good enough for QProgressBarPrivate::repaintRequired(). Change-Id: I81e936003b847cc9cc0ddf4fbfc05ddc1c9f6625 Task-number: QTBUG-51120 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QPlainTextEdit: Take vertical offset into account when answering input ↵Friedemann Kleint2016-03-291-5/+5
| | | | | | | | | | | method queries. Determine offset point to similar to QTextEdit::inputMethodQuery() and add an autotest. Task-number: QTBUG-51923 Change-Id: I8232eb348063e2cd95d0632fe74a6eb30c897eda Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTabBar: enable high dpi moving of a tabGiuseppe D'Angelo2016-03-252-7/+35
| | | | | | | | | | | | | | | | Moving tabs of a QTabBar goes through a temporary QWidget that captures a "screenshot" of the tab, and then gets moved around. Unfortunately, that screenshot was not using the devicePixelRatio, resulting in blurry text and icons. For some reason, setting the DPR on the pixmap isn't enough -- that causes it to be drawn twice as big (bug somewhere in Qt styles?). Work around that by not using the palette, but a simple widget which draws the pixmap (which also leads to somehow clean code). Change-Id: Id12f9251625693d108031488ddfab86277128705 Task-number: QTBUG-50898 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Initialize input method for read-only QTextBrowserMarko Kangas2016-03-231-0/+1
| | | | | | | | | Set input method attribute to be aligned with read-only value in QTextBrowser initialization Task-number: QTBUG-52071 Change-Id: If0e64bf09e2a2d505ed66fcbfb8cd12ae39844d3 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* QLineEdit: Use High DPI pixmap for clear button.Friedemann Kleint2016-03-221-4/+7
| | | | | | | | | | | | | | Add a 32x32-pixmap to the style and factor out a function from QStyle::standardIcon() to assemble the icon. The 32x32 pixmap may also be used for the 16x16 case with devicePixelRatio=2. Change QLineEditIconButton to use QStyle::standardIcon() instead of QStyle::standardPixmap passing the QWindow to obtain the correct pixmap from the icon. Task-number: QTBUG-49374 Change-Id: I9895230f66911752cc13b7212609141610df0977 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove unused QButtonGroupPrivate::notifyChecked()Marc Mutz2016-03-201-1/+0
| | | | | | | It wasn't even implemented. Change-Id: I7d4b97b176c90beeffc780c31848ec5b234ba509 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move QButtonGroup implementation from qabstractbutton.cpp to qbuttongroup.cppMarc Mutz2016-03-185-148/+198
| | | | | | | | | | | | | Because it's the right thing to do. Needed to introduce qbuttongroup_p.h because QAbstractButton likes to poke around in QButtonGroup's private parts. Fixed includes of qabstractbutton_p.h so it compiles on it's own. Change-Id: Ic7725277d2419754de273b2abd4790476edd0eb4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtWidgets: includemocsMarc Mutz2016-03-1835-1/+63
| | | | | | | | A very simple way to save ~3KiB in test size and 440b in data size on GCC 5.3 Linux AMD64 release builds. Change-Id: I6619148cc497116b9772a00e1bc30d573a2b2534 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QToolBarExtension: remove unused member 'orientation'Marc Mutz2016-03-181-1/+0
| | | | | | | | | | The orientation is implicitly stored by which icon is used. Found by Clang: qtoolbarextension_p.h:57:21: error: private field 'orientation' is not used [-Werror,-Wunused-private-field] Change-Id: I82f8b8009b48d41fd2beb95d6107e505f9d4e835 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix GCC 6 -Wunused-functions warningsMarc Mutz2016-03-051-6/+0
| | | | | | | | | GCC 6 is able to identify member functions that are unused. Remove them. Change-Id: Ic77548164b38a1cd3c957d2c57a5bccb979bc02e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMenuBar: Acknowledge AA_DontUseNativeMenuBarGabriel de Dietrich2016-02-291-1/+2
| | | | | | Change-Id: I756f4181d66ef6e79ab7b7be8a23a10171a9f30c Task-number: QTBUG-28960 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QMenu: Add delegate related notes to OS X-only APIGabriel de Dietrich2016-02-191-2/+8
| | | | | Change-Id: I88bb4fdb2c11da0602e4c9f6637bbdeaa715aba0 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>