Skip to content

Commit a02f4dd

Browse files
committed
Change GKDBus::getConnection signature.
Make method const and return const pointer.
1 parent a6d3c0c commit a02f4dd

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/lib/dbus/GKDBus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void GKDBus::checkDBusError(const char* error)
311311
}
312312
}
313313

314-
DBusConnection* GKDBus::getConnection(BusConnection bus)
314+
DBusConnection* const GKDBus::getConnection(BusConnection bus) const
315315
{
316316
switch(bus) {
317317
case BusConnection::GKDBUS_SESSION :

src/lib/dbus/GKDBus.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class GKDBus
111111
DBusConnection* const connection) noexcept;
112112
void checkReleasedName(int ret) noexcept;
113113
void checkDBusError(const char* error);
114-
DBusConnection* getConnection(BusConnection bus);
114+
DBusConnection* const getConnection(BusConnection bus) const;
115115
const unsigned int getDBusRequestFlags(const ConnectionFlag flag) noexcept;
116116
};
117117

src/lib/dbus/GKDBusEvents.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class GKDBusEvents
112112
std::map< const std::string, /* interface */
113113
std::vector<GKDBusIntrospectableSignal> > > > _DBusIntrospectableSignals;
114114

115-
virtual DBusConnection* getConnection(BusConnection wantedConnection) = 0;
115+
virtual DBusConnection* const getConnection(BusConnection wantedConnection) const = 0;
116116

117117
void openXMLInterface(
118118
std::ostringstream & xml,

src/lib/dbus/messages/GKDBusBroadcastSignal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class GKDBusMessageBroadcastSignal
8181
private:
8282
GKDBusBroadcastSignal* _signal;
8383

84-
virtual DBusConnection* getConnection(BusConnection wantedConnection) = 0;
84+
virtual DBusConnection* const getConnection(BusConnection wantedConnection) const = 0;
8585
};
8686

8787
} // namespace NSGKDBus

src/lib/dbus/messages/GKDBusRemoteMethodCall.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class GKDBusMessageRemoteMethodCall
9898
GKDBusRemoteMethodCall* _remoteMethodCall;
9999
DBusPendingCall* _pendingCall;
100100

101-
virtual DBusConnection* getConnection(BusConnection wantedConnection) = 0;
101+
virtual DBusConnection* const getConnection(BusConnection wantedConnection) const = 0;
102102
};
103103

104104
} // namespace NSGKDBus

0 commit comments

Comments
 (0)