summaryrefslogtreecommitdiffstats
path: root/src/library/basetracktablemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/basetracktablemodel.cpp')
-rw-r--r--src/library/basetracktablemodel.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp
index bcdd743ea3..4a88d43928 100644
--- a/src/library/basetracktablemodel.cpp
+++ b/src/library/basetracktablemodel.cpp
@@ -468,17 +468,14 @@ bool BaseTrackTableModel::setData(
QVariant BaseTrackTableModel::composeCoverArtToolTipHtml(
const QModelIndex& index) const {
// Determine height of the cover art image depending on the screen size
- unsigned int absoluteHeightOfCoverartToolTip;
const QScreen* primaryScreen = getPrimaryScreen();
- if (primaryScreen) {
- absoluteHeightOfCoverartToolTip = static_cast<int>(
- primaryScreen->availableGeometry().height() *
- kRelativeHeightOfCoverartToolTip);
- } else {
- VERIFY_OR_DEBUG_ASSERT(primaryScreen) {
- return QVariant();
- }
+ if (!primaryScreen) {
+ DEBUG_ASSERT(!"Primary screen not found!");
+ return QVariant();
}
+ unsigned int absoluteHeightOfCoverartToolTip = static_cast<int>(
+ primaryScreen->availableGeometry().height() *
+ kRelativeHeightOfCoverartToolTip);
// Get image from cover art cache
CoverArtCache* pCache = CoverArtCache::instance();
QPixmap pixmap = QPixmap(absoluteHeightOfCoverartToolTip,