Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Bertrand Varin <louisbvarin@gmail.com>2018-03-31 23:01:30 +0300
committerLouis-Bertrand Varin <louisbvarin@gmail.com>2018-03-31 23:01:30 +0300
commit8324d03f0a015e62b6182843b4478226a5197090 (patch)
treefaf34febaec7c7e764d357dc5e439f6f2b1fcaf3 /tests/TestGlobal.h
parent74efc57369b068a0f93cb84ac68b6c17f64c8abe (diff)
Formatting the code.
Diffstat (limited to 'tests/TestGlobal.h')
-rw-r--r--tests/TestGlobal.h64
1 files changed, 30 insertions, 34 deletions
diff --git a/tests/TestGlobal.h b/tests/TestGlobal.h
index 017fbd5f9..788bd8a13 100644
--- a/tests/TestGlobal.h
+++ b/tests/TestGlobal.h
@@ -18,52 +18,48 @@
#ifndef KEEPASSXC_TESTGLOBAL_H
#define KEEPASSXC_TESTGLOBAL_H
-#include "core/Uuid.h"
#include "core/Group.h"
+#include "core/Uuid.h"
-#include <QTest>
#include <QDateTime>
+#include <QTest>
-namespace QTest {
-
-template<>
-inline char* toString(const Uuid& uuid)
-{
- QByteArray ba = "Uuid(";
- ba += uuid.toHex().toLatin1().constData();
- ba += ")";
- return qstrdup(ba.constData());
-}
-
-template<>
-inline char* toString(const Group::TriState& triState)
+namespace QTest
{
- QString value;
- if (triState == Group::Inherit) {
- value = "null";
- } else if (triState == Group::Enable) {
- value = "true";
- } else {
- value = "false";
+ template <> inline char* toString(const Uuid& uuid)
+ {
+ QByteArray ba = "Uuid(";
+ ba += uuid.toHex().toLatin1().constData();
+ ba += ")";
+ return qstrdup(ba.constData());
}
- return qstrdup(value.toLocal8Bit().constData());
-}
+ template <> inline char* toString(const Group::TriState& triState)
+ {
+ QString value;
-} // namespace QTest
+ if (triState == Group::Inherit) {
+ value = "null";
+ } else if (triState == Group::Enable) {
+ value = "true";
+ } else {
+ value = "false";
+ }
+ return qstrdup(value.toLocal8Bit().constData());
+ }
-namespace Test {
+} // namespace QTest
-inline QDateTime datetime(int year, int month, int day, int hour, int min, int second)
+namespace Test
{
- return QDateTime(
- QDate(year, month, day),
- QTime(hour, min, second),
- Qt::UTC);
-}
-} // namespace Test
+ inline QDateTime datetime(int year, int month, int day, int hour, int min, int second)
+ {
+ return QDateTime(QDate(year, month, day), QTime(hour, min, second), Qt::UTC);
+ }
+
+} // namespace Test
-#endif //KEEPASSXC_TESTGLOBAL_H
+#endif // KEEPASSXC_TESTGLOBAL_H