Changeset View
Changeset View
Standalone View
Standalone View
src/indexeddataretriever.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 41 | { | |||
---|---|---|---|---|---|
45 | m_process->setReadChannel(QProcess::StandardOutput); | 45 | m_process->setReadChannel(QProcess::StandardOutput); | ||
46 | 46 | | |||
47 | connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, &IndexedDataRetriever::slotIndexedFile); | 47 | connect(m_process, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, &IndexedDataRetriever::slotIndexedFile); | ||
48 | m_process->start(exe, QStringList() << m_url); | 48 | m_process->start(exe, QStringList() << m_url); | ||
49 | } | 49 | } | ||
50 | 50 | | |||
51 | void IndexedDataRetriever::slotIndexedFile(int) | 51 | void IndexedDataRetriever::slotIndexedFile(int) | ||
52 | { | 52 | { | ||
53 | QByteArray data = QByteArray::fromBase64(m_process->readAllStandardOutput()); | 53 | QByteArray data = m_process->readAllStandardOutput(); | ||
54 | QDataStream in(&data, QIODevice::ReadOnly); | 54 | QDataStream in(&data, QIODevice::ReadOnly); | ||
55 | in >> m_data; | 55 | in >> m_data; | ||
56 | 56 | | |||
57 | emitResult(); | 57 | emitResult(); | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | QVariantMap IndexedDataRetriever::data() const | 60 | QVariantMap IndexedDataRetriever::data() const | ||
61 | { | 61 | { | ||
62 | return m_data; | 62 | return m_data; | ||
63 | } | 63 | } |