Commit 7f66cc99 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Warning--

parent afbe3a76
......@@ -51,8 +51,8 @@ QStringList Backend::availableBackends()
Backend::Ptr Backend::instance(const QString &backend)
{
return
backend == "encfs" ? PlasmaVault::EncFsBackend::instance() :
backend == "cryfs" ? PlasmaVault::CryFsBackend::instance() :
backend == QLatin1String("encfs") ? PlasmaVault::EncFsBackend::instance() :
backend == QLatin1String("cryfs") ? PlasmaVault::CryFsBackend::instance() :
/* unknown backend */ nullptr;
}
......
......@@ -28,7 +28,7 @@ namespace PlasmaVault {
class CryFsBackend: public FuseBackend {
public:
CryFsBackend();
~CryFsBackend();
~CryFsBackend() override;
static Backend::Ptr instance();
......@@ -36,7 +36,7 @@ public:
FutureResult<> validateBackend() override;
QString name() const override { return "cryfs"; };
QString name() const override { return "cryfs"; }
protected:
FutureResult<> mount(const Device &device,
......
......@@ -28,7 +28,7 @@ namespace PlasmaVault {
class EncFsBackend: public FuseBackend {
public:
EncFsBackend();
~EncFsBackend();
~EncFsBackend() override;
static Backend::Ptr instance();
......@@ -36,7 +36,7 @@ public:
FutureResult<> validateBackend() override;
QString name() const override { return "encfs"; };
QString name() const override { return "encfs"; }
protected:
FutureResult<> mount(const Device &device,
......
......@@ -30,7 +30,7 @@ namespace PlasmaVault {
class FuseBackend: public Backend {
public:
FuseBackend();
~FuseBackend();
~FuseBackend() override;
bool isOpened(const MountPoint &mountPoint) const override;
......
......@@ -30,7 +30,7 @@ static QString validateDevice(QString device)
return device;
}
Device::Device(QString device)
Device::Device(const QString &device)
: m_device(validateDevice(device))
{
}
......@@ -40,7 +40,7 @@ Device::operator QString() const
return m_device;
}
MountPoint::MountPoint(QString mountPoint)
MountPoint::MountPoint(const QString &mountPoint)
: m_mountPoint(mountPoint)
{
}
......
......@@ -30,7 +30,7 @@ namespace PlasmaVault {
class Device {
public:
explicit Device(QString device = QString());
explicit Device(const QString &device = QString());
operator QString() const;
inline QString data() const
......@@ -56,7 +56,7 @@ inline bool operator== (const Device &left, const Device &right)
class MountPoint {
public:
explicit MountPoint(QString mountPoint = QString());
explicit MountPoint(const QString &mountPoint = QString());
operator QString() const;
inline bool isEmpty() const
......
......@@ -349,12 +349,12 @@ void PlasmaVaultService::openVaultInFileManager(const QString &device)
{
if (auto vault = d->vaultFor(device)) {
if (vault->isOpened()) {
new KRun(QUrl::fromLocalFile((QString)vault->mountPoint()), 0);
new KRun(QUrl::fromLocalFile((QString)vault->mountPoint()), nullptr);
} else {
showPasswordMountDialog(vault, [this, vault] {
emit vaultChanged(vault->info());
new KRun(QUrl::fromLocalFile((QString)vault->mountPoint()), 0);
new KRun(QUrl::fromLocalFile((QString)vault->mountPoint()), nullptr);
});
}
}
......
......@@ -34,7 +34,7 @@ class VaultApplet: public Plasma::Applet
Q_PROPERTY(QObject* vaultsModel READ vaultsModel CONSTANT)
public:
VaultApplet(QObject *parent, const QVariantList &args);
explicit VaultApplet(QObject *parent, const QVariantList &args);
~VaultApplet();
QObject *vaultsModel();
......
......@@ -35,8 +35,8 @@ class VaultsModel: public QAbstractListModel {
Q_PROPERTY(bool hasError READ hasError NOTIFY hasErrorChanged)
public:
VaultsModel(QObject *parent = nullptr);
~VaultsModel();
explicit VaultsModel(QObject *parent = nullptr);
~VaultsModel() override;
int rowCount(const QModelIndex &parent) const override;
......@@ -101,7 +101,7 @@ class SortedVaultsModelProxy: public QSortFilterProxyModel {
Q_OBJECT
public:
SortedVaultsModelProxy(QObject *parent);
explicit SortedVaultsModelProxy(QObject *parent);
bool lessThan(const QModelIndex &left,
const QModelIndex &right) const override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment