MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / getScriptSource

Method getScriptSource

src/core/user_scripts/UserScriptModel.cpp:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62QString UserScriptModel::getScriptSource(int indexRow)
63{
64 if (indexRow < 0 || indexRow >= rowCount())
65 return QString();
66
67 QFile f(m_scripts.at(indexRow).m_fileName);
68 if (!f.exists() || !f.open(QIODevice::ReadOnly))
69 return QString();
70
71 QByteArray data = f.readAll();
72 f.close();
73 return QString(data);
74}
75
76QVariant UserScriptModel::headerData(int section, Qt::Orientation orientation, int role) const
77{

Callers 2

onEditButtonClickedMethod · 0.80
onScriptCreatedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected