summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | 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>
* | | | QLayoutStruct: reduce struct size 36 -> 32 bytesMaks Naumov2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I2cc9f8456317f57531280912966c24073f0c6f34 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QUrlModel::addUrls(): compare file urls according to OS case sensitiveMaks Naumov2015-02-031-2/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I89073bbd5f2cc7dbbb7a4818e0e4228299d45917 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-0364-273/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QCalendarWidget: avoid three dynamic allocationsMarc Mutz2015-02-021-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The three validators in QCalendarDateValidator were heap-allocated, but the pointers were never reseated. Allocate by-value instead. Text size savings are minimal. Change-Id: I99401e29cfc8371656a17fba4affd5c6ffd6ad53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | QCalendarWidget: Extract Method formatNumber()Marc Mutz2015-02-021-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves more than 1K text size in optimized builds. Change-Id: I5b9ac4394f681485ef261d1c1bb7a35c4675936e Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | Micro-optimize QCalendarDateSectionValidator::highlightString()Marc Mutz2015-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allocate QStrings just to concatenate them. Change-Id: I340cd5c2b0d0b688a2323544c76c3cc6f5af1332 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | Make QCalendarDateSectionValidator::highlightString() staticMarc Mutz2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib52b41ef8e905d9946032448da9d3b312de7071d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | QCalendarWidget: use ctor-init-list (II)Marc Mutz2015-02-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves 32 bytes of text size. Change-Id: I24e71f25f9a5a4c70e7948953e049dfb47c0e7d1 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | | | QCalendarWidget: use ctor-init-list (I)Marc Mutz2015-02-021-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves 64 bytes of text size. Change-Id: I77c52b80b835b4e59e0683b41d5a4cee8a34d40a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | | | QLayoutEngine: replace an inefficient QList with QVarLengthArrayMarc Mutz2015-02-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QList<int> wastes 50% space on 64-bit platforms. Use a more fitting container. Since the storage is only used temporarily, try to allocate it on the stack with QVarLengthArray. Also give it better name than just 'list'. Change-Id: I3dfb1d5927ac36f4b352b5d91ce0c9401b20705e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | | Avoid unneeded QBrush::texture() callsAllan Sandfeld Jensen2015-02-022-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a QBrush has been created without QPixmap the texture() method will create one. This patch avoids that in several places by checking the type of the texture brush before accessing it, or not accessing it at all. Task-number: QTBUG-43766 Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | QFileDialog::setDirectory(): remove unused local variableMaks Naumov2015-02-021-1/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I461679f7e47d6e98b3adda0114a5a3bd07a6a4d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | Make Qt for Android compile when using errors for warningsAlex Blasche2015-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from kernel/qsystemsemaphore_android.cpp:35:0: kernel/qsystemsemaphore_p.h: In constructor 'QSystemSemaphorePrivate::QSystemSemaphorePrivate()': kernel/qsystemsemaphore_p.h:104:10: error: 'QSystemSemaphorePrivate::createdSemaphore' will be initialized after [-Werror=reorder] bool createdSemaphore; ^ kernel/qsystemsemaphore_p.h:101:11: error: 'key_t QSystemSemaphorePrivate::unix_key' [-Werror=reorder] key_t unix_key; ^ kernel/qsystemsemaphore_android.cpp:43:1: error: when initialized here [-Werror=reorder] QSystemSemaphorePrivate::QSystemSemaphorePrivate() : ^ widgets/qdockwidget.cpp:208:6: error: unused parameter 'floating' [-Werror=unused-parameter] bool QDockWidgetLayout::nativeWindowDeco(bool floating) const ^ cc1plus: all warnings being treated as errors Change-Id: I69af3ba3883b4311477f0e4e991b5cc0900fb71b Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | | Avoid warning in makeCurrentLaszlo Agocs2015-01-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is not necessary. We don't warn in doneCurrent or QOpenGLWindow either. Task-number: QTBUG-44094 Change-Id: Icb3cf51137258c939d5dfb653cf98ded3c147aac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | QTreeWidget: forbid forcing PartiallyChecked on parent tristate items.David Faure2015-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ItemIsTristate means QTreeWidget determines the check state of parent items based on the check state of child items. Checking/unchecking the parent propagates to children; but setting the parent to PartiallyChecked shouldn't do that, especially since it can lead to children without ItemIsTristate having PartiallyChecked check state. Change-Id: Ibc8b7c77d9ec4c1578c07f3c62581edb770f8439 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | | | Itemviews: add ItemIsUserTristate flagDavid Faure2015-01-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ItemIsTristate is now again purely for enabling the automatic management of the check state of QTreeWidgetItems, while ItemIsUserTristate is separate from that and lets the user select the three states manually. This restores the original behavior of ItemIsTristate for QTreeWidgetItems, which got broken by letting the user cycle through the states too. [ChangeLog][QtWidgets][QTreeWidget] Restored Qt 5.1 behavior of QTreeWidgetItems with ItemIsTristate to enable automatic management of the check state. User-editable tristate checkboxes are now enabled by setting the new flag ItemIsUserTristate. Task-number: QTBUG-40060 Change-Id: I341f5e983804d3b4f27982520bb6647f3014cccc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* | | | QPlainTextEditControl: reimplement anchorAt()J-P Nurmi2015-01-243-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See comments in QPlainTextDocumentLayout::hitTest(). Since QPlainTextEdit does not do hit testing on the document layout level, allow QPlainTextEditControl to override anchorAt() so that hit testing can be done on the widget level instead. Change-Id: I70247eafae96897382a0c7db7d596128a03e7a6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | | QOpenGLWidget/QOpenGLWindow: add a destructor which calls makeCurrentGiuseppe D'Angelo2015-01-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally speaking, QOpenGLWindow subclasses are going to use some various QOpenGL* wrapper object to handle their buffers, FBOs, etc. Some of those QOpenGL* wrappers are QObjects, hence it should be safe to have them as child objects, and expect Qt to clean them up properly; but that doesn't happen because of how the destruction will work. In particular, when the subclass object is deleted, there may not be the right OpenGL context set as current. The deletion will go up to ~QObject, where the child objects will be deleted, resulting in a crash. That will *also* happen if someone connected to the context's aboutToBeDestroyed() signal: the context will in fact be deleted after the child objects, since it's stored in QOpenGLWindowPrivate, whose dtor will be run after ~QObject (!). Now, in the general case, QOpenGLWindow subclasses should always have a dtor in which they call makeCurrent() (also because various QOpenGL* class are not QObjects, hence they're kept around as full members instead of pointers-to); but at the same time we should clean up properly the QObject children. All of the above of course stands for QOpenGLWidget as well. Task-number: QTBUG-44094 Change-Id: I2379041fe175416936f6d40292039f773a515b35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-222-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementing org.kde.StatusNotifier DBus interface http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ as well as org.canonical.dbusmenu for the limited purpose of showing the tray icon's context menu. If a desktop environment (such as KDE or Unity) has a StatusNotifierWatcher listening, then tray icon information is sent to be displayed by the tray implementation instead of being rendered directly in an XEmbed window. This is necessary because some modern tray implementations no longer provide XEmbed "hosting". [ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus protocol when the desktop environment supports it Task-number: QTBUG-31762 Done-with: Marco Martin <mart@kde.org> Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* | | | Introduce QFontDatabase::isPrivateFamily()Gabriel de Dietrich2015-01-212-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms have the concept of private fonts (e.g., OS X and iOS) which are generally used as system UI fonts. Since 909d3f5c7, the platform font database has a similar but private API. [ChangeLog][QtGui][Fonts] Added QFontDatabase::isPrivateFamily() Change-Id: Ibdce9de534fadbbc3965be8a942c8012edeed209 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2015-01-2110-27/+84
|\ \ \ \
| * | | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-2110-27/+84
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| | * | | FusionStyle: Don't try to draw null pixmapsUlf Hermann2015-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the same check for null already for PE_IndicatorHeaderArrow which actually uses the same pixmap. If the file is not found the pixmap will be null and the code dividing by its width or height will thrown an arithmetic exception. Task-number: QTBUG-43067 Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| | * | | Doc: Fix typosSze Howe Koh2015-01-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * | | Fix a crash in QPlainTextEdit::documentChangedPierre Rossi2015-01-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The layout for an invalid block is very likely to be null, it shouldn't be accessed without checking the block's validity first. We can make the check a bit more conservative and simply check that the block isn't empty. Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe Task-number: QTBUG-43562 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * | | Account for pixmap's device pixel ratio when calculating the label sizeAndy Shaw2015-01-191-5/+7
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When determining the size of the QPushButton's label then the device pixel ratio of the pixmap used to represent the icon needs to be taken into consideration so it is rendered correctly. Change-Id: If32760b120d7a749a51e2c30592d621c0e63dace Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | Fix stylesheet crash.Morten Johan Sørvig2015-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style sheets that refer to the progress bar (like "QProgressDialog[maximum='0']{}") may dereference a null-pointer during the styleHint() call in QProgressDialogPrivate::init() since the progress bar has not been created yet. Move the creation of the progress bar closer to the top of init(), before the styleHint() call. Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90 Task-number: QTBUG-43830 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
| | * | QColorDialog: Don't loose focus while color pickingSérgio Martins2015-01-092-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows mouse grabbing doesn't work across processes, which means we're interacting with other windows when picking colors. Workaround that by having a transparent 1x1 window below the cursor at all times so we catch the mouse click. Clicking before the window is below the cursor won't happen because our timer interval is 30ms, so it's quite fast. It's hacky but it's what we can do for a feature which was very broken on Windows. Task-number: QTBUG-43663 Change-Id: I295378e033ddc6d9c2230335f0953a727c21e1dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | docs: Explain the limitations of QWidget::grabMouse() on WindowsSérgio Martins2015-01-081-5/+4
| | |/ | | | | | | | | | | | | | | | Because carbon is dead, I merged both OSX and Windows in the same note. Change-Id: I5d43c5fce30e187f63a1e3e5af688c344eb80d28 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Remove redundant codeAndy Shaw2015-01-071-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The non client mouse events have the right information regarding the modifiers now so the old code covered with Q_WS_WIN can be removed. Change-Id: I3e4ebc0debdd66970b18233f189b5d9e880e40a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Windows: Fix QColorDialog's live updates while picking outside colorSérgio Martins2015-01-063-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft's SetCapture() doesn't work on windows owned by other processes, so instead we use a timer. This is the same approach as used by qttools/src/pixeltool. The mouse move approach however is more elegant and doesn't hammer the CPU with QCursor::pos() calls when idle. For this reason the workaround is Q_OS_WIN only. Task-number: QTBUG-34538 Change-Id: I40a6f7df5bf2a3a29ade8fe4a92f5b5c4ece7efb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Introduce helper for QML to allow creating QWidget hierarchiesSimon Hausmann2015-01-203-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1259c5768e410361bcd8b5cf0c2057a2ebabda83 in qtdeclarative removed the ability to create QWidgets in QML by giving them the correct parent, which requires calling QWidget::setParent instead of QObject::setParent. This patch introduces a hook that will allow QtQml to give widgets a proper parent. Change-Id: I84c57ca5032582c43e405219343d55ac9cf2ffa0 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | QHeaderView: fix restoring Qt4 state.Arnaud Bienner2015-01-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section. Task-number: QTBUG-40462 Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | QToolBox: remove redundant QAbstractButton::text() from paintEvent()Maks Naumov2015-01-191-1/+0
|/ / | | | | | | | | Change-Id: I95773096ca1b915468c086ba61eba2e3e551a7e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QColorDialog: Fix build with QT_SMALL_COLORDIALOGSérgio Martins2015-01-171-70/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nonTouchUI wasn't defined anywhere, this Q_WS_S60 codepath was partially removed during the Qt4->Qt5 port, but some cruft remained. It's not worth saving, because: - QML is now the way to go for touch UI code - It's ugly, didn't build, won't be missed and more importantly: The current layouting code is already very difficult to read, since we have "normal" mode, QT_SMALL_COLORDIALOG normal and QT_SMALL_COLORDIALOG touch. (and WINCE ifdefs in the mix) This will make the ifdef hell a bit better. Change-Id: I6daa07cbc8da94ccfe1d0c8d3e870c0678c541fc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QProgressDialog: don't require setValue(0) to be called.David Faure2015-01-171-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp forgot too, which led to a valgrind warning, the elapsed timer was never started) 2) setValue(0) makes no sense if the progress dialog goes from 50 to 60, or any other non-zero minimum value. Fixed by starting the timer in the constructor (most code doesn't reuse progress dialogs, so this fixes the most common case), and by also starting the timer when calling setValue(minimum()) for well-behaved dialogs. setValue(0) special case kept for compatibility. Task-number: QTBUG-17427 Task-number: QTBUG-25316 [ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating the duration of the progress dialog is now started in the constructor and in setValue(minimum()), as well as when calling setValue(0), as previously documented. Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QComboBox: simplify codeGiuseppe D'Angelo2015-01-161-7/+6
| | | | | | | | | | | | | | | | Remove an useless check and hoist a costly call out of a loop. Change-Id: Ibd1750026af44462a4f0223a9b2f422ebcc7c0e3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Reduce excessive painting caused by transient scrollbarsJ-P Nurmi2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The step logic in scrollByDelta() made scrollbar position to go temporarily outside its min/max boundaries, and then setValue() corrected it immediately back within its bounds. The false change notifications caused by this position vs. value ping pong caused plenty of unnecessary updates. Task-number: QTBUG-30316 Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | QComboBox: make setModel reset the root model indexGiuseppe D'Angelo2015-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When changing models it makes no sense to keep the old root model index, pointing into a possibly deleted model. Reset it to the root of the new model is the best line of action. [ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root model index when a new model is set on it. Task-number: QTBUG-43350 Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Add QWheelEvent::sourceShawn Rutledge2015-01-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Extend selections in QGraphicsView when selection extension key downAndy Maloney2015-01-134-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has some objects selected and holds down the "extend selection" key (Control on Windows, Command on Mac OS X), clicking and dragging a rubber band selection deselects the current selection. This is counter-intuitive and confusing for users. This commit fixes the behavior so users can extend selections using the rubber band when the proper key is held down. Task-number: QTBUG-6523 Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Android: Don't assume native window decoration in QDockWidgetKai Pastor2015-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Android does not decorate a floating QDockWidget, leaving the user with no option to close or move such a widget. This changes activates Qt's own drawing of window decorations for this case (similar to Win CE). [ChangeLog][Android][QtWidgets] Enable QDockWidget window decorations. Change-Id: Id46a994a8be9b8f3e7b530af118315cd36b5fb0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QWindowsVistaStyle: Draw PE_PanelItemViewItem for non-item view widgets.Friedemann Kleint2015-01-101-9/+10
| | | | | | | | | | | | Task-number: QTBUG-43157 Change-Id: I2a5f721cadc0dfffbb81902ef1d06ba34a729300 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QSizePolicy: prepare for constexpr'ifcationMarc Mutz2015-01-081-6/+2
| | | | | | | | | | | | | | ...by bringing expandingDirections() into a (C++11) constexpr'able form. Change-Id: I1922329a6f579df2b3504c8ae048224f9b229d6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: convert remaining users of QSize::transpose() to transposed()Marc Mutz2015-01-084-11/+11
| | | | | | | | | | | | | | | | | | | | | | ...because transposed() is inline (and transpose() is not). This is such a simple transformation (basically, a register rename) that it should be inlined, even a the expense of another assignment. (the expense being in the source, not the executable code, of course). Change-Id: I4e5a574e899a84444de8042d305f34f5a6045a3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: convert some users of QSize::transpose() to transposed()Marc Mutz2015-01-0810-40/+14
| | | | | | | | | | | | | | | | ...because transposed() is inline (and transpose() is not), and because it makes the code more readable and compact. Change-Id: I5661ee6251be638fb40c5c748aa50a89de6f7735 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>