mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-22 21:53:03 +03:00
fix(app): do not register protocol handlers on startup
This commit is contained in:
parent
1eb6548ed2
commit
a0fdca7ea6
@ -205,17 +205,18 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
const static QHash<QString, QString> protocols = {
|
const static QHash<QString, QString> protocols = {
|
||||||
{QStringLiteral("dash"), QStringLiteral("Dash Protocol")},
|
{QStringLiteral("dash"), QStringLiteral("URL:Dash Protocol (Zeal)")},
|
||||||
{QStringLiteral("dash-plugin"), QStringLiteral("Dash Plugin Protocol")}
|
{QStringLiteral("dash-plugin"), QStringLiteral("URL:Dash Plugin Protocol (Zeal)")}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (clParams.registerProtocolHandlers) {
|
||||||
|
registerProtocolHandlers(protocols, clParams.registerProtocolHandlers);
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (clParams.unregisterProtocolHandlers) {
|
if (clParams.unregisterProtocolHandlers) {
|
||||||
unregisterProtocolHandlers(protocols);
|
unregisterProtocolHandlers(protocols);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
} else {
|
|
||||||
registerProtocolHandlers(protocols, clParams.registerProtocolHandlers);
|
|
||||||
if (clParams.registerProtocolHandlers)
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user