summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp')
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 1fedb546eb..e2826f3946 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -213,7 +213,7 @@ static QImage::Format determineFormat(const fb_var_screeninfo &info, int depth)
static int openTtyDevice(const QString &device)
{
- const char *const devs[] = { "/dev/tty0", "/dev/tty", "/dev/console", 0 };
+ const char *const devs[] = { "/dev/tty0", "/dev/tty", "/dev/console", nullptr };
int fd = -1;
if (device.isEmpty()) {
@@ -253,9 +253,9 @@ static void blankScreen(int fd, bool on)
}
QLinuxFbScreen::QLinuxFbScreen(const QStringList &args)
- : mArgs(args), mFbFd(-1), mTtyFd(-1), mBlitter(0)
+ : mArgs(args), mFbFd(-1), mTtyFd(-1), mBlitter(nullptr)
{
- mMmap.data = 0;
+ mMmap.data = nullptr;
}
QLinuxFbScreen::~QLinuxFbScreen()
@@ -286,7 +286,7 @@ bool QLinuxFbScreen::initialize()
bool doSwitchToGraphicsMode = true;
// Parse arguments
- for (const QString &arg : qAsConst(mArgs)) {
+ for (const QString &arg : std::as_const(mArgs)) {
QRegularExpressionMatch match;
if (arg == "nographicsmodeswitch"_L1)
doSwitchToGraphicsMode = false;
@@ -344,7 +344,7 @@ bool QLinuxFbScreen::initialize()
// mmap the framebuffer
mMmap.size = finfo.smem_len;
- uchar *data = (unsigned char *)mmap(0, mMmap.size, PROT_READ | PROT_WRITE, MAP_SHARED, mFbFd, 0);
+ uchar *data = (unsigned char *)mmap(nullptr, mMmap.size, PROT_READ | PROT_WRITE, MAP_SHARED, mFbFd, 0);
if ((long)data == -1) {
qErrnoWarning(errno, "Failed to mmap framebuffer");
return false;