-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
FIX(client): Modified Mainwindow.cpp to ensure channel URL respects c… #6793
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
base: master
Are you sure you want to change the base?
Conversation
Krzmbrzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to retain backwards compatibility and as a nice gimmick, I think it would be good if we do a case-sensitive search first and if that doesn't find the associated channel, do another case-insensitive search. However, the latter needs to be done to completion (process all channel names) and only if there is only a single match should that be taken. Otherwise, we can emit a warning about ambiguous channel names.
src/mumble/MainWindow.cpp
Outdated
| QString str = QString(); | ||
| while (chan && qlChans.count() > 0) { | ||
| QString elem = qlChans.takeFirst().toLower(); | ||
| QString elem = qlChans.takeFirst(); // Removed .toLower() to preserve case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to represent the old code in a comment. If someone wants to see what it looked before, they can use git for this purpose.
Agreed. |
…ase. Now implements secondary case-insensitive search. Implements mumble-voip#2585
|
Hello, I just implemented the suggested changes. Please let me know if you have any other feedback ? |
| } | ||
|
|
||
| // Helper method to find channel with either case-sensitive or case-insensitive search | ||
| bool MainWindow::findChannelWithSensitivity(Channel *&chan, QStringList &qlChans, QString &str, bool caseSensitive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delegating the job to a separate function is perfectly fine and appreciated, however I would change the name to something more specific such as:
findChannelWithCasing()
…ase.
Implements #2585
Checks