summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QMacStyle: Use NSRect instead of CGRect in drawNSViewInRect()v5.4.0-beta1Gabriel de Dietrich2014-10-131-3/+3
| | | | | | Change-Id: I90fd62dea377dfa9569d1730a67136c7a5dc6f82 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* DPI-scale PM_SubMenuOverlap after allOswald Buddenhagen2014-10-101-1/+2
| | | | | | | | | | This actually isn't a magic value and needs to be scaled. This partially reverts commit be1635e2d6a4e42f3f828e7831e5dbf867ba161d. Task-number: QTBUG-41864 Change-Id: Ie03c96c8b5343386f55c3ae9b988e79f943f334e Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QMenu: ensure that a menu item's icon can be removed dynamicallyShawn Rutledge2014-10-101-0/+2
| | | | | | Task-number: QTBUG-41348 Change-Id: Iad3b7f000ebce51530f5e196868aefffad2e1eab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add a warning when using QOpenGLWidget as a native childLaszlo Agocs2014-10-101-0/+6
| | | | | | | | | Just like it is done for QQuickWidget. Task-number: QTBUG-41779 Change-Id: I1b27c2ed34ecb2520edf82843b675dbf6b0eab8e Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-094-5/+5
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Don't use QStringLiteral in startsWith/endsWidthMarc Mutz2014-10-091-1/+1
| | | | | | | | | | | | | | | For QLatin1String, startsWith/endsWith is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just use QLatin1String instead. Change-Id: I7eaf464c67b55116f970fe7f58a85f19ce4d254e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-091-1/+1
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't use QByteArrayLiteral in comparisonsMarc Mutz2014-10-091-1/+1
| | | | | | | | | | | | | | | For const char*s, operator== is overloaded, so comparing to a (C) string literal is efficient, since qstrcmp doesn't require the length of the strings to compare. OTOH, QByteArrayLiteral, when not using RVO, litters the code with QByteArray dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare with a (C) string literal instead. Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix license text and URLs in QMessageBox::aboutQt().Friedemann Kleint2014-10-091-13/+10
| | | | | | | | | Point to new qt.io site, adapt licensing text. Task-number: QTBUG-41798 Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Oswald Buddenhagen2014-10-073-53/+118
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-063-53/+118
| |\ | | | | | | | | | Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
| | * QMacStyle: Fix QToolButton appearance on YosemiteTimur Pocheptsov2014-10-021-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Yosemite checkable toolbuttons look differently when highlighted - this modification tries to imitate such look without pixmaps we used on OS X >= 10.5 && < 10.10. Change-Id: I0fcdff42a67fa6d5188c9dc64401f0f27ae60b5d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * QPlainTextEdit: Fix crash on complex undo w/full width selectionEskil Abrahamsen Blomfeldt2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Say you have a document of two blocks of text. When you select a block of text in the document and then replace this with a new empty block (by pressing enter) and then subsequently undo this action, the following three steps are performed as a chain of undo commands: 1. Remove the empty block at the beginning of the document 2. Insert a new empty block at the beginning of the document 3. Insert the text back into the first block Since a block is removed and inserted in the same go, both blocks require a relayout, since the accumulated change spans both blocks. However, in QPlainTextDocumentLayout we would only look at the max of either removed chars or added chars. This would match the text length of the first block at this point, so we would only relayout that block. However, since we are also removing characters, the actual accumulated change to the document is larger. We should relayout any block touched by the sum of the added and removed character counts. Missing this, the paint event would later query block.layout()->lineForTextPosition(0) which would give an invalid line despite the fact that the block.length() > 0. This caused a crash in the paint event when the full width selection was turned on. Note that the logic here was only recently updated to include the removed characters at all in the logic, by the SHA1: 2983cb9531d47e5826540ca79e3066a8ed0db30c. [ChangeLog][QPlainTextEdit] Fixed a crash when using full width selections and issuing a complex undo command chain which removes and inserts an empty block in one go. Task-number: QTBUG-36415 Change-Id: Iafe8a69e455e0c713a48714f10f0cace69c84f51 Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * QMacStyle: Generalize Cocoa control renderingGabriel de Dietrich2014-09-292-51/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we were restricted by the values of ThemeButtonKind, which consist mostly of buttons. We want to generalize to other kind of controls when the time arrives. Already, QPushButton with pull- down menu is not possible to get from that enum, while its easy to get from NSPopupButton. Task-number: QTBUG-40833 Change-Id: I244c42c42ab595f4790050eb15ade70443e155b2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | Doc: deletion plugin-howtos.qdocNico Vertriest2014-10-071-2/+3
|/ / | | | | | | | | | | | | | | | | | | Document is moved to qtdoc/doc/src/howtos Including snippet files. Task-number: QTBUG-38412 Change-Id: Iba15689ad63e17c370c21c9ee5a1fff40c79fcec Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | QSizePolicy: remove an outdated commentMarc Mutz2014-10-041-1/+0
| | | | | | | | | | | | | | The change asked for by the comment is apparently done. Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix the text field alignment.BogDan Vatra2014-10-031-2/+0
| | | | | | | | | | | | | | | | All Android styled controls must use AndroidControl methods. Task-number: QTBUG-41722 Change-Id: I594829bfed8468888738b39450fe94af35f14d7a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Revert "Don't generate documentation for classes which are not available"Venu2014-10-021-9/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit dbbb4d1654ab9deec6a940d3c7304808bd425422. This change should enable QDoc to generate documentation for the Mac-specific widgets, QMacCocoaViewContainer and QMacNativeWidget. Change-Id: If0dd6530906e3e13921384372badc73ba4727b9d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-016-23/+87
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-296-23/+87
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | * QMacStyle: Improvements to some buttons on YosemiteGabriel de Dietrich2014-09-242-18/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Radio button, checkbox and non-editable combobox, in normal, small and mini sizes, and only in the inactive state. This commit amends 982b9b7ec2441103b100. Task-number: QTBUG-40833 Change-Id: If3f2bb215e9b8966cbf15f08fa252feb92483c7b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * Fix compilation on OS X with macx-clang-32Andy Shaw2014-09-231-4/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-27335 Change-Id: I1703aee2d90e02b1a6ed386715bebddf6dedb9f5 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| | * GTK syle: initialize all members of GdkColorGiuseppe D'Angelo2014-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Coverity rightfully complains that we're copying a struct with an uninitialized member, triggering undefined behavior. Change-Id: I7635b859eb11e5eb9b825df8e23b453116059892 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| | * OS X: Fix menu item shortcuts without modifiersEskil Abrahamsen Blomfeldt2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced by bdebec4e2ef79f1771d2dcc22f9a919eb4487567. The intention of the change was to avoid using Qt's shortcut mechanism to trigger menu items which were already triggered through the regular menu API in Cocoa. However, Cocoa has trouble with key equivalents that do not have any keyboard modifiers. Thus, we have to allow these particular key sequences to go through the regular system. I've verified that the original bug is still fixed with this change. [ChangeLog][OS X] Fixed menu item shortcuts without keyboard modifiers. Task-number: QTBUG-41192 Change-Id: I8f5a9cbc7a448b3cb0519baed95be5cbb630205c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Make sure we don't delete child QWindows if they have WA_NativeWindow setGabriel de Dietrich2014-09-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a QWindow automatically deletes its child windows because they are in the QObject hierarchy. However, if the user sets both WA_NativeWindow and WA_DontCreateNativeAncestors, we can't just delete that widget's QWindow. First because the widget doesn't get notified (and maybe it should be), and then because we may invalidate any reference to the QWindow the user may have kept. Our solution is to reparent the child QWindows into the new parent's closest QWindow. We must, however, take the precaution of not keeping any reference to the backing store in the platform window. Reparenting operations can trigger repaints on the platform window, but the backing store is not set and flushed until later. Task-number: QTBUG-38377 Change-Id: I353f5528f227a227b6d10419367cbe1d5d07a94e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Document non-intuitive behavior of QTreeWidgetItem::setHidden().Christian Kandeler2014-09-221-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-30366 Change-Id: I02e098fbf0e3a44794ed0e1b1bf533c1c9ad5632 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Don't dpi-scale -1 pixel metricsOswald Buddenhagen2014-09-301-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | It may be rounded down to 0, thus losing its magic value. Task-number: QTBUG-41324 Change-Id: I5a5b98bb24bd0478c10940a90a7dc691e2663f4d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Doc: Use title case in section1 titlesNico Vertriest2014-09-307-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | QMdiArea: Fix positioning of cascaded sub windows.Friedemann Kleint2014-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Take PM_FocusFrameVMargin into account. Task-number: QTBUG-35146 Change-Id: I1499790537ddf9fbb912ab764b7d049ee11af95d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | | Additional support for devicePixelRatio in CE_MenuItem’s icon paintingMihailNaydenov2014-09-306-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | FusionStyle and MacStyle have this already, the change just brings it to the others. Task-number: QTBUG-40277 Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | | Fix losing dirty state when calling update() from paintGL()Laszlo Agocs2014-09-301-1/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | When the paint for the QOpenGLWidget was in invoked on the fast path, where only that widget was dirty, the resetWidget call after sending the paint event removed the widget from the dirty list, making it impossible to schedule an update during the event handling. The correct way is to clean the list and then send the paint events. Change-Id: Icdad5686ded7944fd1c8af56496f725e163a60e6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Widgets: remove references to QStyleOptionFrameV<n>Marc Mutz2014-09-266-20/+18
| | | | | | | | | | | | | | They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame. Change-Id: Icff45cbd3a47db8618a7f7a80f7252651969237c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Balloon tip must follow systemtray iconAllan Sandfeld Jensen2014-09-253-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the a message notification is created at the same time as the system tray icon is embedded it may start at a wrong location, since the icon location it bases its own location is not yet final. This patch adds code to update the balloon tip location when the system tray icon is moved or resized. The bug and fix can be tested by the systray example by disabling the icon and letting show message trigger both showing it and the message. Change-Id: Ie1dc10489ad420e581e32afeb757c236fb5129ab Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Fix MSVC2013-compiler warnings with QT_NO_FILESYSTEMWATCHERJochen Seemann2014-09-251-4/+11
| | | | | | | | | | | | | | | | | | dialogs\qfilesystemmodel.cpp(203,1667,1680): C4189: 'd': local variable is initialized but not referenced dialogs\qfilesystemmodel.cpp(1547,1720,1847): C4100: 'variable': unreferenced formal parameter Change-Id: Ic3cef264dcd0b939748bec914eb9c29f86f6ed0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Generate Show/Hide events for widgets when minimized state changes.Friedemann Kleint2014-09-241-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression against Qt 4, where Show/Hide events were received when the minimized state changed. It is restricted to QWidget so as not to introduce additional events to QWindow (which already has signal visibilityChanged()) and cause unexpected side effects in QQuickWindow. Task-number: QTBUG-41312 Change-Id: Ib165a5daf7a7e5d8231ef8a94b70e8a2a3253057 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Update license headers and add new license filesMatti Paaso2014-09-24458-8669/+5005
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Fix misleading documentationAlex Blasche2014-09-241-0/+3
| | | | | | | | | | | | | | | | | | Not every length parameter unit is accepted by Qt Style sheets. Task-number: QTBUG-31907 Change-Id: I953c56caf68c1397ba24369f433d21c6f4772d0d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-2438-120/+586
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-2338-120/+586
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * QToolButton: properly reset the size hint when a menu is set on itGiuseppe D'Angelo2014-09-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QToolButton::sizeHint() takes into account the presence of a menu. However, setMenu() doesn't retrigger a size hint recalculation. Hence, (un)setting a menu on an already sized tool button won't properly reset the size hint. Since the calculated size hint is cached, delete the cached value and call updateGeometry to cause a recalculation. Task-number: QTBUG-38949 Change-Id: I6e79e5e70e31afdfd129282b3668875eca86f51d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QSizeGrip: use a QPointer to the tracked TLWGiuseppe D'Angelo2014-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And not a normal pointer. The problem is that in certain scenarios, if the TLW containing a QSizeGrip changes and the old TLW gets immediately destroyed, then the mechanism which updates the tracked TLW is run too late, and ends up accessing a dangling pointer. Therefore, we need to protect that pointer via a smart pointer. Task-number: QTBUG-22867 Change-Id: Icfb051132bacde604f660ac7a98bc0a9d1022c68 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Improved documentation for QStyledItemDelegate::eventFilterAki Koskinen2014-09-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added the notion that enter and return keys are not handled if editor is of type QTextEdit or QPlainTextEdit. Change-Id: I9d5cb529bf154c687fab1949fccf37e9da096c85 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * QMacStyle: Use NSView rendering for some inactive widgets on 10.10Gabriel de Dietrich2014-09-114-3/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, we use them for inactive non-editable combo box, check box, and radio button only on Yosemite. We keep as much as possible the previous behavior on older versions. In addition, we add a way for QQuickStyleItem to specify the window the item is on. This is currently without effect, since we don't seem to take the inactive window state into account. Task-number: QTBUG-40833 Change-Id: I2fb2a99e6adf1972f881195b79b07ce85a960273 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * Fix possible divide by zero in QPlainTextEditEskil Abrahamsen Blomfeldt2014-09-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the font engine for some reason fails to get font metrics for the font, the application should still not crash. [ChangeLog][Widgets][QPlainTextEdit] Fixed a possible divide by zero crash when font metrics were missing for the font. Task-number: QTBUG-40347 Change-Id: I571bc3eace07cdbee6f9ce9aa649df95412aed71 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Avoid adding widget to its own layoutThomas Fischer2014-09-055-39/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widgets and layouts added or inserted to a layout are checked for: - Not being NULL - Not being the parent widget of a layout or the layout itself, respectively Without this commit, adding a widget to its own layout would result in a CPU-hogging infinite loop. Now, a warning is written to stderr and the add or insert function call is ignored. The checks are implemented as public functions of QLayoutPrivate and thus accessible in QLayout's descendants to be used in various "addWidget", "insertWidget", etc functions. Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed accept widgets that are NULL. To not break this behavior, any call for the check functions first tests if the widget or layout, respectively, to test is NULL or not and calls the check only in the latter case. Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added. For an unpatched Qt 5.3, each of those automated tests will freeze as explained in QTBUG-40609. For a fixed version, warning messages about invalid parameters to addWidget/addLayout/... calls will be read by QTest::ignoreMessage, resulting in a passed test. Change-Id: I1522d5727e643da3f7c025755975aca9f482676d Task-number: QTBUG-40609 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Add missing private headers warningSamuel Gaist2014-09-0414-0/+154
| | | | | | | | | | | | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QMacStyle: Fix inactive combo box appearance in 10.10Gabriel de Dietrich2014-09-011-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, HITheme is not helping, and renders inactive controls as disabled. Also, given the design changes in Yosemite, we can't just desaturate the active pixmap and render it. In this case, we render the inactive control and enhance it, making very close to the expected result. The pixel-exact version would be to render a plain push button, and then add the combo box arrows. However, these arrows would need to be created (and updated) since there seems to be no more API to render them. Task-number: QTBUG-40833 Change-Id: If1bc366c0bc83123972fabebbc8beeb9f071e7a1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * QFileDialog: save and restore all settings even if widgets not usedShawn Rutledge2014-09-012-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some applications may use native file dialogs and some may use the widget implementation, but QFileDialog always saves all settings to the same place each time it destroyed. So it is important to remember all settings read in restoreState and put them back in saveState. This bug was introduced by 37ca2224eca671200a2710f57f970d2993e62aa5 Task-number: QTBUG-36888 Change-Id: Ied1db83817480312e963a042784d7bdd16f0a2b1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | * QMacStyle: Fix push buttons focus ring on YosemiteGabriel de Dietrich2014-08-271-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HITheme renders the focus ring in a way that diminishes contrast on the focused button edges. The same issue seems to affect combo boxes, check boxes, and radio buttons. We refactor the code that was used to draw CE_FocusFrame into qt_drawFocusRingOnPath(). We use it to render our own path for the push button contour. This should also allow us to implement the focus ring animation in the future. As a side note, notice how the square button part (kThemeBevelButton) is a complete joke. Not only we impose the wrong button kind and let HITheme do what it can with it, but we also prevent ourselves from using it by never adding padding for the focus ring. Hopefully, we can fix this whole button sizing and padding mess in 5.5 or 6.0, whatever breaks less apps around. Task-number: QTBUG-40833 Change-Id: Ib9e7829d99b38dc926c55b31c3d6d5d32b691867 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| | * QMacStyle: Fix QTabBar appearance on YosemiteGabriel de Dietrich2014-08-261-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The selected tab text color should be white except when the window is not active. Also, no text shadow should be rendered in any case. Finally, there's no need to move the tab shape up anymore. Task-number: QTBUG-40833 Change-Id: Ibb35f0bb7a12fb005202fd8c082eb9bb19645b2b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>