Diffstat (limited to 'noncore/settings/packagemanager/oconfitem.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oconfitem.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h index aeee511..db77980 100644 --- a/noncore/settings/packagemanager/oconfitem.h +++ b/noncore/settings/packagemanager/oconfitem.h | |||
@@ -42,6 +42,5 @@ public: | |||
42 | 42 | ||
43 | OConfItem( const QString &location = 0x0, Type type = NotDefined, const QString &name = 0x0, | 43 | OConfItem( Type type = NotDefined, const QString &name = 0x0, const QString &value = 0x0, |
44 | const QString &value = 0x0, bool active = true ); | 44 | bool active = true ); |
45 | 45 | ||
46 | const QString &location() { return m_location; } | ||
47 | Type type() { return m_type; } | 46 | Type type() { return m_type; } |
@@ -51,3 +50,2 @@ public: | |||
51 | 50 | ||
52 | void setLocation( const QString &location ) { m_location = location; } | ||
53 | void setType( Type type ) { m_type = type; } | 51 | void setType( Type type ) { m_type = type; } |
@@ -58,3 +56,2 @@ public: | |||
58 | private: | 56 | private: |
59 | QString m_location; // Configuration file where item is located | ||
60 | Type m_type; // Type of configuration item | 57 | Type m_type; // Type of configuration item |
@@ -72,8 +69,2 @@ private: | |||
72 | // Sort by OConfItem location then by type | 69 | // Sort by OConfItem location then by type |
73 | QString loc1 = reinterpret_cast<OConfItem*>(item1)->location(); | ||
74 | QString loc2 = reinterpret_cast<OConfItem*>(item2)->location(); | ||
75 | if ( loc1 < loc2 ) | ||
76 | return -1; | ||
77 | else if ( loc1 == loc2 ) | ||
78 | { | ||
79 | OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); | 70 | OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); |
@@ -83,7 +74,13 @@ private: | |||
83 | else if ( type1 == type2 ) | 74 | else if ( type1 == type2 ) |
75 | { | ||
76 | QString name1 = reinterpret_cast<OConfItem*>(item1)->name(); | ||
77 | QString name2 = reinterpret_cast<OConfItem*>(item2)->name(); | ||
78 | if ( name1 < name2 ) | ||
79 | return -1; | ||
80 | else if ( name1 == name2 ) | ||
84 | return 0; | 81 | return 0; |
85 | else /*if ( type1 > type2 )*/ | 82 | else /*if ( name1 > name2 )*/ |
86 | return 1; | 83 | return 1; |
87 | } | 84 | } |
88 | else /*if ( loc1 > loc2 )*/ | 85 | else /*if ( type1 > type2 )*/ |
89 | return 1; | 86 | return 1; |