-
Notifications
You must be signed in to change notification settings - Fork 14
Fix for UE4.25.1 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| #include "CISQLite3PrivatePCH.h" | ||
| #include "Engine.h" | ||
| #include "CString.h" | ||
|
|
||
| #include "SQLiteBlueprintFunctionLibrary.h" | ||
| #include "CISQLite3PrivatePCH.h" | ||
| #include "Engine.h" | ||
| #include "Misc/CString.h" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the PCH needs the BlueprintFunctionLibrary or why is this? 🤔
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea, I'm a complete noob in UE4 and C++ 😆
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, found it. |
||
|
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #include "CISQLite3PrivatePCH.h" | ||
| #include "SQLiteDatabase.h" | ||
| #include "CISQLite3PrivatePCH.h" | ||
|
|
||
| #define LOGSQLITE(verbosity, text) UE_LOG(LogDatabase, verbosity, TEXT("SQLite: %s"), text) | ||
|
|
||
|
|
@@ -17,7 +17,7 @@ USQLiteDatabase::USQLiteDatabase(const FObjectInitializer& ObjectInitializer) | |
|
|
||
| bool USQLiteDatabase::CreateDatabase(const FString& Filename, bool RelativeToProjectContentDirectory) | ||
| { | ||
| const FString actualFilename = RelativeToProjectContentDirectory ? FPaths::ProjectContentDir() + Filename : Filename; | ||
| const FString actualFilename = RelativeToProjectContentDirectory ? FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir()) + Filename : Filename; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember fighting path issues on Android, but I don't think this should be a problem.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't tested on anything else but Windows, sorry. I'm not sure why I did this either, but IIRC a relative path didn't work correctly. I'm sorry for the incredibly low quality of the MR - I just managed to make it work on my machine and decided to share ;p Thanks for your time!
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries, sharing is always valuable, maybe someone using this on Android will pick it up and verify 👍 |
||
|
|
||
| sqlite3* db; | ||
| int res = sqlite3_open(TCHAR_TO_ANSI(*actualFilename), &db); | ||
|
|
@@ -273,12 +273,12 @@ bool USQLiteDatabase::GetDataIntoObjectBP(const FSQLiteDatabaseReference& DataSo | |
|
|
||
| //-------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| TMap<FString, UProperty*> USQLiteDatabase::CollectProperties(UObject* SourceObject) | ||
| TMap<FString, FProperty*> USQLiteDatabase::CollectProperties(UObject* SourceObject) | ||
| { | ||
|
|
||
| UClass* SourceObjectClass = SourceObject->GetClass(); | ||
| TMap<FString, UProperty*> Props; | ||
| for (TFieldIterator<UProperty> PropIt(SourceObjectClass, EFieldIteratorFlags::SuperClassFlags::IncludeSuper); | ||
| TMap<FString, FProperty*> Props; | ||
| for (TFieldIterator<FProperty> PropIt(SourceObjectClass, EFieldIteratorFlags::SuperClassFlags::IncludeSuper); | ||
| PropIt; ++PropIt) | ||
| { | ||
| Props.Add(*PropIt->GetNameCPP(), *PropIt); | ||
|
|
@@ -797,7 +797,7 @@ void USQLiteDatabase::AssignResultsToObjectProperties(const SQLiteResultValue& R | |
| { | ||
| if (propertyMap.Contains(field.Name)) | ||
| { | ||
| UProperty* targetProperty = propertyMap[field.Name]; | ||
| FProperty* targetProperty = propertyMap[field.Name]; | ||
|
|
||
| if (field.Type == SQLiteResultValueTypes::Integer) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this indentation happened, this change seems to be whitespace only?