Showing the changes to libraries/script-engine/src/ScriptsModel.cpp (1 of 8 files). Show all
Unified · Split
| @@ -100,6 +100,7 @@ QVariant ScriptsModel::data(const QModelIndex& index, int role) const { · 99 unmodified lines | |||
| 100 | return QVariant(); | 100 | return QVariant(); |
| 101 | } | 101 | } |
| 102 | if (node->getType() == TREE_NODE_TYPE_SCRIPT) { | 102 | if (node->getType() == TREE_NODE_TYPE_SCRIPT) { |
| 103 | |||
| 103 | TreeNodeScript* script = static_cast<TreeNodeScript*>(node); | 104 | TreeNodeScript* script = static_cast<TreeNodeScript*>(node); |
| 104 | if (role == Qt::DisplayRole) { | 105 | if (role == Qt::DisplayRole) { |
| 105 | return QVariant(script->getName() + (script->getOrigin() == SCRIPT_ORIGIN_LOCAL ? " (local)" : "")); | 106 | return QVariant(script->getName() + (script->getOrigin() == SCRIPT_ORIGIN_LOCAL ? " (local)" : "")); |
| @@ -133,7 +134,6 @@ void ScriptsModel::updateScriptsLocation(const QString& newPath) { · 27 unmodified lines | |||
| 133 | _fsWatcher.addPath(_localDirectory.absolutePath()); | 134 | _fsWatcher.addPath(_localDirectory.absolutePath()); |
| 134 | } | 135 | } |
| 135 | } | 136 | } |
| 136 | |||
| 137 | reloadLocalFiles(); | 137 | reloadLocalFiles(); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| @@ -305,6 +305,7 @@ void ScriptsModel::rebuildTree() { · 165 unmodified lines | |||
| 305 | _treeNodes.removeAt(i); | 305 | _treeNodes.removeAt(i); |
| 306 | } | 306 | } |
| 307 | } | 307 | } |
| 308 | |||
| 308 | QHash<QString, TreeNodeFolder*> folders; | 309 | QHash<QString, TreeNodeFolder*> folders; |
| 309 | for (int i = 0; i < _treeNodes.size(); i++) { | 310 | for (int i = 0; i < _treeNodes.size(); i++) { |
| 310 | TreeNodeBase* node = _treeNodes.at(i); | 311 | TreeNodeBase* node = _treeNodes.at(i); |