diff --git a/src/context/contextview.h b/src/context/contextview.h index 9b2eb7243..0df2fce42 100644 --- a/src/context/contextview.h +++ b/src/context/contextview.h @@ -86,24 +86,11 @@ class ContextView : public QWidget { private: - enum WidgetState { - //State_None = 0, - State_Playing, - State_Stopped - }; - static const char *kSettingsGroup; - static const int kPadding; - static const int kGradientHead; - static const int kGradientTail; - static const int kMaxCoverSize; - static const int kBottomOffset; - static const int kTopBorder; Application *app_; Ui_ContextViewContainer *ui_; CollectionView *collectionview_; - WidgetState widgetstate_; QMenu *menu_; QTimeLine *timeline_fade_; QImage image_strawberry_; @@ -119,13 +106,10 @@ class ContextView : public QWidget { AlbumCoverLoaderOptions cover_loader_options_; Song song_; Song song_empty_; - Song song_prev_; QImage image_original_; QImage image_previous_; - QPixmap *pixmap_album_; QPixmap pixmap_current_; QPixmap pixmap_previous_; - QPainter *painter_album_; qreal pixmap_previous_opacity_; std::unique_ptr spinner_animation_; diff --git a/src/core/iconloader.cpp b/src/core/iconloader.cpp index f6c326a1b..3d8ce965b 100644 --- a/src/core/iconloader.cpp +++ b/src/core/iconloader.cpp @@ -45,7 +45,7 @@ QIcon IconLoader::Load(const QString &name, const int size) { return ret; } - const QString path(":icons/%1x%2/%3.png"); + const QString path(":/icons/%1x%2/%3.png"); for (int s : sizes) { QString filename(path.arg(s).arg(s).arg(name)); if (QFile::exists(filename)) ret.addFile(filename, QSize(s, s)); diff --git a/src/device/devicedatabasebackend.cpp b/src/device/devicedatabasebackend.cpp index 03a6586e0..b49be6123 100644 --- a/src/device/devicedatabasebackend.cpp +++ b/src/device/devicedatabasebackend.cpp @@ -89,7 +89,7 @@ int DeviceDatabaseBackend::AddDevice(const Device &device) { int id = q.lastInsertId().toInt(); // Create the songs tables for the device - QString filename(":schema/device-schema.sql"); + QString filename(":/schema/device-schema.sql"); QFile schema_file(filename); if (!schema_file.open(QIODevice::ReadOnly)) qFatal("Couldn't open schema file %s", filename.toUtf8().constData()); diff --git a/src/settings/notificationssettingspage.cpp b/src/settings/notificationssettingspage.cpp index 875033db7..17e13750d 100644 --- a/src/settings/notificationssettingspage.cpp +++ b/src/settings/notificationssettingspage.cpp @@ -62,7 +62,7 @@ NotificationsSettingsPage::NotificationsSettingsPage(SettingsDialog* dialog) ui_->setupUi(this); setWindowIcon(IconLoader::Load("help-hint")); - pretty_popup_->SetMessage(tr("OSD Preview"), tr("Drag to reposition"), QImage(":pictures/nocover.png")); + pretty_popup_->SetMessage(tr("OSD Preview"), tr("Drag to reposition"), QImage(":/pictures/nocover.png")); ui_->notifications_bg_preset->setItemData(0, QColor(OSDPretty::kPresetBlue), Qt::DecorationRole); ui_->notifications_bg_preset->setItemData(1, QColor(OSDPretty::kPresetOrange), Qt::DecorationRole); diff --git a/src/widgets/busyindicator.cpp b/src/widgets/busyindicator.cpp index 6d1868595..8e3fa4f60 100644 --- a/src/widgets/busyindicator.cpp +++ b/src/widgets/busyindicator.cpp @@ -47,7 +47,7 @@ BusyIndicator::BusyIndicator(QWidget* parent) void BusyIndicator::Init(const QString &text) { - movie_ = new QMovie(":pictures/spinner.gif"), + movie_ = new QMovie(":/pictures/spinner.gif"), label_ = new QLabel; QLabel *icon = new QLabel; diff --git a/src/widgets/osdpretty.cpp b/src/widgets/osdpretty.cpp index 64c2b3601..1e3209098 100644 --- a/src/widgets/osdpretty.cpp +++ b/src/widgets/osdpretty.cpp @@ -130,14 +130,14 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent) #endif // Load the show edges and corners - QImage shadow_edge(":pictures/osd_shadow_edge.png"); - QImage shadow_corner(":pictures/osd_shadow_corner.png"); + QImage shadow_edge(":/pictures/osd_shadow_edge.png"); + QImage shadow_corner(":/pictures/osd_shadow_corner.png"); for (int i = 0; i < 4; ++i) { QTransform rotation = QTransform().rotate(90 * i); shadow_edge_[i] = QPixmap::fromImage(shadow_edge.transformed(rotation)); shadow_corner_[i] = QPixmap::fromImage(shadow_corner.transformed(rotation)); } - background_ = QPixmap(":pictures/osd_background.png"); + background_ = QPixmap(":/pictures/osd_background.png"); // Set the margins to allow for the drop shadow QBoxLayout *l = static_cast(layout());