From: Flavio Tordini Date: Mon, 13 Oct 2014 14:15:56 +0000 (+0200) Subject: Minor performance fixes X-Git-Tag: 2.3~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6abd607aab3e7b1cb12507e6b6c93e0e44d2fca;p=minitube Minor performance fixes --- diff --git a/src/database.cpp b/src/database.cpp index 5d8a482..3e7c537 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -180,7 +180,7 @@ void Database::drop() { while (query.next()) { QString tableName = query.value(0).toString(); - if (tableName.startsWith("sqlite_") || tableName == "attributes") continue; + if (tableName.startsWith("sqlite_") || tableName == QLatin1String("attributes")) continue; QString dropSQL = "delete from " + tableName; QSqlQuery query2(db); if (!query2.exec(dropSQL)) diff --git a/src/video.cpp b/src/video.cpp index 8f61dd0..64cbf6d 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -357,7 +357,7 @@ void Video::scrapeWebPage(QByteArray data) { #ifdef APP_DASH QSettings settings; QString definitionName = settings.value("definition", "360p").toString(); - if (definitionName == "1080p") { + if (definitionName == QLatin1String("1080p") { QRegExp dashManifestRe("\"dashmpd\":\\s*\"([^\"]+)\""); if (dashManifestRe.indexIn(html) != -1) { dashManifestUrl = dashManifestRe.cap(1);