You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
571 B
29 lines
571 B
/* |
|
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> |
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
|
*/ |
|
#ifndef KCONFIG_AUTOTESTS_HELPER_H |
|
#define KCONFIG_AUTOTESTS_HELPER_H |
|
|
|
#include <QLocale> |
|
|
|
/** |
|
* @brief Helper to store the current default QLocale and resetting to it in the dtor. |
|
**/ |
|
class DefaultLocale |
|
{ |
|
public: |
|
DefaultLocale() |
|
: m_defaultLocale() |
|
{ |
|
} |
|
~DefaultLocale() |
|
{ |
|
QLocale::setDefault(m_defaultLocale); |
|
} |
|
private: |
|
QLocale m_defaultLocale; |
|
}; |
|
|
|
#endif
|
|
|