Skip to content

Commit

Permalink
fix: fixing macOs build issues, removing outdated code
Browse files Browse the repository at this point in the history
+ fixed the issue of not building on macOS
+ removed outdated right-align function
  • Loading branch information
CooperW824 committed Aug 15, 2021
1 parent d377c21 commit fc602c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ QSharedPointer<ImportResult> UsbDevice::importBits(const Parameters &parameters,
return ImportResult::result(container, parameters);
}

QSharedPointer<ImportResult> returnError(int errorCode)
QSharedPointer<ImportResult> UsbDevice::returnError(int errorCode)
{
if (errorCode == LIBUSB_ERROR_IO)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc602c2

Please sign in to comment.