wip: add mainWindow field to ScriptsSnapInPrivate

This commit is contained in:
Kirill Sharov 2024-08-16 10:53:18 +04:00
parent ce08884dec
commit 10217fb567
2 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,7 @@ void ScriptsSnapIn::onInitialize(QMainWindow *window)
if (mainWindow)
{
d->localeName = mainWindow->getLanguage().toStdString();
d->mainWindow = mainWindow;
}
d->proxyViewModel->setSourceModel(d->viewModel.get());

View File

@ -7,6 +7,8 @@
#include "scriptstreemodel.h"
#include "scriptstreeproxymodel.h"
#include "../../gui/mainwindow.h"
#include <QObject>
#include <QTranslator>
@ -25,6 +27,8 @@ public:
public:
std::string policyPath = "";
gpui::MainWindow *mainWindow = nullptr;
std::unique_ptr<ScriptsModel> userScriptsModel = std::make_unique<ScriptsModel>();
std::unique_ptr<ScriptsModel> userPowerScriptsModel = std::make_unique<ScriptsModel>();
std::unique_ptr<ScriptsModel> machineScriptsModel = std::make_unique<ScriptsModel>();