Remove check for Qt > 5.14 when minimum is 5.15

This commit is contained in:
Albert Vaca Cintora 2023-07-20 18:23:45 +02:00
parent 8c97e56f23
commit 382ace9c69
2 changed files with 1 additions and 8 deletions

View file

@ -23,12 +23,9 @@ KdeConnectPlugin::KdeConnectPlugin(QObject *parent, const QVariantList &args)
d->m_device = qvariant_cast<Device *>(args.at(0)); d->m_device = qvariant_cast<Device *>(args.at(0));
d->m_pluginName = args.at(1).toString(); d->m_pluginName = args.at(1).toString();
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
const QStringList cap = args.at(2).toStringList(); const QStringList cap = args.at(2).toStringList();
d->m_outgoingCapabilties = QSet(cap.begin(), cap.end()); d->m_outgoingCapabilties = QSet(cap.begin(), cap.end());
#else
d->m_outgoingCapabilties = args.at(2).toStringList().toSet();
#endif
d->m_config = nullptr; d->m_config = nullptr;
d->iconName = args.at(3).toString(); d->iconName = args.at(3).toString();
} }

View file

@ -123,12 +123,8 @@ bool SftpPlugin::startBrowsing()
bool SftpPlugin::receivePacket(const NetworkPacket &np) bool SftpPlugin::receivePacket(const NetworkPacket &np)
{ {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const auto keys = np.body().keys().toSet();
#else
const QStringList keysList = np.body().keys(); const QStringList keysList = np.body().keys();
const auto keys = QSet(keysList.begin(), keysList.end()); const auto keys = QSet(keysList.begin(), keysList.end());
#endif
if (!(fields_c - keys).isEmpty() && !np.has(QStringLiteral("errorMessage"))) { if (!(fields_c - keys).isEmpty() && !np.has(QStringLiteral("errorMessage"))) {
// packet is invalid // packet is invalid
return false; return false;