summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move QFileSystemModel into QtGuiVolker Hilsheimer2020-08-251-2164/+0
| | | | | | | | | | | | | | This requires a QAbstractFileIconProvider in QtGui, as the standard QFileIconProvider depends on QStyle, and cannot be moved out of QtWidgets. QAbstractFileIconProvider returns strings for file types, but returns no icons yet. Support for a default icon set might be added in a follow-up commit. Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7 Fixes: QTBUG-66177 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QFileSystemModel: don't display a modal messagebox on errorVolker Hilsheimer2020-08-191-23/+2
| | | | | | | | | | | A model is the wrong place to display a modal dialog when a call to setData failed. The call returns false already, and the caller can handle the error appropriately, presumably knowing best what failed and how to present the user with options. Task-number: QTBUG-66177 Change-Id: I069209d51a577177bc278aeb08a92c95029dc962 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QFileSystemModel: use the QFileInfo from the model as much as possibleVolker Hilsheimer2020-08-121-9/+19
| | | | | | | | | | If the file system already stores a QFileInfo, then it will have the information cached, which avoids costly roundtrips to the file system. Task-number: QTBUG-41373 Change-Id: I830a39fe0e20ebf07abde4438a87f7572f608d66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-7/+7
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in widgetsJarek Kobus2020-07-021-7/+8
| | | | | | Task-number: QTBUG-84469 Change-Id: I3007734f8e4f164ece9dd8850ef007cbef9e12ef Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* QAbstractItemModel: remove deprecated setRoleNames()Christian Ehrlicher2020-06-071-6/+14
| | | | | | | Remove setRoleNames() and all its now unneeded helper functions. Change-Id: I0a83751aace35700655d4cc7c79278325994cbdd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove winrtOliver Wolff2020-06-061-6/+4
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-041-4/+3
| | | | | | | | | QFileSystemModel is the documented replacement. It uses threads to populate the model, which QDirModel doesn't. Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add a QRegularExpression::fromWildcard() convenience methodLars Knoll2020-05-061-4/+2
| | | | | | | | | Simplify constructing QRegularExpression objects from a glob pattern. Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix compilation with -no-feature-regularexpressionEskil Abrahamsen Blomfeldt2020-03-171-0/+4
| | | | | | | | | This -no-feature has probably not been tested for a while and seems to have rotted a bit, both some unprotected uses and some warnings on unused parameters. Change-Id: Ie20a06c78d3b4c36860dab49d6615eaa8ffc9077 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-041-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| * Convert two QDateTime::toString() usages to QLocale::toString()Edward Welbourne2020-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Qt::LocalDate has been deprecated for ages as an alias for Qt::SystemLocaleDate, which we intend to remove at Qt 6; and all use of them can (and should) be converted to use QLocale::toString(). So do that. Task-number: QTBUG-80441 Change-Id: I0a40fa287cb347c704ec3673d17ef18381063f7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-151-1/+2
|\| | | | | | | Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
| * Doc: Correct non-link related qdoc compilation errorsNico Vertriest2020-01-141-1/+2
| | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Remove some uses of QImage::setAlphaChannelAllan Sandfeld Jensen2019-12-191-3/+2
| | | | | | | | | | | | | | | | Remove once where it did nothing, and once where using composition mode masking avoids first creating a masking image. Change-Id: Ia4c93eac6ebb11fcdab34d306d943a7f87906b7e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Don't insert multiple names for the same roleLars Knoll2019-11-051-1/+2
|/ | | | | | | | | It doesn't make a lot of sense to have two names for the same role. Use 'fileIcon' exclusively for the Qt::Decoration/ FileIconRole. Change-Id: Icaa46ba4aa61efc56ba007a14bab5e59ea26cd35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileDialog: Fix volume name display on WindowsFriedemann Kleint2019-09-101-11/+28
| | | | | | | | | | | | | The volume names displayed did not match those of Windows Explorer; for example "New Volume (X:)" would be displayed for mapped network drives. Replace GetVolumeInformation() and manual formatting by the normal display name of IShellItem. Fixes: QTBUG-78043 Change-Id: Ia742b7733e8ddc31e9506f15d90d065b985a111d Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* QFileSystemModel: Fix naming of Option enumerationFriedemann Kleint2019-09-021-5/+5
| | | | | | | | Fix an API review finding in 5.14, amending 6b9d319b26da2e4b6f939ee92a176f8604c1c539. Change-Id: I6c67ebde91021b87a43a86ff831b724f098019aa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QFileSystemModel: Add optionsFriedemann Kleint2019-08-141-0/+103
| | | | | | | | | | | | | | | | | | | | Add Options flags similar to QFileDialog: - DontWatch: Do not use file system watchers for simple use cases like line edit completion. This brings it closer to QDirModel, which then can be deprecated. - DontResolveSymlinks: Similar to QFileDialog::DontResolveSymlinks. - DontUseCustomDirectoryIcons: matching QFileIconProvider::DontUseCustomDirectoryIcons for convenience. Task-number: QTBUG-76493 Change-Id: I09d3cb73ef902a700e6ebfba427e2d990fce4b4c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFileSystemModel: Improve class structureFriedemann Kleint2019-07-091-7/+6
| | | | | | | | | | | Use member initialization in private classes and repack members to minimize padding. Use delegating constructors and default constructors/destructors. Task-number: QTBUG-76493 Change-Id: Iaea8880811782ee5846c128590b83c23e6fae445 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: Fix static method invocationsFriedemann Kleint2019-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Apply fixits by Creator and results of manual search focusing on QCore/Gui/Applicaton(Private) methods and variables to prepare for splitting out some classes. Task-number: QTBUG-69478 Task-number: QTBUG-76497 Task-number: QTBUG-76493 Change-Id: Iaf468166793e0cabb514b51c827b30317bf45a2d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QtWidgets: eradicate some indexed loops [needing qAsConst()]Marc Mutz2019-05-291-2/+1
| | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I9b5c23c723be024b314a7ad873e21ad63b44b348 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: replace even more null/0/nullptr with \nullptr macroChristian Ehrlicher2019-05-081-2/+2
| | | | | | | | Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QRegularExpression: anchor wildcard patternSamuel Gaist2018-12-151-2/+1
| | | | | | | | | | | | | | The current implementation of wildcardToRegularExpression doesn't anchor the pattern which makes it not narrow enough for globbing patterns. This patch fixes that by applying anchoredPattern before returning the wildcard pattern. [ChangeLog][QtCore][QRegularExpression] The wildcardToRegularExpression method now returns a properly anchored pattern. Change-Id: I7bee73389d408cf42499652e4fb854517a8125b5 Fixes: QTBUG-72539 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-301-23/+23
|\ | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| * Modernize the "filesystemwatcher" featureLiang Qi2018-09-271-23/+23
| | | | | | | | | | | | Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| * Modernize the "datestring" featureLiang Qi2018-09-241-1/+1
| | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Implement exact match expression builder for QRegularExpressionSamuel Gaist2018-08-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegularExpression doesn't offer a direct equivalent of QRegExp's exact match. There are several places in the Qt sources that use this feature. This patch implements a small helper function that builds the expression as recommended in the documentation and updates the related code. [ChangeLog][Core][Tools] QRegularExpression now provides anchoredPattern() which is a helper function to build regular expressions used for exact matching. Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace QRegExp by QRegularExpression in QFileSystemModelSamuel Gaist2018-08-191-17/+20
|/ | | | | | | | | | | [ChangeLog][Widgets][Dialogs] QFileSystemModel now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Change-Id: I6ca893833ff7b5b7f678221bb9bc623fd17c1cfa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QFileSystemModel/Win: Fix file system operations failing due to watchersFriedemann Kleint2018-01-261-15/+78
| | | | | | | | | | | | | | File system operations like renaming/removing may fail on Windows when file system watchers are present. Add functions to QFileSystemModelPrivate to temporarily remove the watchers prior to such operations and to restore them in case of failure. Use them for rename/remove (within a feature check for QFileSystemWatcher and Q_OS_WIN). Task-number: QTBUG-65683 Change-Id: I90142901892fbf9b1e1206a3397a95ffd3c8f010 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-091-6/+3
|\ | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| * QFileSystemModel/Windows: Make file name checking case-insensitiveFriedemann Kleint2018-01-091-6/+3
| | | | | | | | | | | | | | | | | | | | | | Introduce a special hash modeled on the one used for QFileSystemWatcher on Windows. Task-number: QTBUG-31103 Task-number: QTBUG-64147 Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-2/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| * QFileSystemModel: properly align file size columnChristian Ehrlicher2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | The file size column was not properly horizontally aligned. The model only returned Qt::AlignRight with no horizontal alignment. This lead to a top alignment within QStyle::alignedRect(). Task-number: QTBUG-64098 Change-Id: Iaef30200a63bd0975c88a67d0af2eb1d5254f588 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QFileSystemModel::index(): Add a list size checkFriedemann Kleint2017-12-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | This prevents an out of range assert when monitoring directory with activity (for example, temp). Task-number: QTBUG-62841 Change-Id: Id3aa4098e9bbd665c7b17a667516885fa7c7f473 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Martin Rotter <rotter.martinos@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-2/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * In QFileDialog delete a symlink rather than actual target it points toDongmei Wang2017-07-291-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QFileDialog, when a resolved symlink gets deleted, the actual target it points to gets deleted instead of the symlink itself. The patch is to delete the symlink rather than actual target by doing the following: 1. In QFileDialog, if a directory being deleted is a resolved symlink, do not remove the directory. Instead, call QFileSystemModel to remove the model index. 2. In QFileSystemModel::remove(), use the full file path instead of the resolved file path for deletion. For a symlink, delete the symlink itself. The patch is for Windows and Linux. Task-number: QTBUG-29770 Change-Id: I4db545f0b5963acde3f89a8ee858338c23104804 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-6/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Convert features.filesystemmodel to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-4/+0
| | | | | | | | | | Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.messagebox to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-2/+4
| | | | | | | | | | Change-Id: Ie25dc672f8a675c06585c7757255f7dbadbfc5ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add QLocale::formattedDataSize and consolidate use casesShawn Rutledge2017-06-201-15/+1
|/ | | | | | | | | | | | | | | It should be easier to translate sizes in bytes to human-readable strings consistently rather than having to repeat this code (and the string translations) in various places. The FileDialog in QtQuick.Controls has a use for this, too. [ChangeLog][QtCore][QLocale] Added QLocale::formattedDataSize() for formatting quantities of bytes as kB, MB, GB etc. Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I27bca146c3eba90fa7a5d52ef6626ce85723e3f0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemModel: improve readability of the renaming codeMarc Mutz2016-10-281-8/+6
| | | | | | | | | | | | | | | | | Instead of calling QHash::value(), inserting the return value into the hash with a different name and only many lines later removing the old node, do the extraction into a QScopedPointer, and the insertion into the hash from the QScopedPoiner, keeping the node update in between the two. Avoids the double-lookup of 'oldName', makes it clearer what's going on, and limits the potential for some return between the insertion under the new name and the removal under the old one sneaking in, which would cause a double-delete later in the dtor. Change-Id: Ia2d1cca77c04708421ccb5e594729ec83de85345 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-061-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_pre.prf mkspecs/features/qpa/genericunixfontdatabase.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf src/corelib/io/qiodevice.cpp Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-051-3/+1
| |\ | | | | | | | | | Change-Id: I34b5e290233d0869fbafac094a939aec2bf83fd5
| | * QFileSystemModel: Plug leak on file renamingMarc Mutz2016-10-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In setData(), the old code both called Private::addNode(), which creates a QFileSystemNode and adds it to the parent's QHash of children, and also re-purposed the old node by taking it out of the children hash, adjusting the fileName member of the node and putting it back into the children hash under the new name, where it would overwrite the node just added under the same (new) name in addNode(). Since the hash stores naked pointers, no-one deletes the node that was put into the hash first. Fix by dropping the addNode() call completely. Change-Id: I0c37917fd0ffd74716393786c69b5bb172aa372e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QFileSystemModel: fix unused variable with QT_NO_FILESYSTEMWATCHERMarc Mutz2016-10-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QFileInfo 'info' is only used in code conditional on QT_NO_FILESYSTEMWATCHER, so move the definiton into the conditionally-compiled block, too. Turn it into an rvalue while at it. Change-Id: I9983bfdcd0b32d0abecf7c588973a60df9de8cbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QFileSystemModel: add an assert to prevent leaksMarc Mutz2016-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private::addNode() adds the new node to the parent's hash without checking whether a node already exists. If it does, then the old node is leaked. Add an assertion to check for this condition. Change-Id: Ib949d71c86c28d1152a538756c0efc283c793c24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>