diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-15 19:17:03 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-15 20:08:30 +0530 |
| commit | 387cf24e389854ecc97f6236fdd6acbc2486dd52 (patch) | |
| tree | a51b51de0064fb10685d2da85d11748c4a32ce73 /src/completion/CommandsModel.cpp | |
| parent | 05ae8976a8e1ab5411058de244c4e2fcc87ec369 (diff) | |
| download | null-browser-387cf24e389854ecc97f6236fdd6acbc2486dd52.tar.gz null-browser-387cf24e389854ecc97f6236fdd6acbc2486dd52.zip | |
Replaced QCompleter with custom implementation
Diffstat (limited to '')
| -rw-r--r-- | src/completion/CommandsModel.cpp | 5 |
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; } |
