Commit 0fc98240 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Remove characters from UUID that aren't legal in URLs

parent 3ce487a1
......@@ -22,8 +22,10 @@
#define KDECONNECT_DBUSHELPER_H
#include <QString>
#include "kdeconnectcore_export.h"
namespace DbusHelper {
void filterNonExportableCharacters(QString& s);
void KDECONNECTCORE_EXPORT filterNonExportableCharacters(QString& s);
}
#endif
......@@ -15,6 +15,7 @@ set( kdeconnect_runcommand_config_SRCS runcommand_config.cpp )
add_library(kdeconnect_runcommand_config MODULE ${kdeconnect_runcommand_config_SRCS} )
target_link_libraries( kdeconnect_runcommand_config
kdeconnectcore
kdeconnectpluginkcm
KF5::I18n
KF5::CoreAddons
......
......@@ -20,7 +20,6 @@
#include "runcommand_config.h"
#include <QStandardPaths>
#include <QTableView>
#include <QHBoxLayout>
#include <QHeaderView>
......@@ -32,9 +31,10 @@
#include <QJsonDocument>
#include <KLocalizedString>
#include <KPluginFactory>
#include <core/dbushelper.h>
K_PLUGIN_FACTORY(ShareConfigFactory, registerPlugin<RunCommandConfig>();)
......@@ -128,6 +128,7 @@ void RunCommandConfig::save()
if (key.isEmpty()) {
key = QUuid::createUuid().toString();
DbusHelper::filterNonExportableCharacters(key);
}
QJsonObject entry;
entry[QStringLiteral("name")] = name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment