I was under the impression that QObject disabled the copy constructor and assignment operator... why am I able to compile this QObject derivative containing both of these?
#ifndef QVERSION_H
#define QVERSION_H
#include "silverlocklib_global.h"
#include <QtCore>
struct SILVERLOCKLIBSHARED_EXPORT QVersion : public QObject
{
Q_OBJECT
Q_PROPERTY(bool valid READ isValid)
Q_PROPERTY(long major READ major)
Q_PROPERTY(long minor READ minor)
Q_PROPERTY(long build READ build)
Q_PROPERTY(long revision READ revision)
public:
QVersion(long major = 0, long minor = 0, long build = -1, long revision = -1, QObject *parent = NULL);
QVersion(const QString &version, QObject *parent = NULL);
QVersion(const QVersion &version);
static QVersion parse(const QString& version, bool *ok = NULL);
bool isValid() const;
long compareTo(const QVersion &other) const;
bool equals(const QVersion &other) const;
QString toString() const;
QString toString(int fieldCount) const;
long major() const;
inline int majorRevision() const { return (qint16)(this->m_revision >> 16); }
long minor() const;
inline int minorRevision() const { return (qint16)(this->m_revision & 65535); }
long build() const;
long revision() const;
QVersion& operator=(const QVersion &version);
friend bool operator==(const QVersion &v1, const QVersion &v2);
friend bool operator!=(const QVersion &v1, const QVersion &v2);
friend bool operator<(const QVersion &v1, const QVersion &v2);
friend bool operator<=(const QVersion &v1, const QVersion &v2);
friend bool operator>(const QVersion &v1, const QVersion &v2);
friend bool operator>=(const QVersion &v1, const QVersion &v2);
private:
inline static void copy(QVersion *const destination, const QVersion &source);
static bool tryParseComponent(const QString &component, long *parsedComponent);
long m_major;
long m_minor;
long m_build;
long m_revision;
};
#endif // QVERSION_H