Skip to content
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

[Umbrella task] General small code improvements #161

Open
aaronhktan opened this issue Mar 7, 2024 · 0 comments
Open

[Umbrella task] General small code improvements #161

aaronhktan opened this issue Mar 7, 2024 · 0 comments
Assignees
Labels
maintenance Code quality, maintainability, tech debt

Comments

@aaronhktan
Copy link
Owner

Small code improvements, such as avoiding a copy here or there, etc.

@aaronhktan aaronhktan added the source Add/modify a source of data for the dictionary label Mar 7, 2024
@aaronhktan aaronhktan self-assigned this Mar 7, 2024
aaronhktan added a commit that referenced this issue Mar 8, 2024
# Description

- Using QString::fromStdString() should be a little bit more efficient
when converting from an std::string to a QString. (See
[here](https://stackoverflow.com/questions/4338067/convert-stdstring-to-qstring).)
- Also replaces an instance of const std::string & with
std::string_view.

Part of improvements as part of #161.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Tested on macOS.

# Checklist:

- [x] My code follows the style guidelines of this project (`black` for
Python
  code, `.clang-format` in the `src/jyut-dict` directory for C++)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have translated my user-facing strings to all
currently-supported languages
- [x] I have made corresponding changes to the documentation
@aaronhktan aaronhktan added maintenance Code quality, maintainability, tech debt and removed source Add/modify a source of data for the dictionary labels Mar 8, 2024
aaronhktan added a commit that referenced this issue Mar 15, 2024
# Description

- The map name_to_short_name was declared static in a header file
before. This meant that every translation unit would have its own copy
of the vector. Not sure why it ever worked before, since the vector was
only populated in main.cpp...
- Also added synchronization primitives for the unordered_map.

Part of commits for #161.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Built and run on all three platforms. All unit tests passed.

# Checklist:

- [x] My code follows the style guidelines of this project (`black` for
Python
  code, `.clang-format` in the `src/jyut-dict` directory for C++)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have translated my user-facing strings to all
currently-supported languages
- [x] I have made corresponding changes to the documentation
aaronhktan added a commit that referenced this issue Mar 30, 2024
# Description

One of the dependencies for the Craft build on Windows/Mac was
incorrectly specified (should be `libs/qt/qtmultimedia` instead of
`libs/qt/multimedia`).

## Type of change

- [x] This change requires a documentation update

# How Has This Been Tested?
N/A

# Checklist:

- [x] I have made corresponding changes to the documentation
aaronhktan added a commit that referenced this issue Apr 17, 2024
# Description

Got somebody to review some of the Canto translations and they suggested
changes. Also removed some simplified characters that somehow got into
the traditional Cantonese translation, and updated the README for
creating translation files.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Tested on macOS 14.3.1 with Qt 5.15.12.

# Checklist:

- [x] My code follows the style guidelines of this project (`black` for
Python
  code, `.clang-format` in the `src/jyut-dict` directory for C++)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have translated my user-facing strings to all
currently-supported languages
- [x] I have made corresponding changes to the documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Code quality, maintainability, tech debt
Projects
Status: In Progress
Development

No branches or pull requests

1 participant