From fc602c273698da7ba8fb22f8e05c518031011762 Mon Sep 17 00:00:00 2001 From: Cooper Werner Date: Sun, 15 Aug 2021 08:39:35 -0400 Subject: [PATCH] fix: fixing macOs build issues, removing outdated code + fixed the issue of not building on macOS + removed outdated right-align function --- .../importerexporters/UsbDevice/usbdevice.cpp | 2 +- .../UsbDevice/usbdeviceimporteditor.cpp | 25 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/hobbits-plugins/importerexporters/UsbDevice/usbdevice.cpp b/src/hobbits-plugins/importerexporters/UsbDevice/usbdevice.cpp index 3601527f..bb023756 100644 --- a/src/hobbits-plugins/importerexporters/UsbDevice/usbdevice.cpp +++ b/src/hobbits-plugins/importerexporters/UsbDevice/usbdevice.cpp @@ -391,7 +391,7 @@ QSharedPointer UsbDevice::importBits(const Parameters ¶meters, return ImportResult::result(container, parameters); } -QSharedPointer returnError(int errorCode) +QSharedPointer UsbDevice::returnError(int errorCode) { if (errorCode == LIBUSB_ERROR_IO) { diff --git a/src/hobbits-plugins/importerexporters/UsbDevice/usbdeviceimporteditor.cpp b/src/hobbits-plugins/importerexporters/UsbDevice/usbdeviceimporteditor.cpp index 85d51fd1..2c8d6be3 100644 --- a/src/hobbits-plugins/importerexporters/UsbDevice/usbdeviceimporteditor.cpp +++ b/src/hobbits-plugins/importerexporters/UsbDevice/usbdeviceimporteditor.cpp @@ -306,31 +306,6 @@ void UsbDeviceImportEditor::updateSelector(QComboBox *selector, QStringList item } } -/** - * @brief Adds the leading zeros to the hex string passed into the parameter str, and returns the new string - * useful for getting the list of devices, and identifiying their vendor and product name from ID. - * - * @param str std::string, the hex string of either the vendorID or productID - * @return QString - the hex string, but with the proper number of leading zeroes added to it. - */ -QString UsbDeviceImportEditor::addLeadingZeros(std::string str){ - switch (str.length()) - { - case 1: - return "000" + QString::fromStdString(str); - break; - case 2: - return "00" + QString::fromStdString(str); - break; - case 3: - return "0" + QString::fromStdString(str); - break; - default: - return QString::fromStdString(str); - break; - } -} - /** * @brief Gets the name of the Vendor and the Product in a human understandable string, based of the product and vendor IDs * passed as parameters