mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-02 11:17:39 +08:00
Compare commits
2 Commits
e4765ab706
...
ff89677687
Author | SHA1 | Date | |
---|---|---|---|
|
ff89677687 | ||
|
bd7876b23b |
2
3rdparty/Qt5QMLPlugin
vendored
2
3rdparty/Qt5QMLPlugin
vendored
@ -1 +1 @@
|
||||
Subproject commit f056abc43282cb7b652aa04e3ee3b0a60f2b85f6
|
||||
Subproject commit c258660e71fb345d6c892719ce638c1f6632e623
|
@ -19,9 +19,8 @@
|
||||
#include "src/helper/InitializrHelper.h"
|
||||
#include "src/helper/TranslateHelper.h"
|
||||
#include "src/helper/Network.h"
|
||||
#include <QDirIterator>
|
||||
#ifdef FLUENTUI_BUILD_STATIC_LIB
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
#define Q_IMPORT_QML_PLUGIN(PLUGIN) \
|
||||
Q_IMPORT_PLUGIN(PLUGIN)
|
||||
extern void qml_static_register_types_FluentUI();
|
||||
@ -32,38 +31,6 @@ Q_IMPORT_QML_PLUGIN(FluentUIPlugin)
|
||||
#ifdef WIN32
|
||||
#include "app_dmp.h"
|
||||
#endif
|
||||
|
||||
void listFiles(const QString &path) {
|
||||
QDir dir(path);
|
||||
// 设置过滤器以包括目录和文件,排除符号链接
|
||||
dir.setFilter(QDir::Files | QDir::Dirs);
|
||||
// 获取目录和文件信息列表
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
|
||||
for (const QFileInfo &fileInfo : list) {
|
||||
if (fileInfo.isDir()) {
|
||||
// 如果是目录,则递归调用listFiles
|
||||
listFiles(fileInfo.absoluteFilePath());
|
||||
} else {
|
||||
// 输出文件名称
|
||||
qDebug() << "文件名: " << fileInfo.fileName();
|
||||
QFile file(fileInfo.absoluteFilePath());
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
continue;
|
||||
|
||||
QTextStream in(&file);
|
||||
// 输出文件内容
|
||||
qDebug() << "文件内容: ";
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine();
|
||||
qDebug() << line;
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const char *uri = "example";
|
||||
@ -113,7 +80,9 @@ int main(int argc, char *argv[])
|
||||
qmlRegisterUncreatableMetaObject(NetworkType::staticMetaObject, uri, major, minor, "NetworkType", "Access to enums & flags only");
|
||||
QQmlApplicationEngine engine;
|
||||
#ifdef FLUENTUI_BUILD_STATIC_LIB
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
qml_static_register_types_FluentUI();
|
||||
#endif
|
||||
#endif
|
||||
TranslateHelper::getInstance()->init(&engine);
|
||||
engine.rootContext()->setContextProperty("AppInfo",AppInfo::getInstance());
|
||||
|
Loading…
Reference in New Issue
Block a user