mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 01:36:44 +00:00
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);
|
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();
|
return mCompleters.find(id) != mCompleters.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::Columns::ColumnId id)
|
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");
|
throw std::logic_error("This column doesn't have an ID completer");
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
IdCompletionManager(CSMWorld::Data &data);
|
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);
|
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);
|
QWidget *editor = CSVWorld::CommandDelegate::createEditor(parent, option, index, display);
|
||||||
QLineEdit *lineEditor = qobject_cast<QLineEdit *>(editor);
|
QLineEdit *lineEditor = qobject_cast<QLineEdit *>(editor);
|
||||||
if (lineEditor != NULL && completionManager.isCompleterExistFor(columnId))
|
if (lineEditor != NULL && completionManager.hasCompleterFor(columnId))
|
||||||
{
|
{
|
||||||
lineEditor->setCompleter(completionManager.getCompleter(columnId).get());
|
lineEditor->setCompleter(completionManager.getCompleter(columnId).get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue