]> git.sur5r.net Git - minitube/commitdiff
Minor performance fixes
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 13 Oct 2014 14:15:56 +0000 (16:15 +0200)
committerFlavio <flavio.tordini@gmail.com>
Mon, 13 Oct 2014 14:15:56 +0000 (16:15 +0200)
src/database.cpp
src/video.cpp

index 5d8a482d93a30c82ba8eb891c2a58ed814042b9c..3e7c537d5970aadeb2c1f607fa804fee03d4926b 100644 (file)
@@ -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))
index 8f61dd042eecadbdd6ffa37ce7a58f5879a504e1..64cbf6dcfd174dbd49774f79ddd1dbd360202382 100644 (file)
@@ -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);