CashAgent: changed name: CAmaster
This commit is contained in:
parent
1f0720e52b
commit
59432735d0
@ -7,6 +7,7 @@
|
||||
|
||||
#include <QPluginLoader>
|
||||
#include <QDateTime>
|
||||
#include <QFileInfo>
|
||||
|
||||
|
||||
ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject(parent),
|
||||
@ -477,7 +478,26 @@ void ATBDeviceControllerPlugin::onCashPayStoped()
|
||||
bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName)
|
||||
{
|
||||
if (pluginName == "") {
|
||||
pluginName = "/usr/lib/libCashAgentLib.so";
|
||||
|
||||
// search list for plugin (.so) file:
|
||||
QStringList pluginNameList;
|
||||
pluginNameList << "/usr/lib/libCAmaster.so"
|
||||
<< "/usr/lib/libCashAgentLib.so";
|
||||
// using C++11 range based loop:
|
||||
for (const auto& filename : pluginNameList) {
|
||||
if (QFileInfo(filename).isReadable()) {
|
||||
pluginName = filename;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginName == "") {
|
||||
qCritical() << "ATBDeviceControllerPlugin: CashAgentLib not installed!";
|
||||
this->errorCode = "CashAgentLib::NOT_FOUND";
|
||||
this->errorDescription = "ERROR: no CashAgentLib: ";
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!QLibrary::isLibrary(pluginName)) {
|
||||
|
Loading…
Reference in New Issue
Block a user