Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera committed Feb 13, 2025
1 parent 0277a90 commit c656789
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ else ()
endif ()

if (USE_KEYCHAIN)
set(MM_CORE_SRCS ${MM_CORE_SRCS} credentialstorekeychain.cpp)
message(STATUS "Using QtKeychain to store credentials.")
else()
set(MM_CORE_SRCS ${MM_CORE_SRCS} credentialstoreplaintext.cpp)
message(STATUS "Using QSettings to store credentials.")
endif()
set(MM_CORE_SRCS ${MM_CORE_SRCS} credentialstorekeychain.cpp)
message(STATUS "Using QtKeychain to store credentials.")
else ()
set(MM_CORE_SRCS ${MM_CORE_SRCS} credentialstoreplaintext.cpp)
message(STATUS "Using QSettings to store credentials.")
endif ()

add_library(mm_core OBJECT ${MM_CORE_SRCS} ${MM_CORE_HDRS})
target_include_directories(mm_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
14 changes: 8 additions & 6 deletions core/credentialstorekeychain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ void CredentialStore::readKeyRecursively( const QString &key )

mReadResults[ key ] = mReadJob->textData();

if ( key == KEYCHAIN_ENTRY_CREDENTIALS ) {
if ( key == KEYCHAIN_ENTRY_CREDENTIALS )
{
readKeyRecursively( KEYCHAIN_ENTRY_TOKEN ); // Read the second entry
}
else if ( key == KEYCHAIN_ENTRY_TOKEN ) {
else if ( key == KEYCHAIN_ENTRY_TOKEN )
{
finishReadingOperation(); // We have all the data now, let's wrap it up and return back
}

Expand All @@ -142,7 +144,7 @@ void CredentialStore::finishReadingOperation()
{
CoreUtils::log( QStringLiteral( "Auth" ),
QString( "Something ugly happened when reading, invalid size of the intermediary results, size:" ).arg( mReadResults.size() )
);
);
emit authDataRead( username, password, userid, token, tokenExpiration );
return;
}
Expand All @@ -153,9 +155,9 @@ void CredentialStore::finishReadingOperation()
if ( credentialsJsonString.isEmpty() || tokenJsonString.isEmpty() )
{
CoreUtils::log(
QStringLiteral( "Auth" ),
QString( "Something ugly happened when reading, one of the read jsons is empty (%1, %2)" ).arg( credentialsJsonString.length(), tokenJsonString.length() )
);
QStringLiteral( "Auth" ),
QString( "Something ugly happened when reading, one of the read jsons is empty (%1, %2)" ).arg( credentialsJsonString.length(), tokenJsonString.length() )
);
emit authDataRead( username, password, userid, token, tokenExpiration );
return;
}
Expand Down

1 comment on commit c656789

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 25.2.704111 just submitted!

Please sign in to comment.