diff --git a/src/fileitemactionplugin/sharefileitemaction.cpp b/src/fileitemactionplugin/sharefileitemaction.cpp --- a/src/fileitemactionplugin/sharefileitemaction.cpp +++ b/src/fileitemactionplugin/sharefileitemaction.cpp @@ -51,7 +51,8 @@ m_menu->model()->setPluginType(QStringLiteral("Export")); QObject::connect(m_menu, &Purpose::Menu::finished, [](const QJsonObject &output, int error, const QString &errorMessage) { - if (error == 0) { + // error == 0 means no error, error == 1 means cancelled by the user + if (error <= 1) { if (output.contains(QLatin1String("url"))) QDesktopServices::openUrl(QUrl(output.value(QLatin1String("url")).toString())); } else { diff --git a/src/widgets/menu.h b/src/widgets/menu.h --- a/src/widgets/menu.h +++ b/src/widgets/menu.h @@ -50,7 +50,7 @@ * Emitted when a triggered job finishes * * @p output contains the information offered by the plugin. The information offered will depend on the plugin type. - * @p error will be 0 if the execution was successful, otherwise it will provide an error message + * @p error will be 0 if the execution was successful, 1 if cancelled by the user, otherwise it will provide an error message * @p errorMessage the error message * * @see Purpose::Job