From 826607a1901b0cd006cb934ab8185a80a038cce8 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Tue, 6 Sep 2011 14:24:13 +0000
Subject: [PATCH] Abi: Add isNull() method

Change-Id: If8d6e5ace13857e4435b09e47d5d40dd2befdacf
Reviewed-on: http://codereview.qt.nokia.com/4279
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
---
 src/plugins/projectexplorer/abi.cpp | 9 +++++++++
 src/plugins/projectexplorer/abi.h   | 1 +
 2 files changed, 10 insertions(+)

diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp
index 96d39713d76..e2e14f94fda 100644
--- a/src/plugins/projectexplorer/abi.cpp
+++ b/src/plugins/projectexplorer/abi.cpp
@@ -485,6 +485,15 @@ bool Abi::isValid() const
             && m_wordWidth != 0;
 }
 
+bool Abi::isNull() const
+{
+    return m_architecture == UnknownArchitecture
+            && m_os == UnknownOS
+            && m_osFlavor == UnknownFlavor
+            && m_binaryFormat == UnknownFormat
+            && m_wordWidth == 0;
+}
+
 QString Abi::toString(const Architecture &a)
 {
     switch (a) {
diff --git a/src/plugins/projectexplorer/abi.h b/src/plugins/projectexplorer/abi.h
index b9a75cad6cd..92b97b71d40 100644
--- a/src/plugins/projectexplorer/abi.h
+++ b/src/plugins/projectexplorer/abi.h
@@ -120,6 +120,7 @@ public:
     bool isCompatibleWith(const Abi &other) const;
 
     bool isValid() const;
+    bool isNull() const;
 
     Architecture architecture() const { return m_architecture; }
     OS os() const { return m_os; }
-- 
GitLab