Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F116390
helper.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
helper.cpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
<immer/config.hpp>
// https://github.com/arximboldi/immer/issues/168
#include
"kazv-log.hpp"
#include
"helper.hpp"
using
namespace
Kazv
;
QString
trustLevelToQStringFunc
(
DeviceTrustLevel
trustLevel
)
{
switch
(
trustLevel
)
{
case
Blocked
:
return
QStringLiteral
(
"blocked"
);
case
Unseen
:
return
QStringLiteral
(
"unseen"
);
case
Seen
:
return
QStringLiteral
(
"seen"
);
case
Verified
:
return
QStringLiteral
(
"verified"
);
default
:
qCWarning
(
kazvLog
)
<<
"trustLevelToQStringFunc(): Unknown trust level:"
<<
trustLevel
;
return
QStringLiteral
();
}
}
DeviceTrustLevel
qStringToTrustLevelFunc
(
QString
trustLevel
)
{
if
(
trustLevel
==
QStringLiteral
(
"blocked"
))
{
return
Blocked
;
}
else
if
(
trustLevel
==
QStringLiteral
(
"unseen"
))
{
return
Unseen
;
}
else
if
(
trustLevel
==
QStringLiteral
(
"seen"
))
{
return
Seen
;
}
else
if
(
trustLevel
==
QStringLiteral
(
"verified"
))
{
return
Verified
;
}
else
{
qCWarning
(
kazvLog
)
<<
"QStringToTrustLevelFunc(): Unknown trust level:"
<<
trustLevel
;
return
Blocked
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Dec 1, 11:38 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41674
Default Alt Text
helper.cpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment