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

Templatize localizeNumbers #4412

Merged
merged 1 commit into from
Feb 25, 2023
Merged

Templatize localizeNumbers #4412

merged 1 commit into from
Feb 25, 2023

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Feb 25, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

original idea by MM2PL

original idea by MM2PL
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -1,6 +1,7 @@
#pragma once

#include <QColor>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'QColor' file not found [clang-diagnostic-error]

#include <QColor>
         ^

template <typename T>
QString localizeNumbers(T number)
{
QLocale locale;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'locale' is not initialized [cppcoreguidelines-init-variables]

Suggested change
QLocale locale;
QLocale locale = 0;

@pajlada pajlada merged commit f9b2388 into master Feb 25, 2023
@pajlada pajlada deleted the chore/cleanup-localize-numbers branch February 25, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant