summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QListView: avoid quadratic complexity in selectedIndexes().Anton Kudryavtsev2016-02-241-7/+5
| | | | | | | | | | | | Use std::remove_if(), which is linear, instead of looping over erase(it), which turns the loop quadratic. Reorder condition: call cheap non-virtual QModelIndex::column() first, then virtuals parent(), and isIndexHidden(). Change-Id: Id46ee1297b91906332eeca98f69372ef887ac330 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* QFileDialogOptions: Expose default name filter setting.Friedemann Kleint2016-02-222-5/+2
| | | | | | | | | | | | | | | Move the bool QFileDialogPrivate::defaultFileTypes to QFileDialogOptions as defaultNameFilters and add a static function returning the translated default filter string. Let QFileDialogOptions::nameFilters() return the default filter until a value has been set. This removes the need for special handling for empty filter lists in the QPA plugins. As a side effect, Qt Quick Controls's FileDialog will then also default to "All files" if no filters have been set. Task-number: QTBUG-50644 Change-Id: I9ba271a472d4fa03767b540ef6f1399f5ca4408e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* QListWidget: setup connections when changing selection model.Samuel Gaist2016-02-212-4/+27
| | | | | | | | | | | QListWidget uses a set of slots for its selection model that are connected only at creation time. This patch adds the missing connections cleanup and setup when a user changes the selection model. Task-number: QTBUG-50891 Change-Id: I942bae6c471ea1ae22637d09b96d6fbd422f653f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileSystemModelPrivate: remove unused codeAnton Kudryavtsev2016-02-201-10/+0
| | | | | | Change-Id: I83df0d0bbac66957dc06e2805acf2c47d172fed8 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-186-25/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Fix build when QMacStyle is disabled.Jake Petroules2016-02-181-1/+1
| | | | | | | | | | | | Change-Id: Ica66ab2b48266590b14d16a323b572f63168a580 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * QListView: fix skipping indexes in selectedIndexes().Anton Kudryavtsev2016-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | Remove spurious increment of i. Task-number: QTBUG-51086 Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-02-151-0/+1
| |\ | | | | | | | | | Change-Id: Ic011149c50dcbff3468d8fbdd3069a51ecd8f21c
| | * Add missing emission of activated(QString)Andy Shaw2016-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This signal got missed when 3fb0d851a was submitted so this compliments that fix. Change-Id: I91d20b709fce2c78d41166779954a3bb618feb37 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-02-153-23/+31
| |\ \ | | | | | | | | | | | | Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
| | * | Revert "QWidgetWindow: call base class close event impl".Friedemann Kleint2016-02-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch causes the window creation on reshowing nested QWidget with native windows to create child windows with 0-parent handles, which can have adverse effects on the various platforms. The patch might be re-applied on top of 73c86fcb400cb91868b56ac05a3b82a3f7ba1a1b. This reverts commit 470c8b68df539ca7356cd6b8596f8323ba3ed779. Task-number: QTBUG-43344 Task-number: QTBUG-50854 Change-Id: I2ad837c3800fc71cccf04d455d1b9c3600b233e7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | Merge 5.6 into 5.6.0Oswald Buddenhagen2016-02-0216-113/+87
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I95962e28b6fc101cbbad41230585e2b61f1f6c0f
| | * | | Fix widget texture list locking to avoid animation issues on eglfsLaszlo Agocs2016-01-282-22/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetBackingStore::sync() has two variants. The widget texture list logic was only present in one of them. This led to problems on eglfs in cases when the other variant got invoked. (for instance using the scroll area in the qopenglwidget example) eglfs relies on the texture lists's lock status to properly serialize its somewhat asynchronous built-in compositing mechanism and therefore is the only platform affected. The patch moves the code to be invoked from both sync() variants. Task-number: QTBUG-50668 Change-Id: I4c62987b7bb3cc40f98a4e94447368d2f740dbfd Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | | | QDirModel: replace an inefficient QList with QVectorMarc Mutz2016-02-171-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SavedPersistent is larger than a void*, so holding it in QLists 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 it movable and holding it in a QVector instead. Take advantage of rvalue-enabled QVector::push_back(); optimize element construction by using aggregate initialization. Change-Id: I4fd88879aa13e6536d59d164b3c33fbc2fead77f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | | Merge "Merge dev into 5.7" into refs/staging/5.7Oswald Buddenhagen2016-02-1726-171/+58
|\ \ \ \ \
| * | | | | Use QVector instead of QList for sizeof(T) > sizeof(void*)Sérgio Martins2016-02-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caught with static analyzer which only warns for trivial cases: - Container must be local - Container isn't passed to any function, assigned to another container or assigned to. Change-Id: I3f3aa73c128a56f067fa8745990977445a495ac4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | | | QtWidgets: use new QRect::transposed()Marc Mutz2016-02-139-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idfed0ae6b80e301fd32206b2e6d68054460b76de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | | | Use QFlags::setFlag where prudent in qtbaseAndre Somers2016-02-1217-155/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFlags::setFlag is most useful to replace explicit constructs like if (condition) { someFlags |= TheConditionFlag; } else { someFlags &= ~TheConditionFlag; } with someFlags.setFlag(TheConditionFlag, condition); Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | | | QDialogButtonBox: replace a QList copy + pop_front() with mid(1)Marc Mutz2016-02-171-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code and is also more efficient, because it copies less data. Change-Id: I9ad0c372fb4fa6f5818d9d6cb7b7cf35935f8565 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | | | Add attribute Qt::AA_DontUseNativeDialogs.Friedemann Kleint2016-02-173-9/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute can be set to suppress native dialogs for example for testing purposes. Task-number: QTBUG-51074 Change-Id: I35611e07e00b7a060f22b49d6ab6f3b8627f8aca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | | | Suppress memory allocation due to temporary containerSérgio Martins2016-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I337c3f7ed63444ac0950a30298eb619f462b7a16 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-02-1112-63/+73
|\ \ \ \ \
| * | | | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-1112-63/+73
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| | * | | | QWindowsVistaStyle: Suppress animation when QLineEdit's base color is set.Friedemann Kleint2016-02-101-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce utility function to check using QWindowsXPStylePrivate::isLineEditBaseColorSet(). Task-number: QTBUG-40634 Change-Id: Iaa6962a17217352aa59d0c54421b764ad47d3bf8 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | | | QWindowsXPStyle: Introduce utility function for QLineEdit's palette.Friedemann Kleint2016-02-103-39/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce QWindowsXPStylePrivate::isLineEditBaseColorSet() checking whether the base color has been set in the widget's palette taking into account the QSpinBox special case and simplify the code accordingly. Task-number: QTBUG-40634 Change-Id: I0e7527031b333d71727fbd30db6dd80aa715c9ab Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | | | QWindow::setMask(): Apply High DPI scaling.Friedemann Kleint2016-02-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move code from QWidget::setMask() and reimplement QWidget::setMask() using QWindow::setMask(). Task-number: QTBUG-50938 Change-Id: I040688d6b18df91368fa6ab6392a3b4cd80f2683 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| | * | | | Reduce allocations by using reserve()Sérgio Martins2016-02-073-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If34fa53402985f6b3c5e7217bce4a1177af835b6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | | QtWidgets: Fix build & warnings with QT_NO_GRAPHICSVIEW.Friedemann Kleint2016-02-052-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel\qapplication.cpp(3157,18) : warning: unused variable 'isGraphicsWidget' [-Wunused-variable] bool isGraphicsWidget = false; ^ kernel\qwidget.cpp(6446,18) : warning: unused variable 'window' [-Wunused-variable] if (QWidget *window = w->window()) { ^ kernel\qwidget.cpp(7949,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) ~~~~~ ^ kernel\qwidget.cpp(8084,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) Change-Id: I8474ab0ab4617c6588707ce0c2f7a97e4d0e54da Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | | Doc: corrected minor link issuesNico Vertriest2016-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I98eafe0c7ed55f309640e8495c83ffcef355aa08 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| | * | | | Fix crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8aAndy Shaw2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8a. The drag only needs to be ended on the hide if it is actually in the middle of dragging. This enables the case of dragging the dock widget out with the mouse to continue to work. Task-number: QTBUG-50890 Change-Id: I72309dd40ee670319f2ff607ae201c46f8de4652 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | | | End the drag if the dockwidget is being hiddenAndy Shaw2016-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the window flags are changed for the widget then it is possible to minimize the dockwidget via the titlebar. This will cause it to be ready to start a drag internally but since the dockwidget never gets a mouse release event it doesn't end it. Therefore it ends up being in an invalid state later on when restored, so the endDrag() needs to happen in the hide event to ensure this is not an issue later on. Change-Id: Ia84bee96b9eed49896869e6a15d4de6d01964264 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | | | QWizard/Windows: Add missing override.Friedemann Kleint2016-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-50804 Change-Id: Ia1c73b40d96ddea01e440e0e3e010ff3fcb88793 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * | | | Disintermediate QDateTimeParser::SectionNode operations.Edward Welbourne2016-02-021-3/+3
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name, format and maxChange of a Section depend only on the section, not on the details of the currently parsed text it matches; so we don't need the parser object's list of all sections to work them out. Move these methods to the SectionNode and act directly on that instead of going via the section list. Make the name take a Section enum instead of an int. Likewise, make stateName take a State enum instead of an int. Change-Id: Ie340d042ab95aec517013c4dcc30901d40305c78 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | / | | Add SH_ItemView_ScrollMode style hint and use it in QMacStyleGabriel de Dietrich2016-02-117-5/+49
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X, the default scrolling mode of item views should be per pixel instead of per item. We enforce this through a new style hint. On all other platforms, the behavior remains the same. It's still possible to override the style hint by using the regular scroll mode setters. Any subsequent style change will result in a no-op once the setters have been called and until the properties are reset. Some auto-tests had to be update to to take the new behavior into account. [ChangeLog][QtWidgets][Styles] Added SH_ItemView_ScrollMode style hint. [ChangeLog][QtWidgets][Item Views] Item views scroll per pixel on OS X now. [ChangeLog][QtWidgets][Item Views] QAbstractItemView::verticalScrollMode and QAbstractItemView::horizontalScrollMode are now resettable. Change-Id: I3f923275c99aa4389323b52fc1c5455fe71f8d73 Task-number: QTBUG-50102 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | | dbusmenu: Use proper toggle-type for items that are part of groupDmitry Shachnev2016-02-093-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve that, add a new virtual setHasExclusiveGroup() method to QPlatformMenuItem class (optional because we don't want to break existing platform themes), call it when converting QActions into platform menu items, and use it when exporting the menu items over D-Bus. Also, send ActionChanged event for actions when their group is changed, so that the platform menus are updated too. Change-Id: I8d951ace8c4097decec2a0154163e3672214effb Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | | Replace some QList<int> with QVector<int>Marc Mutz2016-02-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 64-bit platforms, QVector<int> uses only 50% of QList<int> per-element memory. Change-Id: I3057781e7fb58007ea2619cc91965a626d01473b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | QGraphicsItemAnimationPrivate::linearValueForStep(): pass vector by const-&Marc Mutz2016-02-081-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's only read from. Avoids detach attempts in the many uses of front()/back(). Change-Id: I0fd5df77a6d3a9a37872e0ce28f5a2354aa8f957 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | QToolBarAreaLayout: replace inefficient QLists with QVectorMarc Mutz2016-02-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QToolBarAreaLayout{Item,Line} are larger than a void*, so holding them in QLists 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 the types primitive and movable, resp., and holding them in QVector instead. Change-Id: I4e68d4bee41040bf84302b8ce8295a11debded70 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | Drop most "#ifndef QT_NO_LIBRARY"Ulf Hermann2016-02-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we can load plugins without QLibrary now, we don't have to #ifdef out the code that does so anymore. Change-Id: I1dc20216830a882dbd5a1b431183407e6b19c837 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QTabBar: remove dead codeGiuseppe D'Angelo2016-02-051-3/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Iaad0ef8fe66e925f9dcbc94693d078612a92969f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QFusionStyle: Fix subtle groove paintingLouai Al-Khanji2016-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating an unrelated rendering bug I noticed that the call to drawRect here is essentially dead code. However, the original intent seems to have been to draw a very subtle shadow within the scrollbar groove, so let's re-enable it. Subjectively, it does add a nice touch, especially with higher dpi screens. Change-Id: Iebffe69ecf9c26be617f7e85bd95f85ed7b0fafe Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
* | | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-0216-113/+87
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * | | QDockWidget: Restore using setGeometry since the geometry is used for the stateAndy Shaw2016-02-021-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves an instance where restoreState() was used when the dockwidget was already floating and the saved state was also for a floating dockwidget. Change-Id: I1fe764ae2a6b0351ae26e33ffec682ad37c944d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | Revert "QWindow::destroy(): only reset QGuiApp::focus_window and friends as ↵Tor Arne Vestbø2016-02-021-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a last resort" This reverts commit 4c71db756741d35ccb32dc4c32aa1823264c85df. It's too risky for 5.6, we should let it cook in dev for a while and backport when ready. Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | | Fix flickering status tips in submenus.Michal Policht2016-01-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed setCurrentAction() function so that it reselects parent menu action only if mouse is over a menu and parent menu is not already selected. Task-number: QTBUG-47987 Change-Id: Id077d6ce1de1335ba2709180c8480af5d1720de0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Michal Policht <michpolicht@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | | Fix GCC 6 valid warnings about misleading indendationsThiago Macieira2016-01-305-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's currently producing a lot of false positives, but a few are actually valid. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69029, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69122 and some others. Change-Id: I24a735698d3c4a719fc9ffff1425f29d7b5a3458 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last ↵Tor Arne Vestbø2016-01-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resort Resetting focus_window and other internal QGuiApplication variables before calling setVisible(false) and destroying the platform window means that the platform window can't reason about whether or not it was the focus window unless it can resolve that using native APIs. We should let the platform window take care of resetting the focus window and related states, and only execute our fallback logic if the plugin doesn't do the right thing. We also use QPA to update the state instead of modifying the internal QGuiApplication variables directly, so that events and signals are emitted as a result of the reset. The QLineEdit test gets two added calls to processEvents(), since assuming that activateWindow() is synchronous is not correct, and would result in the QMenu resetting the focus window to 0 on destroy. Task-number: QTBUG-46414 Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | | Doc: Properly document old platform-specific functionsSze Howe Koh2016-01-292-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt_mac_set_dock_menu() needs a \relates command to show up properly. "\since 5.2" produces "This function was introduced in Qt 5.2", which is wrong; the function existed in Qt 4. qt_set_sequence_auto_mnemonic() is referenced by the QShortcut class ref, but the page that hosted it in qtdoc.git is being removed. Thus, its description is now transferred here. Change-Id: If009a45f1d04541787925cf230ed7b59c7db0b39 Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * | | Bump copyright year to 2016Kai Koehne2016-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump copyright year in tool output and user visible strings to 2016. Task-number: QTBUG-50578 Change-Id: I2f4aa9089c6672726f554cba7e6009b425d27683 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| * | | Doc: Remove Qt3 compatibility functions from QToolButtonCédric Bonnier2016-01-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QToolButton's detailed description mentioned setToggleButton and setPopupDelay which have been removed in Qt5. Removed typo dependant > dependent Task-number: QTBUG-50761 Change-Id: I9a2ff79a512127982c7961dee79fe2751f12cf43 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>