Showing the changes to interface/src/ScriptsModel.cpp (1 of 193 files). Show all
Unified · Split
| @@ -17,6 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | #include <NetworkAccessManager.h> |
| 19 | 19 | |
| 20 | +#include "Application.h" | |
| 20 | 21 | #include "Menu.h" |
| 21 | 22 | |
| 22 | 23 | #include "ScriptsModel.h" |
| @@ -33,8 +34,8 @@ static const QString KEY_NAME = "Key"; · 10 unmodified lines | ||
| 33 | 34 | |
| 34 | 35 | TreeNodeBase::TreeNodeBase(TreeNodeFolder* parent, const QString& name, TreeNodeType type) : |
| 35 | 36 | _parent(parent), |
| 36 | − _name(name), | |
| 37 | − _type(type) { | |
| 37 | + _type(type), | |
| 38 | + _name(name) { | |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 | TreeNodeScript::TreeNodeScript(const QString& localPath, const QString& fullPath, ScriptOrigin origin) : |
| @@ -58,10 +59,10 @@ ScriptsModel::ScriptsModel(QObject* parent) : · 17 unmodified lines | ||
| 58 | 59 | _localDirectory.setFilter(QDir::Files | QDir::Readable); |
| 59 | 60 | _localDirectory.setNameFilters(QStringList("*.js")); |
| 60 | 61 | |
| 61 | − updateScriptsLocation(Menu::getInstance()->getScriptsLocation()); | |
| 62 | + updateScriptsLocation(qApp->getScriptsLocation()); | |
| 62 | 63 | |
| 63 | 64 | connect(&_fsWatcher, &QFileSystemWatcher::directoryChanged, this, &ScriptsModel::reloadLocalFiles); |
| 64 | − connect(Menu::getInstance(), &Menu::scriptLocationChanged, this, &ScriptsModel::updateScriptsLocation); | |
| 65 | + connect(qApp, &Application::scriptLocationChanged, this, &ScriptsModel::updateScriptsLocation); | |
| 65 | 66 | |
| 66 | 67 | reloadLocalFiles(); |
| 67 | 68 | reloadRemoteFiles(); |