From 67c5a2b5f110fead5bc7f8f020752cd63771d328 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 11 Sep 2015 12:22:35 +0200 Subject: [PATCH] Fix variable scope --- cli/kdeconnect-cli.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp index 536c7549f..308675113 100644 --- a/cli/kdeconnect-cli.cpp +++ b/cli/kdeconnect-cli.cpp @@ -104,9 +104,8 @@ int main(int argc, char** argv) QTextStream(stderr) << i18n("No device specified") << endl; } device = parser.value("device"); - QUrl url; if(parser.isSet("share")) { - url = QUrl::fromUserInput(parser.value("share"), QDir::currentPath()); + QUrl url = QUrl::fromUserInput(parser.value("share"), QDir::currentPath()); parser.clearPositionalArguments(); if(!url.isEmpty() && !device.isEmpty()) { QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.kdeconnect", "/modules/kdeconnect/devices/"+device+"/share", "org.kde.kdeconnect.device.share", "shareUrl");