Skip to content

Commit

Permalink
Simplify creation of runner syntaxes
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Jul 16, 2022
1 parent 4d58cf3 commit 68e3107
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/runner/nordvpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
void NordVPN::init() {
setObjectName(QStringLiteral("NordVPN"));
setPriority(HighestPriority);
QList<Plasma::RunnerSyntax> syntaxes;
syntaxes.append(Plasma::RunnerSyntax("vpn us", "Connect option to United States, server is chosen by NordVPN"));
syntaxes.append(Plasma::RunnerSyntax("vpn us 3335", "Connect options to United States with server number 3335"));
syntaxes.append(Plasma::RunnerSyntax("vpn d", "Shows Disconnect option on top (just relevance changed)"));
syntaxes.append(Plasma::RunnerSyntax("vpn reconnect", "Reconnect to the current country and server. "
addSyntax(Plasma::RunnerSyntax("vpn us", "Connect option to United States, server is chosen by NordVPN"));
addSyntax(Plasma::RunnerSyntax("vpn us 3335", "Connect options to United States with server number 3335"));
addSyntax(Plasma::RunnerSyntax("vpn d", "Shows Disconnect option on top (just relevance changed)"));
addSyntax(Plasma::RunnerSyntax("vpn reconnect", "Reconnect to the current country and server. "
"Sometimes you have to do this if you change from a wireless to a wired connection"));
setSyntaxes(syntaxes);

// Fetch only the status data if the query matches
connect(&vpnStatus, &Status::finished, this, [this](){
Expand Down

0 comments on commit 68e3107

Please sign in to comment.