Skip to content

Commit

Permalink
Updated Qx, fixed logger bug, code polish
Browse files Browse the repository at this point in the history
- Updated Qx to latest

- Changed all instances of JSON to proper cammelcase where appropriate,
to match the changes of Xml and the like in OFILb

- More clearly and independently marked the error level of errors in the
log file

- Corrected an oversight where the error level of Qx::GenericError
isntances were not set by CLIFp after being generated via
checkedKeyRetrieval from Qx and therefore appeared as UNDEF_LVL
  • Loading branch information
oblivioncth committed May 11, 2021
1 parent 6c4335d commit 0690cee
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 109 deletions.
24 changes: 12 additions & 12 deletions CLIFp.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

contains(QT_ARCH, i386) {
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQx_static32_0-0-2-14_Qt_5-15-0
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQx_static32_0-0-2-14_Qt_5-15-0d
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQx_static32_0-0-2-16_Qt_5-15-0
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQx_static32_0-0-2-16_Qt_5-15-0d
} else {
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQx_static64_0-0-2-14_Qt_5-15-0
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQx_static64_0-0-2-14_Qt_5-15-0d
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQx_static64_0-0-2-16_Qt_5-15-0
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQx_static64_0-0-2-16_Qt_5-15-0d
}

INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include

contains(QT_ARCH, i386) {
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static32_0-0-2-14_Qt_5-15-0.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static32_0-0-2-14_Qt_5-15-0d.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static32_0-0-2-14_Qt_5-15-0.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static32_0-0-2-14_Qt_5-15-0d.lib
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static32_0-0-2-16_Qt_5-15-0.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static32_0-0-2-16_Qt_5-15-0d.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static32_0-0-2-16_Qt_5-15-0.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static32_0-0-2-16_Qt_5-15-0d.lib
} else {
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static64_0-0-2-14_Qt_5-15-0.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static64_0-0-2-14_Qt_5-15-0d.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static64_0-0-2-14_Qt_5-15-0.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static64_0-0-2-14_Qt_5-15-0d.lib
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static64_0-0-2-16_Qt_5-15-0.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/libQx_static64_0-0-2-16_Qt_5-15-0d.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static64_0-0-2-16_Qt_5-15-0.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/Qx_static64_0-0-2-16_Qt_5-15-0d.lib
}
2 changes: 1 addition & 1 deletion include/qx.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class GenericError
QString secondaryInfo();
QString detailedInfo();

void setErrorLevel(ErrorLevel errorLevel);
Qx::GenericError& setErrorLevel(ErrorLevel errorLevel);

int exec(QMessageBox::StandardButtons choices);
};
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib/Qx_static64_0-0-2-14_Qt_5-15-0.lib
Binary file not shown.
Binary file removed lib/Qx_static64_0-0-2-14_Qt_5-15-0d.lib
Binary file not shown.
Binary file removed lib/Qx_static64_0-0-2-14_Qt_5-15-0d.pdb
Binary file not shown.
Binary file added lib/Qx_static64_0-0-2-16_Qt_5-15-0.lib
Binary file not shown.
Binary file added lib/Qx_static64_0-0-2-16_Qt_5-15-0d.lib
Binary file not shown.
Binary file added lib/Qx_static64_0-0-2-16_Qt_5-15-0d.pdb
Binary file not shown.
154 changes: 77 additions & 77 deletions src/flashpoint-install.cpp

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions src/flashpoint-install.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,22 @@ class Install
static inline const QStringList COLUMN_LIST = {COL_ID, COL_PLAYLIST_ID, COL_ORDER, COL_GAME_ID};
};

class JSONObject_Config
class JsonObject_Config
{
public:
static inline const QString KEY_FLASHPOINT_PATH = "flashpointPath"; // Reading this value is current redundant and unused, but this may change in the future
static inline const QString KEY_START_SERVER = "startServer";
static inline const QString KEY_SERVER = "server";
};

class JSONObject_Preferences
class JsonObject_Preferences
{
public:
static inline const QString KEY_IMAGE_FOLDER_PATH = "imageFolderPath";
static inline const QString KEY_JSON_FOLDER_PATH = "jsonFolderPath";
};

class JSONObject_Server
class JsonObject_Server
{
public:
static inline const QString KEY_NAME = "name";
Expand All @@ -197,15 +197,15 @@ class Install
static inline const QString KEY_KILL = "kill";
};

class JSONObject_StartStop
class JsonObject_StartStop
{
public:
static inline const QString KEY_PATH = "path";
static inline const QString KEY_FILENAME = "filename";
static inline const QString KEY_ARGUMENTS = "arguments";
};

class JSONObject_Daemon
class JsonObject_Daemon
{
public:
static inline const QString KEY_NAME = "name";
Expand All @@ -215,7 +215,7 @@ class Install
static inline const QString KEY_KILL = "kill";
};

class JSONObject_Services
class JsonObject_Services
{
public:
static inline const QString KEY_WATCH = "watch";
Expand All @@ -225,7 +225,7 @@ class Install
static inline const QString KEY_STOP = "stop";
};

class JSONConfigReader
class JsonConfigReader
{
//-Class variables-----------------------------------------------------------------------------------------------------
public:
Expand All @@ -235,11 +235,11 @@ class Install
//-Instance Variables--------------------------------------------------------------------------------------------------
private:
Config* mTargetConfig;
std::shared_ptr<QFile> mTargetJSONFile;
std::shared_ptr<QFile> mTargetJsonFile;

//-Constructor--------------------------------------------------------------------------------------------------------
public:
JSONConfigReader(Config* targetServices, std::shared_ptr<QFile> targetJSONFile);
JsonConfigReader(Config* targetServices, std::shared_ptr<QFile> targetJsonFile);

//-Instance Functions-------------------------------------------------------------------------------------------------
private:
Expand All @@ -248,7 +248,7 @@ class Install
Qx::GenericError readInto();
};

class JSONPreferencesReader
class JsonPreferencesReader
{
//-Class variables-----------------------------------------------------------------------------------------------------
public:
Expand All @@ -258,11 +258,11 @@ class Install
//-Instance Variables--------------------------------------------------------------------------------------------------
private:
Preferences* mTargetPreferences;
std::shared_ptr<QFile> mTargetJSONFile;
std::shared_ptr<QFile> mTargetJsonFile;

//-Constructor--------------------------------------------------------------------------------------------------------
public:
JSONPreferencesReader(Preferences* targetServices, std::shared_ptr<QFile> targetJSONFile);
JsonPreferencesReader(Preferences* targetServices, std::shared_ptr<QFile> targetJsonFile);

//-Instance Functions-------------------------------------------------------------------------------------------------
private:
Expand All @@ -271,7 +271,7 @@ class Install
Qx::GenericError readInto();
};

class JSONServicesReader
class JsonServicesReader
{
//-Class variables-----------------------------------------------------------------------------------------------------
public:
Expand All @@ -283,11 +283,11 @@ class Install
private:
QString mHostInstallPath;
Services* mTargetServices;
std::shared_ptr<QFile> mTargetJSONFile;
std::shared_ptr<QFile> mTargetJsonFile;

//-Constructor--------------------------------------------------------------------------------------------------------
public:
JSONServicesReader(const QString hostInstallPath, Services* targetServices, std::shared_ptr<QFile> targetJSONFile);
JsonServicesReader(const QString hostInstallPath, Services* targetServices, std::shared_ptr<QFile> targetJsonFile);

//-Instance Functions-------------------------------------------------------------------------------------------------
private:
Expand Down Expand Up @@ -365,9 +365,9 @@ class Install
std::unique_ptr<QFile> mMainEXEFile;
std::unique_ptr<QFile> mCLIFpEXEFile;
std::unique_ptr<QFile> mDatabaseFile;
std::shared_ptr<QFile> mConfigJSONFile;
std::shared_ptr<QFile> mPreferencesJSONFile;
std::shared_ptr<QFile> mServicesJSONFile;
std::shared_ptr<QFile> mConfigJsonFile;
std::shared_ptr<QFile> mPreferencesJsonFile;
std::shared_ptr<QFile> mServicesJsonFile;
std::unique_ptr<QFile> mVersionTXTFile;

// Database information
Expand Down
2 changes: 1 addition & 1 deletion src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Logger::Logger(QString filePath, QString rawCL, QString interpCL, QString header
//Public:
void Logger::appendErrorEvent(Qx::GenericError error)
{
QString errorString = ERROR_LEVEL_STR_MAP.value(error.errorLevel()) + ": " + error.primaryInfo();
QString errorString = "[" + ERROR_LEVEL_STR_MAP.value(error.errorLevel()) + "] " + error.primaryInfo();
if(!error.secondaryInfo().isNull())
errorString + " " + error.secondaryInfo();
if(!error.detailedInfo().isNull())
Expand Down

0 comments on commit 0690cee

Please sign in to comment.