fix(src/extension/menu): 正常应用列表的部分应用右键菜单也存在“从列表中删除”
This commit is contained in:
parent
ef7315b3c9
commit
c1c77d38e1
|
@ -21,6 +21,7 @@
|
||||||
#include "app-manager.h"
|
#include "app-manager.h"
|
||||||
#include "../context-menu-extension.h"
|
#include "../context-menu-extension.h"
|
||||||
#include "basic-app-model.h"
|
#include "basic-app-model.h"
|
||||||
|
#include "user-config.h"
|
||||||
|
|
||||||
#include <QStringLiteral>
|
#include <QStringLiteral>
|
||||||
#include <QDBusInterface>
|
#include <QDBusInterface>
|
||||||
|
@ -182,6 +183,7 @@ void AppContentMenu::addUninstall(QObject *parent, const QString &appId, QList<Q
|
||||||
void AppContentMenu::addRemoveFromList(QObject *parent, const QString &appId, const int &appLaunched, const QString &appInsertTime, QList<QAction *> &list)
|
void AppContentMenu::addRemoveFromList(QObject *parent, const QString &appId, const int &appLaunched, const QString &appInsertTime, QList<QAction *> &list)
|
||||||
{
|
{
|
||||||
if (appLaunched == 1) return;
|
if (appLaunched == 1) return;
|
||||||
|
if (UserConfig::instance()->isPreInstalledApps(appId)) return;
|
||||||
|
|
||||||
QDateTime installDate = QDateTime::fromString(appInsertTime, "yyyy-MM-dd hh:mm:ss");
|
QDateTime installDate = QDateTime::fromString(appInsertTime, "yyyy-MM-dd hh:mm:ss");
|
||||||
if (!installDate.isValid()) return;
|
if (!installDate.isValid()) return;
|
||||||
|
|
Loading…
Reference in New Issue