Commit 2dfbe8d8 authored by Frederik Gladhorn's avatar Frederik Gladhorn

Simplify Edid::Private::edidParseString

Reviewers: #plasma, romangg

Reviewed By: #plasma, romangg

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14370
parent d7cef1a5
......@@ -406,14 +406,10 @@ double Edid::Private::edidDecodeFraction(int high, int low) const
QString Edid::Private::edidParseString(const quint8 *data) const
{
QString text;
/* this is always 12 bytes, but we can't guarantee it's null
* terminated or not junk. */
text = QString::fromLocal8Bit(reinterpret_cast<const char*>(data), 12);
auto text = QString::fromLocal8Bit(reinterpret_cast<const char*>(data), 12);
// Remove newlines, extra spaces and stuff
text = text.simplified();
return text;
return text.simplified();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment