summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qscopeguard.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-3/+3
| | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Issue a warning about unused result of qScopeGuard and QScopeGuardJędrzej Nowacki2019-04-021-1/+10
| | | | | | | | | If the result is unassigned then resulting QScopeGuard is destroyed immediately, we can warn about it, as it is definitely a bug. Change-Id: I627b05cecb3d0e62dbc24373e621f2be36d9b324 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Introduce QScopeGuardSérgio Martins2018-07-211-0/+96
A RAII style class which calls a function at end of scope. Example usage: auto cleanup = qScopeGuard([] { <my cleanup code> ; }); [ChangeLog][QtCore] Introduced QScopeGuard. Task-number: QTBUG-62894 Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>