diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-21 12:00:07 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-21 12:00:07 (GMT) |
commit | 8d00a0a21f245d15962191e0690d3619735d118b (patch) | |
tree | 7aaa66528f0ee40d0d2d885f94835d0f09ea4a68 /src/gui/embedded/qscreenlinuxfb_qws.cpp | |
parent | 97cec103793a4b9aae8337ffc2ce9a2bd98fb5fc (diff) | |
parent | 508b447075fb852e61ddf88c92c9099dad292747 (diff) | |
download | Qt-8d00a0a21f245d15962191e0690d3619735d118b.zip Qt-8d00a0a21f245d15962191e0690d3619735d118b.tar.gz Qt-8d00a0a21f245d15962191e0690d3619735d118b.tar.bz2 |
Merge commit 'qt/master' into kinetic-graphicseffect
Conflicts:
src/gui/graphicsview/graphicsview.pri
Diffstat (limited to 'src/gui/embedded/qscreenlinuxfb_qws.cpp')
-rw-r--r-- | src/gui/embedded/qscreenlinuxfb_qws.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp index 34fc54c..69e5808 100644 --- a/src/gui/embedded/qscreenlinuxfb_qws.cpp +++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp @@ -271,15 +271,13 @@ bool QLinuxFbScreen::connect(const QString &displaySpec) QScreen::setFrameBufferLittleEndian(true); #endif - // Check for explicitly specified device - const int len = 8; // "/dev/fbx" - int m = displaySpec.indexOf(QLatin1String("/dev/fb")); - - QString dev; - if (m > 0) - dev = displaySpec.mid(m, len); - else - dev = QLatin1String("/dev/fb0"); + QString dev = QLatin1String("/dev/fb0"); + foreach(QString d, args) { + if (d.startsWith(QLatin1Char('/'))) { + dev = d; + break; + } + } if (access(dev.toLatin1().constData(), R_OK|W_OK) == 0) d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDWR); |