From 5046edd41010c3b116e4d6c12bab82a9f12b8592 Mon Sep 17 00:00:00 2001 From: Edwin Hoogerbeets Date: Sat, 21 Dec 2024 17:18:20 -0800 Subject: [PATCH] Remove the Qt files from this repo - all files moved over to the qt-ilib repo instead --- Gruntfile.js | 10 +- build.xml | 4 +- qt/FileReader/ILib.qml | 11 - qt/FileReader/data.json | 1 - qt/FileReader/filereader-webos.pro | 37 -- qt/FileReader/filereader.cpp | 101 ---- qt/FileReader/filereader.h | 26 - qt/FileReader/filereader.pro | 45 -- qt/FileReader/filereader.pro.user | 268 --------- qt/FileReader/filereader.pro.user.18 | 208 ------- qt/FileReader/filereader.pro.user.3.2-pre1 | 259 --------- qt/FileReader/filereader_plugin.cpp | 23 - qt/FileReader/filereader_plugin.h | 16 - qt/FileReader/main.qml | 31 -- qt/FileReader/moc_filereader.cpp | 137 ----- qt/FileReader/moc_filereader_plugin.cpp | 152 ------ qt/FileReader/qmldir | 3 - qt/FileReader/qmldir.webos | 4 - qt/NodeunitTest/NodeunitRun.qmlproject | 20 - qt/NodeunitTest/NodeunitRunAll.qml | 50 -- qt/NodeunitTest/NodeunitRun_address.qml | 30 - qt/NodeunitTest/NodeunitRun_calendar.qml | 30 - qt/NodeunitTest/NodeunitRun_collate.qml | 30 - qt/NodeunitTest/NodeunitRun_ctype.qml | 30 - qt/NodeunitTest/NodeunitRun_date.qml | 30 - qt/NodeunitTest/NodeunitRun_daterange.qml | 30 - qt/NodeunitTest/NodeunitRun_durfmt.qml | 30 - qt/NodeunitTest/NodeunitRun_maps.qml | 30 - qt/NodeunitTest/NodeunitRun_name.qml | 30 - qt/NodeunitTest/NodeunitRun_number.qml | 30 - qt/NodeunitTest/NodeunitRun_phone.qml | 30 - qt/NodeunitTest/NodeunitRun_root.qml | 30 - qt/NodeunitTest/NodeunitRun_strings_ext.qml | 30 - qt/NodeunitTest/NodeunitRun_units.qml | 30 - qt/NodeunitTest/NodeunitRun_util.qml | 30 - qt/NodeunitTest/TestEnvironment.qml | 32 -- qt/NodeunitTest/TestSuiteModule.js | 65 --- qt/NodeunitTest/runner.js | 51 -- qt/build.properties | 21 - qt/build.xml | 572 -------------------- 40 files changed, 7 insertions(+), 2590 deletions(-) delete mode 100644 qt/FileReader/ILib.qml delete mode 100644 qt/FileReader/data.json delete mode 100644 qt/FileReader/filereader-webos.pro delete mode 100644 qt/FileReader/filereader.cpp delete mode 100644 qt/FileReader/filereader.h delete mode 100644 qt/FileReader/filereader.pro delete mode 100644 qt/FileReader/filereader.pro.user delete mode 100644 qt/FileReader/filereader.pro.user.18 delete mode 100644 qt/FileReader/filereader.pro.user.3.2-pre1 delete mode 100644 qt/FileReader/filereader_plugin.cpp delete mode 100644 qt/FileReader/filereader_plugin.h delete mode 100644 qt/FileReader/main.qml delete mode 100644 qt/FileReader/moc_filereader.cpp delete mode 100644 qt/FileReader/moc_filereader_plugin.cpp delete mode 100644 qt/FileReader/qmldir delete mode 100644 qt/FileReader/qmldir.webos delete mode 100644 qt/NodeunitTest/NodeunitRun.qmlproject delete mode 100644 qt/NodeunitTest/NodeunitRunAll.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_address.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_calendar.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_collate.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_ctype.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_date.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_daterange.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_durfmt.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_maps.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_name.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_number.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_phone.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_root.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_strings_ext.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_units.qml delete mode 100644 qt/NodeunitTest/NodeunitRun_util.qml delete mode 100644 qt/NodeunitTest/TestEnvironment.qml delete mode 100644 qt/NodeunitTest/TestSuiteModule.js delete mode 100644 qt/NodeunitTest/runner.js delete mode 100644 qt/build.properties delete mode 100644 qt/build.xml diff --git a/Gruntfile.js b/Gruntfile.js index cf45a9c7b0..bcc9c1154c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,7 +11,7 @@ module.exports = function(grunt) { options: {create: ['js/locale', 'js/output', 'js/output/reports', 'js/output/js', 'js/output/dyncode', 'js/output/test', 'js/output/jsdoc'] }}, export: { - options: {create: ['export', 'export/docs', 'export/js', 'export/locale', 'export/qt', 'export/tools', 'dist'] + options: {create: ['export', 'export/docs', 'export/js', 'export/locale', 'export/tools', 'dist'] }}, dist: { options: {create: ['export/js/assembled','export/js/dyncode', 'export/js/dyncode', 'export/js/jsdoc', 'export/js/jsdoc', 'export/src/js', 'export/package/lib','export/package/locale', 'export/docs/jsdoc'] @@ -88,11 +88,11 @@ module.exports = function(grunt) { }, fulltgz: { options: {archive: "dist/ilib-<%= pkg.version %>.tgz"}, - files: [{expand:true, cwd: 'export', src: ["js/*", "java/*", "locale/*", "qt/*"]}] + files: [{expand:true, cwd: 'export', src: ["js/*", "java/*", "locale/*"]}] }, nodezip: { options: {archive: 'dist/ilib-<%= pkg.version %>.zip'}, - files: [{expand:true, cwd: 'export', src: ['js/*', 'java/*', 'locale/*', 'qt/*']}] + files: [{expand:true, cwd: 'export', src: ['js/*', 'java/*', 'locale/*']}] }, srczip: { options: {archive: 'dist/ilib-<%= pkg.version %>-src.zip'}, @@ -157,7 +157,7 @@ module.exports = function(grunt) { files: [ { expand: true, cwd: 'js/lib/', - src: ['*.js', '!ilib.js', '!ilib-*.js', '!externs.js', 'datefmtstr.js', '!ilib-node*.js','!ilib-stubs*','!ilib-web.js','!ilib-qt.js'], + src: ['*.js', '!ilib.js', '!ilib-*.js', '!externs.js', 'datefmtstr.js', '!ilib-node*.js','!ilib-stubs*','!ilib-web.js'], dest: 'js/output/dyncode/', }] } @@ -305,4 +305,4 @@ module.exports = function(grunt) { grunt.registerTask('test_strings-ext_debug', ['shell:runNodeunit:debug strings-ext']); grunt.registerTask('test_units_debug', ['shell:runNodeunit:debug units']); grunt.registerTask('test_util_debug', ['shell:runNodeunit:debug util']); -}; \ No newline at end of file +}; diff --git a/build.xml b/build.xml index a668b785d2..907d1de0a5 100644 --- a/build.xml +++ b/build.xml @@ -78,7 +78,7 @@ limitations under the License. + includes="js/**,java/**,locale/**"/> @@ -94,7 +94,7 @@ limitations under the License. + includes="js/**,java/**,locale/**"/> diff --git a/qt/FileReader/ILib.qml b/qt/FileReader/ILib.qml deleted file mode 100644 index 9feb7310b5..0000000000 --- a/qt/FileReader/ILib.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 2.0 -import iLib 1.0 as I -import "/usr/share/javascript/ilib/lib/ilib-qt.js" as QtILib - -QtObject { - readonly property var require: { - console.log('ILib require initialized'); - QtILib.ilib.setLoaderCallback(new QtILib.QmlLoader(I.FileReader)); - return QtILib.require; - } -} diff --git a/qt/FileReader/data.json b/qt/FileReader/data.json deleted file mode 100644 index 8d8f1a321f..0000000000 --- a/qt/FileReader/data.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "John Doe","sex":"male","age":18} diff --git a/qt/FileReader/filereader-webos.pro b/qt/FileReader/filereader-webos.pro deleted file mode 100644 index 7f5f286408..0000000000 --- a/qt/FileReader/filereader-webos.pro +++ /dev/null @@ -1,37 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -TARGET = $$qtLibraryTarget(FileReader) - -QT += qml quick - -uri = com.jedlsoft.filesystem - -# Input -SOURCES += \ - filereader_plugin.cpp \ - filereader.cpp - -HEADERS += \ - filereader_plugin.h \ - filereader.h - -MOC_DIR = .moc -OBJECTS_DIR = .obj - - -!defined(WEBOS_INSTALL_QML, var) { - instbase = $$[QT_INSTALL_QML] -} else { - instbase = $$WEBOS_INSTALL_QML -} - -target.path = $$instbase/iLib - -INSTALLS += target - -qmldir.base = $$_PRO_FILE_PWD_ -qmldir.files = qmldir ILib.qml -qmldir.path = $$instbase/iLib -qmldir.extra = cp $$PWD/qmldir.webos $$PWD/qmldir - -INSTALLS += qmldir diff --git a/qt/FileReader/filereader.cpp b/qt/FileReader/filereader.cpp deleted file mode 100644 index 3bbd547589..0000000000 --- a/qt/FileReader/filereader.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "filereader.h" - -#include -#include -#include -#include -#include -#include -#include - -FileReader::FileReader(QQuickItem *parent): - QQuickItem(parent) -{ -} - -FileReader::~FileReader() -{ -} - -QString FileReader::currentPath() const { - return QDir::currentPath(); -} - -bool FileReader::exists(QString path) const { - QFileInfo fileInfo(path); - - if (fileInfo.exists()) - return true; - else - return false; -} - -QString FileReader::type(QString path) const { - QFileInfo fileInfo(path); - - if (fileInfo.exists()) { - if (fileInfo.isFile()) - return "file"; - else if (fileInfo.isDir()) - return "directory"; - else if (fileInfo.isSymLink()) { - return type(fileInfo.symLinkTarget()); - } - } - return ""; -} - -QVariantMap FileReader::info(QString path) const { - QVariantMap info; - QFileInfo fileInfo(path); - - if (fileInfo.exists()) { - info.insert("name", fileInfo.fileName()); - info.insert("type", type(fileInfo.canonicalFilePath())); - info.insert("size", fileInfo.size()); - info.insert("datetime", fileInfo.lastModified()); - } - return info; -} - -QString FileReader::read(QString path) const { - QFile file(path); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) - return ""; - QTextStream in(&file); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - in.setCodec("UTF-8"); -#endif - return in.readAll(); -} - -QVariantList FileReader::readBinary(QString path) const { - QVariantList arrayBuffer; - QFile file(path); - QByteArray blob; - - if (!file.open(QIODevice::ReadOnly)) - return arrayBuffer; - blob = file.readAll(); - for (int i=0; i < blob.size(); i++) { - char s = blob[i]; - arrayBuffer.push_back(QVariant(*reinterpret_cast(&s))); - } - return arrayBuffer; -} - -QVariantList FileReader::list(QString path) const { - QDir dir(path); - QVariantList entryList; - - QFileInfoList fileInfoList = dir.entryInfoList(QDir::NoFilter, QDir::NoSort); - for (QFileInfoList::iterator iter = fileInfoList.begin(); iter != fileInfoList.end(); iter++) { - QVariantMap entry; - entry.insert("name", iter->fileName()); - entry.insert("type", type(iter->canonicalFilePath())); - entry.insert("size", iter->size()); - entry.insert("datetime", iter->lastModified()); - entryList.append(entry); - } - return entryList; -} diff --git a/qt/FileReader/filereader.h b/qt/FileReader/filereader.h deleted file mode 100644 index 9081c41f5c..0000000000 --- a/qt/FileReader/filereader.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef FILEREADER_H -#define FILEREADER_H - -#include -#include - -class FileReader : public QQuickItem -{ - Q_OBJECT - Q_DISABLE_COPY(FileReader) - -public: - FileReader(QQuickItem *parent = 0); - ~FileReader(); - - Q_INVOKABLE QString currentPath() const; - Q_INVOKABLE bool exists(QString path) const; - Q_INVOKABLE QString type(QString path) const; - Q_INVOKABLE QVariantMap info(QString path) const; - Q_INVOKABLE QString read(QString path) const; - Q_INVOKABLE QVariantList readBinary(QString path) const; - Q_INVOKABLE QVariantList list(QString path) const; -}; - -#endif // FILEREADER_H - diff --git a/qt/FileReader/filereader.pro b/qt/FileReader/filereader.pro deleted file mode 100644 index c6c7644370..0000000000 --- a/qt/FileReader/filereader.pro +++ /dev/null @@ -1,45 +0,0 @@ -TEMPLATE = lib -TARGET = "FileReader" -CONFIG(debug, debug|release) { - unix: TARGET = $$join(TARGET, , , _debug) - win32: TARGET = $$join(TARGET, , , d) -} -TARGET = $$qtLibraryTarget($$TARGET) -DESTDIR = ../output/qt -QT += qml quick -CONFIG += qt plugin debug_and_release build_all -QML_IMPORT_PATH = imports - -uri = com.jedlsoft.filesystem - -# Input -SOURCES += \ - filereader_plugin.cpp \ - filereader.cpp - -HEADERS += \ - filereader_plugin.h \ - filereader.h - -DISTFILES = qmldir - -!equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target -} - -qmldir.files = qmldir -unix { - QML_IMPORT_PATH = imports - installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - qmldir.path = $$installPath - target.path = $$installPath - INSTALLS += target qmldir -} - -OTHER_FILES += \ - main.qml - diff --git a/qt/FileReader/filereader.pro.user b/qt/FileReader/filereader.pro.user deleted file mode 100644 index 4bf84522e7..0000000000 --- a/qt/FileReader/filereader.pro.user +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - EnvironmentId - {f0a89fa0-e164-47d4-b9b4-4d6d64c938c2} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - true - false - 0 - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - - ProjectExplorer.Project.Target.0 - - Desktop Qt 5.4.1 GCC 64bit - Desktop Qt 5.4.1 GCC 64bit - qt.54.gcc_64_kit - 0 - 0 - 0 - - /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/build-filereader - - - true - qmake - - QtProjectManager.QMakeBuildStep - true - false - - false - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Debug - - Qt4ProjectManager.Qt4BuildConfiguration - 2 - true - - - /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/build-filereader-Desktop_Qt_5_4_1_GCC_64bit-Release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - 2 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - Deploy locally - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - - /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/FileReader/main.qml - false - %{buildDir} - Run /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/FileReader/main.qml - - ProjectExplorer.CustomExecutableRunConfiguration - 3768 - false - true - false - false - true - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 18 - - - Version - 18 - - diff --git a/qt/FileReader/filereader.pro.user.18 b/qt/FileReader/filereader.pro.user.18 deleted file mode 100644 index a00d1c3b89..0000000000 --- a/qt/FileReader/filereader.pro.user.18 +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - EnvironmentId - {61e674c1-2aaa-452d-909f-7f58e6c17618} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - true - false - 0 - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - - ProjectExplorer.Project.Target.0 - - Qt 5.4.1 (Qt-5.4.1) - Qt 5.4.1 (Qt-5.4.1) - {19940a30-f222-4a37-9c91-76ec630689be} - 0 - 0 - 0 - - /Users/jongsoolee/current/20150318-dynilib/build-filereader-Qt_5_4_1_Qt_5_4_1-Release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - 1 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - Deploy locally - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - - - false - %{buildDir} - Custom Executable - - ProjectExplorer.CustomExecutableRunConfiguration - 3768 - false - true - false - false - true - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 18 - - - Version - 18 - - diff --git a/qt/FileReader/filereader.pro.user.3.2-pre1 b/qt/FileReader/filereader.pro.user.3.2-pre1 deleted file mode 100644 index f6ff6e7b20..0000000000 --- a/qt/FileReader/filereader.pro.user.3.2-pre1 +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - true - 1 - true - 0 - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop - {5e91ec2f-b512-4033-bb53-9eb3616ade88} - 0 - 0 - 0 - - /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/debug - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Debug - - Qt4ProjectManager.Qt4BuildConfiguration - 2 - true - - - /mnt/Terasaur/root/home/edwin/src/ilib-sf-refactor/qt/release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - 2 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - Deploy locally - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - - /home/edwin/src/ilib-sf-refactor/qt/FileReader/main.qml - false - %{buildDir} - Run /home/edwin/src/ilib-sf-refactor/qt/FileReader/main.qml - - ProjectExplorer.CustomExecutableRunConfiguration - 3768 - true - false - false - true - false - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.EnvironmentId - {f0a89fa0-e164-47d4-b9b4-4d6d64c938c2} - - - ProjectExplorer.Project.Updater.FileVersion - 15 - - diff --git a/qt/FileReader/filereader_plugin.cpp b/qt/FileReader/filereader_plugin.cpp deleted file mode 100644 index 0c53d45fcf..0000000000 --- a/qt/FileReader/filereader_plugin.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "filereader_plugin.h" -#include "filereader.h" - -#include -#include - -static QObject *singletonTypeFactory(QQmlEngine *engine, QJSEngine *scriptEngine) -{ - Q_UNUSED(engine) - Q_UNUSED(scriptEngine) - - FileReader *example = new FileReader(); - return example; -} - -void FileReaderPlugin::registerTypes(const char *uri) -{ - // @uri com.jedlsoft.filereader - // qmlRegisterType(uri, 1, 0, "FileReader"); - qmlRegisterSingletonType(uri, 1, 0, "FileReader", singletonTypeFactory); -} - - diff --git a/qt/FileReader/filereader_plugin.h b/qt/FileReader/filereader_plugin.h deleted file mode 100644 index 0397c1082b..0000000000 --- a/qt/FileReader/filereader_plugin.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef FILEREADER_PLUGIN_H -#define FILEREADER_PLUGIN_H - -#include - -class FileReaderPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "com.jedlsoft.filesystem") - -public: - void registerTypes(const char *uri); -}; - -#endif // FILEREADER_PLUGIN_H - diff --git a/qt/FileReader/main.qml b/qt/FileReader/main.qml deleted file mode 100644 index d6d67a72c8..0000000000 --- a/qt/FileReader/main.qml +++ /dev/null @@ -1,31 +0,0 @@ -import QtQuick 2.0 -import FS 1.0 as FS - -Rectangle { - width: 800 - height: 600 - - Text { - id: display - - anchors.fill: parent - text: "Hello!" - } - - Component.onCompleted: { - var currentPath = FS.FileReader.currentPath(); - display.text += ("# currentPath: "+FS.currentPath+"\n"); - display.text += ("# exist data.json: "+FS.FileReader.exists("data.json")+"\n"); - display.text += ("# type data.json: "+FS.FileReader.type("data.json")+"\n"); - var list = FS.FileReader.list(currentPath); - display.text += ("# list of current folder\n"); - for (var idx in list) { - display.text += (" - "+list[idx].name+": "+list[idx].type+" "+list[idx].size+" "+list[idx].datetime+"\n"); - } - display.text += ("# read data.json\n"); - var json = FS.FileReader.read("data.json"); - display.text += (json+"\n"); - var parsed = JSON.parse(json); - display.text += ("# parsed json: name: "+parsed.name+" age: "+parsed.age+" sex: "+parsed.sex+"\n"); - } -} diff --git a/qt/FileReader/moc_filereader.cpp b/qt/FileReader/moc_filereader.cpp deleted file mode 100644 index de4725287f..0000000000 --- a/qt/FileReader/moc_filereader.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'filereader.h' -** -** Created by: The Qt Meta Object Compiler version 67 (Qt 5.4.1) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "filereader.h" -#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'filereader.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 67 -#error "This file was generated using the moc from 5.4.1. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -struct qt_meta_stringdata_FileReader_t { - QByteArrayData data[9]; - char stringdata[55]; -}; -#define QT_MOC_LITERAL(idx, ofs, len) \ - Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ - qptrdiff(offsetof(qt_meta_stringdata_FileReader_t, stringdata) + ofs \ - - idx * sizeof(QByteArrayData)) \ - ) -static const qt_meta_stringdata_FileReader_t qt_meta_stringdata_FileReader = { - { -QT_MOC_LITERAL(0, 0, 10), // "FileReader" -QT_MOC_LITERAL(1, 11, 11), // "currentPath" -QT_MOC_LITERAL(2, 23, 0), // "" -QT_MOC_LITERAL(3, 24, 5), // "exist" -QT_MOC_LITERAL(4, 30, 4), // "path" -QT_MOC_LITERAL(5, 35, 4), // "type" -QT_MOC_LITERAL(6, 40, 4), // "info" -QT_MOC_LITERAL(7, 45, 4), // "read" -QT_MOC_LITERAL(8, 50, 4) // "list" - - }, - "FileReader\0currentPath\0\0exist\0path\0" - "type\0info\0read\0list" -}; -#undef QT_MOC_LITERAL - -static const uint qt_meta_data_FileReader[] = { - - // content: - 7, // revision - 0, // classname - 0, 0, // classinfo - 6, 14, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - 0, // flags - 0, // signalCount - - // methods: name, argc, parameters, tag, flags - 1, 0, 44, 2, 0x02 /* Public */, - 3, 1, 45, 2, 0x02 /* Public */, - 5, 1, 48, 2, 0x02 /* Public */, - 6, 1, 51, 2, 0x02 /* Public */, - 7, 1, 54, 2, 0x02 /* Public */, - 8, 1, 57, 2, 0x02 /* Public */, - - // methods: parameters - QMetaType::QString, - QMetaType::Bool, QMetaType::QString, 4, - QMetaType::QString, QMetaType::QString, 4, - QMetaType::QVariantMap, QMetaType::QString, 4, - QMetaType::QString, QMetaType::QString, 4, - QMetaType::QVariantList, QMetaType::QString, 4, - - 0 // eod -}; - -void FileReader::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) -{ - if (_c == QMetaObject::InvokeMetaMethod) { - FileReader *_t = static_cast(_o); - switch (_id) { - case 0: { QString _r = _t->currentPath(); - if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; } break; - case 1: { bool _r = _t->exist((*reinterpret_cast< QString(*)>(_a[1]))); - if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; - case 2: { QString _r = _t->type((*reinterpret_cast< QString(*)>(_a[1]))); - if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; } break; - case 3: { QVariantMap _r = _t->info((*reinterpret_cast< QString(*)>(_a[1]))); - if (_a[0]) *reinterpret_cast< QVariantMap*>(_a[0]) = _r; } break; - case 4: { QString _r = _t->read((*reinterpret_cast< QString(*)>(_a[1]))); - if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; } break; - case 5: { QVariantList _r = _t->list((*reinterpret_cast< QString(*)>(_a[1]))); - if (_a[0]) *reinterpret_cast< QVariantList*>(_a[0]) = _r; } break; - default: ; - } - } -} - -const QMetaObject FileReader::staticMetaObject = { - { &QQuickItem::staticMetaObject, qt_meta_stringdata_FileReader.data, - qt_meta_data_FileReader, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} -}; - - -const QMetaObject *FileReader::metaObject() const -{ - return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; -} - -void *FileReader::qt_metacast(const char *_clname) -{ - if (!_clname) return Q_NULLPTR; - if (!strcmp(_clname, qt_meta_stringdata_FileReader.stringdata)) - return static_cast(const_cast< FileReader*>(this)); - return QQuickItem::qt_metacast(_clname); -} - -int FileReader::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QQuickItem::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 6) - qt_static_metacall(this, _c, _id, _a); - _id -= 6; - } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 6) - *reinterpret_cast(_a[0]) = -1; - _id -= 6; - } - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/qt/FileReader/moc_filereader_plugin.cpp b/qt/FileReader/moc_filereader_plugin.cpp deleted file mode 100644 index 222efe2aa4..0000000000 --- a/qt/FileReader/moc_filereader_plugin.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'filereader_plugin.h' -** -** Created by: The Qt Meta Object Compiler version 67 (Qt 5.4.1) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "filereader_plugin.h" -#include -#include -#include -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'filereader_plugin.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 67 -#error "This file was generated using the moc from 5.4.1. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -struct qt_meta_stringdata_FileReaderPlugin_t { - QByteArrayData data[1]; - char stringdata[17]; -}; -#define QT_MOC_LITERAL(idx, ofs, len) \ - Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ - qptrdiff(offsetof(qt_meta_stringdata_FileReaderPlugin_t, stringdata) + ofs \ - - idx * sizeof(QByteArrayData)) \ - ) -static const qt_meta_stringdata_FileReaderPlugin_t qt_meta_stringdata_FileReaderPlugin = { - { -QT_MOC_LITERAL(0, 0, 16) // "FileReaderPlugin" - - }, - "FileReaderPlugin" -}; -#undef QT_MOC_LITERAL - -static const uint qt_meta_data_FileReaderPlugin[] = { - - // content: - 7, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - 0, // flags - 0, // signalCount - - 0 // eod -}; - -void FileReaderPlugin::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) -{ - Q_UNUSED(_o); - Q_UNUSED(_id); - Q_UNUSED(_c); - Q_UNUSED(_a); -} - -const QMetaObject FileReaderPlugin::staticMetaObject = { - { &QQmlExtensionPlugin::staticMetaObject, qt_meta_stringdata_FileReaderPlugin.data, - qt_meta_data_FileReaderPlugin, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} -}; - - -const QMetaObject *FileReaderPlugin::metaObject() const -{ - return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; -} - -void *FileReaderPlugin::qt_metacast(const char *_clname) -{ - if (!_clname) return Q_NULLPTR; - if (!strcmp(_clname, qt_meta_stringdata_FileReaderPlugin.stringdata)) - return static_cast(const_cast< FileReaderPlugin*>(this)); - return QQmlExtensionPlugin::qt_metacast(_clname); -} - -int FileReaderPlugin::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QQmlExtensionPlugin::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} - -QT_PLUGIN_METADATA_SECTION const uint qt_section_alignment_dummy = 42; - -#ifdef QT_NO_DEBUG - -QT_PLUGIN_METADATA_SECTION -static const unsigned char qt_pluginMetaData[] = { - 'Q', 'T', 'M', 'E', 'T', 'A', 'D', 'A', 'T', 'A', ' ', ' ', - 0x71, 0x62, 0x6a, 0x73, 0x01, 0x00, 0x00, 0x00, - 0x9c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x88, 0x00, 0x00, 0x00, 0x1b, 0x03, 0x00, 0x00, - 0x03, 0x00, 0x49, 0x49, 0x44, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x67, - 0x65, 0x2e, 0x77, 0x65, 0x62, 0x2e, 0x69, 0x6c, - 0x69, 0x62, 0x00, 0x00, 0x9b, 0x07, 0x00, 0x00, - 0x09, 0x00, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, - 0x61, 0x6d, 0x65, 0x00, 0x10, 0x00, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x00, 0x00, - 0x3a, 0x80, 0xa0, 0x00, 0x07, 0x00, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x00, 0x95, 0x0f, 0x00, 0x00, - 0x08, 0x00, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, - 0x74, 0x61, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x50, 0x00, 0x00, 0x00 -}; - -#else // QT_NO_DEBUG - -QT_PLUGIN_METADATA_SECTION -static const unsigned char qt_pluginMetaData[] = { - 'Q', 'T', 'M', 'E', 'T', 'A', 'D', 'A', 'T', 'A', ' ', ' ', - 0x71, 0x62, 0x6a, 0x73, 0x01, 0x00, 0x00, 0x00, - 0x9c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x88, 0x00, 0x00, 0x00, 0x1b, 0x03, 0x00, 0x00, - 0x03, 0x00, 0x49, 0x49, 0x44, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x67, - 0x65, 0x2e, 0x77, 0x65, 0x62, 0x2e, 0x69, 0x6c, - 0x69, 0x62, 0x00, 0x00, 0x95, 0x07, 0x00, 0x00, - 0x08, 0x00, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, - 0x74, 0x61, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1b, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x00, - 0x10, 0x00, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x64, 0x65, 0x62, 0x75, 0x67, 0x00, - 0x3a, 0x80, 0xa0, 0x00, 0x07, 0x00, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x00, 0x00 -}; -#endif // QT_NO_DEBUG - -QT_MOC_EXPORT_PLUGIN(FileReaderPlugin, FileReaderPlugin) - -QT_END_MOC_NAMESPACE diff --git a/qt/FileReader/qmldir b/qt/FileReader/qmldir deleted file mode 100644 index aeb460d33f..0000000000 --- a/qt/FileReader/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -module FS -plugin FileReader -classname FileReader diff --git a/qt/FileReader/qmldir.webos b/qt/FileReader/qmldir.webos deleted file mode 100644 index 88d6e7ae55..0000000000 --- a/qt/FileReader/qmldir.webos +++ /dev/null @@ -1,4 +0,0 @@ -module iLib - -plugin FileReader -ILib 1.0 ILib.qml diff --git a/qt/NodeunitTest/NodeunitRun.qmlproject b/qt/NodeunitTest/NodeunitRun.qmlproject deleted file mode 100644 index fac60933f9..0000000000 --- a/qt/NodeunitTest/NodeunitRun.qmlproject +++ /dev/null @@ -1,20 +0,0 @@ -/* File generated by Qt Creator */ - -import QmlProject 1.1 - -Project { - mainFile: "NodeunitRunAll.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - importPaths: [ "../FileReader/imports" ] -} diff --git a/qt/NodeunitTest/NodeunitRunAll.qml b/qt/NodeunitTest/NodeunitRunAll.qml deleted file mode 100644 index d5c0108ae3..0000000000 --- a/qt/NodeunitTest/NodeunitRunAll.qml +++ /dev/null @@ -1,50 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - var startTime = new Date(); - - var suiteDefinitions = { - "address": "/address/testSuiteFiles.js", - "calendar": "/calendar/testSuiteFiles.js", - "collate": "/collate/testSuiteFiles.js", /* It takes almost 11 minutes. */ - "ctype": "/ctype/testSuiteFiles.js", - "date": "/date/testSuiteFiles.js", - "daterange": "/daterange/testSuiteFiles.js", - "durfmt": "/durfmt/testSuiteFiles.js", - "name": "/name/testSuiteFiles.js", - "number": "/number/testSuiteFiles.js", - "maps": "/maps/testSuiteFiles.js", - "phone": "/phone/testSuiteFiles.js", - "root": "/root/testSuiteFiles.js", - "strings-ext": "/strings-ext/testSuiteFiles.js", - "units": "/units/testSuiteFiles.js", - "util": "/util/testSuiteFiles.js" - }; - console.log("<<<<< Start time of full test: " + startTime.getHours() +":"+ startTime.getMinutes() +":"+ startTime.getSeconds()+ " >>>>>"); - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - var endTime = new Date(); - var timeGap = (endTime.getTime() - startTime.getTime())/1000; - console.log("<<<<< End time of full test: " + endTime.getHours() +":"+ endTime.getMinutes() +":"+ endTime.getSeconds()+ " >>>>>"); - console.log("<<<<< Total Elapse Time: " + timeGap + " seconds >>>>>"); - - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_address.qml b/qt/NodeunitTest/NodeunitRun_address.qml deleted file mode 100644 index de9b7eef20..0000000000 --- a/qt/NodeunitTest/NodeunitRun_address.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "address": "/address/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_calendar.qml b/qt/NodeunitTest/NodeunitRun_calendar.qml deleted file mode 100644 index 5596a3674c..0000000000 --- a/qt/NodeunitTest/NodeunitRun_calendar.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "calendar": "/calendar/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_collate.qml b/qt/NodeunitTest/NodeunitRun_collate.qml deleted file mode 100644 index efccc6584c..0000000000 --- a/qt/NodeunitTest/NodeunitRun_collate.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "collate": "/collate/testSuiteFiles.js" /* Note.It takes almost 11 minutes. */ - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_ctype.qml b/qt/NodeunitTest/NodeunitRun_ctype.qml deleted file mode 100644 index 465bd65df7..0000000000 --- a/qt/NodeunitTest/NodeunitRun_ctype.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "ctype": "/ctype/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_date.qml b/qt/NodeunitTest/NodeunitRun_date.qml deleted file mode 100644 index 1bfa570851..0000000000 --- a/qt/NodeunitTest/NodeunitRun_date.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "date": "/date/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_daterange.qml b/qt/NodeunitTest/NodeunitRun_daterange.qml deleted file mode 100644 index 7eb79114b3..0000000000 --- a/qt/NodeunitTest/NodeunitRun_daterange.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "daterange": "/daterange/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_durfmt.qml b/qt/NodeunitTest/NodeunitRun_durfmt.qml deleted file mode 100644 index c0a3b6edaa..0000000000 --- a/qt/NodeunitTest/NodeunitRun_durfmt.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "durfmt": "/durfmt/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_maps.qml b/qt/NodeunitTest/NodeunitRun_maps.qml deleted file mode 100644 index c41596e5ce..0000000000 --- a/qt/NodeunitTest/NodeunitRun_maps.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "maps": "/maps/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_name.qml b/qt/NodeunitTest/NodeunitRun_name.qml deleted file mode 100644 index 20834f4c9d..0000000000 --- a/qt/NodeunitTest/NodeunitRun_name.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "name": "/name/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_number.qml b/qt/NodeunitTest/NodeunitRun_number.qml deleted file mode 100644 index 802f109f9b..0000000000 --- a/qt/NodeunitTest/NodeunitRun_number.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "number": "/number/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_phone.qml b/qt/NodeunitTest/NodeunitRun_phone.qml deleted file mode 100644 index 5eb5f83f72..0000000000 --- a/qt/NodeunitTest/NodeunitRun_phone.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "phone": "/phone/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_root.qml b/qt/NodeunitTest/NodeunitRun_root.qml deleted file mode 100644 index 8ff6b889fd..0000000000 --- a/qt/NodeunitTest/NodeunitRun_root.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "root": "/root/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_strings_ext.qml b/qt/NodeunitTest/NodeunitRun_strings_ext.qml deleted file mode 100644 index 01dc27117d..0000000000 --- a/qt/NodeunitTest/NodeunitRun_strings_ext.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "strings-ext": "/strings-ext/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_units.qml b/qt/NodeunitTest/NodeunitRun_units.qml deleted file mode 100644 index f3d59a3dd8..0000000000 --- a/qt/NodeunitTest/NodeunitRun_units.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "units": "/units/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/NodeunitRun_util.qml b/qt/NodeunitTest/NodeunitRun_util.qml deleted file mode 100644 index 05a1a2dac7..0000000000 --- a/qt/NodeunitTest/NodeunitRun_util.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.5 -import "TestSuiteModule.js" as TestSuiteModule -import "runner.js" as TestRunnerModule - -QtObject { - property Timer timer: Timer { - interval: 500 - running: true - onTriggered: { - - var TestSuite = TestSuiteModule.TestSuite; - var TestRunner = TestRunnerModule.TestRunner; - var runner = new TestRunner(); - - var suiteDefinitions = { - "util": "/util/testSuiteFiles.js" - }; - - var s, ts; - for (s in suiteDefinitions) { - ts = new TestSuite(suiteDefinitions[s], s); - //console.log("[NodeunitRun.qml] <<<<< name: " + s + " "+ suiteDefinitions[s]); - runner.addSuite(ts); - } - runner.runTests(); - console.log("\n *************************** All iLib tests on QML are done. ***********************************"); - Qt.quit(); - } - } -} diff --git a/qt/NodeunitTest/TestEnvironment.qml b/qt/NodeunitTest/TestEnvironment.qml deleted file mode 100644 index 1b84ae7c27..0000000000 --- a/qt/NodeunitTest/TestEnvironment.qml +++ /dev/null @@ -1,32 +0,0 @@ -import QtQuick 2.0 -import FS 1.0 as FS -import "../../js/lib/ilib-qt.js" as QtIlib -import "../../js/test/nodeunit/nodeunit-qml.js" as Nodeunit - -QtObject { - id: thisObj - property string path: "" - property string moduleName: "" - property var ilib: ({}) - property var require: ({}) - - Component.onCompleted: { - //console.log(">>>>>>>>>>>> [TestEnvironment.qml] new context. Loading in a fresh copy of ilib."); - console.log("[TestEnvironment.qml] (path) : " + path + " (moduleName): " + moduleName); - - ilib = QtIlib.ilib; - var loader = new QtIlib.QmlLoader(FS.FileReader); - ilib.setLoaderCallback(loader); - require = QtIlib.require; - - var testSuites, runTest, i; - testSuites = require("qmltest", path); - - for (i=0; i < testSuites["files"].length; i++) { - //console.log("fileNames...." + testSuites["files"][i]); - runTest = require("qmltest", "/" + moduleName + "/"+ testSuites["files"][i]); - Nodeunit.nodeunit.run(runTest) - } - Nodeunit.nodeunit.finish(); - } -} diff --git a/qt/NodeunitTest/TestSuiteModule.js b/qt/NodeunitTest/TestSuiteModule.js deleted file mode 100644 index 0034c36ecf..0000000000 --- a/qt/NodeunitTest/TestSuiteModule.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - * TestSuiteModule.js - Define the TestSuite class to run JsUnit tests under Qt/QML - * - * Copyright © 2015, JEDLSoft - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -function TestSuite(pathname, name) { - this.moduleName = name; - this.path = pathname; - //console.log("[TestSuiteModule.js] new test suite (name) " + this.name + " (path)" + this.path); -}; - -TestSuite.prototype = { - /** - * Add the given subsuite, and run it for the given number of - * iterations. If iterations is not specified or if it is a number - * less than 0, iterations will assumed to be 1. - * - * @param suite {TestSuite} suite to add - * @param iterations {number|undefined} number of times to run the suite - */ - addSuite: function (suite, iterations) { - this.subSuites.push({ - tests: suite, - iterations: (typeof(iterations) === 'number' && iterations > 0) ? iterations : 1 - }); - }, - - runTests: function() { - //console.log("[TestSuiteModule.js] TestSuite.runTests: for suite (this.moduleName) " + this.moduleName); - var suiteComponent = Qt.createComponent("./TestEnvironment.qml"); - if (suiteComponent.status !== Component.Ready) { - if (suiteComponent.status === Component.Error) - console.debug("[TestSuiteModules.js] TestSuite.runTests: Error: "+ suiteComponent.errorString()); - return; // or maybe throw - } - var suiteRunner = suiteComponent.createObject(null, { - path: this.path, - moduleName: this.moduleName - }); - if (suiteRunner === null) { - console.log("TestSuite.runTests: failed to run test suite " + this.path); - } - } -}; - -if (!module) { - var module = { - exports: {} - }; -} -module.exports = TestSuite; diff --git a/qt/NodeunitTest/runner.js b/qt/NodeunitTest/runner.js deleted file mode 100644 index 5a5ff25cfa..0000000000 --- a/qt/NodeunitTest/runner.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * runner.js - ilib CLI test framework to run JsUnit tests under Qt/QML - * - * Copyright © 2015, JEDLSoft - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Create a new test runner instance. This class runs the actual tests and - * collects the results, and summarizes them when it is done. - * - * @class - * @constructor - * @param {string|ilib.String=} string initialize this instance with this string - */ -function TestRunner() { - this.subSuites = []; -}; - -TestRunner.prototype = { - runTests: function() { - this.subSuites.forEach(function (suite) { - console.log("[runner.js] runTests: running suite " + suite.path); - suite.runTests(); - }.bind(this)); - }, - - addSuite: function (suite) { - //console.log("[runner.js] addSuite: (" + suite.path + ")"); - this.subSuites.push(suite); - } -}; - -if (!module) { - var module = { - exports: {} - }; -} -module.exports = TestRunner; diff --git a/qt/build.properties b/qt/build.properties deleted file mode 100644 index 6100f98337..0000000000 --- a/qt/build.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright © 2015, JEDLSoft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Where is your Qt installed? -QTDIR=/opt/qt55 - -# modify this for your platform -QTBIN=/opt/qt55/bin diff --git a/qt/build.xml b/qt/build.xml deleted file mode 100644 index 97386d5b00..0000000000 --- a/qt/build.xml +++ /dev/null @@ -1,572 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file