Fix warnings about implicit conversion
This commit is contained in:
parent
783d2eb2a6
commit
2ec53c5044
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include <c++utilities/chrono/datetime.h>
|
#include <c++utilities/chrono/datetime.h>
|
||||||
#include <c++utilities/conversion/stringconversion.h>
|
#include <c++utilities/conversion/stringconversion.h>
|
||||||
|
#include <c++utilities/misc/traits.h>
|
||||||
|
|
||||||
#if defined(TAGEDITOR_GUI_QTWIDGETS)
|
#if defined(TAGEDITOR_GUI_QTWIDGETS)
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -88,7 +89,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void appendRow(const QString &label, uint64 number)
|
template<typename IntegralType, Traits::EnableIf<std::is_integral<IntegralType>> * = nullptr>
|
||||||
|
void appendRow(const QString &label, IntegralType number)
|
||||||
{
|
{
|
||||||
if (number) {
|
if (number) {
|
||||||
appendRow(label, QString::number(number));
|
appendRow(label, QString::number(number));
|
||||||
|
@ -358,7 +360,7 @@ void FileInfoModel::updateCache()
|
||||||
} else {
|
} else {
|
||||||
setItem(currentRow, 1,
|
setItem(currentRow, 1,
|
||||||
defaultItem(tr("%1 track(s): ", nullptr, trQuandity(tracks.size())).arg(tracks.size())
|
defaultItem(tr("%1 track(s): ", nullptr, trQuandity(tracks.size())).arg(tracks.size())
|
||||||
+ QString::fromUtf8(summary.data(), summary.size())));
|
+ QString::fromUtf8(summary.data(), trQuandity(summary.size()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t number = 0;
|
size_t number = 0;
|
||||||
|
@ -469,7 +471,7 @@ void FileInfoModel::updateCache()
|
||||||
ItemHelper attachHelper(attachmentItem);
|
ItemHelper attachHelper(attachmentItem);
|
||||||
attachHelper.appendRow(tr("ID"), attachment->id());
|
attachHelper.appendRow(tr("ID"), attachment->id());
|
||||||
attachHelper.appendRow(tr("Name"), attachment->name());
|
attachHelper.appendRow(tr("Name"), attachment->name());
|
||||||
attachHelper.appendRow(tr("Size"), dataSizeToString(attachment->data()->size()));
|
attachHelper.appendRow(tr("Size"), dataSizeToString(static_cast<std::uint64_t>(attachment->data()->size())));
|
||||||
attachHelper.appendRow(tr("Mime-type"), attachment->mimeType());
|
attachHelper.appendRow(tr("Mime-type"), attachment->mimeType());
|
||||||
attachHelper.appendRow(tr("Description"), attachment->description());
|
attachHelper.appendRow(tr("Description"), attachment->description());
|
||||||
attachmentsItem->appendRow(attachmentItem);
|
attachmentsItem->appendRow(attachmentItem);
|
||||||
|
|
Loading…
Reference in New Issue