-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(registry,ui,util): order docsets case-insensitively (fixes #244)
- Loading branch information
Showing
6 changed files
with
106 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
set(CMAKE_AUTOMOC OFF) | ||
|
||
add_library(Util | ||
caseinsensitivemap.h | ||
plist.cpp | ||
sqlitedatabase.cpp | ||
version.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2018 Oleg Shparber | ||
** Contact: https://go.zealdocs.org/l/contact | ||
** | ||
** This file is part of Zeal. | ||
** | ||
** Zeal is free software: you can redistribute it and/or modify | ||
** it under the terms of the GNU General Public License as published by | ||
** the Free Software Foundation, either version 3 of the License, or | ||
** (at your option) any later version. | ||
** | ||
** Zeal is distributed in the hope that it will be useful, | ||
** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
** GNU General Public License for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with Zeal. If not, see <https://www.gnu.org/licenses/>. | ||
** | ||
****************************************************************************/ | ||
|
||
#ifndef ZEAL_UTIL_CASEINSENSITIVEMAP_H | ||
#define ZEAL_UTIL_CASEINSENSITIVEMAP_H | ||
|
||
#include <QString> | ||
|
||
#include <map> | ||
|
||
namespace Zeal { | ||
namespace Util { | ||
|
||
struct CaseInsensitiveStringComparator { | ||
bool operator()(const QString &lhs, const QString &rhs) const { | ||
return QString::compare(lhs, rhs, Qt::CaseInsensitive) < 0; | ||
} | ||
}; | ||
|
||
template <typename T> | ||
using CaseInsensitiveMap = std::map<QString, T, CaseInsensitiveStringComparator>; | ||
|
||
} // namespace Util | ||
} // namespace Zeal | ||
|
||
#endif // ZEAL_UTIL_CASEINSENSITIVEMAP_H |