Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
CoelacanthusHex committed May 28, 2021
1 parent b7b8385 commit 1a589ca
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion makespec/BUILDVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
141
142
2 changes: 1 addition & 1 deletion src/base/LemonApplicationInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#pragma once
//
#include <QString>
#include <QList>
#include <QObject>
#include <QString>

namespace Lemon {
struct LemonStartupArguments {
Expand Down
3 changes: 1 addition & 2 deletions src/base/LemonBaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
22 changes: 11 additions & 11 deletions src/base/LemonBaseApplication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

7 changes: 4 additions & 3 deletions src/base/LemonLog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#pragma once

#include <QString>
#include <QPair>
#include <QString>
#include <QTextStream>
#include <iostream>
//
#include <base/LemonMacro.hpp>
#include <base/LemonBaseApplication.hpp>
#include <base/LemonMacro.hpp>

#define NEWLINE "\r\n"
#define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
Expand Down Expand Up @@ -57,7 +57,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;
Expand Down
1 change: 0 additions & 1 deletion src/base/LemonMacro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
*/


#pragma once

#define CONCATENATE1(arg1, arg2) CONCATENATE2(arg1, arg2)
Expand Down

0 comments on commit 1a589ca

Please sign in to comment.