Skip to content

Commit

Permalink
Update signature of andCapabilities method
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 25, 2024
1 parent 04e6378 commit 879d4e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/OptionsPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ Window {
}
}

if (imageWriter.andCapabilities("usb_otg")) {
if (imageWriter.checkHWAndSWCapability("usb_otg")) {
deviceUsbOtgSupport = true
} else {
deviceUsbOtgSupport = false
Expand Down
4 changes: 2 additions & 2 deletions src/imagewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ bool ImageWriter::getHWFilterListInclusive() {
return _deviceFilterIsInclusive;
}

bool ImageWriter::andCapabilities(const QString &cap) {
return this->checkHWCapability(cap) && this->checkSWCapability(cap);
bool ImageWriter::checkHWAndSWCapability(const QString &cap, const QString &differentSWCap) {
return this->checkHWCapability(cap) && this->checkSWCapability(differentSWCap.isEmpty() ? cap : differentSWCap);
}

bool ImageWriter::checkHWCapability(const QString &cap) {
Expand Down
4 changes: 2 additions & 2 deletions src/imagewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ class ImageWriter : public QObject
/* Get if the HW filter is in inclusive mode */
Q_INVOKABLE bool getHWFilterListInclusive();

/* Get if both hard and software support a certain feature */
Q_INVOKABLE bool andCapabilities(const QString &cap);
/* Get if both hard and software support a certain feature. If no differentSWCap is provided it will check for cap support in SW and HW lists. */
Q_INVOKABLE bool checkHWAndSWCapability(const QString &cap, const QString &differentSWCap = "");

/* Check if the hardware supports a certain feature. */
Q_INVOKABLE bool checkHWCapability(const QString &cap);
Expand Down

0 comments on commit 879d4e5

Please sign in to comment.