Magellan Linux

Contents of /trunk/kdebase/patches/kdebase-3.5.4-applet-redirects.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (show annotations) (download)
Tue May 8 20:06:05 2007 UTC (17 years ago) by niro
File size: 2317 byte(s)
-import

1 Index: nsplugins/viewer/nsplugin.cpp
2 ===================================================================
3 --- nsplugins/viewer/nsplugin.cpp (revision 565997)
4 +++ nsplugins/viewer/nsplugin.cpp (revision 565998)
5 @@ -1602,6 +1602,12 @@
6 return true;
7 }
8
9 +void NSPluginStreamBase::updateURL( const KURL& newURL )
10 +{
11 + _url = newURL;
12 + free(const_cast<char*>(_stream->url));
13 + _stream->url = strdup(_url.url().ascii());
14 +}
15
16 int NSPluginStreamBase::process( const QByteArray &data, int start )
17 {
18 @@ -1824,6 +1830,8 @@
19 SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
20 connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
21 SLOT(mimetype(KIO::Job *, const QString &)));
22 + connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
23 + SLOT(redirection(KIO::Job *, const KURL&)));
24 }
25
26 return false;
27 @@ -1847,6 +1855,8 @@
28 SLOT(totalSize(KIO::Job *, KIO::filesize_t)));
29 connect(_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
30 SLOT(mimetype(KIO::Job *, const QString &)));
31 + connect(_job, SIGNAL(redirection(KIO::Job *, const KURL&)),
32 + SLOT(redirection(KIO::Job *, const KURL&)));
33 }
34
35 return false;
36 @@ -1863,6 +1873,11 @@
37 }
38 }
39
40 +void NSPluginStream::redirection(KIO::Job * /*job*/, const KURL& url)
41 +{
42 + updateURL( url );
43 +}
44 +
45 void NSPluginStream::totalSize(KIO::Job * job, KIO::filesize_t size)
46 {
47 kdDebug(1431) << "NSPluginStream::totalSize - job=" << (void*)job << " size=" << KIO::number(size) << endl;
48 Index: nsplugins/viewer/nsplugin.h
49 ===================================================================
50 --- nsplugins/viewer/nsplugin.h (revision 565997)
51 +++ nsplugins/viewer/nsplugin.h (revision 565998)
52 @@ -85,6 +85,7 @@
53 bool create( const QString& url, const QString& mimeType, void *notify, bool forceNotify = false );
54 int tries() { return _tries; }
55 void inform( );
56 + void updateURL( const KURL& newURL );
57
58 class NSPluginInstance *_instance;
59 uint16 _streamType;
60 @@ -126,6 +127,7 @@
61 void totalSize(KIO::Job *job, KIO::filesize_t size);
62 void mimetype(KIO::Job * job, const QString &mimeType);
63 void result(KIO::Job *job);
64 + void redirection(KIO::Job *job, const KURL& url);
65 void resume();
66
67 protected: