1 |
scarabeus 10/01/27 10:40:52 |
2 |
|
3 |
Added: 4.3.5-fix-slow-folderview.patch |
4 |
Log: |
5 |
Revision bump. Apply upstream patch fixing cpu hogs. |
6 |
(Portage version: 2.2_rc61/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 kde-base/kdebase-kioslaves/files/4.3.5-fix-slow-folderview.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdebase-kioslaves/files/4.3.5-fix-slow-folderview.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdebase-kioslaves/files/4.3.5-fix-slow-folderview.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 4.3.5-fix-slow-folderview.patch |
15 |
=================================================================== |
16 |
Index: branches/KDE/4.3/kdebase/runtime/kioslave/desktop/desktopnotifier.h |
17 |
=================================================================== |
18 |
--- a/kioslave/desktop/desktopnotifier.h (revision 1080099) |
19 |
+++ b/kioslave/desktop/desktopnotifier.h (revision 1080100) |
20 |
@@ -1,5 +1,5 @@ |
21 |
/* This file is part of the KDE Project |
22 |
- Copyright (C) 2008 Fredrik Höglund <fredrik@×××.org> |
23 |
+ Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@×××.org> |
24 |
|
25 |
This library is free software; you can redistribute it and/or |
26 |
modify it under the terms of the GNU Library General Public |
27 |
@@ -20,15 +20,26 @@ |
28 |
#define DESKTOPNOTIFIER_H |
29 |
|
30 |
#include <kdedmodule.h> |
31 |
+#include <QtDBus/QtDBus> |
32 |
|
33 |
+class KDirWatch; |
34 |
+ |
35 |
class DesktopNotifier : public KDEDModule |
36 |
{ |
37 |
Q_OBJECT |
38 |
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DesktopNotifier") |
39 |
+ |
40 |
public: |
41 |
DesktopNotifier(QObject* parent, const QList<QVariant>&); |
42 |
|
43 |
+public slots: |
44 |
+ Q_SCRIPTABLE Q_NOREPLY void watchDir(const QString &path); |
45 |
+ |
46 |
private slots: |
47 |
void dirty(const QString &path); |
48 |
+ |
49 |
+private: |
50 |
+ KDirWatch *dirWatch; |
51 |
}; |
52 |
|
53 |
#endif |
54 |
Index: branches/KDE/4.3/kdebase/runtime/kioslave/desktop/kio_desktop.h |
55 |
=================================================================== |
56 |
--- a/kioslave/desktop/kio_desktop.h (revision 1080099) |
57 |
+++ b/kioslave/desktop/kio_desktop.h (revision 1080100) |
58 |
@@ -1,5 +1,5 @@ |
59 |
/* This file is part of the KDE project |
60 |
- Copyright (C) 2008 Fredrik Höglund <fredrik@×××.org> |
61 |
+ Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@×××.org> |
62 |
|
63 |
This library is free software; you can redistribute it and/or |
64 |
modify it under the terms of the GNU Library General Public |
65 |
@@ -33,6 +33,7 @@ |
66 |
void checkLocalInstall(); |
67 |
QString desktopFile(KIO::UDSEntry&) const; |
68 |
virtual bool rewriteUrl(const KUrl &url, KUrl &newUrl); |
69 |
+ virtual void listDir(const KUrl &url); |
70 |
virtual void prepareUDSEntry(KIO::UDSEntry &entry, bool listing=false) const; |
71 |
virtual void rename(const KUrl &, const KUrl &, KIO::JobFlags flags); |
72 |
}; |
73 |
Index: branches/KDE/4.3/kdebase/runtime/kioslave/desktop/desktopnotifier.cpp |
74 |
=================================================================== |
75 |
--- a/kioslave/desktop/desktopnotifier.cpp (revision 1080099) |
76 |
+++ b/kioslave/desktop/desktopnotifier.cpp (revision 1080100) |
77 |
@@ -1,5 +1,5 @@ |
78 |
/* This file is part of the KDE Project |
79 |
- Copyright (C) 2008 Fredrik Höglund <fredrik@×××.org> |
80 |
+ Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@×××.org> |
81 |
|
82 |
This library is free software; you can redistribute it and/or |
83 |
modify it under the terms of the GNU Library General Public |
84 |
@@ -36,13 +36,18 @@ |
85 |
DesktopNotifier::DesktopNotifier(QObject *parent, const QList<QVariant> &) |
86 |
: KDEDModule(parent) |
87 |
{ |
88 |
- KDirWatch *dirWatch = new KDirWatch(this); |
89 |
- dirWatch->addDir(KGlobalSettings::desktopPath(), KDirWatch::WatchSubDirs); |
90 |
+ dirWatch = new KDirWatch(this); |
91 |
+ dirWatch->addDir(KGlobalSettings::desktopPath()); |
92 |
dirWatch->addDir(KGlobal::dirs()->localxdgdatadir() + "Trash/files"); |
93 |
|
94 |
connect(dirWatch, SIGNAL(dirty(QString)), SLOT(dirty(QString))); |
95 |
} |
96 |
|
97 |
+void DesktopNotifier::watchDir(const QString &path) |
98 |
+{ |
99 |
+ dirWatch->addDir(path); |
100 |
+} |
101 |
+ |
102 |
void DesktopNotifier::dirty(const QString &path) |
103 |
{ |
104 |
Q_UNUSED(path) |
105 |
Index: branches/KDE/4.3/kdebase/runtime/kioslave/desktop/kio_desktop.cpp |
106 |
=================================================================== |
107 |
--- a/kioslave/desktop/kio_desktop.cpp (revision 1080099) |
108 |
+++ b/kioslave/desktop/kio_desktop.cpp (revision 1080100) |
109 |
@@ -1,5 +1,5 @@ |
110 |
/* This file is part of the KDE project |
111 |
- Copyright (C) 2008 Fredrik Höglund <fredrik@×××.org> |
112 |
+ Copyright (C) 2008, 2009 Fredrik Höglund <fredrik@×××.org> |
113 |
|
114 |
This library is free software; you can redistribute it and/or |
115 |
modify it under the terms of the GNU Library General Public |
116 |
@@ -157,6 +157,17 @@ |
117 |
return true; |
118 |
} |
119 |
|
120 |
+void DesktopProtocol::listDir(const KUrl &url) |
121 |
+{ |
122 |
+ KIO::ForwardingSlaveBase::listDir(url); |
123 |
+ |
124 |
+ KUrl actual; |
125 |
+ rewriteUrl(url, actual); |
126 |
+ |
127 |
+ QDBusInterface kded("org.kde.kded", "/modules/desktopnotifier", "org.kde.DesktopNotifier"); |
128 |
+ kded.call("watchDir", actual.path()); |
129 |
+} |
130 |
+ |
131 |
QString DesktopProtocol::desktopFile(KIO::UDSEntry &entry) const |
132 |
{ |
133 |
const QString name = entry.stringValue(KIO::UDSEntry::UDS_NAME); |