Bug 446673

Summary: Channel Settings, Modes tab "User Limit" QSpinBox uses default max=99, messing up any higher setting by /cmode +l NNN
Product: [Applications] konversation Reporter: reisenweber
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.7.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 1.8.21121
Attachments: screenshot dialog "channel settings modes"

Description reisenweber 2021-12-08 10:36:21 UTC
Created attachment 144343 [details]
screenshot dialog "channel settings modes"

SUMMARY
the QSpinBox for "User Limit" in "Channel Settings", tab "Modes"  has a maximum value of 99, which also gets enforced on channels with a pre-existing limt >99 e.g. by 
/mode #ccc +l 222, as soon as you store e.g. a new topic from same "Channel Settings"

STEPS TO REPRODUCE
1. `/mode #ccc +l 222`
2. edit topic in "Channel Settings", click "OK"


OBSERVED RESULT
[7 Dec 2021 14:54:21] *** You set the channel topic to "time.is/Unix_time_now | https://events.ccc.de/2021/11/17/rc3-2021-eventphone/".
[7 Dec 2021 14:54:23] *** You set the channel limit to 99 nicks.

EXPECTED RESULT
**NO** [7 Dec 2021 14:54:23] *** You set the channel limit to 99 nicks.

SOFTWARE/OS VERSIONS
Konversation Version 1.7.4
Linux/KDE Plasma: 
KDE Frameworks 5.45.0
Qt 5.9.4 (built against 5.9.4)
The xcb windowing system

ADDITIONAL INFORMATION
https://doc.qt.io/qt-5.15/qspinbox.html#maximum-prop
>>The default maximum value is 99.<<
[7 Dec 2021 17:11:14] <argonel> that's two bugs
Comment 1 Bug Janitor Service 2021-12-18 22:58:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/konversation/-/merge_requests/68
Comment 2 Friedrich W. H. Kossebau 2021-12-22 00:31:28 UTC
Git commit 074f80e2dcefdc6cd0b68714021481ee35b7df30 by Friedrich W. H. Kossebau.
Committed on 18/12/2021 at 23:27.
Pushed by kossebau into branch 'release/21.12'.

Channel Settings UI: bump max value of "User limit" to 99999

Max value was the default 99, which would result in...
a) any higher value read from the channel mode being reset to 99
b) not allow users to set higher values if wanted.

As applying the channel settings from the dialog always picks all the
values of the dialog, also those not edited, in case of a) this also
would mean changing the user limit in the channel to 99 then.

RFCs are not known to define a max user limit, so this is server defined.
While there is no path explored to query any max user limit capabilities,
and servers implementations seems to just map too high numbers to random
possible ones, there is no well defined max value to be used for the
dialog.

Using 99999 as arbitrary value should serve for now all expected use-cases.
To be raised later if there is respective feedback.

FIXED-IN: 1.8.21121

M  +3    -0    src/viewer/channeloptionsui.ui

https://invent.kde.org/network/konversation/commit/074f80e2dcefdc6cd0b68714021481ee35b7df30