Skip to content

Commit

Permalink
Rename InterfaceAndPropertyMap to InterfacePropertyMap
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Aug 29, 2018
1 parent bc304fb commit 9aad0ab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/udisks2block.cpp
Expand Up @@ -7,7 +7,7 @@
#include <QDBusPendingCallWatcher>
#include <QDBusPendingReply>

UDisks2::Block::Block(const QString &path, const InterfaceAndPropertyMap &interfacePropertyMap, QObject *parent)
UDisks2::Block::Block(const QString &path, const InterfacePropertyMap &interfacePropertyMap, QObject *parent)
: QObject(parent)
, m_path(path)
, m_interfacePropertyMap(interfacePropertyMap)
Expand Down
8 changes: 4 additions & 4 deletions src/udisks2block_p.h
Expand Up @@ -36,9 +36,9 @@
#include <QVariantMap>
#include <QDBusConnection>

typedef QMap<QString, QVariantMap> InterfaceAndPropertyMap;
typedef QMap<QString, QVariantMap> InterfacePropertyMap;

Q_DECLARE_METATYPE(InterfaceAndPropertyMap)
Q_DECLARE_METATYPE(InterfacePropertyMap)

class QDBusPendingCallWatcher;

Expand All @@ -49,7 +49,7 @@ class Block : public QObject
Q_OBJECT

public:
Block(const QString &path, const InterfaceAndPropertyMap &interfacePropertyMap, QObject *parent = nullptr);
Block(const QString &path, const InterfacePropertyMap &interfacePropertyMap, QObject *parent = nullptr);
Block& operator=(const Block& other);

~Block();
Expand Down Expand Up @@ -112,7 +112,7 @@ private slots:
void getEncryptedInterface();

QString m_path;
InterfaceAndPropertyMap m_interfacePropertyMap;
InterfacePropertyMap m_interfacePropertyMap;
QVariantMap m_data;
QDBusConnection m_connection;
QString m_mountPath;
Expand Down
10 changes: 5 additions & 5 deletions src/udisks2monitor.cpp
Expand Up @@ -85,7 +85,7 @@ UDisks2::Monitor::Monitor(PartitionManagerPrivate *manager, QObject *parent)
Q_ASSERT(!sharedInstance);
sharedInstance = this;

qDBusRegisterMetaType<InterfaceAndPropertyMap>();
qDBusRegisterMetaType<InterfacePropertyMap>();
QDBusConnection systemBus = QDBusConnection::systemBus();

connect(systemBus.interface(), &QDBusConnectionInterface::callWithCallbackFailed, this, [this](const QDBusError &error, const QDBusMessage &call) {
Expand All @@ -106,7 +106,7 @@ UDisks2::Monitor::Monitor(PartitionManagerPrivate *manager, QObject *parent)
DBUS_OBJECT_MANAGER_INTERFACE,
QStringLiteral("InterfacesAdded"),
this,
SLOT(interfacesAdded(QDBusObjectPath, InterfaceAndPropertyMap)))) {
SLOT(interfacesAdded(QDBusObjectPath, InterfacePropertyMap)))) {
qCWarning(lcMemoryCardLog) << "Failed to connect to interfaces added signal:" << qPrintable(systemBus.lastError().message());
}

Expand Down Expand Up @@ -202,7 +202,7 @@ void UDisks2::Monitor::format(const QString &deviceName, const QString &type, co
doFormat(deviceName, objectPath, type, arguments);
}

void UDisks2::Monitor::interfacesAdded(const QDBusObjectPath &objectPath, const InterfaceAndPropertyMap &interfaces)
void UDisks2::Monitor::interfacesAdded(const QDBusObjectPath &objectPath, const InterfacePropertyMap &interfaces)
{
QString path = objectPath.path();
qCInfo(lcMemoryCardLog) << "UDisks interface added:" << path << interfaces << externalBlockDevice(path);
Expand Down Expand Up @@ -561,7 +561,7 @@ void UDisks2::Monitor::createPartition(const UDisks2::Block *block)
m_manager->add(addedPartitions);
}

void UDisks2::Monitor::createBlockDevice(const QString &path, const InterfaceAndPropertyMap &interfacePropertyMap)
void UDisks2::Monitor::createBlockDevice(const QString &path, const InterfacePropertyMap &interfacePropertyMap)
{
if (m_blockDevices.contains(path)) {
return;
Expand Down Expand Up @@ -698,7 +698,7 @@ void UDisks2::Monitor::getBlockDevices()
for (const QDBusObjectPath &dbusObjectPath : blockDevicePaths) {
QString path = dbusObjectPath.path();
if (externalBlockDevice(path)) {
createBlockDevice(path, InterfaceAndPropertyMap());
createBlockDevice(path, InterfacePropertyMap());
}
}
} else if (watcher->isError()) {
Expand Down
4 changes: 2 additions & 2 deletions src/udisks2monitor_p.h
Expand Up @@ -96,7 +96,7 @@ class Monitor : public QObject
void formatError(Partition::Error error);

private slots:
void interfacesAdded(const QDBusObjectPath &objectPath, const InterfaceAndPropertyMap &interfaces);
void interfacesAdded(const QDBusObjectPath &objectPath, const InterfacePropertyMap &interfaces);
void interfacesRemoved(const QDBusObjectPath &objectPath, const QStringList &interfaces);

private:
Expand All @@ -110,7 +110,7 @@ private slots:
void lookupPartitions(PartitionManagerPrivate::Partitions &affectedPartitions, const QStringList &objects);

void createPartition(const Block *block);
void createBlockDevice(const QString &path, const InterfaceAndPropertyMap &interfacePropertyMap);
void createBlockDevice(const QString &path, const InterfacePropertyMap &interfacePropertyMap);

void doFormat(const QString &deviceName, const QString &dbusObjectPath, const QString &type, const QVariantHash &arguments);
void getBlockDevices();
Expand Down

0 comments on commit 9aad0ab

Please sign in to comment.