Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with qt6 #16

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adaptors/alsadaptor/alsadaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void ALSAdaptor::processSample(int pathId, int fd)
sensordLogW() << id() << "read(): " << strerror(errno);
return;
}
QVariant value(buffer);
QVariant value = QVariant::fromValue(QByteArray(buffer));
bool ok;
double fValue(value.toDouble(&ok));
if(!ok) {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisaccelerometer/hybrisaccelerometer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HEADERS += hybrisaccelerometeradaptor.h \

SOURCES += hybrisaccelerometeradaptor.cpp \
hybrisaccelerometeradaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisalsadaptor/hybrisalsadaptor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HEADERS += hybrisalsadaptor.h \

SOURCES += hybrisalsadaptor.cpp \
hybrisalsadaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrisgeorotationadaptor.h \
SOURCES += hybrisgeorotationadaptor.cpp \
hybrisgeorotationadaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisgyroscopeadaptor/hybrisgyroscopeadaptor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrisgyroscopeadaptor.h \
SOURCES += hybrisgyroscopeadaptor.cpp \
hybrisgyroscopeadaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrismagnetometeradaptor.h \
SOURCES += hybrismagnetometeradaptor.cpp \
hybrismagnetometeradaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrisorientationadaptor.h \
SOURCES += hybrisorientationadaptor.cpp \
hybrisorientationadaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrispressureadaptor/hybrispressureadaptor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HEADERS += hybrispressureadaptor.h \

SOURCES += hybrispressureadaptor.cpp \
hybrispressureadaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisproximityadaptor/hybrisproximityadaptor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrisproximityadaptor.h \
SOURCES += hybrisproximityadaptor.cpp \
hybrisproximityadaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/hybrisrotationadaptor/hybrisrotationadaptor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HEADERS += hybrisrotationadaptor.h \
SOURCES += hybrisrotationadaptor.cpp \
hybrisrotationadaptorplugin.cpp

LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HEADERS += hybrisstepcounteradaptor.h \

SOURCES += hybrisstepcounteradaptor.cpp \
hybrisstepcounteradaptorplugin.cpp
LIBS+= -L../../core -lhybrissensorfw-qt5
LIBS+= -L../../core -lhybrissensorfw-qt$${QT_MAJOR_VERSION}

include( ../adaptor-config.pri )
config_hybris {
Expand Down
2 changes: 1 addition & 1 deletion adaptors/iioadaptor/iioadaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void IioAdaptor::setup()

iioDevice.channelTypeName = "proximity";
devNodeNumber = findSensor(inputMatch);
proximityThreshold = SensorFrameworkConfig::configuration()->value<QString>(name + "/threshold", QString(PROXIMITY_DEFAULT_THRESHOLD)).toInt();
proximityThreshold = SensorFrameworkConfig::configuration()->value<QString>(name + "/threshold", QString("%1").arg(PROXIMITY_DEFAULT_THRESHOLD)).toInt();
if (devNodeNumber!= -1) {
QString desc = "Industrial I/O proximity sensor (" + iioDevice.name +")";
qDebug() << id() << desc;
Expand Down
4 changes: 4 additions & 0 deletions chains/accelerometerchain/accelerometerchainplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ void AccelerometerChainPlugin::Register(class Loader&)
}

QStringList AccelerometerChainPlugin::Dependencies() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("coordinatealignfilter:accelerometeradaptor").split(":", Qt::SkipEmptyParts);
#else
return QString("coordinatealignfilter:accelerometeradaptor").split(":", QString::SkipEmptyParts);
#endif
}
8 changes: 8 additions & 0 deletions chains/compasschain/compasschainplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ void CompassChainPlugin::Register(class Loader&)
QStringList CompassChainPlugin::Dependencies() {
QByteArray orientationConfiguration = SensorFrameworkConfig::configuration()->value("plugins/orientationadaptor").toByteArray();
if (orientationConfiguration.isEmpty()) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("accelerometerchain:magcalibrationchain:declinationfilter:downsamplefilter:avgaccfilter").split(":", Qt::SkipEmptyParts);
#else
return QString("accelerometerchain:magcalibrationchain:declinationfilter:downsamplefilter:avgaccfilter").split(":", QString::SkipEmptyParts);
#endif
} else {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("accelerometerchain:magcalibrationchain:declinationfilter:downsamplefilter:avgaccfilter:orientationadaptor").split(":", Qt::SkipEmptyParts);
#else
return QString("accelerometerchain:magcalibrationchain:declinationfilter:downsamplefilter:avgaccfilter:orientationadaptor").split(":", QString::SkipEmptyParts);
#endif
}
}
4 changes: 4 additions & 0 deletions chains/magcalibrationchain/magcalibrationchainplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ void MagCalibrationChainPlugin::Register(class Loader&)
}

QStringList MagCalibrationChainPlugin::Dependencies() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("magcoordinatealignfilter:magnetometeradaptor").split(":", Qt::SkipEmptyParts);
#else
return QString("magcoordinatealignfilter:magnetometeradaptor").split(":", QString::SkipEmptyParts);
#endif
}
4 changes: 4 additions & 0 deletions chains/orientationchain/orientationchainplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ void OrientationChainPlugin::Register(class Loader&)
}

QStringList OrientationChainPlugin::Dependencies() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("orientationinterpreter:accelerometerchain").split(":", Qt::SkipEmptyParts);
#else
return QString("orientationinterpreter:accelerometerchain").split(":", QString::SkipEmptyParts);
#endif
}
2 changes: 1 addition & 1 deletion common-config.pri
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ profile-libc {
QMAKE_LFLAGS += -lc_p
}

TARGET = $$TARGET-qt5
TARGET = $$TARGET-qt$${QT_MAJOR_VERSION}

OTHER_FILES += \
../../common.pri
Expand Down
4 changes: 2 additions & 2 deletions common-install.pri
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
QT -= gui

# Path for headers - remember to add files if they should be installed
publicheaders.path = /usr/include/sensord-qt5
PLUGINPATH = $$[QT_INSTALL_LIBS]/sensord-qt5
publicheaders.path = /usr/include/sensord-qt$${QT_MAJOR_VERSION}
PLUGINPATH = $$[QT_INSTALL_LIBS]/sensord-qt$${QT_MAJOR_VERSION}

# Path for shared libraries
SHAREDLIBPATH = $$[QT_INSTALL_LIBS]
Expand Down
2 changes: 1 addition & 1 deletion common.pri
Original file line number Diff line number Diff line change
@@ -1 +1 @@
QMAKE_LIBDIR_FLAGS += -lsensordatatypes-qt5 -lsensorfw-qt5
QMAKE_LIBDIR_FLAGS += -lsensordatatypes-qt$${QT_MAJOR_VERSION} -lsensorfw-qt$${QT_MAJOR_VERSION}
6 changes: 3 additions & 3 deletions core/core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ SENSORFW_INCLUDEPATHS = .. \
DEPENDPATH += $$SENSORFW_INCLUDEPATHS
INCLUDEPATH += $$SENSORFW_INCLUDEPATHS

DEFINES += PLUGIN_DIRECTORY=\"\\\"$$[QT_INSTALL_LIBS]/sensord-qt5\\\"\"
DEFINES += PLUGIN_DIRECTORY=\"\\\"$$[QT_INSTALL_LIBS]/sensord-qt$${QT_MAJOR_VERSION}\\\"\"

QMAKE_LIBDIR_FLAGS += -L../datatypes\
-lsensordatatypes-qt5
-lsensordatatypes-qt$${QT_MAJOR_VERSION}

SOURCES += sensormanager.cpp \
sensormanager_a.cpp \
Expand Down Expand Up @@ -85,7 +85,7 @@ lunaservice {
SOURCES += lsclient.cpp
HEADERS += lsclient.h
DEFINES += SENSORFW_LUNA_SERVICE_CLIENT
PKGCONFIG += Qt5Gui json-c
PKGCONFIG += Qt$${QT_MAJOR_VERSION}Gui json-c
PKGCONFIG += luna-service2 LunaSysMgrCommon LunaSysMgrIpcMessages
}

Expand Down
2 changes: 1 addition & 1 deletion core/hybris.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ INCLUDEPATH += $$SENSORFW_INCLUDEPATHS

SOURCES += hybrisadaptor.cpp
HEADERS += hybrisadaptor.h
LIBS += -L$$[QT_INSTALL_LIBS] -L../datatypes -lsensordatatypes-qt5 -L. -lsensorfw-qt5
LIBS += -L$$[QT_INSTALL_LIBS] -L../datatypes -lsensordatatypes-qt$${QT_MAJOR_VERSION} -L. -lsensorfw-qt$${QT_MAJOR_VERSION}

CONFIG += link_pkgconfig

Expand Down
4 changes: 4 additions & 0 deletions core/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ Loader& Loader::instance()

#define PLUGIN_PREFIX_ENV "SENSORFW_LIBRARY_PATH"
#define PLUGIN_PREFIX "lib"
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#define PLUGIN_SUFFIX "-qt6.so"
#else
#define PLUGIN_SUFFIX "-qt5.so"
#endif
#define SENSOR_SUFFIX "sensor"

static QString getPluginDirectory()
Expand Down
4 changes: 4 additions & 0 deletions core/nodebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ bool NodeBase::hasLocalRange() const
DataRangeList NodeBase::parseDataRangeList(const QString& input, int defaultResolution) const
{
DataRangeList list;
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
foreach(const QString& fragment, input.split(",", Qt::SkipEmptyParts))
#else
foreach(const QString& fragment, input.split(",", QString::SkipEmptyParts))
#endif
{
QStringList pair(fragment.split("=>"));
QStringList pair2(fragment.split(":"));
Expand Down
2 changes: 1 addition & 1 deletion doc/doc.pri
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for( folder, DOC_FOLDERS ) {
QMAKE_EXTRA_TARGETS += doccleantarget

# Documentation install target
documentation.path = /usr/share/doc/sensord-qt5
documentation.path = /usr/share/doc/sensord-qt$${QT_MAJOR_VERSION}
documentation.files = doc/html
documentation.depends = docs

Expand Down
4 changes: 4 additions & 0 deletions examples/chainplugin/samplechainplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ void SampleChainPlugin::Register(class Loader&)
//
// Here we have one adaptor and one filter that we need.
QStringList SampleChainPlugin::Dependencies() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("sampleadaptor:samplefilter").split(":", Qt::SkipEmptyParts);
#else
return QString("sampleadaptor:samplefilter").split(":", QString::SkipEmptyParts);
#endif
}
1 change: 1 addition & 0 deletions examples/filterplugin/samplefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#ifndef SAMPLEFILTER_H
#define SAMPLEFILTER_H

#include <QObject>
// Include base
#include "filter.h"

Expand Down
4 changes: 4 additions & 0 deletions examples/sensorplugin/sampleplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ void SamplePlugin::Register(class Loader&)
// dependency here. We can rely on it to provide further dependencies to
// any plugins it may need.
QStringList SamplePlugin::Dependencies() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return QString("samplechain").split(":", Qt::SkipEmptyParts);
#else
return QString("samplechain").split(":", QString::SkipEmptyParts);
#endif
}
23 changes: 11 additions & 12 deletions qt-api/abstractsensor_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ QDBusReply<void> AbstractSensorChannelInterface::start(int sessionId)
connect(pimpl_->m_socketReader.socket(), SIGNAL(readyRead()), this, SLOT(dataReceived()));

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId);
argumentList << QVariant::fromValue(sessionId);

QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("start"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
Expand Down Expand Up @@ -177,8 +177,7 @@ QDBusReply<void> AbstractSensorChannelInterface::stop(int sessionId)
disconnect(pimpl_->m_socketReader.socket(), SIGNAL(readyRead()), this, SLOT(dataReceived()));

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId);

argumentList << QVariant::fromValue(sessionId);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("stop"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand All @@ -202,7 +201,7 @@ QDBusReply<void> AbstractSensorChannelInterface::setInterval(int sessionId, int
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(interval_ms);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(interval_ms);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setInterval"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand All @@ -226,7 +225,7 @@ QDBusReply<void> AbstractSensorChannelInterface::setDataRate(int sessionId, doub
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(dataRate_Hz);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(dataRate_Hz);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setDataRate"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand All @@ -250,7 +249,7 @@ QDBusReply<void> AbstractSensorChannelInterface::setBufferInterval(int sessionId
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(interval_ms);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(interval_ms);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setBufferInterval"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand All @@ -275,7 +274,7 @@ QDBusReply<void> AbstractSensorChannelInterface::setBufferSize(int sessionId, un
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(value);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(value);

QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setBufferSize"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
Expand All @@ -300,7 +299,7 @@ QDBusReply<bool> AbstractSensorChannelInterface::setStandbyOverride(int sessionI
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(value);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(value);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setStandbyOverride"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand Down Expand Up @@ -332,13 +331,13 @@ DataRange AbstractSensorChannelInterface::getCurrentDataRange()
void AbstractSensorChannelInterface::requestDataRange(DataRange range)
{
clearError();
call(QDBus::NoBlock, QLatin1String("requestDataRange"), qVariantFromValue(pimpl_->m_sessionId), qVariantFromValue(range));
call(QDBus::NoBlock, QLatin1String("requestDataRange"), QVariant::fromValue(pimpl_->m_sessionId), QVariant::fromValue(range));
}

void AbstractSensorChannelInterface::removeDataRangeRequest()
{
clearError();
call(QDBus::NoBlock, QLatin1String("removeDataRangeRequest"), qVariantFromValue(pimpl_->m_sessionId));
call(QDBus::NoBlock, QLatin1String("removeDataRangeRequest"), QVariant::fromValue(pimpl_->m_sessionId));
}

DataRangeList AbstractSensorChannelInterface::getAvailableIntervals()
Expand Down Expand Up @@ -499,7 +498,7 @@ bool AbstractSensorChannelInterface::setDataRangeIndex(int dataRangeIndex)
{
clearError();
QList<QVariant> argumentList;
argumentList << qVariantFromValue(pimpl_->m_sessionId) << qVariantFromValue(dataRangeIndex);
argumentList << QVariant::fromValue(pimpl_->m_sessionId) << QVariant::fromValue(dataRangeIndex);

QDBusPendingReply <bool> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setDataRangeIndex"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
Expand Down Expand Up @@ -564,7 +563,7 @@ QDBusReply<void> AbstractSensorChannelInterface::setDownsampling(int sessionId,
clearError();

QList<QVariant> argumentList;
argumentList << qVariantFromValue(sessionId) << qVariantFromValue(value);
argumentList << QVariant::fromValue(sessionId) << QVariant::fromValue(value);
QDBusPendingReply <void> returnValue = pimpl_->asyncCallWithArgumentList(QLatin1String("setDownsampling"), argumentList);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(returnValue, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
Expand Down
2 changes: 1 addition & 1 deletion qt-api/abstractsensor_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ T AbstractSensorChannelInterface::getAccessor(const char* name)
template<typename T>
void AbstractSensorChannelInterface::setAccessor(const char* name, const T& value)
{
QDBusReply<void> reply(call(QDBus::NoBlock, QLatin1String(name), qVariantFromValue(value)));
QDBusReply<void> reply(call(QDBus::NoBlock, QLatin1String(name), QVariant::fromValue(value)));
if(!reply.isValid())
{
qDebug() << "Failed to set '" << name << " = " << value << "' to sensord: " << reply.error().message();
Expand Down
2 changes: 1 addition & 1 deletion qt-api/qt-api.pro
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SENSORFW_INCLUDEPATHS = .. \
DEPENDPATH += $$SENSORFW_INCLUDEPATHS
INCLUDEPATH += $$SENSORFW_INCLUDEPATHS

QMAKE_LIBDIR_FLAGS += -L../datatypes -lsensordatatypes-qt5
QMAKE_LIBDIR_FLAGS += -L../datatypes -lsensordatatypes-qt$${QT_MAJOR_VERSION}

include(../common-install.pri)
publicheaders.files = $$HEADERS
Expand Down
Loading