diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index 897bdc82..dee261df 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -139 +140 diff --git a/src/base/LemonApplicationInterface.hpp b/src/base/LemonApplicationInterface.hpp index a4754782..1552f537 100644 --- a/src/base/LemonApplicationInterface.hpp +++ b/src/base/LemonApplicationInterface.hpp @@ -7,9 +7,9 @@ #pragma once // -#include #include #include +#include namespace Lemon { struct LemonStartupArguments { diff --git a/src/base/LemonBaseApplication.cpp b/src/base/LemonBaseApplication.cpp index b4b9014f..509a233a 100644 --- a/src/base/LemonBaseApplication.cpp +++ b/src/base/LemonBaseApplication.cpp @@ -88,9 +88,8 @@ auto LemonBaseApplication::parseCommandLine(bool *canContinue, QString *errorMes return true; } - #define ProcessExtraStartupOptions(option) \ - DEBUG("Startup Options:" GEN_PAIR(parser.isSet(option##Option))); \ + DEBUG("Startup Options:" GEN_PAIR(parser.isSet(option##Option))); \ StartupArguments.option = parser.isSet(option##Option); ProcessExtraStartupOptions(debugLog); diff --git a/src/base/LemonBaseApplication.hpp b/src/base/LemonBaseApplication.hpp index 2cd83d2b..a4ba8e51 100644 --- a/src/base/LemonBaseApplication.hpp +++ b/src/base/LemonBaseApplication.hpp @@ -12,18 +12,18 @@ #include "base/LemonApplicationInterface.hpp" namespace Lemon { -class LemonBaseApplication : public SingleApplication, public LemonApplicationInterface { - Q_OBJECT + class LemonBaseApplication : public SingleApplication, public LemonApplicationInterface { + Q_OBJECT - public: - LemonBaseApplication(int &argc, char *argv[]) - : SingleApplication(argc, argv, true, User | ExcludeAppPath | ExcludeAppVersion), LemonApplicationInterface(){}; - virtual ~LemonBaseApplication(){}; + public: + LemonBaseApplication(int &argc, char *argv[]) + : SingleApplication(argc, argv, true, User | ExcludeAppPath | ExcludeAppVersion), + LemonApplicationInterface(){}; + virtual ~LemonBaseApplication(){}; - virtual bool Initialize() final; + virtual bool Initialize() final; - private: - bool parseCommandLine(bool *canContinue, QString *errorMessage); -}; + private: + bool parseCommandLine(bool *canContinue, QString *errorMessage); + }; } // namespace Lemon - diff --git a/src/base/LemonConfig.hpp b/src/base/LemonConfig.hpp index 142fcbff..6434b7fd 100644 --- a/src/base/LemonConfig.hpp +++ b/src/base/LemonConfig.hpp @@ -26,6 +26,7 @@ namespace Lemon::base::config { int specialJudgeTimeLimit{}; int fileSizeLimit{}; int rejudgeTimes{}; + double defaultExtraTimeRatio{}; QString defaultInputFileExtension; QString defaultOutputFileExtension; QStringList inputFileExtensions; @@ -42,7 +43,9 @@ namespace Lemon::base::config { private: QString language = "en_US"; // Prepare for theme setting - // QString theme = ; + // TODO: Theme support + QString theme = ""; + public: int read(const QJsonObject &json); void write(QJsonObject &json) const; diff --git a/src/base/LemonLog.hpp b/src/base/LemonLog.hpp index 83211524..739c6e25 100644 --- a/src/base/LemonLog.hpp +++ b/src/base/LemonLog.hpp @@ -12,8 +12,8 @@ #include #include // -#include #include +#include #define NEWLINE "\r\n" #define ___LOG_EXPAND(___x) , QPair(std::string(#___x), [&] { return ___x; }()) @@ -56,7 +56,8 @@ namespace Lemon::base { logStream << NEWLINE; #ifndef QT_DEBUG // We only process DEBUG log in Release mode - if (t == LEMON_LOG_DEBUG && LemonCoreApplication && !LemonCoreApplication->StartupArguments.debugLog) { + if (t == LEMON_LOG_DEBUG && LemonCoreApplication && + ! LemonCoreApplication->StartupArguments.debugLog) { // Discard debug log in non-debug Lemon version with // no-debugLog mode. return; diff --git a/src/base/LemonMacro.hpp b/src/base/LemonMacro.hpp index 860ee43e..a27b54ec 100644 --- a/src/base/LemonMacro.hpp +++ b/src/base/LemonMacro.hpp @@ -5,7 +5,6 @@ * */ - #pragma once #define CONCATENATE1(arg1, arg2) CONCATENATE2(arg1, arg2)