FIX(client): Modified Mainwindow.cpp to ensure channel URL respects c…#6793
FIX(client): Modified Mainwindow.cpp to ensure channel URL respects c…#6793vanarp123 wants to merge 2 commits intomumble-voip:masterfrom
Conversation
Krzmbrzl
left a comment
There was a problem hiding this comment.
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.
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.
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