From fc2591e028473c414049b3b16e9cd579703bb1c4 Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 18 Aug 2014 23:01:25 +0200 Subject: - new plugin-api to determine the origin of a file --- src/organizerproxy.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/organizerproxy.cpp') diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 8adfda7e..903c979e 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -175,6 +175,22 @@ QStringList OrganizerProxy::findFiles(const QString &path, const std::functionm_DirectoryStructure->searchFile(ToWString(QFileInfo(fileName).fileName()), NULL); + + if (file.get() != NULL) { + result.append(ToQString(m_Proxied->m_DirectoryStructure->getOriginByID(file->getOrigin()).getName())); + foreach (int i, file->getAlternatives()) { + result.append(ToQString(m_Proxied->m_DirectoryStructure->getOriginByID(i).getName())); + } + } else { + qDebug("%s not found", qPrintable(fileName)); + } + return result; +} + QList OrganizerProxy::findFileInfos(const QString &path, const std::function &filter) const { return m_Proxied->findFileInfos(path, filter); -- cgit v1.3.1