| 397 | } |
| 398 | |
| 399 | std::optional<QString> CommandLine::instance() const |
| 400 | { |
| 401 | // note that moshortcut:// overrides -i |
| 402 | |
| 403 | if (m_shortcut.isValid() && m_shortcut.hasInstance()) { |
| 404 | return m_shortcut.instanceName(); |
| 405 | } else if (m_vm.count("instance")) { |
| 406 | return QString::fromStdString(m_vm["instance"].as<std::string>()); |
| 407 | } |
| 408 | |
| 409 | return {}; |
| 410 | } |
| 411 | |
| 412 | const MOShortcut& CommandLine::shortcut() const |
| 413 | { |
no test coverage detected