Changeset View
Changeset View
Standalone View
Standalone View
network/network/netdevice.cpp
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | 18 | | |||
19 | You should have received a copy of the GNU Lesser General Public | 19 | You should have received a copy of the GNU Lesser General Public | ||
20 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 20 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #include "netdevice.h" | 23 | #include "netdevice.h" | ||
24 | #include "netdevice_p.h" | 24 | #include "netdevice_p.h" | ||
25 | 25 | | |||
26 | // KDE | | |||
27 | #include <KGlobal> | | |||
28 | | ||||
29 | namespace Mollet | 26 | namespace Mollet | ||
30 | { | 27 | { | ||
31 | 28 | | |||
32 | K_GLOBAL_STATIC_WITH_ARGS(KSharedPtr< NetDevicePrivate >, dummyNetDevicePrivate, ( new NetDevicePrivate(QString()) )) | 29 | Q_GLOBAL_STATIC_WITH_ARGS(QSharedPointer<NetDevicePrivate>, dummyNetDevicePrivate, ( new NetDevicePrivate(QString()) )) | ||
33 | 30 | | |||
34 | 31 | | |||
35 | QString NetDevice::iconName( Type type ) | 32 | QString NetDevice::iconName( Type type ) | ||
36 | { | 33 | { | ||
37 | static const char* const IconName[] = | 34 | static const char* const IconName[] = | ||
38 | { | 35 | { | ||
39 | /*"unknown"*/"network-server", "scanner", "printer", "network-server-database", "network-server", "computer" | 36 | /*"unknown"*/"network-server", "scanner", "printer", "network-server-database", "network-server", "computer" | ||
40 | }; | 37 | }; | ||
Show All 27 Lines | |||||
68 | NetDevice& NetDevice::operator =( const NetDevice& other ) | 65 | NetDevice& NetDevice::operator =( const NetDevice& other ) | ||
69 | { | 66 | { | ||
70 | d = other.d; | 67 | d = other.d; | ||
71 | return *this; | 68 | return *this; | ||
72 | } | 69 | } | ||
73 | 70 | | |||
74 | void NetDevice::setDPtr( NetDevicePrivate* _d ) | 71 | void NetDevice::setDPtr( NetDevicePrivate* _d ) | ||
75 | { | 72 | { | ||
76 | d = _d; | 73 | d.reset(_d); | ||
77 | } | 74 | } | ||
78 | 75 | | |||
79 | NetDevice::~NetDevice() | 76 | NetDevice::~NetDevice() | ||
80 | { | 77 | { | ||
81 | } | 78 | } | ||
82 | 79 | | |||
83 | } | 80 | } |