summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qgtkstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove gtk2 style from qtbase, it will be moved to qtstylepluginsDmitry Shachnev2015-08-261-4255/+0
| | | | | | | | | | | | | | | | | | | | This will allow us to drop gtk2 support from qtbase in future, while still providing the gtk2 style for those who want to use it. Also with moving to qtstyleplugins, the code can be simplified because we can directly link to libraries we need, instead of using QLibrary. [ChangeLog][QtWidgets] Remove QGtkStyle, it is now provided in qtstyleplugins repository. Change-Id: I6221b1a513d7fda32e080f3ca159b0b2f8a8f246 Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
* QtWidgets: Fix const correctness in old style castsThiago Macieira2015-03-171-2/+2
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94684f8498f21 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QGtkStyle: identify QtQuick.Controls.GroupBox as QAccessible::GroupingJ-P Nurmi2015-03-111-0/+7
| | | | | | | | | This allows QGtkStyle to check the role and do appropriate styling (bold font) for the label. Task-number: QTBUG-43736 Change-Id: I735f5f7ffadd7a435fa9e28fab45b202eec0252e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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>
* QtWidgets: convert some users of QSize::transpose() to transposed()Marc Mutz2015-01-081-3/+1
| | | | | | | | ...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>
* fix the build with animation omittedShawn Rutledge2014-11-271-0/+4
| | | | | | | configure -no-feature-STATEMACHINE -no-feature-ANIMATION Change-Id: Idb89c0bae8d699e76916317f83490c6c94c7d8b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix instances of !var & const that should be !(var & const)Marc Mutz2014-11-251-1/+1
| | | | | | | | | GCC recently started warning about these. Change-Id: I7b30c79f7f2b66b99e54354224700d54ace6ebec Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-011-0/+1
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | * GTK syle: initialize all members of GdkColorGiuseppe D'Angelo2014-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Coverity rightfully complains that we're copying a struct with an uninitialized member, triggering undefined behavior. Change-Id: I7635b859eb11e5eb9b825df8e23b453116059892 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Additional support for devicePixelRatio in CE_MenuItem’s icon paintingMihailNaydenov2014-09-301-2/+2
|/ / | | | | | | | | | | | | | | | | FusionStyle and MacStyle have this already, the change just brings it to the others. Task-number: QTBUG-40277 Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Allow overriding standardIcon() in a proxy styleAlexander Volkov2014-09-161-1/+1
|/ | | | | | | [ChangeLog][QtWidgets][Styles] Allow overriding standardIcon() in a proxy style Change-Id: I3c7983a7e51a8b220a0ca8ead2b4d7b87a77d71b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QGtkStyle: remove file dialog functionalityJ-P Nurmi2014-03-141-17/+2
| | | | | | | | | GTK+ 2.x file dialogs are now implemented in QGtk2PlatformTheme Change-Id: I2babd6a35e7abd606ec5d047abbefbe3f0fbb892 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* fix crash when using GTK 2.14 function in old gtkAndrey Volkov2014-02-121-1/+3
| | | | | | | | | | | | | | | | | | This is additional fix for bug 23569. Previous fix (SHA1 7fcf1cf674d09d9dd1d41e2913252017f1d599ca) is not enough. QGtkStyle was still crashing with old gtk (< 2.14) in drawComplexControl () function. Bug was reproducible on CentOS 5.x and Red Hat 5.x. Current patch makes the same check as in commit mentioned but in another line of code. Task-number: QTBUG-23569 Change-Id: I261b61bc93ccaada879ed02ad4d0bef62935335b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Harri Porten <porten@froglogic.com>
* Fusion & GTK styles need to check direction from style option not qappShawn Rutledge2013-04-181-2/+2
| | | | | | | | | | An RTL menu containing a menu item which opens a submenu was showing the wrong arrow if the application's direction was not also RTL. So now the test for QTBUG-30595 can be simplified: no need to set the application direction, and therefore less chance of failure. Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: Remove widget dependency from GroupBoxJens Bache-Wiig2013-04-161-18/+20
| | | | | | | | | | This patch makes it possible to draw a checkable groupbox without passing a widget pointer. Task-number: QTBUG-29867 Change-Id: I9b74bcffa0401c88f9dcbcd9816081b7f03a5173 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-191-1/+1
| | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-14/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * Revert "QGtkStyle: GTK3 compatible combo boxes"J-P Nurmi2013-02-201-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 15fc255c7c0a6a693c754734c39c37bd50b0634b. The change was not compatible with the oxygen-gtk theme engine. Furthermore, GTK3 compatibility in QGtkStyle is not important, since it won't be feasible to support both GTK2 and GTK3 in the same style implementation. Conflicts: src/widgets/styles/qgtkstyle_p.cpp src/widgets/styles/qgtkstyle_p.h Task-number: QTCREATORBUG-8524 Change-Id: I8ea6dcfd1f432d51b306a5d9f6c4106137979c5a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Fix some warnings that have crept up since I last fixed warningsThiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | qgtkstyle.cpp:3177:103: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses] qcups.cpp:517:66: error: ‘QString::QString(const char*)’ is deprecated itemviews.cpp:795:13: error: unused parameter ‘actionName’ [-Werror=unused-parameter] qeglconvenience.cpp:268:9: error: ‘cfg’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I9b8a175ff1c2ddc443363e08b92e09cf7c2f91cf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Gtk Style: Workaround to get combo box item style from QtQuick ControlsGabriel de Dietrich2013-02-201-1/+2
| | | | | | | | | | Change-Id: I0f39269d08d58e0ee1f5b09b90e11ab1030a3932 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Fix sizeHint for QAbstractSpinBoxCaroline Chao2013-02-121-1/+1
|/ | | | | | | | | | | | | | | | | | | The current size hint is not correct and the text is truncated when using prefix/suffix. Update QCommonStyle::sizeFromContents() to get the button and frame widths into account for the QSpinBox width. Update sizeFromContents() in the different styles to be consistent with the change in QCommonStyle. Update minimumSizeHint(), calculate it using the prefix and data range. The SpinBox can shrunk over the suffix if any. Task-number: QTBUG-28863 Change-Id: Ia742232edf8b11d0283e8136c2818928f8755103 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Docs: fix the minimum required GTK+ versionJ-P Nurmi2013-01-141-1/+1
| | | | | | | | The minimum GTK+ version was bumped from from 2.10 to 2.18 (sep 2009) in commit 2cce297b58ae50486094a6dcc148484a4a4bace5. Change-Id: I77a48c8a3b0955b00e399f714949d08293abbebd Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Check for gtk_adjustment_configure as this is not always implementedAndy Shaw2012-12-191-1/+3
| | | | | | | | | | | | | Some implementations seem to not have the gtk_adjustment_configure function implemented so we check for this so that there is no problem when it tries to use it. Task-number: QTBUG-23569 QTBUG-25760 Change-Id: I777ce09268f86907f3da3cede408c9a41be566cf Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Karim Pinter <karim.pinter@digia.com>
* Fix compile with -DQT_NO_WIZARDMontel Laurent2012-12-011-0/+2
| | | | | Change-Id: I6f7be895b8c4a1a65de43ee35d1fab25a30a25c6 Reviewed-by: David Faure <david.faure@kdab.com>
* Made QGtkStyle internalJ-P Nurmi2012-11-201-2/+3
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example some styles could be even separated out of QtWidgets and be provided as plugins instead. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QGtkStyle directly. Change-Id: Iea1f7ebc80949d29f02733f81674355578e2e4fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Refactor and cleanup QGtk(2)PainterJ-P Nurmi2012-11-101-194/+237
| | | | | | | | | | Move all the GTK2 specific function resolving and painting routines to QGtk2Painter. A GTK3 specific and Cairo based QGtk3Painter will be introduced later, and it will be QGtkStyle's job to choose between the two. Change-Id: I2c8a85de0cf8187468798cf5faff0006da4b9623 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: remove references to gtk_progress_configure()J-P Nurmi2012-11-071-2/+0
| | | | | | | gtk_progress_configure() is deprecated and no longer exists in GTK3. Change-Id: I02d58456285326b8aee6050da1a155cacbb86eee Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: GTK3 compatible combo boxesJ-P Nurmi2012-11-061-16/+14
| | | | | | | | | | | | Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not available. The latter was deprecated since 2.24 and is no longer available in GTK3. Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas the old gtk_combo_box_entry_new returned a GtkComboBoxEntry. Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: handle focus & default widgets in GTK3 compatible wayJ-P Nurmi2012-11-061-20/+21
| | | | | Change-Id: Ib4409c15599953a6626738543b27d14d711e7109 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-2/+1
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove dependency on QWindowsStyle in QGtkStyleJens Bache-Wiig2012-10-181-80/+101
| | | | | | | | | Now that we no longer re-use the animation code in gtk, it is time to remove this strange dependency. Change-Id: Ib672a9b110dfba08d79b8654e572994007675957 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Styles: revise indeterminate progress bar animationsJ-P Nurmi2012-10-171-4/+4
| | | | | | | | | Remove dependencies to QProgressBar where possible. This makes it possible to animate for example QQuickItem based progress bars (read: the desktop components). Change-Id: If208506702365895576238c24191b8d70b90841c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Introduce (private) QStyleAnimationJ-P Nurmi2012-10-161-3/+6
| | | | | | | | | | | | | | | | QStyleAnimation handles style animations in a generic fashion by sending StyleAnimationUpdate events back to the animation target instead of calling QWidget::update() directly. This decouples style animations from widgets and makes it possible to run style animations for QQuickItems (ie. the desktop components). The next step is to add "QObject* QStyleOption::target" and use that everywhere instead of the widget pointer passed to various QStyle methods. Change-Id: Ib963c54872805fc3f0123ff922f82c9962a68b90 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: fix a warningMarc Mutz2012-10-131-1/+0
| | | | | | | | | | | | | | | Commit c0893962ef94f12594f936ef2a50db6d0328eca0 added two definitions of a variable named gtkToggleButtonStyle in nested scopes. Because of name lookup rules, the second one wasn't initialised with the first one, but with itself. This leaves the second gtkToggleButtonStyle uninit'ed. Simply remove the surplus declaration, leaving the name to the original declaration. Change-Id: I2269e1093f54643ff4dce27b39cc033db6697782 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QGtkStyle: use gtk_widget_get_style()J-P Nurmi2012-10-101-93/+108
| | | | | | | | Do not access GtkWidget::style directly, it doesn't exist in GTK3. Change-Id: I947776848f5dd64011a40446fcdb9079f295f182 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: use gtk_widget_get_parent() and gtk_widget_is_toplevel()J-P Nurmi2012-10-101-1/+1
| | | | | | | | | GtkWidget::parent does not exist in GTK3, and GTK_WIDGET_TOPLEVEL has been deprecated since GTK 2.20 - > use gtk_widget_is_toplevel() (available since GTK 2.18) instead. Change-Id: I0f082b2d69a795cadb321802f25c9993029f6865 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGtkStyle: use gtk_widget_get/set_allocation()J-P Nurmi2012-10-101-17/+29
| | | | | | | Do not access GtkWidget::allocation directly, it doesn't exist in GTK3. Change-Id: I8ce69fab19ce8f3afe35d0d30d4e28b0348fdaf1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove Cleanlooks as a dependency of QGtkStyleJens Bache-Wiig2012-10-021-90/+689
| | | | | | | | | | | | | Since we no longer do the sanity checking against gtk-qt-theme at startup, there is no longer any need to inherit from cleanlooks. Cleanlooks should no longer be needed as it has been completely replaced by Gtk style and this dependency is not required at this point. Change-Id: I05b59278cd3ff915df49a7ad2d04494258db0d42 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-271-1/+1
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Replace QStyleOptionViewItemV? with QStyleOptionViewItemStephen Kelly2012-09-211-2/+2
| | | | | | | | | | The former are a typedef for the latter in Qt 5. This only touches internal implementation, as the API was migrated long ago. Change-Id: Ided73021ebecc00508e6325c3d988b6c6ad336cd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-9/+9
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QXxxStyle: override standardIcon() & layoutSpacing()J-P Nurmi2012-08-311-6/+6
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Make QGtkStyle build with QT_NO_FILEDIALOGSukhyun Kim2012-06-261-0/+6
| | | | | | | | Fix compilation failure with qconfig large Change-Id: I8ae14f01879b94430dcbb5c85c61d14e922f6eb9 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Using QLatin1String instead of QLatin1LiteralDebao Zhang2012-04-251-1/+1
| | | | | | | | QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>