Add lookup function to get PathType display names

This commit is contained in:
Chocobo1 2016-05-17 03:02:27 +08:00
parent 83b58468d9
commit 6ead0ae9ee
3 changed files with 21 additions and 6 deletions

View file

@ -63,9 +63,9 @@ QWidget *ScanFoldersDelegate::createEditor(QWidget *parent, const QStyleOptionVi
QComboBox* editor = new QComboBox(parent);
editor->setFocusPolicy(Qt::StrongFocus);
editor->addItem(tr("Same as monitored folder"));
editor->addItem(tr("Default save location"));
editor->addItem(tr("Browse..."));
editor->addItem(ScanFoldersModel::pathTypeDisplayName(ScanFoldersModel::DOWNLOAD_IN_WATCH_FOLDER));
editor->addItem(ScanFoldersModel::pathTypeDisplayName(ScanFoldersModel::DEFAULT_LOCATION));
editor->addItem(ScanFoldersModel::pathTypeDisplayName(ScanFoldersModel::CUSTOM_LOCATION));
if (index.data(Qt::UserRole).toInt() == ScanFoldersModel::CUSTOM_LOCATION) {
editor->insertSeparator(3);
editor->addItem(index.data().toString());