From 0d058fda9189f6bf96c70d71ffe1d18ca433e046 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 24 Nov 2018 17:36:48 +0100 Subject: Fix some clang warnings --- helper.cpp | 2 +- helper.h | 2 +- playerwidget.cpp | 2 +- playerwidget.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helper.cpp b/helper.cpp index 306a2d1..119eaed 100644 --- a/helper.cpp +++ b/helper.cpp @@ -31,7 +31,7 @@ namespace Helper { return a; } - quint64 lengthInSeconds(const QString &file){ + int lengthInSeconds(const QString &file){ TagLib::FileRef f(QString(file).toUtf8()); if(f.isNull()){ return 0; diff --git a/helper.h b/helper.h index 0169491..ced3e59 100644 --- a/helper.h +++ b/helper.h @@ -11,7 +11,7 @@ class QLabel; namespace Helper { QIcon iconFromQChar(const QChar &c, int pixelSize); QAction* createSeparator(QObject *parent); - quint64 lengthInSeconds(const QString &file); + int lengthInSeconds(const QString &file); QColor colorFromLabel(QLabel *l); void fillLabel(QLabel *l, QColor c); } diff --git a/playerwidget.cpp b/playerwidget.cpp index a21cdca..c9e8214 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -644,7 +644,7 @@ void PlayerWidget::addSong(const QModelIndex &idx){ item->setText(display); item->setIcon(QIcon(":/song.png")); item->setData(idx.data(CollectionWidget::FullPathRole), CollectionWidget::FullPathRole); - quint64 len = idx.data(CollectionWidget::LengthRole).toUInt(); + int len = idx.data(CollectionWidget::LengthRole).toInt(); if(len == 0){ len = Helper::lengthInSeconds(idx.data(CollectionWidget::FullPathRole).toString()); } diff --git a/playerwidget.h b/playerwidget.h index 1ace3fc..15da4fa 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -80,7 +80,7 @@ class PlayerWidget : public QWidget { void viewModeChanged(const QString &viewMode); void playModeChanged(const QString &playMode); void numFilesChanged(int numFiles); - void playListLengthChanged(quint64 secs); + void playListLengthChanged(qint64 secs); void message(const QString &msg); void modelChanged(); void setWinTitle(const QString &title); @@ -117,7 +117,7 @@ class PlayerWidget : public QWidget { QAction *mPauseA; QAction *mViewByAlbumsA; int mDurSecs; - quint64 mPlayListLength; + qint64 mPlayListLength; QString mCurWinTitle; QString mCurToolTip; QSystemTrayIcon *mTrayIcon; -- cgit v1.2.3-70-g09d2