Skip to content

Commit

Permalink
fixed regexp class name in qt5
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Jul 18, 2024
1 parent 9570082 commit 216b394
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/huggle_core/definitions_prod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace std { typedef decltype(nullptr) nullptr_t; }
#define HREGEX_TYPE QRegularExpression
#else
#define HMUTEX_TYPE QMutex
#define HREGEX_TYPE QRegEx
#define HREGEX_TYPE QRegExp
#endif

#if QT_VERSION >= 0x050000
Expand Down
4 changes: 2 additions & 2 deletions src/huggle_core/generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifdef QT6_BUILD
#include <QRegularExpression>
#else
#include <QRegEx>
#include <QRegExp>
#endif

using namespace Huggle;
Expand Down Expand Up @@ -223,7 +223,7 @@ bool Generic::RegexExactMatch(const QString& regex, const QString& input_text)
QRegularExpressionMatch match = re.match(input_text);
return match.hasMatch() && (match.captured(0) == input_text);
#else
QRegEx re(regex);
QRegExp re(regex);
return re.exactMatch(input_text);
#endif
}
6 changes: 4 additions & 2 deletions src/huggle_core/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ void Huggle::Resources::Uninit()
#ifndef HUGGLE_NOAUDIO
mediaPlayer->deleteLater();
mediaPlayer = nullptr;
audioOutput->deleteLater();
audioOutput = nullptr;
#ifdef QT6_BUILD
audioOutput->deleteLater();
audioOutput = nullptr;
#endif
#endif
}

Expand Down

0 comments on commit 216b394

Please sign in to comment.