Use return value of type std::optional<QString> for
checkForUSBStick() and getUSBMountPath(). Add getJsonFilesOnUsbStick().
This commit is contained in:
parent
fc75585de3
commit
5124e1cca6
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
#include <initializer_list>
|
||||||
|
|
||||||
class System : public QObject
|
class System : public QObject
|
||||||
{
|
{
|
||||||
@ -13,16 +17,17 @@ private:
|
|||||||
|
|
||||||
static QString errorMsg;
|
static QString errorMsg;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static const QStringList allowedJsonFiles;
|
||||||
|
|
||||||
static bool checkForSDCard();
|
static bool checkForSDCard();
|
||||||
static bool umountSDCard();
|
static bool umountSDCard();
|
||||||
|
|
||||||
static bool checkForUSBStick();
|
static std::optional<QString> checkForUSBStick(QString const &dirPathUnderMountPath = ".");
|
||||||
static QString getUSBMountPath();
|
static QString getUSBMountPath(QString const &dirPathUnderMountPath = ".");
|
||||||
static QString getUSBDeviceName();
|
|
||||||
|
//static QString getUSBDeviceName();
|
||||||
static bool umountUSBStick();
|
static bool umountUSBStick();
|
||||||
|
|
||||||
static bool test_mount(const QString& dev, const QString &mountpoint);
|
static bool test_mount(const QString& dev, const QString &mountpoint);
|
||||||
@ -48,7 +53,7 @@ public:
|
|||||||
static QString getPTU4SerialNumber();
|
static QString getPTU4SerialNumber();
|
||||||
static QString getPTU4MACAddress();
|
static QString getPTU4MACAddress();
|
||||||
|
|
||||||
|
static QStringList getJsonFilesOnUsbStick(QString const &mountPath);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user