From f29b81d5217f3ef21bbc88131bdab5227a677511 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 19 Nov 2020 20:52:09 +0100 Subject: [PATCH] rbutil: Avoid creating temporary object. There's a static function for that. Change-Id: I5d07d73368f20167bb45f5b0df510be6d4227109 --- rbutil/rbutilqt/configure.cpp | 2 +- rbutil/rbutilqt/systrace.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index 066b9d7db7..6abbc06afd 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -171,7 +171,7 @@ void Config::accept() errormsg += "
  • " + tr("No mountpoint given") + "
  • "; error = true; } - else if(!QFileInfo(mountpoint).exists()) { + else if(!QFileInfo::exists(mountpoint)) { errormsg += "
  • " + tr("Mountpoint does not exist") + "
  • "; error = true; } diff --git a/rbutil/rbutilqt/systrace.cpp b/rbutil/rbutilqt/systrace.cpp index 5f3450eae8..ba7f1e30e3 100644 --- a/rbutil/rbutilqt/systrace.cpp +++ b/rbutil/rbutilqt/systrace.cpp @@ -120,7 +120,7 @@ void SysTrace::savePreviousTrace(void) void SysTrace::rotateTrace(void) { QString f = QDir::tempPath() + "/rbutil-trace.log.1"; - if(QFileInfo(f).exists()) { + if(QFileInfo::exists(f)) { QFile::remove(f); } QFile::rename(QDir::tempPath() + "/rbutil-trace.log", f);