diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2021-02-12 18:09:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 18:09:15 +0100 |
| commit | 607fafa364a1f3935b289172e3291eafed13014b (patch) | |
| tree | a4695ea1507a8c25fada52617ff4e2b7d58e9ae3 /src/commandline.cpp | |
| parent | 7dc28b10d9ed4cd4af15eeaca89b50996d6fd27d (diff) | |
| parent | 48274f33579076711c0475e84c7adf68c52df733 (diff) | |
Merge pull request #1408 from isanae/portable-shortcuts
Fixes for portable shortcuts
Diffstat (limited to 'src/commandline.cpp')
| -rw-r--r-- | src/commandline.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/commandline.cpp b/src/commandline.cpp index 22755dda..f64ff7cb 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -251,7 +251,7 @@ std::optional<int> CommandLine::runPostApplication(MOApplication& a) env::Console c; if (auto i=InstanceManager::singleton().currentInstance()) { - std::cout << i->name().toStdString() << "\n"; + std::cout << i->displayName().toStdString() << "\n"; } else { std::cout << "no instance configured\n"; } @@ -289,9 +289,8 @@ std::optional<int> CommandLine::runPostOrganizer(OrganizerCore& core) return 0; } - catch (const std::exception &e) { - reportError( - QObject::tr("failed to start shortcut: %1").arg(e.what())); + catch (std::exception&) { + // user was already warned return 1; } } @@ -451,7 +450,7 @@ std::optional<QString> CommandLine::instance() const // note that moshortcut:// overrides -i if (m_shortcut.isValid() && m_shortcut.hasInstance()) { - return m_shortcut.instance(); + return m_shortcut.instanceName(); } else if (m_vm.count("instance")) { return QString::fromStdString(m_vm["instance"].as<std::string>()); } @@ -817,7 +816,7 @@ std::optional<int> RunCommand::runPostOrganizer(OrganizerCore& core) reportError( QObject::tr("Executable '%1' not found in instance '%2'.") .arg(program) - .arg(InstanceManager::singleton().currentInstance()->name())); + .arg(InstanceManager::singleton().currentInstance()->displayName())); return 1; } |
