static QScriptValue scriptMapToScriptValue(QScriptEngine *eng, const QScriptScriptMap &in)
{
    QScriptValue out = eng->newObject();
    QScriptScriptMap::const_iterator it;
    for (it = in.constBegin(); it != in.constEnd(); ++it) {
        out.setProperty(QString::number(it.key()), eng->toScriptValue(it.value()));
    }
    return out;
}
예제 #2
0
 void handleResponse(const QScriptDebuggerResponse &response, int /*commandId*/)
 {
     QScriptScriptMap scripts = response.resultAsScripts();
     QScriptScriptMap::const_iterator it;
     for (it = scripts.constBegin(); it != scripts.constEnd(); ++it) {
         QString fileName = it.value().fileName();
         if (isPrefixOf(m_prefix, fileName))
             m_task->results.append(fileName);
     }
     m_task->emitFinished();
     finish();
 }