| 245 | } |
| 246 | |
| 247 | int hotkey_t::readConfig(void) |
| 248 | { |
| 249 | std::string keyText; |
| 250 | std::string prefix = "SDL.Hotkeys."; |
| 251 | |
| 252 | g_config->getOption(prefix + configName, &keyText); |
| 253 | |
| 254 | //printf("Config: '%s' = '%s'\n", configName, keyText.c_str() ); |
| 255 | keySeq = QKeySequence( QString::fromStdString(keyText) ); |
| 256 | |
| 257 | if (shortcut) |
| 258 | { |
| 259 | shortcut->setKey(QString::fromStdString(keyText)); |
| 260 | |
| 261 | //printf("ShortCut: '%s' = '%s'\n", configName, shortcut->key().toString().toStdString().c_str() ); |
| 262 | |
| 263 | if (act) |
| 264 | { |
| 265 | act->setText(actText + "\t" + shortcut->key().toString()); |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | conv2SDL(); |
| 270 | return 0; |
| 271 | } |
| 272 | |
| 273 | void hotkey_t::conv2SDL(void) |
| 274 | { |
no test coverage detected