diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-08-17 02:41:57 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-03 11:39:07 -0500 |
| commit | ee53312652af10fbddb5d1d16db6212bca2b9665 (patch) | |
| tree | 86db22dc6219f25c3266b70223a0dd55b0c328cb /src/modinfodialog.cpp | |
| parent | a9772873d69b875f5617c0121c73a271d432a29c (diff) | |
moved naturalCompare() to uibase
don't try to delete paths that don't exist
natsort for instance names and games
Diffstat (limited to 'src/modinfodialog.cpp')
| -rw-r--r-- | src/modinfodialog.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index c3239e0d..cc50d446 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -40,30 +40,6 @@ namespace fs = std::filesystem; const int max_scan_for_context_menu = 50; -int naturalCompare(const QString& a, const QString& b) -{ - static QCollator c = []{ - QCollator c; - c.setNumericMode(true); - c.setCaseSensitivity(Qt::CaseInsensitive); - return c; - }(); - - - // todo: remove this once the fix is released - // see https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-81673 - // and https://codereview.qt-project.org/c/qt/qtbase/+/287966/5/src/corelib/text/qcollator_win.cpp - if (!a.size()) { - return b.size() ? -1 : 0; - } - if (!b.size()) { - return +1; - } - - - return c.compare(a, b); -} - bool canPreviewFile( const PluginContainer& pluginContainer, bool isArchive, const QString& filename) |
