From 8876434d039385fda705fcfca52c38f861afc894 Mon Sep 17 00:00:00 2001 From: Matthias Schulz Date: Tue, 15 Jan 2013 16:01:35 +0100 Subject: [PATCH] Reorder argument parsing in qlinuxfbscreen.cpp The regex size=(\\d+)x(\\d+) fits also to mmsize=(\\d+)x(\\d+) , this is the reason why the mmsize parameter is parsed as size. You can reproduce this e.g. with following parameters: "-platform linuxfb:fb=/dev/fb1:mmsize=800x480:size=800x480:offset=50x50" This patch changes the order of argument parsing, so that the mmsize parameter comes first. Signed-off-by: Matthias Schulz --- src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp index 4d170f1..7d91ff6 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp @@ -329,6 +329,8 @@ bool QLinuxFbScreen::initialize(const QStringList &args) foreach (const QString &arg, args) { if (arg == QLatin1String("nographicsmodeswitch")) doSwitchToGraphicsMode = false; + else if (mmSizeRx.indexIn(arg) != -1) + userMmSize = QSize(mmSizeRx.cap(1).toInt(), mmSizeRx.cap(2).toInt()); else if (sizeRx.indexIn(arg) != -1) userGeometry.setSize(QSize(sizeRx.cap(1).toInt(), sizeRx.cap(2).toInt())); else if (offsetRx.indexIn(arg) != -1) @@ -337,8 +339,6 @@ bool QLinuxFbScreen::initialize(const QStringList &args) ttyDevice = ttyRx.cap(1); else if (fbRx.indexIn(arg) != -1) fbDevice = fbRx.cap(1); - else if (mmSizeRx.indexIn(arg) != -1) - userMmSize = QSize(mmSizeRx.cap(1).toInt(), mmSizeRx.cap(2).toInt()); } if (fbDevice.isEmpty()) -- 1.7.2.5