From 169e9c8a8fc1e6819e85e4a8d99635ce52922f48 Mon Sep 17 00:00:00 2001 From: jared Date: Sat, 24 Oct 2020 12:11:53 +0800 Subject: [PATCH] update format --- examples/TaoQuickShow/Src/AppInfo.cpp | 5 +- examples/TaoQuickShow/Src/AppInfo.h | 97 ++++++++++----------------- examples/TaoQuickShow/Src/stdafx.h | 46 ++++++------- 3 files changed, 58 insertions(+), 90 deletions(-) diff --git a/examples/TaoQuickShow/Src/AppInfo.cpp b/examples/TaoQuickShow/Src/AppInfo.cpp index b228881..371131e 100644 --- a/examples/TaoQuickShow/Src/AppInfo.cpp +++ b/examples/TaoQuickShow/Src/AppInfo.cpp @@ -18,10 +18,7 @@ void AppInfo::beforeUiReady(QQmlContext *ctx) ctx->setContextProperty("appInfo", this); } -void AppInfo::afterUiReady() -{ - -} +void AppInfo::afterUiReady() {} void AppInfo::setAppName(const QString &appName) { diff --git a/examples/TaoQuickShow/Src/AppInfo.h b/examples/TaoQuickShow/Src/AppInfo.h index a9d8322..49a3c66 100644 --- a/examples/TaoQuickShow/Src/AppInfo.h +++ b/examples/TaoQuickShow/Src/AppInfo.h @@ -8,112 +8,86 @@ class AppInfo : public QObject Q_OBJECT Q_PROPERTY(QString appName READ appName WRITE setAppName NOTIFY appNameChanged) Q_PROPERTY(QString appVersion READ appVersion WRITE setAppVersion NOTIFY appVersionChanged) - Q_PROPERTY(QString latestVersion READ latestVersion WRITE setLatestVersion NOTIFY latestVersionChanged) - Q_PROPERTY(QString buildDateTime READ buildDateTime WRITE setBuildDateTime NOTIFY buildDateTimeChanged) - Q_PROPERTY(QString buildRevision READ buildRevision WRITE setBuildRevision NOTIFY buildRevisionChanged) + Q_PROPERTY(QString latestVersion READ latestVersion WRITE setLatestVersion NOTIFY + latestVersionChanged) + Q_PROPERTY(QString buildDateTime READ buildDateTime WRITE setBuildDateTime NOTIFY + buildDateTimeChanged) + Q_PROPERTY(QString buildRevision READ buildRevision WRITE setBuildRevision NOTIFY + buildRevisionChanged) Q_PROPERTY(QString copyRight READ copyRight WRITE setCopyRight NOTIFY copyRightChanged) Q_PROPERTY(QString descript READ descript WRITE setDescript NOTIFY descriptChanged) - Q_PROPERTY(QString compilerVendor READ compilerVendor WRITE setCompilerVendor NOTIFY compilerVendorChanged) + Q_PROPERTY(QString compilerVendor READ compilerVendor WRITE setCompilerVendor NOTIFY + compilerVendorChanged) Q_PROPERTY(bool splashShow READ splashShow WRITE setSplashShow NOTIFY splashShowChanged) public: explicit AppInfo(QObject *parent = nullptr); public: - void beforeUiReady(QQmlContext* ctx) ; + void beforeUiReady(QQmlContext *ctx); - void afterUiReady() ; + void afterUiReady(); - const QString & appName() const - { - return m_appName; - } + const QString &appName() const { return m_appName; } - const QString & appVersion() const - { - return m_appVersion; - } + const QString &appVersion() const { return m_appVersion; } - const QString & latestVersion() const - { - return m_latestVersion; - } + const QString &latestVersion() const { return m_latestVersion; } - const QString & buildDateTime() const - { - return m_buildDateTime; - } + const QString &buildDateTime() const { return m_buildDateTime; } - const QString & buildRevision() const - { - return m_buildRevision; - } + const QString &buildRevision() const { return m_buildRevision; } - const QString & copyRight() const - { - return m_copyRight; - } + const QString ©Right() const { return m_copyRight; } - const QString & descript() const - { - return m_descript; - } + const QString &descript() const { return m_descript; } - const QString & compilerVendor() const - { - return m_compilerVendor; - } + const QString &compilerVendor() const { return m_compilerVendor; } - bool splashShow() const - { - return m_splashShow; - } + bool splashShow() const { return m_splashShow; } public slots: - void setAppName(const QString & appName); + void setAppName(const QString &appName); - void setAppVersion(const QString & appVersion); + void setAppVersion(const QString &appVersion); - void setLatestVersion(const QString & latestVersion); + void setLatestVersion(const QString &latestVersion); - void setBuildDateTime(const QString & buildDateTime); + void setBuildDateTime(const QString &buildDateTime); - void setBuildRevision(const QString & buildRevision); + void setBuildRevision(const QString &buildRevision); - void setCopyRight(const QString & copyRight); + void setCopyRight(const QString ©Right); - void setDescript(const QString & descript); + void setDescript(const QString &descript); - void setCompilerVendor(const QString & compilerVendor); + void setCompilerVendor(const QString &compilerVendor); void setSplashShow(bool splashShow); signals: + void appNameChanged(const QString &appName); - void appNameChanged(const QString & appName); + void appVersionChanged(const QString &appVersion); - void appVersionChanged(const QString & appVersion); + void latestVersionChanged(const QString &latestVersion); - void latestVersionChanged(const QString & latestVersion); + void buildDateTimeChanged(const QString &buildDateTime); - void buildDateTimeChanged(const QString & buildDateTime); + void buildRevisionChanged(const QString &buildRevision); - void buildRevisionChanged(const QString & buildRevision); + void copyRightChanged(const QString ©Right); - void copyRightChanged(const QString & copyRight); + void descriptChanged(const QString &descript); - void descriptChanged(const QString & descript); - - void compilerVendorChanged(const QString & compilerVendor); + void compilerVendorChanged(const QString &compilerVendor); void splashShowChanged(bool splashShow); protected: - private: - QString m_appName; QString m_appVersion; QString m_latestVersion; @@ -124,4 +98,3 @@ private: QString m_compilerVendor; bool m_splashShow; }; - diff --git a/examples/TaoQuickShow/Src/stdafx.h b/examples/TaoQuickShow/Src/stdafx.h index 9d326f8..9e7b118 100644 --- a/examples/TaoQuickShow/Src/stdafx.h +++ b/examples/TaoQuickShow/Src/stdafx.h @@ -1,32 +1,30 @@ #pragma once /* Add C includes here */ - /* Add C++ includes here */ #if defined __cplusplus -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include #endif -