Commit 7620be4a authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by hjk

Qnx: Remove unused code

Change-Id: I385abd7b36e5a023ccf735cc11ab23ac4fb8e831
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent a06c5ef1
......@@ -57,7 +57,7 @@ QString BlackBerryVersionNumber::toString() const
return m_segments.join(QLatin1String("."));
}
bool BlackBerryVersionNumber::operator <(const BlackBerryVersionNumber &b) const
bool BlackBerryVersionNumber::operator >(const BlackBerryVersionNumber &b) const
{
int minSize = size() > b.size() ? b.size() : size();
for (int i = 0; i < minSize; i++) {
......@@ -74,9 +74,9 @@ bool BlackBerryVersionNumber::operator <(const BlackBerryVersionNumber &b) const
int bInt = bParts[j].toInt(&bOk);
if (aOk && bOk)
return aInt < bInt;
return aInt > bInt;
return aParts[j].compare(bParts[j]) < 0;
return aParts[j].compare(bParts[j]) > 0;
}
}
}
......@@ -84,17 +84,6 @@ bool BlackBerryVersionNumber::operator <(const BlackBerryVersionNumber &b) const
return false;
}
bool BlackBerryVersionNumber::operator ==(const BlackBerryVersionNumber &b) const
{
int minSize = size() > b.size() ? b.size() : size();
for (int i = 0; i < minSize; i++) {
if (segment(i) != b.segment(i))
return false;
}
return true;
}
QString BlackBerryVersionNumber::segment(int index) const
{
if (index < m_segments.length())
......
......@@ -34,10 +34,6 @@
#include <QStringList>
#include <utility>
using namespace std::rel_ops;
namespace Qnx {
namespace Internal {
class BlackBerryVersionNumber
......@@ -56,8 +52,7 @@ public:
static BlackBerryVersionNumber fromTargetName(const QString &targetName);
static BlackBerryVersionNumber fromFileName(const QString &fileName, const QRegExp &regExp);
bool operator <(const BlackBerryVersionNumber &b) const;
bool operator ==(const BlackBerryVersionNumber &b) const;
bool operator >(const BlackBerryVersionNumber &b) const;
private:
QStringList m_segments;
......
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