[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [phonon-vlc/five] src: For Source, change url loading to use the resolved() method
From: Casian Andrei <skeletk13 () gmail ! com>
Date: 2014-07-10 8:17:06
Message-ID: E1X59XO-0001gx-LB () scm ! kde ! org
[Download RAW message or body]
Git commit f55065b58e580ce9de732dc0ee707c86933f2226 by Casian Andrei.
Committed on 10/07/2014 at 08:14.
Pushed by casianandrei into branch 'five'.
For Source, change url loading to use the resolved() method
M +3 -8 src/player.cpp
http://commits.kde.org/phonon-vlc/f55065b58e580ce9de732dc0ee707c86933f2226
diff --git a/src/player.cpp b/src/player.cpp
index fb2107f..ffd9730 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -292,15 +292,10 @@ void Player::setSource(const Source &source)
/*
* Source specified by URL
*/
- QByteArray url;
+ QUrl url = source.url();
+ url = QUrl(QDir::currentPath()).resolved(url);
pDebug() << "MediaSource::Url:" << source.url();
- if (source.url().scheme().isEmpty()) {
- url = "file:///";
- if (source.url().isRelative())
- url.append(QFile::encodeName(QDir::currentPath()) + '/');
- }
- url += source.url().toEncoded();
- loadMedia(url);
+ loadMedia(url.toEncoded());
} else if (source.deviceType() != Source::NoDevice) {
/*
* Source specified by device
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic