aboutsummaryrefslogtreecommitdiff
path: root/src/core/kdesktopfile.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2014-12-25 10:01:52 +0100
committerDavid Faure <faure@kde.org>2014-12-25 10:01:52 +0100
commitdd68b161108997073fd1e47a75c3309a502f8ea0 (patch)
tree12244ddbbc81b70462b22c0c40ac71356f66e8b8 /src/core/kdesktopfile.cpp
parenta76e5cc2e9c3209463832021f2274ac6429d32fe (diff)
downloadkconfig-dd68b161108997073fd1e47a75c3309a502f8ea0.tar.gz
kconfig-dd68b161108997073fd1e47a75c3309a502f8ea0.tar.bz2
Simplify condition, endsWith is clever enough.
Diffstat (limited to 'src/core/kdesktopfile.cpp')
-rw-r--r--src/core/kdesktopfile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp
index 6278309e..6381cb30 100644
--- a/src/core/kdesktopfile.cpp
+++ b/src/core/kdesktopfile.cpp
@@ -101,8 +101,7 @@ QString KDesktopFile::locateLocal(const QString &path)
bool KDesktopFile::isDesktopFile(const QString &path)
{
- return (path.length() > 8
- && path.endsWith(QLatin1String(".desktop")));
+ return path.endsWith(QLatin1String(".desktop"));
}
bool KDesktopFile::isAuthorizedDesktopFile(const QString &path)