Fix variable scope

This commit is contained in:
Aleix Pol 2015-09-11 12:22:35 +02:00
parent c62fac0bcf
commit 67c5a2b5f1

View file

@ -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");