summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-10-15 12:55:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-15 13:17:48 +0200
commit52c8d9ffbabc05c8f6cd7d2a21c109afb6aae8d1 (patch)
tree98866267e4d68f3ee3852e96df4c5eb21d9d7ec1 /src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
parent0008a6f4000674020db96ff4475094d049d094f6 (diff)
linuxfb: Adapt to initialize() pattern
Migrate to the new 5.2 pattern: Prevent relying on the event dispatcher in the constructor by performing initialization later in initialize() instead. Change-Id: Ifa6024affc35e995d6e33a63fa813da9df0c491b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp')
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 6a2d767723..4f9284da7f 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -296,8 +296,8 @@ static void blankScreen(int fd, bool on)
ioctl(fd, FBIOBLANK, on ? VESA_POWERDOWN : VESA_NO_BLANKING);
}
-QLinuxFbScreen::QLinuxFbScreen()
- : mFbFd(-1), mBlitter(0)
+QLinuxFbScreen::QLinuxFbScreen(const QStringList &args)
+ : mArgs(args), mFbFd(-1), mBlitter(0)
{
}
@@ -316,7 +316,7 @@ QLinuxFbScreen::~QLinuxFbScreen()
delete mBlitter;
}
-bool QLinuxFbScreen::initialize(const QStringList &args)
+bool QLinuxFbScreen::initialize()
{
QRegExp ttyRx(QLatin1String("tty=(.*)"));
QRegExp fbRx(QLatin1String("fb=(.*)"));
@@ -330,7 +330,7 @@ bool QLinuxFbScreen::initialize(const QStringList &args)
bool doSwitchToGraphicsMode = true;
// Parse arguments
- foreach (const QString &arg, args) {
+ foreach (const QString &arg, mArgs) {
if (arg == QLatin1String("nographicsmodeswitch"))
doSwitchToGraphicsMode = false;
else if (sizeRx.indexIn(arg) != -1)