Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-qt
Commits
b3dcabb9
Commit
b3dcabb9
authored
Dec 23, 2021
by
Sébastien Blin
Committed by
Aline Gondim Santos
Jan 04, 2022
Browse files
utils: remove dead code
Change-Id: Ifa610f3a110c050e22b6a83c79c0a94644ee82e1
parent
cab0ccc7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/utils.cpp
View file @
b3dcabb9
...
...
@@ -765,28 +765,6 @@ Utils::setupQRCode(QString ringID, int margin)
return
result
;
}
QString
Utils
::
formattedTime
(
int
duration
)
{
if
(
duration
==
0
)
return
{};
std
::
string
formattedString
;
auto
minutes
=
duration
/
60
;
auto
seconds
=
duration
%
60
;
if
(
minutes
>
0
)
{
formattedString
+=
std
::
to_string
(
minutes
)
+
":"
;
if
(
formattedString
.
length
()
==
2
)
{
formattedString
=
"0"
+
formattedString
;
}
}
else
{
formattedString
+=
"00:"
;
}
if
(
seconds
<
10
)
formattedString
+=
"0"
;
formattedString
+=
std
::
to_string
(
seconds
);
return
QString
::
fromStdString
(
formattedString
);
}
QByteArray
Utils
::
QByteArrayFromFile
(
const
QString
&
filename
)
{
...
...
src/utils.h
View file @
b3dcabb9
...
...
@@ -116,7 +116,6 @@ bool isImage(const QString& fileExt);
QString
generateUid
();
// Misc
QString
formattedTime
(
int
seconds
);
QString
humanFileSize
(
qint64
fileSize
);
}
// namespace Utils
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment