fix can not correctly sort plugin

Change-Id: Ic63b91d6d02d1136935785ad68c3bcc56dc41282
This commit is contained in:
linux0208 2018-02-15 22:50:44 +08:00 committed by 石博文
parent 3cc3ccb5a3
commit b57f8f8328
Notes: Deepin Code Review 2018-02-22 16:31:38 +08:00
Code-Review+2: 石博文 <sbw@sbw.so>
Verified+1: Anonymous Coward #1000004
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Thu, 22 Feb 2018 16:31:38 +0800
Reviewed-on: https://cr.deepin.io/31783
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -313,7 +313,8 @@ void DockItemController::pluginItemInserted(PluginsItem *item)
PluginsItem *pItem = static_cast<PluginsItem *>(m_itemList[i]);
Q_ASSERT(pItem);
if (itemSortKey <= pItem->itemSortKey())
const int sortKey = pItem->itemSortKey();
if (sortKey != -1 && itemSortKey > sortKey)
continue;
insertIndex = i;
break;