mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 15:28:03 -05:00
Ensure profile name length limit will work everywhere
(cherry picked from commit 93c5f6e6b2)
This commit is contained in:
@@ -333,6 +333,12 @@ bool EditProfileDialog::isProfileNameValid()
|
||||
|
||||
nameLenMax -= QStringLiteral(".profile").size();
|
||||
|
||||
// doesn't work on macOS and maybe other systems so make sure we have a sane value always
|
||||
// See https://mail.kde.org/pipermail/kwrite-devel/2024-April/007139.html
|
||||
if (nameLenMax < 0) {
|
||||
nameLenMax = 100;
|
||||
}
|
||||
|
||||
if (_tempProfile->name().size() > nameLenMax) {
|
||||
setMessageGeneralPage(i18nc("@info", "Profile name exceeded maximum allowed length (%1).", nameLenMax));
|
||||
// Revert the name in the dialog
|
||||
|
||||
Reference in New Issue
Block a user