Skip to content

Commit

Permalink
fix: video path wrong
Browse files Browse the repository at this point in the history
Change-Id: I75229af6522224b894f71b43a0d419cf50ccf4f6
  • Loading branch information
justforlxz committed Dec 18, 2018
1 parent 103f17a commit 49b34d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/videowidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ static QDir ResourcesQDir() {
videoPath.setSorting(QDir::Name);

#ifdef QT_DEBUG
videoPath.cd("resources");
#ifdef PROFESSIONAL
videoPath.cd("resources/professional");
#else
videoPath.cd("resources/desktop");
#endif
#else
videoPath.cd("../share/dde-introduction");
#endif

return std::move(videoPath);
return videoPath;
}

VideoWidget::VideoWidget(bool autoPlay, QWidget *parent)
Expand Down Expand Up @@ -105,11 +109,7 @@ VideoWidget::VideoWidget(bool autoPlay, QWidget *parent)

QDir videoPath(ResourcesQDir());

#ifdef PROFESSIONAL
const QString &file = videoPath.path() + QString("/professional/demo.mp4");
#else
const QString &file = videoPath.path() + QString("/desktop/demo.mp4");
#endif
const QString &file = videoPath.path() + QString("/demo.mp4");

connect(m_control, &DImageButton::clicked, this, &VideoWidget::onControlButtonClicked, Qt::QueuedConnection);
connect(&m_video->engine(), &dmr::PlayerEngine::stateChanged, this, &VideoWidget::updateControlButton, Qt::QueuedConnection);
Expand Down

0 comments on commit 49b34d3

Please sign in to comment.