Remove leftovers from old notification system in JS code
This change was made when already investigating https://github.com/Martchus/tageditor/issues/50. So that issue was there before this change.
This commit is contained in:
parent
bdc1c0d8d9
commit
bf4687d0b6
|
@ -14,7 +14,7 @@ set(META_GUI_OPTIONAL true)
|
||||||
set(META_JS_SRC_DIR renamingutility)
|
set(META_JS_SRC_DIR renamingutility)
|
||||||
set(META_VERSION_MAJOR 3)
|
set(META_VERSION_MAJOR 3)
|
||||||
set(META_VERSION_MINOR 3)
|
set(META_VERSION_MINOR 3)
|
||||||
set(META_VERSION_PATCH 1)
|
set(META_VERSION_PATCH 2)
|
||||||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||||
|
|
||||||
# add project files
|
# add project files
|
||||||
|
|
|
@ -168,7 +168,7 @@ TAGEDITOR_JS_VALUE TagEditorObject::parseFileInfo(const QString &fileName)
|
||||||
ioErrorOccured = true;
|
ioErrorOccured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// gather notifications
|
// add diag messages
|
||||||
auto diagObj = m_engine->newArray(static_cast<uint>(diag.size()));
|
auto diagObj = m_engine->newArray(static_cast<uint>(diag.size()));
|
||||||
diagObj << diag;
|
diagObj << diag;
|
||||||
criticalParseingErrorOccured |= diag.level() >= DiagLevel::Critical;
|
criticalParseingErrorOccured |= diag.level() >= DiagLevel::Critical;
|
||||||
|
@ -183,25 +183,22 @@ TAGEDITOR_JS_VALUE TagEditorObject::parseFileInfo(const QString &fileName)
|
||||||
fileInfoObject.setProperty(QStringLiteral("hasAudioTracks"), fileInfo.hasTracksOfType(MediaType::Audio) TAGEDITOR_JS_READONLY);
|
fileInfoObject.setProperty(QStringLiteral("hasAudioTracks"), fileInfo.hasTracksOfType(MediaType::Audio) TAGEDITOR_JS_READONLY);
|
||||||
fileInfoObject.setProperty(QStringLiteral("hasVideoTracks"), fileInfo.hasTracksOfType(MediaType::Video) TAGEDITOR_JS_READONLY);
|
fileInfoObject.setProperty(QStringLiteral("hasVideoTracks"), fileInfo.hasTracksOfType(MediaType::Video) TAGEDITOR_JS_READONLY);
|
||||||
|
|
||||||
// gather tag information
|
// add tag information
|
||||||
const vector<Tag *> tags = fileInfo.tags();
|
const vector<Tag *> tags = fileInfo.tags();
|
||||||
auto combinedTagObject = m_engine->newObject();
|
auto combinedTagObject = m_engine->newObject();
|
||||||
auto combinedTagNotifications = m_engine->newArray();
|
|
||||||
auto tagsObject = m_engine->newArray(static_cast<uint>(tags.size()));
|
auto tagsObject = m_engine->newArray(static_cast<uint>(tags.size()));
|
||||||
std::uint32_t tagIndex = 0;
|
std::uint32_t tagIndex = 0;
|
||||||
for (auto tagIterator = tags.cbegin(), end = tags.cend(); tagIterator != end; ++tagIterator, ++tagIndex) {
|
for (auto tagIterator = tags.cbegin(), end = tags.cend(); tagIterator != end; ++tagIterator, ++tagIndex) {
|
||||||
const Tag &tag = **tagIterator;
|
const Tag &tag = **tagIterator;
|
||||||
auto tagObject = m_engine->newObject();
|
auto tagObject = m_engine->newObject();
|
||||||
combinedTagObject << tag;
|
combinedTagObject << tag;
|
||||||
combinedTagNotifications << tag;
|
|
||||||
tagObject << tag;
|
tagObject << tag;
|
||||||
tagsObject.setProperty(tagIndex, tagObject TAGEDITOR_JS_READONLY);
|
tagsObject.setProperty(tagIndex, tagObject TAGEDITOR_JS_READONLY);
|
||||||
}
|
}
|
||||||
combinedTagObject.setProperty(QStringLiteral("notifications"), combinedTagNotifications TAGEDITOR_JS_READONLY);
|
|
||||||
fileInfoObject.setProperty(QStringLiteral("tag"), combinedTagObject TAGEDITOR_JS_READONLY);
|
fileInfoObject.setProperty(QStringLiteral("tag"), combinedTagObject TAGEDITOR_JS_READONLY);
|
||||||
fileInfoObject.setProperty(QStringLiteral("tags"), tagsObject TAGEDITOR_JS_READONLY);
|
fileInfoObject.setProperty(QStringLiteral("tags"), tagsObject TAGEDITOR_JS_READONLY);
|
||||||
|
|
||||||
// gather track information
|
// add track information
|
||||||
const vector<AbstractTrack *> tracks = fileInfo.tracks();
|
const vector<AbstractTrack *> tracks = fileInfo.tracks();
|
||||||
auto tracksObject = m_engine->newArray(static_cast<uint>(tracks.size()));
|
auto tracksObject = m_engine->newArray(static_cast<uint>(tracks.size()));
|
||||||
std::uint32_t trackIndex = 0;
|
std::uint32_t trackIndex = 0;
|
||||||
|
|
Loading…
Reference in New Issue