summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/tinycan
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2016-07-31 09:59:34 +0200
committerAndré Hartmann <aha_1980@gmx.de>2016-08-31 18:55:02 +0000
commit5786ec4ac183fce74e66439b91497b8da86d7740 (patch)
tree0f04ad1a14ab6c9850aff5e6b7541d327aab89b8 /src/plugins/canbus/tinycan
parentfa54696446eaed03c2b84ca3e3c0c81ef5d42bea (diff)
CAN: Simplify debug error message generation
The warning is already shown in PeakCanBusPlugin::createDevice() and TinyCanBusPlugin::createDevice() so it does not need to be done here. Change-Id: Ifac34d9b96eff5920d09f3c971caeda62d97839a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/tinycan')
-rw-r--r--src/plugins/canbus/tinycan/tinycan_symbols_p.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/canbus/tinycan/tinycan_symbols_p.h b/src/plugins/canbus/tinycan/tinycan_symbols_p.h
index 5ad149c..6e05b92 100644
--- a/src/plugins/canbus/tinycan/tinycan_symbols_p.h
+++ b/src/plugins/canbus/tinycan/tinycan_symbols_p.h
@@ -285,7 +285,7 @@ typedef void (DRV_CALLBACK_TYPE *CanRxEventCallback)(
static fp_##symbolName symbolName;
#define RESOLVE_SYMBOL(symbolName) \
- symbolName = (fp_##symbolName)resolveSymbol(mhstcanLibrary, #symbolName); \
+ symbolName = (fp_##symbolName)mhstcanLibrary->resolve(#symbolName); \
if (!symbolName) \
return false;
@@ -317,23 +317,12 @@ GENERATE_SYMBOL_VARIABLE(void, CanSetRxEventCallback, CanRxEventCallback)
GENERATE_SYMBOL_VARIABLE(void, CanSetEvents, quint16)
GENERATE_SYMBOL_VARIABLE(quint32, CanEventStatus, void)
-inline QFunctionPointer resolveSymbol(QLibrary *mhstcanLibrary, const char *symbolName)
-{
- QFunctionPointer symbolFunctionPointer = mhstcanLibrary->resolve(symbolName);
- if (!symbolFunctionPointer)
- qWarning("Failed to resolve the mhstcan symbol: %s", symbolName);
-
- return symbolFunctionPointer;
-}
-
inline bool resolveSymbols(QLibrary *mhstcanLibrary)
{
if (!mhstcanLibrary->isLoaded()) {
mhstcanLibrary->setFileName(QStringLiteral("mhstcan"));
- if (!mhstcanLibrary->load()) {
- qWarning("Failed to load the library: %s", qPrintable(mhstcanLibrary->fileName()));
+ if (!mhstcanLibrary->load())
return false;
- }
}
RESOLVE_SYMBOL(CanInitDriver)