Commit 3fa0375b authored by Julien Bonjean's avatar Julien Bonjean

[#3376] Fixed compilation errors whith shortcuts

parent 4a9d8b81
......@@ -727,17 +727,7 @@ std::vector<std::string> ConfigurationManager::getAllIpInterfaceByName(void) {
std::map<std::string, std::string> ConfigurationManager::getShortcuts() {
std::map<std::string, std::string> shortcutsMap;
for (int i = 0; i < (int)shortcutsKeys.size(); i++) {
std::string key = shortcutsKeys.at(i);
std::string shortcut = Manager::instance().getConfigString("Shortcuts", key);
shortcutsMap.insert(std::pair<std::string, std::string>(key, shortcut));
}
return Manager::instance().shortcutPreferences.getShortcuts();
return shortcutsMap;
}
void ConfigurationManager::setShortcuts(
......
......@@ -444,17 +444,16 @@ ShortcutPreferences::ShortcutPreferences() : _hangup("")
ShortcutPreferences::~ShortcutPreferences() {}
std::map<std::string, int> ShortcutPreferences::getShortcuts()
std::map<std::string, std::string> ShortcutPreferences::getShortcuts()
{
std::map<std::string, int> shortcutsMap;
int shortcut;
std::map<std::string, std::string> shortcutsMap;
shortcutsMap.insert(std::pair<std::string, int>(hangupShortKey, atoi(_hangup.data())));
shortcutsMap.insert(std::pair<std::string, int>(pickupShortKey, atoi(_pickup.data())));
shortcutsMap.insert(std::pair<std::string, int>(popupShortKey, atoi(_popup.data())));
shortcutsMap.insert(std::pair<std::string, int>(toggleHoldShortKey, atoi(_toggleHold.data())));
shortcutsMap.insert(std::pair<std::string, int>(togglePickupHangupShortKey, atoi(_togglePickupHangup.data())));
shortcutsMap.insert(std::pair<std::string, std::string>(hangupShortKey, _hangup.data()));
shortcutsMap.insert(std::pair<std::string, std::string>(pickupShortKey, _pickup.data()));
shortcutsMap.insert(std::pair<std::string, std::string>(popupShortKey, _popup.data()));
shortcutsMap.insert(std::pair<std::string, std::string>(toggleHoldShortKey, _toggleHold.data()));
shortcutsMap.insert(std::pair<std::string, std::string>(togglePickupHangupShortKey, _togglePickupHangup.data()));
return shortcutsMap;
}
......
......@@ -375,7 +375,7 @@ class ShortcutPreferences : public Serializable {
virtual void unserialize(Conf::MappingNode *map);
std::map<std::string, int> getShortcuts(void);
std::map<std::string, std::string> getShortcuts(void);
void setShortcuts(std::map<std::string, int> shortcut);
std::string getHangup(void) { return _hangup; }
......
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