]> git.sesse.net Git - kdenlive/blobdiff - src/renderwidget.cpp
const modifiers are useless on integral return types [PATCH by Ray Lehtiniemi]
[kdenlive] / src / renderwidget.cpp
index 4cf779ed5849e7d4b4963f359a463e738b2ba583..b16c0e34b8b61db3eaea9ccd3f67401b9220aa30 100644 (file)
  ***************************************************************************/
 
 
-#include <QDomDocument>
-#include <QItemDelegate>
-#include <QTreeWidgetItem>
-#include <QListWidgetItem>
-#include <QHeaderView>
-#include <QMenu>
-#include <QProcess>
-#include <QInputDialog>
+#include "renderwidget.h"
+#include "kdenlivesettings.h"
+#include "ui_saveprofile_ui.h"
 
 #include <KStandardDirs>
 #include <KDebug>
 #include <KIO/NetAccess>
 // #include <knewstuff2/engine.h>
 
-#include "kdenlivesettings.h"
-#include "renderwidget.h"
-#include "ui_saveprofile_ui.h"
+#include <QDomDocument>
+#include <QItemDelegate>
+#include <QTreeWidgetItem>
+#include <QListWidgetItem>
+#include <QHeaderView>
+#include <QMenu>
+#include <QProcess>
+#include <QInputDialog>
 
 const int GroupRole = Qt::UserRole;
 const int ExtensionRole = GroupRole + 1;
@@ -575,7 +575,7 @@ void RenderWidget::slotExport(bool scriptExport) {
         width = m_profile.width;
         height = m_profile.height;
     }
-    renderArgs.replace("%dar", "@" + QString::number(m_profile.display_aspect_num) + "/" + QString::number(m_profile.display_aspect_den));
+    renderArgs.replace("%dar", '@' + QString::number(m_profile.display_aspect_num) + '/' + QString::number(m_profile.display_aspect_den));
 
     // Adjust scanning
     if (m_view.scanning_list->currentIndex() == 1) renderArgs.append(" progressive=1");
@@ -614,7 +614,7 @@ void RenderWidget::slotExport(bool scriptExport) {
     if (group == "dvd" && m_view.open_dvd->isChecked()) {
         renderItem->setData(0, Qt::UserRole, group);
         if (renderArgs.contains("profile=")) {
-            // rendering profile contains an MLT profile, so pass it to the running jog item, usefull for dvd
+            // rendering profile contains an MLT profile, so pass it to the running jog item, useful for dvd
             QString prof = renderArgs.section("profile=", 1, 1);
             prof = prof.section(' ', 0, 0);
             kDebug() << "// render profile: " << prof;
@@ -858,7 +858,7 @@ void RenderWidget::parseProfiles(QString meta, QString group, QString profile) {
     // We should parse customprofiles.xml in last position, so that user profiles
     // can also override profiles installed by KNewStuff
     fileList.removeAll("customprofiles.xml");
-    foreach(const QString filename, fileList)
+    foreach(const QString &filename, fileList)
     parseFile(exportFolder + '/' + filename, true);
     if (QFile::exists(exportFolder + "/customprofiles.xml")) parseFile(exportFolder + "/customprofiles.xml", true);
 
@@ -1022,8 +1022,8 @@ void RenderWidget::parseFile(QString exportFile, bool editable) {
             }
         }
         groupName = documentElement.attribute("name", i18n("Custom"));
-        extension = documentElement.attribute("extension", QString::null);
-        renderer = documentElement.attribute("renderer", QString::null);
+        extension = documentElement.attribute("extension", QString());
+        renderer = documentElement.attribute("renderer", QString());
         QList <QListWidgetItem *> list = m_view.format_list->findItems(groupName, Qt::MatchExactly);
         bool exists = false;
         for (int j = 0; j < list.count(); j++) {
@@ -1103,7 +1103,7 @@ void RenderWidget::setRenderStatus(const QString &dest, int status, const QStrin
             emit openDvdWizard(item->text(1), item->data(0, Qt::UserRole + 1).toString());
         } else if (itemGroup == "websites") {
             QString url = item->data(0, Qt::UserRole + 1).toString();
-            if (!url.isEmpty()) KRun *openBrowser = new KRun(url, this);
+            if (!url.isEmpty()) new KRun(url, this);
         }
     } else if (status == -2) {
         // Rendering crashed
@@ -1209,4 +1209,5 @@ void RenderWidget::slotDeleteScript() {
 
 void RenderWidget::slotGenerateScript() {
     slotExport(true);
-}
\ No newline at end of file
+}
+