<commit_before>/***************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: <NAME> <<EMAIL>>
**
** This file is part of duicontrolpanel.
**
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/

#include "qfileinfo-fake.h"

#include <QSet>
#include <QHash>
#include <QFileInfo>
#include <QString>

static QSet<QString> existingFiles;
static QHash<const QFileInfo*, QString> priv;
class QFileInfoPrivate {};

void qfileinfo_setExists (const QString& filePath, bool exists)
{
    if (exists) {
        existingFiles.insert (filePath);
    } else {
        existingFiles.remove (filePath);
    }
}

QFileInfo::QFileInfo ( const QString & file )
{
    priv[this] = file;
}


bool QFileInfo::exists () const
{
    return existingFiles.contains (this->filePath());<commit_msg>Little compile fix<commit_after>/***************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: <NAME> <<EMAIL>>
**
** This file is part of duicontrolpanel.
**
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/

#include "qfileinfo-fake.h"

#include <QSet>
#include <QHash>
#include <QFileInfo>
#include <QString>
#include <QSharedData>

static QSet<QString> existingFiles;
static QHash<const QFileInfo*, QString> priv;
class QFileInfoPrivate: public QSharedData {};

void qfileinfo_setExists (const QString& filePath, bool exists)
{
    if (exists) {
        existingFiles.insert (filePath);
    } else {
        existingFiles.remove (filePath);
    }
}

QFileInfo::QFileInfo ( const QString & file )
{
    priv[this] = file;
}


bool QFileInfo::exists () const
{
    return existingFiles.contains (this->filePath());
{'fraction_non_alphanumeric': 0.2271986970684039, 'fraction_numerical': 0.004885993485342019, 'mean_word_length': 5.036855036855036, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2264487', 'n_tokens_mistral': 693, 'n_tokens_neox': 653, 'n_words': 227}