summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-21 20:45:59 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-09-27 10:57:58 +0200
commit201e9bcde8d0d222d71792dc577d9eced4f45ebc (patch)
tree536d06ff4785a539a344388c606433d189b377ef
parentf1f72ff8df68e190a43a56d14dfc820d1e58d96b (diff)
downloadrockbox-201e9bcde8.tar.gz
rockbox-201e9bcde8.tar.bz2
rockbox-201e9bcde8.zip
rbutil: Fix some minor issues found by clazy.
Change-Id: I0e63df09caf959dcb325c6ad2297c4348388a831
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallmi4.cpp2
-rw-r--r--rbutil/rbutilqt/base/talkfile.cpp4
-rw-r--r--rbutil/rbutilqt/base/ttsexes.cpp2
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp2
-rw-r--r--rbutil/rbutilqt/base/uninstall.cpp2
-rw-r--r--rbutil/rbutilqt/base/utils.cpp3
6 files changed, 7 insertions, 8 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
index b0e83a8585..597c3ac37b 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
@@ -48,7 +48,7 @@ void BootloaderInstallMi4::installStage2(void)
QFile oldbl(fwfile);
QString moved = QFileInfo(Utils::resolvePathCase(m_blfile)).absolutePath()
+ "/OF.mi4";
- if(!QFileInfo(moved).exists()) {
+ if(!QFileInfo::exists(moved)) {
LOG_INFO() << "renaming" << fwfile << "to" << moved;
oldbl.rename(moved);
}
diff --git a/rbutil/rbutilqt/base/talkfile.cpp b/rbutil/rbutilqt/base/talkfile.cpp
index 1e9a968576..b4f05762e9 100644
--- a/rbutil/rbutilqt/base/talkfile.cpp
+++ b/rbutil/rbutilqt/base/talkfile.cpp
@@ -145,7 +145,7 @@ bool TalkFileCreator::createTalkList(QDir startDir)
if(!dir.dirName().isEmpty() && m_talkFolders)
{
// check if we should ignore it
- if(m_generateOnlyNew && QFileInfo(dir.path() + "/_dirname.talk").exists())
+ if(m_generateOnlyNew && QFileInfo::exists(dir.path() + "/_dirname.talk"))
{
continue;
}
@@ -186,7 +186,7 @@ bool TalkFileCreator::createTalkList(QDir startDir)
continue;
// check if we should ignore it
- if(m_generateOnlyNew && QFileInfo(fileInf.path() + "/" + fileInf.fileName() + ".talk").exists())
+ if(m_generateOnlyNew && QFileInfo::exists(fileInf.path() + "/" + fileInf.fileName() + ".talk"))
{
continue;
}
diff --git a/rbutil/rbutilqt/base/ttsexes.cpp b/rbutil/rbutilqt/base/ttsexes.cpp
index a8c10bfb19..446725968f 100644
--- a/rbutil/rbutilqt/base/ttsexes.cpp
+++ b/rbutil/rbutilqt/base/ttsexes.cpp
@@ -119,7 +119,7 @@ TTSStatus TTSExes::voice(QString text, QString wavfile, QString *errStr)
bool TTSExes::configOk()
{
loadSettings();
- if (QFileInfo(m_TTSexec).exists())
+ if (QFileInfo::exists(m_TTSexec))
return true;
else
return false;
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index 3d07c09a98..75d83e7d21 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -42,7 +42,7 @@ void TTSSapi::generateSettings()
// language
QMap<QString, QStringList> languages = SystemInfo::languages();
QStringList langs;
- for(int i = 0; i < languages.values().size(); ++i) {
+ for(int i = 0; i < languages.size(); ++i) {
langs.append(languages.values().at(i).at(0));
}
EncTtsSetting* setting = new EncTtsSetting(this,
diff --git a/rbutil/rbutilqt/base/uninstall.cpp b/rbutil/rbutilqt/base/uninstall.cpp
index 498edbb057..4b90bc6b77 100644
--- a/rbutil/rbutilqt/base/uninstall.cpp
+++ b/rbutil/rbutilqt/base/uninstall.cpp
@@ -121,6 +121,6 @@ QStringList Uninstaller::getAllSections()
bool Uninstaller::uninstallPossible()
{
- return QFileInfo(m_mountpoint +"/.rockbox/rbutil.log").exists();
+ return QFileInfo::exists(m_mountpoint +"/.rockbox/rbutil.log");
}
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index 277dcb512c..a61ef0d951 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -69,7 +69,7 @@ bool Utils::recursiveRmdir( const QString &dirName )
// make list of entries in directory
QStringList list = dir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot);
QFileInfo fileInfo;
- QString curItem, lstAt;
+ QString curItem;
for(int i = 0; i < list.size(); i++){ // loop through all items of list
QString name = list.at(i);
curItem = dirN + "/" + name;
@@ -281,7 +281,6 @@ qulonglong Utils::filesystemSize(QString path, enum Utils::Size type)
//! \brief searches for a Executable in the Environement Path
QString Utils::findExecutable(QString name)
{
- QString exepath;
//try autodetect tts
#if defined(Q_OS_LINUX) || defined(Q_OS_MACX) || defined(Q_OS_OPENBSD)
#if QT_VERSION >= 0x050e00