aboutsummaryrefslogtreecommitdiff
path: root/src/completion/CommandsModel.cpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-03-15 19:17:03 +0530
committerAkshay Nair <phenax5@gmail.com>2025-03-15 20:08:30 +0530
commit387cf24e389854ecc97f6236fdd6acbc2486dd52 (patch)
treea51b51de0064fb10685d2da85d11748c4a32ce73 /src/completion/CommandsModel.cpp
parent05ae8976a8e1ab5411058de244c4e2fcc87ec369 (diff)
downloadnull-browser-387cf24e389854ecc97f6236fdd6acbc2486dd52.tar.gz
null-browser-387cf24e389854ecc97f6236fdd6acbc2486dd52.zip
Replaced QCompleter with custom implementation
Diffstat (limited to '')
-rw-r--r--src/completion/CommandsModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/completion/CommandsModel.cpp b/src/completion/CommandsModel.cpp
index 0f66233..670c0e8 100644
--- a/src/completion/CommandsModel.cpp
+++ b/src/completion/CommandsModel.cpp
@@ -16,10 +16,10 @@ QVariant CommandsModel::data(const QModelIndex &index, int role) const {
if (role == Qt::DisplayRole)
return item.name;
- else if (role == Qt::ToolTipRole)
- return item.description;
else if (role == Qt::UserRole)
return item.description;
+ else if (role == Qt::AccessibleDescriptionRole)
+ return item.name + item.description;
return QVariant();
}
@@ -28,6 +28,7 @@ QHash<int, QByteArray> CommandsModel::roleNames() const {
QHash<int, QByteArray> roles;
roles[Qt::DisplayRole] = "name";
roles[Qt::UserRole] = "description";
+ roles[Qt::AccessibleDescriptionRole] = "full";
return roles;
}