summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fixed license headersJani Heikkinen2015-02-178-8/+8
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Introduce QT_NO_MIMETYPESérgio Martins2015-02-172-1/+10
| | | | | | | | | | | | | The mime type stuff generates one of the biggest translation units in QtCore due to the compressed 1.7MB freedesktop.org.xml resource. With QT_NO_MIMETYPE, libQt5Core.so is almost 400Kb smaller (4.8MB->4.4MB gcc 4.9 stripped release build) Change-Id: I5339090994034355724ff4deddb64720e81baeaf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-161-3/+3
| | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Add widget support for requestUpdate() and improve its docs and testsLaszlo Agocs2015-02-161-1/+11
| | | | | | | | | | | We must do something when requestUpdate() is called on a QWidgetWindow. The semantics of UpdateRequest for QWindow and QWidget are unfortunately different: for widgets an UpdateRequest means "sync the backing store". For QWindow it also involves marking as dirty. Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Add missing QPlainTextEdit::createStandardContextMenu(QPoint)J-P Nurmi2015-02-152-1/+21
| | | | | | | | | [ChangeLog][QtWidgets] Added QPlainTextEdit::createStandardContextMenu(QPoint) overload that takes the position in document coordinates. This method enables the actions that are sensitive to the given position eg. where the user clicked. Change-Id: I47ed7a1afc4fcfb3318c9b7af37867aeb7f2aa35 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QWidgetTextControl: add object names for standard context menu actionsJ-P Nurmi2015-02-151-0/+8
| | | | | | | Mainly for auto testing purposes. Change-Id: I776f9d7f28f9a04ba3f9a6bbc549d6e86bece876 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileDialog: don't warn about directory url prematurlyRichard Moe Gustavsen2015-02-151-1/+1
| | | | | | | | | The app can set a directory url before showing the dialog. Since we don't really know if the dialog is going to be native or not at that point, it is too early to warn. Change-Id: Ie9875ca90a500258841bad702ee864a46775641c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QFileDialog: don't clear directory url upon showRichard Moe Gustavsen2015-02-151-4/+0
| | | | | | | | | | | | | | | | | | | | | If the app sets a directory url that is not a local file, the url would be cleared just before showing the dialog. The reason is that we try to convert the url to a local file when preparing helper options, but fail. Trying to convert the url in the first place is wrong, since the app should be able to point the file dialog to any url, not just local directories. Since QFileDialogPrivate::init() calls QFileDialog::setDirectoryUrl(), and setDirectoryUrl() calls options->setInitialDirectory(), there should be no reason to set initialDirectory once more in QFileDialogPrivate::helperPrepareShow(). The easiest fix is therefore to remove the code in initHelper() that modifies the initial url. Change-Id: Ia6c2113e867b1156cf9d59d347116f7df8c06d93 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-15129-385/+385
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make QAccessibleTextWidget::attributes respect default document fontBoris Dušek2015-02-131-3/+3
| | | | | | | | | | | | | QTextFormat::font{Weight,PointSize}() etc. return the font trait explicitly set on the QTextFormat, while QTextFormat::font() returns font which also uses the QTextDocument::defaultFont() as a default for any font traits not explicitly set on the QTextFormat. Accessibility support for text attributes used the former, which was wrong; this commit fixes it to use the latter. Also includes tests to verify the fix. Change-Id: Iab7f2be1b68adaad847d1f29c9e5af2195416035 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-1312-0/+48
| | | | | | | | | | | Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-1312-14/+15
| | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix text-align justify in accessibility supportBoris Dušek2015-02-131-1/+1
| | | | | Change-Id: If43be193d64d7df29eb3f89b6c528ee1e8de310f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Clarify QTextEdit::createStandardContextMenu(QPoint) docsJ-P Nurmi2015-02-121-1/+1
| | | | | | | It assumes document coordinates. Change-Id: I9c1db154d45053065533c10bf76c338cc1324081 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtWidgets: assorted migrations to QString::asprintfMarc Mutz2015-02-122-5/+5
| | | | | Change-Id: I1a9977f52e9ce098944f876bca19669dac44d2c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Q_ENUM in QWizard.Friedemann Kleint2015-02-121-1/+1
| | | | | | | | | | Make QWizard::WizardStyle a Q_ENUM instead of WizardButton. Fix startup warning of Qt Designer: QMetaProperty::read: Unable to handle unregistered datatype 'WizardStyle' for property 'QWizard::wizardStyle' Change-Id: Icb86e88b6ee2da301ef4ed9c003b54e0cc42efa5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Use TabFocusBehavior in QStyleHints in widgetsLiang Qi2015-02-121-3/+1
| | | | | | | | qt_tab_all_widgets in qapplication.cpp was updated. Change-Id: If7ce14fc132d8a752c0e97450c4c8ecd75526f87 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* xcb: QSystemTrayIcon: grab background pixmap for compositing only onceShawn Rutledge2015-02-121-12/+11
| | | | | | | | | | | | | | | Followup to 2203d9d93e24e00d6e9bc9bda0e65a0c7f9923cc: clearRegion takes a little time, so doing grabWindow() too soon afterwards can result in grabbing a pixmap with undesired leftovers. And doing it every time we render the icon causes flicker. So, do clearRegion() ASAP when showing the icon, wait for it to happen, then grabWindow() only the first time we render, and reuse the resulting pixmap for all future calls to paintEvent(). (The downside is, if there is any corruption during the first grabWindow(), it's going to stay there as long as the app is running.) Task-number: QTBUG-35658 Change-Id: If881ab192dba43758dcbb0d080663ff42057fa4f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QFileInfoGatherer: fix race condition on fetchedRootMarc Mutz2015-02-121-4/+4
| | | | | | | | | | | | | | | | | | Though only present in QT_BUILD_INTERNAL builds, accessing an unprotected global bool is still a data race. While the intended use of reset flag/start test/check flag is kosher when it comes to the happens-before relation, this is no longer true when users use two instances of QFileSystemModel at the same time. To fix, make the bool an atomic int instead. Relaxed memory ordering suffices, since the atomic int represents all the data. The races over which model sets the variable is the job of the test case to resolve, and doesn't affect other users. Change-Id: I4d245b93a741e3457c42df6edd5b836a9bdacd83 Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live QString::asprintf()!Marc Mutz2015-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asprintf() is a GNU extension that prints into a string it allocates internally. Arguably, that's a better name for QString::sprintf() since it also allocates memory internally. The main problem with QString::sprintf() isn't that it's dangerous to use (it is), but that it's not static. It also returns a reference instead of by-value, breaking RVO. There is a comment about removing this function completely in Qt 6.0, but it remains the only printf-style function in Qt that can allocate the target string, so it's vital for logging, e.g., and the recommended replacement code (http://linux.die.net/man/3/vsnprintf) is a nightmare. So this patch adds static (v)asprintf() methods to replace it. Further patches will fix up all in-tree callers and finally deprecate the old (v)sprintf(). Test coverage is provided through the existing tests of sprintf(), which is implemented in terms of asprintf(). Arguably, the in-tree callers show that QByteArray would benefit from having an asprintf(), too, as most of the in-tree code works around its lack with calls to to{Latin1,Local8Bit}() after using the QString version. [ChangeLog][QtCore][QString] Added asprintf(), vasprintf(). Change-Id: I8510f8d67c22230653ec0f1c252c01bc95f3c386 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-11624-4204/+4141
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-1021-97/+155
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Don't crash with invalid QModelIndex or when QTreeWidgetItem is NULL in ↵Maks Naumov2015-02-061-1/+11
| | | | | | | | | | | | | | mimeData() Change-Id: I0a9abaa05cf136eadf222d3e7d102930719b84ff Reviewed-by: David Faure <david.faure@kdab.com>
| * Improve handling of screens in QWidgets.Friedemann Kleint2015-02-064-22/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the screen number of a QWidget was stored in QTLWExtra::screenIndex which came in via the Q_WS_QWS platform. The variable contained the screen number of the QDesktopScreenWidget and the desired screen number for widget creation (from parent widget or desktop parent widgets) and was not updated according to widget geometry or when the associated QWindow moved to another screen. Storing the screen number is problematic in Qt 5 since it may change when the list of QScreens in QGuiApplication is rearranged. This change renames it to initialScreen and changes its usage to only contain a screen number when a screen is requested by parenting on a desktop widget or reparenting. A value of -1 indicates no screen is requested and the number should be deduced from the geometry. For the usage in QDesktopScreenWidget, add a method to determine the number via index in the list of QDesktopWidget. Task-number: QTBUG-44070 Task-number: QTBUG-44213 Change-Id: I153d19073ad4b0fd14ef3d24caa6d3e76f350e82 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Do not close popup widgets when showing a widget embedded into QGraphicsView.Friedemann Kleint2015-02-051-4/+9
| | | | | | | | | | | | | | | | | | Disable top-level widget code path for embedded widget in the show helper. Task-number: QTBUG-43780 Change-Id: I574e07130e5e68a019a426cee3fde982f3883720 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Streamline code in QDesktopWidget.Friedemann Kleint2015-02-042-22/+15
| | | | | | | | | | | | | | Task-number: QTBUG-44070 Task-number: QTBUG-44213 Change-Id: Icbf0547eb521b9f3fcc725066ee4903226ecc630 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * QWindowsXPStylePrivate::buffer(): Improve warnings.Friedemann Kleint2015-02-041-2/+2
| | | | | | | | | | | | Task-number: QTBUG-44282 Change-Id: If617db5c6eae410042394f20855892a2c564e808 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Handle failure of Windows XP theme painting functions for PE_FrameWindow.Friedemann Kleint2015-02-042-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | QWindowsXPStylePrivate::buffer() can fail due to CreateDIBSection() failing for large sizes. Introduce a bool return for the QWindowsXPStylePrivate::drawBackground() helpers and fall back to QWindowsStyle:::drawPrimitive() should that happen for PE_FrameWindow in QWindowsXPStyle::drawPrimitive(). Task-number: QTBUG-44282 Change-Id: I122d84576455bbad8e6639022da5bf64f79aed3a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Set dpr of QImage in QOpenGLWidget grabFramebufferDyami Caliri2015-02-031-0/+1
| | | | | | | | | | | | | | | | The QImage returned from grabFramebuffer should have the dpr of the source. Change-Id: Iafeabc1ab4e032fc28b73307104917ba3e898ad5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * QHeaderView: check that length is correct and fix restoring Qt4 state.Arnaud Bienner2015-02-031-23/+54
| | | | | | | | | | | | | | | | | | When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section. Length is supposed to be equal to the section items length, but the state saved might be corrupted. Task-number: QTBUG-40462 Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * Suppress Ctrl/Ctrl+Shift keypresses in line/text edits.Friedemann Kleint2015-02-032-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Ctrl/Ctrl+Shift should not cause any characters to be input (as opposed to AltGr(Alt+Ctrl) as used on German keyboards). Extend the tests in QLineEdit and QPlainTextEdit to check the modifiers, remove test from QTextEdit since it is handled by QWidgetTextControl. Task-number: QTBUG-35734 Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
| * QWindowContainer: Restrict check for negative position to child windows.Friedemann Kleint2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Otherwise, the code triggers for top level windows in setups with multimonitors where the primary screen is on the right and the left monitor has negative coordinates. Task-number: QTBUG-43879 Task-number: QTBUG-38475 Change-Id: Ied3ee6dc59bd784e11db22031d2090cc6f42ef8b Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Fix QGraphicsWidget window frame section logicDyami Caliri2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | CppCat detected duplicate sub-expressions in the code that checked for BottomLeftSection and BottomRightSection. It was fairly obvious to see what the values should be. Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-293-12/+11
| |\ | | | | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| | * Fix possible divide by zero in QMacStyleLiang Qi2015-01-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Widgets][QMacStyle] Fixed a possible divide by zero crash. Task-number: QTBUG-43398 Change-Id: I8b5c6fd87d07eb42ad43e8c2405b7cad19372b86 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| | * Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-164-14/+29
| | |\ | | | | | | | | | | | | Change-Id: I78d848c0bb396584a205a8066d253f2bcac8da56
| | * | Bump copyright year to 2015Kai Koehne2015-01-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump copyright year in tool output and user visible strings to 2015. Change-Id: I9b29907fe3f555e78005cb296a49d92f601fb7ec Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| | * | Swallow wheel events while a popup widget is open.Friedemann Kleint2015-01-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wheel events should not cause a popup widget parented on a scrollable widget to be closed or moved to correctly reflect the system behavior on OS X and Windows. Task-number: QTBUG-42731 Task-number: QTBUG-40656 Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * | | Enter/Return should cause an edit inside an itemview on OS XAndy Shaw2015-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was available before but was protected with the wrong define for OS X, so this is changed to the right define. Task-number: QTBUG-23696 QTBUG-23703 Change-Id: I669a6cf2ff7c01020693adff9f04a4b8b9404d02 Reviewed-by: David Faure <david.faure@kdab.com>
| * | | QSystemTrayIcon: handle submenus correctlyDmitry Shachnev2015-01-222-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug when submenus are shown as simple actions when a platform system tray icon is used. To correctly handle submenus, we need to set platform menus on all submenus, and only then on a parent menu. Change-Id: If2bfcc703b938dbb14ba4b9aa810039ced07e946 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Dimitrios Glentadakis <dglent@free.fr> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | | Doc: remove wrong note in QTreeWidget::itemWidget.David Faure2015-01-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The note is already in setItemWidget where it makes sense. This looks like a copy/paste error; this method doesn't change anything in terms of ownership, it's a getter. Change-Id: Idc963787b81f53fb37bbe59e9bf35f47d3441b34 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
| * | | Accessibility: Fix selection change notifications on LinuxFrederik Gladhorn2015-01-213-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The selection update is not implemented on other platforms (if needed at all). Task-number: QTBUG-39440 Change-Id: I8eb8c4eb1c23ba2d246bc95f1c77dc9da9e22495 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | | QtWidgets: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-0835-43/+72
| | | | | | | | | | | | | | | | | | | | Change-Id: Id5280c1d9feab95e1506569f3d0eb23eeb74935f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QOpenGLWidget/Window: improve docs for the dtorGiuseppe D'Angelo2015-02-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a typo and add the standard sentence about a dtor. Change-Id: Ie21ad6d2e83977705ea43fdc872d08f496a32376 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | Handle gracefully the removal and re-attachment of all QScreensShawn Rutledge2015-02-072-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash; restore windows when all screens are removed and re-added. xcb: on configure notify, check for screen change: it may be that a window belonging to a screen which was removed has now gotten mapped to the new screen. On screen change, send a synthetic expose event, because the real expose events already happened. Task-number: QTBUG-38326 Task-number: QTBUG-32973 Task-number: QTBUG-42985 Change-Id: If334f55c248468ad3c95e7066bb14eca377d2050 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | | QComboBox: use QModelIndex::sibling() instead of index()+parent()Marc Mutz2015-02-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAIM::sibling() may be more efficient, esp. in cases where only the column number needs to be adjusted. It is a no-op if the column number is already correct. Change-Id: Iabb8d5ef58d083da971a9d2f3702908257e5cc0a Reviewed-by: David Faure <david.faure@kdab.com>
* | | | Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-043-4/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | QDialog: don't tell native dialog to hide if never shownRichard Moe Gustavsen2015-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the platform returns false when asked to show a native dialog, it means that it could not show it. Calling hide on it later is therefore wrong, and can cause unwanted side effects. Change-Id: Icf5bdb5d98f40af6ef70fdbeaff824a535a404b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | QCalendarWidget: simplify formatNumber()Marc Mutz2015-02-041-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code just does the sprintf-equivalent of %0<n>d where <n>=fieldWidth. Be explicit and use QString::rightJustified(). Change-Id: I7d72b5d62e5de581ba4207eba0d358a18f0b1972 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-036-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>