Move lyrics providers to own thread
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QObject>
|
||||
#include <QApplication>
|
||||
#include <QThread>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QRegularExpression>
|
||||
@@ -45,6 +46,8 @@ QUrl SongLyricsComLyricsProvider::Url(const LyricsSearchRequest &request) {
|
||||
|
||||
QString SongLyricsComLyricsProvider::StringFixup(QString text) {
|
||||
|
||||
Q_ASSERT(QThread::currentThread() != qApp->thread());
|
||||
|
||||
static const QRegularExpression regex_illegal_characters(QStringLiteral("[^\\w0-9\\- ]"));
|
||||
static const QRegularExpression regex_multiple_whitespaces(QStringLiteral(" {2,}"));
|
||||
static const QRegularExpression regex_multiple_dashes(QStringLiteral("(-)\\1+"));
|
||||
|
||||
Reference in New Issue
Block a user