forked from teamnwah/openmw-tes3coop
Rename the method isCompleterExistFor() to hasCompleterFor()
This commit is contained in:
parent
dbe61115b2
commit
2c4025ec72
3 changed files with 4 additions and 4 deletions
|
@ -89,14 +89,14 @@ CSMWorld::IdCompletionManager::IdCompletionManager(CSMWorld::Data &data)
|
|||
generateCompleters(data);
|
||||
}
|
||||
|
||||
bool CSMWorld::IdCompletionManager::isCompleterExistFor(CSMWorld::Columns::ColumnId id) const
|
||||
bool CSMWorld::IdCompletionManager::hasCompleterFor(CSMWorld::Columns::ColumnId id) const
|
||||
{
|
||||
return mCompleters.find(id) != mCompleters.end();
|
||||
}
|
||||
|
||||
boost::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::Columns::ColumnId id)
|
||||
{
|
||||
if (!isCompleterExistFor(id))
|
||||
if (!hasCompleterFor(id))
|
||||
{
|
||||
throw std::logic_error("This column doesn't have an ID completer");
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace CSMWorld
|
|||
public:
|
||||
IdCompletionManager(CSMWorld::Data &data);
|
||||
|
||||
bool isCompleterExistFor(CSMWorld::Columns::ColumnId id) const;
|
||||
bool hasCompleterFor(CSMWorld::Columns::ColumnId id) const;
|
||||
boost::shared_ptr<QCompleter> getCompleter(CSMWorld::Columns::ColumnId id);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ QWidget *CSVWorld::IdCompletionDelegate::createEditor(QWidget *parent,
|
|||
|
||||
QWidget *editor = CSVWorld::CommandDelegate::createEditor(parent, option, index, display);
|
||||
QLineEdit *lineEditor = qobject_cast<QLineEdit *>(editor);
|
||||
if (lineEditor != NULL && completionManager.isCompleterExistFor(columnId))
|
||||
if (lineEditor != NULL && completionManager.hasCompleterFor(columnId))
|
||||
{
|
||||
lineEditor->setCompleter(completionManager.getCompleter(columnId).get());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue