summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Use QVector::reserve() all over the place.Sérgio Martins2015-06-295-4/+16
| | | | | | | | | | | | Reduces internal memory fragmentation. The search criteria was: QVector::append(), QVector::push_back(), QVector::operator<<() and QVector::operator+=() calls inside for, do and while loops. Statements inside ifs and out of loops weren't considered. Change-Id: Ie5aaf3cdfac938994e6e5dfa5f51de501ed79a0c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QGraphicsItemAnimationPrivate: replace a sort with a rotateMarc Mutz2015-06-281-5/+3
| | | | | | | | | | | | | | | There's really no need to sort the whole collection if you a) know it's already sorted and b) already know its final position, because you looked it up using lower_bound a line up. Instead of appending and sorting the whole thing, simply append and rotate into place, conveniently packaged as positional insert. Also reverse the check for presence: less negations: more readable. Change-Id: Id23f108b64976061f666f517fbc436d3c72dd25b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Make QGraphicsItemAnimationPrivate::Pair a (C++98) PODMarc Mutz2015-06-281-2/+1
| | | | | | | | There's no value in the ctor and it might be inhibiting some C++98 POD-only compiler optimizations. Change-Id: I6887afcd2af9805251eac2d8dfe4ced5b54bff85 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QGraphicsItemAnimation: don't hold Private::Pair in QListMarc Mutz2015-06-281-15/+16
| | | | | | | | | | | | | | QGraphicsItemAnimationPrivate::Pair, being a (qreal,qreal) is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by marking Pair as primitive and holding it in QVector instead. Change-Id: I190721f4b0cdeab2efab2d51536f64572cd663df Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDataWidgetMapper: use QList::reverse_iteratorMarc Mutz2015-06-281-1/+1
| | | | | | | ... now that it's available. Change-Id: I85f547b294688c97288aaeab2af213c59e856a2b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QMdiArea: don't hold QPointers in QListMarc Mutz2015-06-241-2/+2
| | | | | | | | | | | QPointer is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Change-Id: I3cdd4914658b6fe025ad379007502b4223e126cd Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMacStyle: replace a QSet<QPointer> with QVector<QPointer>Marc Mutz2015-06-242-10/+5
| | | | | | | | | | | | | | Holding a mutable item in a QSet violates QSet invariants, namely that in bucket N, all items have hash % size == N. If a value gets reset to nullptr by external means, that invariant no longer holds. The code works by pure luck. Replace the set with a vector, which doesn't care whether elements change under the hood, and will also outperform the typical QSet use due to better locality of reference. Change-Id: Ied7940e82525fd0da9f74dfb0bc36a320b45d172 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* widgets: Use QList::reserve(), reduces reallocations.Sérgio Martins2015-06-2317-41/+117
| | | | | Change-Id: I49cc03f365c77f142f62c8e77505ec09723a44d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QGestureManager: fix expensive iteration over QHash::keys()Marc Mutz2015-06-211-3/+4
| | | | | | | | | | | | | ... with iteration over the hash itself. gesturesByType is a local variable, so there's no way functions called in the loop can modify it. This dividing operation would greatly benefit from a splice operation in QHash... Change-Id: Ifd241d2da9c6998c2ad0b08294fca84d5b188d0f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QGestureManager: fix expensive iteration over QHash::keys()Marc Mutz2015-06-211-3/+3
| | | | | | | | | | ... with iteration over the hash itself. gesturesByType is a local variable, so there's no way functions called in the loop can modify it. Change-Id: I5971c404f4ae8473d4926b68eb7a9c60801f208d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMdiSubWindow: fix O(n+nlogn) loop to O(n)Marc Mutz2015-06-211-2/+2
| | | | | | | No further comment. Change-Id: I2056b97281b5775d59c0ef9b4a5cbf03943a7d6b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QAbstractItemView: convert some assignments into RVO'ed initializationsMarc Mutz2015-06-201-4/+2
| | | | | Change-Id: If4b612460166675e91906a49e03de8ad4c50739f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QMenu/QToolBar: Add overloads of addAction() using Qt 5 signals and slots.Friedemann Kleint2015-06-184-0/+282
| | | | | | | | Add documentation dummies and templates, add tests verifying compilation. Change-Id: Ide336b28bc069cfd17848ce3a17fd428e36ed65b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QButtonGroup: don't create a list just to find the minimum elementMarc Mutz2015-06-171-7/+6
| | | | | Change-Id: Ibd66ad81264abbe804db2bae48823966d5e4f449 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Make sure the QDockAreaLayoutInfo item_list is detached when we are going to ↵Olivier Goffart2015-06-161-2/+2
| | | | | | | | | | | | | | | modify it This can lead to situations in which the gap item ends up in the saved state 'subinfo' is owned by the item, but the const-ness is not transferred to the pointer. So calling a non const function (unplug) that changes the subinfo changes it in the original list as well. This is a problem because that list might be shared with the saved state. Change-Id: I90a5faafea5958043db610a84c069494f2e48137 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
* Don't try to load plugins if QT_NO_LIBRARY is set.Ulf Hermann2015-06-122-0/+6
| | | | | | | Any plugin loading is impossible then and the code won't even compile. Change-Id: I81e49ff87ae1a609521d526f5098a0d44cc28f7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Mark unused parameters with Q_UNUSEDUlf Hermann2015-06-121-0/+2
| | | | | | | | This prevents compiler warnings on less common branches of certain ifdefs. Change-Id: I89bae68491151b21cf6887a854cc4c9f68838cf9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add qHash(QSizePolicy)Marc Mutz2015-06-122-0/+15
| | | | | | | | | | | Size policies can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtWidgets][QSizePolicy] Added qHash(QSizePolicy). Change-Id: Id219f47ac6cb236efdd73cad7b892c8efd034d5c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* itemsviews: Add 15 QList::reserve() callsSérgio Martins2015-06-085-11/+37
| | | | | | Change-Id: I4ed8872ecd560d51c00cb3d2b93e082c5abdd8dc Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove exec bits from files that should not be executableDmitry Shachnev2015-06-074-0/+0
| | | | | | | Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* doc: Remove uses of \returnsMartin Smith2015-06-051-2/+2
| | | | | | | | | It is a doxygen command that is not recognized by qdoc. Change-Id: I26b0c54a1aa715fc9d8b70e411502f46fc6bc0f1 Task-number: QTBUG-46495 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devSimon Hausmann2015-06-0439-213/+337
|\
| * Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0339-213/+337
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| | * Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into ↵Jani Heikkinen2015-06-021-1/+3
| | |\ | | | | | | | | | | | | refs/staging/5.5.0
| | | * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-06-011-1/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/global/qglobal.h Change-Id: I2c0f7544bf194f2d0f59218fd583c822901487b0
| | | | * Doc: clarify ownership after QStackedWidget::removeWidgetJoerg Bornemann2015-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia14b72cdac3205a3896c47ecc81b31adb508181b Task-number: QTBUG-44891 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| | * | | Avoid QWidget dependency in QtGuiLaszlo Agocs2015-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not a real dependency as all we need is to store a pointer, but better not to use the name QWidget at all. Change-Id: I30ef1dd44ac7e42c1b9c84675f94088b8c516076 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * | | Clip QOpenGLWidget and QQuickWidget correctlyLaszlo Agocs2015-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce support for the widgets' clipRect(). Right now render-to-texture widgets in scroll areas placed close to each other result in broken (non-existent) clipping. Similarly, stack-on-top widgets fail to clip when placed inside a scroll area. This is now corrected and the qopenglwidget example is enhanced to utilize a scroll area. Task-number: QTBUG-45860 Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * | | Fix combobox regression 5.4 -> 5.5Allan Sandfeld Jensen2015-05-301-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid a touch release outside the combobox triggering the popup, a check was added that the combobox was hit. This fails if the combox itself is only used for the popup and associated behavior, but does not exist as widget. This patch changes the check so that only touch release checks for a hit, but a generic click still behaves as in 5.4 to avoid regressions. This fixes comboboxes no longer working in QtWebKit, since QtWebKit renders its own comboxes in webpages, and only uses the popup of the QComboBox. Task-number: QTBUG-46152 Change-Id: I74fd57b2e42e77aa4a269d812ca4a6689f254889 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | Emphasize the need for calling setDefaultFormat early on OS XLaszlo Agocs2015-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-46067 Change-Id: I0fe6e7ba309306a8fc471424b30eed4491bd39e7 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * | Windows: Fix font metrics of Vista style wizards.Friedemann Kleint2015-05-292-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVistaHelper::drawTitleBar() used the font returned by QApplication::font("QMdiSubWindowTitleBar") (typically "MS Shell Dlg 2",16) to calculate the bounding rectangle of the title text. However, if the window is a toplevel QVistaHelper::drawTitleText() uses the theme font obtained for WIZ_TMT_CAPTIONFONT (typically "Segoe UI",11.25) to draw the title (since it is a window title). This causes the font to be cropped when changing the application font or spurious black rectangles to occur. Fix this by exposing QWindowsFontDatabase::LOGFONT_to_QFont() via QWindowsNativeInterface, and creating a QFont from the LOGFONT obtained for WIZ_TMT_CAPTIONFONT and using that for the bounding rectangle in the case of toplevel windows. Split up the HFONT QVistaHelper::getCaptionFont(HANDLE hTheme) into static LOGFONT getCaptionLogFont(HANDLE hTheme) and use that to obtain the HFONT in drawTitleText() or QFont in static QFont getCaptionQFont(), respectively. Task-number: QTBUG-46360 Change-Id: I9069b403f7f948b6738eec452cb7584be45b8a29 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| | * | Improve QHeaderView::sectionsInserted performanceIvan Komissarov2015-05-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old implementation had complexity O(oldSectionCount); replace it with O(hiddenSectionCount) algorithm. This boosts performance in case of the vertical headers for models with big row count. Change-Id: I7bb02f5579ce83fbdecf5f8c3aa7dcc0ac60dd40 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | Translate AM/PM under the QDateTimeParser context so it is consistentAndy Shaw2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to ensure that the same text will be used in both QDateTimeParser and QDateTimeEdit, use the QDateTimeParser context for the AM and PM strings. Task-number: QTBUG-251 Change-Id: I89b0809825251181440bf19cbe5828024a43acfb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * | Fix crash due to QTreeView accessing deleted model indexes.Joerg Bornemann2015-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeViewPrivate::updateScrollBars depends on a correctly set up viewItems vector. If a delayed layout is pending, we must call QTreeViewPrivate::executePostedLayout before accessing any stored model indices. Task-number: QTBUG-45697 Change-Id: I55fcbaf81f225b26181c2cf739283740b85dd16a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | QWindowsVistaStyle: Do not stop animations when falling back to XP.Friedemann Kleint2015-05-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, progress bar animations are stopped. Task-number: QTBUG-46308 Change-Id: I7b6a2b26afb885db6bc9aea719a002f0ebe7274d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| | * | Fix a crash in tst_QTouchEvent::deleteInRawEventTranslation().Friedemann Kleint2015-05-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test deletes a widget in QEvent::TouchBegin. This is part of a series of patches to revive the test; it is currently not run since tests/auto/gui/kernel/qtouchevent/qtouchevent.pro is missing CONFIG += testcase. Task-number: QTBUG-46266 Change-Id: I65c0a431ff1807133438764dd8b3c16bb9cb6743 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
| | * | D-Bus system tray icon: submenus can be created after context menuShawn Rutledge2015-05-211-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMenuPrivate::init() calls QPlatformTheme::createPlatformMenu() to create a platform menu, but on Linux, that returns null for now. QSystemTrayIcon::setContextMenu() results in recursive calls to QSystemTrayIconPrivate::addPlatformMenu() which then calls QDBusTrayIcon::createMenu() for the context menu and each submenu. However if a submenu is added afterwards, a corresponding platform menu is not immediately created. Now copyActionToPlatformItem() will detect and create the missing platform submenu, by calling a new method: DBusPlatformMenu::createSubMenu(). This is because there is no way of knowing that it's a tray-specific context menu (which is so far the only case in which we use DBusPlatformMenu). So, QPlatformMenu::createSubMenu() needs to exist as a new QPA interface for this use case. Task-number: QTBUG-45803 Change-Id: Ib319e873082196515ea0580d70d069099cf2c175 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * | Don't propagate single touch events only from touchpads on OS XAlexander Volkov2015-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way the tests that send fake touchscreen events can work. Change-Id: I997ef015d0096249c4549dbd21b99d0248e0c987 Task-number: QTBUG-46111 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * | Unclutter debug operators of gestures.Friedemann Kleint2015-05-201-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the helpers in qdebug_p.h to suppress class and enum names. Change-Id: Ib71f0a1e5b3c22f44d68a7930fef38384f037204 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * | WinRT/Winphone: Fix warnings in qtbaseOliver Wolff2015-05-183-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I41725bcfeee0124b259e96f1e3a261e30f14350a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| | * | Fix typo and formatting in QWidget font documentation.Mitch Curtis2015-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I6dea7f1aa2827dbc4c4068184690c80a36ef2be6 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| | * | QStyle debug helpers: refactor dead codeGiuseppe D'Angelo2015-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or compilers complain about the second, unreachable return. Change-Id: Ic89361859fcf5cf33a57de0c803526702fa831b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | QMenuBar: honor the left widget size hintGiuseppe D'Angelo2015-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expandedTo() returns the expanded size, so we must assign the return value (otherwise it's a no op). We were accidentally discarding it. Task-number: QTBUG-36010 Change-Id: Ic70c12648382a6b2ef7d70809bf25caa4cbe2f3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | QFileSystemModel: remove useless checkGiuseppe D'Angelo2015-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The NULL check is on the line before, no point of repeating it again. Change-Id: Id6fa9ffc4dcc00819882f2d3157e9dbdb0e1db78 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | Fix division by zero crash when restoring screen settingsKati Kankaanpaa2015-05-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The restoredScreenNumber was used before it's existence was checked, which caused 'division by zero' if the screen has been removed after storing the screen number. The check if restoredScreenNumber exists was moved to happen before restoredScreenNumber is used for the first time. Change-Id: Iada0e8c5cbb6d8ca88df171dbee045be249f50cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | Cocoa integration - implement Qt::WindowModal file dialogsTimur Pocheptsov2015-05-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, for Qt::WindowModal dialogs we were creating modal sheet with beginSheetModalForWindow: and later (from exec) calling -runModal, essentially making a window modal dialog into (now) application modal sheet, which is not right- it's centered relative to desktop and the jump from window modal sheet's position (centered relative to a window) to application modal was quite visible. Now, instead of [panel runModal] (== [NSApp runModalForWindow:panel]) we call [NSApp runModalForWindow:theRequiredWindow]. Change-Id: I793dc72c7d1fe96497bb35754f4d0eac9a5e00e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * | Remove init() function declaration.Morten Johan Sørvig2015-05-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix doc error. This function is not used in Qt 5 and there is no definition for it. Change-Id: Id7e4fe1ada54005f65a559ae1ab393d011c37480 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| | * | Create contexts and pbuffers with the correct screen in QOpenGLWidgetLaszlo Agocs2015-05-122-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It won't be functional otherwise with GLX when the QOpenGLWidget is targeting a separate X screen. Change-Id: Ibe5b89023f833039bb67d94b78b173de2e021ac9 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * | Improve QListView scroll bar calculation.Christoph Schleifenbaum2015-05-101-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When both scroll bar's policies are set to ScrollBarAsNeeded, make sure the scroll bars are shown if needed and not show if not. Even the corner case, where one scroll bar's visibility depends on the other, is handled properly. Task-number: QTBUG-45470 Change-Id: I11d6ccf7c0b51644a5ce2d5c3fc59e2e4812755d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
| | * | QDialogButtonBox: prevent crashes on deletions in slotsGiuseppe D'Angelo2015-05-091-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, user code connected to signals emitted from Qt may destroy an object's internal status while a signal is being emitted. Guard a bit QDialogButtonBox signal emissions to prevent crashes in case the button or a dialog get deleted from a slot connected to clicked(). Also, be sure to emit the corresponding accepted/rejected/etc. signal. Change-Id: I7b1888070a8f2f56aa60923a17f90fb5efef145c Task-number: QTBUG-45835 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>