Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112289
kazv-util.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
766 B
Referenced Files
None
Subscribers
None
kazv-util.cpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<kazv-defs.hpp>
#include
<QUrl>
#include
<QMimeDatabase>
#include
"matrix-link.hpp"
#include
"kazv-util.hpp"
KazvUtil
::
KazvUtil
(
QObject
*
parent
)
:
QObject
(
parent
)
{}
KazvUtil
::~
KazvUtil
()
=
default
;
QString
KazvUtil::escapeHtml
(
const
QString
&
orig
)
const
{
return
orig
.
toHtmlEscaped
();
}
QString
KazvUtil::mimeTypeForUrl
(
const
QUrl
&
url
)
const
{
return
QMimeDatabase
().
mimeTypeForUrl
(
url
).
name
();
}
QString
KazvUtil::matrixLinkUserId
(
const
QString
&
url
)
const
{
MatrixLink
link
=
QUrl
(
url
);
if
(
link
.
isUser
())
{
return
link
.
identifiers
()[
0
];
}
return
QStringLiteral
(
""
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 23, 7:34 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38897
Default Alt Text
kazv-util.cpp (766 B)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment