From 653eeee98e56bd9b10e864f03e3290369a3fa00b Mon Sep 17 00:00:00 2001 From: lordmulder Date: Mon, 4 Jan 2016 20:52:19 +0100 Subject: [PATCH] Fixed a bug in job name generation. --- src/model_jobList.cpp | 32 +++++++++----------------------- src/version.h | 2 +- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/model_jobList.cpp b/src/model_jobList.cpp index 4a42553..7a83a9e 100644 --- a/src/model_jobList.cpp +++ b/src/model_jobList.cpp @@ -239,39 +239,25 @@ QVariant JobListModel::data(const QModelIndex &index, int role) const QModelIndex JobListModel::insertJob(EncodeThread *thread) { - QUuid id = thread->getId(); - + const QUuid id = thread->getId(); if(m_jobs.contains(id)) { return QModelIndex(); } - QString config = "N/A"; - - switch(thread->options()->rcMode()) + QString config = QLatin1String("N/A"); + switch(thread->options()->encType()) { - case OptionsModel::EncType_X264: - config = QString("x264"); - break; - case OptionsModel::EncType_X265: - config = QString("x265"); - break; + case OptionsModel::EncType_X264: config = QLatin1String("x264"); break; + case OptionsModel::EncType_X265: config = QLatin1String("x265"); break; } switch(thread->options()->rcMode()) { - case OptionsModel::RCMode_CRF: - config = QString("%1 CRF@%2") .arg(config, QString::number(thread->options()->quantizer())); - break; - case OptionsModel::RCMode_CQ: - config = QString("%1 CQ@%2") .arg(config, QString::number(qRound(thread->options()->quantizer()))); - break; - case OptionsModel::RCMode_2Pass: - config = QString("%1 2Pass@%2").arg(config, QString::number(thread->options()->bitrate())); - break; - case OptionsModel::RCMode_ABR: - config = QString("%1 ABR@%2") .arg(config, QString::number(thread->options()->bitrate())); - break; + case OptionsModel::RCMode_CRF: config.append(QString(" CRF@%1") .arg(QString::number(thread->options()->quantizer()))); break; + case OptionsModel::RCMode_CQ: config.append(QString(" CQ@%1") .arg(QString::number(qRound(thread->options()->quantizer())))); break; + case OptionsModel::RCMode_2Pass: config.append(QString(" 2Pass@%1").arg(QString::number(thread->options()->bitrate()))); break; + case OptionsModel::RCMode_ABR: config.append(QString(" ABR@%1") .arg(QString::number(thread->options()->bitrate()))); break; } int n = 2; diff --git a/src/version.h b/src/version.h index 701776b..2777c21 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 6 #define VER_X264_PATCH 5 -#define VER_X264_BUILD 1006 +#define VER_X264_BUILD 1007 #define VER_X264_PORTABLE_EDITION (0)