fb: remove unnecessary casts
This commit is contained in:
parent
0b14af5624
commit
af6f95b2eb
1 changed files with 6 additions and 3 deletions
|
@ -103,11 +103,14 @@ bool FramebufferBackend::initialize()
|
|||
{
|
||||
setSoftwareCursorForced(true);
|
||||
|
||||
QString framebufferDevice = deviceIdentifier().constData();
|
||||
QByteArray framebufferDevice = deviceIdentifier();
|
||||
if (framebufferDevice.isEmpty()) {
|
||||
framebufferDevice = QString(Udev().listFramebuffers().at(0)->devNode());
|
||||
const auto fbs = Udev().listFramebuffers();
|
||||
if (fbs.size() > 0) {
|
||||
framebufferDevice = fbs.at(0)->devNode();
|
||||
}
|
||||
int fd = open(framebufferDevice.toUtf8().constData(), O_RDWR | O_CLOEXEC);
|
||||
}
|
||||
int fd = open(framebufferDevice.constData(), O_RDWR | O_CLOEXEC);
|
||||
qCDebug(KWIN_FB) << "Using frame buffer device:" << framebufferDevice;
|
||||
if (fd < 0) {
|
||||
qCWarning(KWIN_FB) << "failed to open frame buffer device:" << framebufferDevice;
|
||||
|
|
Loading…
Reference in a new issue