refs #220, helper methods for empty rooms

This commit is contained in:
Klaus Basan
2014-06-05 13:24:51 +02:00
parent 2b2f1af4e6
commit 6404fafb34
2 changed files with 16 additions and 0 deletions

View File

@@ -31,5 +31,19 @@ namespace BlackMisc
qDBusRegisterMetaType<CVoiceRoomList>();
}
/*
* Two empty rooms
*/
const CVoiceRoomList &CVoiceRoomList::twoEmptyRooms()
{
static CVoiceRoomList emptyRooms;
if (emptyRooms.isEmpty())
{
emptyRooms.push_back(CVoiceRoom());
emptyRooms.push_back(CVoiceRoom());
}
return emptyRooms;
}
} // namespace
} // namespace

View File

@@ -44,6 +44,8 @@ namespace BlackMisc
*/
static void registerMetadata();
//! Frequently needed for voice room resolutions
static const CVoiceRoomList &twoEmptyRooms();
};
} //namespace