summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/phonon/files/fix_nonascii_chars.patch')
-rw-r--r--media-sound/phonon/files/fix_nonascii_chars.patch95
1 files changed, 0 insertions, 95 deletions
diff --git a/media-sound/phonon/files/fix_nonascii_chars.patch b/media-sound/phonon/files/fix_nonascii_chars.patch
deleted file mode 100644
index d39e2ab5e..000000000
--- a/media-sound/phonon/files/fix_nonascii_chars.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- branches/phonon/4.3/xine/mediaobject.cpp 2009/02/10 09:11:04 924143
-+++ branches/phonon/4.3/xine/mediaobject.cpp 2009/02/10 09:17:28 924144
-@@ -317,6 +317,20 @@
- setSourceInternal(source, HardSwitch);
- }
-
-+static QByteArray mrlEncode(QByteArray mrl)
-+{
-+ for (int i = 0; i < mrl.size(); ++i) {
-+ const unsigned char c = static_cast<unsigned char>(mrl.at(i));
-+ if (c & 0x80 || c == '\\' || c < 32 || c == '%') {
-+ char enc[4];
-+ qsnprintf(enc, 4, "%%%02X", c);
-+ mrl = mrl.left(i) + QByteArray(enc, 3) + mrl.mid(i + 1);
-+ i += 2;
-+ }
-+ }
-+ return mrl;
-+}
-+
- void MediaObject::setSourceInternal(const MediaSource &source, HowToSetTheUrl how)
- {
- //debug() << Q_FUNC_INFO;
-@@ -340,13 +354,18 @@
- m_stream->setError(Phonon::NormalError, tr("Cannot open media data at '<i>%1</i>'").arg(source.url().toString(QUrl::RemovePassword)));
- return;
- }
-- switch (how) {
-- case GaplessSwitch:
-- m_stream->gaplessSwitchTo(source.url());
-- break;
-- case HardSwitch:
-- m_stream->setUrl(source.url());
-- break;
-+ {
-+ const QByteArray &mrl = (source.url().scheme() == QLatin1String("file") ?
-+ "file:/" + mrlEncode(QFile::encodeName(source.url().toLocalFile())) :
-+ source.url().toEncoded());
-+ switch (how) {
-+ case GaplessSwitch:
-+ m_stream->gaplessSwitchTo(mrl);
-+ break;
-+ case HardSwitch:
-+ m_stream->setMrl(mrl);
-+ break;
-+ }
- }
- break;
- case MediaSource::Disc:
---- branches/phonon/4.3/xine/xinestream.cpp 2009/02/10 09:11:04 924143
-+++ branches/phonon/4.3/xine/xinestream.cpp 2009/02/10 09:17:28 924144
-@@ -619,12 +619,6 @@
- }
-
- // called from main thread
--void XineStream::gaplessSwitchTo(const QUrl &url)
--{
-- gaplessSwitchTo(url.toEncoded());
--}
--
--// called from main thread
- void XineStream::gaplessSwitchTo(const QByteArray &mrl)
- {
- QCoreApplication::postEvent(this, new GaplessSwitchEvent(mrl));
-@@ -1707,12 +1701,6 @@
- }
-
- // called from main thread
--void XineStream::setUrl(const QUrl &url)
--{
-- setMrl(url.toEncoded());
--}
--
--// called from main thread
- void XineStream::setMrl(const QByteArray &mrl, StateForNewMrl sfnm)
- {
- debug() << Q_FUNC_INFO << mrl << ", " << sfnm;
---- branches/phonon/4.3/xine/xinestream.h 2009/02/10 09:11:04 924143
-+++ branches/phonon/4.3/xine/xinestream.h 2009/02/10 09:17:28 924144
-@@ -86,7 +86,6 @@
- //void needRewire(AudioPostList *postList);
- void useGaplessPlayback(bool);
- void useGapOf(int gap);
-- void gaplessSwitchTo(const QUrl &url);
- void gaplessSwitchTo(const QByteArray &mrl);
- void closeBlocking();
- void aboutToDeleteVideoWidget();
-@@ -141,7 +140,6 @@
-
- void unload();
- public slots:
-- void setUrl(const QUrl &url);
- void setMrl(const QByteArray &mrl, StateForNewMrl = StoppedState);
- void play();
- void pause();