<commit_before>/*
 * libqtxdg - An Qt implementation of freedesktop.org xdg specs
 * Copyright (C) 2014  <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

#ifndef QTXDG_MIMETYPE_H
#define QTXDG_MIMETYPE_H

#include "xdgmacros.h"
#include <QMimeType>
#include <QIcon>
#include <QString>
#include <QSharedData>

#include <QDebug>

class XdgMimeTypePrivate;

//! Describes types of file or data, represented by a MIME type string.
/*! This class is an QMimeType descendent. The differences are the icon() and
 *  iconName() methods. @see icon() @see iconName()
 *
 * Some parts of the documentation are based on QMimeType documentation.
 * @see http://qt-project.org/doc/qt-5/qmimetype.html
 *
 * @author <NAME> (<EMAIL>)
 */

class QTXDG_API XdgMimeType : public QMimeType {
public:

    /*! Constructs an XdgMimeType object initialized with default property
        values that indicate an invalid MIME type.
        @see QMimeType::QMimeType()
    */
    XdgMimeType();

    /*! Constructs an XdgMimeType object from an QMimeType object
     *  @see QMimeType
     */
    XdgMimeType(const QMimeType& mime);

    //! Constructs an XdgMimeType object from another XdgMimeType object
    XdgMimeType(const XdgMimeType& mime);

    /*! Assigns the data of other to this XdgMimeType object.
     * @return a reference to this object.
     */
    XdgMimeType &operator=(const XdgMimeType &other);


    /*! Compares the other XdgMimeType object to this XdgMimeType object.
     * @return true if other equals this XdgMimeType object, otherwise returns
     * false. The name is the unique identifier for a mimetype, so two mimetypes
     * with the same name, are equal.
     * @see QMimeType::operator==()
     */
    bool operator==(const XdgMimeType &other) const
    {
        return QMimeType::operator==(other);
    }

    inline bool operator!=(const XdgMimeType &other) const
    {
        return QMimeType::operator==(other);<commit_msg>Fixes the XdgMimeType == operator<commit_after>/*
 * libqtxdg - An Qt implementation of freedesktop.org xdg specs
 * Copyright (C) 2014  <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

#ifndef QTXDG_MIMETYPE_H
#define QTXDG_MIMETYPE_H

#include "xdgmacros.h"
#include <QMimeType>
#include <QIcon>
#include <QString>
#include <QSharedData>

#include <QDebug>

class XdgMimeTypePrivate;

//! Describes types of file or data, represented by a MIME type string.
/*! This class is an QMimeType descendent. The differences are the icon() and
 *  iconName() methods. @see icon() @see iconName()
 *
 * Some parts of the documentation are based on QMimeType documentation.
 * @see http://qt-project.org/doc/qt-5/qmimetype.html
 *
 * @author <NAME> (<EMAIL>)
 */

class QTXDG_API XdgMimeType : public QMimeType {
public:

    /*! Constructs an XdgMimeType object initialized with default property
        values that indicate an invalid MIME type.
        @see QMimeType::QMimeType()
    */
    XdgMimeType();

    /*! Constructs an XdgMimeType object from an QMimeType object
     *  @see QMimeType
     */
    XdgMimeType(const QMimeType& mime);

    //! Constructs an XdgMimeType object from another XdgMimeType object
    XdgMimeType(const XdgMimeType& mime);

    /*! Assigns the data of other to this XdgMimeType object.
     * @return a reference to this object.
     */
    XdgMimeType &operator=(const XdgMimeType &other);


    /*! Compares the other XdgMimeType object to this XdgMimeType object.
     * @return true if other equals this XdgMimeType object, otherwise returns
     * false. The name is the unique identifier for a mimetype, so two mimetypes
     * with the same name, are equal.
     * @see QMimeType::operator==()
     */
    bool operator==(const XdgMimeType &other) const
    {
        return QMimeType::operator==(other);
    }

    inline bool operator!=(const XdgMimeType &other) const
    {
        return !QMimeType::operator==(other);
{'fraction_non_alphanumeric': 0.08444111589589964, 'fraction_numerical': 0.006740310803220371, 'mean_word_length': 3.523285351397121, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '1492179', 'n_tokens_mistral': 1684, 'n_tokens_neox': 1592, 'n_words': 632}