| 60 | } |
| 61 | |
| 62 | QString 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 | |
| 76 | QVariant UserScriptModel::headerData(int section, Qt::Orientation orientation, int role) const |
| 77 | { |
no outgoing calls
no test coverage detected