replaced QString uses with QStringLiteral
Minor code optimization according to Qt documentation.
This commit is contained in:
@@ -72,7 +72,7 @@ void AudioMonitor::paintEvent(QPaintEvent *)
|
||||
if (i <= kDecibelMinimum) {
|
||||
db_label = "-∞";
|
||||
} else {
|
||||
db_label = QString("%1").arg(i);
|
||||
db_label = QStringLiteral("%1").arg(i);
|
||||
}
|
||||
|
||||
qreal log_val = QAudio::convertVolume(i, QAudio::DecibelVolumeScale, QAudio::LogarithmicVolumeScale);
|
||||
|
||||
@@ -70,7 +70,7 @@ void TaskViewItem::SetTask(Task *t)
|
||||
task_ = t;
|
||||
|
||||
// Set name label to the name (bolded)
|
||||
task_name_lbl_->setText(QString("<b>%1</b>").arg(task_->text()));
|
||||
task_name_lbl_->setText(QStringLiteral("<b>%1</b>").arg(task_->text()));
|
||||
|
||||
// Connect to the task
|
||||
connect(task_, SIGNAL(StatusChanged(Task::Status)), this, SLOT(TaskStatusChange(Task::Status)));
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "timelineviewblockitem.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QCoreApplication>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QPainter>
|
||||
@@ -62,11 +63,11 @@ void TimelineViewBlockItem::UpdateRect()
|
||||
setRect(0, y_, item_width - 1, height_ - 1);
|
||||
setPos(item_left, 0.0);
|
||||
|
||||
// FIXME: Untranslated
|
||||
setToolTip(QString("%1\n\nIn: %2\nOut: %3\nMedia In: %4").arg(block_->Name(),
|
||||
QString::number(block_->in().toDouble()),
|
||||
QString::number(block_->out().toDouble()),
|
||||
QString::number(block_->media_in().toDouble())));
|
||||
setToolTip(QCoreApplication::translate("TimelineViewBlockItem",
|
||||
"%1\n\nIn: %2\nOut: %3\nMedia In: %4").arg(block_->Name(),
|
||||
QString::number(block_->in().toDouble()),
|
||||
QString::number(block_->out().toDouble()),
|
||||
QString::number(block_->media_in().toDouble())));
|
||||
}
|
||||
|
||||
void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
||||
Reference in New Issue
Block a user