Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
Network Management
Commits
49fb02e3
Commit
49fb02e3
authored
Nov 03, 2011
by
Lamarque Souza
Browse files
Test if DBus interface object is valid before using it.
CCBUG: 283241
parent
b60c49ad
Changes
7
Hide whitespace changes
Inline
Side-by-side
applet/wirelessstatus.cpp
View file @
49fb02e3
...
...
@@ -58,8 +58,15 @@ public:
void
init
(
RemoteWirelessObject
*
wobj
)
{
if
(
!
wobj
)
if
(
!
wobj
)
{
kDebug
()
<<
"wobj is null"
;
return
;
}
if
(
!
wobj
||
!
wobj
->
isValid
())
{
kDebug
()
<<
"wobj is invalid"
;
return
;
}
if
(
wobj
->
operationMode
()
==
NetworkManager
::
WirelessDevice
::
Adhoc
)
{
adhoc
=
true
;
...
...
libs/client/remotewirelessinterfaceconnection.cpp
View file @
49fb02e3
...
...
@@ -81,4 +81,9 @@ NetworkManager::WirelessDevice::OperationMode RemoteWirelessInterfaceConnection:
return
(
NetworkManager
::
WirelessDevice
::
OperationMode
)
rsnflags
;
}
bool
RemoteWirelessInterfaceConnection
::
isValid
()
const
{
Q_D
(
const
RemoteWirelessInterfaceConnection
);
return
d
->
wirelessInterfaceConnectionIface
->
isValid
();
}
// vim: sw=4 sts=4 et tw=100
libs/client/remotewirelessinterfaceconnection.h
View file @
49fb02e3
...
...
@@ -53,6 +53,7 @@ public:
NetworkManager
::
AccessPoint
::
WpaFlags
wpaFlags
()
const
;
NetworkManager
::
AccessPoint
::
WpaFlags
rsnFlags
()
const
;
NetworkManager
::
WirelessDevice
::
OperationMode
operationMode
()
const
;
bool
isValid
()
const
;
Q_SIGNALS:
void
strengthChanged
(
int
);
protected:
...
...
libs/client/remotewirelessnetwork.cpp
View file @
49fb02e3
...
...
@@ -84,4 +84,10 @@ NetworkManager::WirelessDevice::OperationMode RemoteWirelessNetwork::operationMo
return
(
NetworkManager
::
WirelessDevice
::
OperationMode
)
rsnflags
;
}
bool
RemoteWirelessNetwork
::
isValid
()
const
{
Q_D
(
const
RemoteWirelessNetwork
);
return
d
->
wirelessNetworkItemInterface
->
isValid
();
}
// vim: sw=4 sts=4 et tw=100
libs/client/remotewirelessnetwork.h
View file @
49fb02e3
...
...
@@ -54,6 +54,7 @@ public:
NetworkManager
::
AccessPoint
::
WpaFlags
wpaFlags
()
const
;
NetworkManager
::
AccessPoint
::
WpaFlags
rsnFlags
()
const
;
NetworkManager
::
WirelessDevice
::
OperationMode
operationMode
()
const
;
bool
isValid
()
const
;
Q_SIGNALS:
void
strengthChanged
(
int
);
protected:
...
...
libs/client/remotewirelessobject.h
View file @
49fb02e3
...
...
@@ -36,6 +36,7 @@ public:
virtual
NetworkManager
::
AccessPoint
::
WpaFlags
rsnFlags
()
const
=
0
;
virtual
NetworkManager
::
WirelessDevice
::
OperationMode
operationMode
()
const
=
0
;
virtual
void
strengthChanged
(
int
)
=
0
;
virtual
bool
isValid
()
const
=
0
;
};
#endif // REMOTEWIRELESSOBJECT_H
plasma_nm_version.h
View file @
49fb02e3
#ifndef PLASMA_NM_VERSION_H
#define PLASMA_NM_VERSION_H
static
const
char
*
plasmaNmVersion
=
"0.9.1_rc1 (master 20111
029
)"
;
static
const
char
*
plasmaNmVersion
=
"0.9.1_rc1 (master 20111
103
)"
;
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment