summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/encoderexe.cpp2
-rw-r--r--rbutil/rbutilqt/base/system.cpp6
-rw-r--r--rbutil/rbutilqt/base/system.h3
-rw-r--r--rbutil/rbutilqt/base/utils.cpp2
-rw-r--r--rbutil/rbutilqt/configure.cpp4
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp2
-rw-r--r--rbutil/rbutilqt/sysinfo.cpp2
7 files changed, 11 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/base/encoderexe.cpp b/rbutil/rbutilqt/base/encoderexe.cpp
index f56cf368eb..81315691e5 100644
--- a/rbutil/rbutilqt/base/encoderexe.cpp
+++ b/rbutil/rbutilqt/base/encoderexe.cpp
@@ -78,7 +78,7 @@ bool EncoderExe::encode(QString input,QString output)
78 execstring.replace("%output",output); 78 execstring.replace("%output",output);
79 LOG_INFO() << "cmd: " << execstring; 79 LOG_INFO() << "cmd: " << execstring;
80 int result = QProcess::execute(execstring); 80 int result = QProcess::execute(execstring);
81 return (result == 0) ? true : false; 81 return result == 0;
82} 82}
83 83
84 84
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index c33a172eeb..73f5024fa2 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -235,9 +235,9 @@ QList<uint32_t> System::listUsbIds(void)
235/** @brief detect devices based on usb pid / vid. 235/** @brief detect devices based on usb pid / vid.
236 * @return list with usb VID / PID values. 236 * @return list with usb VID / PID values.
237 */ 237 */
238QMap<uint32_t, QString> System::listUsbDevices(void) 238QMultiMap<uint32_t, QString> System::listUsbDevices(void)
239{ 239{
240 QMap<uint32_t, QString> usbids; 240 QMultiMap<uint32_t, QString> usbids;
241 // usb pid detection 241 // usb pid detection
242 LOG_INFO() << "Searching for USB devices"; 242 LOG_INFO() << "Searching for USB devices";
243#if defined(Q_OS_LINUX) 243#if defined(Q_OS_LINUX)
@@ -272,7 +272,7 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
272 if(name.isEmpty()) 272 if(name.isEmpty())
273 name = tr("(no description available)"); 273 name = tr("(no description available)");
274 if(id) { 274 if(id) {
275 usbids.insertMulti(id, name); 275 usbids.insert(id, name);
276 LOG_INFO("USB: 0x%08x, %s", id, name.toLocal8Bit().data()); 276 LOG_INFO("USB: 0x%08x, %s", id, name.toLocal8Bit().data());
277 } 277 }
278 } 278 }
diff --git a/rbutil/rbutilqt/base/system.h b/rbutil/rbutilqt/base/system.h
index 1d2deef170..61f0a6f1a9 100644
--- a/rbutil/rbutilqt/base/system.h
+++ b/rbutil/rbutilqt/base/system.h
@@ -26,6 +26,7 @@
26 26
27#include <inttypes.h> 27#include <inttypes.h>
28 28
29#include <QMultiMap>
29#include <QString> 30#include <QString>
30#include <QUrl> 31#include <QUrl>
31 32
@@ -43,7 +44,7 @@ public:
43 static QString userName(void); 44 static QString userName(void);
44 static QString osVersionString(void); 45 static QString osVersionString(void);
45 static QList<uint32_t> listUsbIds(void); 46 static QList<uint32_t> listUsbIds(void);
46 static QMap<uint32_t, QString> listUsbDevices(void); 47 static QMultiMap<uint32_t, QString> listUsbDevices(void);
47 48
48 static QUrl systemProxy(void); 49 static QUrl systemProxy(void);
49 50
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index 1f855beea7..e185effe2b 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -23,7 +23,7 @@
23#include "systeminfo.h" 23#include "systeminfo.h"
24#include "Logger.h" 24#include "Logger.h"
25 25
26#ifdef UNICODE 26#if !defined(_UNICODE)
27#define _UNICODE 27#define _UNICODE
28#endif 28#endif
29 29
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index cc8b0ff976..ab0281774d 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -350,12 +350,12 @@ void Config::setDevices()
350 else 350 else
351 platformList = SystemInfo::platforms(SystemInfo::PlatformAll); 351 platformList = SystemInfo::platforms(SystemInfo::PlatformAll);
352 352
353 QMap <QString, QString> manuf; 353 QMultiMap <QString, QString> manuf;
354 for(int it = 0; it < platformList.size(); it++) 354 for(int it = 0; it < platformList.size(); it++)
355 { 355 {
356 QString curbrand = SystemInfo::platformValue(platformList.at(it), 356 QString curbrand = SystemInfo::platformValue(platformList.at(it),
357 SystemInfo::CurBrand).toString(); 357 SystemInfo::CurBrand).toString();
358 manuf.insertMulti(curbrand, platformList.at(it)); 358 manuf.insert(curbrand, platformList.at(it));
359 } 359 }
360 360
361 // set up devices table 361 // set up devices table
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 8f4ee582d5..5a39e8ab9a 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -55,7 +55,7 @@
55#include <stdio.h> 55#include <stdio.h>
56#endif 56#endif
57#if defined(Q_OS_WIN32) 57#if defined(Q_OS_WIN32)
58#if defined(UNICODE) 58#if !defined(_UNICODE)
59#define _UNICODE 59#define _UNICODE
60#endif 60#endif
61#include <stdio.h> 61#include <stdio.h>
diff --git a/rbutil/rbutilqt/sysinfo.cpp b/rbutil/rbutilqt/sysinfo.cpp
index 0bb5465240..75ade2438f 100644
--- a/rbutil/rbutilqt/sysinfo.cpp
+++ b/rbutil/rbutilqt/sysinfo.cpp
@@ -48,7 +48,7 @@ QString Sysinfo::getInfo(Sysinfo::InfoType type)
48 info += tr("<b>Permissions</b><br/>%1<hr/>").arg(System::userPermissionsString()); 48 info += tr("<b>Permissions</b><br/>%1<hr/>").arg(System::userPermissionsString());
49#endif 49#endif
50 info += tr("<b>Attached USB devices</b><br/>"); 50 info += tr("<b>Attached USB devices</b><br/>");
51 QMap<uint32_t, QString> usbids = System::listUsbDevices(); 51 QMultiMap<uint32_t, QString> usbids = System::listUsbDevices();
52 QList<uint32_t> usbkeys = usbids.keys(); 52 QList<uint32_t> usbkeys = usbids.keys();
53 for(int i = 0; i < usbkeys.size(); i++) { 53 for(int i = 0; i < usbkeys.size(); i++) {
54 info += tr("VID: %1 PID: %2, %3") 54 info += tr("VID: %1 PID: %2, %3")