Fix warnings

Reviewers: #frameworks

Subscribers: ahmadsamir, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28088
This commit is contained in:
Aleix Pol 2020-03-17 02:25:30 +01:00
parent 359ac6bcc0
commit 298ce0ed7f
3 changed files with 3 additions and 5 deletions

View File

@ -133,10 +133,10 @@ QString ContainmentActions::eventToString(QEvent *event)
}
case QEvent::Wheel: {
QWheelEvent *e = static_cast<QWheelEvent *>(event);
int o = QObject::staticQtMetaObject.indexOfEnumerator("Orientations");
QMetaEnum orient = QObject::staticQtMetaObject.enumerator(o);
trigger = QStringLiteral("wheel:");
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const int o = QObject::staticQtMetaObject.indexOfEnumerator("Orientations");
QMetaEnum orient = QObject::staticQtMetaObject.enumerator(o);
trigger += QString::fromLatin1(orient.valueToKey(e->orientation()));
#else
// ContainmentInterface::wheelEvent uses angleDelta.y()

View File

@ -161,7 +161,7 @@ void StorageThread::save(QPointer<StorageJob> wcaller, const QVariantMap &params
QString field;
bool binary = false;
switch (QMetaType::Type(it.value().type())) {
switch (it.value().type()) {
case QVariant::String:
field = QStringLiteral(":txt");
break;
@ -169,7 +169,6 @@ void StorageThread::save(QPointer<StorageJob> wcaller, const QVariantMap &params
field = QStringLiteral(":int");
break;
case QVariant::Double:
case QMetaType::Float:
field = QStringLiteral(":float");
break;
case QVariant::ByteArray:

View File

@ -56,7 +56,6 @@ public:
private:
QPoint m_dropPoint;
QMenu *m_menu = nullptr;
QJSValue *m_dropCallback = nullptr;
KIO::DropJob *m_dropJob = nullptr;
QList<QAction *> m_dropActions = QList<QAction *>();
QList<QUrl> m_urls = QList<QUrl>();