Commit 657dee02 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Remove ComponentVersion::major/minor.

They are unusable on linux as there are commonly-included macros
of the same name.
parent 5723a73b
......@@ -56,19 +56,19 @@ namespace QmlJS {
bool operator<(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.major() < rhs.major()
|| (lhs.major() == rhs.major() && lhs.minor() < rhs.minor());
return lhs.majorVersion() < rhs.majorVersion()
|| (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() < rhs.minorVersion());
}
bool operator<=(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.major() < rhs.major()
|| (lhs.major() == rhs.major() && lhs.minor() <= rhs.minor());
return lhs.majorVersion() < rhs.majorVersion()
|| (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() <= rhs.minorVersion());
}
bool operator==(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.major() == rhs.major() && lhs.minor() == rhs.minor();
return lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() == rhs.minorVersion();
}
bool operator!=(const ComponentVersion &lhs, const ComponentVersion &rhs)
......
......@@ -46,13 +46,6 @@ public:
ComponentVersion(int major, int minor);
~ComponentVersion();
int major() const
{ return _major; }
int minor() const
{ return _minor; }
// something in the GNU headers introduces the major() and minor() defines,
// use these two to disambiguate when necessary
int majorVersion() const
{ return _major; }
int minorVersion() const
......
......@@ -255,8 +255,8 @@ public:
typeName = fixUpPackeNameForQtQuick(qmlValue->packageName()) + QLatin1String("/") + qmlValue->className();
//### todo this is just a hack to support QtQuick 1.0
majorVersion = fixUpMajorVersionForQtQuick(qmlValue->packageName(), qmlValue->version().major());
minorVersion = fixUpMinorVersionForQtQuick(qmlValue->packageName(), qmlValue->version().minor());
majorVersion = fixUpMajorVersionForQtQuick(qmlValue->packageName(), qmlValue->version().majorVersion());
minorVersion = fixUpMinorVersionForQtQuick(qmlValue->packageName(), qmlValue->version().minorVersion());
} else {
for (UiQualifiedId *iter = astTypeNode; iter; iter = iter->next)
if (!iter->next && iter->name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment