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/moapplication.cpp | |
| parent | 7dc28b10d9ed4cd4af15eeaca89b50996d6fd27d (diff) | |
| parent | 48274f33579076711c0475e84c7adf68c52df733 (diff) | |
Merge pull request #1408 from isanae/portable-shortcuts
Fixes for portable shortcuts
Diffstat (limited to 'src/moapplication.cpp')
| -rw-r--r-- | src/moapplication.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/moapplication.cpp b/src/moapplication.cpp index 6d21745e..11053e66 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -392,10 +392,14 @@ void MOApplication::externalMessage(const QString& message) if (moshortcut.isValid()) {
if(moshortcut.hasExecutable()) {
- m_core->processRunner()
- .setFromShortcut(moshortcut)
- .setWaitForCompletion(ProcessRunner::TriggerRefresh)
- .run();
+ try {
+ m_core->processRunner()
+ .setFromShortcut(moshortcut)
+ .setWaitForCompletion(ProcessRunner::TriggerRefresh)
+ .run();
+ } catch(std::exception&) {
+ // user was already warned
+ }
}
} else if (isNxmLink(message)) {
MessageDialog::showMessage(tr("Download started"), qApp->activeWindow(), false);
@@ -414,11 +418,11 @@ void MOApplication::externalMessage(const QString& message) if (auto i=cl.instance()) {
const auto ci = InstanceManager::singleton().currentInstance();
- if (*i != ci->name()) {
+ if (*i != ci->displayName()) {
reportError(tr(
"This shortcut or command line is for instance '%1', but the current "
"instance is '%2'.")
- .arg(*i).arg(ci->name()));
+ .arg(*i).arg(ci->displayName()));
return;
}
|
