Fix linuxfb argument 'mmsize' parsing

Parse first for 'mmsize' because the regex for 'size' also fits to 'mmsize'.

Task-number: QTBUG-29133
Change-Id: Idc4950270818e496d5d94a97a172b7c780f069b1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Peter Kümmel 2014-02-07 13:12:37 +01:00 committed by The Qt Project
parent 3f5060a601
commit 99979159a4
1 changed files with 2 additions and 2 deletions

View File

@ -333,6 +333,8 @@ bool QLinuxFbScreen::initialize()
foreach (const QString &arg, mArgs) {
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)
@ -341,8 +343,6 @@ bool QLinuxFbScreen::initialize()
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()) {