Fix crash on bridge type network

Change-Id: I3c227e93a7abec75679fdd836bacde08619beb9b
This commit is contained in:
Hualet Wang 2016-11-01 08:52:27 +08:00
parent ba6201a150
commit 14952c45ed
Notes: Deepin Code Review 2016-11-01 09:29:33 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Tue, 01 Nov 2016 09:29:33 +0800
Reviewed-on: https://cr.deepin.io/17118
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,8 @@ NetworkDevice::NetworkType NetworkDevice::deviceType(const QString &type)
return NetworkDevice::Wired;
if (type == "wireless")
return NetworkDevice::Wireless;
if (type == "bridge")
return NetworkDevice::Bridge;
Q_ASSERT(false);

View File

@ -32,6 +32,7 @@ public:
Wired = 1 << 1,
Wireless = 1 << 2,
Bluetooth = 1 << 3,
Bridge = 1 << 4,
};
Q_DECLARE_FLAGS(NetworkTypes, NetworkType)