diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2021-12-06 18:54:46 -0600 |
|---|---|---|
| committer | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2022-04-19 15:17:23 +0200 |
| commit | fb4cd4375c0a547129b454c376a32d752bc70422 (patch) | |
| tree | 7356323bee8287eb7a843e5d182592cfa9cbd0ce /src/downloadmanager.cpp | |
| parent | c4b2be45d29a247422e60bb8fdf1664c10384eee (diff) | |
Remove dependency on Core5Compat
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 73e6abde..10ebe3e7 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -37,7 +37,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QTimer> #include <QFileInfo> -#include <QRegExp> #include <QDirIterator> #include <QDesktopServices> #include <QInputDialog> @@ -1684,9 +1683,10 @@ void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVarian // this may muck up the file name comparison QString alternativeLocalName = info->m_FileName; - QRegExp expression("^\\d_(.*)$"); - if (expression.indexIn(alternativeLocalName) == 0) { - alternativeLocalName = expression.cap(1); + QRegularExpression expression("^\\d_(.*)$"); + auto match = expression.match(alternativeLocalName); + if (match.hasMatch()) { + alternativeLocalName = match.captured(1); } bool found = false; |
