[Kdenlive-devel] [PATCH 24/46] encodingprofilesdialog.cpp: Use char for single character

Mikko Rapeli mikko.rapeli at iki.fi
Sat Jul 14 07:56:11 UTC 2012


Should be faster than using a full string. Found by krazy.
---
 src/encodingprofilesdialog.cpp |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/encodingprofilesdialog.cpp b/src/encodingprofilesdialog.cpp
index 6a88d16..59116f7 100644
--- a/src/encodingprofilesdialog.cpp
+++ b/src/encodingprofilesdialog.cpp
@@ -102,7 +102,7 @@ void EncodingProfilesDialog::slotShowParams()
     profile_parameters->clear();
     QListWidgetItem *item = profile_list->currentItem();
     if (!item) return;
-    profile_parameters->setPlainText(item->data(Qt::UserRole).toString().section(";", 0, 0));
+    profile_parameters->setPlainText(item->data(Qt::UserRole).toString().section(';', 0, 0));
 }
 
 void EncodingProfilesDialog::slotDeleteProfile()
@@ -136,11 +136,11 @@ void EncodingProfilesDialog::slotAddProfile()
     QListWidgetItem *item = profile_list->currentItem();
     if (item) {
         QString data = item->data(Qt::UserRole).toString();
-        pparams->setPlainText(data.section(";", 0, 0));
-        pext->setText(data.section(";", 1, 1));
+        pparams->setPlainText(data.section(';', 0, 0));
+        pext->setText(data.section(';', 1, 1));
     }
     if (d->exec() == QDialog::Accepted) {
-        m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ";" + pext->text());
+        m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ';' + pext->text());
         slotLoadProfiles();
     }
     delete d;
@@ -169,12 +169,12 @@ void EncodingProfilesDialog::slotEditProfile()
     if (item) {
         pname->setText(item->text());
         QString data = item->data(Qt::UserRole).toString();
-        pparams->setPlainText(data.section(";", 0, 0));
-        pext->setText(data.section(";", 1, 1));
+        pparams->setPlainText(data.section(';', 0, 0));
+        pext->setText(data.section(';', 1, 1));
         pparams->setFocus();
     }
     if (d->exec() == QDialog::Accepted) {
-        m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ";" + pext->text());
+        m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ';' + pext->text());
         slotLoadProfiles();
     }
     delete d;
-- 
1.7.10.4





More information about the Kdenlive mailing list