summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/peakcan
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2016-07-31 09:40:57 +0200
committerAndré Hartmann <aha_1980@gmx.de>2016-08-01 09:33:51 +0000
commitf22af5d595749041e353b9248208ca93355e901c (patch)
treeeb3f5dd79d227c425a38a00033f712dcac6324fe /src/plugins/canbus/peakcan
parent36b24743ccecd56b132cd81f05842943ff716943 (diff)
CAN: Better error messages when loading dynamic libraries
Make use of the detailed (and localized) error messages that QLibrary already provides. Example: Cannot load library pcanbasic: \ (pcanbasic: cannot open shared object file: No such file or directory) Change-Id: I3f4fd42d1872a00f2c4ecc6172ccc17995c7888e Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/peakcan')
-rw-r--r--src/plugins/canbus/peakcan/peakcanbackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/canbus/peakcan/peakcanbackend.cpp b/src/plugins/canbus/peakcan/peakcanbackend.cpp
index 7e954c2..3b06ede 100644
--- a/src/plugins/canbus/peakcan/peakcanbackend.cpp
+++ b/src/plugins/canbus/peakcan/peakcanbackend.cpp
@@ -65,7 +65,7 @@ bool PeakCanBackend::canCreate(QString *errorReason)
#else
static bool symbolsResolved = resolveSymbols(pcanLibrary());
if (!symbolsResolved) {
- *errorReason = tr("The PCAN runtime library is not found");
+ *errorReason = pcanLibrary()->errorString();
return false;
}
return true;