Skip to content

Conversation

stokito
Copy link
Contributor

@stokito stokito commented Aug 24, 2025

On user profile details there is Location tab with Country field.
I wanted to make it as a QComboBox to simplify typing but this component can't be used directly. So I added manual auto-completion.
It's not clear what should be in the Country field of vCard: country code or name. It looks like a user is free to write anything there, but as far I remember Miranda uses an English country name there. I think for now that should be ok. At least it didn't become worse.

There is some minor refactoring in the PR:
info.ui: arrange controls by rows - nothing changed, just moved together items by row=0 col=0.

Extracted a function to read a file content or lines in a single call.

@Ri0n
Copy link
Member

Ri0n commented Aug 24, 2025

yep rfc doesn't force anything real there

@Ri0n
Copy link
Member

Ri0n commented Aug 24, 2025

I think you should use QLocale to list countries

@stokito
Copy link
Contributor Author

stokito commented Sep 13, 2025

@Ri0n I figured out how to use the QLocale.Country so used it and removed the countries.tsv.
But there is a problem now that you can't get a country code with the QT5. But in the QT6 the countryToString() is deprecated and instead should be used QLocale::Territory enum instead of QLocale::Country and it has now the QLocale::territoryToCode(country).
I think that it's fine not to have the country code shown once migrating to QT6 it will be shown without any problems.

@Ri0n
Copy link
Member

Ri0n commented Sep 13, 2025

что за CAP ?

@stokito
Copy link
Contributor Author

stokito commented Sep 13, 2025

Префиксует в заголовок "Psi: " или "Psi+: ":

QString CAP(const QString &str) { return QString("%1: %2").arg(ApplicationInfo::name(), str); }

Я сделал как в других окнах.

Лично я бы убрал его и просто везде прямо в строки добавил "Psi: " чтобы не делать конкатенацию и упростить код. Но тогда в + будет "Psi: " что, как по мне, не проблема вообще. Может удалить этот макрос?

@Ri0n
Copy link
Member

Ri0n commented Sep 13, 2025

хе. совершенно не помню о существовании такой штуки =)
но видимо иногда помогает разливать окна на панели задач.

@stokito
Copy link
Contributor Author

stokito commented Sep 13, 2025

то да, всё таки лишний код, да и место подъедает. Иконки должно быть достаточно. Можно убрать совсем префиксы.
Есть окна где не используется CAP а есть где вот такое:
setWindowTitle(CAP(windowTitle()));

@Vitozz
Copy link
Contributor

Vitozz commented Sep 13, 2025

что за CAP ?

У меня такая же реакция была. Оказалось в common эта функция. И да возможно в некоторых случаях нужен
#include common.h при ее использовании.

@stokito
Copy link
Contributor Author

stokito commented Sep 26, 2025

Could you merge the PR?

@Neustradamus
Copy link
Contributor

@stokito, @Ri0n: About Psi or Psi+ in title dialog windows, there is a ticket with all details done by me the 10th May 2018 (already more 7 years old):

Time to check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants