Add LL
This commit is contained in:
@@ -2115,7 +2115,7 @@ void CollectionBackend::ExpireSongs(const int directory_id, const int expire_una
|
||||
SqlQuery q(db);
|
||||
q.prepare(QStringLiteral("SELECT %1 FROM %2 LEFT JOIN playlist_items ON %2.ROWID = playlist_items.collection_id WHERE %2.directory_id = :directory_id AND %2.unavailable = 1 AND %2.lastseen > 0 AND %2.lastseen < :time AND playlist_items.collection_id IS NULL").arg(Song::JoinSpec(songs_table_), songs_table_));
|
||||
q.BindValue(QStringLiteral(":directory_id"), directory_id);
|
||||
q.BindValue(QStringLiteral(":time"), QDateTime::currentSecsSinceEpoch() - (expire_unavailable_songs_days * 86400));
|
||||
q.BindValue(QStringLiteral(":time"), QDateTime::currentSecsSinceEpoch() - (expire_unavailable_songs_days * 86400LL));
|
||||
if (!q.Exec()) {
|
||||
db_->ReportErrors(q);
|
||||
return;
|
||||
|
||||
@@ -60,7 +60,7 @@ MoodbarLoader::MoodbarLoader(Application *app, QObject *parent)
|
||||
save_(false) {
|
||||
|
||||
cache_->setCacheDirectory(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/moodbar"));
|
||||
cache_->setMaximumCacheSize(60 * 1024 * 1024); // 60MB - enough for 20,000 moodbars
|
||||
cache_->setMaximumCacheSize(60LL * 1024LL * 1024LL); // 60MB - enough for 20,000 moodbars
|
||||
|
||||
QObject::connect(app, &Application::SettingsChanged, this, &MoodbarLoader::ReloadSettings);
|
||||
ReloadSettings();
|
||||
|
||||
@@ -33,14 +33,14 @@ QString PrettySize(const quint64 bytes) {
|
||||
|
||||
QString ret;
|
||||
|
||||
if (bytes > 0) {
|
||||
if (bytes <= 1000) {
|
||||
if (bytes > 0LL) {
|
||||
if (bytes <= 1000LL) {
|
||||
ret = QString::number(bytes) + QStringLiteral(" bytes");
|
||||
}
|
||||
else if (bytes <= 1000 * 1000) {
|
||||
else if (bytes <= 1000LL * 1000LL) {
|
||||
ret = QString::asprintf("%.1f KB", static_cast<float>(bytes) / 1000.0F);
|
||||
}
|
||||
else if (bytes <= 1000 * 1000 * 1000) {
|
||||
else if (bytes <= 1000LL * 1000LL * 1000LL) {
|
||||
ret = QString::asprintf("%.1f MB", static_cast<float>(bytes) / (1000.0F * 1000.0F));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -59,7 +59,7 @@ QString PrettyTimeNanosec(const qint64 nanoseconds) {
|
||||
|
||||
QString WordyTime(const quint64 seconds) {
|
||||
|
||||
quint64 days = seconds / (60 * 60 * 24);
|
||||
quint64 days = seconds / (60LL * 60LL * 24LL);
|
||||
|
||||
// TODO: Make the plural rules translatable
|
||||
QStringList parts;
|
||||
|
||||
Reference in New Issue
Block a user