Remove characters from UUID that aren't legal in URLs
This commit is contained in:
parent
316387ad00
commit
76ea0dd12d
3 changed files with 7 additions and 3 deletions
|
@ -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>();)
|
||||
|
||||
|
||||
|
@ -132,6 +132,7 @@ void RunCommandConfig::save()
|
|||
|
||||
if (key.isEmpty()) {
|
||||
key = QUuid::createUuid().toString();
|
||||
DbusHelper::filterNonExportableCharacters(key);
|
||||
}
|
||||
QJsonObject entry;
|
||||
entry[QStringLiteral("name")] = name;
|
||||
|
|
Loading…
Reference in a new issue