mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-20 21:39:36 +00:00
qml scaner part 2
This commit is contained in:
parent
c4f2140c62
commit
81ae2e6023
@ -55,6 +55,26 @@ QString QML::getPathFromImport(const QString &import) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QML::scanQmlTree(const QString &qmlTree) {
|
||||||
|
QDir dir(qmlTree);
|
||||||
|
|
||||||
|
if (!dir.isReadable()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto list = dir.entryInfoList( QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
|
for (auto &&info : list) {
|
||||||
|
scanQmlTree(info.absoluteFilePath());
|
||||||
|
|
||||||
|
if (info.fileName().contains(".2")) {
|
||||||
|
secondVersions.insert(info.absoluteFilePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
QML::QML(const QString &qmlRoot) {
|
QML::QML(const QString &qmlRoot) {
|
||||||
_qmlRoot = qmlRoot;
|
_qmlRoot = qmlRoot;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef QML_H
|
#ifndef QML_H
|
||||||
#define QML_H
|
#define QML_H
|
||||||
|
|
||||||
|
#include <QSet>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
struct qmlDep {
|
struct qmlDep {
|
||||||
@ -16,7 +17,10 @@ private:
|
|||||||
bool extractImportsFromDir(const QString &path, qmlDep& dep, bool recursive = false);
|
bool extractImportsFromDir(const QString &path, qmlDep& dep, bool recursive = false);
|
||||||
QString getPathFromImport(const QString& import);
|
QString getPathFromImport(const QString& import);
|
||||||
|
|
||||||
|
bool scanQmlTree(const QString& qmlTree);
|
||||||
|
|
||||||
QString _qmlRoot = "";
|
QString _qmlRoot = "";
|
||||||
|
QSet<QString> secondVersions;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QML(const QString& qmlRoot);
|
QML(const QString& qmlRoot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user