mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: avoid two cache lookups in KStandardDirsPrivate::exists()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
55cc3a3f02
commit
3ed846617d
1 changed files with 2 additions and 4 deletions
|
@ -554,10 +554,8 @@ bool KStandardDirs::exists(const QString &fullPath) const
|
|||
|
||||
bool KStandardDirs::KStandardDirsPrivate::exists(const QString &fullPath)
|
||||
{
|
||||
QFileInfo *fileinfo;
|
||||
if(m_infocache.contains(fullPath)) {
|
||||
fileinfo = m_infocache.object(fullPath);
|
||||
} else {
|
||||
QFileInfo *fileinfo = m_infocache.object(fullPath);
|
||||
if (!fileinfo) {
|
||||
fileinfo = new QFileInfo(fullPath);
|
||||
m_infocache.insert(fullPath, fileinfo);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue