| 100 | } |
| 101 | |
| 102 | void LuaConsoleModel::addFile(const QString& str) |
| 103 | { |
| 104 | Lua::LuaFunctionList& lfl = Lua::Callbacks::getList(); |
| 105 | |
| 106 | /* Check if file is already in the list before calling beginInsertRows */ |
| 107 | if (lfl.fileSet.find(str.toStdString()) != lfl.fileSet.end()) |
| 108 | return; |
| 109 | |
| 110 | beginInsertRows(QModelIndex(), lfl.fileSet.size(), lfl.fileSet.size()); |
| 111 | lfl.addFile(str.toStdString()); |
| 112 | endInsertRows(); |
| 113 | } |
| 114 | |
| 115 | void LuaConsoleModel::removeFile(int row) |
| 116 | { |