New upstream version 5.4.13
authorClay Stan <liuyong@uniontech.com>
Sun, 25 Apr 2021 09:01:30 +0000 (17:01 +0800)
committerClay Stan <liuyong@uniontech.com>
Sun, 25 Apr 2021 09:01:30 +0000 (17:01 +0800)
48 files changed:
.packit.yaml [new file with mode: 0644]
cmake/Dtk/DtkConfig.cmake [deleted file]
debian/api.json
debian/control
debian/libdtkcore5.install
debian/rules
dtk_build_config.prf
dtkcore.pro
rpm/dtkcore.spec
src/com.deepin.dtk.gschema.xml [deleted file]
src/dsysinfo.cpp
src/dsysinfo.h
src/dtk_build.prf [deleted file]
src/dtk_lib.prf [deleted file]
src/dtk_qmake.prf [deleted file]
src/dtk_translation.prf [deleted file]
src/log/LogManager.cpp
src/src.pro
src/util/dvtablehook.cpp
tests/data.qrc [new file with mode: 0644]
tests/data/dt-settings.json [new file with mode: 0644]
tests/ddesktopentry/CMakeLists.txt [deleted file]
tests/ddesktopentry/ddesktopentry.pro
tests/ddesktopentry/tst_ddesktopentrytest.cpp [deleted file]
tests/dthreadutils/dthreadutils.pro
tests/dthreadutils/tst_dthreadutils.cpp [deleted file]
tests/dutils/data.qrc [deleted file]
tests/dutils/data/dt-settings.json [deleted file]
tests/dutils/dutils.pro
tests/dutils/dutiltester.cpp [deleted file]
tests/dutils/dutiltester.h [deleted file]
tests/dutils/main.cpp [deleted file]
tests/dutils/singletontester.cpp [deleted file]
tests/dutils/singletontester.h [deleted file]
tests/dvtablehook/dvtablehook.pro
tests/dvtablehook/tst_dvtablehook.cpp [deleted file]
tests/main.cpp [new file with mode: 0644]
tests/test-recoverage-qmake.sh [new file with mode: 0755]
tests/tests.pro
tests/ut_ddesktopentrytest.cpp [new file with mode: 0644]
tests/ut_dthreadutils.cpp [new file with mode: 0644]
tests/ut_dutil.cpp [new file with mode: 0644]
tests/ut_dutil.h [new file with mode: 0644]
tests/ut_dvtablehook.cpp [new file with mode: 0644]
tests/ut_singleton.cpp [new file with mode: 0644]
tests/ut_singleton.h [new file with mode: 0644]
tools/deepin-os-release/deepin-os-release.pro
tools/settings/settings.pro

diff --git a/.packit.yaml b/.packit.yaml
new file mode 100644 (file)
index 0000000..307fc7c
--- /dev/null
@@ -0,0 +1,17 @@
+# See the documentation for more information:
+# https://packit.dev/docs/configuration/
+
+specfile_path: rpm/dtkcore.spec
+
+# add or remove files that should be synced
+synced_files:
+    - rpm/dtkcore.spec
+    - .packit.yaml
+
+upstream_package_name: dtkcore
+# downstream (Fedora) RPM package name
+downstream_package_name: dtkcore
+
+actions:
+  fix-spec-file: |
+    bash -c "sed -i -r \"0,/Version:/ s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/dtkcore.spec"
diff --git a/cmake/Dtk/DtkConfig.cmake b/cmake/Dtk/DtkConfig.cmake
deleted file mode 100644 (file)
index 1f4022c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-foreach(module ${Dtk_FIND_COMPONENTS})
-    find_package(Dtk${module})
-endforeach()
index 8246f284818f6131dec7d37693cd71bd5bfbbe8f..42807a507b9b9c00af74926ee861ca05bcd32f2e 100755 (executable)
@@ -1,45 +1,47 @@
 {"Filepath":"src/ddesktopentry.h","Functions":[{"Uniquefunname":"    Q_ENUM(Status)","Funname":"Q_ENUM","Returntype":"","Args":"Status"},{"Uniquefunname":"QString comment()","Funname":"comment","Returntype":"QString","Args":""},{"Uniquefunname":"QString ddeDisplayName()","Funname":"ddeDisplayName","Returntype":"QString","Args":""},{"Uniquefunname":"QString \u0026 escape(QString \u0026 str)","Funname":"escape","Returntype":"QString \u0026","Args":"QString \u0026 str"},{"Uniquefunname":"QString \u0026 escapeExec(QString \u0026 str)","Funname":"escapeExec","Returntype":"QString \u0026","Args":"QString \u0026 str"},{"Uniquefunname":"QString genericName()","Funname":"genericName","Returntype":"QString","Args":""},{"Uniquefunname":"QString name()","Funname":"name","Returntype":"QString","Args":""},{"Uniquefunname":"bool save()","Funname":"save","Returntype":"bool","Args":""},{"Uniquefunname":"protected setStatus(const Status \u0026 status)","Funname":"setStatus","Returntype":"protected","Args":"const Status \u0026 status"},{"Uniquefunname":"Status status()","Funname":"status","Returntype":"Status","Args":""},{"Uniquefunname":"QString \u0026 unescapeExec(QString \u0026 str)","Funname":"unescapeExec","Returntype":"QString \u0026","Args":"QString \u0026 str"},{"Uniquefunname":" ~DDesktopEntry()","Funname":"~DDesktopEntry","Returntype":"","Args":""}],"Records":[{"Name":"enum:Status","Fields":["AccessError","FormatError","NoError"]},{"Name":"enum:EntryType","Fields":["Application","Directory","FSDevice","Link","Service","ServiceType","Unknown"]},{"Name":"enum:ValueType","Fields":["Boolean","NotExisted","Numeric","String","Strings","Unparsed"]}]}
 {"Filepath":"src/dsecurestring.h","Functions":[{"Uniquefunname":" ~DSecureString()","Funname":"~DSecureString","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/dsysinfo.h","Functions":[{"Uniquefunname":"QString buildVersion()","Funname":"buildVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString computerName()","Funname":"computerName","Returntype":"QString","Args":""},{"Uniquefunname":"QString cpuModelName()","Funname":"cpuModelName","Returntype":"QString","Args":""},{"Uniquefunname":"QString deepinCopyright()","Funname":"deepinCopyright","Returntype":"QString","Args":""},{"Uniquefunname":" deepinDistributionInfoPath()","Funname":"deepinDistributionInfoPath","Returntype":"","Args":""},{"Uniquefunname":" deepinDistributorName()","Funname":"deepinDistributorName","Returntype":"","Args":""},{"Uniquefunname":" deepinDistributorWebsite()","Funname":"deepinDistributorWebsite","Returntype":"","Args":""},{"Uniquefunname":"QString deepinEdition()","Funname":"deepinEdition","Returntype":"QString","Args":""},{"Uniquefunname":"DeepinType deepinType()","Funname":"deepinType","Returntype":"DeepinType","Args":""},{"Uniquefunname":"QString deepinVersion()","Funname":"deepinVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString distributionInfoPath()","Funname":"distributionInfoPath","Returntype":"QString","Args":""},{"Uniquefunname":"QString distributionInfoSectionName(OrgType type)","Funname":"distributionInfoSectionName","Returntype":"QString","Args":"OrgType type"},{"Uniquefunname":"bool isCommunityEdition()","Funname":"isCommunityEdition","Returntype":"bool","Args":""},{"Uniquefunname":"bool isDDE()","Funname":"isDDE","Returntype":"bool","Args":""},{"Uniquefunname":"bool isDeepin()","Funname":"isDeepin","Returntype":"bool","Args":""},{"Uniquefunname":"QString majorVersion()","Funname":"majorVersion","Returntype":"QString","Args":""},{"Uniquefunname":"qint64 memoryInstalledSize()","Funname":"memoryInstalledSize","Returntype":"qint64","Args":""},{"Uniquefunname":"qint64 memoryTotalSize()","Funname":"memoryTotalSize","Returntype":"qint64","Args":""},{"Uniquefunname":"QString minorVersion()","Funname":"minorVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString operatingSystemName()","Funname":"operatingSystemName","Returntype":"QString","Args":""},{"Uniquefunname":"ProductType productType()","Funname":"productType","Returntype":"ProductType","Args":""},{"Uniquefunname":"QString productTypeString()","Funname":"productTypeString","Returntype":"QString","Args":""},{"Uniquefunname":"QString productVersion()","Funname":"productVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString spVersion()","Funname":"spVersion","Returntype":"QString","Args":""},{"Uniquefunname":"qint64 systemDiskSize()","Funname":"systemDiskSize","Returntype":"qint64","Args":""},{"Uniquefunname":"QString udpateVersion()","Funname":"udpateVersion","Returntype":"QString","Args":""},{"Uniquefunname":"UosArch uosArch()","Funname":"uosArch","Returntype":"UosArch","Args":""},{"Uniquefunname":"UosEdition uosEditionType()","Funname":"uosEditionType","Returntype":"UosEdition","Args":""},{"Uniquefunname":"UosType uosType()","Funname":"uosType","Returntype":"UosType","Args":""}],"Records":[{"Name":"enum:ProductType","Fields":["ArchLinux","CentOS","Debian","Deepin","Fedora","LinuxMint","Manjaro","SailfishOS","Ubuntu","UnknownType","Uos","openSUSE"]},{"Name":"enum:DeepinType","Fields":["DeepinDesktop","DeepinPersonal","DeepinProfessional","DeepinServer","UnknownDeepin"]},{"Name":"enum:OrgType","Fields":["Distribution","Distributor","Manufacturer"]},{"Name":"enum:LogoType","Fields":["Light","Normal","Symbolic","Transparent"]},{"Name":"enum:UosArch","Fields":["UosAMD64","UosARM64","UosArchUnknown","UosMIPS64","UosSW64"]},{"Name":"enum:UosEdition","Fields":["UosCommunity","UosEditionCount","UosEditionUnknown","UosEnterprise","UosEnterpriseC","UosEuler","UosHome","UosMilitary","UosMilitaryS","UosProfessional"]},{"Name":"enum:UosType","Fields":["UosDesktop","UosDevice","UosServer","UosTypeCount","UosTypeUnknown"]}]}
-{"Filepath":"src/base/dobject.h","Functions":[{"Uniquefunname":"virtual ~DObject()","Funname":"~DObject","Returntype":"virtual","Args":""}],"Records":null}
-{"Filepath":"src/base/dsingleton.h","Functions":[{"Uniquefunname":" DSingleton(const DSingleton \u0026)","Funname":"DSingleton","Returntype":"","Args":"const DSingleton \u0026"},{"Uniquefunname":"protected DSingleton(void)","Funname":"DSingleton","Returntype":"protected","Args":"void"},{"Uniquefunname":"    static inline T *instance()","Funname":"instance","Returntype":"public","Args":""},{"Uniquefunname":" ~DSingleton(void)","Funname":"~DSingleton","Returntype":"","Args":"void"}],"Records":null}
-{"Filepath":"src/base/private/dobject_p.h","Functions":[{"Uniquefunname":"protected DObjectPrivate(DObject * qq)","Funname":"DObjectPrivate","Returntype":"protected","Args":"DObject * qq"},{"Uniquefunname":"public ~DObjectPrivate()","Funname":"~DObjectPrivate","Returntype":"public","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/dbasefilewatcher.h","Functions":[{"Uniquefunname":"void fileAttributeChanged(const QUrl \u0026 url)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileClosed(const QUrl \u0026 url)","Funname":"fileClosed","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QUrl \u0026 url)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileModified(const QUrl \u0026 url)","Funname":"fileModified","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileMoved(const QUrl \u0026 fromUrl,const QUrl \u0026 toUrl)","Funname":"fileMoved","Returntype":"void","Args":"const QUrl \u0026 fromUrl,const QUrl \u0026 toUrl"},{"Uniquefunname":"QUrl fileUrl()","Funname":"fileUrl","Returntype":"QUrl","Args":""},{"Uniquefunname":"bool ghostSignal(const QUrl \u0026 targetUrl,SignalType1 signal,const QUrl \u0026 arg1)","Funname":"ghostSignal","Returntype":"bool","Args":"const QUrl \u0026 targetUrl,SignalType1 signal,const QUrl \u0026 arg1"},{"Uniquefunname":"bool ghostSignal(const QUrl \u0026 targetUrl,SignalType2 signal,const QUrl \u0026 arg1,const QUrl \u0026 arg2)","Funname":"ghostSignal","Returntype":"bool","Args":"const QUrl \u0026 targetUrl,SignalType2 signal,const QUrl \u0026 arg1,const QUrl \u0026 arg2"},{"Uniquefunname":"bool restartWatcher()","Funname":"restartWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"bool startWatcher()","Funname":"startWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"bool stopWatcher()","Funname":"stopWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"void subfileCreated(const QUrl \u0026 url)","Funname":"subfileCreated","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"Q_OBJECT public ~DBaseFileWatcher()","Funname":"~DBaseFileWatcher","Returntype":"Q_OBJECT public","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/dfilesystemwatcher.h","Functions":[{"Uniquefunname":"    D_DECLARE_PRIVATE(DFileSystemWatcher)","Funname":"D_DECLARE_PRIVATE","Returntype":"Q_OBJECT","Args":"DFileSystemWatcher"},{"Uniquefunname":"bool addPath(const QString \u0026 file)","Funname":"addPath","Returntype":"bool","Args":"const QString \u0026 file"},{"Uniquefunname":"QStringList addPaths(const QStringList \u0026 files)","Funname":"addPaths","Returntype":"QStringList","Args":"const QStringList \u0026 files"},{"Uniquefunname":"QStringList directories()","Funname":"directories","Returntype":"QStringList","Args":""},{"Uniquefunname":"void fileAttributeChanged(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileClosed(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileClosed","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileCreated(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileCreated","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileModified(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileModified","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileMoved(const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName,QPrivateSignal)","Funname":"fileMoved","Returntype":"void","Args":"const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName,QPrivateSignal"},{"Uniquefunname":"QStringList files()","Funname":"files","Returntype":"QStringList","Args":""},{"Uniquefunname":"bool removePath(const QString \u0026 file)","Funname":"removePath","Returntype":"bool","Args":"const QString \u0026 file"},{"Uniquefunname":"QStringList removePaths(const QStringList \u0026 files)","Funname":"removePaths","Returntype":"QStringList","Args":"const QStringList \u0026 files"},{"Uniquefunname":" ~DFileSystemWatcher()","Funname":"~DFileSystemWatcher","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/dfilewatcher.h","Functions":[{"Uniquefunname":"void onFileAttributeChanged(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileAttributeChanged","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileClosed(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileClosed","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileCreated(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileCreated","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"private Q_SLOTS onFileDeleted(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileDeleted","Returntype":"private Q_SLOTS","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileModified(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileModified","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileMoved(const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName)","Funname":"onFileMoved","Returntype":"void","Args":"const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName"}],"Records":null}
-{"Filepath":"src/filesystem/dfilewatchermanager.h","Functions":[{"Uniquefunname":"DFileWatcher * add(const QString \u0026 filePath)","Funname":"add","Returntype":"DFileWatcher *","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileAttributeChanged(const QString \u0026 filePath)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileClosed(const QString \u0026 filePath)","Funname":"fileClosed","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QString \u0026 filePath)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileModified(const QString \u0026 filePath)","Funname":"fileModified","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileMoved(const QString \u0026 fromFilePath,const QString \u0026 toFilePath)","Funname":"fileMoved","Returntype":"void","Args":"const QString \u0026 fromFilePath,const QString \u0026 toFilePath"},{"Uniquefunname":"void remove(const QString \u0026 filePath)","Funname":"remove","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void subfileCreated(const QString \u0026 filePath)","Funname":"subfileCreated","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":" ~DFileWatcherManager()","Funname":"~DFileWatcherManager","Returntype":"","Args":""}],"Records":null}
+{"Filepath":"src/dsysinfo.h","Functions":[{"Uniquefunname":"QString buildVersion()","Funname":"buildVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString computerName()","Funname":"computerName","Returntype":"QString","Args":""},{"Uniquefunname":"QString cpuModelName()","Funname":"cpuModelName","Returntype":"QString","Args":""},{"Uniquefunname":"QString deepinCopyright()","Funname":"deepinCopyright","Returntype":"QString","Args":""},{"Uniquefunname":" deepinDistributionInfoPath()","Funname":"deepinDistributionInfoPath","Returntype":"","Args":""},{"Uniquefunname":" deepinDistributorName()","Funname":"deepinDistributorName","Returntype":"","Args":""},{"Uniquefunname":" deepinDistributorWebsite()","Funname":"deepinDistributorWebsite","Returntype":"","Args":""},{"Uniquefunname":"QString deepinEdition()","Funname":"deepinEdition","Returntype":"QString","Args":""},{"Uniquefunname":"DeepinType deepinType()","Funname":"deepinType","Returntype":"DeepinType","Args":""},{"Uniquefunname":"QString deepinVersion()","Funname":"deepinVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString distributionInfoPath()","Funname":"distributionInfoPath","Returntype":"QString","Args":""},{"Uniquefunname":"QString distributionInfoSectionName(OrgType type)","Funname":"distributionInfoSectionName","Returntype":"QString","Args":"OrgType type"},{"Uniquefunname":"bool isCommunityEdition()","Funname":"isCommunityEdition","Returntype":"bool","Args":""},{"Uniquefunname":"bool isDDE()","Funname":"isDDE","Returntype":"bool","Args":""},{"Uniquefunname":"bool isDeepin()","Funname":"isDeepin","Returntype":"bool","Args":""},{"Uniquefunname":"QString majorVersion()","Funname":"majorVersion","Returntype":"QString","Args":""},{"Uniquefunname":"qint64 memoryInstalledSize()","Funname":"memoryInstalledSize","Returntype":"qint64","Args":""},{"Uniquefunname":"qint64 memoryTotalSize()","Funname":"memoryTotalSize","Returntype":"qint64","Args":""},{"Uniquefunname":"QString minorVersion()","Funname":"minorVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString operatingSystemName()","Funname":"operatingSystemName","Returntype":"QString","Args":""},{"Uniquefunname":"ProductType productType()","Funname":"productType","Returntype":"ProductType","Args":""},{"Uniquefunname":"QString productTypeString()","Funname":"productTypeString","Returntype":"QString","Args":""},{"Uniquefunname":"QString productVersion()","Funname":"productVersion","Returntype":"QString","Args":""},{"Uniquefunname":"QString spVersion()","Funname":"spVersion","Returntype":"QString","Args":""},{"Uniquefunname":"qint64 systemDiskSize()","Funname":"systemDiskSize","Returntype":"qint64","Args":""},{"Uniquefunname":"QString udpateVersion()","Funname":"udpateVersion","Returntype":"QString","Args":""},{"Uniquefunname":"UosArch uosArch()","Funname":"uosArch","Returntype":"UosArch","Args":""},{"Uniquefunname":"UosEdition uosEditionType()","Funname":"uosEditionType","Returntype":"UosEdition","Args":""},{"Uniquefunname":"UosType uosType()","Funname":"uosType","Returntype":"UosType","Args":""}],"Records":[{"Name":"enum:ProductType","Fields":["ArchLinux","CentOS","Debian","Deepin","Fedora","LinuxMint","Manjaro","SailfishOS","Ubuntu","UnknownType","Uos","openSUSE"]},{"Name":"macro","Fields":["DSYSINFO_H"]},{"Name":"enum:DeepinType","Fields":["DeepinDesktop","DeepinPersonal","DeepinProfessional","DeepinServer","UnknownDeepin"]},{"Name":"enum:OrgType","Fields":["Distribution","Distributor","Manufacturer"]},{"Name":"enum:LogoType","Fields":["Light","Normal","Symbolic","Transparent"]},{"Name":"enum:UosArch","Fields":["UosAMD64","UosARM64","UosArchUnknown","UosMIPS64","UosSW64"]},{"Name":"enum:UosEdition","Fields":["UosCommunity","UosDeviceEdition","UosEditionCount","UosEditionUnknown","UosEducation","UosEnterprise","UosEnterpriseC","UosEuler","UosHome","UosMilitary","UosMilitaryS","UosProfessional"]},{"Name":"enum:UosType","Fields":["UosDesktop","UosDevice","UosServer","UosTypeCount","UosTypeUnknown"]}]}
+{"Filepath":"src/dtkcore_global.h","Functions":null,"Records":[{"Name":"macro","Fields":["DCORE_BEGIN_NAMESPACE","DCORE_BEGIN_NAMESPACE","DCORE_END_NAMESPACE","DCORE_END_NAMESPACE","DCORE_NAMESPACE","DCORE_USE_NAMESPACE","DCORE_USE_NAMESPACE","DTK_BEGIN_NAMESPACE","DTK_BEGIN_NAMESPACE","DTK_CORE_NAMESPACE","DTK_END_NAMESPACE","DTK_END_NAMESPACE","DTK_NAMESPACE","DTK_USE_NAMESPACE","DTK_USE_NAMESPACE","DTK_VERSION","DTK_VERSION_CHECK(major,minor,patch,build)","D_DECL_DEPRECATED","D_DECL_DEPRECATED_X","D_DECL_DEPRECATED_X(text)","LIBDTKCORESHARED_EXPORT","LIBDTKCORESHARED_EXPORT"]}]}
+{"Filepath":"src/base/dobject.h","Functions":[{"Uniquefunname":"virtual ~DObject()","Funname":"~DObject","Returntype":"virtual","Args":""}],"Records":[{"Name":"macro","Fields":["DOBJECT_H","D_D(Class)","D_DC(Class)","D_DECLARE_PRIVATE(Class)","D_DECLARE_PUBLIC(Class)","D_PRIVATE_SLOT(Func)","D_Q(Class)","D_QC(Class)"]}]}
+{"Filepath":"src/base/dsingleton.h","Functions":[{"Uniquefunname":" DSingleton(const DSingleton \u0026)","Funname":"DSingleton","Returntype":"","Args":"const DSingleton \u0026"},{"Uniquefunname":"protected DSingleton(void)","Funname":"DSingleton","Returntype":"protected","Args":"void"},{"Uniquefunname":"    static inline T *instance()","Funname":"instance","Returntype":"public","Args":""},{"Uniquefunname":" ~DSingleton(void)","Funname":"~DSingleton","Returntype":"","Args":"void"}],"Records":[{"Name":"macro","Fields":["DSINGLETON_H"]}]}
+{"Filepath":"src/base/private/dobject_p.h","Functions":[{"Uniquefunname":"protected DObjectPrivate(DObject * qq)","Funname":"DObjectPrivate","Returntype":"protected","Args":"DObject * qq"},{"Uniquefunname":"public ~DObjectPrivate()","Funname":"~DObjectPrivate","Returntype":"public","Args":""}],"Records":[{"Name":"macro","Fields":["DOBJECT_P_H"]}]}
+{"Filepath":"src/filesystem/dbasefilewatcher.h","Functions":[{"Uniquefunname":"void fileAttributeChanged(const QUrl \u0026 url)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileClosed(const QUrl \u0026 url)","Funname":"fileClosed","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QUrl \u0026 url)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileModified(const QUrl \u0026 url)","Funname":"fileModified","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"void fileMoved(const QUrl \u0026 fromUrl,const QUrl \u0026 toUrl)","Funname":"fileMoved","Returntype":"void","Args":"const QUrl \u0026 fromUrl,const QUrl \u0026 toUrl"},{"Uniquefunname":"QUrl fileUrl()","Funname":"fileUrl","Returntype":"QUrl","Args":""},{"Uniquefunname":"bool ghostSignal(const QUrl \u0026 targetUrl,SignalType1 signal,const QUrl \u0026 arg1)","Funname":"ghostSignal","Returntype":"bool","Args":"const QUrl \u0026 targetUrl,SignalType1 signal,const QUrl \u0026 arg1"},{"Uniquefunname":"bool ghostSignal(const QUrl \u0026 targetUrl,SignalType2 signal,const QUrl \u0026 arg1,const QUrl \u0026 arg2)","Funname":"ghostSignal","Returntype":"bool","Args":"const QUrl \u0026 targetUrl,SignalType2 signal,const QUrl \u0026 arg1,const QUrl \u0026 arg2"},{"Uniquefunname":"bool restartWatcher()","Funname":"restartWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"bool startWatcher()","Funname":"startWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"bool stopWatcher()","Funname":"stopWatcher","Returntype":"bool","Args":""},{"Uniquefunname":"void subfileCreated(const QUrl \u0026 url)","Funname":"subfileCreated","Returntype":"void","Args":"const QUrl \u0026 url"},{"Uniquefunname":"Q_OBJECT public ~DBaseFileWatcher()","Funname":"~DBaseFileWatcher","Returntype":"Q_OBJECT public","Args":""}],"Records":[{"Name":"macro","Fields":["DBASEFILEWATCHER_H"]}]}
+{"Filepath":"src/filesystem/dfilesystemwatcher.h","Functions":[{"Uniquefunname":"    D_DECLARE_PRIVATE(DFileSystemWatcher)","Funname":"D_DECLARE_PRIVATE","Returntype":"Q_OBJECT","Args":"DFileSystemWatcher"},{"Uniquefunname":"bool addPath(const QString \u0026 file)","Funname":"addPath","Returntype":"bool","Args":"const QString \u0026 file"},{"Uniquefunname":"QStringList addPaths(const QStringList \u0026 files)","Funname":"addPaths","Returntype":"QStringList","Args":"const QStringList \u0026 files"},{"Uniquefunname":"QStringList directories()","Funname":"directories","Returntype":"QStringList","Args":""},{"Uniquefunname":"void fileAttributeChanged(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileClosed(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileClosed","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileCreated(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileCreated","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileModified(const QString \u0026 path,const QString \u0026 name,QPrivateSignal)","Funname":"fileModified","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name,QPrivateSignal"},{"Uniquefunname":"void fileMoved(const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName,QPrivateSignal)","Funname":"fileMoved","Returntype":"void","Args":"const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName,QPrivateSignal"},{"Uniquefunname":"QStringList files()","Funname":"files","Returntype":"QStringList","Args":""},{"Uniquefunname":"bool removePath(const QString \u0026 file)","Funname":"removePath","Returntype":"bool","Args":"const QString \u0026 file"},{"Uniquefunname":"QStringList removePaths(const QStringList \u0026 files)","Funname":"removePaths","Returntype":"QStringList","Args":"const QStringList \u0026 files"},{"Uniquefunname":" ~DFileSystemWatcher()","Funname":"~DFileSystemWatcher","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DFILESYSTEMWATCHER_H"]}]}
+{"Filepath":"src/filesystem/dfilewatcher.h","Functions":[{"Uniquefunname":"void onFileAttributeChanged(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileAttributeChanged","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileClosed(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileClosed","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileCreated(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileCreated","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"private Q_SLOTS onFileDeleted(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileDeleted","Returntype":"private Q_SLOTS","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileModified(const QString \u0026 path,const QString \u0026 name)","Funname":"onFileModified","Returntype":"void","Args":"const QString \u0026 path,const QString \u0026 name"},{"Uniquefunname":"void onFileMoved(const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName)","Funname":"onFileMoved","Returntype":"void","Args":"const QString \u0026 fromPath,const QString \u0026 fromName,const QString \u0026 toPath,const QString \u0026 toName"}],"Records":[{"Name":"macro","Fields":["DFILEWATCHER_H"]}]}
+{"Filepath":"src/filesystem/dfilewatchermanager.h","Functions":[{"Uniquefunname":"DFileWatcher * add(const QString \u0026 filePath)","Funname":"add","Returntype":"DFileWatcher *","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileAttributeChanged(const QString \u0026 filePath)","Funname":"fileAttributeChanged","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileClosed(const QString \u0026 filePath)","Funname":"fileClosed","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"Q_SIGNALS fileDeleted(const QString \u0026 filePath)","Funname":"fileDeleted","Returntype":"Q_SIGNALS","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileModified(const QString \u0026 filePath)","Funname":"fileModified","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void fileMoved(const QString \u0026 fromFilePath,const QString \u0026 toFilePath)","Funname":"fileMoved","Returntype":"void","Args":"const QString \u0026 fromFilePath,const QString \u0026 toFilePath"},{"Uniquefunname":"void remove(const QString \u0026 filePath)","Funname":"remove","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":"void subfileCreated(const QString \u0026 filePath)","Funname":"subfileCreated","Returntype":"void","Args":"const QString \u0026 filePath"},{"Uniquefunname":" ~DFileWatcherManager()","Funname":"~DFileWatcherManager","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DFILEWATCHERMANAGER_H"]}]}
 {"Filepath":"src/filesystem/dpathbuf.h","Functions":[{"Uniquefunname":"public DPathBuf()","Funname":"DPathBuf","Returntype":"public","Args":""},{"Uniquefunname":" DPathBuf(const QString \u0026 path)","Funname":"DPathBuf","Returntype":"","Args":"const QString \u0026 path"},{"Uniquefunname":"    DPathBuf \u0026join(const QString \u0026p)","Funname":"join","Returntype":"DPathBuf \u0026","Args":"const QString \u0026 p"},{"Uniquefunname":"QString toString()","Funname":"toString","Returntype":"QString","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/dstandardpaths.h","Functions":[{"Uniquefunname":"private DStandardPaths()","Funname":"DStandardPaths","Returntype":"private","Args":""},{"Uniquefunname":"void setMode(Mode mode)","Funname":"setMode","Returntype":"void","Args":"Mode mode"},{"Uniquefunname":"QStringList standardLocations(QStandardPaths::StandardLocation type)","Funname":"standardLocations","Returntype":"QStringList","Args":"QStandardPaths::StandardLocation type"},{"Uniquefunname":"QString writableLocation(QStandardPaths::StandardLocation type)","Funname":"writableLocation","Returntype":"QString","Args":"QStandardPaths::StandardLocation type"},{"Uniquefunname":" ~DStandardPaths()","Funname":"~DStandardPaths","Returntype":"","Args":""}],"Records":[{"Name":"enum:Mode","Fields":["Auto","Snap","Test"]}]}
-{"Filepath":"src/filesystem/dtrashmanager.h","Functions":[{"Uniquefunname":"protected DTrashManager()","Funname":"DTrashManager","Returntype":"protected","Args":""},{"Uniquefunname":"bool cleanTrash()","Funname":"cleanTrash","Returntype":"bool","Args":""},{"Uniquefunname":"public instance()","Funname":"instance","Returntype":"public","Args":""},{"Uniquefunname":"bool trashIsEmpty()","Funname":"trashIsEmpty","Returntype":"bool","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/private/dbasefilewatcher_p.h","Functions":[{"Uniquefunname":"public DBaseFileWatcherPrivate(DBaseFileWatcher * qq)","Funname":"DBaseFileWatcherPrivate","Returntype":"public","Args":"DBaseFileWatcher * qq"},{"Uniquefunname":"virtual bool start()","Funname":"start","Returntype":"virtual bool","Args":""},{"Uniquefunname":"virtual bool stop()","Funname":"stop","Returntype":"virtual bool","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/private/dfilesystemwatcher_dummy_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"void DFileSystemWatcherPrivate::_q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void DFileSystemWatcherPrivate","Args":""},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/private/dfilesystemwatcher_linux_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"QStringList addPaths(const QStringList \u0026 paths,QStringList * files,QStringList * directories)","Funname":"addPaths","Returntype":"QStringList","Args":"const QStringList \u0026 paths,QStringList * files,QStringList * directories"},{"Uniquefunname":"void onDirectoryChanged(const QString \u0026 path,bool removed)","Funname":"onDirectoryChanged","Returntype":"void","Args":"const QString \u0026 path,bool removed"},{"Uniquefunname":"private onFileChanged(const QString \u0026 path,bool removed)","Funname":"onFileChanged","Returntype":"private","Args":"const QString \u0026 path,bool removed"},{"Uniquefunname":"QStringList removePaths(const QStringList \u0026 paths,QStringList * files,QStringList * directories)","Funname":"removePaths","Returntype":"QStringList","Args":"const QStringList \u0026 paths,QStringList * files,QStringList * directories"},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/filesystem/private/dfilesystemwatcher_win_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"void DFileSystemWatcherPrivate::_q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void DFileSystemWatcherPrivate","Args":""},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/log/AbstractAppender.h","Functions":[{"Uniquefunname":"public AbstractAppender()","Funname":"AbstractAppender","Returntype":"public","Args":""},{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"Logger detailsLevel()","Funname":"detailsLevel","Returntype":"Logger","Args":""},{"Uniquefunname":"void setDetailsLevel(Logger::LogLevel level)","Funname":"setDetailsLevel","Returntype":"void","Args":"Logger::LogLevel level"},{"Uniquefunname":"void setDetailsLevel(const QString \u0026 level)","Funname":"setDetailsLevel","Returntype":"void","Args":"const QString \u0026 level"},{"Uniquefunname":"void write(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"virtual ~AbstractAppender()","Funname":"~AbstractAppender","Returntype":"virtual","Args":""}],"Records":null}
-{"Filepath":"src/log/AbstractStringAppender.h","Functions":[{"Uniquefunname":"public AbstractStringAppender()","Funname":"AbstractStringAppender","Returntype":"public","Args":""},{"Uniquefunname":"virtual QString format()","Funname":"format","Returntype":"virtual QString","Args":""},{"Uniquefunname":"protected formattedString(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"formattedString","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"private qCleanupFuncinfo(const char *)","Funname":"qCleanupFuncinfo","Returntype":"private","Args":"const char *"},{"Uniquefunname":"void setFormat(const QString \u0026)","Funname":"setFormat","Returntype":"void","Args":"const QString \u0026"},{"Uniquefunname":"QString stripFunctionName(const char *)","Funname":"stripFunctionName","Returntype":"QString","Args":"const char *"}],"Records":null}
-{"Filepath":"src/log/ConsoleAppender.h","Functions":[{"Uniquefunname":"public ConsoleAppender()","Funname":"ConsoleAppender","Returntype":"public","Args":""},{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"virtual QString format()","Funname":"format","Returntype":"virtual QString","Args":""},{"Uniquefunname":"void ignoreEnvironmentPattern(bool ignore)","Funname":"ignoreEnvironmentPattern","Returntype":"void","Args":"bool ignore"}],"Records":null}
-{"Filepath":"src/log/FileAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"void closeFile()","Funname":"closeFile","Returntype":"void","Args":""},{"Uniquefunname":"QString fileName()","Funname":"fileName","Returntype":"QString","Args":""},{"Uniquefunname":"bool openFile()","Funname":"openFile","Returntype":"bool","Args":""},{"Uniquefunname":"void setFileName(const QString \u0026)","Funname":"setFileName","Returntype":"void","Args":"const QString \u0026"},{"Uniquefunname":"qint64 size()","Funname":"size","Returntype":"qint64","Args":""},{"Uniquefunname":" ~FileAppender()","Funname":"~FileAppender","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/log/LogManager.h","Functions":[{"Uniquefunname":" DLogManager(const DLogManager \u0026)","Funname":"DLogManager","Returntype":"","Args":"const DLogManager \u0026"},{"Uniquefunname":"explicit DLogManager()","Funname":"DLogManager","Returntype":"explicit","Args":""},{"Uniquefunname":"QString getlogFilePath()","Funname":"getlogFilePath","Returntype":"QString","Args":""},{"Uniquefunname":"void initConsoleAppender()","Funname":"initConsoleAppender","Returntype":"void","Args":""},{"Uniquefunname":"void initRollingFileAppender()","Funname":"initRollingFileAppender","Returntype":"void","Args":""},{"Uniquefunname":"DLogManager * instance()","Funname":"instance","Returntype":"DLogManager *","Args":""},{"Uniquefunname":"QString joinPath(const QString \u0026 path,const QString \u0026 fileName)","Funname":"joinPath","Returntype":"QString","Args":"const QString \u0026 path,const QString \u0026 fileName"},{"Uniquefunname":"public registerConsoleAppender()","Funname":"registerConsoleAppender","Returntype":"public","Args":""},{"Uniquefunname":"void registerFileAppender()","Funname":"registerFileAppender","Returntype":"void","Args":""},{"Uniquefunname":"void setLogFormat(const QString \u0026 format)","Funname":"setLogFormat","Returntype":"void","Args":"const QString \u0026 format"},{"Uniquefunname":"void setlogFilePath(const QString \u0026 logFilePath)","Funname":"setlogFilePath","Returntype":"void","Args":"const QString \u0026 logFilePath"},{"Uniquefunname":" ~DLogManager()","Funname":"~DLogManager","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/log/Logger.h","Functions":[{"Uniquefunname":" Logger(const QString \u0026 defaultCategory)","Funname":"Logger","Returntype":"","Args":"const QString \u0026 defaultCategory"},{"Uniquefunname":"        Q_DISABLE_COPY(Logger)","Funname":"Q_DISABLE_COPY","Returntype":"","Args":"Logger"},{"Uniquefunname":"QString defaultCategory()","Funname":"defaultCategory","Returntype":"QString","Args":""},{"Uniquefunname":"Logger * globalInstance()","Funname":"globalInstance","Returntype":"Logger *","Args":""},{"Uniquefunname":"LogLevel levelFromString(const QString \u0026 s)","Funname":"levelFromString","Returntype":"LogLevel","Args":"const QString \u0026 s"},{"Uniquefunname":"QString levelToString(LogLevel logLevel)","Funname":"levelToString","Returntype":"QString","Args":"LogLevel logLevel"},{"Uniquefunname":"CUTELOGGERSHARED_EXPORT Logger * loggerInstance()","Funname":"loggerInstance","Returntype":"CUTELOGGERSHARED_EXPORT Logger *","Args":""},{"Uniquefunname":"void registerAppender(AbstractAppender * appender)","Funname":"registerAppender","Returntype":"void","Args":"AbstractAppender * appender"},{"Uniquefunname":"void registerCategoryAppender(const QString \u0026 category,AbstractAppender * appender)","Funname":"registerCategoryAppender","Returntype":"void","Args":"const QString \u0026 category,AbstractAppender * appender"},{"Uniquefunname":"void setDefaultCategory(const QString \u0026 category)","Funname":"setDefaultCategory","Returntype":"void","Args":"const QString \u0026 category"},{"Uniquefunname":"QDebug write(LogLevel logLevel,const char * file,int line,const char * function,const char * category)","Funname":"write","Returntype":"QDebug","Args":"LogLevel logLevel,const char * file,int line,const char * function,const char * category"},{"Uniquefunname":"void write(LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message"},{"Uniquefunname":"void write(const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message"},{"Uniquefunname":"private write(const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message,bool fromLocalInstance)","Funname":"write","Returntype":"private","Args":"const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message,bool fromLocalInstance"},{"Uniquefunname":"void writeAssert(const char * file,int line,const char * function,const char * condition)","Funname":"writeAssert","Returntype":"void","Args":"const char * file,int line,const char * function,const char * condition"},{"Uniquefunname":" ~Logger()","Funname":"~Logger","Returntype":"","Args":""}],"Records":[{"Name":"enum:LogLevel","Fields":["Debug","Error","Fatal","Info","Trace","Warning"]}]}
-{"Filepath":"src/log/OutputDebugAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"}],"Records":null}
-{"Filepath":"src/log/RollingFileAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"void computeFrequency()","Funname":"computeFrequency","Returntype":"void","Args":""},{"Uniquefunname":"void computeRollOverTime()","Funname":"computeRollOverTime","Returntype":"void","Args":""},{"Uniquefunname":"DatePattern datePattern()","Funname":"datePattern","Returntype":"DatePattern","Args":""},{"Uniquefunname":"QString datePatternString()","Funname":"datePatternString","Returntype":"QString","Args":""},{"Uniquefunname":"int logFilesLimit()","Funname":"logFilesLimit","Returntype":"int","Args":""},{"Uniquefunname":"qint64 logSizeLimit()","Funname":"logSizeLimit","Returntype":"qint64","Args":""},{"Uniquefunname":"void removeOldFiles()","Funname":"removeOldFiles","Returntype":"void","Args":""},{"Uniquefunname":"private rollOver()","Funname":"rollOver","Returntype":"private","Args":""},{"Uniquefunname":"void setDatePattern(DatePattern datePattern)","Funname":"setDatePattern","Returntype":"void","Args":"DatePattern datePattern"},{"Uniquefunname":"void setDatePattern(const QString \u0026 datePattern)","Funname":"setDatePattern","Returntype":"void","Args":"const QString \u0026 datePattern"},{"Uniquefunname":"void setDatePatternString(const QString \u0026 datePatternString)","Funname":"setDatePatternString","Returntype":"void","Args":"const QString \u0026 datePatternString"},{"Uniquefunname":"void setLogFilesLimit(int limit)","Funname":"setLogFilesLimit","Returntype":"void","Args":"int limit"},{"Uniquefunname":"void setLogSizeLimit(int qint64)","Funname":"setLogSizeLimit","Returntype":"void","Args":"int qint64"}],"Records":[{"Name":"enum:DatePattern","Fields":["DailyRollover","HalfDailyRollover","HourlyRollover","MinutelyRollover","MonthlyRollover","WeeklyRollover"]}]}
+{"Filepath":"src/filesystem/dstandardpaths.h","Functions":[{"Uniquefunname":"private DStandardPaths()","Funname":"DStandardPaths","Returntype":"private","Args":""},{"Uniquefunname":"void setMode(Mode mode)","Funname":"setMode","Returntype":"void","Args":"Mode mode"},{"Uniquefunname":"QStringList standardLocations(QStandardPaths::StandardLocation type)","Funname":"standardLocations","Returntype":"QStringList","Args":"QStandardPaths::StandardLocation type"},{"Uniquefunname":"QString writableLocation(QStandardPaths::StandardLocation type)","Funname":"writableLocation","Returntype":"QString","Args":"QStandardPaths::StandardLocation type"},{"Uniquefunname":" ~DStandardPaths()","Funname":"~DStandardPaths","Returntype":"","Args":""}],"Records":[{"Name":"enum:Mode","Fields":["Auto","Snap","Test"]},{"Name":"macro","Fields":["DTK_CORE_FILESYSTEM_DSTANDARDPATHS_H"]}]}
+{"Filepath":"src/filesystem/dtrashmanager.h","Functions":[{"Uniquefunname":"protected DTrashManager()","Funname":"DTrashManager","Returntype":"protected","Args":""},{"Uniquefunname":"bool cleanTrash()","Funname":"cleanTrash","Returntype":"bool","Args":""},{"Uniquefunname":"public instance()","Funname":"instance","Returntype":"public","Args":""},{"Uniquefunname":"bool trashIsEmpty()","Funname":"trashIsEmpty","Returntype":"bool","Args":""}],"Records":[{"Name":"macro","Fields":["DTRASHMANAGER_H"]}]}
+{"Filepath":"src/filesystem/private/dbasefilewatcher_p.h","Functions":[{"Uniquefunname":"public DBaseFileWatcherPrivate(DBaseFileWatcher * qq)","Funname":"DBaseFileWatcherPrivate","Returntype":"public","Args":"DBaseFileWatcher * qq"},{"Uniquefunname":"virtual bool start()","Funname":"start","Returntype":"virtual bool","Args":""},{"Uniquefunname":"virtual bool stop()","Funname":"stop","Returntype":"virtual bool","Args":""}],"Records":[{"Name":"macro","Fields":["DBASEFILEWATCHER_P_H"]}]}
+{"Filepath":"src/filesystem/private/dfilesystemwatcher_dummy_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"void DFileSystemWatcherPrivate::_q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void DFileSystemWatcherPrivate","Args":""},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DFILESYSTEMWATCHER_WIN_P_H"]}]}
+{"Filepath":"src/filesystem/private/dfilesystemwatcher_linux_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"QStringList addPaths(const QStringList \u0026 paths,QStringList * files,QStringList * directories)","Funname":"addPaths","Returntype":"QStringList","Args":"const QStringList \u0026 paths,QStringList * files,QStringList * directories"},{"Uniquefunname":"void onDirectoryChanged(const QString \u0026 path,bool removed)","Funname":"onDirectoryChanged","Returntype":"void","Args":"const QString \u0026 path,bool removed"},{"Uniquefunname":"private onFileChanged(const QString \u0026 path,bool removed)","Funname":"onFileChanged","Returntype":"private","Args":"const QString \u0026 path,bool removed"},{"Uniquefunname":"QStringList removePaths(const QStringList \u0026 paths,QStringList * files,QStringList * directories)","Funname":"removePaths","Returntype":"QStringList","Args":"const QStringList \u0026 paths,QStringList * files,QStringList * directories"},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DFILESYSTEMWATCHER_P_H"]}]}
+{"Filepath":"src/filesystem/private/dfilesystemwatcher_win_p.h","Functions":[{"Uniquefunname":"    Q_DECLARE_PUBLIC(DFileSystemWatcher)","Funname":"Q_DECLARE_PUBLIC","Returntype":"","Args":"DFileSystemWatcher"},{"Uniquefunname":"void _q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void","Args":""},{"Uniquefunname":"void DFileSystemWatcherPrivate::_q_readFromInotify()","Funname":"_q_readFromInotify","Returntype":"void DFileSystemWatcherPrivate","Args":""},{"Uniquefunname":" ~DFileSystemWatcherPrivate()","Funname":"~DFileSystemWatcherPrivate","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DFILESYSTEMWATCHER_WIN_P_H"]}]}
+{"Filepath":"src/log/AbstractAppender.h","Functions":[{"Uniquefunname":"public AbstractAppender()","Funname":"AbstractAppender","Returntype":"public","Args":""},{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"Logger detailsLevel()","Funname":"detailsLevel","Returntype":"Logger","Args":""},{"Uniquefunname":"void setDetailsLevel(Logger::LogLevel level)","Funname":"setDetailsLevel","Returntype":"void","Args":"Logger::LogLevel level"},{"Uniquefunname":"void setDetailsLevel(const QString \u0026 level)","Funname":"setDetailsLevel","Returntype":"void","Args":"const QString \u0026 level"},{"Uniquefunname":"void write(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"virtual ~AbstractAppender()","Funname":"~AbstractAppender","Returntype":"virtual","Args":""}],"Records":[{"Name":"macro","Fields":["ABSTRACTAPPENDER_H"]}]}
+{"Filepath":"src/log/AbstractStringAppender.h","Functions":[{"Uniquefunname":"public AbstractStringAppender()","Funname":"AbstractStringAppender","Returntype":"public","Args":""},{"Uniquefunname":"virtual QString format()","Funname":"format","Returntype":"virtual QString","Args":""},{"Uniquefunname":"protected formattedString(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"formattedString","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"private qCleanupFuncinfo(const char *)","Funname":"qCleanupFuncinfo","Returntype":"private","Args":"const char *"},{"Uniquefunname":"void setFormat(const QString \u0026)","Funname":"setFormat","Returntype":"void","Args":"const QString \u0026"},{"Uniquefunname":"QString stripFunctionName(const char *)","Funname":"stripFunctionName","Returntype":"QString","Args":"const char *"}],"Records":[{"Name":"macro","Fields":["ABSTRACTSTRINGAPPENDER_H"]}]}
+{"Filepath":"src/log/ConsoleAppender.h","Functions":[{"Uniquefunname":"public ConsoleAppender()","Funname":"ConsoleAppender","Returntype":"public","Args":""},{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"virtual QString format()","Funname":"format","Returntype":"virtual QString","Args":""},{"Uniquefunname":"void ignoreEnvironmentPattern(bool ignore)","Funname":"ignoreEnvironmentPattern","Returntype":"void","Args":"bool ignore"}],"Records":[{"Name":"macro","Fields":["CONSOLEAPPENDER_H"]}]}
+{"Filepath":"src/log/CuteLogger_global.h","Functions":null,"Records":[{"Name":"macro","Fields":["CUTELOGGERSHARED_EXPORT","CUTELOGGERSHARED_EXPORT","CUTELOGGER_GLOBAL_H"]}]}
+{"Filepath":"src/log/FileAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"void closeFile()","Funname":"closeFile","Returntype":"void","Args":""},{"Uniquefunname":"QString fileName()","Funname":"fileName","Returntype":"QString","Args":""},{"Uniquefunname":"bool openFile()","Funname":"openFile","Returntype":"bool","Args":""},{"Uniquefunname":"void setFileName(const QString \u0026)","Funname":"setFileName","Returntype":"void","Args":"const QString \u0026"},{"Uniquefunname":"qint64 size()","Funname":"size","Returntype":"qint64","Args":""},{"Uniquefunname":" ~FileAppender()","Funname":"~FileAppender","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["FILEAPPENDER_H"]}]}
+{"Filepath":"src/log/LogManager.h","Functions":[{"Uniquefunname":" DLogManager(const DLogManager \u0026)","Funname":"DLogManager","Returntype":"","Args":"const DLogManager \u0026"},{"Uniquefunname":"explicit DLogManager()","Funname":"DLogManager","Returntype":"explicit","Args":""},{"Uniquefunname":"QString getlogFilePath()","Funname":"getlogFilePath","Returntype":"QString","Args":""},{"Uniquefunname":"void initConsoleAppender()","Funname":"initConsoleAppender","Returntype":"void","Args":""},{"Uniquefunname":"void initRollingFileAppender()","Funname":"initRollingFileAppender","Returntype":"void","Args":""},{"Uniquefunname":"DLogManager * instance()","Funname":"instance","Returntype":"DLogManager *","Args":""},{"Uniquefunname":"QString joinPath(const QString \u0026 path,const QString \u0026 fileName)","Funname":"joinPath","Returntype":"QString","Args":"const QString \u0026 path,const QString \u0026 fileName"},{"Uniquefunname":"public registerConsoleAppender()","Funname":"registerConsoleAppender","Returntype":"public","Args":""},{"Uniquefunname":"void registerFileAppender()","Funname":"registerFileAppender","Returntype":"void","Args":""},{"Uniquefunname":"void setLogFormat(const QString \u0026 format)","Funname":"setLogFormat","Returntype":"void","Args":"const QString \u0026 format"},{"Uniquefunname":"void setlogFilePath(const QString \u0026 logFilePath)","Funname":"setlogFilePath","Returntype":"void","Args":"const QString \u0026 logFilePath"},{"Uniquefunname":" ~DLogManager()","Funname":"~DLogManager","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["LOGMANAGER_H"]}]}
+{"Filepath":"src/log/Logger.h","Functions":[{"Uniquefunname":" Logger(const QString \u0026 defaultCategory)","Funname":"Logger","Returntype":"","Args":"const QString \u0026 defaultCategory"},{"Uniquefunname":"        Q_DISABLE_COPY(Logger)","Funname":"Q_DISABLE_COPY","Returntype":"","Args":"Logger"},{"Uniquefunname":"QString defaultCategory()","Funname":"defaultCategory","Returntype":"QString","Args":""},{"Uniquefunname":"Logger * globalInstance()","Funname":"globalInstance","Returntype":"Logger *","Args":""},{"Uniquefunname":"LogLevel levelFromString(const QString \u0026 s)","Funname":"levelFromString","Returntype":"LogLevel","Args":"const QString \u0026 s"},{"Uniquefunname":"QString levelToString(LogLevel logLevel)","Funname":"levelToString","Returntype":"QString","Args":"LogLevel logLevel"},{"Uniquefunname":"CUTELOGGERSHARED_EXPORT Logger * loggerInstance()","Funname":"loggerInstance","Returntype":"CUTELOGGERSHARED_EXPORT Logger *","Args":""},{"Uniquefunname":"void registerAppender(AbstractAppender * appender)","Funname":"registerAppender","Returntype":"void","Args":"AbstractAppender * appender"},{"Uniquefunname":"void registerCategoryAppender(const QString \u0026 category,AbstractAppender * appender)","Funname":"registerCategoryAppender","Returntype":"void","Args":"const QString \u0026 category,AbstractAppender * appender"},{"Uniquefunname":"void setDefaultCategory(const QString \u0026 category)","Funname":"setDefaultCategory","Returntype":"void","Args":"const QString \u0026 category"},{"Uniquefunname":"QDebug write(LogLevel logLevel,const char * file,int line,const char * function,const char * category)","Funname":"write","Returntype":"QDebug","Args":"LogLevel logLevel,const char * file,int line,const char * function,const char * category"},{"Uniquefunname":"void write(LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message"},{"Uniquefunname":"void write(const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message)","Funname":"write","Returntype":"void","Args":"const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message"},{"Uniquefunname":"private write(const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message,bool fromLocalInstance)","Funname":"write","Returntype":"private","Args":"const QDateTime \u0026 timeStamp,LogLevel logLevel,const char * file,int line,const char * function,const char * category,const QString \u0026 message,bool fromLocalInstance"},{"Uniquefunname":"void writeAssert(const char * file,int line,const char * function,const char * condition)","Funname":"writeAssert","Returntype":"void","Args":"const char * file,int line,const char * function,const char * condition"},{"Uniquefunname":" ~Logger()","Funname":"~Logger","Returntype":"","Args":""}],"Records":[{"Name":"enum:LogLevel","Fields":["Debug","Error","Fatal","Info","Trace","Warning"]},{"Name":"macro","Fields":["LOGGER_H","dAssert(cond)","dAssertX(cond,msg)","dCDebug(category)","dCError(category)","dCFatal(category)","dCInfo(category)","dCTrace(category)","dCWarning(category)","dCategory(category)","dDebug","dDebugTime","dError","dFatal","dGlobalCategory(category)","dInfo","dInfoTime","dTrace","dTraceTime","dWarning","logger"]}]}
+{"Filepath":"src/log/OutputDebugAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"}],"Records":[{"Name":"macro","Fields":["OUTPUTDEBUGAPPENDER_H"]}]}
+{"Filepath":"src/log/RollingFileAppender.h","Functions":[{"Uniquefunname":"protected append(const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message)","Funname":"append","Returntype":"protected","Args":"const QDateTime \u0026 timeStamp,Logger::LogLevel logLevel,const char * file,int line,const char * function,const QString \u0026 category,const QString \u0026 message"},{"Uniquefunname":"void computeFrequency()","Funname":"computeFrequency","Returntype":"void","Args":""},{"Uniquefunname":"void computeRollOverTime()","Funname":"computeRollOverTime","Returntype":"void","Args":""},{"Uniquefunname":"DatePattern datePattern()","Funname":"datePattern","Returntype":"DatePattern","Args":""},{"Uniquefunname":"QString datePatternString()","Funname":"datePatternString","Returntype":"QString","Args":""},{"Uniquefunname":"int logFilesLimit()","Funname":"logFilesLimit","Returntype":"int","Args":""},{"Uniquefunname":"qint64 logSizeLimit()","Funname":"logSizeLimit","Returntype":"qint64","Args":""},{"Uniquefunname":"void removeOldFiles()","Funname":"removeOldFiles","Returntype":"void","Args":""},{"Uniquefunname":"private rollOver()","Funname":"rollOver","Returntype":"private","Args":""},{"Uniquefunname":"void setDatePattern(DatePattern datePattern)","Funname":"setDatePattern","Returntype":"void","Args":"DatePattern datePattern"},{"Uniquefunname":"void setDatePattern(const QString \u0026 datePattern)","Funname":"setDatePattern","Returntype":"void","Args":"const QString \u0026 datePattern"},{"Uniquefunname":"void setDatePatternString(const QString \u0026 datePatternString)","Funname":"setDatePatternString","Returntype":"void","Args":"const QString \u0026 datePatternString"},{"Uniquefunname":"void setLogFilesLimit(int limit)","Funname":"setLogFilesLimit","Returntype":"void","Args":"int limit"},{"Uniquefunname":"void setLogSizeLimit(int qint64)","Funname":"setLogSizeLimit","Returntype":"void","Args":"int qint64"}],"Records":[{"Name":"enum:DatePattern","Fields":["DailyRollover","HalfDailyRollover","HourlyRollover","MinutelyRollover","MonthlyRollover","WeeklyRollover"]},{"Name":"macro","Fields":["ROLLINGFILEAPPENDER_H"]}]}
 {"Filepath":"src/settings/dsettings.h","Functions":[{"Uniquefunname":"QPointer\u003cDSettings\u003e fromJson(const QByteArray \u0026 json)","Funname":"fromJson","Returntype":"QPointer\u003cDSettings\u003e","Args":"const QByteArray \u0026 json"},{"Uniquefunname":"QPointer\u003cDSettings\u003e fromJsonFile(const QString \u0026 filepath)","Funname":"fromJsonFile","Returntype":"QPointer\u003cDSettings\u003e","Args":"const QString \u0026 filepath"},{"Uniquefunname":"QVariant getOption(const QString \u0026 key)","Funname":"getOption","Returntype":"QVariant","Args":"const QString \u0026 key"},{"Uniquefunname":"QPointer\u003cDSettingsGroup\u003e group(const QString \u0026 key)","Funname":"group","Returntype":"QPointer\u003cDSettingsGroup\u003e","Args":"const QString \u0026 key"},{"Uniquefunname":"QStringList groupKeys()","Funname":"groupKeys","Returntype":"QStringList","Args":""},{"Uniquefunname":"QList\u003cQPointer\u003cDSettingsGroup\u003e\u003e groups()","Funname":"groups","Returntype":"QList\u003cQPointer\u003cDSettingsGroup\u003e\u003e","Args":""},{"Uniquefunname":"QStringList keys()","Funname":"keys","Returntype":"QStringList","Args":""},{"Uniquefunname":"void loadValue()","Funname":"loadValue","Returntype":"void","Args":""},{"Uniquefunname":"QJsonObject meta()","Funname":"meta","Returntype":"QJsonObject","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsOption\u003e option(const QString \u0026 key)","Funname":"option","Returntype":"QPointer\u003cDSettingsOption\u003e","Args":"const QString \u0026 key"},{"Uniquefunname":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e options()","Funname":"options","Returntype":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e","Args":""},{"Uniquefunname":"private parseJson(const QByteArray \u0026 json)","Funname":"parseJson","Returntype":"private","Args":"const QByteArray \u0026 json"},{"Uniquefunname":"void reset()","Funname":"reset","Returntype":"void","Args":""},{"Uniquefunname":"void setOption(const QString \u0026 key,const QVariant \u0026 value)","Funname":"setOption","Returntype":"void","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"public Q_SLOTS sync()","Funname":"sync","Returntype":"public Q_SLOTS","Args":""},{"Uniquefunname":"QVariant value(const QString \u0026 key)","Funname":"value","Returntype":"QVariant","Args":"const QString \u0026 key"},{"Uniquefunname":"Q_SIGNALS valueChanged(const QString \u0026 key,const QVariant \u0026 value)","Funname":"valueChanged","Returntype":"Q_SIGNALS","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":" ~DSettings()","Funname":"~DSettings","Returntype":"","Args":""}],"Records":null}
 {"Filepath":"src/settings/dsettingsbackend.h","Functions":[{"Uniquefunname":"protected doSetOption(const QString \u0026 key,const QVariant \u0026 value)","Funname":"doSetOption","Returntype":"protected","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"virtual void doSync()","Funname":"doSync","Returntype":"virtual void","Args":""},{"Uniquefunname":"virtual QVariant getOption(const QString \u0026 key)","Funname":"getOption","Returntype":"virtual QVariant","Args":"const QString \u0026 key"},{"Uniquefunname":"virtual QStringList keys()","Funname":"keys","Returntype":"virtual QStringList","Args":""},{"Uniquefunname":"Q_SIGNALS optionChanged(const QString \u0026 key,const QVariant \u0026 value)","Funname":"optionChanged","Returntype":"Q_SIGNALS","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"void setOption(const QString \u0026 key,const QVariant \u0026 value)","Funname":"setOption","Returntype":"void","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"Q_SIGNALS sync()","Funname":"sync","Returntype":"Q_SIGNALS","Args":""},{"Uniquefunname":"virtual ~DSettingsBackend()","Funname":"~DSettingsBackend","Returntype":"virtual","Args":""}],"Records":null}
 {"Filepath":"src/settings/dsettingsgroup.h","Functions":[{"Uniquefunname":"QPointer\u003cDSettingsGroup\u003e childGroup(const QString \u0026 groupKey)","Funname":"childGroup","Returntype":"QPointer\u003cDSettingsGroup\u003e","Args":"const QString \u0026 groupKey"},{"Uniquefunname":"QList\u003cQPointer\u003cDSettingsGroup\u003e\u003e childGroups()","Funname":"childGroups","Returntype":"QList\u003cQPointer\u003cDSettingsGroup\u003e\u003e","Args":""},{"Uniquefunname":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e childOptions()","Funname":"childOptions","Returntype":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsGroup\u003e fromJson(const QString \u0026 prefixKey,const QJsonObject \u0026 group)","Funname":"fromJson","Returntype":"QPointer\u003cDSettingsGroup\u003e","Args":"const QString \u0026 prefixKey,const QJsonObject \u0026 group"},{"Uniquefunname":"bool isHidden()","Funname":"isHidden","Returntype":"bool","Args":""},{"Uniquefunname":"QString key()","Funname":"key","Returntype":"QString","Args":""},{"Uniquefunname":"QString name()","Funname":"name","Returntype":"QString","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsOption\u003e option(const QString \u0026 key)","Funname":"option","Returntype":"QPointer\u003cDSettingsOption\u003e","Args":"const QString \u0026 key"},{"Uniquefunname":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e options()","Funname":"options","Returntype":"QList\u003cQPointer\u003cDSettingsOption\u003e\u003e","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsGroup\u003e parentGroup()","Funname":"parentGroup","Returntype":"QPointer\u003cDSettingsGroup\u003e","Args":""},{"Uniquefunname":"private parseJson(const QString \u0026 prefixKey,const QJsonObject \u0026 group)","Funname":"parseJson","Returntype":"private","Args":"const QString \u0026 prefixKey,const QJsonObject \u0026 group"},{"Uniquefunname":"void setParentGroup(QPointer\u003cDSettingsGroup\u003e parentGroup)","Funname":"setParentGroup","Returntype":"void","Args":"QPointer\u003cDSettingsGroup\u003e parentGroup"},{"Uniquefunname":" ~DSettingsGroup()","Funname":"~DSettingsGroup","Returntype":"","Args":""}],"Records":null}
 {"Filepath":"src/settings/dsettingsoption.h","Functions":[{"Uniquefunname":"    Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)","Funname":"Q_PROPERTY","Returntype":"Q_OBJECT","Args":"QVariant value READ value WRITE setValue NOTIFY valueChanged"},{"Uniquefunname":"bool canReset()","Funname":"canReset","Returntype":"bool","Args":""},{"Uniquefunname":"QVariant data(const QString \u0026 dataType)","Funname":"data","Returntype":"QVariant","Args":"const QString \u0026 dataType"},{"Uniquefunname":"void dataChanged(const QString \u0026 dataType,QVariant value)","Funname":"dataChanged","Returntype":"void","Args":"const QString \u0026 dataType,QVariant value"},{"Uniquefunname":"QVariant defaultValue()","Funname":"defaultValue","Returntype":"QVariant","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsOption\u003e fromJson(const QString \u0026 prefixKey,const QJsonObject \u0026 json)","Funname":"fromJson","Returntype":"QPointer\u003cDSettingsOption\u003e","Args":"const QString \u0026 prefixKey,const QJsonObject \u0026 json"},{"Uniquefunname":"bool isHidden()","Funname":"isHidden","Returntype":"bool","Args":""},{"Uniquefunname":"QString key()","Funname":"key","Returntype":"QString","Args":""},{"Uniquefunname":"QString name()","Funname":"name","Returntype":"QString","Args":""},{"Uniquefunname":"QPointer\u003cDSettingsGroup\u003e parentGroup()","Funname":"parentGroup","Returntype":"QPointer\u003cDSettingsGroup\u003e","Args":""},{"Uniquefunname":"private parseJson(const QString \u0026 prefixKey,const QJsonObject \u0026 option)","Funname":"parseJson","Returntype":"private","Args":"const QString \u0026 prefixKey,const QJsonObject \u0026 option"},{"Uniquefunname":"void setData(const QString \u0026 dataType,QVariant value)","Funname":"setData","Returntype":"void","Args":"const QString \u0026 dataType,QVariant value"},{"Uniquefunname":"void setParentGroup(QPointer\u003cDSettingsGroup\u003e parentGroup)","Funname":"setParentGroup","Returntype":"void","Args":"QPointer\u003cDSettingsGroup\u003e parentGroup"},{"Uniquefunname":"public Q_SLOTS setValue(QVariant value)","Funname":"setValue","Returntype":"public Q_SLOTS","Args":"QVariant value"},{"Uniquefunname":"QVariant value()","Funname":"value","Returntype":"QVariant","Args":""},{"Uniquefunname":"Q_SIGNALS valueChanged(QVariant value)","Funname":"valueChanged","Returntype":"Q_SIGNALS","Args":"QVariant value"},{"Uniquefunname":"QString viewType()","Funname":"viewType","Returntype":"QString","Args":""},{"Uniquefunname":" ~DSettingsOption()","Funname":"~DSettingsOption","Returntype":"","Args":""}],"Records":null}
 {"Filepath":"src/settings/backend/gsettingsbackend.h","Functions":[{"Uniquefunname":"protected Q_SLOTS doSetOption(const QString \u0026 key,const QVariant \u0026 value)","Funname":"doSetOption","Returntype":"protected Q_SLOTS","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"virtual void doSync()","Funname":"doSync","Returntype":"virtual void","Args":""},{"Uniquefunname":"virtual QVariant getOption(const QString \u0026 key)","Funname":"getOption","Returntype":"virtual QVariant","Args":"const QString \u0026 key"},{"Uniquefunname":"virtual QStringList keys()","Funname":"keys","Returntype":"virtual QStringList","Args":""},{"Uniquefunname":" ~GSettingsBackend()","Funname":"~GSettingsBackend","Returntype":"","Args":""}],"Records":null}
 {"Filepath":"src/settings/backend/qsettingbackend.h","Functions":[{"Uniquefunname":"protected Q_SLOTS doSetOption(const QString \u0026 key,const QVariant \u0026 value)","Funname":"doSetOption","Returntype":"protected Q_SLOTS","Args":"const QString \u0026 key,const QVariant \u0026 value"},{"Uniquefunname":"virtual void doSync()","Funname":"doSync","Returntype":"virtual void","Args":""},{"Uniquefunname":"virtual QVariant getOption(const QString \u0026 key)","Funname":"getOption","Returntype":"virtual QVariant","Args":"const QString \u0026 key"},{"Uniquefunname":"virtual QStringList keys()","Funname":"keys","Returntype":"virtual QStringList","Args":""},{"Uniquefunname":" ~QSettingBackend()","Funname":"~QSettingBackend","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/util/dabstractunitformatter.h","Functions":[{"Uniquefunname":"public DAbstractUnitFormatter()","Funname":"DAbstractUnitFormatter","Returntype":"public","Args":""},{"Uniquefunname":"QPair\u003cqreal,int\u003e format(const qreal value,const int unit)","Funname":"format","Returntype":"QPair\u003cqreal,int\u003e","Args":"const qreal value,const int unit"},{"Uniquefunname":"public formatAs(qreal value,int currentUnit,const int targetUnit)","Funname":"formatAs","Returntype":"public","Args":"qreal value,int currentUnit,const int targetUnit"},{"Uniquefunname":"QList\u003cQPair\u003cqreal,int\u003e\u003e formatAsUnitList(const qreal value,int unit)","Funname":"formatAsUnitList","Returntype":"QList\u003cQPair\u003cqreal,int\u003e\u003e","Args":"const qreal value,int unit"},{"Uniquefunname":"virtual uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"virtual uint","Args":"int unitId"},{"Uniquefunname":"protected unitMax()","Funname":"unitMax","Returntype":"protected","Args":""},{"Uniquefunname":"virtual int unitMin()","Funname":"unitMin","Returntype":"virtual int","Args":""},{"Uniquefunname":"virtual QString unitStr(int unitId)","Funname":"unitStr","Returntype":"virtual QString","Args":"int unitId"},{"Uniquefunname":"virtual qreal unitValueMax(int unitId)","Funname":"unitValueMax","Returntype":"virtual qreal","Args":"int unitId"},{"Uniquefunname":"virtual qreal unitValueMin(int unitId)","Funname":"unitValueMin","Returntype":"virtual qreal","Args":"int unitId"},{"Uniquefunname":" ~DAbstractUnitFormatter()","Funname":"~DAbstractUnitFormatter","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/util/ddbussender.h","Functions":[{"Uniquefunname":"private DDBusCaller(const QString \u0026 method,std::shared_ptr\u003cDDBusData\u003e data)","Funname":"DDBusCaller","Returntype":"private","Args":"const QString \u0026 method,std::shared_ptr\u003cDDBusData\u003e data"},{"Uniquefunname":"public DDBusData()","Funname":"DDBusData","Returntype":"public","Args":""},{"Uniquefunname":"private DDBusProperty(const QString \u0026 property,std::shared_ptr\u003cDDBusData\u003e data)","Funname":"DDBusProperty","Returntype":"private","Args":"const QString \u0026 property,std::shared_ptr\u003cDDBusData\u003e data"},{"Uniquefunname":"public DDBusSender()","Funname":"DDBusSender","Returntype":"public","Args":""},{"Uniquefunname":"template\u003ctypename T\u003e DDBusCaller arg(const T \u0026 argument)","Funname":"arg","Returntype":"template\u003ctypename T\u003e DDBusCaller","Args":"const T \u0026 argument"},{"Uniquefunname":"DDBusCaller DDBusCaller::arg(const T \u0026argument)","Funname":"arg","Returntype":"template\u003ctypename T\u003e DDBusCaller DDBusCaller","Args":"const T \u0026 argument"},{"Uniquefunname":"public call()","Funname":"call","Returntype":"public","Args":""},{"Uniquefunname":"public get()","Funname":"get","Returntype":"public","Args":""},{"Uniquefunname":"DDBusSender interface(const QString \u0026 interface)","Funname":"interface","Returntype":"DDBusSender","Args":"const QString \u0026 interface"},{"Uniquefunname":"DDBusCaller method(const QString \u0026 method)","Funname":"method","Returntype":"DDBusCaller","Args":"const QString \u0026 method"},{"Uniquefunname":"DDBusSender path(const QString \u0026 path)","Funname":"path","Returntype":"DDBusSender","Args":"const QString \u0026 path"},{"Uniquefunname":"DDBusProperty property(const QString \u0026 property)","Funname":"property","Returntype":"DDBusProperty","Args":"const QString \u0026 property"},{"Uniquefunname":"DDBusSender service(const QString \u0026 service)","Funname":"service","Returntype":"DDBusSender","Args":"const QString \u0026 service"},{"Uniquefunname":"template\u003ctypename T\u003e QDBusPendingCall set(const T \u0026 value)","Funname":"set","Returntype":"template\u003ctypename T\u003e QDBusPendingCall","Args":"const T \u0026 value"},{"Uniquefunname":"QDBusPendingCall DDBusProperty::set(const T \u0026value)","Funname":"set","Returntype":"template\u003ctypename T\u003e QDBusPendingCall DDBusProperty","Args":"const T \u0026 value"},{"Uniquefunname":"private type(const QDBusConnection::BusType busType)","Funname":"type","Returntype":"private","Args":"const QDBusConnection::BusType busType"}],"Records":null}
-{"Filepath":"src/util/ddisksizeformatter.h","Functions":[{"Uniquefunname":"public DDiskSizeFormatter()","Funname":"DDiskSizeFormatter","Returntype":"public","Args":""},{"Uniquefunname":"DDiskSizeFormatter rate(int rate)","Funname":"rate","Returntype":"DDiskSizeFormatter","Args":"int rate"},{"Uniquefunname":"uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"uint","Args":"int unitId"},{"Uniquefunname":"int unitMax()","Funname":"unitMax","Returntype":"int","Args":""},{"Uniquefunname":"protected unitMin()","Funname":"unitMin","Returntype":"protected","Args":""},{"Uniquefunname":"QString unitStr(int unitId)","Funname":"unitStr","Returntype":"QString","Args":"int unitId"}],"Records":[{"Name":"enum:DiskUnits","Fields":["B","G","K","M","T"]}]}
-{"Filepath":"src/util/dexportedinterface.h","Functions":[{"Uniquefunname":"virtual QVariant invoke(const QString \u0026 action,const QString \u0026 parameters)","Funname":"invoke","Returntype":"virtual QVariant","Args":"const QString \u0026 action,const QString \u0026 parameters"},{"Uniquefunname":" ~DExportedInterface()","Funname":"~DExportedInterface","Returntype":"","Args":""}],"Records":null}
-{"Filepath":"src/util/dfileservices.h","Functions":[{"Uniquefunname":"QString errorMessage()","Funname":"errorMessage","Returntype":"QString","Args":""},{"Uniquefunname":"bool trash(QString localFilePath)","Funname":"trash","Returntype":"bool","Args":"QString localFilePath"},{"Uniquefunname":"bool trash(QUrl urlstartupId)","Funname":"trash","Returntype":"bool","Args":"QUrl urlstartupId"},{"Uniquefunname":"bool trash(const QList\u003cQString\u003e localFilePaths)","Funname":"trash","Returntype":"bool","Args":"const QList\u003cQString\u003e localFilePaths"},{"Uniquefunname":"bool trash(const QList\u003cQUrl\u003e urls)","Funname":"trash","Returntype":"bool","Args":"const QList\u003cQUrl\u003e urls"}],"Records":null}
-{"Filepath":"src/util/dnotifysender.h","Functions":[{"Uniquefunname":"public DNotifySender(const QString \u0026 summary)","Funname":"DNotifySender","Returntype":"public","Args":"const QString \u0026 summary"},{"Uniquefunname":"QDBusPendingCall call()","Funname":"call","Returntype":"QDBusPendingCall","Args":""}],"Records":null}
-{"Filepath":"src/util/dpinyin.h","Functions":[{"Uniquefunname":"DCORE_BEGIN_NAMESPACE QString Chinese2Pinyin(const QString \u0026 words)","Funname":"Chinese2Pinyin","Returntype":"DCORE_BEGIN_NAMESPACE QString","Args":"const QString \u0026 words"}],"Records":null}
-{"Filepath":"src/util/drecentmanager.h","Functions":[{"Uniquefunname":"public addItem(const QString \u0026 uri,DRecentData \u0026 data)","Funname":"addItem","Returntype":"public","Args":"const QString \u0026 uri,DRecentData \u0026 data"},{"Uniquefunname":"void removeItem(const QString \u0026 target)","Funname":"removeItem","Returntype":"void","Args":"const QString \u0026 target"},{"Uniquefunname":"void removeItems(const QStringList \u0026 list)","Funname":"removeItems","Returntype":"void","Args":"const QStringList \u0026 list"}],"Records":[{"Name":"struct:DRecentData","Fields":["QString","QString","QString"]}]}
-{"Filepath":"src/util/dthreadutils.h","Functions":[{"Uniquefunname":"Q_OBJECT public FunctionCallProxy(QThread * thread)","Funname":"FunctionCallProxy","Returntype":"Q_OBJECT public","Args":"QThread * thread"},{"Uniquefunname":"Q_SIGNALS callInLiveThread(QSemaphore * s,QPointer\u003cQObject\u003e target,FunctionType * func)","Funname":"callInLiveThread","Returntype":"Q_SIGNALS","Args":"QSemaphore * s,QPointer\u003cQObject\u003e target,FunctionType * func"},{"Uniquefunname":"void proxyCall(QSemaphore * s,QThread * thread,QObject * target,FunctionType fun)","Funname":"proxyCall","Returntype":"void","Args":"QSemaphore * s,QThread * thread,QObject * target,FunctionType fun"},{"Uniquefunname":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate runInMainThread(T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInMainThread","Returntype":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate","Args":"T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInMainThread(typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInMainThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QSemaphore * s,QThread * thread,QObject * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QSemaphore * s,QThread * thread,QObject * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QSemaphore * s,QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QSemaphore * s,QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate runInThread(QThread * thread,T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate","Args":"QThread * thread,T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"public runInThread(QSemaphore * s,QThread * thread,QObject * target,std::function\u003cReturnType ()\u003e fun)","Funname":"runInThread","Returntype":"public","Args":"QSemaphore * s,QThread * thread,QObject * target,std::function\u003cReturnType ()\u003e fun"},{"Uniquefunname":"public runInThread(QSemaphore * s,QThread * thread,QObject * target,std::function\u003cvoid ()\u003e fun)","Funname":"runInThread","Returntype":"public","Args":"QSemaphore * s,QThread * thread,QObject * target,std::function\u003cvoid ()\u003e fun"}],"Records":null}
-{"Filepath":"src/util/dtimeunitformatter.h","Functions":[{"Uniquefunname":"public DTimeUnitFormatter()","Funname":"DTimeUnitFormatter","Returntype":"public","Args":""},{"Uniquefunname":"uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"uint","Args":"int unitId"},{"Uniquefunname":"protected unitMax()","Funname":"unitMax","Returntype":"protected","Args":""},{"Uniquefunname":"int unitMin()","Funname":"unitMin","Returntype":"int","Args":""},{"Uniquefunname":"QString unitStr(int unitId)","Funname":"unitStr","Returntype":"QString","Args":"int unitId"}],"Records":[{"Name":"enum:TimeUnits","Fields":["Day","Hour","Minute","Seconds"]}]}
+{"Filepath":"src/util/dabstractunitformatter.h","Functions":[{"Uniquefunname":"public DAbstractUnitFormatter()","Funname":"DAbstractUnitFormatter","Returntype":"public","Args":""},{"Uniquefunname":"QPair\u003cqreal,int\u003e format(const qreal value,const int unit)","Funname":"format","Returntype":"QPair\u003cqreal,int\u003e","Args":"const qreal value,const int unit"},{"Uniquefunname":"public formatAs(qreal value,int currentUnit,const int targetUnit)","Funname":"formatAs","Returntype":"public","Args":"qreal value,int currentUnit,const int targetUnit"},{"Uniquefunname":"QList\u003cQPair\u003cqreal,int\u003e\u003e formatAsUnitList(const qreal value,int unit)","Funname":"formatAsUnitList","Returntype":"QList\u003cQPair\u003cqreal,int\u003e\u003e","Args":"const qreal value,int unit"},{"Uniquefunname":"virtual uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"virtual uint","Args":"int unitId"},{"Uniquefunname":"protected unitMax()","Funname":"unitMax","Returntype":"protected","Args":""},{"Uniquefunname":"virtual int unitMin()","Funname":"unitMin","Returntype":"virtual int","Args":""},{"Uniquefunname":"virtual QString unitStr(int unitId)","Funname":"unitStr","Returntype":"virtual QString","Args":"int unitId"},{"Uniquefunname":"virtual qreal unitValueMax(int unitId)","Funname":"unitValueMax","Returntype":"virtual qreal","Args":"int unitId"},{"Uniquefunname":"virtual qreal unitValueMin(int unitId)","Funname":"unitValueMin","Returntype":"virtual qreal","Args":"int unitId"},{"Uniquefunname":" ~DAbstractUnitFormatter()","Funname":"~DAbstractUnitFormatter","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DABSTRACTUNITFORMATTER_H"]}]}
+{"Filepath":"src/util/ddbussender.h","Functions":[{"Uniquefunname":"private DDBusCaller(const QString \u0026 method,std::shared_ptr\u003cDDBusData\u003e data)","Funname":"DDBusCaller","Returntype":"private","Args":"const QString \u0026 method,std::shared_ptr\u003cDDBusData\u003e data"},{"Uniquefunname":"public DDBusData()","Funname":"DDBusData","Returntype":"public","Args":""},{"Uniquefunname":"private DDBusProperty(const QString \u0026 property,std::shared_ptr\u003cDDBusData\u003e data)","Funname":"DDBusProperty","Returntype":"private","Args":"const QString \u0026 property,std::shared_ptr\u003cDDBusData\u003e data"},{"Uniquefunname":"public DDBusSender()","Funname":"DDBusSender","Returntype":"public","Args":""},{"Uniquefunname":"template\u003ctypename T\u003e DDBusCaller arg(const T \u0026 argument)","Funname":"arg","Returntype":"template\u003ctypename T\u003e DDBusCaller","Args":"const T \u0026 argument"},{"Uniquefunname":"DDBusCaller DDBusCaller::arg(const T \u0026argument)","Funname":"arg","Returntype":"template\u003ctypename T\u003e DDBusCaller DDBusCaller","Args":"const T \u0026 argument"},{"Uniquefunname":"public call()","Funname":"call","Returntype":"public","Args":""},{"Uniquefunname":"public get()","Funname":"get","Returntype":"public","Args":""},{"Uniquefunname":"DDBusSender interface(const QString \u0026 interface)","Funname":"interface","Returntype":"DDBusSender","Args":"const QString \u0026 interface"},{"Uniquefunname":"DDBusCaller method(const QString \u0026 method)","Funname":"method","Returntype":"DDBusCaller","Args":"const QString \u0026 method"},{"Uniquefunname":"DDBusSender path(const QString \u0026 path)","Funname":"path","Returntype":"DDBusSender","Args":"const QString \u0026 path"},{"Uniquefunname":"DDBusProperty property(const QString \u0026 property)","Funname":"property","Returntype":"DDBusProperty","Args":"const QString \u0026 property"},{"Uniquefunname":"DDBusSender service(const QString \u0026 service)","Funname":"service","Returntype":"DDBusSender","Args":"const QString \u0026 service"},{"Uniquefunname":"template\u003ctypename T\u003e QDBusPendingCall set(const T \u0026 value)","Funname":"set","Returntype":"template\u003ctypename T\u003e QDBusPendingCall","Args":"const T \u0026 value"},{"Uniquefunname":"QDBusPendingCall DDBusProperty::set(const T \u0026value)","Funname":"set","Returntype":"template\u003ctypename T\u003e QDBusPendingCall DDBusProperty","Args":"const T \u0026 value"},{"Uniquefunname":"private type(const QDBusConnection::BusType busType)","Funname":"type","Returntype":"private","Args":"const QDBusConnection::BusType busType"}],"Records":[{"Name":"macro","Fields":["DDBUSSENDER_H"]}]}
+{"Filepath":"src/util/ddisksizeformatter.h","Functions":[{"Uniquefunname":"public DDiskSizeFormatter()","Funname":"DDiskSizeFormatter","Returntype":"public","Args":""},{"Uniquefunname":"DDiskSizeFormatter rate(int rate)","Funname":"rate","Returntype":"DDiskSizeFormatter","Args":"int rate"},{"Uniquefunname":"uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"uint","Args":"int unitId"},{"Uniquefunname":"int unitMax()","Funname":"unitMax","Returntype":"int","Args":""},{"Uniquefunname":"protected unitMin()","Funname":"unitMin","Returntype":"protected","Args":""},{"Uniquefunname":"QString unitStr(int unitId)","Funname":"unitStr","Returntype":"QString","Args":"int unitId"}],"Records":[{"Name":"enum:DiskUnits","Fields":["B","G","K","M","T"]},{"Name":"macro","Fields":["DISKSIZEFORMATTER_H"]}]}
+{"Filepath":"src/util/dexportedinterface.h","Functions":[{"Uniquefunname":"virtual QVariant invoke(const QString \u0026 action,const QString \u0026 parameters)","Funname":"invoke","Returntype":"virtual QVariant","Args":"const QString \u0026 action,const QString \u0026 parameters"},{"Uniquefunname":" ~DExportedInterface()","Funname":"~DExportedInterface","Returntype":"","Args":""}],"Records":[{"Name":"macro","Fields":["DEXPORTEDINTERFACE_H"]}]}
+{"Filepath":"src/util/dfileservices.h","Functions":[{"Uniquefunname":"QString errorMessage()","Funname":"errorMessage","Returntype":"QString","Args":""},{"Uniquefunname":"bool trash(QString localFilePath)","Funname":"trash","Returntype":"bool","Args":"QString localFilePath"},{"Uniquefunname":"bool trash(QUrl urlstartupId)","Funname":"trash","Returntype":"bool","Args":"QUrl urlstartupId"},{"Uniquefunname":"bool trash(const QList\u003cQString\u003e localFilePaths)","Funname":"trash","Returntype":"bool","Args":"const QList\u003cQString\u003e localFilePaths"},{"Uniquefunname":"bool trash(const QList\u003cQUrl\u003e urls)","Funname":"trash","Returntype":"bool","Args":"const QList\u003cQUrl\u003e urls"}],"Records":[{"Name":"macro","Fields":["DFILESERVICES_H"]}]}
+{"Filepath":"src/util/dnotifysender.h","Functions":[{"Uniquefunname":"public DNotifySender(const QString \u0026 summary)","Funname":"DNotifySender","Returntype":"public","Args":"const QString \u0026 summary"},{"Uniquefunname":"QDBusPendingCall call()","Funname":"call","Returntype":"QDBusPendingCall","Args":""}],"Records":[{"Name":"macro","Fields":["DNOTIFYSENDER_H"]}]}
+{"Filepath":"src/util/dpinyin.h","Functions":[{"Uniquefunname":"DCORE_BEGIN_NAMESPACE QString Chinese2Pinyin(const QString \u0026 words)","Funname":"Chinese2Pinyin","Returntype":"DCORE_BEGIN_NAMESPACE QString","Args":"const QString \u0026 words"}],"Records":[{"Name":"macro","Fields":["DPINYIN_H"]}]}
+{"Filepath":"src/util/drecentmanager.h","Functions":[{"Uniquefunname":"public addItem(const QString \u0026 uri,DRecentData \u0026 data)","Funname":"addItem","Returntype":"public","Args":"const QString \u0026 uri,DRecentData \u0026 data"},{"Uniquefunname":"void removeItem(const QString \u0026 target)","Funname":"removeItem","Returntype":"void","Args":"const QString \u0026 target"},{"Uniquefunname":"void removeItems(const QStringList \u0026 list)","Funname":"removeItems","Returntype":"void","Args":"const QStringList \u0026 list"}],"Records":[{"Name":"macro","Fields":["DRECENTMANAGER_H"]},{"Name":"struct:DRecentData","Fields":["QString DRecentData::appExec","QString DRecentData::appName","QString DRecentData::mimeType"]}]}
+{"Filepath":"src/util/dthreadutils.h","Functions":[{"Uniquefunname":"Q_OBJECT public FunctionCallProxy(QThread * thread)","Funname":"FunctionCallProxy","Returntype":"Q_OBJECT public","Args":"QThread * thread"},{"Uniquefunname":"Q_SIGNALS callInLiveThread(QSemaphore * s,QPointer\u003cQObject\u003e target,FunctionType * func)","Funname":"callInLiveThread","Returntype":"Q_SIGNALS","Args":"QSemaphore * s,QPointer\u003cQObject\u003e target,FunctionType * func"},{"Uniquefunname":"void proxyCall(QSemaphore * s,QThread * thread,QObject * target,FunctionType fun)","Funname":"proxyCall","Returntype":"void","Args":"QSemaphore * s,QThread * thread,QObject * target,FunctionType fun"},{"Uniquefunname":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate runInMainThread(T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInMainThread","Returntype":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate","Args":"T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInMainThread(typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInMainThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QSemaphore * s,QThread * thread,QObject * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QSemaphore * s,QThread * thread,QObject * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QSemaphore * s,QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QSemaphore * s,QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate runInThread(QThread * thread,T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename T,typename Fun,typename...Args\u003e typename QtPrivate","Args":"QThread * thread,T * target,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate runInThread(QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args)","Funname":"runInThread","Returntype":"template\u003ctypename Fun,typename...Args\u003e typename QtPrivate","Args":"QThread * thread,typename QtPrivate::FunctionPointer\u003cFun\u003e::Object * obj,Fun fun,Args \u0026\u0026...args"},{"Uniquefunname":"public runInThread(QSemaphore * s,QThread * thread,QObject * target,std::function\u003cReturnType ()\u003e fun)","Funname":"runInThread","Returntype":"public","Args":"QSemaphore * s,QThread * thread,QObject * target,std::function\u003cReturnType ()\u003e fun"},{"Uniquefunname":"public runInThread(QSemaphore * s,QThread * thread,QObject * target,std::function\u003cvoid ()\u003e fun)","Funname":"runInThread","Returntype":"public","Args":"QSemaphore * s,QThread * thread,QObject * target,std::function\u003cvoid ()\u003e fun"}],"Records":[{"Name":"macro","Fields":["DTHREADUTILS_H"]}]}
+{"Filepath":"src/util/dtimeunitformatter.h","Functions":[{"Uniquefunname":"public DTimeUnitFormatter()","Funname":"DTimeUnitFormatter","Returntype":"public","Args":""},{"Uniquefunname":"uint unitConvertRate(int unitId)","Funname":"unitConvertRate","Returntype":"uint","Args":"int unitId"},{"Uniquefunname":"protected unitMax()","Funname":"unitMax","Returntype":"protected","Args":""},{"Uniquefunname":"int unitMin()","Funname":"unitMin","Returntype":"int","Args":""},{"Uniquefunname":"QString unitStr(int unitId)","Funname":"unitStr","Returntype":"QString","Args":"int unitId"}],"Records":[{"Name":"macro","Fields":["DTIMEUNITFORMATTER_H"]},{"Name":"enum:TimeUnits","Fields":["Day","Hour","Minute","Seconds"]}]}
 {"Filepath":"src/util/dutil.h","Functions":[{"Uniquefunname":"void SecureErase(T \u0026obj)","Funname":"SecureErase","Returntype":"template\u003cclass T\u003e void","Args":"T \u0026 obj"},{"Uniquefunname":"void SecureErase(T *p, size_t size)","Funname":"SecureErase","Returntype":"template\u003cclass T\u003e void","Args":"T * p,size_t size"},{"Uniquefunname":"inline void TimerSingleShot(int msec,  Func1 slot)","Funname":"TimerSingleShot","Returntype":"template\u003ctypename Func1\u003e void","Args":"int msec,Func1 slot"}],"Records":null}
-{"Filepath":"src/util/dvtablehook.h","Functions":[{"Uniquefunname":"void autoCleanVtable(const void * obj)","Funname":"autoCleanVtable","Returntype":"void","Args":"const void * obj"},{"Uniquefunname":"bool ensureVtable(const void * obj,std::function\u003cvoid (void)\u003e destoryObjFun)","Funname":"ensureVtable","Returntype":"bool","Args":"const void * obj,std::function\u003cvoid (void)\u003e destoryObjFun"},{"Uniquefunname":"bool forceWriteMemory(void * adr,const void * data,size_t length)","Funname":"forceWriteMemory","Returntype":"bool","Args":"void * adr,const void * data,size_t length"},{"Uniquefunname":"int getDestructFunIndex(quintptr ** obj,std::function\u003cvoid (void)\u003e destoryObjFun)","Funname":"getDestructFunIndex","Returntype":"int","Args":"quintptr ** obj,std::function\u003cvoid (void)\u003e destoryObjFun"},{"Uniquefunname":"constexpr const QObject * getQObject(...)","Funname":"getQObject","Returntype":"constexpr const QObject *","Args":"..."},{"Uniquefunname":"constexpr const QObject * getQObject(const QObject * obj)","Funname":"getQObject","Returntype":"constexpr const QObject *","Args":"const QObject * obj"},{"Uniquefunname":"    static quintptr *getVtableOfClass()","Funname":"getVtableOfClass","Returntype":"template\u003ctypename T\u003e quintptr *","Args":""},{"Uniquefunname":"    static inline quintptr *getVtableOfObject(const void *obj)","Funname":"getVtableOfObject","Returntype":"quintptr *","Args":"const void * obj"},{"Uniquefunname":"    static inline int getVtableSize(quintptr **obj)","Funname":"getVtableSize","Returntype":"int","Args":"quintptr ** obj"},{"Uniquefunname":"bool hasVtable(const void * obj)","Funname":"hasVtable","Returntype":"bool","Args":"const void * obj"},{"Uniquefunname":"quintptr originalFun(const void * obj,quintptr functionOffset)","Funname":"originalFun","Returntype":"quintptr","Args":"const void * obj,quintptr functionOffset"},{"Uniquefunname":"quintptr resetVfptrFun(const void * obj,quintptr functionOffset)","Funname":"resetVfptrFun","Returntype":"quintptr","Args":"const void * obj,quintptr functionOffset"},{"Uniquefunname":"void resetVtable(const void * obj)","Funname":"resetVtable","Returntype":"void","Args":"const void * obj"},{"Uniquefunname":"QFunctionPointer resolve(const char * symbol)","Funname":"resolve","Returntype":"QFunctionPointer","Args":"const char * symbol"},{"Uniquefunname":"    static inline quintptr toQuintptr(const void *ptr)","Funname":"toQuintptr","Returntype":"public","Args":"const void * ptr"}],"Records":null}
-{"Filepath":"tests/dutils/dutiltester.h","Functions":[{"Uniquefunname":"void testDBusSender()","Funname":"testDBusSender","Returntype":"void","Args":""},{"Uniquefunname":"void testDSingleton()","Funname":"testDSingleton","Returntype":"void","Args":""},{"Uniquefunname":"void testDiskFormatter()","Funname":"testDiskFormatter","Returntype":"void","Args":""},{"Uniquefunname":"void testDiskFormatter1024()","Funname":"testDiskFormatter1024","Returntype":"void","Args":""},{"Uniquefunname":"void testDiskFormatterList()","Funname":"testDiskFormatterList","Returntype":"void","Args":""},{"Uniquefunname":"void testGroups()","Funname":"testGroups","Returntype":"void","Args":""},{"Uniquefunname":"Q_OBJECT private Q_SLOTS testLogPath()","Funname":"testLogPath","Returntype":"Q_OBJECT private Q_SLOTS","Args":""},{"Uniquefunname":"void testPathChange()","Funname":"testPathChange","Returntype":"void","Args":""},{"Uniquefunname":"void testSysInfo()","Funname":"testSysInfo","Returntype":"void","Args":""},{"Uniquefunname":"void testTimeFormatter()","Funname":"testTimeFormatter","Returntype":"void","Args":""},{"Uniquefunname":"void testTimeFormatterList()","Funname":"testTimeFormatterList","Returntype":"void","Args":""}],"Records":null}
-{"Filepath":"tests/dutils/singletontester.h","Functions":[{"Uniquefunname":"void run()","Funname":"run","Returntype":"void","Args":""},{"Uniquefunname":"void test()","Funname":"test","Returntype":"void","Args":""}],"Records":null}
+{"Filepath":"src/util/dvtablehook.h","Functions":[{"Uniquefunname":"void autoCleanVtable(const void * obj)","Funname":"autoCleanVtable","Returntype":"void","Args":"const void * obj"},{"Uniquefunname":"bool ensureVtable(const void * obj,std::function\u003cvoid (void)\u003e destoryObjFun)","Funname":"ensureVtable","Returntype":"bool","Args":"const void * obj,std::function\u003cvoid (void)\u003e destoryObjFun"},{"Uniquefunname":"bool forceWriteMemory(void * adr,const void * data,size_t length)","Funname":"forceWriteMemory","Returntype":"bool","Args":"void * adr,const void * data,size_t length"},{"Uniquefunname":"int getDestructFunIndex(quintptr ** obj,std::function\u003cvoid (void)\u003e destoryObjFun)","Funname":"getDestructFunIndex","Returntype":"int","Args":"quintptr ** obj,std::function\u003cvoid (void)\u003e destoryObjFun"},{"Uniquefunname":"constexpr const QObject * getQObject(...)","Funname":"getQObject","Returntype":"constexpr const QObject *","Args":"..."},{"Uniquefunname":"constexpr const QObject * getQObject(const QObject * obj)","Funname":"getQObject","Returntype":"constexpr const QObject *","Args":"const QObject * obj"},{"Uniquefunname":"    static quintptr *getVtableOfClass()","Funname":"getVtableOfClass","Returntype":"template\u003ctypename T\u003e quintptr *","Args":""},{"Uniquefunname":"    static inline quintptr *getVtableOfObject(const void *obj)","Funname":"getVtableOfObject","Returntype":"quintptr *","Args":"const void * obj"},{"Uniquefunname":"    static inline int getVtableSize(quintptr **obj)","Funname":"getVtableSize","Returntype":"int","Args":"quintptr ** obj"},{"Uniquefunname":"bool hasVtable(const void * obj)","Funname":"hasVtable","Returntype":"bool","Args":"const void * obj"},{"Uniquefunname":"quintptr originalFun(const void * obj,quintptr functionOffset)","Funname":"originalFun","Returntype":"quintptr","Args":"const void * obj,quintptr functionOffset"},{"Uniquefunname":"quintptr resetVfptrFun(const void * obj,quintptr functionOffset)","Funname":"resetVfptrFun","Returntype":"quintptr","Args":"const void * obj,quintptr functionOffset"},{"Uniquefunname":"void resetVtable(const void * obj)","Funname":"resetVtable","Returntype":"void","Args":"const void * obj"},{"Uniquefunname":"QFunctionPointer resolve(const char * symbol)","Funname":"resolve","Returntype":"QFunctionPointer","Args":"const char * symbol"},{"Uniquefunname":"    static inline quintptr toQuintptr(const void *ptr)","Funname":"toQuintptr","Returntype":"public","Args":"const void * ptr"}],"Records":[{"Name":"macro","Fields":["DVTABLEHOOK_H"]}]}
+{"Filepath":"tests/ut_dutil.h","Functions":[{"Uniquefunname":"virtual void SetUp()","Funname":"SetUp","Returntype":"virtual void","Args":""},{"Uniquefunname":"protected SetUpTestCase()","Funname":"SetUpTestCase","Returntype":"protected","Args":""},{"Uniquefunname":"virtual void TearDown()","Funname":"TearDown","Returntype":"virtual void","Args":""},{"Uniquefunname":"void TearDownTestCase()","Funname":"TearDownTestCase","Returntype":"void","Args":""}],"Records":null}
+{"Filepath":"tests/ut_singleton.h","Functions":[{"Uniquefunname":"void run()","Funname":"run","Returntype":"void","Args":""},{"Uniquefunname":"void test()","Funname":"test","Returntype":"void","Args":""}],"Records":null}
index 0a5dde2a77b85a95fd6d27bd558d992ff6878dd8..cf0c8136c07b33238fd79a8ef7bd57ff23b64a16 100644 (file)
@@ -4,12 +4,12 @@ Priority: optional
 Maintainer: Deepin Packages Builder <packages@deepin.com>
 Build-Depends: debhelper (>= 9), pkg-config,
  qttools5-dev-tools, qtbase5-private-dev,
- libgsettings-qt-dev
+ libgsettings-qt-dev, libgtest-dev, libdtkcommon-dev
 Standards-Version: 3.9.8
 
 Package: libdtkcore5
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, lshw
+Depends: ${shlibs:Depends}, ${misc:Depends}, lshw, libdtkcommon
 Multi-Arch: same
 Description: Deepin Tool Kit Core library
  DtkCore is base library of Deepin Qt/C++ applications.
@@ -27,7 +27,7 @@ Description: Deepin Tool Kit Core Utilities
 
 Package: libdtkcore-dev
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkcore5( =${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkcore5( =${binary:Version}), libdtkcommon-dev
 Description: Deepin Tool Kit Core Devel library
  DtkCore is base devel library of Deepin Qt/C++ applications.
  .
index 751f0dc036697182636d109b08eba7161015de7f..3ddde584198421f0d2a3fef9d36cc110f3b8b76d 100644 (file)
@@ -1,2 +1 @@
 usr/lib/*/lib*.so.*
-usr/share/glib-2.0/schemas
index d13bf0f16e7d389f6446c56855e09b9d2def59c2..473feb58ba33f3620c25469adba881e0353426c2 100755 (executable)
@@ -24,8 +24,8 @@ endif
 override_dh_auto_configure:
        dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(CONFIG_VERSION)
 
-override_dh_auto_test:
-       echo "skip auto test"
+#override_dh_auto_test:
+#      echo "skip auto test"
 
-#override_dh_makeshlibs:
-#      dh_makeshlibs -V
+override_dh_makeshlibs:
+       dh_makeshlibs -V "libdtkcore5 (>= $(shell echo $(VERSION) | cut -d '.' -f 1,2))"
index dd6a1acb2634dc1fe07f14780de26d3aeeb1f0b7..18ce4363296807e8262eee3e3db6b937522aa324 100644 (file)
@@ -33,18 +33,20 @@ message("build dtk with version $$VERSION")
 ver_list = $$split(VERSION, .)
 
 isEmpty(VER_MAJ) {
-    VER_MAJ = $$first(ver_list)
+    VER_MAJ = $$format_number($$first(ver_list), ibase=10)
 }
 isEmpty(VER_MIN) {
-    VER_MIN = $$member(ver_list, 1, 1)
+    VER_MIN = $$format_number($$member(ver_list, 1, 1), ibase=10)
     isEmpty(VER_MIN):VER_MIN = 0
 }
 isEmpty(VER_PAT) {
-    VER_PAT = $$member(ver_list, 2, 2)
+    VER_PAT = $$format_number($$member(ver_list, 2, 2), ibase=10)
     isEmpty(VER_PAT):VER_PAT = 0
 }
 isEmpty(VER_BUI) {
     VER_BUI = $$member(ver_list, 3, 3)
+    # fix VER_BUI=009, invalid digit "9" in octal constant error
+    VER_BUI = $$format_number($$VER_BUI, ibase=10)
     isEmpty(VER_BUI):VER_BUI = 0
 }
 
index 1b7c66f8eddfb5aafcf5177a96e72fac613391ed..28a097fb20e75bbea785d4e7f7b4cb993911a0d3 100644 (file)
@@ -1 +1 @@
-include($$PWD/src/dtk_lib.prf)
+load(dtk_lib)
index 5358875f45b6f2ba3e7adabe5a8d5b48aff09071..5e5e43914f25450dc28fbddf1fa3c41eedf36271 100644 (file)
@@ -1,14 +1,21 @@
 Name:           dtkcore
-Version:        5.2.2.3
+Version:        5.4.3
 Release:        1%{?dist}
 Summary:        Deepin tool kit core modules
-License:        GPLv3
+License:        LGPLv3+
 URL:            https://github.com/linuxdeepin/dtkcore
+%if 0%{?fedora}
+Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
+%else
 Source0:        %{name}_%{version}.orig.tar.xz
+%endif
 BuildRequires:  gcc-c++
 BuildRequires:  annobin
 BuildRequires:  pkgconfig(Qt5Core)
 BuildRequires:  pkgconfig(gsettings-qt)
+BuildRequires:  gtest-devel
+
+# since f30
 Obsoletes:      deepin-tool-kit <= 0.3.3
 Obsoletes:      deepin-tool-kit-devel <= 0.3.3
 Obsoletes:      dtksettings <= 0.1.7
@@ -20,18 +27,13 @@ Deepin tool kit core modules.
 %package devel
 Summary:        Development package for %{name}
 Requires:       %{name}%{?_isa} = %{version}-%{release}
-Requires:       qt5-qtbase-devel
+Requires:       qt5-qtbase-devel%{?_isa}
 
 %description devel
 Header files and libraries for %{name}.
 
 %prep
-%setup -q
-
-sed -i 's|/lib|/libexec|' tools/settings/settings.pro
-## consider relying on %%_qt5_bindir (see %%build below) instead of patching -- rex
-#sed -i 's|qmake|qmake-qt5|' src/dtk_module.prf
-#sed -i 's|lrelease|lrelease-qt5|' tools/script/dtk-translate.py src/dtk_translation.prf
+%autosetup -p1
 
 %build
 # help find (and prefer) qt5 utilities, e.g. qmake, lrelease
@@ -46,15 +48,14 @@ export PATH=%{_qt5_bindir}:$PATH
 %install
 %make_install INSTALL_ROOT=%{buildroot}
 
-%ldconfig_scriptlets
-
 %files
 %doc README.md
 %license LICENSE
-%{_libdir}/libdtkcore.so.*
+%{_libdir}/lib%{name}.so.5*
+%dir %{_libexecdir}/dtk5/
 %{_libexecdir}/dtk5/dtk-settings
-%{_libexecdir}/dtk5/dtk-license.py*
-%{_libexecdir}/dtk5/dtk-translate.py*
+%{_libexecdir}/dtk5/dtk-license.py
+%{_libexecdir}/dtk5/dtk-translate.py
 %{_libexecdir}/dtk5/deepin-os-release
 
 %files devel
@@ -67,8 +68,8 @@ export PATH=%{_qt5_bindir}:$PATH
 %{_libdir}/cmake/DtkCMake/
 %{_libdir}/cmake/DtkTools/
 %{_libdir}/pkgconfig/dtkcore.pc
-%{_libdir}/libdtkcore.so
-/usr/share/glib-2.0/schemas/*
+%{_libdir}/lib%{name}.so
+%{_datadir}/glib-2.0/schemas/*
 
 %changelog
 * Thu Jun 11 2020 uoser <uoser@uniontech.com> - 5.2.2.3
diff --git a/src/com.deepin.dtk.gschema.xml b/src/com.deepin.dtk.gschema.xml
deleted file mode 100644 (file)
index 3010ad8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schemalist>
-    <enum id="com.deepin.dtk.ColorType">
-        <value nick="UnknownType" value="0" />
-        <value nick="LightType" value="1" />
-        <value nick="DarkType" value="2" />
-    </enum>
-
-    <schema id="com.deepin.dtk">
-        <key enum="com.deepin.dtk.ColorType" name="palette-type">
-            <default>'UnknownType'</default>
-            <summary>application palette type</summary>
-            <description>Palette type of the application. SystemTheme=0 LightTheme=1 DarkTheme=2</description>
-        </key>
-    </schema>
-</schemalist>
index a364f4ca520a3841841784528bb64a46aaff9fda..65d8fc5b9e474ccb522ad1d871d86a67bf11ff71 100644 (file)
 #include <unistd.h>
 #endif
 
+#ifndef OS_VERSION_TEST_FILE
+#define OS_VERSION_FILE "/etc/os-version"
+#else
+#define OS_VERSION_FILE OS_VERSION_TEST_FILE
+#endif
+
 DCORE_BEGIN_NAMESPACE
 
 class DSysInfoPrivate
@@ -48,6 +54,7 @@ public:
 #ifdef Q_OS_LINUX
     void ensureDeepinInfo();
     bool ensureOsVersion();
+    void ensureDistributionInfo();
 #endif
     void ensureReleaseInfo();
     void ensureComputerInfo();
@@ -97,6 +104,16 @@ DSysInfoPrivate::DSysInfoPrivate()
 }
 
 #ifdef Q_OS_LINUX
+void DSysInfoPrivate::ensureDistributionInfo()
+{
+    if (distributionInfo)
+        return;
+
+    const QString distributionInfoFile(DSysInfo::distributionInfoPath());
+    // Generic DDE distribution info
+    distributionInfo.reset(new DDesktopEntry(distributionInfoFile));
+}
+
 void DSysInfoPrivate::ensureDeepinInfo()
 {
     if (static_cast<int>(deepinType) >= 0)
@@ -168,19 +185,16 @@ void DSysInfoPrivate::ensureDeepinInfo()
     } else {
         deepinType = DSysInfo::UnknownDeepin;
     }
-
-    const QString distributionInfoFile(DSysInfo::distributionInfoPath());
-    // Generic DDE distribution info
-    distributionInfo.reset(new DDesktopEntry(distributionInfoFile));
-    QSettings distributionInfo(distributionInfoFile, QSettings::IniFormat); // TODO: treat as `.desktop` format instead of `.ini`
 }
 
 bool DSysInfoPrivate::ensureOsVersion()
 {
-    if (minVersion.A > 0)
+#ifndef OS_VERSION_TEST_FILE // 测试时总是重新读取文件
+    if (osBuild.A > 0)
         return true;
+#endif
 
-    DDesktopEntry entry("/etc/os-version");
+    DDesktopEntry entry(OS_VERSION_FILE);
     majorVersion = entry.stringValue("MajorVersion", "Version");
     minorVersion = entry.stringValue("MinorVersion", "Version");
     Q_ASSERT(minorVersion.length() == 4);
@@ -191,8 +205,14 @@ bool DSysInfoPrivate::ensureOsVersion()
     if (ok) {
         minVersion.D = minv % 10;
     } else if (minorVersion.length() > 0) {
-        // 0-9...A-Z
-        minVersion.D = 10 + static_cast<uint>(minorVersion.right(1).data()->toLatin1() - 'A');
+        const QString D = minorVersion.right(1);
+        if (D.contains(QRegExp("[0-9A-Z]"))) {
+            // 0-9...A-Z
+            minVersion.D = 10 + static_cast<uint>(D.data()->toLatin1() - 'A');
+        } else {
+            qWarning() << "invalid minorVersion";
+            minVersion.D = 0;
+        }
     }
     uint minVer = minorVersion.left(3).toUInt();
     minVersion.BC = minVer % 100;
@@ -566,13 +586,40 @@ DSysInfo::UosEdition DSysInfo::uosEditionType()
 {
     siGlobal->ensureOsVersion();
     UosEdition ospt = UosEditionUnknown;
-
     if (siGlobal->osBuild.B == UosDesktop) {
-        ospt = static_cast<UosEdition>(siGlobal->osBuild.D);
+        switch (siGlobal->osBuild.D) {
+        case 1:
+            return UosProfessional;
+        case 2:
+            return UosHome;
+        case 3:
+            return UosCommunity;
+        case 4:
+            return UosMilitary;
+        case 5:
+            return UosDeviceEdition;
+        case 6:
+            return UosEducation;
+        default:
+            break;
+        }
     } else if (siGlobal->osBuild.B == UosServer) {
-        ospt = static_cast<UosEdition>(siGlobal->osBuild.D + UosMilitary);
+        switch (siGlobal->osBuild.D) {
+        case 1:
+            return UosEnterprise;
+        case 2:
+            return UosEnterpriseC;
+        case 3:
+            return UosEuler;
+        case 4:
+            return UosMilitaryS;
+        case 5:
+            return UosDeviceEdition;
+        default:
+            break;
+        }
     } else if (siGlobal->osBuild.B == UosDevice){
-        ospt = UosProfessional;
+        ospt = UosEnterprise; // os-version 1.4 if B==Device then et=Enterprise
     }
 
     return ospt;
@@ -591,7 +638,7 @@ DSysInfo::UosArch DSysInfo::uosArch()
 
 static QString getUosVersionValue(const QString &key, const QLocale &locale)
 {
-    DDesktopEntry entry("/etc/os-version");
+    DDesktopEntry entry(OS_VERSION_FILE);
     QString localKey = QString("%1[%2]").arg(key, locale.name());
 
     return entry.stringValue(localKey, "Version", entry.stringValue(key, "Version"));
@@ -654,8 +701,11 @@ QString DSysInfo::udpateVersion()
         uint uv = siGlobal->minVersion.D;
         if (uv < 10) {
             return QString("update%1").arg(uv);
-        } else {
+        } else if (uv < 36) {
             return QString("update").append(QChar(uv - 10 + 'A'));
+        } else {
+            qWarning() << "invalid update versoin";
+            return QString();
         }
     } else {
         return QString(); // 0 正式版
@@ -734,7 +784,7 @@ QString DSysInfo::distributionInfoSectionName(DSysInfo::OrgType type)
 QString DSysInfo::distributionOrgName(DSysInfo::OrgType type, const QLocale &locale)
 {
 #ifdef Q_OS_LINUX
-    siGlobal->ensureDeepinInfo();
+    siGlobal->ensureDistributionInfo();
 #endif
 
     QString fallback = type == Distribution ? QStringLiteral("Deepin") : QString();
@@ -757,7 +807,7 @@ QString DSysInfo::deepinDistributorName()
 QPair<QString, QString> DSysInfo::distributionOrgWebsite(DSysInfo::OrgType type)
 {
 #ifdef Q_OS_LINUX
-    siGlobal->ensureDeepinInfo();
+    siGlobal->ensureDistributionInfo();
 #endif
 
     QString fallbackSiteName = type == Distribution ? QStringLiteral("www.deepin.org") : QString();
index 9c41c497f74023b62dfc689c3cd20c2905fb9f9a..fe2fc3de8967b6a605e159213c0fae29c46aeb93 100644 (file)
@@ -86,6 +86,8 @@ public:
         UosEnterpriseC,
         UosEuler,
         UosMilitaryS, // for Server
+        UosDeviceEdition,
+        UosEducation,
 
         UosEditionCount // must at last
     };
diff --git a/src/dtk_build.prf b/src/dtk_build.prf
deleted file mode 100644 (file)
index 4543eff..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-exists(../dtk_build_config.prf) {
-    include(../dtk_build_config.prf)
-} else {
-    load(dtk_build_config)
-}
-
-#标记已经加载了dtk_build.prf
-DTK_BUILD=1
-TEMPLATE = lib
-
-CONFIG += c++11 create_pc create_prl no_install_prl
-CONFIG += no_keywords
-
-DEFINES += QT_MESSAGELOGCONTEXT
-DEFINES += LIB$$upper($$DTK_MODULE_NAME)_LIBRARY
-DEFINES += DTK_LIB_DIR_NAME=\\\"$$LIB_VERSION_NAME\\\"
-
-isEmpty(target.path): target.path = $$LIB_INSTALL_DIR
-isEmpty(includes.path): includes.path = $$quote($$INCLUDE_INSTALL_DIR)
-
-!isEmpty(DTK_STATIC_LIB) {
-    DEFINES += DTK_STATIC_LIB
-    CONFIG += staticlib
-}
-
-!isEmpty(DTK_STATIC_TRANSLATION) {
-    DEFINES += DTK_STATIC_TRANSLATION
-}
-
-defineTest(containIncludeFiles) {
-    header = $$absolute_path($$ARGS)
-    header_dir = $$quote($$dirname(header))
-
-    for (file, includes.files) {
-        file_ap = $$absolute_path($$file)
-        file_dir = $$quote($$dirname(file_ap))
-
-        isEqual(file_dir, $$header_dir):return(true)
-    }
-
-    return(false)
-}
-
-ALL_HEADER_FILE_NAME=Dtk$${MODULE_NAME}s
-
-#添加一个include模块提供的所有头文件的总的头文件
-defineTest(updateDtkHeaderFile) {
-    include_files = $$HEADERS
-    file_content = $$quote($${LITERAL_HASH}ifndef DTK_$$upper($$MODULE_NAME)_MODULE_H)
-    file_content += $$quote($${LITERAL_HASH}define DTK_$$upper($$MODULE_NAME)_MODULE_H)
-
-    for(header, include_files) {
-        #排除私有头文件,以 _p.h 结尾的认为是私有头文件
-        suffix = $$str_member($$header, -4, -1)
-        !isEqual(suffix, "_p.h"): containIncludeFiles($$header) {
-            file_content += $$quote($${LITERAL_HASH}include \"$$basename(header)\")
-        }
-    }
-
-    file_content += $$quote($${LITERAL_HASH}endif)
-    !write_file($$_PRO_FILE_PWD_/$$ALL_HEADER_FILE_NAME, file_content):return(false)
-
-    return(true)
-}
-
-!updateDtkHeaderFile():warning(Cannot create "$${ALL_HEADER_FILE_NAME}" header file)
-
-# create dtkxxx_config.h file
-defineTest(updateDtkConfigFile) {
-    isEqual(DTK_MODULE_NAME, dtkcore) {
-        config_content += $$quote($${LITERAL_HASH}define DTK_VERSION_MAJOR $$VER_MAJ)
-        config_content += $$quote($${LITERAL_HASH}define DTK_VERSION_MINOR $$VER_MIN)
-        config_content += $$quote($${LITERAL_HASH}define DTK_VERSION_PATCH $$VER_PAT)
-        config_content += $$quote($${LITERAL_HASH}define DTK_VERSION_BUILD $$VER_BUI)
-        config_content += $$quote($${LITERAL_HASH}define DTK_VERSION_STR \"$$VERSION\")
-        config_content += $$quote(//)
-    }
-
-    for(file, includes.files) {
-        file = $$quote($$basename(file))
-
-        !isEqual(file, $$ALL_HEADER_FILE_NAME):contains(file, D[A-Za-z0-9_]+) {
-            config_content += $$quote($${LITERAL_HASH}define $$upper($$DTK_MODULE_NAME)_CLASS_$$file)
-        }
-    }
-
-    !write_file($$_PRO_FILE_PWD_/$${DTK_MODULE_NAME}_config.h, config_content):return(false)
-
-    return(true)
-}
-
-!updateDtkConfigFile():warning(Cannot create "$${DTK_MODULE_NAME}_config.h" header file)
-
-exists($$PWD/dtk_translation.prf) {
-    include($$PWD/dtk_translation.prf)
-} else {
-    load(dtk_translation)
-}
diff --git a/src/dtk_lib.prf b/src/dtk_lib.prf
deleted file mode 100644 (file)
index 047643e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE  = subdirs
-CONFIG += ordered
-
-exists($$_PRO_FILE_PWD_/src) SUBDIRS += src
-exists($$_PRO_FILE_PWD_/tools) SUBDIRS += tools
-exists($$_PRO_FILE_PWD_/tests) SUBDIRS += tests
-exists($$_PRO_FILE_PWD_/examples) SUBDIRS += examples
diff --git a/src/dtk_qmake.prf b/src/dtk_qmake.prf
deleted file mode 100644 (file)
index 38a3835..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-CONFIG += host_$$QMAKE_HOST.arch
-DEFINES += Q_HOST_NAME=\\\"$$QMAKE_HOST.arch\\\" Q_HOST_$$upper($$QMAKE_HOST.arch)
-
-defineTest(buildQMAKEProject) {
-    pro_dir = $$1
-    pro_out_dir = $$shadowed($$pro_dir)
-    isEmpty(QMAKE_CD): QMAKE_CD=cd
-    pro_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$pro_out_dir)) &&"
-    mkpath($$pro_out_dir)
-    command = $$pro_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE))
-    CONFIG(debug, debug|release) {
-        command += QMAKE_CFLAGS_DEBUG*=\"$$QMAKE_CFLAGS_DEBUG\" \
-            QMAKE_CXXFLAGS_DEBUG*=\"$$QMAKE_CXXFLAGS_DEBUG\" \
-            QMAKE_LFLAGS_DEBUG*=\"$$QMAKE_LFLAGS_DEBUG\" \
-            CONFIG+=debug
-    } else {
-        command += QMAKE_CFLAGS_RELEASE*=\"$$QMAKE_CFLAGS_RELEASE\" \
-            QMAKE_CXXFLAGS_RELEASE*=\"$$QMAKE_CXXFLAGS_RELEASE\" \
-            QMAKE_LFLAGS_RELEASE*=\"$$QMAKE_LFLAGS_RELEASE\"
-    }
-    command += -spec $$QMAKESPEC $$shell_quote($$pro_dir)
-    message($${command}:)
-    # Qt >= 5.8
-    greaterThan(QT_MINOR_VERSION, 7) {
-        !equals(3, false): 1 = "( $$1 ) 2>&1"
-        output = $$system("$$command", lines, result)
-        !isEmpty(output): message($$output)
-        !equals(result, 0): return(false)
-    } else {
-        system("$$command")|return(false)
-    }
-    load(configure)
-    command = $$pro_cmd_base $$QMAKE_MAKE
-    message($${command}:)
-    # Qt >= 5.8
-    greaterThan(QT_MINOR_VERSION, 7) {
-        !equals(3, false): 1 = "( $$1 ) 2>&1"
-        output = $$system("$$command", lines, result)
-        !isEmpty(output): message($$output)
-        !equals(result, 0): return(false)
-    } else {
-        system("$$command")|return(false)
-    }
-    return(true)
-}
-
-isEqual(TARGET, dtkcore) {
-    DEEPIN_OS_RELEASE_TOOL=$$_PRO_FILE_PWD_/../bin/deepin-os-release
-
-    !exists($$DEEPIN_OS_RELEASE_TOOL) {
-        tools_dir = $$_PRO_FILE_PWD_/../tools/deepin-os-release
-        !buildQMAKEProject($$tools_dir): error(Failed on build deepin-os-release)
-    }
-} else {
-    isEmpty(QT.dtkcore.tools): error(QT += dtkcore first)
-    DEEPIN_OS_RELEASE_TOOL=$${QT.dtkcore.tools}/deepin-os-release
-}
-
-!exists($$DEEPIN_OS_RELEASE_TOOL): error(\"$$DEEPIN_OS_RELEASE_TOOL\" is not exists. Install \"dtkcore-bin\" first)
-
-defineReplace(formatString) {
-    string = $$1
-    string = $$replace(string, \\s+, _)
-    string_count = $$size(string)
-
-    greaterThan(string_count, 1) {
-        for (item, string) {
-            isEmpty(new_string): new_string = $$item
-            else: new_string = $${new_string}_$${item}
-        }
-
-        return($$new_string)
-    }
-
-    return($$string)
-}
-
-DEEPIN_OS_TYPE = $$system($$DEEPIN_OS_RELEASE_TOOL --deepin-type)
-DEEPIN_OS_VERSION = $$system($$DEEPIN_OS_RELEASE_TOOL --deepin-version)
-DISTRIB_ID = $$system($$DEEPIN_OS_RELEASE_TOOL --product-type)
-DISTRIB_RELEASE = $$system($$DEEPIN_OS_RELEASE_TOOL --product-version)
-
-isEmpty(DISTRIB_ID): warning(No value of the "--product-type" in the process "$$DEEPIN_OS_RELEASE_TOOL")
-else {
-    DISTRIB_ID = $$formatString($$DISTRIB_ID)
-
-    message("OS: $$DISTRIB_ID, Version: $$DISTRIB_RELEASE")
-
-    QMAKE_PLATFORM += $$lower($$DISTRIB_ID)
-
-    DISTRIB_ID = $$upper($$DISTRIB_ID)
-    !isEmpty(DISTRIB_ID): DEFINES += Q_OS_$$DISTRIB_ID
-    CONFIG *= $$QMAKE_PLATFORM
-
-    DISTRIB_RELEASE = $$formatString($$DISTRIB_RELEASE)
-    DEFINES += Q_OS_VERSION=\\\"$$DISTRIB_RELEASE\\\"
-
-    #uos base with deepin
-    isEqual(DISTRIB_ID, UOS) {
-        QMAKE_PLATFORM += deepin
-        DEFINES += Q_OS_DEEPIN
-    }
-}
-
-isEmpty(DEEPIN_OS_TYPE): warning(No value of the "--deepin-type" in the process "$$DEEPIN_OS_RELEASE_TOOL")
-else {
-    DEEPIN_OS_TYPE = $$formatString($$DEEPIN_OS_TYPE)
-
-    message(Deepin OS Type: $$DEEPIN_OS_TYPE)
-    message(Deepin OS Version: $$DEEPIN_OS_VERSION)
-
-    !isEmpty(DEEPIN_OS_TYPE) {
-        QMAKE_PLATFORM += deepin_$$lower($$DEEPIN_OS_TYPE) deepin_dde
-        DEFINES += Q_OS_DEEPIN_$$upper($$DEEPIN_OS_TYPE) DEEPIN_DDE
-    }
-
-    DEEPIN_OS_VERSION = $$formatString($$DEEPIN_OS_VERSION)
-    DEFINES += Q_OS_DEEPIN_VERSION=\\\"$$DEEPIN_OS_VERSION\\\"
-
-    CONFIG *= $$QMAKE_PLATFORM
-}
diff --git a/src/dtk_translation.prf b/src/dtk_translation.prf
deleted file mode 100644 (file)
index 352c022..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-message ("Process dtk translation")
-message ("Add DTK_NO_TRANSLATION=YES to qmake arguments to skip this")
-message ("Add DTK_STATIC_TRANSLATION=YES to add support for static translations")
-
-# TODO: check lrelease/lupdate exist
-
-ROOT_DIR = $$_PRO_FILE_PWD_
-
-BASENAME = $$basename(_PRO_FILE_)
-BASENAME = $$split(BASENAME, .)
-BASENAME = $$first(BASENAME)
-
-isEmpty(DTK_NO_TRANSLATION) {
-#    system(lupdate $$_PRO_FILE_) | error("Failed to lupdate")
-
-    TRANSLATIONS = $$files($$ROOT_DIR/translations/*.ts)
-    for(tsfile, TRANSLATIONS) {
-        qmfile = $$replace(tsfile, .ts$, .qm)
-        system(lrelease $$tsfile -qm $$qmfile) | error("Failed to lrelease")
-    }
-
-    # create static translations qrc file
-    !isEmpty(DTK_STATIC_TRANSLATION) {
-        # qrc template
-        #<RCC>
-        #    <qresource prefix="/dtk/translations">
-        #        <file>dtkwidget_am_ET.qm</file>
-        #        <file>dtkwidget_ar.qm</file>
-        #        <file>dtkwidget_ast.qm</file>
-        #    </qresource>
-        #</RCC>
-        QRC_PATH = $$ROOT_DIR/translations/$${BASENAME}_translations.qrc
-        message ("Create static translations file $${QRC_PATH}")
-
-        QRC_CONTENT = "<RCC>"
-        QRC_CONTENT += "    <qresource prefix=\"/dtk/translations\">"
-
-        QM_FILE_LIST = $$files($$ROOT_DIR/translations/*.qm)
-        for(qmfile, QM_FILE_LIST) {
-            QRC_CONTENT += "        <file>$$basename(qmfile)</file>"
-        }
-        QRC_CONTENT += "    </qresource>"
-        QRC_CONTENT += "</RCC>"
-        write_file($$QRC_PATH, QRC_CONTENT) | error("Aborting.")
-    }
-}
-
-!isEmpty(DTK_STATIC_TRANSLATION) {
-    QRC_PATH = $$ROOT_DIR/translations/$${TARGET}_translations.qrc
-    RESOURCES += $$QRC_PATH
-}
-
-TRANSLATIONS += $$ROOT_DIR/translations/*
-
-TRANSLATIONS_DIR = $$LIB_VERSION_NAME/$$DMODULE_NAME/translations
-TRANSLATIONS_PATH = $$PREFIX/share/$$TRANSLATIONS_DIR
-DEFINES += $$upper($$DMODULE_NAME)_TRANSLATIONS_PATH=\\\"$$TRANSLATIONS_PATH\\\"
-DEFINES += $$upper($$DMODULE_NAME)_TRANSLATIONS_DIR=\\\"$$TRANSLATIONS_DIR\\\"
-
-dtk_translations.path = $$TRANSLATIONS_PATH
-dtk_translations.files = $$ROOT_DIR/translations/*.qm
-
-INSTALLS += dtk_translations
index 5f8781ca701087cbe37671576ecef203ddd23a54..bd73e869eaaafce71fab3b0a4cd59d041dc6c6c9 100644 (file)
@@ -30,11 +30,6 @@ DCORE_BEGIN_NAMESPACE
 
 DLogManager::DLogManager()
 {
-    QString cachePath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).at(0);
-    if (!QDir(cachePath).exists()){
-        QDir(cachePath).mkpath(cachePath);
-    }
-    m_logPath = joinPath(cachePath, QString("%1.log").arg(qApp->applicationName()));
     m_format = "%{time}{yyyy-MM-dd, HH:mm:ss.zzz} [%{type:-7}] [%{file:-20} %{function:-35} %{line}] %{message}\n";
 }
 
@@ -45,7 +40,7 @@ void DLogManager::initConsoleAppender(){
 }
 
 void DLogManager::initRollingFileAppender(){
-    m_rollingFileAppender = new RollingFileAppender(m_logPath);
+    m_rollingFileAppender = new RollingFileAppender(getlogFilePath());
     m_rollingFileAppender->setFormat(m_format);
     m_rollingFileAppender->setLogFilesLimit(5);
     m_rollingFileAppender->setDatePattern(RollingFileAppender::DailyRollover);
@@ -74,6 +69,16 @@ void DLogManager::registerFileAppender() {
  * \sa registerFileAppender
  */
 QString DLogManager::getlogFilePath(){
+    // 不再构造时去设置默认logpath(且mkdir), 而在getlogPath时再去判断是否设置默认值
+    // 修复设置了日志路径还是会在默认的位置创建目录的问题
+    if (DLogManager::instance()->m_logPath.isEmpty()) {
+        QString cachePath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).at(0);
+        if (!QDir(cachePath).exists()) {
+            QDir(cachePath).mkpath(cachePath);
+        }
+        DLogManager::instance()->m_logPath = DLogManager::instance()->joinPath(cachePath, QString("%1.log").arg(qApp->applicationName()));
+    }
+
     return QDir::toNativeSeparators(DLogManager::instance()->m_logPath);
 }
 
index f7feea37dbeafe676715c00987b263efb0b08b2f..5ddbc57755fdb12b54d53cccac126e8fe2a6adc3 100644 (file)
@@ -4,6 +4,9 @@ QT += xml
 CONFIG += link_pkgconfig
 TARGET = dtkcore
 
+# 龙芯架构上没有默认添加PT_GNU_STACK-section,所以此处手动指定一下
+contains(QMAKE_HOST.arch, mips.*): QMAKE_LFLAGS_SHLIB += "-Wl,-z,noexecstack"
+
 INCLUDEPATH += $$PWD
 HEADERS += $$PWD/dtkcore_global.h \
     dsysinfo.h \
@@ -22,7 +25,7 @@ include($$PWD/filesystem/filesystem.pri)
 include($$PWD/settings/settings.pri)
 
 DTK_MODULE_NAME = $$TARGET
-include(dtk_build.prf)
+load(dtk_build)
 
 # ----------------------------------------------
 # install config
@@ -43,23 +46,7 @@ isEmpty(DTK_STATIC_LIB){
 }
 
 #cmake
-include(dtk_cmake.prf)
+load(dtk_cmake)
 
 #qt module
-include(dtk_module.prf)
-
-prf.files+= $$PWD/*.prf ../dtk_build_config.prf
-
-isEmpty(MKSPECS_INSTALL_DIR) {
-    MKSPECS_INSTALL_DIR=$$[QT_INSTALL_ARCHDATA]/mkspecs
-}
-prf.path = $${MKSPECS_INSTALL_DIR}/features
-
-!linux {
-    prf.files-=$$PWD/dtk_qmake.prf
-}
-
-gsettings.files += $$PWD/com.deepin.dtk.gschema.xml
-gsettings.path = $${PREFIX}/share/glib-2.0/schemas
-
-INSTALLS += prf gsettings
+load(dtk_module)
index 10e798e413f0ce00b33de39587b67fdcb0e345bf..86513caacf2fa7400a8f13b3efe5a3d18aa9f9e3 100644 (file)
  */
 #include "dvtablehook.h"
 
+#include <QFileInfo>
 #include <algorithm>
 #ifdef Q_OS_LINUX
 #include <sys/mman.h>
 #include <unistd.h>
+#include <dlfcn.h>
 
 QT_BEGIN_NAMESPACE
 QFunctionPointer qt_linux_find_symbol_sys(const char *symbol);
@@ -284,17 +286,82 @@ quintptr DVtableHook::originalFun(const void *obj, quintptr functionOffset)
     return *(vfptr_t2 + functionOffset / sizeof(quintptr));
 }
 
+#if defined(Q_OS_LINUX)
+static int readProtFromPsm(quintptr adr, size_t length)
+{
+    int prot = PROT_NONE;
+    QString fname = "/proc/self/maps";
+    QFile f(fname);
+    if (!f.open(QIODevice::ReadOnly)) {
+        qFatal("%s", f.errorString().toStdString().data());
+        //return prot; // never be executed
+    }
+
+    QByteArray data = f.readAll();
+    bool ok = false;
+    quintptr startAddr = 0, endAddr = 0;
+    QTextStream ts(data);
+    while (Q_UNLIKELY(!ts.atEnd())) {
+        const QString line = ts.readLine();
+        const QStringList &maps = line.split(' ');
+        if (Q_UNLIKELY(maps.size() < 3)) {
+            data = f.readLine();
+            continue;
+        }
+
+        //"00400000-00431000" "r--p"
+        const QStringList addrs = maps.value(0).split('-');
+        startAddr = addrs.value(0).toULongLong(&ok, 16);
+        Q_ASSERT(ok);
+        endAddr = addrs.value(1).toULongLong(&ok, 16);
+        Q_ASSERT(ok);
+        if (Q_LIKELY(adr >= endAddr)) {
+            continue;
+        }
+        if (adr >= startAddr && adr + length <= endAddr) {
+            QString ps = maps.value(1);
+            //qDebug() << maps.value(0) << maps.value(1);
+            for (QChar c : ps) {
+                switch (c.toLatin1()) {
+                case 'r':
+                    prot |= PROT_READ;
+                    break;
+                case 'w':
+                    prot |= PROT_WRITE;
+                    break;
+                case 'x':
+                    prot |= PROT_EXEC;
+                    break;
+                default:
+                    break; // '-' 'p' don't care
+                }
+            }
+            break;
+        } else if (adr < startAddr) {
+            qFatal("%p not found in proc maps", reinterpret_cast<void *>(adr));
+            //break; // 超出了地址不需要再去检查了
+        }
+    }
+
+    return prot;
+}
+#endif
+
 bool DVtableHook::forceWriteMemory(void *adr, const void *data, size_t length)
 {
 #ifdef Q_OS_LINUX
-    //int page_size = sysconf(_SC_PAGESIZE);
-    int page_size = 4096; // fix 64k crashed
+    int page_size = sysconf(_SC_PAGESIZE);
     quintptr x = reinterpret_cast<quintptr>(adr);
-    void *new_adr = reinterpret_cast<void*>((x - page_size - 1) & ~(page_size -1));
+    // 不减去一个pagesize防止跨越两个数据区域(对应/proc/self/maps两行数据)
+    void *new_adr = reinterpret_cast<void *>((x /*- page_size - 1*/) & ~(page_size - 1));
     size_t override_data_length = length + x - reinterpret_cast<quintptr>(new_adr);
 
+    int oldProt = readProtFromPsm(quintptr(new_adr), override_data_length);
+    bool writeable = oldProt & PROT_WRITE;
+    // 增加判断是否已经可写,不能写才调用。
     // 失败时直接放弃
-    if (mprotect(new_adr, override_data_length, PROT_READ | PROT_WRITE)) {
+    if (!writeable && mprotect(new_adr, override_data_length, PROT_READ | PROT_WRITE)) {
+        qWarning() << "mprotect(change) failed" << strerror(errno);
         return false;
     }
 #endif
@@ -302,7 +369,10 @@ bool DVtableHook::forceWriteMemory(void *adr, const void *data, size_t length)
     memcpy(adr, data, length);
 #ifdef Q_OS_LINUX
     // 恢复内存标志位
-    mprotect(new_adr, override_data_length, PROT_READ);
+    if (!writeable && mprotect(new_adr, override_data_length, oldProt)) {
+        qWarning() << "mprotect(restore) failed" << strerror(errno);
+        return false;
+    }
 #endif
 
     return true;
@@ -311,7 +381,14 @@ bool DVtableHook::forceWriteMemory(void *adr, const void *data, size_t length)
 QFunctionPointer DVtableHook::resolve(const char *symbol)
 {
 #ifdef Q_OS_LINUX
-    return QT_PREPEND_NAMESPACE(qt_linux_find_symbol_sys)(symbol);
+    /**
+  * !!不要使用qt_linux_find_symbol_sys函数去获取符号
+  *
+  * 在龙芯平台上,qt_linux_find_symbol_sys 无法获取部分已加载动态库的符号,
+  * 可能的原因是这个函数对 dlsym 的调用是在 libQt5Core 动态库中,这个库加载的比较早,
+  * 有可能是因此导致无法获取比这个库加载更晚的库中的符号(仅为猜测)
+  */
+    return QFunctionPointer(dlsym(RTLD_DEFAULT, symbol));
 #else
     // TODO
     return nullptr;
diff --git a/tests/data.qrc b/tests/data.qrc
new file mode 100644 (file)
index 0000000..038939b
--- /dev/null
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file>data/dt-settings.json</file>
+    </qresource>
+</RCC>
diff --git a/tests/data/dt-settings.json b/tests/data/dt-settings.json
new file mode 100644 (file)
index 0000000..a94c4fc
--- /dev/null
@@ -0,0 +1,218 @@
+{
+    "groups": [
+        {
+            "key": "base",
+            "name": "Basic settings",
+            "groups": [
+                {
+                    "key": "theme",
+                    "name": "Theme",
+                    "options": [
+                        {
+                            "key": "theme",
+                            "type": "checkpicture",
+                            "default": 0
+                        },
+                        {
+                            "key": "opticy",
+                            "name": "Opticy",
+                            "type": "slider",
+                            "max": 100,
+                            "min": 0,
+                            "default": 90
+                        }
+                    ]
+                },
+                {
+                    "key": "font",
+                    "name": "Font Style",
+                    "options": [
+                        {
+                            "key": "family",
+                            "name": "Font",
+                            "type": "combobox",
+                            "default": ""
+                        },
+                        {
+                            "key": "size",
+                            "name": "Font Size",
+                            "type": "spinbutton",
+                            "default": 12
+                        },
+                        {
+                            "key": "style",
+                            "name": "Font Style",
+                            "type": "buttongroup",
+                            "items": ["B","/"],
+                            "default": 0
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "key": "shortcuts",
+            "name": "Shortcuts",
+            "groups": [
+                {
+                    "key": "ternimal",
+                    "name": "Ternimal",
+                    "options": [
+                        {
+                            "key": "copy",
+                            "name": "Copy",
+                            "type": "shortcut",
+                            "default": "Ctrl+Alt+C"
+                        },
+                        {
+                            "key": "paste",
+                            "name": "Paste",
+                            "type": "shortcut",
+                            "default": "Ctrl+Alt+V"
+                        },
+                        {
+                            "key": "scroll_up",
+                            "name": "Scroll Up",
+                            "type": "shortcut",
+                            "default": "Alt+."
+                        },
+                        {
+                            "key": "scroll_down",
+                            "name": "Scroll down",
+                            "type": "shortcut",
+                            "default": "Alt+,"
+                        }
+                    ]
+                },
+                {
+                    "key": "workspace",
+                    "name": "Workspace",
+                    "options": [
+                        {
+                            "key": "new_window",
+                            "name": "New Window",
+                            "type": "shortcut",
+                            "default": "Ctrl+Shitf+<"
+                        },
+                        {
+                            "key": "next_tab",
+                            "name": "Next Tab",
+                            "type": "shortcut",
+                            "default": "Ctrl+N"
+                        },
+                        {
+                            "key": "prev_up",
+                            "name": "Previous Tab",
+                            "type": "shortcut",
+                            "default": "Ctrl+Shitf+>"
+                        },
+                        {
+                            "key": "close_tab",
+                            "name": "Close Tab",
+                            "type": "shortcut",
+                            "default": "Ctrl+W"
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "key": "advance",
+            "name": "Advance",
+            "groups": [
+                {
+                    "key": "cursor",
+                    "name": "Cursor",
+                    "options": [
+                        {
+                            "key": "shrap",
+                            "name": "Cursor Shrap",
+                            "type": "buttongroup",
+                            "items": ["█","_","|"],
+                            "default": 0
+                        },
+                        {
+                            "key": "blink",
+                            "type": "checkbox",
+                            "text": "Cursor blink",
+                            "default": true
+                        },
+                        {
+                            "key": "radiogroup",
+                            "name": "  ",
+                            "type": "radiogroup",
+                            "items": ["Minimize to tray","Exit Deepin Music"],
+                            "default": 0
+                        }
+                    ]
+                },
+                {
+                    "key": "encoding",
+                    "name": "Default encoding",
+                    "options": [
+                        {
+                            "key": "encoding",
+                            "name": "Encoding",
+                            "type": "combobox",
+                            "default": "utf-8"
+                        }
+                    ]
+                },
+                {
+                    "key": "coustom",
+                    "name": "Coustom",
+                    "options": [
+                        {
+                            "key": "coustom_command",
+                            "name": "Coustom Command",
+                            "type": "lineedit",
+                            "default": ""
+                        },
+                        {
+                            "key": "coustom_directory",
+                            "name": "Coustom Directory",
+                            "type": "lineedit",
+                            "default": ""
+                        }
+                    ]
+                },
+                {
+                    "key": "scroll",
+                    "name": "Scroll",
+                    "options": [
+                        {
+                            "key": "scroll_bottom",
+                            "text": "Scroll Bottom",
+                            "type": "checkbox",
+                            "default": ""
+                        },
+                        {
+                            "key": "scroll_line_count",
+                            "name": "Scroll line count",
+                            "type": "spinbutton",
+                            "default": 10
+                        }
+                    ]
+                },
+                {
+                    "key": "compatibility",
+                    "name": "Compatibility",
+                    "options": [
+                        {
+                            "key": "breakspce_action",
+                            "name": "Breakspce Action",
+                            "type": "combobox",
+                            "default": ""
+                        },
+                        {
+                            "key": "delete_action",
+                            "name": "Delete Action",
+                            "type": "combobox",
+                            "default": ""
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
diff --git a/tests/ddesktopentry/CMakeLists.txt b/tests/ddesktopentry/CMakeLists.txt
deleted file mode 100644 (file)
index 7cfc54e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# run test with verbose log: `ctest --verbose`
-
-# QXdgDesktopEntryTest
-add_executable (DDesktopEntryTest
-    tst_ddesktopentrytest.cpp
-)
-add_test (NAME DDesktopEntryTest COMMAND DDesktopEntryTest )
-target_link_libraries (DDesktopEntryTest ${DtkCore_LIBRARIES} Qt5::Test)
index accb33972c975f876799167c8d8a5ceda5a7b510..0b80ab17790eabcff9bc997bcb9249e2559f0dde 100644 (file)
@@ -10,18 +10,18 @@ CONFIG -= app_bundle
     DEFINES += DTK_STATIC_LIB
 }
 
-win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore
-else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore
-else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore
+load(dtk_testcase)
+
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore -lgtest
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore -lgtest
+else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore -lgtest
 
 INCLUDEPATH += $$PWD/../../src
 DEPENDPATH += $$PWD/../../src
-
-CONFIG(debug, debug|release) {
-    unix:QMAKE_RPATHDIR += $$OUT_PWD/../../src
-}
+unix:QMAKE_RPATHDIR += $$OUT_PWD/../../src
 
 QMAKE_LFLAGS += -Wl,--export-dynamic
 
 SOURCES += \
-    tst_ddesktopentrytest.cpp
+    $$PWD/../../src/ddesktopentry.cpp \
+    ut_ddesktopentrytest.cpp
diff --git a/tests/ddesktopentry/tst_ddesktopentrytest.cpp b/tests/ddesktopentry/tst_ddesktopentrytest.cpp
deleted file mode 100644 (file)
index c01faaf..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2019 Deepin Technology Co., Ltd.
- *               2019 Gary Wang
- *
- * Author:     Gary Wang <wzc782970009@gmail.com>
- *
- * Maintainer: Gary Wang <wangzichong@deepin.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QString>
-#include <QtTest>
-#include <DDesktopEntry>
-
-DCORE_USE_NAMESPACE
-
-class DDesktopEntryTest : public QObject
-{
-    Q_OBJECT
-
-public:
-    DDesktopEntryTest();
-
-private Q_SLOTS:
-    void testCase_ParseFile();
-};
-
-DDesktopEntryTest::DDesktopEntryTest()
-{
-    //
-}
-
-const QString testFileContent = { QStringLiteral(R"desktop(# A. Example Desktop Entry File
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=Foo Viewer
-Name[zh_CN]=福查看器
-Comment=The best viewer for Foo objects available!
-# Next line have an extra " character
-Comment[zh_CN]=最棒的 "福 查看器!
-TryExec=fooview
-Exec=fooview %F
-Icon=fooview
-MimeType=image/x-foo;
-Actions=Gallery;Create;
-
-[Desktop Action Gallery]
-Exec=fooview --gallery
-Name=Browse Gallery
-
-[Desktop Action Create]
-Exec=fooview --create-new
-Name=Create a new Foo!
-Icon=fooview-new
-)desktop") };
-
-void DDesktopEntryTest::testCase_ParseFile()
-{
-    QTemporaryFile file("testReadXXXXXX.desktop");
-    QVERIFY(file.open());
-    const QString fileName = file.fileName();
-    QTextStream ts(&file);
-    ts << testFileContent;
-    file.close();
-    QVERIFY(QFile::exists(fileName));
-
-    DDesktopEntry *desktopFile = new DDesktopEntry(fileName);
-    QStringList allGroups = desktopFile->allGroups();
-    QCOMPARE(allGroups.count(), 3);
-    QVERIFY(allGroups.contains("Desktop Entry") &&
-            allGroups.contains("Desktop Action Gallery") &&
-            allGroups.contains("Desktop Action Create"));
-    QCOMPARE(desktopFile->allGroups(true)[0], QStringLiteral("Desktop Entry"));
-    QCOMPARE(desktopFile->localizedValue("Name", "zh_CN"), QStringLiteral("福查看器"));
-    QCOMPARE(desktopFile->localizedValue("Name", "empty"), QStringLiteral("Foo Viewer"));
-    QCOMPARE(desktopFile->keys(QStringLiteral("Desktop Entry")),
-             QStringList({"Actions", "Comment", "Comment[zh_CN]", "Exec", "Icon", "MimeType", "Name", "Name[zh_CN]", "TryExec", "Type", "Version"}));
-
-    {
-        struct RestoreLocale {
-            ~RestoreLocale() { QLocale::setDefault(QLocale::system()); }
-        } restoreLocale;
-        Q_UNUSED(restoreLocale);
-
-        QLocale::setDefault(QLocale("zh_CN"));
-        QCOMPARE(desktopFile->localizedValue("Name"), QStringLiteral("福查看器"));
-
-        QLocale::setDefault(QLocale::c());
-        QCOMPARE(desktopFile->localizedValue("Name"), QStringLiteral("Foo Viewer"));
-    }
-
-    QCOMPARE(desktopFile->stringValue("Name"), QStringLiteral("Foo Viewer"));
-    QCOMPARE(desktopFile->setRawValue("Bar Viewer", "Name"), true);
-    QCOMPARE(desktopFile->stringValue("Name"), QStringLiteral("Bar Viewer"));
-    QCOMPARE(desktopFile->setLocalizedValue("霸查看器", "zh_CN", "Name"), true);
-    QCOMPARE(desktopFile->localizedValue("Name", "zh_CN"), QStringLiteral("霸查看器"));
-    QCOMPARE(desktopFile->contains("Semicolon"), false);
-    QCOMPARE(desktopFile->setRawValue(";grp\\;2;grp3;", "Semicolon"), true);
-    QCOMPARE(desktopFile->stringListValue("Semicolon"), QStringList({"", "grp;2", "grp3"}));
-    QCOMPARE(desktopFile->contains("Semicolon"), true);
-    QCOMPARE(desktopFile->removeEntry("Semicolon"), true);
-    QCOMPARE(desktopFile->contains("Semicolon"), false);
-
-    qDebug() << desktopFile->save();
-    qDebug() << fileName;
-}
-
-QTEST_APPLESS_MAIN(DDesktopEntryTest)
-
-#include "tst_ddesktopentrytest.moc"
index aa6af368dd51358a54a877f8cad49bc2af067ee4..4bdc78e4c5562c6c6b10361f86935d039521e4ba 100644 (file)
@@ -8,18 +8,18 @@ CONFIG += c++11
     DEFINES += DTK_STATIC_LIB
 }
 
+load(dtk_testcase)
+
 win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore
 else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore
 
 INCLUDEPATH += $$PWD/../../src
 DEPENDPATH += $$PWD/../../src
-
-CONFIG(debug, debug|release) {
-    unix:QMAKE_RPATHDIR += $$OUT_PWD/../../src
-}
+QMAKE_RPATHDIR += $$OUT_PWD/../../src
 
 QMAKE_LFLAGS += -Wl,--export-dynamic
 
 SOURCES += \
-    tst_dthreadutils.cpp
+    $$PWD/../../src/util/dthreadutils.cpp \
+    ut_dthreadutils.cpp
diff --git a/tests/dthreadutils/tst_dthreadutils.cpp b/tests/dthreadutils/tst_dthreadutils.cpp
deleted file mode 100644 (file)
index b25c8fc..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2020 ~ 2020 Deepin Technology Co., Ltd.
- *
- * Author:     zccrs <zccrs@live.com>
- *
- * Maintainer: zccrs <zhangjide@deepin.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QObject>
-#include <QTest>
-#include <QtConcurrent>
-
-#include <util/DThreadUtils>
-
-DCORE_USE_NAMESPACE
-
-class tst_DThreadUtils : public QObject
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void testCallInMainThread();
-};
-
-void tst_DThreadUtils::testCallInMainThread()
-{
-    QVERIFY(DThreadUtil::runInMainThread([] {
-        return QThread::currentThread() == QCoreApplication::instance()->thread();
-    }));
-
-    auto result = QtConcurrent::run([] {
-        QThread *t = QThread::currentThread();
-        QVERIFY(DThreadUtil::runInMainThread([] (QThread *thread) {
-            return QThread::currentThread() == QCoreApplication::instance()->thread() && QThread::currentThread() != thread;
-        }, t));
-    });
-
-    QVERIFY(QTest::qWaitFor([&] {
-        return result.isFinished();
-    }));
-
-    {
-        // 测试target对象销毁后是否还会触发函数调用
-        QPointer<QObject> object = new QObject();
-        bool test = true;
-        auto result1 = QtConcurrent::run([&test, object] {
-            DThreadUtil::runInMainThread(object, [&test, object] () {
-                if (!object)
-                    return false;
-
-                delete object.data();
-                return true;
-            });
-        });
-        auto result2 = QtConcurrent::run([&test, object] {
-            DThreadUtil::runInMainThread(object, [&test, object] () {
-                if (!object)
-                    return false;
-
-                delete object.data();
-                return true;
-            });
-        });
-
-        QVERIFY(QTest::qWaitFor([&] {
-            return result1.isFinished() && result2.isFinished();
-        }));
-        QVERIFY(test);
-    }
-}
-
-QTEST_MAIN(tst_DThreadUtils)
-
-#include "tst_dthreadutils.moc"
diff --git a/tests/dutils/data.qrc b/tests/dutils/data.qrc
deleted file mode 100644 (file)
index 038939b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>data/dt-settings.json</file>
-    </qresource>
-</RCC>
diff --git a/tests/dutils/data/dt-settings.json b/tests/dutils/data/dt-settings.json
deleted file mode 100644 (file)
index a94c4fc..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-{
-    "groups": [
-        {
-            "key": "base",
-            "name": "Basic settings",
-            "groups": [
-                {
-                    "key": "theme",
-                    "name": "Theme",
-                    "options": [
-                        {
-                            "key": "theme",
-                            "type": "checkpicture",
-                            "default": 0
-                        },
-                        {
-                            "key": "opticy",
-                            "name": "Opticy",
-                            "type": "slider",
-                            "max": 100,
-                            "min": 0,
-                            "default": 90
-                        }
-                    ]
-                },
-                {
-                    "key": "font",
-                    "name": "Font Style",
-                    "options": [
-                        {
-                            "key": "family",
-                            "name": "Font",
-                            "type": "combobox",
-                            "default": ""
-                        },
-                        {
-                            "key": "size",
-                            "name": "Font Size",
-                            "type": "spinbutton",
-                            "default": 12
-                        },
-                        {
-                            "key": "style",
-                            "name": "Font Style",
-                            "type": "buttongroup",
-                            "items": ["B","/"],
-                            "default": 0
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "key": "shortcuts",
-            "name": "Shortcuts",
-            "groups": [
-                {
-                    "key": "ternimal",
-                    "name": "Ternimal",
-                    "options": [
-                        {
-                            "key": "copy",
-                            "name": "Copy",
-                            "type": "shortcut",
-                            "default": "Ctrl+Alt+C"
-                        },
-                        {
-                            "key": "paste",
-                            "name": "Paste",
-                            "type": "shortcut",
-                            "default": "Ctrl+Alt+V"
-                        },
-                        {
-                            "key": "scroll_up",
-                            "name": "Scroll Up",
-                            "type": "shortcut",
-                            "default": "Alt+."
-                        },
-                        {
-                            "key": "scroll_down",
-                            "name": "Scroll down",
-                            "type": "shortcut",
-                            "default": "Alt+,"
-                        }
-                    ]
-                },
-                {
-                    "key": "workspace",
-                    "name": "Workspace",
-                    "options": [
-                        {
-                            "key": "new_window",
-                            "name": "New Window",
-                            "type": "shortcut",
-                            "default": "Ctrl+Shitf+<"
-                        },
-                        {
-                            "key": "next_tab",
-                            "name": "Next Tab",
-                            "type": "shortcut",
-                            "default": "Ctrl+N"
-                        },
-                        {
-                            "key": "prev_up",
-                            "name": "Previous Tab",
-                            "type": "shortcut",
-                            "default": "Ctrl+Shitf+>"
-                        },
-                        {
-                            "key": "close_tab",
-                            "name": "Close Tab",
-                            "type": "shortcut",
-                            "default": "Ctrl+W"
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "key": "advance",
-            "name": "Advance",
-            "groups": [
-                {
-                    "key": "cursor",
-                    "name": "Cursor",
-                    "options": [
-                        {
-                            "key": "shrap",
-                            "name": "Cursor Shrap",
-                            "type": "buttongroup",
-                            "items": ["█","_","|"],
-                            "default": 0
-                        },
-                        {
-                            "key": "blink",
-                            "type": "checkbox",
-                            "text": "Cursor blink",
-                            "default": true
-                        },
-                        {
-                            "key": "radiogroup",
-                            "name": "  ",
-                            "type": "radiogroup",
-                            "items": ["Minimize to tray","Exit Deepin Music"],
-                            "default": 0
-                        }
-                    ]
-                },
-                {
-                    "key": "encoding",
-                    "name": "Default encoding",
-                    "options": [
-                        {
-                            "key": "encoding",
-                            "name": "Encoding",
-                            "type": "combobox",
-                            "default": "utf-8"
-                        }
-                    ]
-                },
-                {
-                    "key": "coustom",
-                    "name": "Coustom",
-                    "options": [
-                        {
-                            "key": "coustom_command",
-                            "name": "Coustom Command",
-                            "type": "lineedit",
-                            "default": ""
-                        },
-                        {
-                            "key": "coustom_directory",
-                            "name": "Coustom Directory",
-                            "type": "lineedit",
-                            "default": ""
-                        }
-                    ]
-                },
-                {
-                    "key": "scroll",
-                    "name": "Scroll",
-                    "options": [
-                        {
-                            "key": "scroll_bottom",
-                            "text": "Scroll Bottom",
-                            "type": "checkbox",
-                            "default": ""
-                        },
-                        {
-                            "key": "scroll_line_count",
-                            "name": "Scroll line count",
-                            "type": "spinbutton",
-                            "default": 10
-                        }
-                    ]
-                },
-                {
-                    "key": "compatibility",
-                    "name": "Compatibility",
-                    "options": [
-                        {
-                            "key": "breakspce_action",
-                            "name": "Breakspce Action",
-                            "type": "combobox",
-                            "default": ""
-                        },
-                        {
-                            "key": "delete_action",
-                            "name": "Delete Action",
-                            "type": "combobox",
-                            "default": ""
-                        }
-                    ]
-                }
-            ]
-        }
-    ]
-}
index 1370c0adda0e84ed8e8833ab401211a200553e52..8e56bec9f73cc627a294f12dcfd6a9b51288964d 100644 (file)
@@ -7,21 +7,46 @@ CONFIG += c++11
 !isEmpty(DTK_STATIC_LIB){
     DEFINES += DTK_STATIC_LIB
 }
+# 使用 tmp 目录下的 os-version
+DEFINES += OS_VERSION_TEST_FILE=\\\"/tmp/etc/os-version\\\"
+
+load(dtk_testcase)
 
 SOURCES += \
+    $$PWD/../../src/util/dtimeunitformatter.cpp \
+    $$PWD/../../src/util/ddisksizeformatter.cpp \
+    $$PWD/../../src/log/LogManager.cpp \
+    $$PWD/../../src/filesystem/dpathbuf.cpp \
+    $$PWD/../../src/util/ddbussender.cpp \
+    $$PWD/../../src/settings/dsettings.cpp \
+    $$PWD/../../src/settings/dsettingsgroup.cpp \
+    $$PWD/../../src/settings/dsettingsoption.cpp \
+    $$PWD/../../src/dsysinfo.cpp \
     main.cpp \
-    dutiltester.cpp \
-    singletontester.cpp
+    ut_dutil.cpp \
+    ut_singleton.cpp
 
 HEADERS += \
-    dutiltester.h \
-    singletontester.h
+    $$PWD/../../src/util/dtimeunitformatter.h \
+    $$PWD/../../src/util/ddisksizeformatter.h \
+    $$PWD/../../src/log/LogManager.h \
+    $$PWD/../../src/filesystem/dpathbuf.h \
+    $$PWD/../../src/util/ddbussender.h \
+    $$PWD/../../src/settings/dsettings.h \
+    $$PWD/../../src/settings/dsettingsgroup.h \
+    $$PWD/../../src/settings/dsettingsoption.h \
+    $$PWD/../../src/dsysinfo.h \
+    $$PWD/../../src/base/dsingleton.h \
+    ut_dutil.h \
+    ut_singleton.h
 
-win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore
-else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore
-else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore -lgtest
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore -lgtest
+else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore -lgtest
 
-INCLUDEPATH += $$PWD/../../src
+INCLUDEPATH += \
+    $$PWD/../../src \
+    $$PWD/../../src/log
 DEPENDPATH += $$PWD/../../src
 QMAKE_RPATHDIR += $$PWD/../../src
 
diff --git a/tests/dutils/dutiltester.cpp b/tests/dutils/dutiltester.cpp
deleted file mode 100644 (file)
index a5326ab..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "dutiltester.h"
-
-#include <QCoreApplication>
-#include <QtTest/QtTest>
-#include <QStandardPaths>
-#include <QThread>
-#include <QDBusPendingCall>
-#include <QDBusReply>
-
-#include "log/LogManager.h"
-#include "filesystem/dpathbuf.h"
-#include "singletontester.h"
-#include "util/dtimeunitformatter.h"
-#include "util/ddisksizeformatter.h"
-#include "util/ddbussender.h"
-#include "settings/dsettings.h"
-#include "settings/dsettingsgroup.h"
-#include "settings/dsettingsoption.h"
-#include "dsysinfo.h"
-
-DCORE_USE_NAMESPACE
-
-void TestDUtil::testLogPath()
-{
-    qApp->setOrganizationName("deepin");
-    qApp->setApplicationName("deepin-test-dtk");
-
-    DPathBuf logPath(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first());
-
-#ifdef Q_OS_OSX
-    logPath = logPath / "Library" / "Caches" / "deepin" / "deepin-test-dtk" / "deepin-test-dtk.log";
-#else
-    logPath = logPath / ".cache" / "deepin" / "deepin-test-dtk" / "deepin-test-dtk.log";
-#endif
-
-    QCOMPARE(DLogManager::getlogFilePath(), logPath.toString());
-}
-
-void TestDUtil::testPathChange()
-{
-    DPathBuf root("/");
-
-    auto usr = root / "./usr";
-    QCOMPARE(QDir(usr.toString()).absolutePath(), QDir::toNativeSeparators("/usr"));
-
-    root /= "root";
-    QCOMPARE(root.toString(), QDir::toNativeSeparators("/root"));
-
-    root /= "../usr";
-    QCOMPARE(root.toString(), usr.toString());
-}
-
-void TestDUtil::testDSingleton()
-{
-    auto threadA = new QThread;
-    auto testerA = new MultiSingletonTester;
-    connect(threadA, &QThread::started, testerA, &MultiSingletonTester::run);
-    testerA->moveToThread(threadA);
-
-    auto threadB = new QThread;
-    auto testerB = new MultiSingletonTester;
-    testerB->moveToThread(threadB);
-    connect(threadB, &QThread::started, testerB, &MultiSingletonTester::run);
-
-    threadA->start();
-    threadB->start();
-
-    QThread::sleep(5);
-}
-
-void TestDUtil::testTimeFormatter()
-{
-    const DTimeUnitFormatter timeFormatter;
-
-    // 3600 seconds == 1 hour
-    const auto r0 = timeFormatter.format(3600, DTimeUnitFormatter::Seconds);
-    Q_ASSERT(r0.first == 1 && r0.second == DTimeUnitFormatter::Hour);
-
-    // 86400 seconds == 1 day
-    const auto r1 = timeFormatter.format(86400, DTimeUnitFormatter::Seconds);
-    Q_ASSERT(r1.first == 1 && r1.second == DTimeUnitFormatter::Day);
-
-    // 129600 seconds == 1.5 day
-    const auto r3 = timeFormatter.format(129600, DTimeUnitFormatter::Seconds);
-    Q_ASSERT(qFuzzyCompare(1.5, r3.first) && r3.second == DTimeUnitFormatter::Day);
-
-    // 1.5 day == 36 hours
-    const auto r4 = timeFormatter.formatAs(1.5, DTimeUnitFormatter::Day, DTimeUnitFormatter::Hour);
-    Q_ASSERT(r4 == 36);
-}
-
-void TestDUtil::testTimeFormatterList()
-{
-    const DTimeUnitFormatter timeFormatter;
-
-    // 135120.5 Minutes == 93 days + 20 hours + 30 seconds
-    const auto r = timeFormatter.formatAsUnitList(135120.5, DTimeUnitFormatter::Minute);
-    Q_ASSERT(r[0].first == 93 && r[0].second == DTimeUnitFormatter::Day);
-    Q_ASSERT(r[1].first == 20 && r[1].second == DTimeUnitFormatter::Hour);
-    Q_ASSERT(r[2].first == 30 && r[2].second == DTimeUnitFormatter::Seconds);
-}
-
-void TestDUtil::testDiskFormatter()
-{
-    const DDiskSizeFormatter diskFormatter1000 = DDiskSizeFormatter();
-
-    // 1000 K == 1 M
-    const auto i0 = diskFormatter1000.format(1000, DDiskSizeFormatter::K);
-    Q_ASSERT(i0.first == 1 && i0.second == DDiskSizeFormatter::M);
-
-    // 1000 K == 1000000 B
-    const auto i1 = diskFormatter1000.formatAs(1000, DDiskSizeFormatter::K, DDiskSizeFormatter::B);
-    Q_ASSERT(i1 == 1000000);
-}
-
-void TestDUtil::testDiskFormatterList()
-{
-    const DDiskSizeFormatter diskFormatter = DDiskSizeFormatter();
-
-    // 1351223412.1234 KB == 1 TB + 351 GB + 223 MB + 412 KB + 123.4 B
-    const auto r = diskFormatter.formatAsUnitList(1351223412.1234, DDiskSizeFormatter::K);
-    Q_ASSERT(r[0].first == 1 && r[0].second == DDiskSizeFormatter::T);
-    Q_ASSERT(r[1].first == 351 && r[1].second == DDiskSizeFormatter::G);
-    Q_ASSERT(r[2].first == 223 && r[2].second == DDiskSizeFormatter::M);
-    Q_ASSERT(r[3].first == 412 && r[3].second == DDiskSizeFormatter::K);
-
-    // TODO: test failed
-//    Q_ASSERT(r[4].first == 123.4 && r[4].second == DiskSizeFormatter::B);
-}
-
-void TestDUtil::testDiskFormatter1024()
-{
-    const DDiskSizeFormatter diskFormatter = DDiskSizeFormatter().rate(1024);
-
-    // 1024 K == 1 M
-    const auto d0 = diskFormatter.format(1024, DDiskSizeFormatter::K);
-    Q_ASSERT(d0.first == 1 && d0.second == DDiskSizeFormatter::M);
-
-    // 100000000000 B == 93.13225746154785 G
-    const auto d1 = diskFormatter.format(100000000000, DDiskSizeFormatter::B);
-    Q_ASSERT(qFuzzyCompare(93.13225746154785, d1.first) && d1.second == DDiskSizeFormatter::G);
-
-    // 100000000000 B == 0.09094947017729282 T
-    const auto d2 = diskFormatter.formatAs(100000000000, DDiskSizeFormatter::B, DDiskSizeFormatter::T);
-    Q_ASSERT(qFuzzyCompare(0.09094947017729282, d2));
-}
-
-void TestDUtil::testDBusSender()
-{
-    // basic method call
-    DDBusSender()
-    .service("com.deepin.dde.ControlCenter")
-    .interface("com.deepin.dde.ControlCenter")
-    .path("/com/deepin/dde/ControlCenter")
-    .method("ShowPage")
-    .arg(QString("update"))
-    .arg(QString("available-updates"))
-    .call();
-
-    // property set
-    QDBusPendingReply<> r1 = DDBusSender()
-                             .service("com.deepin.dde.daemon.Dock")
-                             .interface("com.deepin.dde.daemon.Dock")
-                             .path("/com/deepin/dde/daemon/Dock")
-                             .property("DisplayMode")
-                             .set(1); // set to efficient mode
-
-    // property get
-    QDBusPendingReply<QVariant> r2 = DDBusSender()
-                                     .service("com.deepin.dde.daemon.Dock")
-                                     .interface("com.deepin.dde.daemon.Dock")
-                                     .path("/com/deepin/dde/daemon/Dock")
-                                     .property("DisplayMode")
-                                     .get(); // read mode
-
-    if (!r2.isError() && !r1.isError()) {
-        Q_ASSERT(r2.value().toInt() == 1);
-    }
-
-    // complex type property get
-    QDBusPendingReply<QVariant> r3 = DDBusSender()
-                                     .service("com.deepin.dde.ControlCenter")
-                                     .interface("com.deepin.dde.ControlCenter")
-                                     .path("/com/deepin/dde/ControlCenter")
-                                     .property("Rect")
-                                     .get();
-
-    QVariant variant = r3.value();
-    const QDBusArgument v = variant.value<QDBusArgument>();
-
-    int x, y, w, h;
-    v.beginStructure();
-    v >> x >> y >> w >> h;
-    v.endStructure();
-
-    qDebug() << x << y << w << h;
-}
-
-void TestDUtil::testGroups()
-{
-    auto path = ":/data/dt-settings.json";
-    auto settings = DSettings::fromJsonFile(path);
-
-    qDebug() << settings->groupKeys();
-    qDebug() << settings->group("shortcuts");
-    for (auto cg : settings->group("shortcuts")->childGroups()) {
-        qDebug() << cg->key();
-    }
-    qDebug() << settings->group("shortcuts.ternimal");
-    qDebug() << settings->group("shortcuts.ternimal")->options();
-}
-
-void TestDUtil::testSysInfo()
-{
-    qDebug() << DSysInfo::uosType() <<
-                DSysInfo::uosEditionType() <<
-                DSysInfo::uosArch() <<
-                DSysInfo::uosProductTypeName() <<
-                DSysInfo::uosSystemName() <<
-                DSysInfo::uosEditionName() <<
-                DSysInfo::spVersion() <<
-                DSysInfo::udpateVersion() <<
-                DSysInfo::majorVersion() <<
-                DSysInfo::minorVersion() <<
-                DSysInfo::buildVersion() ;
-}
diff --git a/tests/dutils/dutiltester.h b/tests/dutils/dutiltester.h
deleted file mode 100644 (file)
index f53ea34..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <QObject>
-
-class TestDUtil: public QObject
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void testLogPath();
-    void testPathChange();
-    void testDSingleton();
-    void testTimeFormatter();
-    void testTimeFormatterList();
-    void testDiskFormatter();
-    void testDiskFormatterList();
-    void testDiskFormatter1024();
-    void testDBusSender();
-
-    void testGroups();
-    void testSysInfo();
-};
-
-
diff --git a/tests/dutils/main.cpp b/tests/dutils/main.cpp
deleted file mode 100644 (file)
index 9f73be8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QtTest/QtTest>
-
-#include "dutiltester.h"
-
-QTEST_MAIN(TestDUtil);
diff --git a/tests/dutils/singletontester.cpp b/tests/dutils/singletontester.cpp
deleted file mode 100644 (file)
index 326b2df..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "singletontester.h"
-
-#include <QDebug>
-#include <QThread>
-
-Singleton::Singleton(QObject *parent) : QObject(parent)
-{
-    qDebug() << "Singleton Init Begin" << this;
-    QThread::sleep(3);
-    qDebug() << "Singleton Init End" << this;
-}
-
-void Singleton::test()
-{
-    qDebug() << "test" << this;
-}
-
-MultiSingletonTester::MultiSingletonTester(QObject *parent) : QObject(parent)
-{
-}
-
-void MultiSingletonTester::run()
-{
-    Singleton::instance()->test();
-}
diff --git a/tests/dutils/singletontester.h b/tests/dutils/singletontester.h
deleted file mode 100644 (file)
index 003fbc3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <QObject>
-
-#include "base/dsingleton.h"
-
-class Singleton : public QObject, public Dtk::Core::DSingleton<Singleton>
-{
-    Q_OBJECT
-    friend class Dtk::Core::DSingleton<Singleton>;
-public:
-    explicit Singleton(QObject *parent = nullptr);
-
-    void test();
-};
-
-class MultiSingletonTester : public QObject
-{
-    Q_OBJECT
-public:
-    explicit MultiSingletonTester(QObject *parent = nullptr);
-
-    void run();
-};
-
-
index e8d1e779be0e5980e333587a30df37c39b6dfee2..042526625faa549187ffdf9d4906e97f4480f2b8 100644 (file)
@@ -4,22 +4,28 @@ QT -= gui
 TEMPLATE = app
 CONFIG += c++11
 
+# TODO: vtabhook release test failed
+QMAKE_CXXFLAGS_RELEASE -= -O2
+
 !isEmpty(DTK_STATIC_LIB){
     DEFINES += DTK_STATIC_LIB
 }
 
-win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore
-else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore
-else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore
+load(dtk_testcase)
+
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore -lgtest
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore -lgtest
+else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore -lgtest -ldl
 
 INCLUDEPATH += $$PWD/../../src
 DEPENDPATH += $$PWD/../../src
-
-CONFIG(debug, debug|release) {
-    unix:QMAKE_RPATHDIR += $$OUT_PWD/../../src
-}
+QMAKE_RPATHDIR += $$OUT_PWD/../../src
 
 QMAKE_LFLAGS += -Wl,--export-dynamic
 
+HEADERS += \
+    $$PWD/../../src/util/dvtablehook.h
+
 SOURCES += \
-    tst_dvtablehook.cpp
+    $$PWD/../../src/util/dvtablehook.cpp \
+    ut_dvtablehook.cpp
diff --git a/tests/dvtablehook/tst_dvtablehook.cpp b/tests/dvtablehook/tst_dvtablehook.cpp
deleted file mode 100644 (file)
index 9f45c2c..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
- *
- * Author:     zccrs <zccrs@live.com>
- *
- * Maintainer: zccrs <zhangjide@deepin.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QObject>
-#include <QTest>
-#include <QDebug>
-
-#include <util/DVtableHook>
-
-DCORE_USE_NAMESPACE
-
-class tst_DVtableHook : public QObject
-{
-    Q_OBJECT
-
-private Q_SLOTS:
-    void objectFun2ObjectFun();
-    void objectFun2Fun();
-
-    void fun2ObjectFun();
-    void fun2Fun();
-};
-
-namespace TestClass {
-class A {
-public:
-    virtual bool test(int v) {
-        qDebug() << Q_FUNC_INFO << this << v;
-
-        return false;
-    }
-
-    virtual ~A() {
-
-    }
-};
-
-class B {
-public:
-    bool test(int v) {
-        qDebug() << Q_FUNC_INFO << v;
-
-        return true;
-    }
-};
-}
-
-using namespace TestClass;
-
-void tst_DVtableHook::objectFun2ObjectFun()
-{
-    A *a = new A();
-    B *b = new B();
-
-    QVERIFY(DVtableHook::overrideVfptrFun(a, &A::test, b, &B::test));
-    QVERIFY(DVtableHook::hasVtable(a));
-    QVERIFY(a->test(0));
-    DVtableHook::resetVfptrFun(a, &A::test);
-    QVERIFY(!a->test(0));
-    delete a;
-    QVERIFY(!DVtableHook::hasVtable(a));
-}
-
-static bool test(A *obj, int v)
-{
-    qDebug() << Q_FUNC_INFO << obj << v;
-    return true;
-}
-
-void tst_DVtableHook::objectFun2Fun()
-{
-    A *a = new A();
-    QVERIFY(DVtableHook::overrideVfptrFun(a, &A::test, &test));
-    QVERIFY(a->test(1));
-    DVtableHook::resetVtable(a);
-    QVERIFY(!DVtableHook::hasVtable(a));
-}
-
-void tst_DVtableHook::fun2ObjectFun()
-{
-    B *b = new B();
-    QVERIFY(DVtableHook::overrideVfptrFun(&A::test, b, &B::test));
-    A *a = new A();
-    QVERIFY(DVtableHook::getVtableOfObject(a) == DVtableHook::getVtableOfClass<A>());
-    QVERIFY(a->test(2));
-}
-
-void tst_DVtableHook::fun2Fun()
-{
-    QVERIFY(DVtableHook::overrideVfptrFun(&A::test, &test));
-    A *a = new A();
-    QVERIFY(a->test(3));
-}
-
-QTEST_MAIN(tst_DVtableHook)
-
-#include "tst_dvtablehook.moc"
diff --git a/tests/main.cpp b/tests/main.cpp
new file mode 100644 (file)
index 0000000..1e2d9d9
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ut_dutil.h"
+#include <QGuiApplication>
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+
+    testing::InitGoogleTest(&argc, argv);
+    return RUN_ALL_TESTS();
+}
diff --git a/tests/test-recoverage-qmake.sh b/tests/test-recoverage-qmake.sh
new file mode 100755 (executable)
index 0000000..c6b3425
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+BUILD_DIR=build
+REPORT_DIR=report
+#EXTRACT_ARGS="src"
+cd ../
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+qmake ..
+make
+cd ../tests/
+
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+qmake ../
+make check
+
+lcov -d ./ -c -o coverage_all.info
+#lcov --extract coverage_all.info $EXTRACT_ARGS --output-file coverage.info
+lcov --remove coverage_all.info "*/tests/*" "*/usr/include*" "*build/src*" --output-file coverage.info
+cd ..
+genhtml -o $REPORT_DIR $BUILD_DIR/coverage.info
+
+#rm -rf $BUILD_DIR
+#rm -rf ../$BUILD_DIR
index 2a5e2de18a140488257bb598e559e96715f6d473..09a391eebea3bd3f9b81b7e1eb383f4a2644e1a6 100644 (file)
@@ -1,6 +1,53 @@
-TEMPLATE = subdirs
-SUBDIRS += \
-    dutils \
-    dvtablehook \
-    ddesktopentry \
-    dthreadutils
+TEMPLATE = app
+QT += core dbus xml testlib concurrent
+CONFIG += thread c++11 link_pkgconfig
+CONFIG -= app_bundle
+
+QMAKE_LFLAGS += -Wl,--export-dynamic
+
+include(dtk_testcase.prf)
+
+# 指定moc文件生成目录和src一样
+MOC_DIR=$$OUT_PWD/../src
+
+# 使用 tmp 目录下的 os-version
+DEFINES += OS_VERSION_TEST_FILE=\\\"/tmp/etc/os-version\\\"
+
+DEPENDPATH += $$PWD/../src
+
+unix: {
+QMAKE_RPATHDIR += $$OUT_PWD/../src
+LIBS += -L$$OUT_PWD/../src/ -ldtkcore -lgtest
+# for dlsym
+LIBS += -ldl
+# TODO: vtabhook release test failed
+QMAKE_CXXFLAGS_RELEASE -= -O2
+}
+
+INCLUDEPATH += \
+    $$PWD/../src \
+    $$PWD/../src/base \
+    $$PWD/../src/base/private \
+    $$PWD/../src/filesystem \
+    $$PWD/../src/log \
+    $$PWD/../src/settings \
+    $$PWD/../src/util
+
+include($$PWD/../src/base/base.pri)
+include($$PWD/../src/filesystem/filesystem.pri)
+include($$PWD/../src/log/log.pri)
+include($$PWD/../src/settings/settings.pri)
+include($$PWD/../src/util/util.pri)
+
+HEADERS += $$PWD/ut_*.h \
+    $$PWD/../src/dtkcore_global.h \
+    $$PWD/../src/dsysinfo.h \
+    $$PWD/../src/dsecurestring.h \
+    $$PWD/../src/ddesktopentry.h
+
+SOURCES += $$PWD/*.cpp \
+    $$PWD/../src/dsysinfo.cpp \
+    $$PWD/../src/dsecurestring.cpp \
+    $$PWD/../src/ddesktopentry.cpp
+
+RESOURCES += data.qrc
diff --git a/tests/ut_ddesktopentrytest.cpp b/tests/ut_ddesktopentrytest.cpp
new file mode 100644 (file)
index 0000000..708752c
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2019 Deepin Technology Co., Ltd.
+ *               2019 Gary Wang
+ *
+ * Author:     Gary Wang <wzc782970009@gmail.com>
+ *
+ * Maintainer: Gary Wang <wangzichong@deepin.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <QDebug>
+#include <QString>
+#include <QTemporaryFile>
+#include <DDesktopEntry>
+#include <gtest/gtest.h>
+
+DCORE_USE_NAMESPACE
+
+const QString testFileContent = { QStringLiteral(R"desktop(# A. Example Desktop Entry File
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Foo Viewer
+Name[zh_CN]=福查看器
+Comment=The best viewer for Foo objects available!
+# Next line have an extra " character
+Comment[zh_CN]=最棒的 "福 查看器!
+TryExec=fooview
+Exec=fooview %F
+Icon=fooview
+MimeType=image/x-foo;
+Actions=Gallery;Create;
+
+[Desktop Action Gallery]
+Exec=fooview --gallery
+Name=Browse Gallery
+
+[Desktop Action Create]
+Exec=fooview --create-new
+Name=Create a new Foo!
+Icon=fooview-new
+)desktop") };
+
+class ut_DesktopEntry : public testing::Test
+{
+public:
+    static void SetUpTestCase()
+    {
+        //qDebug() << "*****************" << __FUNCTION__;
+    }
+    static void TearDownTestCase()
+    {
+        //qDebug() << "*****************" << __FUNCTION__;
+    }
+    virtual void SetUp();
+    virtual void TearDown();
+};
+void ut_DesktopEntry::SetUp()
+{
+
+}
+void ut_DesktopEntry::TearDown()
+{
+
+}
+
+TEST_F(ut_DesktopEntry, ParseFile)
+{
+    QTemporaryFile file("testReadXXXXXX.desktop");
+    ASSERT_TRUE(file.open());
+    const QString fileName = file.fileName();
+    QTextStream ts(&file);
+    ts << testFileContent;
+    file.close();
+    ASSERT_TRUE(QFile::exists(fileName));
+
+    DDesktopEntry *desktopFile = new DDesktopEntry(fileName);
+    QStringList allGroups = desktopFile->allGroups();
+    ASSERT_EQ(allGroups.count(), 3);
+    ASSERT_TRUE(allGroups.contains("Desktop Entry") &&
+            allGroups.contains("Desktop Action Gallery") &&
+            allGroups.contains("Desktop Action Create"));
+    ASSERT_EQ(desktopFile->allGroups(true)[0], QStringLiteral("Desktop Entry"));
+    ASSERT_EQ(desktopFile->localizedValue("Name", "zh_CN"), QStringLiteral("福查看器"));
+    ASSERT_EQ(desktopFile->localizedValue("Name", "empty"), QStringLiteral("Foo Viewer"));
+    ASSERT_EQ(desktopFile->keys("Desktop Entry"),
+             QStringList({"Actions", "Comment", "Comment[zh_CN]", "Exec", "Icon", "MimeType", "Name", "Name[zh_CN]", "TryExec", "Type", "Version"}));
+
+    {
+        struct RestoreLocale {
+            ~RestoreLocale() { QLocale::setDefault(QLocale::system()); }
+        } restoreLocale;
+        Q_UNUSED(restoreLocale);
+
+        QLocale::setDefault(QLocale("zh_CN"));
+        ASSERT_EQ(desktopFile->localizedValue("Name"), QStringLiteral("福查看器"));
+
+        QLocale::setDefault(QLocale::c());
+        ASSERT_EQ(desktopFile->localizedValue("Name"), QStringLiteral("Foo Viewer"));
+    }
+
+    ASSERT_EQ(desktopFile->stringValue("Name"), QStringLiteral("Foo Viewer"));
+    ASSERT_EQ(desktopFile->setRawValue("Bar Viewer", "Name"), true);
+    ASSERT_EQ(desktopFile->stringValue("Name"), QStringLiteral("Bar Viewer"));
+    ASSERT_EQ(desktopFile->setLocalizedValue("霸查看器", "zh_CN", "Name"), true);
+    ASSERT_EQ(desktopFile->localizedValue("Name", "zh_CN"), QStringLiteral("霸查看器"));
+    ASSERT_EQ(desktopFile->contains("Semicolon"), false);
+    ASSERT_EQ(desktopFile->setRawValue(";grp\\;2;grp3;", "Semicolon"), true);
+    ASSERT_EQ(desktopFile->stringListValue("Semicolon"), QStringList({"", "grp;2", "grp3"}));
+    ASSERT_EQ(desktopFile->contains("Semicolon"), true);
+    ASSERT_EQ(desktopFile->removeEntry("Semicolon"), true);
+    ASSERT_EQ(desktopFile->contains("Semicolon"), false);
+
+    //qDebug() << desktopFile->save();
+    //qDebug() << fileName;
+}
diff --git a/tests/ut_dthreadutils.cpp b/tests/ut_dthreadutils.cpp
new file mode 100644 (file)
index 0000000..ccb037a
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2020 ~ 2020 Deepin Technology Co., Ltd.
+ *
+ * Author:     zccrs <zccrs@live.com>
+ *
+ * Maintainer: zccrs <zhangjide@deepin.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <QObject>
+#include <gtest/gtest.h>
+#include <QTest>
+#include <QtConcurrent>
+
+#include <util/DThreadUtils>
+
+DCORE_USE_NAMESPACE
+
+class ThreadUtils : public QObject
+{
+    Q_OBJECT
+
+public Q_SLOTS:
+    void testCallInMainThread();
+};
+
+void ThreadUtils::testCallInMainThread()
+{
+    DThreadUtil::runInMainThread([]() {
+        bool result = QThread::currentThread() == QCoreApplication::instance()->thread();
+        ASSERT_TRUE(result);
+    });
+
+    auto fe = QtConcurrent::run([] {
+        ASSERT_TRUE(DThreadUtil::runInMainThread([](QThread *thread) -> bool {
+            return QThread::currentThread() == QCoreApplication::instance()->thread() && QThread::currentThread() != thread;
+        },
+                                                 QThread::currentThread()));
+    });
+
+    ASSERT_TRUE(QTest::qWaitFor([&] {
+        return fe.isFinished();
+    }));
+
+    {
+        // 测试target对象销毁后是否还会触发函数调用
+        QPointer<QObject> object = new QObject();
+        bool test = true;
+        auto result1 = QtConcurrent::run([&test, object] {
+            test = DThreadUtil::runInMainThread(object, [object]() -> bool {
+                if (!object)
+                    return false;
+
+                delete object.data();
+                return true;
+            });
+        });
+        auto result2 = QtConcurrent::run([&test, object] {
+            test = DThreadUtil::runInMainThread(object, [object]() -> bool {
+                if (!object)
+                    return false;
+
+                delete object.data();
+                return true;
+            });
+        });
+
+        ASSERT_TRUE(QTest::qWaitFor([&] {
+            return result1.isFinished() && result2.isFinished();
+        }));
+
+        ASSERT_TRUE(!test);
+    }
+}
+
+class ut_DThreadUtils : public testing::Test
+{
+public:
+    virtual void SetUp()
+    {
+        m_threadutil = new ThreadUtils();
+    }
+    virtual void TearDown()
+    {
+        delete m_threadutil;
+    }
+
+protected:
+    ThreadUtils *m_threadutil = nullptr;
+};
+
+TEST_F(ut_DThreadUtils, CallInMainThread)
+{
+    ASSERT_TRUE(m_threadutil);
+    m_threadutil->testCallInMainThread();
+}
+
+#include "ut_dthreadutils.moc"
diff --git a/tests/ut_dutil.cpp b/tests/ut_dutil.cpp
new file mode 100644 (file)
index 0000000..95a3a73
--- /dev/null
@@ -0,0 +1,389 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ut_dutil.h"
+
+#include <QThread>
+#include <QStandardPaths>
+#include <QDBusPendingCall>
+#include <QDBusReply>
+#include <QDir>
+#include <DDesktopEntry>
+
+#include "log/LogManager.h"
+#include "filesystem/dpathbuf.h"
+#include "ut_singleton.h"
+#include "util/dtimeunitformatter.h"
+#include "util/ddisksizeformatter.h"
+#include "util/ddbussender.h"
+#include "settings/dsettings.h"
+#include "settings/dsettingsgroup.h"
+#include "settings/dsettingsoption.h"
+#include "dsysinfo.h"
+
+DCORE_USE_NAMESPACE
+
+void ut_DUtil::SetUpTestCase()
+{
+    //qDebug() << "*****************" << __FUNCTION__;
+}
+
+void ut_DUtil::TearDownTestCase()
+{
+    //qDebug() << "*****************" << __FUNCTION__;
+}
+
+void ut_DUtil::SetUp()
+{
+    QDir dir("/tmp/etc/");
+    if (!dir.exists())
+        dir.mkdir("/tmp/etc/");
+}
+void ut_DUtil::TearDown()
+{
+    QDir dir("/tmp/etc/");
+    if (dir.exists())
+        dir.remove("/tmp/etc/");
+}
+
+TEST_F(ut_DUtil, testLogPath)
+{
+    qApp->setOrganizationName("deepin");
+    qApp->setApplicationName("deepin-test-dtk");
+
+    DPathBuf logPath(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first());
+
+#ifdef Q_OS_OSX
+    logPath = logPath / "Library" / "Caches" / "deepin" / "deepin-test-dtk" / "deepin-test-dtk.log";
+#else
+    logPath = logPath / ".cache" / "deepin" / "deepin-test-dtk" / "deepin-test-dtk.log";
+#endif
+
+    ASSERT_EQ(DLogManager::getlogFilePath(), logPath.toString());
+}
+
+TEST_F(ut_DUtil, testPathChange)
+{
+    DPathBuf root("/");
+
+    auto usr = root / "./usr";
+    ASSERT_EQ(QDir(usr.toString()).absolutePath(), QDir::toNativeSeparators("/usr"));
+
+    root /= "root";
+    ASSERT_EQ(root.toString(), QDir::toNativeSeparators("/root"));
+
+    root /= "../usr";
+    ASSERT_EQ(root.toString(), usr.toString());
+}
+
+TEST_F(ut_DUtil, testDSingleton)
+{
+    auto threadA = new QThread;
+    auto testerA = new MultiSingletonTester;
+    QObject::connect(threadA, &QThread::started, testerA, &MultiSingletonTester::run);
+    QObject::connect(threadA, &QThread::finished, testerA, [=]() {
+        threadA->deleteLater();
+        testerA->deleteLater();
+    });
+    testerA->moveToThread(threadA);
+
+    auto threadB = new QThread;
+    auto testerB = new MultiSingletonTester;
+    testerB->moveToThread(threadB);
+    QObject::connect(threadB, &QThread::started, testerB, &MultiSingletonTester::run);
+    QObject::connect(threadB, &QThread::finished, testerB, [=]() {
+        threadB->deleteLater();
+        testerB->deleteLater();
+    });
+
+    threadA->start();
+    threadB->start();
+
+    QThread::sleep(5);
+}
+
+TEST_F(ut_DUtil, testTimeFormatter)
+{
+    const DTimeUnitFormatter timeFormatter;
+
+    // 3600 seconds == 1 hour
+    const auto r0 = timeFormatter.format(3600, DTimeUnitFormatter::Seconds);
+    ASSERT_TRUE(qFuzzyCompare(r0.first, 1) && r0.second == DTimeUnitFormatter::Hour);
+
+    // 86400 seconds == 1 day
+    const auto r1 = timeFormatter.format(86400, DTimeUnitFormatter::Seconds);
+    ASSERT_TRUE(qFuzzyCompare(r1.first, 1) && r1.second == DTimeUnitFormatter::Day);
+
+    // 129600 seconds == 1.5 day
+    const auto r3 = timeFormatter.format(129600, DTimeUnitFormatter::Seconds);
+    ASSERT_TRUE(qFuzzyCompare(1.5, r3.first) && r3.second == DTimeUnitFormatter::Day);
+
+    // 1.5 day == 36 hours
+    const auto r4 = timeFormatter.formatAs(1.5, DTimeUnitFormatter::Day, DTimeUnitFormatter::Hour);
+    ASSERT_TRUE(qFuzzyCompare(r4, 36));
+}
+
+TEST_F(ut_DUtil, testTimeFormatterList)
+{
+    const DTimeUnitFormatter timeFormatter;
+
+    // 135120.5 Minutes == 93 days + 20 hours + 30 seconds
+    const auto r = timeFormatter.formatAsUnitList(135120.5, DTimeUnitFormatter::Minute);
+    ASSERT_TRUE(qFuzzyCompare(r[0].first, 93) && r[0].second == DTimeUnitFormatter::Day);
+    ASSERT_TRUE(qFuzzyCompare(r[1].first, 20) && r[1].second == DTimeUnitFormatter::Hour);
+    ASSERT_TRUE(qFuzzyCompare(r[2].first, 30) && r[2].second == DTimeUnitFormatter::Seconds);
+}
+
+TEST_F(ut_DUtil, testDiskFormatter)
+{
+    const DDiskSizeFormatter diskFormatter1000 = DDiskSizeFormatter();
+
+    // 1000 K == 1 M
+    const auto i0 = diskFormatter1000.format(1000, DDiskSizeFormatter::K);
+    ASSERT_TRUE(qFuzzyCompare(i0.first, 1) && i0.second == DDiskSizeFormatter::M);
+
+    // 1000 K == 1000000 B
+    const auto i1 = diskFormatter1000.formatAs(1000, DDiskSizeFormatter::K, DDiskSizeFormatter::B);
+    ASSERT_TRUE(qFuzzyCompare(i1, 1000000));
+}
+
+TEST_F(ut_DUtil, testDiskFormatterList)
+{
+    const DDiskSizeFormatter diskFormatter = DDiskSizeFormatter();
+
+    // 1351223412.1234 KB == 1 TB + 351 GB + 223 MB + 412 KB + 123.4 B
+    const auto r = diskFormatter.formatAsUnitList(1351223412.1234, DDiskSizeFormatter::K);
+    ASSERT_TRUE(qFuzzyCompare(r[0].first, 1) && r[0].second == DDiskSizeFormatter::T);
+    ASSERT_TRUE(qFuzzyCompare(r[1].first, 351) && r[1].second == DDiskSizeFormatter::G);
+    ASSERT_TRUE(qFuzzyCompare(r[2].first, 223) && r[2].second == DDiskSizeFormatter::M);
+    ASSERT_TRUE(qFuzzyCompare(r[3].first, 412) && r[3].second == DDiskSizeFormatter::K);
+
+    // TODO: test failed
+    //    Q_ASSERT(r[4].first == 123.4 && r[4].second == DiskSizeFormatter::B);
+}
+
+TEST_F(ut_DUtil, testDiskFormatter1024)
+{
+    const DDiskSizeFormatter diskFormatter = DDiskSizeFormatter().rate(1024);
+
+    // 1024 K == 1 M
+    const auto d0 = diskFormatter.format(1024, DDiskSizeFormatter::K);
+    ASSERT_TRUE(qFuzzyCompare(d0.first, 1) && d0.second == DDiskSizeFormatter::M);
+
+    // 100000000000 B == 93.13225746154785 G
+    const auto d1 = diskFormatter.format(100000000000, DDiskSizeFormatter::B);
+    ASSERT_TRUE(qFuzzyCompare(93.13225746154785, d1.first) && d1.second == DDiskSizeFormatter::G);
+
+    // 100000000000 B == 0.09094947017729282 T
+    const auto d2 = diskFormatter.formatAs(100000000000, DDiskSizeFormatter::B, DDiskSizeFormatter::T);
+    ASSERT_TRUE(qFuzzyCompare(0.09094947017729282, d2));
+}
+
+TEST_F(ut_DUtil, testDBusSender)
+{
+    // basic method call
+    DDBusSender()
+        .service("com.deepin.dde.ControlCenter")
+        .interface("com.deepin.dde.ControlCenter")
+        .path("/com/deepin/dde/ControlCenter")
+        .method("ShowPage")
+        .arg(QString("update"))
+        .arg(QString("available-updates"))
+        .call();
+
+    // property set
+    QDBusPendingReply<> r1 = DDBusSender()
+                                 .service("com.deepin.dde.daemon.Dock")
+                                 .interface("com.deepin.dde.daemon.Dock")
+                                 .path("/com/deepin/dde/daemon/Dock")
+                                 .property("DisplayMode")
+                                 .set(1); // set to efficient mode
+
+    // property get
+    QDBusPendingReply<QVariant> r2 = DDBusSender()
+                                         .service("com.deepin.dde.daemon.Dock")
+                                         .interface("com.deepin.dde.daemon.Dock")
+                                         .path("/com/deepin/dde/daemon/Dock")
+                                         .property("DisplayMode")
+                                         .get(); // read mode
+
+    if (!r2.isError() && !r1.isError()) {
+        ASSERT_TRUE(r2.value().toInt() == 1);
+    }
+
+    // complex type property get
+    QDBusPendingReply<QVariant> r3 = DDBusSender()
+                                         .service("com.deepin.dde.ControlCenter")
+                                         .interface("com.deepin.dde.ControlCenter")
+                                         .path("/com/deepin/dde/ControlCenter")
+                                         .property("Rect")
+                                         .get();
+
+    QVariant variant = r3.value();
+    const QDBusArgument v = variant.value<QDBusArgument>();
+
+    int x, y, w, h;
+    v.beginStructure();
+    v >> x >> y >> w >> h;
+    v.endStructure();
+
+    //qDebug() << x << y << w << h;
+}
+
+TEST_F(ut_DUtil, testGroups)
+{
+    auto path = ":/data/dt-settings.json";
+    auto settings = DSettings::fromJsonFile(path);
+
+    qDebug() << settings->groupKeys();
+    qDebug() << settings->group("shortcuts");
+    for (auto cg : settings->group("shortcuts")->childGroups()) {
+        qDebug() << cg->key();
+    }
+    qDebug() << settings->group("shortcuts.ternimal");
+    qDebug() << settings->group("shortcuts.ternimal")->options();
+}
+
+TEST_F(ut_DUtil, testOsVersion)
+{
+    DDesktopEntry entry("/tmp/etc/os-version");
+    entry.setStringValue("UnionTech OS Desktop", "SystemName", "Version");
+    entry.setStringValue("统信桌面操作系统", "SystemName[zh_CN]", "Version");
+    entry.setStringValue("Desktop", "ProductType", "Version");
+    entry.setStringValue("桌面", "ProductType[zh_CN]", "Version");
+    entry.setStringValue("Professional", "EditionName", "Version");
+    entry.setStringValue("专业版", "EditionName[zh_CN]", "Version");
+    entry.setStringValue("20", "MajorVersion", "Version");
+    entry.setStringValue("100A", "MinorVersion", "Version");
+    entry.setStringValue("11018.107", "OsBuild", "Version");
+    ASSERT_TRUE(entry.save());
+
+    ASSERT_TRUE(DSysInfo::uosSystemName(QLocale("C")) == "UnionTech OS Desktop");
+    ASSERT_TRUE(DSysInfo::uosSystemName(QLocale("zh_CN")) == "统信桌面操作系统");
+    ASSERT_TRUE(DSysInfo::uosProductTypeName(QLocale("zh_CN")) == "桌面");
+    ASSERT_TRUE(DSysInfo::uosProductTypeName(QLocale("C")) == "Desktop");
+    ASSERT_TRUE(DSysInfo::uosEditionName(QLocale("zh_CN")) == "专业版");
+    ASSERT_TRUE(DSysInfo::uosEditionName(QLocale("C")) == "Professional");
+    ASSERT_TRUE(DSysInfo::majorVersion() == "20");
+    ASSERT_TRUE(DSysInfo::minorVersion() == "100A");
+    ASSERT_TRUE(DSysInfo::buildVersion() == "107");
+
+    // test minVersion.BC SP1….SP99
+    for (int i = 0; i < 100; ++i) {
+        entry.setStringValue(QString("%1").arg(1001 + i * 10), "MinorVersion", "Version");
+        ASSERT_TRUE(entry.save());
+        ASSERT_TRUE(DSysInfo::spVersion() == (i ? QString("SP%1").arg(i) : QString()));
+    }
+
+    // test minVersion.D udpate1~udpate9 updateA~udpateZ
+    for (int i = 0; i < 10; ++i) {
+        entry.setStringValue(QString("%1").arg(1000 + i), "MinorVersion", "Version");
+        ASSERT_TRUE(entry.save());
+        ASSERT_TRUE(DSysInfo::udpateVersion() == (i ? QString("update%1").arg(i) : QString()));
+    }
+
+    for (char c = 'A'; c <= 'Z'; ++c) {
+        entry.setStringValue(QString("100").append(c), "MinorVersion", "Version");
+        ASSERT_TRUE(entry.save());
+        ASSERT_TRUE(DSysInfo::udpateVersion() == QString("update%1").arg(c));
+    }
+
+    // test incalide MinorVersion
+    entry.setStringValue(QString("100?"), "MinorVersion", "Version");
+    ASSERT_TRUE(entry.save());
+    ASSERT_TRUE(DSysInfo::udpateVersion() == QString());
+    // restore MinorVersion
+    entry.setStringValue(QString("1000"), "MinorVersion", "Version");
+    ASSERT_TRUE(entry.save());
+
+    // test OsBuild.B == 1 && OsBuild.D = [1, 6]
+    ASSERT_TRUE(DSysInfo::uosType() == DSysInfo::UosDesktop);
+    for (int i = 1; i <= 6; ++i) {
+        entry.setStringValue(QString("%1").arg(11008.107 + i * 10), "OsBuild", "Version");
+        ASSERT_TRUE(entry.save());
+        switch (i) {
+        case 1:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosProfessional);
+            break;
+        case 2:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosHome);
+            break;
+        case 3:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosCommunity);
+            break;
+        case 4:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosMilitary);
+            break;
+        case 5:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosDeviceEdition);
+            break;
+        case 6:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosEducation);
+            break;
+        default:
+            break;
+        }
+    }
+
+    // test OsBuild.B == 2 && OsBuild.D = [1, 5]
+    entry.setStringValue("12018.107", "OsBuild", "Version");
+    ASSERT_TRUE(entry.save());
+    ASSERT_TRUE(DSysInfo::uosType() == DSysInfo::UosServer);
+    for (int i = 1; i <= 5; ++i) {
+        entry.setStringValue(QString("%1").arg(12008.107 + i * 10), "OsBuild", "Version");
+        ASSERT_TRUE(entry.save());
+        switch (i) {
+        case 1:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosEnterprise);
+            break;
+        case 2:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosEnterpriseC);
+            break;
+        case 3:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosEuler);
+            break;
+        case 4:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosMilitaryS);
+            break;
+        case 5:
+            ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosDeviceEdition);
+            break;
+        default:
+            break;
+        }
+    }
+
+    // test OsBuild.B == 3
+    entry.setStringValue("13018.107", "OsBuild", "Version");
+    ASSERT_TRUE(entry.save());
+    ASSERT_TRUE(DSysInfo::uosType() == DSysInfo::UosDevice);
+    ASSERT_TRUE(DSysInfo::uosEditionType() == DSysInfo::UosEnterprise);
+
+    // test invalid OsBuild.B
+    entry.setStringValue("10018.107", "OsBuild", "Version");
+    ASSERT_TRUE(entry.save());
+    ASSERT_TRUE(DSysInfo::uosType() == DSysInfo::UosTypeUnknown);
+
+    // test OsBuild.E
+    for (int i = 0; i < 4; ++i) {
+        entry.setStringValue(QString("%1").arg(11000.107 + qreal(1 << i)), "OsBuild", "Version");
+        ASSERT_TRUE(entry.save());
+        ASSERT_TRUE(DSysInfo::uosArch() == (1 << i));
+    }
+
+    QFile::remove("/tmp/etc/os-version");
+}
diff --git a/tests/ut_dutil.h b/tests/ut_dutil.h
new file mode 100644 (file)
index 0000000..1e06fb0
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <gtest/gtest.h>
+
+class ut_DUtil : public testing::Test
+{
+protected:
+    static void SetUpTestCase();
+    static void TearDownTestCase();
+    virtual void SetUp();
+    virtual void TearDown();
+};
diff --git a/tests/ut_dvtablehook.cpp b/tests/ut_dvtablehook.cpp
new file mode 100644 (file)
index 0000000..9fadd33
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
+ *
+ * Author:     zccrs <zccrs@live.com>
+ *
+ * Maintainer: zccrs <zhangjide@deepin.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtest/gtest.h>
+#include <util/DVtableHook>
+
+namespace TestClass {
+class A
+{
+public:
+    virtual bool test(int v);
+
+    virtual ~A()
+    {
+    }
+};
+bool A::test(int v)
+{
+    qDebug() << Q_FUNC_INFO << this << v;
+
+    return false;
+}
+
+class B
+{
+public:
+    bool test(int v)
+    {
+        qDebug() << Q_FUNC_INFO << v;
+
+        return true;
+    }
+};
+} // namespace TestClass
+
+class ut_DVtableHook : public testing::Test
+{
+public:
+    static void SetUpTestCase()
+    {
+        qDebug() << "*****************" << __FUNCTION__;
+    }
+    static void TearDownTestCase()
+    {
+        qDebug() << "*****************" << __FUNCTION__;
+    }
+    virtual void SetUp();
+    virtual void TearDown();
+};
+void ut_DVtableHook::SetUp()
+{
+}
+void ut_DVtableHook::TearDown()
+{
+}
+
+using namespace TestClass;
+DCORE_USE_NAMESPACE
+
+static bool test(A *obj, int v)
+{
+    qDebug() << Q_FUNC_INFO << obj << v;
+    return true;
+}
+
+TEST_F(ut_DVtableHook, objectFun2ObjectFun)
+{
+    A *a = new A();
+    B *b = new B();
+
+    ASSERT_TRUE(DVtableHook::overrideVfptrFun(a, &A::test, b, &B::test));
+    ASSERT_TRUE(DVtableHook::hasVtable(a));
+    ASSERT_TRUE(a->test(0));
+    DVtableHook::resetVfptrFun(a, &A::test);
+    ASSERT_TRUE(!a->test(0));
+    delete a;
+    ASSERT_TRUE(!DVtableHook::hasVtable(a));
+}
+
+TEST_F(ut_DVtableHook, objectFun2Fun)
+{
+    A *a = new A();
+    ASSERT_TRUE(DVtableHook::overrideVfptrFun(a, &A::test, &test));
+    ASSERT_TRUE(a->test(1));
+    DVtableHook::resetVtable(a);
+    ASSERT_TRUE(!DVtableHook::hasVtable(a));
+}
+
+TEST_F(ut_DVtableHook, fun2ObjectFun)
+{
+    B *b = new B();
+    ASSERT_TRUE(DVtableHook::overrideVfptrFun(&A::test, b, &B::test));
+    A *a = new A();
+    ASSERT_TRUE(DVtableHook::getVtableOfObject(a) == DVtableHook::getVtableOfClass<A>());
+    ASSERT_TRUE(a->test(4));
+    delete a;
+    delete b;
+}
+
+TEST_F(ut_DVtableHook, fun2Fun)
+{
+    ASSERT_TRUE(DVtableHook::overrideVfptrFun(&A::test, &test));
+    A *a = new A();
+    ASSERT_TRUE(a->test(5));
+}
diff --git a/tests/ut_singleton.cpp b/tests/ut_singleton.cpp
new file mode 100644 (file)
index 0000000..3fdef00
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ut_singleton.h"
+
+#include <QDebug>
+#include <QThread>
+
+Singleton::Singleton(QObject *parent)
+    : QObject(parent)
+{
+    qDebug() << "Singleton Init Begin" << this;
+    QThread::sleep(3);
+    qDebug() << "Singleton Init End" << this;
+}
+
+void Singleton::test()
+{
+    qDebug() << "test" << this;
+}
+
+MultiSingletonTester::MultiSingletonTester(QObject *parent)
+    : QObject(parent)
+{
+}
+
+void MultiSingletonTester::run()
+{
+    Singleton::instance()->test();
+}
diff --git a/tests/ut_singleton.h b/tests/ut_singleton.h
new file mode 100644 (file)
index 0000000..1011133
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <QObject>
+
+#include "base/dsingleton.h"
+
+class Singleton : public QObject
+    , public Dtk::Core::DSingleton<Singleton>
+{
+    Q_OBJECT
+    friend class Dtk::Core::DSingleton<Singleton>;
+
+public:
+    explicit Singleton(QObject *parent = nullptr);
+
+    void test();
+};
+
+class MultiSingletonTester : public QObject
+{
+    Q_OBJECT
+public:
+    explicit MultiSingletonTester(QObject *parent = nullptr);
+
+    void run();
+};
index e11edb35666fd1deba08c38d7b9316a0893d9503..d27138874b3e646cb4a08168f0c81537d8fa2d1e 100644 (file)
@@ -14,7 +14,7 @@ INCLUDEPATH += ../../src
 DESTDIR = $$_PRO_FILE_PWD_/../../bin
 
 DTK_MODULE_NAME=dtkcore
-include(../../dtk_build_config.prf)
+load(dtk_build_config)
 target.path = $$TOOL_INSTALL_DIR
 
 INSTALLS += target
index ed623f0ffda177a82dcb56fedd9f9849bb104e19..21784c1f23410cdbd02cd88035fbc2f1ea46a803 100644 (file)
@@ -25,7 +25,7 @@ DEPENDPATH += $$PWD/../../src
 DESTDIR = $$_PRO_FILE_PWD_/../../bin
 
 DTK_MODULE_NAME=dtkcore
-include(../../dtk_build_config.prf)
+load(dtk_build_config)
 target.path = $$TOOL_INSTALL_DIR
 
 scripts.files += ../script/*.py