From 02c7b9d25516bd234cba8864d612b5719123e619 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 20 May 2024 11:24:52 +0300 Subject: [PATCH] UI: Programs: Improve action's tool-tip --- src/ui/model/applistmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/model/applistmodel.cpp b/src/ui/model/applistmodel.cpp index c2d8bf0f..2a3509a9 100644 --- a/src/ui/model/applistmodel.cpp +++ b/src/ui/model/applistmodel.cpp @@ -188,7 +188,7 @@ QVariant dataDisplayName(const AppRow &appRow, int role) : QString()); } -QVariant dataDisplayAction(const AppRow &appRow, int /*role*/) +QVariant dataDisplayAction(const AppRow &appRow, int role) { if (appRow.killProcess) return AppListModel::tr("Kill Process"); @@ -196,6 +196,9 @@ QVariant dataDisplayAction(const AppRow &appRow, int /*role*/) if (appRow.blocked) return AppListModel::tr("Block"); + if (role == Qt::ToolTipRole && appRow.lanOnly) + return AppListModel::tr("Block Internet Traffic"); + return AppListModel::tr("Allow"); }